Open gijzelaerr opened 9 years ago
first step is here: https://github.com/transientskp/tkp/pull/511
what remains is a better integration and version checking in trap-manage.py.
This is an ongoing wish list item but not essential for R7. Moving to the long term milestone.
We need a schema migration tool - a tool that automates the development and deployment of upgrading and maybe downgrading database schemas.
We had a manually maintained repository of migration scripts, but maintaining this is cumbersome and error prone. I prefer an automated tool.
in my (Gijs) opinion an interesting candidate for this purpose is Alembic:
https://alembic.readthedocs.org/en/latest/
Since Alembic is based on SQLAlchemy, it is probably wise to only use it if we actually fully switch to SQLAlchemy.
Alembic is quite powerful because it can use all the fancy ORM tools SQLalchemy offers so you can write quite clean migration scripts. Also it does automated introspection and generates proposals for migration scripts which then can be adjusted to your needs.
This issue was moved from the LOFAR issue tracker. Original issue:
https://support.astron.nl/lofar_issuetracker/issues/5103