text: # Generated by Django 2.2.8 on 2019-12-10 15:34
  
  from django.conf import settings
  from django.db import migrations, models
  import django.db.models.deletion
  import simple_history.models
  import uuid
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          migrations.swappable_dependency(settings.AUTH_USER_MODEL),
      ]
  
      operations = [
          migrations.CreateModel(
              name='Group',
              fields=[
                  ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False, unique=True)),
                  ('name', models.CharField(max_length=255)),
                  ('group_link', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='group', to='api.Group')),
              ],
              options={
                  'verbose_name_plural': 'Group',
              },
          ),
          migrations.CreateModel(
              name='Yaml',
              fields=[
                  ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False, unique=True)),
                  ('name', models.CharField(blank=True, max_length=255, null=True)),
                  ('text', models.TextField(blank=True, default=None, null=True)),
              ],
              options={
                  'verbose_name_plural': 'Yaml',
              },
          ),
          migrations.CreateModel(
              name='Group_yaml',
              fields=[
                  ('yaml_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='api.Yaml')),
              ],
              options={
                  'verbose_name_plural': 'Group_yaml',
              },
              bases=('api.yaml',),
          ),
          migrations.CreateModel(
              name='System_yaml',
              fields=[
                  ('yaml_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='api.Yaml')),
              ],
              options={
                  'verbose_name_plural': 'System_yaml',
              },
              bases=('api.yaml',),
          ),
          migrations.CreateModel(
              name='Tenant_yaml',
              fields=[
                  ('yaml_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='api.Yaml')),
              ],
              options={
                  'verbose_name_plural': 'Tenant_yaml',
              },
              bases=('api.yaml',),
          ),
          migrations.CreateModel(
              name='HistoricalYaml',
              fields=[
                  ('id', models.UUIDField(db_index=True, default=uuid.uuid4)),
                  ('name', models.CharField(blank=True, max_length=255, null=True)),
                  ('text', models.TextField(blank=True, default=None, null=True)),
                  ('history_id', models.AutoField(primary_key=True, serialize=False)),
                  ('history_date', models.DateTimeField()),
                  ('history_change_reason', models.CharField(max_length=100, null=True)),
                  ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                  ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
              ],
              options={
                  'verbose_name': 'historical yaml',
                  'ordering': ('-history_date', '-history_id'),
                  'get_latest_by': 'history_date',
              },
              bases=(simple_history.models.HistoricalChanges, models.Model),
          ),
          migrations.CreateModel(
              name='HistoricalTenant_yaml',
              fields=[
                  ('yaml_ptr', models.ForeignKey(auto_created=True, blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, parent_link=True, related_name='+', to='api.Yaml')),
                  ('id', models.UUIDField(db_index=True, default=uuid.uuid4)),
                  ('name', models.CharField(blank=True, max_length=255, null=True)),
                  ('text', models.TextField(blank=True, default=None, null=True)),
                  ('history_id', models.AutoField(primary_key=True, serialize=False)),
                  ('history_date', models.DateTimeField()),
                  ('history_change_reason', models.CharField(max_length=100, null=True)),
                  ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                  ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
              ],
              options={
                  'verbose_name': 'historical tenant_yaml',
                  'ordering': ('-history_date', '-history_id'),
                  'get_latest_by': 'history_date',
              },
              bases=(simple_history.models.HistoricalChanges, models.Model),
          ),
          migrations.CreateModel(
              name='HistoricalSystem_yaml',
              fields=[
                  ('yaml_ptr', models.ForeignKey(auto_created=True, blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, parent_link=True, related_name='+', to='api.Yaml')),
                  ('id', models.UUIDField(db_index=True, default=uuid.uuid4)),
                  ('name', models.CharField(blank=True, max_length=255, null=True)),
                  ('text', models.TextField(blank=True, default=None, null=True)),
                  ('history_id', models.AutoField(primary_key=True, serialize=False)),
                  ('history_date', models.DateTimeField()),
                  ('history_change_reason', models.CharField(max_length=100, null=True)),
                  ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                  ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
              ],
              options={
                  'verbose_name': 'historical system_yaml',
                  'ordering': ('-history_date', '-history_id'),
                  'get_latest_by': 'history_date',
              },
              bases=(simple_history.models.HistoricalChanges, models.Model),
          ),
          migrations.CreateModel(
              name='HistoricalGroup_yaml',
              fields=[
                  ('yaml_ptr', models.ForeignKey(auto_created=True, blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, parent_link=True, related_name='+', to='api.Yaml')),
                  ('id', models.UUIDField(db_index=True, default=uuid.uuid4)),
                  ('name', models.CharField(blank=True, max_length=255, null=True)),
                  ('text', models.TextField(blank=True, default=None, null=True)),
                  ('history_id', models.AutoField(primary_key=True, serialize=False)),
                  ('history_date', models.DateTimeField()),
                  ('history_change_reason', models.CharField(max_length=100, null=True)),
                  ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                  ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
              ],
              options={
                  'verbose_name': 'historical group_yaml',
                  'ordering': ('-history_date', '-history_id'),
                  'get_latest_by': 'history_date',
              },
              bases=(simple_history.models.HistoricalChanges, models.Model),
          ),
          migrations.CreateModel(
              name='Tenant',
              fields=[
                  ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False, unique=True)),
                  ('name', models.CharField(max_length=255)),
                  ('yaml', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.Tenant_yaml')),
              ],
              options={
                  'verbose_name_plural': 'Tenant',
                  'unique_together': {('name',)},
              },
          ),
          migrations.CreateModel(
              name='System',
              fields=[
                  ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False, unique=True)),
                  ('name', models.CharField(max_length=255)),
                  ('group', models.ManyToManyField(blank=True, to='api.Group')),
                  ('tenant', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='api.Tenant')),
                  ('yaml', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.System_yaml')),
              ],
              options={
                  'verbose_name_plural': 'System',
              },
          ),
          migrations.CreateModel(
              name='HistoricalTenant',
              fields=[
                  ('id', models.UUIDField(db_index=True, default=uuid.uuid4)),
                  ('name', models.CharField(max_length=255)),
                  ('history_id', models.AutoField(primary_key=True, serialize=False)),
                  ('history_date', models.DateTimeField()),
                  ('history_change_reason', models.CharField(max_length=100, null=True)),
                  ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                  ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                  ('yaml', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='api.Tenant_yaml')),
              ],
              options={
                  'verbose_name': 'historical tenant',
                  'ordering': ('-history_date', '-history_id'),
                  'get_latest_by': 'history_date',
              },
              bases=(simple_history.models.HistoricalChanges, models.Model),
          ),
          migrations.CreateModel(
              name='HistoricalSystem',
              fields=[
                  ('id', models.UUIDField(db_index=True, default=uuid.uuid4)),
                  ('name', models.CharField(max_length=255)),
                  ('history_id', models.AutoField(primary_key=True, serialize=False)),
                  ('history_date', models.DateTimeField()),
                  ('history_change_reason', models.CharField(max_length=100, null=True)),
                  ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                  ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                  ('tenant', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='api.Tenant')),
                  ('yaml', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='api.System_yaml')),
              ],
              options={
                  'verbose_name': 'historical system',
                  'ordering': ('-history_date', '-history_id'),
                  'get_latest_by': 'history_date',
              },
              bases=(simple_history.models.HistoricalChanges, models.Model),
          ),
          migrations.CreateModel(
              name='HistoricalGroup',
              fields=[
                  ('id', models.UUIDField(db_index=True, default=uuid.uuid4)),
                  ('name', models.CharField(max_length=255)),
                  ('history_id', models.AutoField(primary_key=True, serialize=False)),
                  ('history_date', models.DateTimeField()),
                  ('history_change_reason', models.CharField(max_length=100, null=True)),
                  ('history_type', models.CharField(choices=[('+', 'Created'), ('~', 'Changed'), ('-', 'Deleted')], max_length=1)),
                  ('group_link', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='api.Group')),
                  ('history_user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                  ('yaml', models.ForeignKey(blank=True, db_constraint=False, null=True, on_delete=django.db.models.deletion.DO_NOTHING, related_name='+', to='api.Group_yaml')),
              ],
              options={
                  'verbose_name': 'historical group',
                  'ordering': ('-history_date', '-history_id'),
                  'get_latest_by': 'history_date',
              },
              bases=(simple_history.models.HistoricalChanges, models.Model),
          ),
          migrations.AddField(
              model_name='group',
              name='yaml',
              field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='api.Group_yaml'),
          ),
      ]
  