Beispiel #1
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')},
        ),
    ]
Beispiel #2
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')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='CatImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 common.models.CreationDateTimeField(auto_now_add=True,
                                                     verbose_name='생성일시')),
                ('modified',
                 common.models.ModificationDateTimeField(auto_now=True,
                                                         verbose_name='수정일시')),
                ('url', models.URLField(verbose_name='이미지 URL')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Tip',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 common.models.CreationDateTimeField(auto_now_add=True,
                                                     verbose_name='생성일시')),
                ('modified',
                 common.models.ModificationDateTimeField(auto_now=True,
                                                         verbose_name='수정일시')),
                ('content', models.TextField(verbose_name='내용')),
            ],
            options={
                'abstract': False,
            },
        ),
    ]
Beispiel #4
0
class Migration(migrations.Migration):

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

    operations = [
        migrations.CreateModel(
            name='DashboardImage',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=50,
                                          null=True)),
                ('image',
                 models.ImageField(
                     default='customers\\default_profile_picture.png',
                     storage=common.storage.OverwriteStorage(),
                     upload_to=common.models.custProfileImageSavePath)),
                ('dt_creation',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('dt_show',
                 models.DateField(default=django.utils.timezone.now)),
            ],
            options={
                'ordering': ['-dt_show'],
            },
        ),
    ]
Beispiel #5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Bible',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('testament_name', models.CharField(blank=True, max_length=100, null=True, verbose_name='성서 이름')),
                ('testament_kr_code', models.CharField(blank=True, max_length=50, null=True, verbose_name='성서 약어')),
                ('order', models.IntegerField(blank=True, null=True, validators=[common.models.validate_max_chapter], verbose_name='성서 번호')),
                ('chapter', models.PositiveIntegerField(blank=True, null=True, verbose_name='장')),
                ('verse', models.PositiveIntegerField(blank=True, null=True, verbose_name='절')),
                ('contents', models.TextField(blank=True, null=True, verbose_name='본문')),
                ('total_chapters', models.PositiveIntegerField(blank=True, null=True, verbose_name='성서의 장수')),
                ('total_verses', models.PositiveIntegerField(blank=True, null=True, verbose_name='해당 장의 절수')),
                ('version', models.CharField(blank=True, default='개역개정', max_length=100, null=True, verbose_name='개정종류')),
            ],
            options={
                'verbose_name': 'bible',
                'verbose_name_plural': 'bible',
                'db_table': 'bible',
            },
        ),
    ]
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):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Profile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('photo',
                 models.FileField(
                     blank=True,
                     null=True,
                     upload_to=common.models.user_directory_path)),
                ('bio', models.TextField(blank=True, max_length=500,
                                         null=True)),
                ('user',
                 models.OneToOneField(
                     on_delete=django.db.models.deletion.CASCADE,
                     to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'User Profiles',
            },
        ),
    ]
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')),
            ],
        ),
    ]
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Taxonomy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('vocabulary', common.models.RequiredCharField(max_length=200, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z', 32), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])),
                ('name', common.models.RequiredCharField(max_length=200, validators=[django.core.validators.RegexValidator(re.compile('^[-a-zA-Z0-9_]+\\Z', 32), "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.", 'invalid')])),
            ],
            options={
                'verbose_name': 'vocabulary',
                'verbose_name_plural': 'taxonomies',
            },
        ),
        migrations.AlterUniqueTogether(
            name='taxonomy',
            unique_together=set([('vocabulary', 'name')]),
        ),
    ]
Beispiel #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)),
            ],
        ),
    ]
Beispiel #11
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='CustomerReviews',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=50)),
                ('profession', models.CharField(max_length=100)),
                ('image',
                 models.ImageField(
                     default='customers\\default_profile_picture.png',
                     storage=common.storage.OverwriteStorage(),
                     upload_to=common.models.custProfileImageSavePath)),
                ('review_quote', models.TextField()),
                ('dt_creation',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('dt_review',
                 models.DateField(default=django.utils.timezone.now)),
            ],
            options={
                'ordering': ['-dt_review'],
            },
        ),
    ]
Beispiel #12
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='Address',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('attention',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('address', models.TextField()),
                ('city', models.CharField(max_length=200)),
                ('state_province',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('postal_code',
                 models.CharField(blank=True, max_length=200, null=True)),
                ('country', models.CharField(max_length=2)),
            ],
            bases=(common.models.ValidateOnSaveMixin, models.Model),
        ),
        migrations.CreateModel(
            name='AddressType',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('type', models.CharField(max_length=200)),
            ],
        ),
    ]
Beispiel #13
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',
            },
        ),
    ]
Beispiel #14
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),
        ),
    ]
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')]),
        ),
    ]
Beispiel #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')),
            ],
        ),
    ]
Beispiel #17
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='TaskSimilarityScores',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('first_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')
                     ])),
                ('second_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()),
            ],
            bases=(common.models.ValidateOnSaveMixin, models.Model),
        ),
        migrations.AlterUniqueTogether(
            name='tasksimilarityscores',
            unique_together={('first_task_id', 'second_task_id')},
        ),
    ]
Beispiel #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'),
        ),
    ]
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),
        ),
    ]
Beispiel #20
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,
                    ),
                ),
            ],
        ),
    ]
Beispiel #21
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')},
        ),
    ]
Beispiel #22
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
    ]

    operations = [
        migrations.CreateModel(
            name='CustomUser',
            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')),
                ('first_name', models.CharField(blank=True, max_length=30, verbose_name='first name')),
                ('last_name', models.CharField(blank=True, max_length=30, verbose_name='last name')),
                ('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')),
                ('email', models.EmailField(max_length=254, unique=True, verbose_name='email address')),
                ('birthday', models.DateField(blank=True, null=True)),
                ('country', models.CharField(blank=True, max_length=16)),
                ('city', models.CharField(blank=True, max_length=16)),
                ('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')),
                ('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',
                'abstract': False,
                'verbose_name_plural': 'users',
            },
            managers=[
                ('objects', common.models.CustomUserManager()),
            ],
        ),
    ]
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'),
        ),
    ]
Beispiel #24
0
class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='Security',
            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)),
                ('code', models.CharField(max_length=20)),
                ('name', models.CharField(max_length=40)),
                ('short_name', models.CharField(max_length=20)),
                ('industry', models.CharField(max_length=20)),
                ('area', models.CharField(max_length=20)),
                ('created_by',
                 models.ForeignKey(
                     on_delete=models.SET(
                         common.models.UserUtils.get_recycle_user),
                     related_name='security_security_created_related',
                     related_query_name='security_securitys_created',
                     to=settings.AUTH_USER_MODEL)),
                ('exchange',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='dictionary.Exchange')),
                ('modified_by',
                 models.ForeignKey(
                     on_delete=models.SET(
                         common.models.UserUtils.get_recycle_user),
                     related_name='security_security_modified_related',
                     related_query_name='security_securitys_modified',
                     to=settings.AUTH_USER_MODEL)),
                ('owner',
                 models.ForeignKey(
                     on_delete=models.SET(
                         common.models.UserUtils.get_recycle_user),
                     related_name='security_security_owner_related',
                     related_query_name='security_securitys_owner',
                     to=settings.AUTH_USER_MODEL)),
                ('type',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='dictionary.SecurityType')),
            ],
            options={
                'verbose_name': 'security',
                'verbose_name_plural': 'securities',
                'db_table': 'security',
            },
        ),
    ]
Beispiel #25
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')),
            ],
        ),
    ]
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')),
            ],
        ),
    ]
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,
            },
        ),
    ]
Beispiel #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")],
                                     max_length=50),
                ),
                (
                    "profile_pic",
                    models.FileField(
                        blank=True,
                        max_length=1000,
                        null=True,
                        upload_to=common.models.img_url,
                    ),
                ),
            ],
            options={
                "abstract": False,
            },
            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="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="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"),
                ),
            ],
        ),
        migrations.CreateModel(
            name="Team",
            fields=[
                (
                    "id",
                    models.AutoField(
                        auto_created=True,
                        primary_key=True,
                        serialize=False,
                        verbose_name="ID",
                    ),
                ),
                ("name", models.CharField(max_length=55)),
                ("members",
                 models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('qualifications', '0002_auto_20210221_1933'),
    ]

    operations = [
        migrations.CreateModel(
            name='EducationArea',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 django_extensions.db.fields.CreationDateTimeField(
                     auto_now_add=True, verbose_name='created')),
                ('modified',
                 django_extensions.db.fields.ModificationDateTimeField(
                     auto_now=True, verbose_name='modified')),
                ('name',
                 models.CharField(max_length=512,
                                  unique=True,
                                  verbose_name='Název')),
            ],
            options={
                'verbose_name': 'Oblast VŠ vzdělávání 2',
                'verbose_name_plural': 'Oblasti VŠ vzdělávání 2',
                'ordering': ('name', ),
            },
            bases=(models.Model, common.models.GraphModel),
        ),
        migrations.CreateModel(
            name='PreparationType',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 django_extensions.db.fields.CreationDateTimeField(
                     auto_now_add=True, verbose_name='created')),
                ('modified',
                 django_extensions.db.fields.ModificationDateTimeField(
                     auto_now=True, verbose_name='modified')),
                ('name',
                 models.CharField(max_length=200,
                                  unique=True,
                                  verbose_name='Název')),
            ],
            options={
                'verbose_name': 'Typ přípravy učitelů',
                'verbose_name_plural': 'Typy příprav učitelů',
                'ordering': ('name', ),
            },
            bases=(models.Model, common.models.GraphModel),
        ),
        migrations.CreateModel(
            name='SubjectType',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('created',
                 django_extensions.db.fields.CreationDateTimeField(
                     auto_now_add=True, verbose_name='created')),
                ('modified',
                 django_extensions.db.fields.ModificationDateTimeField(
                     auto_now=True, verbose_name='modified')),
                ('name',
                 models.CharField(max_length=512,
                                  unique=True,
                                  verbose_name='Název')),
            ],
            options={
                'verbose_name': 'Typ předmětů',
                'verbose_name_plural': 'Typy předmětů',
                'ordering': ('name', ),
            },
            bases=(models.Model, common.models.GraphModel),
        ),
        migrations.RemoveField(
            model_name='educationtype',
            name='subjects_type',
        ),
        migrations.AlterField(
            model_name='educationtype',
            name='title',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='qualifications.title',
                verbose_name='Titul'),
        ),
        migrations.AddField(
            model_name='educationtype',
            name='subject_type',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='qualifications.subjecttype',
                verbose_name='Typ předmětů'),
        ),
        migrations.AlterField(
            model_name='educationtype',
            name='area',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='qualifications.educationarea',
                verbose_name='Oblast VŠ vzdělávání'),
        ),
        migrations.AlterField(
            model_name='educationtype',
            name='preparation_type',
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='qualifications.preparationtype',
                verbose_name='Typ přípravy učitelů'),
        ),
    ]
Beispiel #30
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('services', '0005_auto_20180910_1743'),
        ('search', '0006_auto_20181204_1745'),
    ]

    operations = [
        migrations.CreateModel(
            name='Task',
            fields=[
                ('id',
                 common.models.RequiredCharField(
                     max_length=200,
                     primary_key=True,
                     serialize=False,
                     validators=[
                         django.core.validators.RegexValidator(
                             re.compile('^[-a-zA-Z0-9_]+\\Z'),
                             "Enter a valid 'slug' consisting of letters, numbers, underscores or hyphens.",
                             'invalid')
                     ])),
            ],
            options={
                'abstract': False,
            },
            bases=(common.models.ValidateOnSaveMixin,
                   parler.models.TranslatableModelMixin, models.Model),
        ),
        migrations.CreateModel(
            name='TaskServiceSimilarityScore',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('similarity_score', models.FloatField()),
                ('service',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='services.Service')),
                ('task',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   to='search.Task')),
            ],
            bases=(common.models.ValidateOnSaveMixin, models.Model),
        ),
        migrations.CreateModel(
            name='TaskSimilarityScore',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('similarity_score', models.FloatField()),
                ('first_task',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='first_task',
                                   to='search.Task')),
                ('second_task',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='second_task',
                                   to='search.Task')),
            ],
            bases=(common.models.ValidateOnSaveMixin, models.Model),
        ),
        migrations.CreateModel(
            name='TaskTranslation',
            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)),
                ('master',
                 models.ForeignKey(editable=False,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='translations',
                                   to='search.Task')),
            ],
            options={
                'verbose_name': 'task Translation',
                'db_table': 'search_task_translation',
                'db_tablespace': '',
                'managed': True,
                'default_permissions': (),
            },
        ),
        migrations.AlterUniqueTogether(
            name='tasktranslation',
            unique_together={('language_code', 'master')},
        ),
        migrations.AlterUniqueTogether(
            name='tasksimilarityscore',
            unique_together={('first_task', 'second_task')},
        ),
        migrations.AlterUniqueTogether(
            name='taskservicesimilarityscore',
            unique_together={('task', 'service')},
        ),
    ]