mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-07-05 19:16:37 +00:00
perf: 修改 migrations
This commit is contained in:
parent
3a884388cd
commit
286d0e4ac1
@ -50,16 +50,16 @@ class Migration(migrations.Migration):
|
|||||||
model_name='authbook',
|
model_name='authbook',
|
||||||
name='systemuser',
|
name='systemuser',
|
||||||
),
|
),
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name='Cluster',
|
||||||
|
),
|
||||||
|
migrations.DeleteModel(
|
||||||
|
name='AdminUser',
|
||||||
|
),
|
||||||
migrations.DeleteModel(
|
migrations.DeleteModel(
|
||||||
name='HistoricalAuthBook',
|
name='HistoricalAuthBook',
|
||||||
),
|
),
|
||||||
migrations.DeleteModel(
|
migrations.DeleteModel(
|
||||||
name='AuthBook',
|
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)
|
setattr(obj, new_field, new_value)
|
||||||
updated.append(obj)
|
updated.append(obj)
|
||||||
model.objects.bulk_update(updated, [new_field])
|
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
|
count - len(objects), count, time.time()-start
|
||||||
))
|
))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user