jumpserver/apps/terminal/migrations/0054_auto_20221027_1125.py

116 lines
5.8 KiB
Python
Raw Normal View History

2022-10-27 08:26:15 +00:00
# Generated by Django 3.2.14 on 2022-10-27 03:25
2022-10-22 03:17:02 +00:00
import uuid
import django.db.models.deletion
from django.db import migrations, models
2022-10-22 03:17:02 +00:00
class Migration(migrations.Migration):
2022-10-22 03:17:02 +00:00
dependencies = [
2022-10-27 08:26:15 +00:00
('assets', '0107_auto_20221019_1115'),
('terminal', '0053_auto_20221009_1755'),
2022-10-22 03:17:02 +00:00
]
operations = [
migrations.AlterField(
model_name='session',
name='protocol',
field=models.CharField(db_index=True, default='ssh', max_length=16),
),
migrations.RenameField(
model_name='session',
old_name='system_user',
new_name='account',
),
migrations.RemoveField(
model_name='session',
name='system_user_id',
),
migrations.AlterField(
model_name='session',
name='account',
field=models.CharField(db_index=True, max_length=128, verbose_name='Account'),
),
2022-10-22 03:17:02 +00:00
migrations.CreateModel(
name='Applet',
fields=[
('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')),
('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
('name', models.SlugField(max_length=128, unique=True, verbose_name='Name')),
2022-10-25 12:09:05 +00:00
('display_name', models.CharField(max_length=128, verbose_name='Display name')),
2022-10-22 03:17:02 +00:00
('version', models.CharField(max_length=16, verbose_name='Version')),
('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')),
2022-10-27 08:26:15 +00:00
('is_active', models.BooleanField(default=True, verbose_name='Is active')),
2022-10-22 03:17:02 +00:00
('protocols', models.JSONField(default=list, verbose_name='Protocol')),
2022-10-25 04:57:34 +00:00
('tags', models.JSONField(default=list, verbose_name='Tags')),
2022-10-22 03:17:02 +00:00
('comment', models.TextField(blank=True, default='', verbose_name='Comment')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
2022-10-25 04:57:34 +00:00
name='AppletHost',
2022-10-22 03:17:02 +00:00
fields=[
('host_ptr',
models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True,
primary_key=True, serialize=False, to='assets.host')),
2022-10-22 03:17:02 +00:00
('date_synced', models.DateTimeField(blank=True, null=True, verbose_name='Date synced')),
('status', models.CharField(max_length=16, verbose_name='Status')),
],
options={
'abstract': False,
},
2022-10-27 08:26:15 +00:00
bases=('assets.host',),
2022-10-22 03:17:02 +00:00
),
migrations.CreateModel(
2022-10-25 04:57:34 +00:00
name='AppletPublication',
2022-10-22 03:17:02 +00:00
fields=[
('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')),
('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
2022-11-01 09:04:44 +00:00
('status', models.CharField(default='', max_length=16, verbose_name='Status')),
2022-10-22 03:17:02 +00:00
('comment', models.TextField(blank=True, default='', verbose_name='Comment')),
('applet', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='terminal.applet',
verbose_name='Applet')),
('host', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='terminal.applethost',
verbose_name='Host')),
2022-10-22 03:17:02 +00:00
],
options={
2022-10-25 04:57:34 +00:00
'unique_together': {('applet', 'host')},
2022-10-22 03:17:02 +00:00
},
),
migrations.CreateModel(
2022-10-25 04:57:34 +00:00
name='AppletHostDeployment',
2022-10-22 03:17:02 +00:00
fields=[
('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')),
('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
2022-11-01 03:52:51 +00:00
('status', models.CharField(max_length=16, default='', verbose_name='Status')),
2022-10-22 03:17:02 +00:00
('comment', models.TextField(blank=True, default='', verbose_name='Comment')),
('host', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='terminal.applethost',
verbose_name='Hosting')),
2022-10-22 03:17:02 +00:00
],
options={
2022-10-25 04:57:34 +00:00
'abstract': False,
2022-10-22 03:17:02 +00:00
},
),
migrations.AddField(
2022-10-25 04:57:34 +00:00
model_name='applethost',
2022-10-22 03:17:02 +00:00
name='applets',
field=models.ManyToManyField(through='terminal.AppletPublication', to='terminal.Applet',
verbose_name='Applet'),
2022-10-22 03:17:02 +00:00
),
]