Ejemplo n.º 1
0
class Migration(migrations.Migration):

    dependencies = [
        ('kubeops_api', '0075_auto_20200408_0803'),
        ('ops', '0002_remove_script_interpreter'),
    ]

    operations = [
        migrations.CreateModel(
            name='ScriptExecution',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('timedelta', models.FloatField(default=0.0, null=True, verbose_name='Time')),
                ('state', models.CharField(choices=[('PENDING', 'Pending'), ('STARTED', 'Started'), ('SUCCESS', 'Success'), ('FAILURE', 'Failure'), ('RETRY', 'Retry')], default='PENDING', max_length=16)),
                ('num', models.IntegerField(default=1)),
                ('result_summary', common.models.JsonDictTextField(blank=True, default={}, null=True, verbose_name='Result summary')),
                ('result_raw', common.models.JsonDictTextField(blank=True, default={}, null=True, verbose_name='Result raw')),
                ('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Create time')),
                ('date_start', models.DateTimeField(null=True, verbose_name='Start time')),
                ('date_end', models.DateTimeField(null=True, verbose_name='End time')),
                ('cluster', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='kubeops_api.Cluster')),
                ('script', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ops.Script')),
                ('targets', models.ManyToManyField(to='kubeops_api.Host')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ("video_requests", "0001_initial"),
    ]

    operations = [
        migrations.AddField(
            model_name="historicalrequest",
            name="requested_by",
            field=models.ForeignKey(
                blank=True,
                db_constraint=False,
                null=True,
                on_delete=django.db.models.deletion.DO_NOTHING,
                related_name="+",
                to=settings.AUTH_USER_MODEL,
            ),
        ),
        migrations.AddField(
            model_name="request",
            name="requested_by",
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=models.SET(common.models.get_sentinel_user),
                related_name="requested_by_user",
                to=settings.AUTH_USER_MODEL,
            ),
        ),
    ]
Ejemplo n.º 3
0
class Migration(migrations.Migration):

    dependencies = [
        ('money', '0002_income_incomecategory_incomegroup'),
    ]

    operations = [
        migrations.CreateModel(
            name='ExpenseGroup',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', common.models.IntDateTimeField()),
                ('update_time', common.models.IntDateTimeField()),
                ('name', models.CharField(max_length=50, unique=True)),
            ],
            options={
                'db_table': 'expense_group_tab',
            },
        ),
        migrations.AlterField(
            model_name='income',
            name='receive_time',
            field=common.models.IntDateTimeField(default=portfolio.time_util.now),
        ),
        migrations.CreateModel(
            name='ExpenseCategory',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', common.models.IntDateTimeField()),
                ('update_time', common.models.IntDateTimeField()),
                ('name', models.CharField(max_length=50, unique=True)),
                ('group', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='money.expensegroup')),
            ],
            options={
                'verbose_name_plural': 'expense categories',
                'db_table': 'expense_category_tab',
            },
        ),
        migrations.CreateModel(
            name='Expense',
            fields=[
                ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('create_time', common.models.IntDateTimeField()),
                ('update_time', common.models.IntDateTimeField()),
                ('name', models.CharField(blank=True, max_length=500)),
                ('value', models.PositiveIntegerField()),
                ('receive_time', common.models.IntDateTimeField(default=portfolio.time_util.now)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='money.expensecategory')),
                ('wallet', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='money.wallet')),
            ],
            options={
                'db_table': 'expense_tab',
            },
        ),
    ]
Ejemplo n.º 4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
                ('title', models.CharField(max_length=255)),
                ('sender', models.CharField(max_length=255)),
                ('content', models.TextField(max_length=65535)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('type', models.CharField(choices=[('SYSTEM', 'SYSTEM'), ('CLUSTER', 'CLUSTER')], default='SYSTEM', max_length=128)),
                ('level', models.CharField(choices=[('WARNING', 'WARNING'), ('ERROR', 'ERROR'), ('INFO', 'INFO')], default='INFO', max_length=64)),
            ],
        ),
        migrations.CreateModel(
            name='UserReceiver',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('type', models.CharField(choices=[('EMAIL', 'EMAIL'), ('LOCAL', 'LOCAL'), ('DINGTALK', 'DINGTALK'), ('WORKWEIXIN', 'WORKWEIXIN')], default='LOCAL', max_length=64)),
                ('vars', common.models.JsonDictTextField(default={})),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserNotificationConfig',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('vars', common.models.JsonDictTextField(default={})),
                ('type', models.CharField(choices=[('SYSTEM', 'SYSTEM'), ('CLUSTER', 'CLUSTER')], default='SYSTEM', max_length=128)),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='UserMessage',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
                ('receive', models.CharField(max_length=64, null=True)),
                ('user_id', models.CharField(max_length=64, null=True)),
                ('send_type', models.CharField(choices=[('EMAIL', 'EMAIL'), ('LOCAL', 'LOCAL'), ('DINGTALK', 'DINGTALK'), ('WORKWEIXIN', 'WORKWEIXIN')], default='LOCAL', max_length=64)),
                ('receive_status', models.CharField(choices=[('SUCCESS', 'SUCCESS'), ('WAITING', 'WAITING'), ('FAILED', 'FAILED')], default='WAITING', max_length=64)),
                ('read_status', models.CharField(choices=[('READ', 'READ'), ('UNREAD', 'UNREAD')], default='UNREAD', max_length=64)),
                ('date_created', models.DateTimeField(auto_now_add=True)),
                ('message', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='message_center.Message')),
            ],
        ),
    ]
Ejemplo n.º 5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Dictionary',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('modified_at', models.DateTimeField(auto_now_add=True)),
                ('deleted', models.BooleanField(default=False,
                                                editable=False)),
                ('entry', models.CharField(max_length=200)),
                ('key', models.CharField(max_length=200)),
                ('value', models.CharField(max_length=500)),
                ('created_by',
                 models.ForeignKey(
                     on_delete=models.SET(
                         common.models.UserUtils.get_recycle_user),
                     related_name='dictionary_dictionary_created_related',
                     related_query_name='dictionary_dictionarys_created',
                     to=settings.AUTH_USER_MODEL)),
                ('modified_by',
                 models.ForeignKey(
                     on_delete=models.SET(
                         common.models.UserUtils.get_recycle_user),
                     related_name='dictionary_dictionary_modified_related',
                     related_query_name='dictionary_dictionarys_modified',
                     to=settings.AUTH_USER_MODEL)),
                ('owner',
                 models.ForeignKey(
                     on_delete=models.SET(
                         common.models.UserUtils.get_recycle_user),
                     related_name='dictionary_dictionary_owner_related',
                     related_query_name='dictionary_dictionarys_owner',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'db_table': 'dictionary',
            },
        ),
    ]
Ejemplo n.º 6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='AuthToken',
            fields=[
                ('uuid',
                 models.UUIDField(default=uuid.uuid4,
                                  editable=False,
                                  primary_key=True,
                                  serialize=False)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateField(auto_now=True)),
                ('key',
                 models.CharField(default=common.models.random_token_32,
                                  editable=False,
                                  max_length=32)),
                ('user_agent', models.CharField(blank=True, max_length=512)),
                ('user',
                 models.ForeignKey(editable=False,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created_at'],
                'abstract': False,
            },
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('cloud_provider', '0010_auto_20190801_0307'),
    ]

    operations = [
        migrations.CreateModel(
            name='Plan',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=20, unique=True, verbose_name='Name')),
                ('date_created', models.DateTimeField(auto_now_add=True, verbose_name='Date created')),
                ('vars', common.models.JsonDictTextField(default={})),
                ('region', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='cloud_provider.Region')),
            ],
        ),
        migrations.RemoveField(
            model_name='zone',
            name='comment',
        ),
        migrations.AddField(
            model_name='plan',
            name='zones',
            field=models.ManyToManyField(to='cloud_provider.Zone'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('common', '0015_auto_20191122_1919'),
    ]

    operations = [
        migrations.AlterField(
            model_name='issue',
            name='published',
            field=models.BooleanField(default=False, help_text='If base information are currently public. (can be altered manually and by state changes)', verbose_name='published'),
        ),
        migrations.AlterField(
            model_name='issue',
            name='status',
            field=models.IntegerField(choices=[(1, 'SUBMITTED'), (2, 'WIP'), (3, 'SOLVED'), (4, 'IMPOSSIBLE'), (5, 'DUBLICATE')], default=common.models.StatusTypes(1), help_text='Stage of progress for the solution.', verbose_name='status'),
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('author', models.CharField(help_text='Who wrote the content.', max_length=150, verbose_name='author')),
                ('created_at', models.DateTimeField(default=django.utils.timezone.now, help_text='When was the contet written.', verbose_name='creation date')),
                ('content', models.TextField(help_text='Text of the comment', max_length=500, verbose_name='content')),
                ('issue', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='common.Issue')),
            ],
        ),
    ]
Ejemplo n.º 9
0
class Migration(migrations.Migration):

    dependencies = [
        ('common', '0002_auto_20180504_0458'),
    ]

    operations = [
        migrations.AlterModelManagers(
            name='usuario',
            managers=[
                ('objects', common.models.UserManager()),
            ],
        ),
        migrations.AlterField(
            model_name='turma',
            name='professor',
            field=models.ForeignKey(limit_choices_to={'papel': 1}, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='usuario',
            name='foto',
            field=models.ImageField(default='https://api.adorable.io/avatars/192/[email protected]', upload_to='avatars/'),
        ),
        migrations.AlterField(
            model_name='usuario',
            name='papel',
            field=models.IntegerField(choices=[(1, 'Professor'), (2, 'Aluno'), (0, 'Admin')], default=0),
        ),
    ]
Ejemplo n.º 10
0
class Migration(migrations.Migration):

    dependencies = [
        ('common', '0002_auto_20190128_1237'),
    ]

    operations = [
        migrations.CreateModel(
            name='Document',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(blank=True, max_length=1000, null=True)),
                ('document_file',
                 models.FileField(max_length=5000,
                                  upload_to=common.models.document_path)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('created_by',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='document_uploaded',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Ejemplo n.º 11
0
class Migration(migrations.Migration):

    dependencies = [
        ('cloud_provider', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='CloudProvider',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  primary_key=True,
                                  serialize=False)),
                ('name', models.CharField(max_length=128, unique=True)),
                ('vars', common.models.JsonDictTextField(default={})),
                ('date_created',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Date created')),
                ('template',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='cloud_provider.CloudProviderTemplate')),
            ],
        ),
    ]
Ejemplo n.º 12
0
class Migration(migrations.Migration):

    dependencies = [
        ('money', '0004_auto_20210527_2007'),
    ]

    operations = [
        migrations.CreateModel(
            name='Budget',
            fields=[
                ('id',
                 models.BigAutoField(auto_created=True,
                                     primary_key=True,
                                     serialize=False,
                                     verbose_name='ID')),
                ('create_time', common.models.IntDateTimeField()),
                ('update_time', common.models.IntDateTimeField()),
                ('limit', models.PositiveIntegerField()),
                ('expense_group',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='money.expensegroup')),
            ],
            options={
                'db_table': 'budget_tab',
            },
        ),
    ]
Ejemplo n.º 13
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
        ('galleries', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Snap',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('photo', models.ImageField(upload_to='photos')),
                ('created_by',
                 models.ForeignKey(
                     blank=True,
                     editable=False,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='created_snap',
                     to=settings.AUTH_USER_MODEL)),
                ('gallery',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='snaps',
                                   to='galleries.SnapGallery')),
                ('last_modified_by',
                 models.ForeignKey(
                     blank=True,
                     editable=False,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='last_modified_snap',
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
            bases=(common.models.CreatedMixin, common.models.ModifiedMixin,
                   models.Model),
        ),
    ]
Ejemplo n.º 14
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('merchants', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Checkout',
            fields=[
                ('id',
                 common.models.ULIDField(default=ulid.api.new,
                                         editable=False,
                                         max_length=26,
                                         primary_key=True,
                                         serialize=False,
                                         unique=True)),
                ('created_time',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='created time')),
                ('updated_time',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='updated time')),
                ('deleted',
                 models.BooleanField(default=False, verbose_name='deleted')),
                ('amount', models.IntegerField(verbose_name='amount')),
                ('payment_method',
                 models.IntegerField(choices=[(0, 'FeliCa Card'),
                                              (1, 'QR Code')],
                                     verbose_name='payment method')),
                ('merchant',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='merchants.Merchant')),
                ('purchaser',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('organizations', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id', common.models.RequiredCharField(max_length=200, primary_key=True, serialize=False, validators=[django.core.validators.RegexValidator(regex='^[^ ]+$')])),
                ('latitude', models.FloatField(blank=True, null=True)),
                ('longitude', models.FloatField(blank=True, null=True)),
                ('organization', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='organizations.Organization')),
            ],
            options={
                'abstract': False,
            },
            bases=(parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='LocationTranslation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('language_code', models.CharField(db_index=True, max_length=15, verbose_name='Language')),
                ('name', models.CharField(max_length=200)),
                ('description', models.TextField(blank=True, null=True)),
                ('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='locations.Location')),
            ],
            options={
                'verbose_name': 'location Translation',
                'db_table': 'locations_location_translation',
                'db_tablespace': '',
                'managed': True,
                'default_permissions': (),
            },
        ),
        migrations.AlterUniqueTogether(
            name='locationtranslation',
            unique_together=set([('language_code', 'master')]),
        ),
    ]
Ejemplo n.º 16
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0009_alter_user_last_name_max_length'),
        ('media_upload', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Account',
            fields=[
                ('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')),
                ('id', common.models.ULIDField(default=ulid.api.new, editable=False, max_length=26, primary_key=True, serialize=False, unique=True)),
                ('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
                ('email', models.EmailField(error_messages={'unique': 'A user with that email already exists.'}, max_length=254, unique=True, verbose_name='email address')),
                ('display_name', models.CharField(blank=True, max_length=30, null=True, verbose_name='display name')),
                ('is_staff', models.BooleanField(default=False, verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, verbose_name='active')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('balance', models.IntegerField(default=0, verbose_name='balance')),
                ('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')),
                ('icon', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='media_upload.Image', verbose_name='icon')),
                ('user_permissions', 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')),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
            },
        ),
        migrations.CreateModel(
            name='Idm',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('idm', models.CharField(error_messages={'unique': 'This card is already registered'}, max_length=16, unique=True, verbose_name='IDm Number')),
                ('name', models.CharField(blank=True, max_length=255, null=True, verbose_name='card name')),
                ('account', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='account')),
            ],
        ),
    ]
Ejemplo n.º 17
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Currency',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', common.models.NameField(max_length=150, unique=True)),
                ('base_price',
                 models.DecimalField(
                     decimal_places=5,
                     max_digits=20,
                     validators=[
                         django.core.validators.MinValueValidator(
                             0, 'Prices must be positive')
                     ])),
                ('imutable', models.BooleanField(default=False)),
            ],
        ),
        migrations.CreateModel(
            name='CurrencyPriceChange',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('date', models.DateField()),
                ('new_price',
                 models.DecimalField(
                     decimal_places=5,
                     max_digits=20,
                     validators=[
                         django.core.validators.MinValueValidator(
                             0, 'Prices must be positive')
                     ])),
                ('currency',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='currencies.Currency')),
            ],
        ),
        migrations.AlterUniqueTogether(
            name='currencypricechange',
            unique_together={('date', 'currency')},
        ),
    ]
Ejemplo n.º 18
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('locations', '0011_auto_20180227_2301'),
    ]

    operations = [
        migrations.CreateModel(
            name='PhoneAtLocation',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('phone_number', models.TextField()),
                ('location',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='locations.Location')),
            ],
        ),
        migrations.CreateModel(
            name='PhoneNumberType',
            fields=[
                ('id',
                 common.models.RequiredCharField(max_length=200,
                                                 primary_key=True,
                                                 serialize=False)),
            ],
        ),
        migrations.AddField(
            model_name='phoneatlocation',
            name='phone_number_type',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to='phone_at_location.PhoneNumberType'),
        ),
    ]
Ejemplo n.º 19
0
class Migration(migrations.Migration):

    dependencies = [
        ('common', '0028_auto_20200422_1454'),
    ]

    operations = [
        migrations.AlterField(
            model_name='comment',
            name='author',
            field=models.ForeignKey(
                blank=True,
                editable=False,
                help_text='Who wrote the content.',
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                related_name='comments',
                to=settings.AUTH_USER_MODEL,
                verbose_name='author'),
        ),
        migrations.AlterField(
            model_name='comment',
            name='created_at',
            field=models.DateTimeField(
                default=django.utils.timezone.now,
                editable=False,
                help_text='When was the content written.',
                verbose_name='creation date'),
        ),
        migrations.AlterField(
            model_name='issue',
            name='author_trust',
            field=models.IntegerField(choices=[(1, 'EXTERNAL'),
                                               (2, 'INTERNAL'),
                                               (3, 'FIELDTEAM')],
                                      default=common.models.TrustTypes(1),
                                      editable=False,
                                      help_text='Trust level of the author.',
                                      verbose_name='trust'),
        ),
        migrations.AlterField(
            model_name='issue',
            name='location',
            field=models.CharField(
                blank=True,
                editable=False,
                help_text='Human readable description of the position.',
                max_length=150,
                null=True,
                verbose_name='location'),
        ),
    ]
Ejemplo n.º 20
0
class Migration(migrations.Migration):

    dependencies = [
        ('common', '0017_auto_20191124_1826'),
    ]

    operations = [
        migrations.AlterField(
            model_name='issue',
            name='assigned',
            field=models.ForeignKey(blank=True, help_text='Responsible (internal) department, which processes the issue currently.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='assignedIssues', to='auth.Group', verbose_name='assigned group'),
        ),
        migrations.AlterField(
            model_name='issue',
            name='category',
            field=mptt.fields.TreeForeignKey(help_text='Multi-level selection of which kind of note this issue comes closest.', on_delete=django.db.models.deletion.CASCADE, to='common.Category', validators=[common.models.validate_is_subcategory], verbose_name='category'),
        ),
        migrations.AlterField(
            model_name='issue',
            name='delegated',
            field=models.ForeignKey(blank=True, help_text='Responsible (external) organisation, which becomes involved in solving this issue.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='delegatedIssues', to='auth.Group', verbose_name='delegated group'),
        ),
        migrations.AlterField(
            model_name='issue',
            name='landowner',
            field=models.CharField(blank=True, help_text='Operrator that manages the area of the position. (usually landowner, might be inaccurate)', max_length=250, null=True, verbose_name='landowner'),
        ),
        migrations.AlterField(
            model_name='issue',
            name='location',
            field=models.CharField(blank=True, help_text='Human readable description of the position.', max_length=150, null=True, verbose_name='location'),
        ),
        migrations.AlterField(
            model_name='issue',
            name='position',
            field=django.contrib.gis.db.models.fields.PointField(help_text='Georeference for this issue. (might be inaccurate)', srid=25833, validators=[common.models.validate_in_municipality], verbose_name='position'),
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('addresses', '0001_initial'),
        ('locations', '0004_auto_20171221_0046'),
    ]

    operations = [
        migrations.CreateModel(
            name='AddressAtLocation',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('address',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='addresses.Address')),
                ('address_type',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='addresses.AddressType')),
                ('location',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='locations.Location')),
            ],
            bases=(common.models.ValidateOnSaveMixin, models.Model),
        ),
        migrations.AddField(
            model_name='location',
            name='addresses',
            field=models.ManyToManyField(related_name='locations',
                                         through='locations.AddressAtLocation',
                                         to='addresses.Address'),
        ),
    ]
Ejemplo n.º 22
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('media_upload', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Merchant',
            fields=[
                ('id',
                 common.models.ULIDField(default=ulid.api.new,
                                         editable=False,
                                         max_length=26,
                                         primary_key=True,
                                         serialize=False,
                                         unique=True)),
                ('created_time',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='created time')),
                ('updated_time',
                 models.DateTimeField(auto_now=True,
                                      verbose_name='updated time')),
                ('deleted',
                 models.BooleanField(default=False, verbose_name='deleted')),
                ('name',
                 models.CharField(max_length=30,
                                  verbose_name='merchant name')),
                ('is_active',
                 models.BooleanField(default=True, verbose_name='is active')),
                ('accounts',
                 models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
                ('icon',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.PROTECT,
                                   to='media_upload.Image',
                                   verbose_name='icon')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('locations', '0002_auto_20171214_1957'),
    ]

    operations = [
        migrations.CreateModel(
            name='ServiceAtLocation',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('location',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='locations.Location')),
            ],
            bases=(common.models.ValidateOnSaveMixin, models.Model),
        ),
    ]
Ejemplo n.º 24
0
class Migration(migrations.Migration):

    dependencies = [
        ("common", "0002_auto_20190128_1237"),
    ]

    operations = [
        migrations.CreateModel(
            name="Document",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("title",
                 models.CharField(blank=True, max_length=1000, null=True)),
                (
                    "document_file",
                    models.FileField(max_length=5000,
                                     upload_to=common.models.document_path),
                ),
                ("created_on", models.DateTimeField(auto_now_add=True)),
                (
                    "created_by",
                    models.ForeignKey(
                        on_delete=django.db.models.deletion.CASCADE,
                        related_name="document_uploaded",
                        to=settings.AUTH_USER_MODEL,
                    ),
                ),
            ],
        ),
    ]
Ejemplo n.º 25
0
class Migration(migrations.Migration):

    dependencies = [
        ('services', '0005_auto_20180910_1743'),
        ('search', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='TaskServiceSimilarityScores',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('task_id',
                 common.models.RequiredCharField(
                     max_length=200,
                     validators=[
                         django.core.validators.RegexValidator(
                             re.compile('^[-a-zA-Z0-9_]+\\Z'),
                             "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.",
                             'invalid')
                     ])),
                ('similarity_score', models.FloatField()),
                ('service',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='services',
                                   to='services.Service')),
            ],
            bases=(common.models.ValidateOnSaveMixin, models.Model),
        ),
        migrations.AlterUniqueTogether(
            name='taskservicesimilarityscores',
            unique_together={('task_id', 'service')},
        ),
    ]
Ejemplo n.º 26
0
class Migration(migrations.Migration):

    dependencies = [
        ('cloud_provider', '0007_auto_20190731_0424'),
    ]

    operations = [
        migrations.CreateModel(
            name='Zone',
            fields=[
                ('id',
                 models.UUIDField(default=uuid.uuid4,
                                  primary_key=True,
                                  serialize=False)),
                ('name',
                 models.CharField(max_length=20,
                                  unique=True,
                                  verbose_name='Name')),
                ('date_created',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Date created')),
                ('comment',
                 models.CharField(blank=True,
                                  max_length=128,
                                  null=True,
                                  verbose_name='Comment')),
                ('vars', common.models.JsonDictTextField(default={})),
                ('cloud_zone',
                 models.CharField(default=None, max_length=128, null=True)),
                ('region',
                 models.ForeignKey(null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='cloud_provider.Region')),
            ],
        ),
    ]
Ejemplo n.º 27
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('ansible_api', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Cluster',
            fields=[
                ('project_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='ansible_api.Project')),
                ('template', models.CharField(blank=True, default='', max_length=64)),
                ('current_task_id', models.CharField(blank=True, default='', max_length=128)),
                ('is_super', models.BooleanField(default=False)),
            ],
            bases=('ansible_api.project',),
        ),
        migrations.CreateModel(
            name='DeployExecution',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
                ('timedelta', models.FloatField(default=0.0, null=True, verbose_name='Time')),
                ('state', models.CharField(choices=[('PENDING', 'Pending'), ('STARTED', 'Started'), ('SUCCESS', 'Success'), ('FAILURE', 'Failure'), ('RETRY', 'Retry')], default='PENDING', max_length=16)),
                ('num', models.IntegerField(default=1)),
                ('result_summary', common.models.JsonDictTextField(blank=True, default={}, null=True, verbose_name='Result summary')),
                ('result_raw', common.models.JsonDictTextField(blank=True, default={}, null=True, verbose_name='Result raw')),
                ('date_created', models.DateTimeField(auto_now_add=True, null=True, verbose_name='Create time')),
                ('date_start', models.DateTimeField(null=True, verbose_name='Start time')),
                ('date_end', models.DateTimeField(null=True, verbose_name='End time')),
                ('operation', models.CharField(blank=True, choices=[('install', 'install'), ('upgrade', 'upgrade'), ('uninstall', 'uninstall')], default='install', max_length=128)),
                ('current_task', models.CharField(blank=True, default=None, max_length=128, null=True)),
                ('progress', models.FloatField(blank=True, default=0.0, max_length=64, null=True)),
                ('project', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='ansible_api.Project')),
            ],
            options={
                'ordering': ('-date_created',),
                'get_latest_by': 'date_created',
            },
        ),
        migrations.CreateModel(
            name='Host',
            fields=[
                ('name', models.CharField(max_length=256, validators=[django.core.validators.RegexValidator(message='Enter a valid name consisting of Unicode letters, numbers, underscores, or hyphens, or dot', regex='^[a-zA-Z0-9_\\-\\.]+$')])),
                ('ip', models.GenericIPAddressField(null=True)),
                ('port', models.IntegerField(default=22)),
                ('username', models.CharField(default='root', max_length=256)),
                ('password', common.models.EncryptCharField(blank=True, max_length=4096, null=True)),
                ('private_key', common.models.EncryptCharField(blank=True, max_length=8192, null=True)),
                ('vars', common.models.JsonDictTextField(default={})),
                ('meta', common.models.JsonDictTextField(default={})),
                ('comment', models.TextField(blank=True)),
                ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
                ('memory', models.BigIntegerField(default=0)),
                ('os', models.CharField(default='', max_length=128)),
                ('os_version', models.CharField(default='', max_length=128)),
                ('cpu_core', models.IntegerField(default=0)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Node',
            fields=[
                ('host_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='ansible_api.Host')),
                ('host', models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='host', to='openshift_api.Host')),
            ],
            options={
                'abstract': False,
            },
            bases=('ansible_api.host',),
        ),
        migrations.CreateModel(
            name='Package',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=20, unique=True, verbose_name='Name')),
                ('meta', common.models.JsonTextField(blank=True, null=True, verbose_name='Meta')),
                ('date_created', models.DateTimeField(auto_now_add=True, verbose_name='Date created')),
            ],
            options={
                'verbose_name': 'Package',
            },
        ),
        migrations.CreateModel(
            name='Role',
            fields=[
            ],
            options={
                'proxy': True,
                'indexes': [],
            },
            bases=('ansible_api.group',),
        ),
        migrations.AddField(
            model_name='host',
            name='node',
            field=models.ForeignKey(default=None, null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='node', to='openshift_api.Node'),
        ),
        migrations.AddField(
            model_name='cluster',
            name='package',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to='openshift_api.Package'),
        ),
    ]
Ejemplo n.º 28
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('accounts', '0001_initial'),
        ('cases', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='User',
            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')),
                ('username', models.CharField(max_length=100, unique=True)),
                ('first_name', models.CharField(blank=True, max_length=150)),
                ('last_name', models.CharField(blank=True, max_length=150)),
                ('email', models.EmailField(max_length=255, unique=True)),
                ('is_active', models.BooleanField(default=True)),
                ('is_admin', models.BooleanField(default=False)),
                ('is_staff', models.BooleanField(default=False)),
                ('date_joined',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='date joined')),
                ('role',
                 models.CharField(choices=[('ADMIN', 'ADMIN'),
                                           ('USER', 'USER'),
                                           ('SALES', 'SALES'),
                                           ('MANAGER', 'MANAGER'),
                                           ('SALES MANAGER', 'SALES MANAGER')],
                                  max_length=50)),
                ('profile_pic',
                 models.FileField(blank=True,
                                  max_length=1000,
                                  null=True,
                                  upload_to=common.models.img_url)),
                ('has_sales_access', models.BooleanField(default=False)),
                ('has_marketing_access', models.BooleanField(default=False)),
            ],
            options={
                'ordering': ['-is_active'],
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('address_line',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='Address')),
                ('street',
                 models.CharField(blank=True,
                                  max_length=55,
                                  null=True,
                                  verbose_name='Street')),
                ('city',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='City')),
                ('state',
                 models.CharField(blank=True,
                                  max_length=255,
                                  null=True,
                                  verbose_name='State')),
                ('postcode',
                 models.CharField(blank=True,
                                  max_length=64,
                                  null=True,
                                  verbose_name='Post/Zip-code')),
                ('country',
                 models.CharField(
                     blank=True,
                     choices=[('GB', 'United Kingdom'), ('AF', 'Afghanistan'),
                              ('AX', 'Aland Islands'), ('AL', 'Albania'),
                              ('DZ', 'Algeria'), ('AS', 'American Samoa'),
                              ('AD', 'Andorra'), ('AO', 'Angola'),
                              ('AI', 'Anguilla'), ('AQ', 'Antarctica'),
                              ('AG', 'Antigua and Barbuda'),
                              ('AR', 'Argentina'), ('AM', 'Armenia'),
                              ('AW', 'Aruba'), ('AU', 'Australia'),
                              ('AT', 'Austria'), ('AZ', 'Azerbaijan'),
                              ('BS', 'Bahamas'), ('BH', 'Bahrain'),
                              ('BD', 'Bangladesh'), ('BB', 'Barbados'),
                              ('BY', 'Belarus'), ('BE', 'Belgium'),
                              ('BZ', 'Belize'), ('BJ', 'Benin'),
                              ('BM', 'Bermuda'), ('BT', 'Bhutan'),
                              ('BO', 'Bolivia'),
                              ('BA', 'Bosnia and Herzegovina'),
                              ('BW', 'Botswana'), ('BV', 'Bouvet Island'),
                              ('BR', 'Brazil'),
                              ('IO', 'British Indian Ocean Territory'),
                              ('BN', 'Brunei Darussalam'), ('BG', 'Bulgaria'),
                              ('BF', 'Burkina Faso'), ('BI', 'Burundi'),
                              ('KH', 'Cambodia'), ('CM', 'Cameroon'),
                              ('CA', 'Canada'), ('CV', 'Cape Verde'),
                              ('KY', 'Cayman Islands'),
                              ('CF', 'Central African Republic'),
                              ('TD', 'Chad'), ('CL', 'Chile'), ('CN', 'China'),
                              ('CX', 'Christmas Island'),
                              ('CC', 'Cocos (Keeling) Islands'),
                              ('CO', 'Colombia'), ('KM', 'Comoros'),
                              ('CG', 'Congo'),
                              ('CD', 'Congo, The Democratic Republic of the'),
                              ('CK', 'Cook Islands'), ('CR', 'Costa Rica'),
                              ('CI', "Cote d'Ivoire"), ('HR', 'Croatia'),
                              ('CU', 'Cuba'), ('CY', 'Cyprus'),
                              ('CZ', 'Czech Republic'), ('DK', 'Denmark'),
                              ('DJ', 'Djibouti'), ('DM', 'Dominica'),
                              ('DO', 'Dominican Republic'), ('EC', 'Ecuador'),
                              ('EG', 'Egypt'), ('SV', 'El Salvador'),
                              ('GQ', 'Equatorial Guinea'), ('ER', 'Eritrea'),
                              ('EE', 'Estonia'), ('ET', 'Ethiopia'),
                              ('FK', 'Falkland Islands (Malvinas)'),
                              ('FO', 'Faroe Islands'), ('FJ', 'Fiji'),
                              ('FI', 'Finland'), ('FR', 'France'),
                              ('GF', 'French Guiana'),
                              ('PF', 'French Polynesia'),
                              ('TF', 'French Southern Territories'),
                              ('GA', 'Gabon'), ('GM', 'Gambia'),
                              ('GE', 'Georgia'), ('DE', 'Germany'),
                              ('GH', 'Ghana'), ('GI', 'Gibraltar'),
                              ('GR', 'Greece'), ('GL', 'Greenland'),
                              ('GD', 'Grenada'), ('GP', 'Guadeloupe'),
                              ('GU', 'Guam'), ('GT', 'Guatemala'),
                              ('GG', 'Guernsey'), ('GN', 'Guinea'),
                              ('GW', 'Guinea-Bissau'), ('GY', 'Guyana'),
                              ('HT', 'Haiti'),
                              ('HM', 'Heard Island and McDonald Islands'),
                              ('VA', 'Holy See (Vatican City State)'),
                              ('HN', 'Honduras'), ('HK', 'Hong Kong'),
                              ('HU', 'Hungary'), ('IS', 'Iceland'),
                              ('IN', 'India'), ('ID', 'Indonesia'),
                              ('IR', 'Iran, Islamic Republic of'),
                              ('IQ', 'Iraq'), ('IE', 'Ireland'),
                              ('IM', 'Isle of Man'), ('IL', 'Israel'),
                              ('IT', 'Italy'), ('JM', 'Jamaica'),
                              ('JP', 'Japan'), ('JE', 'Jersey'),
                              ('JO', 'Jordan'), ('KZ', 'Kazakhstan'),
                              ('KE', 'Kenya'), ('KI', 'Kiribati'),
                              ('KP', "Korea, Democratic People's Republic of"),
                              ('KR', 'Korea, Republic of'), ('KW', 'Kuwait'),
                              ('KG', 'Kyrgyzstan'),
                              ('LA', "Lao People's Democratic Republic"),
                              ('LV', 'Latvia'), ('LB', 'Lebanon'),
                              ('LS', 'Lesotho'), ('LR', 'Liberia'),
                              ('LY', 'Libyan Arab Jamahiriya'),
                              ('LI', 'Liechtenstein'), ('LT', 'Lithuania'),
                              ('LU', 'Luxembourg'), ('MO', 'Macao'),
                              ('MK',
                               'Macedonia, The Former Yugoslav Republic of'),
                              ('MG', 'Madagascar'), ('MW', 'Malawi'),
                              ('MY', 'Malaysia'), ('MV', 'Maldives'),
                              ('ML', 'Mali'), ('MT', 'Malta'),
                              ('MH', 'Marshall Islands'), ('MQ', 'Martinique'),
                              ('MR', 'Mauritania'), ('MU', 'Mauritius'),
                              ('YT', 'Mayotte'), ('MX', 'Mexico'),
                              ('FM', 'Micronesia, Federated States of'),
                              ('MD', 'Moldova'), ('MC', 'Monaco'),
                              ('MN', 'Mongolia'), ('ME', 'Montenegro'),
                              ('MS', 'Montserrat'), ('MA', 'Morocco'),
                              ('MZ', 'Mozambique'), ('MM', 'Myanmar'),
                              ('NA', 'Namibia'), ('NR', 'Nauru'),
                              ('NP', 'Nepal'), ('NL', 'Netherlands'),
                              ('AN', 'Netherlands Antilles'),
                              ('NC', 'New Caledonia'), ('NZ', 'New Zealand'),
                              ('NI', 'Nicaragua'), ('NE', 'Niger'),
                              ('NG', 'Nigeria'), ('NU', 'Niue'),
                              ('NF', 'Norfolk Island'),
                              ('MP', 'Northern Mariana Islands'),
                              ('NO', 'Norway'), ('OM', 'Oman'),
                              ('PK', 'Pakistan'), ('PW', 'Palau'),
                              ('PS', 'Palestinian Territory, Occupied'),
                              ('PA', 'Panama'), ('PG', 'Papua New Guinea'),
                              ('PY', 'Paraguay'), ('PE', 'Peru'),
                              ('PH', 'Philippines'), ('PN', 'Pitcairn'),
                              ('PL', 'Poland'), ('PT', 'Portugal'),
                              ('PR', 'Puerto Rico'), ('QA', 'Qatar'),
                              ('RE', 'Reunion'), ('RO', 'Romania'),
                              ('RU', 'Russian Federation'), ('RW', 'Rwanda'),
                              ('BL', 'Saint Barthelemy'),
                              ('SH', 'Saint Helena'),
                              ('KN', 'Saint Kitts and Nevis'),
                              ('LC', 'Saint Lucia'), ('MF', 'Saint Martin'),
                              ('PM', 'Saint Pierre and Miquelon'),
                              ('VC', 'Saint Vincent and the Grenadines'),
                              ('WS', 'Samoa'), ('SM', 'San Marino'),
                              ('ST', 'Sao Tome and Principe'),
                              ('SA', 'Saudi Arabia'), ('SN', 'Senegal'),
                              ('RS', 'Serbia'), ('SC', 'Seychelles'),
                              ('SL', 'Sierra Leone'), ('SG', 'Singapore'),
                              ('SK', 'Slovakia'), ('SI', 'Slovenia'),
                              ('SB', 'Solomon Islands'), ('SO', 'Somalia'),
                              ('ZA', 'South Africa'),
                              ('GS',
                               'South Georgia and the South Sandwich Islands'),
                              ('ES', 'Spain'), ('LK', 'Sri Lanka'),
                              ('SD', 'Sudan'), ('SR', 'Suriname'),
                              ('SJ', 'Svalbard and Jan Mayen'),
                              ('SZ', 'Swaziland'), ('SE', 'Sweden'),
                              ('CH', 'Switzerland'),
                              ('SY', 'Syrian Arab Republic'),
                              ('TW', 'Taiwan, Province of China'),
                              ('TJ', 'Tajikistan'),
                              ('TZ', 'Tanzania, United Republic of'),
                              ('TH', 'Thailand'), ('TL', 'Timor-Leste'),
                              ('TG', 'Togo'), ('TK', 'Tokelau'),
                              ('TO', 'Tonga'), ('TT', 'Trinidad and Tobago'),
                              ('TN', 'Tunisia'), ('TR', 'Turkey'),
                              ('TM', 'Turkmenistan'),
                              ('TC', 'Turks and Caicos Islands'),
                              ('TV', 'Tuvalu'), ('UG', 'Uganda'),
                              ('UA', 'Ukraine'), ('AE',
                                                  'United Arab Emirates'),
                              ('US', 'United States'),
                              ('UM', 'United States Minor Outlying Islands'),
                              ('UY', 'Uruguay'), ('UZ', 'Uzbekistan'),
                              ('VU', 'Vanuatu'), ('VE', 'Venezuela'),
                              ('VN', 'Viet Nam'),
                              ('VG', 'Virgin Islands, British'),
                              ('VI', 'Virgin Islands, U.S.'),
                              ('WF', 'Wallis and Futuna'),
                              ('EH', 'Western Sahara'), ('YE', 'Yemen'),
                              ('ZM', 'Zambia'), ('ZW', 'Zimbabwe')],
                     max_length=3,
                     null=True)),
            ],
        ),
        migrations.CreateModel(
            name='APISettings',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=1000)),
                ('apikey', models.CharField(blank=True, max_length=16)),
                ('website', models.URLField(default='', max_length=255)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'ordering': ('-created_on', ),
            },
        ),
        migrations.CreateModel(
            name='Attachments',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('file_name', models.CharField(max_length=60)),
                ('created_on',
                 models.DateTimeField(auto_now_add=True,
                                      verbose_name='Created on')),
                ('attachment',
                 models.FileField(max_length=1001,
                                  upload_to='attachments/%Y/%m/')),
            ],
        ),
        migrations.CreateModel(
            name='Comment',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('comment', models.CharField(max_length=255)),
                ('commented_on', models.DateTimeField(auto_now_add=True)),
                ('account',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='accounts_comments',
                                   to='accounts.Account')),
                ('case',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='cases',
                                   to='cases.Case')),
                ('commented_by',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('activation_key', models.CharField(max_length=50)),
                ('key_expires', models.DateTimeField()),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     related_name='profile',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Google',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('google_id', models.CharField(default='', max_length=200)),
                ('google_url', models.CharField(default='', max_length=1000)),
                ('verified_email', models.CharField(default='',
                                                    max_length=200)),
                ('family_name', models.CharField(default='', max_length=200)),
                ('name', models.CharField(default='', max_length=200)),
                ('gender', models.CharField(default='', max_length=10)),
                ('dob', models.CharField(default='', max_length=50)),
                ('given_name', models.CharField(default='', max_length=200)),
                ('email',
                 models.CharField(db_index=True, default='', max_length=200)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='google',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Document',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title',
                 models.CharField(blank=True, max_length=1000, null=True)),
                ('document_file',
                 models.FileField(max_length=5000,
                                  upload_to=common.models.document_path)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('status',
                 models.CharField(choices=[('active', 'active'),
                                           ('inactive', 'inactive')],
                                  default='active',
                                  max_length=64)),
                ('created_by',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='document_uploaded',
                     to=settings.AUTH_USER_MODEL)),
                ('shared_to',
                 models.ManyToManyField(related_name='document_shared_to',
                                        to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ('-created_on', ),
            },
        ),
        migrations.CreateModel(
            name='Comment_Files',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('updated_on', models.DateTimeField(auto_now_add=True)),
                ('comment_file',
                 models.FileField(default='',
                                  upload_to='comment_files',
                                  verbose_name='File')),
                ('comment',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='common.Comment')),
            ],
        ),
    ]
Ejemplo n.º 29
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Post',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(max_length=160)),
                ('text', models.TextField()),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=40)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('is_starter', models.BooleanField(blank=True, default=False)),
            ],
        ),
        migrations.CreateModel(
            name='Support',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('supported_post',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='supporters',
                                   to='common.Post')),
                ('supported_user',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='supporters',
                                   to=settings.AUTH_USER_MODEL)),
                ('supporter',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='supports_made',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('is_organization', models.BooleanField(default=False)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='post',
            name='tags',
            field=models.ManyToManyField(related_name='users',
                                         to='common.Tag'),
        ),
        migrations.AddField(
            model_name='post',
            name='user',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('image',
                 models.ImageField(upload_to=common.models.image_upload_path)),
                ('order_in_post', models.IntegerField()),
                ('post',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='common.Post')),
            ],
        ),
    ]
Ejemplo n.º 30
0
class Migration(migrations.Migration):

    dependencies = [
        ('common', '0003_auto_20200509_2050'),
    ]

    operations = [
        migrations.AddField(
            model_name='user',
            name='waist',
            field=models.IntegerField(blank=True, null=True),
        ),
        migrations.CreateModel(
            name='ViceLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('preexisting', models.BooleanField(default=False)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('vice', models.CharField(max_length=128)),
                ('quantity', models.CharField(max_length=128)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ToiletLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('preexisting', models.BooleanField(default=False)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SymptomsLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('preexisting', models.BooleanField(default=False)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('status',
                 models.IntegerField(choices=[(0, 'Okay'), (1, 'Not okay'),
                                              (2, 'Very bad')],
                                     default=0)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='StressLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('preexisting', models.BooleanField(default=False)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('level', common.models.IntegerRangeField()),
                ('details', models.TextField()),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SleepLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('preexisting', models.BooleanField(default=False)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('start', models.TimeField()),
                ('end', models.TimeField()),
                ('quality', common.models.IntegerRangeField()),
                ('rem', models.BooleanField(blank=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='NaturalRemediesLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('preexisting', models.BooleanField(default=False)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('natural_remedy', models.CharField(max_length=128)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='MedicationLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('preexisting', models.BooleanField(default=False)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('medication', models.CharField(max_length=128)),
                ('dose', models.PositiveIntegerField()),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ExerciseLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('preexisting', models.BooleanField(default=False)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('exercise',
                 models.CharField(choices=[
                     ('WA', 'Walking'), ('RU', 'Running'), ('CY', 'Cycling'),
                     ('SW', 'Swimming')
                 ],
                                  max_length=2)),
                ('duration', models.DurationField()),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DietLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('preexisting', models.BooleanField(default=False)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('product', models.CharField(max_length=128)),
                ('code', models.CharField(blank=True, max_length=13)),
                ('calories', models.PositiveIntegerField()),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CheckupLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('preexisting', models.BooleanField(default=False)),
                ('timestamp', models.DateTimeField()),
                ('details', models.TextField()),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CardiovascularLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('preexisting', models.BooleanField(default=False)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('pulse', models.PositiveIntegerField()),
                ('systolic_pressure', models.PositiveIntegerField(blank=True)),
                ('diastolic_pressure',
                 models.PositiveIntegerField(blank=True)),
                ('blood_sugar', models.FloatField(blank=True)),
                ('saturation',
                 models.DecimalField(decimal_places=2, max_digits=5)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='BodyLog',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('preexisting', models.BooleanField(default=False)),
                ('timestamp', models.DateTimeField(auto_now_add=True)),
                ('height', models.IntegerField(blank=True, null=True)),
                ('weight', models.IntegerField(blank=True, null=True)),
                ('waist', models.IntegerField(blank=True, null=True)),
                ('user',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
    ]