Merge pull request #429 from simontigers/common_check_new_columns

fix(api): common check new columns
This commit is contained in:
simontigers 2024-03-22 17:52:19 +08:00 committed by GitHub
commit a44e5f6cf1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -224,7 +224,7 @@ def common_check_new_columns():
column_type = new_column.type.compile(engine.dialect)
default_value = new_column.default.arg if new_column.default else None
sql = "ALTER TABLE " + target_table_name + " ADD COLUMN " + new_column.name + " " + column_type
sql = "ALTER TABLE " + target_table_name + " ADD COLUMN " + f"`{new_column.name}`" + " " + column_type
if new_column.comment:
sql += f" comment '{new_column.comment}'"