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( migrations.AlterModelOptions(
name='asset', name='asset',
options={'ordering': ['name'], options={
'permissions': [('refresh_assethardwareinfo', 'Can refresh asset hardware info'), 'ordering': ['name'],
'permissions': [
('refresh_assethardwareinfo', 'Can refresh asset hardware info'),
('test_assetconnectivity', 'Can test asset connectivity'), ('test_assetconnectivity', 'Can test asset connectivity'),
('push_assetsystemuser', 'Can push system user to asset'), ('push_assetaccount', 'Can push account to asset'),
('match_asset', 'Can match asset'), ('add_assettonode', 'Add asset to node'), ('test_account', 'Can verify account'), ('match_asset', 'Can match asset'),
('move_assettonode', 'Move asset to node')], 'verbose_name': 'Asset'}, ('add_assettonode', 'Add asset to node'),
('move_assettonode', 'Move asset to node')
],
'verbose_name': 'Asset'
},
), ),
migrations.RenameField( migrations.RenameField(
model_name='asset', model_name='asset',

@ -35,7 +35,7 @@ class Migration(migrations.Migration):
], ],
options={ options={
'verbose_name': 'Automation task', 'verbose_name': 'Automation task',
'unique_together': {('org_id', 'name')}, 'unique_together': {('org_id', 'name', 'type')},
}, },
), ),
migrations.CreateModel( migrations.CreateModel(
@ -93,18 +93,4 @@ class Migration(migrations.Migration):
name='automation', name='automation',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='executions', to='assets.baseautomation', verbose_name='Automation task'), 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