mirror of https://github.com/jumpserver/jumpserver
pref: 修改迁移文件
parent
c018055d5f
commit
e327c97170
|
@ -14,7 +14,7 @@ class Migration(migrations.Migration):
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='asset',
|
model_name='asset',
|
||||||
name='platform',
|
name='platform',
|
||||||
field=models.ForeignKey(default=assets.models.platform.Platform.default, on_delete=django.db.models.deletion.PROTECT, related_name='assets', to='assets.platform', verbose_name='Platform'),
|
field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='assets', to='assets.platform', verbose_name='Platform'),
|
||||||
),
|
),
|
||||||
migrations.RemoveField(
|
migrations.RemoveField(
|
||||||
model_name='asset',
|
model_name='asset',
|
||||||
|
|
|
@ -90,8 +90,7 @@ class Asset(NodesRelationMixin, AbsConnectivity, JMSOrgBaseModel):
|
||||||
id = models.UUIDField(default=uuid.uuid4, primary_key=True)
|
id = models.UUIDField(default=uuid.uuid4, primary_key=True)
|
||||||
name = models.CharField(max_length=128, verbose_name=_('Name'))
|
name = models.CharField(max_length=128, verbose_name=_('Name'))
|
||||||
address = models.CharField(max_length=128, verbose_name=_('IP'), db_index=True)
|
address = models.CharField(max_length=128, verbose_name=_('IP'), db_index=True)
|
||||||
platform = models.ForeignKey(Platform, default=Platform.default, on_delete=models.PROTECT,
|
platform = models.ForeignKey(Platform, on_delete=models.PROTECT, verbose_name=_("Platform"), related_name='assets')
|
||||||
verbose_name=_("Platform"), related_name='assets')
|
|
||||||
domain = models.ForeignKey("assets.Domain", null=True, blank=True, related_name='assets',
|
domain = models.ForeignKey("assets.Domain", null=True, blank=True, related_name='assets',
|
||||||
verbose_name=_("Domain"), on_delete=models.SET_NULL)
|
verbose_name=_("Domain"), on_delete=models.SET_NULL)
|
||||||
nodes = models.ManyToManyField('assets.Node', default=default_node, related_name='assets',
|
nodes = models.ManyToManyField('assets.Node', default=default_node, related_name='assets',
|
||||||
|
|
|
@ -22,7 +22,7 @@ class Migration(migrations.Migration):
|
||||||
('date_updated', models.DateTimeField(auto_now=True, verbose_name='Date updated')),
|
('date_updated', models.DateTimeField(auto_now=True, verbose_name='Date updated')),
|
||||||
('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
|
('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
|
||||||
('name', models.CharField(max_length=128, unique=True, verbose_name='Name')),
|
('name', models.CharField(max_length=128, unique=True, verbose_name='Name')),
|
||||||
('display_name', models.CharField(max_length=128, unique=True, verbose_name='Display name')),
|
('display_name', models.CharField(max_length=128, verbose_name='Display name')),
|
||||||
('version', models.CharField(max_length=16, verbose_name='Version')),
|
('version', models.CharField(max_length=16, verbose_name='Version')),
|
||||||
('author', models.CharField(max_length=128, verbose_name='Author')),
|
('author', models.CharField(max_length=128, verbose_name='Author')),
|
||||||
('type', models.CharField(choices=[('general', 'General'), ('web', 'Web')], default='general', max_length=16, verbose_name='Type')),
|
('type', models.CharField(choices=[('general', 'General'), ('web', 'Web')], default='general', max_length=16, verbose_name='Type')),
|
||||||
|
|
Loading…
Reference in New Issue