mirror of https://github.com/jumpserver/jumpserver
perf: 修改 UserAssetGrantedTreeNodeRelation id 为 AutoField
parent
3bef582500
commit
5198ac1cc0
|
@ -0,0 +1,23 @@
|
||||||
|
# Generated by Django 3.2.14 on 2022-12-21 07:13
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('ops', '0031_auto_20221220_1956'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='historicaljob',
|
||||||
|
name='created_by',
|
||||||
|
field=models.CharField(blank=True, max_length=128, null=True, verbose_name='Created by'),
|
||||||
|
),
|
||||||
|
migrations.AlterField(
|
||||||
|
model_name='historicaljob',
|
||||||
|
name='updated_by',
|
||||||
|
field=models.CharField(blank=True, max_length=128, null=True, verbose_name='Updated by'),
|
||||||
|
),
|
||||||
|
]
|
|
@ -41,11 +41,6 @@ class Migration(migrations.Migration):
|
||||||
name='created_by',
|
name='created_by',
|
||||||
field=models.CharField(blank=True, max_length=128, null=True, verbose_name='Created by'),
|
field=models.CharField(blank=True, max_length=128, null=True, verbose_name='Created by'),
|
||||||
),
|
),
|
||||||
migrations.AlterField(
|
|
||||||
model_name='userassetgrantedtreenoderelation',
|
|
||||||
name='id',
|
|
||||||
field=models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False),
|
|
||||||
),
|
|
||||||
migrations.AlterField(
|
migrations.AlterField(
|
||||||
model_name='userassetgrantedtreenoderelation',
|
model_name='userassetgrantedtreenoderelation',
|
||||||
name='updated_by',
|
name='updated_by',
|
||||||
|
|
|
@ -16,6 +16,7 @@ class NodeFrom(TextChoices):
|
||||||
class UserAssetGrantedTreeNodeRelation(FamilyMixin, JMSOrgBaseModel):
|
class UserAssetGrantedTreeNodeRelation(FamilyMixin, JMSOrgBaseModel):
|
||||||
NodeFrom = NodeFrom
|
NodeFrom = NodeFrom
|
||||||
|
|
||||||
|
id = models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name=_('ID'))
|
||||||
user = models.ForeignKey('users.User', db_constraint=False, on_delete=models.CASCADE)
|
user = models.ForeignKey('users.User', db_constraint=False, on_delete=models.CASCADE)
|
||||||
node = models.ForeignKey('assets.Node', default=None, on_delete=models.CASCADE,
|
node = models.ForeignKey('assets.Node', default=None, on_delete=models.CASCADE,
|
||||||
db_constraint=False, null=False, related_name='granted_node_rels')
|
db_constraint=False, null=False, related_name='granted_node_rels')
|
||||||
|
|
Loading…
Reference in New Issue