Added the initial Alembic configuration and migration files.
The first migration makes sure to create the indexes on the result_data table.
Details
- Reviewers
kparal tflink mkrizek - Maniphest Tasks
- T307: Support global UUIDs throughout taskotron
- Commits
- rRSDB9557a3ca41e4: Initial Alembic support
Tested locally
Diff Detail
- Repository
- rRSDB resultsdb
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
This looks good to me but I'm wondering if cli.py should be enhanced to use alembic to create the db instead of raw sqla and to support upgrades of the schema
Yup it is definitely worth it, I just did not feel like spending time on it at the moment. Would it be OK with you to add the cli.py modifications after?
Overall, looks good to me. Just the minor concern about the logic in initialize_db and would be nice to have alembic in requirements.txt
resultsdb/cli.py | ||
---|---|---|
75 | I think that this logic needs to be reworked a bit so that the drop_all() and create_all() are combined with current_rev so that the alembic revision is initialized. I tried this code locally and it seems to work for a trivial usecase but it still concerns me a little |
other than the alembic README, looks good
alembic/README | ||
---|---|---|
1 ↗ | (On Diff #801) | It seems kinda silly to have this in git - can you either remove it from the revision or fill it out with something less generic? |
I think that this logic needs to be reworked a bit so that the drop_all() and create_all() are combined with current_rev so that the alembic revision is initialized.
I tried this code locally and it seems to work for a trivial usecase but it still concerns me a little