mirror of https://github.com/jumpserver/jumpserver
fix: 修改 migrations
parent
e259d2a9e9
commit
db050e405d
|
@ -6,7 +6,7 @@ from django.db import migrations
|
|||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('acls', '0001_initial'),
|
||||
('acls', '0002_auto_20210926_1047'),
|
||||
]
|
||||
|
||||
operations = [
|
|
@ -1,17 +0,0 @@
|
|||
# Generated by Django 3.1.12 on 2022-02-11 06:01
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('applications', '0012_auto_20211130_1037'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='account',
|
||||
options={'permissions': [('view_applicationaccountsecret', 'Can view application account secret'), ('change_appplicationaccountsecret', 'Can view application account secret')], 'verbose_name': 'Application account'},
|
||||
),
|
||||
]
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 3.1.13 on 2021-11-30 02:37
|
||||
# Generated by Django 3.1.13 on 2022-02-17 13:35
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
@ -6,17 +6,13 @@ from django.db import migrations
|
|||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('applications', '0011_auto_20210826_1759'),
|
||||
('applications', '0016_auto_20220118_1455'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='account',
|
||||
options={'verbose_name': 'Application account'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='application',
|
||||
options={'ordering': ('name',), 'verbose_name': 'Application'},
|
||||
options={'permissions': [('view_applicationaccountsecret', 'Can view application account secret'), ('change_appplicationaccountsecret', 'Can view application account secret')], 'verbose_name': 'Application account'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='applicationuser',
|
|
@ -1,17 +0,0 @@
|
|||
# Generated by Django 3.1.13 on 2021-11-30 02:37
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('assets', '0076_delete_assetuser'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='label',
|
||||
options={'verbose_name': 'Label'},
|
||||
),
|
||||
]
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 3.1.12 on 2022-02-11 06:01
|
||||
# Generated by Django 3.1.13 on 2022-02-17 13:35
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
@ -6,7 +6,7 @@ from django.db import migrations
|
|||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('assets', '0077_auto_20211130_1037'),
|
||||
('assets', '0085_commandfilterrule_ignore_case'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
@ -18,4 +18,8 @@ class Migration(migrations.Migration):
|
|||
name='authbook',
|
||||
options={'permissions': [('view_assetaccountsecret', 'Can view asset account secret'), ('change_assetaccountsecret', 'Can change asset account secret')], 'verbose_name': 'AuthBook'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='label',
|
||||
options={'verbose_name': 'Label'},
|
||||
),
|
||||
]
|
|
@ -1,17 +0,0 @@
|
|||
# Generated by Django 3.1.12 on 2021-09-29 03:06
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('authentication', '0004_ssotoken'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='loginconfirmsetting',
|
||||
options={'verbose_name': 'Login Confirm'},
|
||||
),
|
||||
]
|
|
@ -6,7 +6,7 @@ from django.db import migrations, models
|
|||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('authentication', '0006_auto_20211130_1037'),
|
||||
('authentication', '0006_auto_20211227_1059'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 3.1.13 on 2021-11-30 02:37
|
||||
# Generated by Django 3.1.13 on 2022-02-17 13:35
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
@ -6,7 +6,7 @@ from django.db import migrations
|
|||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('authentication', '0005_auto_20210929_1106'),
|
||||
('authentication', '0007_connectiontoken'),
|
||||
]
|
||||
|
||||
operations = [
|
|
@ -26,4 +26,8 @@ class Migration(migrations.Migration):
|
|||
name='task',
|
||||
options={'get_latest_by': 'date_created', 'ordering': ('-date_updated',), 'verbose_name': 'Task'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='task',
|
||||
options={'get_latest_by': 'date_created', 'ordering': ('-date_updated',), 'permissions': [('view_taskmonitor', 'Can view task monitor')], 'verbose_name': 'Task'},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
# Generated by Django 3.1.12 on 2022-02-11 06:23
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('ops', '0021_auto_20211130_1037'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='task',
|
||||
options={'get_latest_by': 'date_created', 'ordering': ('-date_updated',), 'permissions': [('view_taskmonitor', 'Can view task monitor')], 'verbose_name': 'Task'},
|
||||
),
|
||||
]
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 3.1.13 on 2022-01-04 07:37
|
||||
# Generated by Django 3.1.13 on 2022-02-17 13:35
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
@ -6,7 +6,7 @@ from django.db import migrations
|
|||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('perms', '0020_auto_20210910_1103'),
|
||||
('perms', '0023_auto_20220112_2035'),
|
||||
]
|
||||
|
||||
operations = [
|
|
@ -1,49 +0,0 @@
|
|||
# Generated by Django 3.1.13 on 2021-11-30 02:37
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('terminal', '0040_sessionjoinrecord_sessionsharing'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='command',
|
||||
options={'ordering': ('-timestamp',), 'verbose_name': 'Command record'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='commandstorage',
|
||||
options={'verbose_name': 'Command storage'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='replaystorage',
|
||||
options={'verbose_name': 'Replay storage'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='session',
|
||||
options={'ordering': ['-date_start'], 'verbose_name': 'Session record'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='sessionjoinrecord',
|
||||
options={'ordering': ('-date_joined',), 'verbose_name': 'Session join record'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='sessionsharing',
|
||||
options={'ordering': ('-date_created',), 'verbose_name': 'Session sharing'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='status',
|
||||
options={'get_latest_by': 'date_created', 'verbose_name': 'Status'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='task',
|
||||
options={'verbose_name': 'Task'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='terminal',
|
||||
options={'ordering': ('is_accepted',), 'verbose_name': 'Terminal'},
|
||||
),
|
||||
]
|
|
@ -1,17 +0,0 @@
|
|||
# Generated by Django 3.1.12 on 2022-02-11 06:01
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('terminal', '0041_auto_20211130_1037'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='terminal',
|
||||
options={'ordering': ('is_accepted',), 'permissions': (('view_terminalconfig', 'Can view terminal config'),), 'verbose_name': 'Terminal'},
|
||||
),
|
||||
]
|
|
@ -0,0 +1,64 @@
|
|||
# Generated by Django 3.1.13 on 2022-02-17 13:35
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('terminal', '0042_auto_20211229_1619'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='command',
|
||||
options={'ordering': ('-timestamp',), 'verbose_name': 'Command record'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='commandstorage',
|
||||
options={'verbose_name': 'Command storage'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='replaystorage',
|
||||
options={'verbose_name': 'Replay storage'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='session',
|
||||
options={'ordering': ['-date_start'], 'permissions': [('monitor_session', 'Can monitor session'), ('share_session', 'Can share session'), ('terminate_session', 'Can terminate session'), ('validate_sessionactionperm', 'Can validate session action perm')], 'verbose_name': 'Session record'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='sessionjoinrecord',
|
||||
options={'ordering': ('-date_joined',), 'verbose_name': 'Session join record'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='sessionsharing',
|
||||
options={'ordering': ('-date_created',), 'permissions': [('add_supersessionsharing', 'Can add super session sharing')], 'verbose_name': 'Session sharing'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='status',
|
||||
options={'get_latest_by': 'date_created', 'verbose_name': 'Status'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='task',
|
||||
options={'verbose_name': 'Task'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='terminal',
|
||||
options={'ordering': ('is_accepted',), 'permissions': (('view_terminalconfig', 'Can view terminal config'),), 'verbose_name': 'Terminal'},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='SessionReplay',
|
||||
fields=[
|
||||
('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
|
||||
('created_by', models.CharField(blank=True, max_length=32, null=True, verbose_name='Created 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')),
|
||||
('session', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='terminal.session', verbose_name='Session')),
|
||||
],
|
||||
options={
|
||||
'permissions': [('upload_sessionreplay', 'Can upload session replay'), ('download_sessionreplay', 'Can download session replay')],
|
||||
},
|
||||
),
|
||||
]
|
|
@ -1,4 +1,4 @@
|
|||
# Generated by Django 3.1.13 on 2021-11-30 02:37
|
||||
# Generated by Django 3.1.13 on 2022-02-17 13:35
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
@ -6,7 +6,7 @@ from django.db import migrations
|
|||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('tickets', '0010_auto_20210812_1618'),
|
||||
('tickets', '0013_ticket_serial_num'),
|
||||
]
|
||||
|
||||
operations = [
|
|
@ -1,25 +0,0 @@
|
|||
# Generated by Django 3.1.12 on 2021-09-29 06:03
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
def migrate_app_users(apps, schema_editor):
|
||||
user_model = apps.get_model('users', 'User')
|
||||
app_users = user_model.objects.filter(role='App')
|
||||
app_users.update(is_app=True)
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0036_user_feishu_id'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='user',
|
||||
name='is_app',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
migrations.RunPython(migrate_app_users),
|
||||
]
|
|
@ -1,22 +0,0 @@
|
|||
# Generated by Django 3.1.13 on 2021-12-08 03:33
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0037_auto_20210929_1403'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='userpasswordhistory',
|
||||
options={'verbose_name': 'User password history'},
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='role',
|
||||
field=models.CharField(blank=True, default='User', max_length=10, verbose_name='Role'),
|
||||
),
|
||||
]
|
|
@ -1,17 +1,42 @@
|
|||
# Generated by Django 3.1.13 on 2021-12-29 10:52
|
||||
|
||||
from django.db import migrations
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
def migrate_app_users(apps, schema_editor):
|
||||
user_model = apps.get_model('users', 'User')
|
||||
app_users = user_model.objects.filter(role='App')
|
||||
app_users.update(is_app=True)
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0038_auto_20211208_1133'),
|
||||
('users', '0038_auto_20211209_1140'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='user',
|
||||
name='is_app',
|
||||
field=models.BooleanField(default=False),
|
||||
),
|
||||
migrations.RunPython(migrate_app_users),
|
||||
migrations.AlterModelOptions(
|
||||
name='user',
|
||||
options={'ordering': ['username'], 'permissions': [('invite', 'Can invite user'), ('remove', 'Can remove user')], 'verbose_name': 'User'},
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='userpasswordhistory',
|
||||
options={'verbose_name': 'User password history'},
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='role',
|
||||
field=models.CharField(blank=True, default='User', max_length=10, verbose_name='Role'),
|
||||
),
|
||||
migrations.AlterModelOptions(
|
||||
name='user',
|
||||
options={'ordering': ['username'], 'permissions': [('invite_user', 'Can invite user'), ('remove_user', 'Can remove user'), ('match_user', 'Can match user')], 'verbose_name': 'User'},
|
||||
),
|
||||
]
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
# Generated by Django 3.1.12 on 2022-02-11 06:01
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('users', '0039_auto_20211229_1852'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='user',
|
||||
options={'ordering': ['username'], 'permissions': [('invite_user', 'Can invite user'), ('remove_user', 'Can remove user'), ('match_user', 'Can match user')], 'verbose_name': 'User'},
|
||||
),
|
||||
]
|
Loading…
Reference in New Issue