diff --git a/murano/db/migration/alembic_migrations/versions/010_remove_unused_networking_column.py b/murano/db/migration/alembic_migrations/versions/010_remove_unused_networking_column.py index 43735f58..63d2cd6e 100644 --- a/murano/db/migration/alembic_migrations/versions/010_remove_unused_networking_column.py +++ b/murano/db/migration/alembic_migrations/versions/010_remove_unused_networking_column.py @@ -31,8 +31,10 @@ MYSQL_CHARSET = 'utf8' def upgrade(): - op.drop_column('environment', 'networking') - op.drop_column('environment-template', 'networking') + with op.batch_alter_table("environment") as batch_op: + batch_op.drop_column('networking') + with op.batch_alter_table("environment-template") as batch_op2: + batch_op2.drop_column('networking') def downgrade(): diff --git a/murano/db/migration/alembic_migrations/versions/012_support_domain_users.py b/murano/db/migration/alembic_migrations/versions/012_support_domain_users.py index bea0e412..86034f71 100644 --- a/murano/db/migration/alembic_migrations/versions/012_support_domain_users.py +++ b/murano/db/migration/alembic_migrations/versions/012_support_domain_users.py @@ -33,12 +33,16 @@ MYSQL_CHARSET = 'utf8' def upgrade(): - op.alter_column('session', 'user_id', type_=sa.String(64), nullable=False) - op.alter_column('package', 'owner_id', type_=sa.String(64), nullable=False) + with op.batch_alter_table("session") as batch_op: + batch_op.alter_column('user_id', type_=sa.String(64), nullable=False) + with op.batch_alter_table("package") as batch_op2: + batch_op2.alter_column('owner_id', type_=sa.String(64), nullable=False) # end Alembic commands # def downgrade(): - op.alter_column('package', 'owner_id', type_=sa.String(36), nullable=False) - op.alter_column('session', 'user_id', type_=sa.String(36), nullable=False) + with op.batch_alter_table("session") as batch_op: + batch_op.alter_column('user_id', type_=sa.String(36), nullable=False) + with op.batch_alter_table("package") as batch_op2: + batch_op2.alter_column('owner_id', type_=sa.String(36), nullable=False) # end Alembic commands #