Use alembic to manage database migrations
@davidcarlos or @athoscr could you kindly take a look at this PR
Looks good to me. For the records, the only change on existing kiskadee structure is the refactoring on the database model.
Is there any reason for moving the alembic directory with the migrations to migrations? If not, I'd rather keep the former name to comply with other projects hosted by Fedora, like Pagure and Bodhi.
alembic
migrations
Also, would you like to squash the PR in a single commit?
Thanks for the PR! It will be nice to see this migrations combined with our new CI/CD environment :)
rebased onto 7fa1cfcaa2ff81f83d6bf02dd69973ab6deb4b93
Changes done.
Also the current kiskadee uses "db_development" to get the database configurations, so on the "alembic/env.py" I put a try/except to get the database config type from the environment as DATABASE_TYPE or just use the db_development if not found. This will help once kiskadee start using a production database on the future.
Shouldn't this line be commented out, since you are setting this variable in env.py then?
It would be nice to document that this env var should be set in other environments so alembic can get the correct db uri
rebased onto e139448207226c00436a125cb226b9eefbc46f00
rebased onto 6079ad1e062de552c87fa02c911f19216abeb396
Merged
Pull-Request has been closed by athoscr
Use alembic to manage database migrations