mirror of https://github.com/jumpserver/jumpserver
perf: 修改 migrations
parent
3a884388cd
commit
286d0e4ac1
|
@ -50,16 +50,16 @@ class Migration(migrations.Migration):
|
|||
model_name='authbook',
|
||||
name='systemuser',
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='Cluster',
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='AdminUser',
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='HistoricalAuthBook',
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='AuthBook',
|
||||
),
|
||||
# migrations.DeleteModel(
|
||||
# name='AdminUser',
|
||||
# ),
|
||||
migrations.DeleteModel(
|
||||
name='Cluster',
|
||||
),
|
||||
]
|
||||
|
|
|
@ -39,7 +39,7 @@ def migrate_system_to_account(apps, schema_editor):
|
|||
setattr(obj, new_field, new_value)
|
||||
updated.append(obj)
|
||||
model.objects.bulk_update(updated, [new_field])
|
||||
print("Migrate account: {}-{} using: {:.2f}s".format(
|
||||
print(" Migrate account: {}-{} using: {:.2f}s".format(
|
||||
count - len(objects), count, time.time()-start
|
||||
))
|
||||
|
||||
|
|
Loading…
Reference in New Issue