perf: 修改 migrations

pull/9374/head
ibuler 2 years ago committed by Jiangjie.Bai
parent d5cc2e77b2
commit b34af62ec1

@ -71,12 +71,18 @@ class Migration(migrations.Migration):
),
migrations.AlterModelOptions(
name='asset',
options={'ordering': ['name'],
'permissions': [('refresh_assethardwareinfo', 'Can refresh asset hardware info'),
options={
'ordering': ['name'],
'permissions': [
('refresh_assethardwareinfo', 'Can refresh asset hardware info'),
('test_assetconnectivity', 'Can test asset connectivity'),
('push_assetsystemuser', 'Can push system user to asset'),
('match_asset', 'Can match asset'), ('add_assettonode', 'Add asset to node'),
('move_assettonode', 'Move asset to node')], 'verbose_name': 'Asset'},
('push_assetaccount', 'Can push account to asset'),
('test_account', 'Can verify account'), ('match_asset', 'Can match asset'),
('add_assettonode', 'Add asset to node'),
('move_assettonode', 'Move asset to node')
],
'verbose_name': 'Asset'
},
),
migrations.RenameField(
model_name='asset',

@ -35,7 +35,7 @@ class Migration(migrations.Migration):
],
options={
'verbose_name': 'Automation task',
'unique_together': {('org_id', 'name')},
'unique_together': {('org_id', 'name', 'type')},
},
),
migrations.CreateModel(
@ -93,18 +93,4 @@ class Migration(migrations.Migration):
name='automation',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='executions', to='assets.baseautomation', verbose_name='Automation task'),
),
migrations.AlterUniqueTogether(
name='baseautomation',
unique_together={('org_id', 'name', 'type')},
),
migrations.AlterModelOptions(
name='asset',
options={'ordering': ['name'],
'permissions': [('refresh_assethardwareinfo', 'Can refresh asset hardware info'),
('test_assetconnectivity', 'Can test asset connectivity'),
('push_assetaccount', 'Can push account to asset'),
('test_account', 'Can verify account'), ('match_asset', 'Can match asset'),
('add_assettonode', 'Add asset to node'),
('move_assettonode', 'Move asset to node')], 'verbose_name': 'Asset'},
),
]
]

Loading…
Cancel
Save