Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: init deletes existing db #657

Merged
merged 2 commits into from
Jun 9, 2022
Merged

Chore: init deletes existing db #657

merged 2 commits into from
Jun 9, 2022

Conversation

thekaveman
Copy link
Member

This is another area that can trip up new devs (and, me...:blush:), especially with all the extra warning messages that can be printed. Then if you have a mismatch in data/migrations and existing schema there can be all kinds of annoying errors.

In development mode, it's nice (e.g. when the devcontainer starts) to have the init script clear out any existing database file before rebuilding the whole thing.

In production, this should be a noop since the database file won't exist yet.

avoid unnecessary warning message about pending migrations
since we want to rebuild the database from scratch anyway
@thekaveman thekaveman added the docker Application container, devcontainer, Compose, etc. label Jun 9, 2022
@thekaveman thekaveman added this to the Dev environment cleanups milestone Jun 9, 2022
@thekaveman thekaveman self-assigned this Jun 9, 2022
@thekaveman thekaveman requested a review from a team as a code owner June 9, 2022 01:38
@github-actions github-actions bot added deployment-dev [auto] Changes that will trigger a deploy if merged to dev documentation [auto] Improvements or additions to documentation labels Jun 9, 2022
Copy link
Member

@machikoyasuda machikoyasuda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This exact thing tripped me up this morning!!!

@thekaveman thekaveman added the chore Chores and tasks for code cleanup, dev experience, admin/configuration settings, etc. label Jun 9, 2022
@thekaveman thekaveman merged commit 14c5255 into dev Jun 9, 2022
@thekaveman thekaveman deleted the chore/init-delete-db branch June 9, 2022 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Chores and tasks for code cleanup, dev experience, admin/configuration settings, etc. deployment-dev [auto] Changes that will trigger a deploy if merged to dev docker Application container, devcontainer, Compose, etc. documentation [auto] Improvements or additions to documentation
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants