-
Notifications
You must be signed in to change notification settings - Fork 5
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
Reactivate aerich #101
Merged
tsagadar
merged 6 commits into
UpstreamDataInc:master
from
husqvarnagroup:mm/reactivate-aerich
Aug 29, 2024
Merged
Reactivate aerich #101
tsagadar
merged 6 commits into
UpstreamDataInc:master
from
husqvarnagroup:mm/reactivate-aerich
Aug 29, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tsagadar
force-pushed
the
mm/reactivate-aerich
branch
from
August 28, 2024 10:01
c673ac3
to
762df65
Compare
easybe
reviewed
Aug 28, 2024
b-rowan
reviewed
Aug 28, 2024
b-rowan
approved these changes
Aug 29, 2024
Constant should point to root of the project. Non-source files should be persisted there rather than in the goosebit folder.
Follow the structure as generated by /~https://github.com/s3rius/FastAPI-template
Removes all aerich automated activities from the app startup. The following actions should be manually triggered by the different roles Developer - Before running gooseBit for the first time, run `poetry run aerich upgrade`. - After pulling an update from gooseBit with model changes, run `poetry run aerich upgrade`. - After implementing model changes, run `poetry run aerich migrate` and commit the migration file together with the model changes. Ops - When setting up gooseBit initially, create database and configure db_uri. - When deploying gooseBit, make sure to call `aerich upgrade` before launching the service to ensure the database has the proper schema. Also in this commit (hard to separate): - moves the database config into the db folder. - slightly improves README.md. More work required, but waiting for docu duplication issue was addressed. - remove setting DB_MIGRATIONS_LOC - move migrations into goosebit/db
This code can be convenient for the developer but could be dangerous when running in production. Deleting software will also delete linked rollouts, so something that should not be done lightly. Finally, the code would be in the wrong place - not closely connected with the database init.
db already initialized through the lifespan in goosebit/__init.py__
tsagadar
force-pushed
the
mm/reactivate-aerich
branch
from
August 29, 2024 15:40
2cf10d3
to
bedf0f2
Compare
tsagadar
force-pushed
the
mm/reactivate-aerich
branch
from
August 29, 2024 15:44
bedf0f2
to
c83fd39
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Giving aerich another shot - as we need a database migration mechanism for proper deployments.
Mainly removes the automated aerich tasks from application startup and leaves these steps to be
triggered by the developer or ops person (see also commit messages)
Let's see if upcoming model changes can be expressed by aerich as migrations.
Fixes #48