mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-18 08:20:51 +00:00
[Update] 修改settings
This commit is contained in:
@@ -10,8 +10,10 @@ class Migration(migrations.Migration):
|
||||
]
|
||||
sql = "INSERT INTO setting(name, value, category, encrypted, enabled, comment) " \
|
||||
"SELECT name, value, category, encrypted, enabled, comment from settings"
|
||||
rename_sql = "RENAME TABLE settings TO settings_bak"
|
||||
settings_table_exist = 'settings' in connection.introspection.table_names()
|
||||
|
||||
operations = []
|
||||
if settings_table_exist:
|
||||
operations.append(migrations.RunSQL(sql))
|
||||
operations.append(migrations.RunSQL(rename_sql))
|
||||
|
Reference in New Issue
Block a user