#5280 Fix for mysql alembic migration
Merged 2 years ago by ngompa. Opened 2 years ago by zlopez.
zlopez/pagure mysql_fix  into  master

@@ -19,6 +19,7 @@ 

      op.alter_column(

          'commit_flags',

          column_name='token_id',

+         existing_type=sa.String(64),

          nullable=False,

          existing_nullable=True

      )
@@ -28,6 +29,7 @@ 

      op.alter_column(

          'commit_flags',

          column_name='token_id',

+         existing_type=sa.String(64),

          nullable=True,

          existing_nullable=False

      )

In case of MySQL database when column is altered the existing type needs to be
specified.

Signed-off-by: Michal Konečný mkonecny@redhat.com

Does this fix the migration for #5219?

Oh, I see in that ticket it helps. Since db migrations aren't in the test suite, I'll go ahead and merge this.

Pull-Request has been merged by ngompa

2 years ago

There is test_alembic.py which tests the migrations, but the MySQL isn't part of it.