fix: migration fix
This commit is contained in:
parent
4f1abd8ffa
commit
1d1060d5ce
1 changed files with 13 additions and 2 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue