Commit 2235974c authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Track migrations

parent dc8864ff
# Generated by Django 2.1 on 2018-08-06 09:29
from django.conf import settings
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import django_mysql.models
import feudal.backend.auth.v1.models
import feudal.backend.models
import feudal.backend.models.brokers
import feudal.backend.models.users
class Migration(migrations.Migration):
initial = True
dependencies = [
('auth', '0009_alter_user_last_name_max_length'),
]
operations = [
migrations.CreateModel(
name='User',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
('user_type', models.CharField(choices=[('apiclient', 'API-Client'), ('oidcuser', 'OIDC User'), ('admin', 'Admin')], default='apiclient', max_length=20)),
('sub', models.CharField(blank=True, editable=False, max_length=150, null=True)),
('password', models.CharField(blank=True, max_length=150, null=True)),
('_is_active', models.BooleanField(default=True, editable=False)),
('userinfo', django_mysql.models.JSONField(blank=True, default=feudal.backend.models.users.user_info_default, editable=False, null=True)),
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
],
options={
'verbose_name': 'user',
'abstract': False,
'verbose_name_plural': 'users',
},
managers=[
('objects', django.contrib.auth.models.UserManager()),
],
),
migrations.CreateModel(
name='Deployment',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('is_active', models.BooleanField(default=True)),
('group', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='deployments', to='auth.Group')),
],
),
migrations.CreateModel(
name='DeploymentState',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('state_target', models.CharField(choices=[('deployment_pending', 'Deployment Pending'), ('removal_pending', 'Removal Pending'), ('deployed', 'Deployed'), ('not_deployed', 'Not Deployed'), ('questionnaire', 'Questionnaire'), ('failed', 'Failed'), ('rejected', 'Rejected')], default='deployed', max_length=50)),
('deployment', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='states', to='backend.Deployment')),
],
),
migrations.CreateModel(
name='DeploymentStateItem',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('state', models.CharField(choices=[('deployment_pending', 'Deployment Pending'), ('removal_pending', 'Removal Pending'), ('deployed', 'Deployed'), ('not_deployed', 'Not Deployed'), ('questionnaire', 'Questionnaire'), ('failed', 'Failed'), ('rejected', 'Rejected')], default='deployment_pending', max_length=50)),
('message', models.TextField(default='', max_length=300)),
('questionnaire', django_mysql.models.JSONField(blank=True, default=feudal.backend.models.questionnaire_default, null=True)),
('credentials', django_mysql.models.JSONField(blank=True, default=feudal.backend.models.credential_default, null=True)),
('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='state_items', to='backend.DeploymentState')),
],
),
migrations.CreateModel(
name='OIDCConfig',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('client_id', models.CharField(max_length=200)),
('client_secret', models.CharField(max_length=200)),
('redirect_uri', models.CharField(max_length=200)),
('issuer_uri', models.CharField(max_length=200)),
('enabled', models.BooleanField(default=False)),
('name', models.CharField(max_length=200)),
('scopes', django_mysql.models.JSONField(default=feudal.backend.auth.v1.models.scopes_default)),
],
),
migrations.CreateModel(
name='RabbitMQInstance',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('host', models.CharField(default='localhost', max_length=150)),
('vhost', models.CharField(default='%2f', max_length=150)),
('exchanges', django_mysql.models.JSONField(blank=True, default=feudal.backend.models.brokers.exchanges_default, null=True)),
('port', models.IntegerField(default=15672)),
('username', models.CharField(default='guest', max_length=150)),
('password', models.CharField(default='guest', max_length=150)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='Service',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=150, unique=True)),
('description', models.TextField(blank=True, max_length=300)),
('groups', models.ManyToManyField(blank=True, related_name='services', to='auth.Group')),
],
),
migrations.CreateModel(
name='Site',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=150, unique=True)),
('description', models.TextField(blank=True, max_length=300)),
('client', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='site', to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='SSHPublicKey',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=150)),
('key', models.TextField(max_length=1000)),
('deleted', models.BooleanField(default=False, editable=False)),
('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='_ssh_keys', to=settings.AUTH_USER_MODEL)),
],
),
migrations.AddField(
model_name='service',
name='site',
field=models.ManyToManyField(related_name='services', to='backend.Site'),
),
migrations.AddField(
model_name='deploymentstateitem',
name='service',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='state_items', to='backend.Service'),
),
migrations.AddField(
model_name='deploymentstateitem',
name='site',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='state_items', to='backend.Site'),
),
migrations.AddField(
model_name='deploymentstate',
name='key',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='states', to='backend.SSHPublicKey'),
),
migrations.AddField(
model_name='deployment',
name='service',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='deployments', to='backend.Service'),
),
migrations.AddField(
model_name='deployment',
name='ssh_keys',
field=models.ManyToManyField(blank=True, related_name='deployments', to='backend.SSHPublicKey'),
),
migrations.AddField(
model_name='deployment',
name='user',
field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='deployments', to=settings.AUTH_USER_MODEL),
),
migrations.AddField(
model_name='user',
name='idp',
field=models.ForeignKey(blank=True, editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='users', to='backend.OIDCConfig'),
),
migrations.AddField(
model_name='user',
name='user_permissions',
field=models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions'),
),
]
# Generated by Django 2.1 on 2018-08-06 09:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('backend', '0001_initial'),
]
operations = [
migrations.AlterField(
model_name='user',
name='user_type',
field=models.CharField(choices=[('apiclient', 'API-Client'), ('oidcuser', 'OIDC User'), ('admin', 'Admin')], max_length=20),
),
]
# Generated by Django 2.1 on 2018-08-09 12:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('backend', '0002_auto_20180806_0941'),
]
operations = [
migrations.AlterField(
model_name='user',
name='user_type',
field=models.CharField(choices=[('apiclient', 'API-Client'), ('oidcuser', 'OIDC User'), ('admin', 'Admin')], default='apiclient', max_length=20),
),
]
# Generated by Django 2.1 on 2018-08-09 14:55
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('auth', '0009_alter_user_last_name_max_length'),
('backend', '0003_auto_20180809_1209'),
]
operations = [
migrations.CreateModel(
name='NewDeployment',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('state_target', models.CharField(choices=[('deployment_pending', 'Deployment Pending'), ('removal_pending', 'Removal Pending'), ('deployed', 'Deployed'), ('not_deployed', 'Not Deployed'), ('questionnaire', 'Questionnaire'), ('failed', 'Failed'), ('rejected', 'Rejected')], default='deployed', max_length=50)),
('is_active', models.BooleanField(default=True)),
('group', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='deployments', to='auth.Group')),
('service', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='deployments', to='backend.Service')),
('user', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='deployments', to=settings.AUTH_USER_MODEL)),
],
),
migrations.RemoveField(
model_name='deployment',
name='group',
),
migrations.RemoveField(
model_name='deployment',
name='service',
),
migrations.RemoveField(
model_name='deployment',
name='ssh_keys',
),
migrations.RemoveField(
model_name='deployment',
name='user',
),
migrations.RemoveField(
model_name='deploymentstate',
name='deployment',
),
migrations.RemoveField(
model_name='deploymentstate',
name='key',
),
migrations.AlterField(
model_name='deploymentstateitem',
name='parent',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='state_items', to='backend.NewDeployment'),
),
migrations.AlterField(
model_name='rabbitmqinstance',
name='vhost',
field=models.CharField(default='/', max_length=150),
),
migrations.DeleteModel(
name='Deployment',
),
migrations.DeleteModel(
name='DeploymentState',
),
]
# Generated by Django 2.1 on 2018-08-09 14:59
from django.db import migrations, models
import django.db.models.deletion
import django_mysql.models
import feudal.backend.models
class Migration(migrations.Migration):
dependencies = [
('backend', '0004_auto_20180809_1655'),
]
operations = [
migrations.CreateModel(
name='NewDeploymentStateItem',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('state', models.CharField(choices=[('deployment_pending', 'Deployment Pending'), ('removal_pending', 'Removal Pending'), ('deployed', 'Deployed'), ('not_deployed', 'Not Deployed'), ('questionnaire', 'Questionnaire'), ('failed', 'Failed'), ('rejected', 'Rejected')], default='deployment_pending', max_length=50)),
('message', models.TextField(default='', max_length=300)),
('questionnaire', django_mysql.models.JSONField(blank=True, default=feudal.backend.models.questionnaire_default, null=True)),
('credentials', django_mysql.models.JSONField(blank=True, default=feudal.backend.models.credential_default, null=True)),
('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='state_items', to='backend.NewDeployment')),
('service', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='state_items', to='backend.Service')),
('site', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='state_items', to='backend.Site')),
],
),
migrations.RemoveField(
model_name='deploymentstateitem',
name='parent',
),
migrations.RemoveField(
model_name='deploymentstateitem',
name='service',
),
migrations.RemoveField(
model_name='deploymentstateitem',
name='site',
),
migrations.DeleteModel(
name='DeploymentStateItem',
),
]
# Generated by Django 2.1 on 2018-08-13 12:17
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('backend', '0005_auto_20180809_1659'),
]
operations = [
migrations.AlterField(
model_name='newdeployment',
name='state_target',
field=models.CharField(choices=[('deployment_pending', 'Deployment Pending'), ('removal_pending', 'Removal Pending'), ('deployed', 'Deployed'), ('not_deployed', 'Not Deployed'), ('questionnaire', 'Questionnaire'), ('failed', 'Failed'), ('rejected', 'Rejected')], default='not_deployed', max_length=50),
),
migrations.AlterField(
model_name='newdeploymentstateitem',
name='state',
field=models.CharField(choices=[('deployment_pending', 'Deployment Pending'), ('removal_pending', 'Removal Pending'), ('deployed', 'Deployed'), ('not_deployed', 'Not Deployed'), ('questionnaire', 'Questionnaire'), ('failed', 'Failed'), ('rejected', 'Rejected')], default='not_deployed', max_length=50),
),
]
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment