mirror of https://github.com/jumpserver/jumpserver
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.8 KiB
65 lines
2.8 KiB
# Generated by Django 3.1 on 2021-02-08 07:15 |
|
|
|
import assets.models.node |
|
from django.conf import settings |
|
from django.db import migrations, models |
|
import django.db.models.deletion |
|
|
|
|
|
class Migration(migrations.Migration): |
|
|
|
dependencies = [ |
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL), |
|
('assets', '0065_auto_20210121_1549'), |
|
('perms', '0017_auto_20210104_0435'), |
|
] |
|
|
|
operations = [ |
|
migrations.CreateModel( |
|
name='UserAssetGrantedTreeNodeRelation', |
|
fields=[ |
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), |
|
('created_by', models.CharField(blank=True, max_length=32, null=True, verbose_name='Created by')), |
|
('updated_by', models.CharField(blank=True, max_length=32, null=True, verbose_name='Updated by')), |
|
('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Date created')), |
|
('date_updated', models.DateTimeField(auto_now=True, verbose_name='Date updated')), |
|
('org_id', models.CharField(blank=True, db_index=True, default='', max_length=36, verbose_name='Organization')), |
|
('node_key', models.CharField(db_index=True, max_length=64, verbose_name='Key')), |
|
('node_parent_key', models.CharField(db_index=True, default='', max_length=64, verbose_name='Parent key')), |
|
('node_from', models.CharField(choices=[('granted', 'Direct node granted'), ('child', 'Have children node'), ('asset', 'Direct asset granted')], db_index=True, max_length=16)), |
|
('node_assets_amount', models.IntegerField(default=0)), |
|
('node', models.ForeignKey(db_constraint=False, default=None, on_delete=django.db.models.deletion.CASCADE, related_name='granted_node_rels', to='assets.node')), |
|
('user', models.ForeignKey(db_constraint=False, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), |
|
], |
|
options={ |
|
'abstract': False, |
|
}, |
|
bases=(assets.models.node.FamilyMixin, models.Model), |
|
), |
|
migrations.RemoveField( |
|
model_name='usergrantedmappingnode', |
|
name='node', |
|
), |
|
migrations.RemoveField( |
|
model_name='usergrantedmappingnode', |
|
name='user', |
|
), |
|
migrations.CreateModel( |
|
name='PermNode', |
|
fields=[ |
|
], |
|
options={ |
|
'ordering': [], |
|
'proxy': True, |
|
'indexes': [], |
|
'constraints': [], |
|
}, |
|
bases=('assets.node',), |
|
), |
|
migrations.DeleteModel( |
|
name='RebuildUserTreeTask', |
|
), |
|
migrations.DeleteModel( |
|
name='UserGrantedMappingNode', |
|
), |
|
]
|
|
|