Skip to content

Commit 7792f9e

Browse files
authored
Fix ComputeGroupModel migration table lock order (#3244)
1 parent c8c14cd commit 7792f9e

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/dstack/_internal/server/migrations/versions/7d1ec2b920ac_add_computegroupmodel.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@
2121

2222
def upgrade() -> None:
2323
# ### commands auto generated by Alembic - please adjust! ###
24+
with op.batch_alter_table("jobs", schema=None) as batch_op:
25+
batch_op.add_column(sa.Column("waiting_master_job", sa.Boolean(), nullable=True))
2426
op.create_table(
2527
"compute_groups",
2628
sa.Column("id", sqlalchemy_utils.types.uuid.UUIDType(binary=False), nullable=False),
@@ -71,10 +73,6 @@ def upgrade() -> None:
7173
["compute_group_id"],
7274
["id"],
7375
)
74-
75-
with op.batch_alter_table("jobs", schema=None) as batch_op:
76-
batch_op.add_column(sa.Column("waiting_master_job", sa.Boolean(), nullable=True))
77-
7876
# ### end Alembic commands ###
7977

8078

0 commit comments

Comments
 (0)