From b4fd09528f1adb7d9450995b13db3cbb33f21ed0 Mon Sep 17 00:00:00 2001 From: Calvin Mclean Date: Thu, 16 Aug 2018 10:26:20 -0700 Subject: [PATCH] Fix migrations to first remove old access_token table In order to do this, the initial migration had to be replaced by one that will restore the original AccessToken model before we can remove it and add the new model --- core/migrations/create_access_token_model.py | 3 + core/migrations/replace_0001_initial.py | 1466 ++++++++++++++++++ 2 files changed, 1469 insertions(+) create mode 100644 core/migrations/replace_0001_initial.py diff --git a/core/migrations/create_access_token_model.py b/core/migrations/create_access_token_model.py index c609cbdde..a558c4f77 100644 --- a/core/migrations/create_access_token_model.py +++ b/core/migrations/create_access_token_model.py @@ -14,6 +14,9 @@ class Migration(migrations.Migration): ] operations = [ + migrations.DeleteModel( + name='AccessToken', + ), migrations.CreateModel( name='AccessToken', fields=[ diff --git a/core/migrations/replace_0001_initial.py b/core/migrations/replace_0001_initial.py new file mode 100644 index 000000000..734e7c91f --- /dev/null +++ b/core/migrations/replace_0001_initial.py @@ -0,0 +1,1466 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.4 on 2018-08-15 21:46 +from __future__ import unicode_literals + +import core.models.allocation_strategy +import core.models.quota +import core.validators +from django.conf import settings +import django.contrib.auth.models +import django.contrib.postgres.fields.jsonb +import django.core.validators +from django.db import migrations, models +import django.db.migrations.operations.special +import django.db.models.deletion +import django.utils.timezone +import uuid + + +# Functions from the following migrations need manual copying. +# Move them and any dependencies into this file, then update the +# RunPython operations to refer to the local versions: +# core.migrations.0088_set_project_leaders_and_authors +# core.migrations.0089_projects_to_project__alter_created_by +# core.migrations.0092_set_unknown_size_instance_status_history + +class Migration(migrations.Migration): + + replaces = [('core', '0001_initial')] + + initial = True + + dependencies = [ + ('auth', '0008_alter_user_username_max_length'), + ] + + operations = [ + migrations.CreateModel( + name='AccessToken', + fields=[ + ('key', models.CharField(max_length=1024, serialize=False, primary_key=True)), + ('issuer', models.TextField(null=True, blank=True)), + ('expireTime', models.DateTimeField(null=True, blank=True)), + ], + options={ + 'db_table': 'access_token', + }, + ), + migrations.CreateModel( + name='ApplicationTag', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ], + options={ + 'db_table': 'application_tags', + 'managed': False, + }, + ), + migrations.CreateModel( + name='ApplicationVersionBootScript', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ], + options={ + 'db_table': 'application_version_boot_scripts', + 'managed': False, + }, + ), + migrations.CreateModel( + name='ApplicationVersionLicense', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ], + options={ + 'db_table': 'application_version_licenses', + 'managed': False, + }, + ), + migrations.CreateModel( + name='InstanceTag', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ], + options={ + 'db_table': 'instance_tags', + 'managed': False, + }, + ), + migrations.CreateModel( + name='ProjectApplication', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ], + options={ + 'db_table': 'project_applications', + 'managed': False, + }, + ), + migrations.CreateModel( + name='ProjectExternalLink', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ], + options={ + 'db_table': 'project_links', + 'managed': False, + }, + ), + migrations.CreateModel( + name='ProjectInstance', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ], + options={ + 'db_table': 'project_instances', + 'managed': False, + }, + ), + migrations.CreateModel( + name='ProjectVolume', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ], + options={ + 'db_table': 'project_volumes', + 'managed': False, + }, + ), + migrations.CreateModel( + name='AtmosphereUser', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('password', models.CharField(max_length=128, verbose_name='password')), + ('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')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ('username', models.CharField(error_messages={b'unique': 'A user with that username already exists.'}, help_text='Required. 256 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=256, unique=True, validators=[django.core.validators.RegexValidator(b'^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.')], verbose_name='username')), + ('first_name', models.CharField(blank=True, max_length=64, verbose_name='first name')), + ('last_name', models.CharField(blank=True, max_length=256, 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')), + ], + options={ + 'db_table': 'atmosphere_user', + }, + managers=[ + ('objects', django.contrib.auth.models.UserManager()), + ], + ), + migrations.CreateModel( + name='AccountProvider', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ], + options={ + 'db_table': 'provider_admin', + }, + ), + migrations.CreateModel( + name='Allocation', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('threshold', models.IntegerField(blank=True, default=core.models.allocation_strategy._get_default_threshold, null=True)), + ('delta', models.IntegerField(blank=True, default=core.models.allocation_strategy._get_default_delta, null=True)), + ], + options={ + 'db_table': 'allocation', + }, + ), + migrations.CreateModel( + name='AllocationSource', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('name', models.CharField(max_length=255, unique=True)), + ('compute_allowed', models.IntegerField()), + ('start_date', models.DateTimeField(default=django.utils.timezone.now)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ('renewal_strategy', models.CharField(default=b'default', max_length=255)), + ], + options={ + 'db_table': 'allocation_source', + }, + ), + migrations.CreateModel( + name='AllocationSourceSnapshot', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('updated', models.DateTimeField(auto_now=True)), + ('last_renewed', models.DateTimeField(default=django.utils.timezone.now)), + ('global_burn_rate', models.DecimalField(decimal_places=3, max_digits=19)), + ('compute_used', models.DecimalField(decimal_places=3, max_digits=19)), + ('compute_allowed', models.DecimalField(decimal_places=3, default=0, max_digits=19)), + ('allocation_source', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, related_name='snapshot', to='core.AllocationSource')), + ], + options={ + 'db_table': 'allocation_source_snapshot', + }, + ), + migrations.CreateModel( + name='AllocationStrategy', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ], + options={ + 'db_table': 'allocation_strategy', + }, + ), + migrations.CreateModel( + name='Application', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('name', models.CharField(max_length=256)), + ('icon', models.ImageField(blank=True, null=True, upload_to=b'applications')), + ('description', models.TextField(blank=True, null=True)), + ('private', models.BooleanField(default=False)), + ('start_date', models.DateTimeField(default=django.utils.timezone.now)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'application', + }, + ), + migrations.CreateModel( + name='ApplicationBookmark', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='bookmarks', to='core.Application')), + ], + options={ + 'db_table': 'application_bookmark', + }, + ), + migrations.CreateModel( + name='ApplicationMembership', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('can_edit', models.BooleanField(default=False)), + ('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Application')), + ], + options={ + 'db_table': 'application_membership', + }, + ), + migrations.CreateModel( + name='ApplicationScore', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('score', models.IntegerField(default=0)), + ('start_date', models.DateTimeField(default=django.utils.timezone.now)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='scores', to='core.Application')), + ], + options={ + 'db_table': 'application_score', + }, + ), + migrations.CreateModel( + name='ApplicationThreshold', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('memory_min', models.IntegerField(default=0)), + ('cpu_min', models.IntegerField(default=0)), + ], + options={ + 'db_table': 'application_threshold', + }, + ), + migrations.CreateModel( + name='ApplicationVersion', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)), + ('name', models.CharField(max_length=256)), + ('change_log', models.TextField(blank=True, null=True)), + ('allow_imaging', models.BooleanField(default=True)), + ('start_date', models.DateTimeField(default=django.utils.timezone.now)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ('system_files', models.TextField(blank=True, default=b'', null=True)), + ('installed_software', models.TextField(blank=True, default=b'', null=True)), + ('excluded_files', models.TextField(blank=True, default=b'', null=True)), + ('application', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='versions', to='core.Application')), + ], + options={ + 'db_table': 'application_version', + }, + ), + migrations.CreateModel( + name='ApplicationVersionMembership', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('can_share', models.BooleanField(default=False)), + ], + options={ + 'db_table': 'application_version_membership', + }, + ), + migrations.CreateModel( + name='BootScript', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('title', models.CharField(max_length=128)), + ('script_text', models.TextField()), + ('run_every_deploy', models.BooleanField(default=False)), + ('applications', models.ManyToManyField(related_name='scripts', to='core.Application')), + ], + options={ + 'db_table': 'boot_script', + }, + ), + migrations.CreateModel( + name='CloudAdministrator', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ], + options={ + 'db_table': 'cloud_administrator', + }, + ), + migrations.CreateModel( + name='CountingBehavior', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255)), + ], + options={ + 'db_table': 'counting_behavior', + }, + ), + migrations.CreateModel( + name='Credential', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('key', models.CharField(max_length=256)), + ('value', models.CharField(max_length=256)), + ], + options={ + 'db_table': 'credential', + }, + ), + migrations.CreateModel( + name='EmailTemplate', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('email_address', models.EmailField(default=b'support@cyverse.org', max_length=254)), + ('email_header', models.TextField(default=b'')), + ('email_footer', models.TextField(default=b'CyVerse Atmosphere Team')), + ], + options={ + 'db_table': 'email_template', + }, + ), + migrations.CreateModel( + name='EventTable', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(blank=True, default=uuid.uuid4, unique=True)), + ('entity_id', models.CharField(blank=True, db_index=True, default=b'', max_length=255)), + ('name', models.CharField(db_index=True, max_length=128)), + ('payload', django.contrib.postgres.fields.jsonb.JSONField()), + ('timestamp', models.DateTimeField(db_index=True, default=django.utils.timezone.now)), + ], + options={ + 'db_table': 'event_table', + }, + ), + migrations.CreateModel( + name='ExportRequest', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('status', models.CharField(max_length=256)), + ('export_name', models.CharField(max_length=256)), + ('export_format', models.CharField(max_length=256)), + ('export_file', models.CharField(blank=True, max_length=256, null=True)), + ('start_date', models.DateTimeField(default=django.utils.timezone.now)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'export_request', + }, + ), + migrations.CreateModel( + name='ExternalLink', + fields=[ + ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False, unique=True)), + ('title', models.CharField(max_length=256)), + ('link', models.URLField(max_length=256)), + ('description', models.TextField(blank=True, null=True)), + ], + options={ + 'db_table': 'external_link', + }, + ), + migrations.CreateModel( + name='Group', + fields=[ + ('group_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='auth.Group')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('applications', models.ManyToManyField(blank=True, related_name='members', through='core.ApplicationMembership', to='core.Application')), + ], + options={ + 'db_table': 'group', + }, + bases=('auth.group',), + ), + migrations.CreateModel( + name='HelpLink', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('link_key', models.CharField(editable=False, max_length=256, unique=True)), + ('topic', models.CharField(max_length=256)), + ('context', models.TextField(blank=True, default=b'', null=True)), + ('href', models.TextField()), + ('created_date', models.DateTimeField(auto_now_add=True)), + ('modified_date', models.DateTimeField(auto_now=True)), + ], + ), + migrations.CreateModel( + name='Identity', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ], + options={ + 'db_table': 'identity', + 'verbose_name_plural': 'identities', + }, + ), + migrations.CreateModel( + name='IdentityMembership', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ('allocation', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Allocation')), + ('identity', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='identity_memberships', to='core.Identity')), + ('member', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='identity_memberships', to='core.Group')), + ], + options={ + 'db_table': 'identity_membership', + }, + ), + migrations.CreateModel( + name='Instance', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=256)), + ('token', models.CharField(blank=True, max_length=36, null=True)), + ('provider_alias', models.CharField(max_length=256, unique=True)), + ('ip_address', models.GenericIPAddressField(null=True, unpack_ipv4=True)), + ('shell', models.BooleanField(default=False)), + ('vnc', models.BooleanField(default=False)), + ('web_desktop', models.BooleanField(default=False)), + ('password', models.CharField(blank=True, max_length=64, null=True)), + ('start_date', models.DateTimeField()), + ('end_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'instance', + }, + ), + migrations.CreateModel( + name='InstanceAction', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('key', models.CharField(editable=False, max_length=256, unique=True)), + ('name', models.CharField(max_length=256)), + ('description', models.TextField(blank=True, null=True)), + ], + ), + migrations.CreateModel( + name='InstanceAllocationSourceSnapshot', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('updated', models.DateTimeField(auto_now=True)), + ('allocation_source', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.AllocationSource')), + ('instance', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='core.Instance')), + ], + options={ + 'db_table': 'instance_allocation_source_snapshot', + }, + ), + migrations.CreateModel( + name='InstanceMembership', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('instance', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Instance')), + ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Group')), + ], + options={ + 'db_table': 'instance_membership', + }, + ), + migrations.CreateModel( + name='InstanceSource', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('identifier', models.CharField(max_length=256)), + ('start_date', models.DateTimeField(default=django.utils.timezone.now)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'instance_source', + }, + ), + migrations.CreateModel( + name='InstanceStatus', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=128)), + ], + options={ + 'db_table': 'instance_status', + }, + ), + migrations.CreateModel( + name='InstanceStatusHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('activity', models.CharField(blank=True, max_length=36, null=True)), + ('start_date', models.DateTimeField(default=django.utils.timezone.now)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ('instance', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Instance')), + ], + options={ + 'db_table': 'instance_status_history', + }, + ), + migrations.CreateModel( + name='Leadership', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Group')), + ], + options={ + 'db_table': 'group_leaders', + }, + ), + migrations.CreateModel( + name='License', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('title', models.CharField(max_length=256)), + ('license_text', models.TextField()), + ], + options={ + 'db_table': 'license', + }, + ), + migrations.CreateModel( + name='LicenseType', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=128)), + ('description', models.TextField(blank=True, null=True)), + ], + options={ + 'db_table': 'license_type', + }, + ), + migrations.CreateModel( + name='MachineRequest', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('admin_message', models.CharField(blank=True, default=b'', max_length=1024)), + ('start_date', models.DateTimeField(default=django.utils.timezone.now)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ('old_status', models.TextField(blank=True, default=b'', null=True)), + ('new_application_name', models.CharField(max_length=256)), + ('new_application_description', models.TextField(default=b'Description Missing')), + ('new_application_visibility', models.CharField(default=b'private', max_length=256)), + ('access_list', models.TextField(blank=True, default=b'', null=True)), + ('system_files', models.TextField(blank=True, default=b'', null=True)), + ('installed_software', models.TextField(blank=True, default=b'', null=True)), + ('exclude_files', models.TextField(blank=True, default=b'', null=True)), + ('new_version_name', models.CharField(default=b'1.0', max_length=256)), + ('new_version_change_log', models.TextField(default=b'Changelog Missing')), + ('new_version_tags', models.TextField(blank=True, default=b'', null=True)), + ('new_version_memory_min', models.IntegerField(default=0)), + ('new_version_cpu_min', models.IntegerField(default=0)), + ('new_version_allow_imaging', models.BooleanField(default=True)), + ('new_version_forked', models.BooleanField(default=True)), + ], + options={ + 'db_table': 'machine_request', + }, + ), + migrations.CreateModel( + name='MaintenanceRecord', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('start_date', models.DateTimeField()), + ('end_date', models.DateTimeField(blank=True, null=True)), + ('title', models.CharField(max_length=256)), + ('message', models.TextField()), + ('disable_login', models.BooleanField(default=True)), + ], + options={ + 'db_table': 'maintenance_record', + }, + ), + migrations.CreateModel( + name='MatchType', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=128)), + ], + ), + migrations.CreateModel( + name='NodeController', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('alias', models.CharField(max_length=256)), + ('hostname', models.CharField(max_length=256)), + ('port', models.IntegerField(default=22)), + ('private_ssh_key', models.TextField()), + ('start_date', models.DateTimeField(default=django.utils.timezone.now)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'node_controller', + }, + ), + migrations.CreateModel( + name='PatternMatch', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('pattern', models.CharField(max_length=256)), + ], + options={ + 'db_table': 'pattern_match', + }, + ), + migrations.CreateModel( + name='PlatformType', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=256)), + ('start_date', models.DateTimeField(default=django.utils.timezone.now)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'platform_type', + }, + ), + migrations.CreateModel( + name='Project', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('name', models.CharField(max_length=256)), + ('description', models.TextField(blank=True)), + ('start_date', models.DateTimeField(default=django.utils.timezone.now)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ('applications', models.ManyToManyField(blank=True, related_name='projects', to='core.Application')), + ('instances', models.ManyToManyField(blank=True, related_name='projects', to='core.Instance')), + ('links', models.ManyToManyField(blank=True, related_name='projects', to='core.ExternalLink')), + ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='projects', to='core.Group')), + ], + options={ + 'db_table': 'project', + }, + ), + migrations.CreateModel( + name='Provider', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('location', models.CharField(max_length=256)), + ('description', models.TextField(blank=True)), + ('active', models.BooleanField(default=True)), + ('public', models.BooleanField(default=False)), + ('auto_imaging', models.BooleanField(default=False)), + ('timezone', models.CharField(default=b'America/Phoenix', max_length=128, validators=[core.validators.validate_timezone])), + ('cloud_config', django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True)), + ('start_date', models.DateTimeField(auto_now_add=True)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'provider', + }, + ), + migrations.CreateModel( + name='ProviderCredential', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('key', models.CharField(max_length=256)), + ('value', models.CharField(max_length=256)), + ], + options={ + 'db_table': 'provider_credential', + }, + ), + migrations.CreateModel( + name='ProviderDNSServerIP', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('ip_address', models.GenericIPAddressField(null=True, unpack_ipv4=True)), + ('order', models.IntegerField()), + ], + options={ + 'db_table': 'provider_dns_server_ip', + }, + ), + migrations.CreateModel( + name='ProviderInstanceAction', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('enabled', models.BooleanField(default=True)), + ('instance_action', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='provider_actions', to='core.InstanceAction')), + ], + options={ + 'db_table': 'provider_instance_action', + }, + ), + migrations.CreateModel( + name='ProviderMachine', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('application_version', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='machines', to='core.ApplicationVersion')), + ('instance_source', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='core.InstanceSource')), + ], + options={ + 'db_table': 'provider_machine', + }, + ), + migrations.CreateModel( + name='ProviderMachineMembership', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('can_share', models.BooleanField(default=False)), + ('group', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Group')), + ('provider_machine', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.ProviderMachine')), + ], + options={ + 'db_table': 'provider_machine_membership', + }, + ), + migrations.CreateModel( + name='ProviderType', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=256)), + ('start_date', models.DateTimeField(default=django.utils.timezone.now)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'provider_type', + }, + ), + migrations.CreateModel( + name='Quota', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('cpu', models.IntegerField(blank=True, default=core.models.quota._get_default_cpu, null=True)), + ('memory', models.IntegerField(blank=True, default=core.models.quota._get_default_memory, null=True)), + ('storage', models.IntegerField(blank=True, default=core.models.quota._get_default_storage, null=True)), + ('instance_count', models.IntegerField(blank=True, default=core.models.quota._get_default_instance_count, null=True)), + ('snapshot_count', models.IntegerField(blank=True, default=core.models.quota._get_default_snapshot_count, null=True)), + ('storage_count', models.IntegerField(blank=True, default=core.models.quota._get_default_storage_count, null=True)), + ('floating_ip_count', models.IntegerField(blank=True, default=core.models.quota._get_default_floating_ip_count, null=True)), + ('port_count', models.IntegerField(blank=True, default=core.models.quota._get_default_port_count, null=True)), + ], + options={ + 'db_table': 'quota', + }, + ), + migrations.CreateModel( + name='RefreshBehavior', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255)), + ], + options={ + 'db_table': 'refresh_behavior', + }, + ), + migrations.CreateModel( + name='ResourceRequest', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('admin_message', models.CharField(blank=True, default=b'', max_length=1024)), + ('start_date', models.DateTimeField(default=django.utils.timezone.now)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ('request', models.TextField()), + ('description', models.CharField(blank=True, default=b'', max_length=1024)), + ('allocation', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Allocation')), + ], + options={ + 'db_table': 'resource_request', + }, + ), + migrations.CreateModel( + name='RulesBehavior', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=255)), + ], + options={ + 'db_table': 'rules_behavior', + }, + ), + migrations.CreateModel( + name='ScriptType', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=128)), + ('description', models.TextField(blank=True, null=True)), + ], + options={ + 'db_table': 'script_type', + }, + ), + migrations.CreateModel( + name='Size', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('alias', models.CharField(max_length=256)), + ('name', models.CharField(max_length=256)), + ('cpu', models.IntegerField()), + ('disk', models.IntegerField()), + ('root', models.IntegerField()), + ('mem', models.IntegerField()), + ('start_date', models.DateTimeField(default=django.utils.timezone.now)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'size', + }, + ), + migrations.CreateModel( + name='SSHKey', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=256)), + ('uuid', models.CharField(default=uuid.uuid4, max_length=36, unique=True)), + ('pub_key', models.TextField()), + ], + options={ + 'db_table': 'ssh_key', + }, + ), + migrations.CreateModel( + name='StatusType', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('name', models.CharField(max_length=32)), + ('description', models.CharField(blank=True, default=b'', max_length=256)), + ('start_date', models.DateTimeField(default=django.utils.timezone.now)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ], + options={ + 'db_table': 'status_type', + }, + ), + migrations.CreateModel( + name='T', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('V', models.CharField(max_length=36)), + ('start_date', models.DateTimeField(default=django.utils.timezone.now)), + ('end_date', models.DateTimeField(null=True)), + ], + options={ + 'db_table': 'transaction', + }, + ), + migrations.CreateModel( + name='Tag', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('uuid', models.UUIDField(default=uuid.uuid4, editable=False, unique=True)), + ('name', models.SlugField(max_length=128)), + ('description', models.CharField(max_length=1024)), + ], + options={ + 'db_table': 'tag', + }, + ), + migrations.CreateModel( + name='UserAllocationSnapshot', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('compute_used', models.DecimalField(decimal_places=3, max_digits=19)), + ('burn_rate', models.DecimalField(decimal_places=3, max_digits=19)), + ('updated', models.DateTimeField(auto_now=True)), + ('allocation_source', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_allocation_snapshots', to='core.AllocationSource')), + ], + options={ + 'db_table': 'user_allocation_snapshot', + }, + ), + migrations.CreateModel( + name='UserAllocationSource', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('allocation_source', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='users', to='core.AllocationSource')), + ], + options={ + 'db_table': 'user_allocation_source', + }, + ), + migrations.CreateModel( + name='Volume', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('size', models.IntegerField()), + ('name', models.CharField(max_length=256)), + ('description', models.TextField(blank=True, null=True)), + ('instance_source', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='core.InstanceSource')), + ], + options={ + 'db_table': 'volume', + }, + ), + migrations.CreateModel( + name='VolumeStatus', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=128)), + ], + options={ + 'db_table': 'volume_status', + }, + ), + migrations.CreateModel( + name='VolumeStatusHistory', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('device', models.CharField(blank=True, max_length=128, null=True)), + ('instance_alias', models.CharField(blank=True, max_length=36, null=True)), + ('start_date', models.DateTimeField(default=django.utils.timezone.now)), + ('end_date', models.DateTimeField(blank=True, null=True)), + ('status', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.VolumeStatus')), + ('volume', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Volume')), + ], + options={ + 'db_table': 'volume_status_history', + }, + ), + migrations.CreateModel( + name='ProviderConfiguration', + fields=[ + ('provider', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='configuration', serialize=False, to='core.Provider')), + ], + options={ + 'db_table': 'provider_configuration', + }, + ), + migrations.CreateModel( + name='UserProfile', + fields=[ + ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)), + ('send_emails', models.BooleanField(default=True)), + ('quick_launch', models.BooleanField(default=True)), + ('vnc_resolution', models.CharField(default=b'800x600', max_length=255)), + ('default_size', models.CharField(default=b'm1.small', max_length=255)), + ('background', models.CharField(default=b'default', max_length=255)), + ('icon_set', models.CharField(default=b'default', max_length=255)), + ], + options={ + 'db_table': 'user_profile', + }, + ), + migrations.AddField( + model_name='userallocationsource', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='userallocationsnapshot', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='user_allocation_snapshots', to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='tag', + name='user', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AlterUniqueTogether( + name='statustype', + unique_together=set([('name', 'start_date')]), + ), + migrations.AddField( + model_name='sshkey', + name='atmo_user', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='size', + name='provider', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Provider'), + ), + migrations.AddField( + model_name='resourcerequest', + name='created_by', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='resourcerequest', + name='membership', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.IdentityMembership'), + ), + migrations.AddField( + model_name='resourcerequest', + name='quota', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Quota'), + ), + migrations.AddField( + model_name='resourcerequest', + name='status', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.StatusType'), + ), + migrations.AddField( + model_name='providerinstanceaction', + name='provider', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='provider_actions', to='core.Provider'), + ), + migrations.AddField( + model_name='providerdnsserverip', + name='provider', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='dns_server_ips', to='core.Provider'), + ), + migrations.AddField( + model_name='providercredential', + name='provider', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Provider'), + ), + migrations.AddField( + model_name='provider', + name='cloud_admin', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='admin_providers', to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='provider', + name='over_allocation_action', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='core.InstanceAction'), + ), + migrations.AddField( + model_name='provider', + name='type', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.ProviderType'), + ), + migrations.AddField( + model_name='provider', + name='virtualization', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.PlatformType'), + ), + migrations.AddField( + model_name='project', + name='volumes', + field=models.ManyToManyField(blank=True, related_name='projects', to='core.Volume'), + ), + migrations.AddField( + model_name='patternmatch', + name='created_by', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='patternmatch', + name='type', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.MatchType'), + ), + migrations.AddField( + model_name='nodecontroller', + name='provider', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Provider'), + ), + migrations.AddField( + model_name='maintenancerecord', + name='provider', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Provider'), + ), + migrations.AddField( + model_name='machinerequest', + name='created_by', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='machinerequest', + name='instance', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Instance'), + ), + migrations.AddField( + model_name='machinerequest', + name='membership', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.IdentityMembership'), + ), + migrations.AddField( + model_name='machinerequest', + name='new_application_version', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='core.ApplicationVersion'), + ), + migrations.AddField( + model_name='machinerequest', + name='new_machine', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='core.ProviderMachine'), + ), + migrations.AddField( + model_name='machinerequest', + name='new_machine_owner', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='new_image_owner', to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='machinerequest', + name='new_machine_provider', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Provider'), + ), + migrations.AddField( + model_name='machinerequest', + name='new_version_licenses', + field=models.ManyToManyField(blank=True, to='core.License'), + ), + migrations.AddField( + model_name='machinerequest', + name='new_version_membership', + field=models.ManyToManyField(blank=True, to='core.Group'), + ), + migrations.AddField( + model_name='machinerequest', + name='new_version_scripts', + field=models.ManyToManyField(blank=True, to='core.BootScript'), + ), + migrations.AddField( + model_name='machinerequest', + name='parent_machine', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='ancestor_machine', to='core.ProviderMachine'), + ), + migrations.AddField( + model_name='machinerequest', + name='status', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.StatusType'), + ), + migrations.AddField( + model_name='license', + name='access_list', + field=models.ManyToManyField(blank=True, to='core.PatternMatch'), + ), + migrations.AddField( + model_name='license', + name='created_by', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='license', + name='license_type', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.LicenseType'), + ), + migrations.AddField( + model_name='leadership', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='instancestatushistory', + name='size', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Size'), + ), + migrations.AddField( + model_name='instancestatushistory', + name='status', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.InstanceStatus'), + ), + migrations.AddField( + model_name='instancesource', + name='created_by', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='source_set', to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='instancesource', + name='created_by_identity', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Identity'), + ), + migrations.AddField( + model_name='instancesource', + name='provider', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Provider'), + ), + migrations.AddField( + model_name='instance', + name='created_by', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='instance', + name='created_by_identity', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Identity'), + ), + migrations.AddField( + model_name='instance', + name='source', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='instances', to='core.InstanceSource'), + ), + migrations.AddField( + model_name='instance', + name='tags', + field=models.ManyToManyField(blank=True, to='core.Tag'), + ), + migrations.AddField( + model_name='identity', + name='created_by', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='identity', + name='provider', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Provider'), + ), + migrations.AddField( + model_name='identity', + name='quota', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Quota'), + ), + migrations.AddField( + model_name='group', + name='identities', + field=models.ManyToManyField(blank=True, through='core.IdentityMembership', to='core.Identity'), + ), + migrations.AddField( + model_name='group', + name='instances', + field=models.ManyToManyField(blank=True, through='core.InstanceMembership', to='core.Instance'), + ), + migrations.AddField( + model_name='group', + name='leaders', + field=models.ManyToManyField(through='core.Leadership', to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='group', + name='provider_machines', + field=models.ManyToManyField(blank=True, related_name='members', through='core.ProviderMachineMembership', to='core.ProviderMachine'), + ), + migrations.AddField( + model_name='externallink', + name='created_by', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='exportrequest', + name='export_owner', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='exportrequest', + name='source', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.InstanceSource'), + ), + migrations.AddField( + model_name='emailtemplate', + name='links', + field=models.ManyToManyField(related_name='email_templates', to='core.HelpLink'), + ), + migrations.AddField( + model_name='credential', + name='identity', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Identity'), + ), + migrations.AddField( + model_name='cloudadministrator', + name='provider', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Provider'), + ), + migrations.AddField( + model_name='cloudadministrator', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='bootscript', + name='created_by', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='bootscript', + name='instances', + field=models.ManyToManyField(related_name='scripts', to='core.Instance'), + ), + migrations.AddField( + model_name='bootscript', + name='script_type', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.ScriptType'), + ), + migrations.AddField( + model_name='applicationversionmembership', + name='group', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Group'), + ), + migrations.AddField( + model_name='applicationversionmembership', + name='image_version', + field=models.ForeignKey(db_column=b'application_version_id', on_delete=django.db.models.deletion.CASCADE, to='core.ApplicationVersion'), + ), + migrations.AddField( + model_name='applicationversion', + name='boot_scripts', + field=models.ManyToManyField(blank=True, related_name='application_versions', to='core.BootScript'), + ), + migrations.AddField( + model_name='applicationversion', + name='created_by', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='applicationversion', + name='created_by_identity', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Identity'), + ), + migrations.AddField( + model_name='applicationversion', + name='licenses', + field=models.ManyToManyField(blank=True, related_name='application_versions', to='core.License'), + ), + migrations.AddField( + model_name='applicationversion', + name='membership', + field=models.ManyToManyField(blank=True, related_name='application_versions', through='core.ApplicationVersionMembership', to='core.Group'), + ), + migrations.AddField( + model_name='applicationversion', + name='parent', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='core.ApplicationVersion'), + ), + migrations.AddField( + model_name='applicationthreshold', + name='application_version', + field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='threshold', to='core.ApplicationVersion'), + ), + migrations.AddField( + model_name='applicationscore', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='applicationmembership', + name='group', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Group'), + ), + migrations.AddField( + model_name='applicationbookmark', + name='user', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='bookmarks', to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='application', + name='created_by', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL), + ), + migrations.AddField( + model_name='application', + name='created_by_identity', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Identity'), + ), + migrations.AddField( + model_name='application', + name='tags', + field=models.ManyToManyField(blank=True, to='core.Tag'), + ), + migrations.AddField( + model_name='allocationstrategy', + name='counting_behavior', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.CountingBehavior'), + ), + migrations.AddField( + model_name='allocationstrategy', + name='provider', + field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='core.Provider'), + ), + migrations.AddField( + model_name='allocationstrategy', + name='refresh_behaviors', + field=models.ManyToManyField(blank=True, to='core.RefreshBehavior'), + ), + migrations.AddField( + model_name='allocationstrategy', + name='rules_behaviors', + field=models.ManyToManyField(blank=True, to='core.RulesBehavior'), + ), + migrations.AddField( + model_name='accountprovider', + name='identity', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Identity'), + ), + migrations.AddField( + model_name='accountprovider', + name='provider', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='core.Provider'), + ), + migrations.AddField( + model_name='atmosphereuser', + name='groups', + field=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'), + ), + migrations.AddField( + model_name='atmosphereuser', + name='selected_identity', + field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='core.Identity'), + ), + migrations.AddField( + model_name='atmosphereuser', + 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'), + ), + migrations.AlterUniqueTogether( + name='userallocationsource', + unique_together=set([('user', 'allocation_source')]), + ), + migrations.AlterUniqueTogether( + name='userallocationsnapshot', + unique_together=set([('user', 'allocation_source')]), + ), + migrations.AlterUniqueTogether( + name='providermachinemembership', + unique_together=set([('provider_machine', 'group')]), + ), + migrations.AlterUniqueTogether( + name='providerinstanceaction', + unique_together=set([('provider', 'instance_action')]), + ), + migrations.AlterUniqueTogether( + name='providerdnsserverip', + unique_together=set([('provider', 'ip_address'), ('provider', 'order')]), + ), + migrations.AlterUniqueTogether( + name='instancesource', + unique_together=set([('provider', 'identifier')]), + ), + migrations.AlterUniqueTogether( + name='instancemembership', + unique_together=set([('instance', 'owner')]), + ), + migrations.AlterUniqueTogether( + name='identitymembership', + unique_together=set([('identity', 'member')]), + ), + migrations.AlterUniqueTogether( + name='applicationversionmembership', + unique_together=set([('image_version', 'group')]), + ), + migrations.AlterUniqueTogether( + name='applicationversion', + unique_together=set([('application', 'name')]), + ), + migrations.AlterUniqueTogether( + name='applicationmembership', + unique_together=set([('application', 'group')]), + ), + ] \ No newline at end of file