mirror of https://github.com/jumpserver/jumpserver
perf: 修改名称
parent
8f31a25fda
commit
3a884388cd
|
@ -31,7 +31,7 @@ def migrate_nodes_full_value(apps, schema_editor):
|
|||
model = apps.get_model("assets", "Node")
|
||||
db_alias = schema_editor.connection.alias
|
||||
nodes = model.objects.using(db_alias).all()
|
||||
print("- Start migrate node full value")
|
||||
print("\n- Start migrate node full value")
|
||||
for i, node in enumerate(list(nodes)):
|
||||
print("{} start migrate {} node full value".format(i, node.value))
|
||||
ancestor_keys = get_node_ancestor_keys(node.key, True)
|
||||
|
|
|
@ -10,12 +10,6 @@ class Migration(migrations.Migration):
|
|||
]
|
||||
|
||||
operations = [
|
||||
migrations.DeleteModel(
|
||||
name='AdminUser',
|
||||
),
|
||||
migrations.DeleteModel(
|
||||
name='Cluster',
|
||||
),
|
||||
migrations.RemoveField(
|
||||
model_name='historicalauthbook',
|
||||
name='asset',
|
||||
|
@ -62,4 +56,10 @@ class Migration(migrations.Migration):
|
|||
migrations.DeleteModel(
|
||||
name='AuthBook',
|
||||
),
|
||||
# migrations.DeleteModel(
|
||||
# name='AdminUser',
|
||||
# ),
|
||||
migrations.DeleteModel(
|
||||
name='Cluster',
|
||||
),
|
||||
]
|
||||
|
|
|
@ -15,8 +15,9 @@ def migrate_system_to_account(apps, schema_editor):
|
|||
(apply_login_asset_ticket_model, 'apply_login_system_user', 'apply_login_account', False),
|
||||
)
|
||||
|
||||
print("\nStart migrate system user to account")
|
||||
for model, old_field, new_field, m2m in model_system_user_account:
|
||||
print("Start migrate '{}' system user to account".format(model.__name__))
|
||||
print(" - migrate '{}'".format(model.__name__))
|
||||
count = 0
|
||||
bulk_size = 1000
|
||||
|
||||
|
|
Loading…
Reference in New Issue