-
-
Notifications
You must be signed in to change notification settings - Fork 307
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
Migrated issue, originally created by chris7 (@chris7)
I am trying to run a trivial migration, and alembic will migrate the database, but is not updating the database version. To update alembic_version, it requires me to run the migration again.
Here's the script I am running:
def upgrade():
op.add_column(
'peaks',
sa.Column('rti', sa.Float(), nullable=True),
)And the output of a full migration:
alembic upgrade head
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
INFO [alembic.runtime.migration] Running upgrade 1 -> 2, Add peakgroups
INFO [alembic.runtime.migration] Running upgrade 2 -> 3, peakgroup_feature_reference
INFO [alembic.runtime.migration] Running upgrade 3 -> 4, feature_to_peakgroup
INFO [alembic.runtime.migration] Running upgrade 4 -> 5, remove feature peaks
INFO [alembic.runtime.migration] Running upgrade 5 -> 6, add retention time indices
$ alembic current
INFO [alembic.runtime.migration] Context impl SQLiteImpl.
INFO [alembic.runtime.migration] Will assume non-transactional DDL.
5
The database at this point has the 'rti' column, so it was successful but the alembic_version table was never updated. I can run the migration again, and it will stamp the database with 6.
running alembic v. 0.8.6 & SQLAlchemy 1.0.12. The database is a sqlite file.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working