benetech / VideoDeduplication

GNU General Public License v3.0
34 stars 12 forks source link

Add support for DB migrations #430

Open fsbatista opened 2 years ago

fsbatista commented 2 years ago

Currently, changes on the DB schema will only work on fresh installs of the project.

This can be easily tested by:

1) Running extract_features + generate_matches (either through the UI or scripts) on Dataset A 2) Changing the schema of a given table (in my specific case it was adding a new field to the matches table, but it could easy to reproduce by adding a non-nullable field to any table) 3) Running extract_features + generate_matches (either through the UI or scripts) on Dataset B

John's suggestion could be an interesting one (https://github.com/miguelgrinberg/Flask-Migrate).

I investigated using it, however, I ran into some issues