transientskp / tkp

A transients-discovery pipeline for astronomical image-based surveys
http://docs.transientskp.org/
BSD 2-Clause "Simplified" License
19 stars 14 forks source link

schema migration tool #359

Open gijzelaerr opened 9 years ago

gijzelaerr commented 9 years ago

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

gijzelaerr commented 9 years ago

depends on https://github.com/transientskp/tkp/issues/362

gijzelaerr commented 8 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.

AntoniaR commented 1 week ago

This is an ongoing wish list item but not essential for R7. Moving to the long term milestone.