-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for running db migration in docker image. We should not have a separate process for doing the migration, but it should be runnable from directly inside of the docker image of the installed software component. * Remove dbmigration codebuild task. We should run them inside of the container repl * Move almebic script to top level directory * Fix docker build * Fix hatch version getting * Fix db migration * Fix path to alembic migrations * Add coverage to gitignore
- Loading branch information
Showing
17 changed files
with
40 additions
and
446 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
.DS_Store | ||
*.log | ||
*.pyc | ||
*.swp | ||
*.env | ||
.coverage | ||
coverage.xml | ||
dist/ | ||
.venv/ | ||
__pycache__/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
/dist | ||
/coverage_html | ||
*.coverage* |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
## Alembic database migrations | ||
|
||
When you make changes to the DB schema you will have to run the alembic scripts for generating an appropriate migration file. | ||
|
||
This is how you do it: | ||
|
||
1. Create the template migration script | ||
``` | ||
poetry run alembic revision -m "name of the revision" | ||
``` | ||
2. Edit the newly created python file and fill out the `upgrade()` and `downgrade()` function with the relevant code bits | ||
3. You can now run the migration like so: | ||
``` | ||
OONI_PG_URL=postgresql://oonipg:oonipg@localhost/oonipg hatch run alembic upgrade head | ||
``` |
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file was deleted.
Oops, something went wrong.
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
This file was deleted.
Oops, something went wrong.
37 changes: 0 additions & 37 deletions
37
...es/oonirun/src/oonirun/alembic/old_versions/7d5841cb9549_make_oonirun_link_id_a_string.py
This file was deleted.
Oops, something went wrong.
32 changes: 0 additions & 32 deletions
32
.../src/oonirun/alembic/old_versions/836b3451a168_add_expiration_date_color_columns_drop_.py
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.