transientskp / tkp

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

Alembic broken #535

Closed gijzelaerr closed 8 years ago

gijzelaerr commented 8 years ago

I'm not sure yet what I'm doing wrong, but I wanted to create a migration path to TraP 4.0 but I keep getting an error:

$ alembic revision --autogenerate -m "update to TraP 4.0 model"
INFO  [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO  [alembic.runtime.migration] Will assume transactional DDL.
ERROR [alembic.util.messaging] Target database is not up to date.
  FAILED: Target database is not up to date.
gijzelaerr commented 8 years ago

Ok alembic is not broken, I forgot that you actually need to run alembic upgrade head after you initialized the database.

I added a migration script to 4.0rc2, but the problem is that the frequency table now also has a dataset column which is NOT NULL. I don't want to set a default since it would be probably incorrect, but it is close to impossible to find out what it should be.