fix: migration fix

This commit is contained in:
ievgenii vdovenko 2025-06-26 13:57:05 +02:00
parent 4f1abd8ffa
commit 1d1060d5ce

View file

@ -25,8 +25,19 @@ def upgrade(migrate_engine):
context = MigrationContext.configure(migrate_engine.connect())
op = Operations(context)
table = db.PullRequest.__table__
with op.batch_alter_table(table.name) as batch_op:
pr_table = db.PullRequest.__table__
with op.batch_alter_table(pr_table.name) as batch_op:
new_column = Column(
"settings_json",
MutationObj.as_mutable(
JsonType(dialect_map=dict(mysql=UnicodeText(16384))),
),
default=dict,
)
batch_op.add_column(new_column)
pr_version_table = db.PullRequestVersion.__table__
with op.batch_alter_table(pr_version_table.name) as batch_op:
new_column = Column(
"settings_json",
MutationObj.as_mutable(