class Migration(migrations.Migration):

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

    operations = [
        migrations.AlterModelManagers(
            name='user',
            managers=[
                ('objects', database.models.UserManager()),
            ],
        ),
        migrations.RenameField(
            model_name='user',
            old_name='birthdate',
            new_name='date_of_birth',
        ),
        migrations.RemoveField(
            model_name='user',
            name='user_name',
        ),
        migrations.AddField(
            model_name='user',
            name='date_joined',
            field=models.DateField(auto_now_add=True, default=None),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='user',
            name='is_active',
            field=models.BooleanField(default=True),
        ),
        migrations.AddField(
            model_name='user',
            name='last_login',
            field=models.DateTimeField(blank=True, null=True, verbose_name='last login'),
        ),
        migrations.AddField(
            model_name='user',
            name='password',
            field=models.CharField(default=None, max_length=128, verbose_name='password'),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name='user',
            name='username',
            field=models.CharField(default=None, max_length=30, primary_key=True, serialize=False, unique=True),
            preserve_default=False,
        ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('database', '0013_auto_20190426_2159'),
    ]

    operations = [
        migrations.AddField(
            model_name='pendingupdates',
            name='data_boolean_keys',
            field=django.contrib.postgres.fields.ArrayField(
                base_field=models.CharField(max_length=50),
                default=database.models.PendingUpdates.default_string_array,
                size=None),
        ),
        migrations.AddField(
            model_name='pendingupdates',
            name='data_boolean_values',
            field=django.contrib.postgres.fields.ArrayField(
                base_field=models.BooleanField(),
                default=database.models.PendingUpdates.default_string_array,
                size=None),
        ),
    ]
Exemplo n.º 3
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    operations = [
        migrations.CreateModel(
            name='Administrator',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
                ('nazwisko', models.CharField(max_length=100)),
                ('telefon', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Badanie',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nazwa', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Dokument',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('dokument', models.FileField(upload_to=database.models.user_dir_path)),
            ],
            options={
                'ordering': ('id',),
            },
        ),
        migrations.CreateModel(
            name='Lekarz',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=100)),
                ('surname', models.CharField(blank=True, max_length=100)),
                ('specjalizacja', models.CharField(default='BRAK', max_length=100, null=True)),
                ('nr_pwz', models.CharField(max_length=100, null=True)),
                ('telefon', models.CharField(max_length=100, null=True)),
            ],
            options={
                'ordering': ('id',),
            },
        ),
        migrations.CreateModel(
            name='Objawy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nazwa', models.CharField(max_length=250)),
            ],
            options={
                'ordering': ('id',),
            },
        ),
        migrations.CreateModel(
            name='Pacjent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=100)),
                ('surname', models.CharField(blank=True, max_length=100)),
                ('pesel', models.CharField(blank=True, max_length=100)),
                ('ulica', models.CharField(blank=True, max_length=100)),
                ('nr_ulicy', models.CharField(blank=True, max_length=20)),
                ('nr_mieszkania', models.CharField(blank=True, max_length=20)),
                ('kod_pocztowy', models.CharField(blank=True, max_length=10)),
                ('miasto', models.CharField(blank=True, max_length=100)),
                ('wojewodztwo', models.CharField(choices=[('BRAK', 'Brak'), ('DOLNOSLAKIE', 'Dolnośląskie'), ('KUJAWSKOPOMORSKIE', 'Kujawsko-pomorskie'), ('LUBELSKIE', 'Lubelskie'), ('LUBUSKIE', 'Lubuskie'), ('LODZKIE', 'Łódzkie'), ('MALOPOLSKIE', 'Małopolskie'), ('MAZOWIECKIE', 'Mazowieckie'), ('OPOLSKIE', 'Opolskie'), ('PODKARPACKIE', 'Podkarpackie'), ('PODLASKIE', 'Podlaskie'), ('POMORSKIE', 'Pomorskie'), ('SLASKIE', 'Śląskie'), ('SWIETOKRZYSKIE', 'Świętokrzyskie'), ('WARMINSKOMAZURSKIE', 'Warmińsko-mazurskie'), ('WIELKOPOLSKIE', 'Wielkopolskie'), ('ZACHODNIOPOMORSKIE', 'Zachodniopomorskie')], default='BRAK', max_length=30)),
                ('telefon', models.CharField(blank=True, max_length=100)),
                ('dokumenty', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='database.Dokument')),
            ],
            options={
                'ordering': ('id',),
            },
        ),
        migrations.CreateModel(
            name='Przychodnia',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nazwa', models.CharField(blank=True, max_length=100)),
                ('ulica', models.CharField(blank=True, max_length=100)),
                ('nr_ulicy', models.CharField(blank=True, max_length=100)),
                ('nr_mieszkania', models.CharField(blank=True, max_length=100)),
                ('kod_pocztowy', models.CharField(blank=True, max_length=100)),
                ('miasto', models.CharField(blank=True, max_length=100)),
                ('wojewodztwo', models.CharField(choices=[('BRAK', 'Brak'), ('DOLNOSLAKIE', 'Dolnośląskie'), ('KUJAWSKOPOMORSKIE', 'Kujawsko-pomorskie'), ('LUBELSKIE', 'Lubelskie'), ('LUBUSKIE', 'Lubuskie'), ('LODZKIE', 'Łódzkie'), ('MALOPOLSKIE', 'Małopolskie'), ('MAZOWIECKIE', 'Mazowieckie'), ('OPOLSKIE', 'Opolskie'), ('PODKARPACKIE', 'Podkarpackie'), ('PODLASKIE', 'Podlaskie'), ('POMORSKIE', 'Pomorskie'), ('SLASKIE', 'Śląskie'), ('SWIETOKRZYSKIE', 'Świętokrzyskie'), ('WARMINSKOMAZURSKIE', 'Warmińsko-mazurskie'), ('WIELKOPOLSKIE', 'Wielkopolskie'), ('ZACHODNIOPOMORSKIE', 'Zachodniopomorskie')], default='BRAK', max_length=30)),
                ('email', models.CharField(blank=True, max_length=100)),
                ('telefon', models.CharField(blank=True, max_length=100)),
                ('lekarze', models.ManyToManyField(to='database.Lekarz')),
            ],
            options={
                'ordering': ('id',),
            },
        ),
        migrations.CreateModel(
            name='Wizyta',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('data_wizyty', models.DateTimeField()),
                ('uwagi', models.CharField(blank=True, max_length=500)),
                ('badania', models.ManyToManyField(blank=True, to='database.Badanie')),
                ('dokumenty', models.ManyToManyField(blank=True, to='database.Dokument')),
                ('fk_id_lekarz', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='database.Lekarz')),
                ('fk_id_pacjent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='database.Pacjent')),
                ('fk_id_przychodnia', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='database.Przychodnia')),
                ('objawy', models.ManyToManyField(blank=True, to='database.Objawy')),
            ],
            options={
                'ordering': ('id',),
            },
        ),
        migrations.CreateModel(
            name='JednostkaChorobowa',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('nazwa', models.CharField(blank=True, max_length=200)),
                ('opis', models.CharField(blank=True, max_length=500)),
                ('nr_icd', models.CharField(blank=True, max_length=100)),
                ('objawy', models.ManyToManyField(to='database.Objawy')),
            ],
            options={
                'ordering': ('id',),
            },
        ),
        migrations.CreateModel(
            name='DaneStatystyczne',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('wojewodztwo', models.CharField(choices=[('BRAK', 'Brak'), ('DOLNOSLAKIE', 'Dolnośląskie'), ('KUJAWSKOPOMORSKIE', 'Kujawsko-pomorskie'), ('LUBELSKIE', 'Lubelskie'), ('LUBUSKIE', 'Lubuskie'), ('LODZKIE', 'Łódzkie'), ('MALOPOLSKIE', 'Małopolskie'), ('MAZOWIECKIE', 'Mazowieckie'), ('OPOLSKIE', 'Opolskie'), ('PODKARPACKIE', 'Podkarpackie'), ('PODLASKIE', 'Podlaskie'), ('POMORSKIE', 'Pomorskie'), ('SLASKIE', 'Śląskie'), ('SWIETOKRZYSKIE', 'Świętokrzyskie'), ('WARMINSKOMAZURSKIE', 'Warmińsko-mazurskie'), ('WIELKOPOLSKIE', 'Wielkopolskie'), ('ZACHODNIOPOMORSKIE', 'Zachodniopomorskie')], default='BRAK', max_length=100)),
                ('liczba_zachorowan', models.BigIntegerField()),
                ('choroba', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='database.JednostkaChorobowa')),
            ],
            options={
                'ordering': ('id',),
            },
        ),
        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=150, 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')),
                ('username', models.CharField(max_length=30, unique=True)),
                ('email', models.EmailField(max_length=200, unique=True)),
                ('fk_id_admin', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='database.Administrator')),
                ('fk_id_lekarz', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='database.Lekarz')),
                ('fk_id_pacjent', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='database.Pacjent')),
                ('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={
                'ordering': ('id',),
            },
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.AddConstraint(
            model_name='wizyta',
            constraint=models.UniqueConstraint(fields=('data_wizyty', 'fk_id_lekarz', 'fk_id_pacjent'), name='Unikatowosc wizyty'),
        ),
    ]
Exemplo n.º 4
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0008_alter_user_username_max_length'),
        ('Economy', '0001_initial'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Bike',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('number', models.PositiveIntegerField(verbose_name='Nummer')),
                ('bikeKeyNo', models.CharField(blank=True, max_length=15, verbose_name='Cykelnyckel')),
                ('rentOutCount', models.IntegerField(default=0, verbose_name='antal uthyrningar')),
                ('wheelsize', models.CharField(choices=[('large', '28"'), ('medium', '26"'), ('small', '22"')], max_length=10, verbose_name='Däckdiameter')),
                ('attribute', models.CharField(choices=[('adult', 'vuxen'), ('young', 'ungdom'), ('child', 'barn'), ('smallChild', 'småbarn')], max_length=10, verbose_name='vuxen/barn')),
                ('extra', models.CharField(blank=True, choices=[('child_seat', 'barnsadel'), ('bike_carriage', 'cykelkärra')], max_length=15, verbose_name='Knuten till tillbehör')),
            ],
            options={
                'ordering': ['-attribute', 'number'],
                'verbose_name': 'cykel',
                'verbose_name_plural': 'cyklar',
            },
        ),
        migrations.CreateModel(
            name='BikeAvailable',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('available_date', models.DateField()),
                ('available', models.BooleanField(default=True)),
                ('bike', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.PROTECT, related_name='availability', to='database.Bike')),
            ],
            options={
                'ordering': ['available_date', 'bike', 'available'],
                'verbose_name': 'tillgänglighet cykel',
                'verbose_name_plural': 'tillgänglighet cyklar',
            },
        ),
        migrations.CreateModel(
            name='BikeExtra',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(choices=[('child_seat', 'barnsadel'), ('bike_carriage', 'cykelkärra')], max_length=10, verbose_name='cykeltillbehör')),
                ('number', models.PositiveIntegerField(default=None, verbose_name='Nummer')),
                ('attached_to', models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='bikeextra', to='database.Bike', verbose_name='knuten till cykel')),
            ],
        ),
        migrations.CreateModel(
            name='BikeExtraBooking',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('from_date', models.DateTimeField()),
                ('to_date', models.DurationField(choices=[(datetime.timedelta(1), '1 Dag'), (datetime.timedelta(2), '2 Dagar'), (datetime.timedelta(3), '3 Dagar'), (datetime.timedelta(4), '4 Dagar'), (datetime.timedelta(5), '5 Dagar'), (datetime.timedelta(6), '6 Dagar'), (datetime.timedelta(7), '7 Dagar')])),
                ('full_day', models.BooleanField(default=True)),
            ],
        ),
        migrations.CreateModel(
            name='BikesBooking',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('from_date', models.DateTimeField()),
                ('to_date', models.DateTimeField()),
                ('full_days', models.BooleanField(default=True)),
                ('subtotal', models.DecimalField(decimal_places=2, max_digits=8)),
                ('bike', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='bike', to='database.Bike')),
            ],
            options={
                'verbose_name': 'cykelbokning',
                'verbose_name_plural': 'cykelbokningar',
            },
        ),
        migrations.CreateModel(
            name='Booking',
            fields=[
                ('booking', models.PositiveIntegerField(default=database.models.calc_booking_no, primary_key=True, serialize=False, verbose_name='boknings id')),
                ('numberOfGuests', models.IntegerField(default=2, verbose_name='antal gäster')),
                ('special_requests', models.TextField(blank=True, max_length=255, null=True, verbose_name='övrigt')),
                ('preliminary', models.BooleanField(default=False, verbose_name='preliminär')),
                ('longest_prel', models.DateTimeField(blank=True, null=True, validators=[database.validators.validate_preliminary], verbose_name='längsta preliminärbokning')),
                ('start_date', models.DateField(null=True, verbose_name='datum för avresa')),
                ('end_date', models.DateField(null=True, verbose_name='datum för hemresa')),
                ('discount_code', models.CharField(blank=True, max_length=15, null=True, validators=[database.models.validate_discount_code], verbose_name='rabattkod')),
                ('checked_in', models.BooleanField(default=False, verbose_name='incheckad (J/N)')),
                ('checked_out', models.BooleanField(default=False, verbose_name='utcheckad(J/N)')),
                ('total', models.DecimalField(decimal_places=2, max_digits=8)),
                ('payed', models.BooleanField(default=False, verbose_name='betald')),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
            ],
            options={
                'ordering': ['-created_at', 'checked_in', 'start_date'],
                'verbose_name': 'Bokning',
                'verbose_name_plural': 'bokningar',
            },
        ),
        migrations.CreateModel(
            name='Damages',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('discoveredDate', models.DateField(default=datetime.date.today, verbose_name='Skada upptäckt')),
                ('repairedDate', models.DateField(blank=True, default=datetime.date.today, verbose_name='Skada reparerad')),
                ('damageType', models.TextField(max_length=200, verbose_name='beskrivning av skada')),
                ('repaired', models.BooleanField(default=False, verbose_name='lagad (J/N)')),
                ('bike_id', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='damages', to='database.Bike', verbose_name='Skada på cykel')),
                ('discoveredBy', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='discovered_by', to='Economy.Employee', verbose_name='upptäckt av')),
                ('repairedBy', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='repaired_by', to='Economy.Employee', verbose_name='lagad av')),
            ],
            options={
                'ordering': ['repaired', 'discoveredDate'],
                'verbose_name': 'skada',
                'verbose_name_plural': 'skador',
            },
        ),
        migrations.CreateModel(
            name='Discount_codes',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(max_length=15, verbose_name='kod')),
                ('value', models.DecimalField(decimal_places=2, max_digits=8)),
                ('type', models.CharField(choices=[('amount', 'Fast summa'), ('percentage', 'Procent'), ('offer', 'Erbjudande'), ('gift', 'Presentkort')], max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Facility',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=30, verbose_name='boendeanläggning')),
                ('organisation_number', models.CharField(blank=True, max_length=12)),
                ('telephone', models.CharField(blank=True, max_length=15, verbose_name='telefon')),
                ('email', models.EmailField(max_length=254, verbose_name='E-postadress')),
                ('website', models.URLField(blank=True, verbose_name='hemsida')),
                ('adress', models.CharField(blank=True, max_length=25, verbose_name='gatuadress')),
                ('postCode', models.CharField(blank=True, max_length=8, verbose_name='postkod')),
                ('location', models.CharField(blank=True, max_length=25, verbose_name='ort')),
                ('slug', models.SlugField(blank=True, default='')),
            ],
            options={
                'verbose_name': 'boendeanläggning',
                'verbose_name_plural': 'boendeanläggningar',
            },
        ),
        migrations.CreateModel(
            name='Lunch',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('slug', models.SlugField(default='')),
                ('type', models.CharField(choices=[('vegetarian', 'vegetarisk'), ('meat', 'kallskuret'), ('fish', 'Vätternröding')], default='vegetarian', max_length=15, verbose_name='lunchalternativ')),
                ('price', models.PositiveIntegerField(default=95, verbose_name='pris')),
            ],
            options={
                'verbose_name': 'lunch',
                'verbose_name_plural': 'luncher',
            },
        ),
        migrations.CreateModel(
            name='LunchBooking',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('quantity', models.PositiveIntegerField()),
                ('day', models.DateField()),
                ('subtotal', models.DecimalField(decimal_places=2, max_digits=8)),
                ('booking', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='booked_lunches', to='database.Booking')),
                ('type', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='database.Lunch')),
            ],
            options={
                'verbose_name': 'lunchbokning',
                'verbose_name_plural': 'lunchbokningar',
            },
        ),
        migrations.CreateModel(
            name='PackageBooking',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
            ],
        ),
        migrations.CreateModel(
            name='Rooms',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=25, verbose_name='namn')),
                ('number', models.PositiveIntegerField(blank=True)),
                ('describtion', models.TextField(blank=True, max_length=255, verbose_name='Beskrivning')),
                ('standard', models.CharField(choices=[('hotel', 'Hotell'), ('hote_budget', 'Hotell budget'), ('hostel', 'Vandrarhem')], max_length=20, verbose_name='standard')),
                ('max_guests', models.PositiveIntegerField(default=4, verbose_name='Max antal gäster')),
                ('price', models.DecimalField(decimal_places=2, default=0, help_text='Pris för rum exkl. moms', max_digits=7, verbose_name='pris exkl. moms')),
                ('owned_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='rooms', to='database.Facility', verbose_name='anläggning')),
            ],
            options={
                'ordering': ['owned_by'],
                'verbose_name': 'rum',
                'verbose_name_plural': 'rum',
            },
        ),
        migrations.CreateModel(
            name='RoomsAvailable',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('available_date', models.DateField()),
                ('available', models.BooleanField(default=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='RoomsBooking',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('numberOfGuests', models.PositiveIntegerField(verbose_name='antal gäster')),
                ('from_date', models.DateField()),
                ('to_date', models.DateField()),
                ('subtotal', models.DecimalField(decimal_places=2, max_digits=8)),
                ('booking', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='booked_rooms', to='database.Booking')),
                ('room', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='database.Rooms')),
            ],
            options={
                'verbose_name': 'rumsbokning',
                'verbose_name_plural': 'rumsbokningar',
            },
        ),
        migrations.CreateModel(
            name='Utilities',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('describtion', models.TextField()),
                ('number', models.PositiveIntegerField()),
                ('brand', models.CharField(choices=[('LB', 'LunchBots'), ('CC', 'Clean Canteen')], max_length=5)),
            ],
            options={
                'verbose_name': 'tillbehör',
            },
        ),
        migrations.CreateModel(
            name='GuestUser',
            fields=[
            ],
            options={
                'proxy': True,
            },
            bases=('auth.user',),
            managers=[
                ('objects', django.contrib.auth.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='Guest',
            fields=[
                ('user_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to=settings.AUTH_USER_MODEL)),
                ('newsletter', models.BooleanField(default=True)),
                ('phone_number', models.CharField(blank=True, max_length=24, null=True)),
            ],
            options={
                'verbose_name': 'gäst',
                'verbose_name_plural': 'gäster',
            },
            bases=('database.guestuser', models.Model),
        ),
        migrations.AddField(
            model_name='roomsavailable',
            name='bookings',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='available_rooms', to='database.RoomsBooking'),
        ),
        migrations.AddField(
            model_name='roomsavailable',
            name='room',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, to='database.Rooms'),
        ),
        migrations.AddField(
            model_name='discount_codes',
            name='guest',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='gäst'),
        ),
        migrations.AddField(
            model_name='bikesbooking',
            name='booking',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='booked_bike', to='database.Booking'),
        ),
        migrations.AddField(
            model_name='bikeextrabooking',
            name='booking',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='Booking', to='database.Booking'),
        ),
        migrations.AddField(
            model_name='bikeextrabooking',
            name='extra',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='bike_extra', to='database.BikeExtra'),
        ),
        migrations.AddField(
            model_name='bikeavailable',
            name='bookings',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, related_name='availableBike', to='database.BikesBooking'),
        ),
        migrations.AlterUniqueTogether(
            name='bike',
            unique_together=set([('number', 'attribute')]),
        ),
        migrations.AddField(
            model_name='booking',
            name='guest',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='guest', to='database.Guest', verbose_name='gäst'),
        ),
        migrations.AlterIndexTogether(
            name='bikeavailable',
            index_together=set([('bike', 'available_date')]),
        ),
    ]
Exemplo n.º 5
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='AIC_Company',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('submission_date', models.DateTimeField(null=True)),
                ('company_name', models.CharField(max_length=100)),
                ('company_description', tinymce.models.HTMLField(blank=True)),
                ('logo', models.ImageField(blank=True, max_length=50, upload_to='./AIC_CompanyPhotos')),
                ('problem_statement_details', models.TextField(blank=True)),
                ('problem_statement_file', models.FileField(blank=True, upload_to='./Problem_Statements')),
                ('allowed', models.BooleanField(default=True, verbose_name='Display on site')),
            ],
            options={
                'db_table': 'aic_company_details',
            },
        ),
        migrations.CreateModel(
            name='AIC_Discipline',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('stream', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='AIC_Solution',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('team_name', models.CharField(max_length=100, verbose_name='Team Name* (Create any single word teamname.)   ')),
                ('project_name', models.CharField(max_length=100, verbose_name='Project Name* (Preferably Problem Name.)   ')),
                ('member_one_name', models.CharField(max_length=100, verbose_name='Member One Name*   ')),
                ('member_one_email', models.EmailField(blank=True, max_length=254, verbose_name='Member One Email*   ')),
                ('member_two_name', models.CharField(blank=True, max_length=100, verbose_name='Member Two Name   ')),
                ('member_two_email', models.EmailField(blank=True, max_length=254, verbose_name='Member Two Email   ')),
                ('member_three_name', models.CharField(blank=True, max_length=100, verbose_name='Member Three Name   ')),
                ('member_three_email', models.EmailField(blank=True, max_length=254, verbose_name='Member Three Email   ')),
                ('member_four_name', models.CharField(blank=True, max_length=100, verbose_name='Member Four Name   ')),
                ('member_four_email', models.EmailField(blank=True, max_length=254, verbose_name='Member Four Email   ')),
                ('member_five_name', models.CharField(blank=True, max_length=100, verbose_name='Member Five Name   ')),
                ('member_five_email', models.EmailField(blank=True, max_length=254, verbose_name='Member Five Email   ')),
                ('description', models.TextField(blank=True, verbose_name='Briefly describe your solution (at max 500 characters.)    ')),
                ('company_discipline', models.CharField(default='Not Applicable', max_length=50, verbose_name='Choose the track under which you are applying for the company*')),
            ],
        ),
        migrations.CreateModel(
            name='Atmos',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(null=True)),
                ('topic', tinymce.models.HTMLField(max_length=50, null=True)),
                ('moreinfo', tinymce.models.HTMLField(blank=True)),
                ('photo', models.ImageField(blank=True, max_length=50, upload_to='AtmosPhotos')),
                ('discussion', models.TextField(blank=True)),
                ('allowed', models.BooleanField(default=True, verbose_name='Display on site')),
                ('venue', models.CharField(max_length=10)),
                ('campus', models.CharField(max_length=10)),
            ],
            options={
                'db_table': 'atmos',
            },
        ),
        migrations.CreateModel(
            name='Discipline',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('stream', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Document',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('team_name', models.CharField(max_length=100)),
                ('company_name', models.CharField(max_length=100)),
                ('docfile', models.FileField(upload_to=database.models.get_upload_path)),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('image', models.ImageField(upload_to='events')),
                ('allowed', models.BooleanField(default=True)),
                ('description', tinymce.models.HTMLField()),
                ('name', models.CharField(max_length=50)),
            ],
        ),
        migrations.CreateModel(
            name='Feedback',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('feedback', models.FileField(blank=True, upload_to='feedback')),
                ('slides', models.FileField(blank=True, max_length=150, upload_to='slides')),
                ('video_link', models.URLField(blank=True, max_length=50)),
                ('poster', models.ImageField(blank=True, max_length=150, upload_to='posters')),
            ],
        ),
        migrations.CreateModel(
            name='Gallery',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=50, verbose_name='Heading')),
                ('photo', models.ImageField(max_length=50, upload_to='images_gallery')),
                ('details', models.TextField(blank=True)),
                ('allowed', models.BooleanField(default=True)),
            ],
            options={
                'verbose_name_plural': 'Gallery',
            },
        ),
        migrations.CreateModel(
            name='Lecture',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date', models.DateTimeField(null=True)),
                ('topic', models.CharField(max_length=500)),
                ('moreinfo', tinymce.models.HTMLField(blank=True)),
                ('photo', models.ImageField(blank=True, max_length=50, upload_to='Speakerphotos')),
                ('discussion', models.TextField(blank=True)),
                ('allowed', models.BooleanField(default=True, verbose_name='Display on site')),
                ('venue', models.CharField(max_length=100)),
                ('campus', models.CharField(max_length=50)),
                ('discipline', models.ManyToManyField(to='database.Discipline')),
            ],
            options={
                'db_table': 'lectures',
            },
        ),
        migrations.CreateModel(
            name='LecturesDiscipline',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('lecture_id', models.CharField(max_length=50)),
                ('discipline_id', models.CharField(max_length=50)),
            ],
            options={
                'db_table': 'lec_discipline',
            },
        ),
        migrations.CreateModel(
            name='Newsletter',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=150)),
                ('newsletter', models.FileField(max_length=150, upload_to='newsletters')),
                ('allowed', models.BooleanField(default=True, verbose_name='Publish on site')),
            ],
        ),
        migrations.CreateModel(
            name='PagesContent',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=50, verbose_name='Page Name')),
                ('link', models.CharField(blank=True, max_length=50, verbose_name='Page Link')),
                ('content', tinymce.models.HTMLField(verbose_name='Put content of page here')),
            ],
            options={
                'verbose_name_plural': 'Pages Content',
            },
        ),
        migrations.CreateModel(
            name='Presenter',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_column='Name', max_length=50)),
                ('credentials', tinymce.models.HTMLField(blank=True, db_column='Credentials', help_text='Enter the current designation of the speaker, and past work experience')),
                ('profile', tinymce.models.HTMLField(db_column='Profile', help_text='Enter the qualification and other details')),
                ('email', models.EmailField(blank=True, max_length=50, verbose_name='e-mail')),
                ('address', tinymce.models.HTMLField(blank=True)),
            ],
            options={
                'db_table': 'presenters',
            },
        ),
        migrations.CreateModel(
            name='SignUp',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('first_name', models.CharField(max_length=50, verbose_name='First Name*')),
                ('last_name', models.CharField(max_length=50, verbose_name='Last Name*')),
                ('email', models.EmailField(max_length=50, verbose_name='E-mail*')),
                ('alumni', models.BooleanField(verbose_name='Are you an alumni?')),
                ('batch', models.IntegerField()),
                ('address', models.TextField(blank=True)),
                ('discipline_first', models.CharField(blank=True, default='Other', max_length=50)),
                ('discipline_dual', models.CharField(blank=True, default='Not Applicable', max_length=50)),
                ('phone', models.CharField(blank=True, default='+91', max_length=13)),
                ('biography', models.TextField(blank=True, verbose_name='Short Biography')),
                ('lect_topics', models.TextField(verbose_name='What topics would you like to give the lecture on?*')),
                ('talk_discipline', models.CharField(blank=True, default='Interdisciplinary', max_length=50, verbose_name='Select the Discipline that matches the topics you wish to deliver a talk on')),
            ],
        ),
        migrations.AddField(
            model_name='lecture',
            name='presenter',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='database.Presenter'),
        ),
        migrations.AddField(
            model_name='feedback',
            name='lecture',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='database.Lecture'),
        ),
        migrations.AddField(
            model_name='atmos',
            name='discipline',
            field=models.ManyToManyField(to='database.Discipline'),
        ),
        migrations.AddField(
            model_name='aic_company',
            name='discipline',
            field=models.ManyToManyField(to='database.AIC_Discipline'),
        ),
    ]
Exemplo n.º 6
0
class Migration(migrations.Migration):

    initial = True

    dependencies = []

    operations = [
        migrations.CreateModel(
            name='ChunkRegistry',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('deleted', models.BooleanField(default=False)),
                ('is_chunkable', models.BooleanField()),
                ('chunk_path', models.CharField(max_length=256)),
                ('chunk_hash', models.CharField(blank=True, max_length=25)),
                ('data_type',
                 models.CharField(choices=[
                     (b'accelerometer', b'accelerometer'),
                     (b'bluetooth', b'bluetooth'), (b'calls', b'calls'),
                     (b'gps', b'gps'), (b'identifiers', b'identifiers'),
                     (b'app_log', b'app_log'),
                     (b'power_state', b'power_state'),
                     (b'survey_answers', b'survey_answers'),
                     (b'survey_timings', b'survey_timings'),
                     (b'texts', b'texts'),
                     (b'audio_recordings', b'audio_recordings'),
                     (b'wifi', b'wifi'), (b'proximity', b'proximity'),
                     (b'gyro', b'gyro'), (b'magnetometer', b'magnetometer'),
                     (b'devicemotion', b'devicemotion'),
                     (b'reachability', b'reachability')
                 ],
                                  max_length=32)),
                ('time_bin', models.DateTimeField()),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DecryptionKeyError',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('deleted', models.BooleanField(default=False)),
                ('file_path', models.CharField(max_length=256)),
                ('contents', models.TextField()),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='DeviceSettings',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('deleted', models.BooleanField(default=False)),
                ('accelerometer', models.BooleanField(default=True)),
                ('gps', models.BooleanField(default=True)),
                ('calls', models.BooleanField(default=True)),
                ('texts', models.BooleanField(default=True)),
                ('wifi', models.BooleanField(default=True)),
                ('bluetooth', models.BooleanField(default=False)),
                ('power_state', models.BooleanField(default=True)),
                ('proximity', models.BooleanField(default=False)),
                ('gyro', models.BooleanField(default=False)),
                ('magnetometer', models.BooleanField(default=False)),
                ('devicemotion', models.BooleanField(default=False)),
                ('reachability', models.BooleanField(default=True)),
                ('allow_upload_over_cellular_data',
                 models.BooleanField(default=False)),
                ('accelerometer_off_duration_seconds',
                 models.PositiveIntegerField(default=10)),
                ('accelerometer_on_duration_seconds',
                 models.PositiveIntegerField(default=10)),
                ('bluetooth_on_duration_seconds',
                 models.PositiveIntegerField(default=60)),
                ('bluetooth_total_duration_seconds',
                 models.PositiveIntegerField(default=300)),
                ('bluetooth_global_offset_seconds',
                 models.PositiveIntegerField(default=0)),
                ('check_for_new_surveys_frequency_seconds',
                 models.PositiveIntegerField(default=21600)),
                ('create_new_data_files_frequency_seconds',
                 models.PositiveIntegerField(default=900)),
                ('gps_off_duration_seconds',
                 models.PositiveIntegerField(default=600)),
                ('gps_on_duration_seconds',
                 models.PositiveIntegerField(default=60)),
                ('seconds_before_auto_logout',
                 models.PositiveIntegerField(default=600)),
                ('upload_data_files_frequency_seconds',
                 models.PositiveIntegerField(default=3600)),
                ('voice_recording_max_time_length_seconds',
                 models.PositiveIntegerField(default=240)),
                ('wifi_log_frequency_seconds',
                 models.PositiveIntegerField(default=300)),
                ('gyro_off_duration_seconds',
                 models.PositiveIntegerField(default=600)),
                ('gyro_on_duration_seconds',
                 models.PositiveIntegerField(default=60)),
                ('magnetometer_off_duration_seconds',
                 models.PositiveIntegerField(default=600)),
                ('magnetometer_on_duration_seconds',
                 models.PositiveIntegerField(default=60)),
                ('devicemotion_off_duration_seconds',
                 models.PositiveIntegerField(default=600)),
                ('devicemotion_on_duration_seconds',
                 models.PositiveIntegerField(default=60)),
                ('about_page_text',
                 models.TextField(
                     default=
                     b"The Beiwe application runs on your phone and helps researchers collect information about your behaviors. Beiwe may ask you to fill out short surveys or to record your voice. It may collect information about your location (using phone GPS) and how much you move (using phone accelerometer). Beiwe may also monitor how much you use your phone for calling and texting and keep track of the people you communicate with. Importantly, Beiwe never records the names or phone numbers of anyone you communicate with. While it can tell if you call the same person more than once, it does not know who that person is. Beiwe also does not record the content of your text messages or phone calls. Beiwe may keep track of the different Wi-Fi networks and Bluetooth devices around your phone, but the names of those networks are replaced with random codes.\n\nAlthough Beiwe collects large amounts of data, the data is processed to protect your privacy. This means that it does not know your name, your phone number, or anything else that could identify you. Beiwe only knows you by an identification number. Because Beiwe does not know who you are, it cannot communicate with your clinician if you are ill or in danger. Researchers will not review the data Beiwe collects until the end of the study. To make it easier for you to connect with your clinician, the 'Call my Clinician' button appears at the bottom of every page.\n\nBeiwe was conceived and designed by Dr. Jukka-Pekka 'JP' Onnela at the Harvard T.H. Chan School of Public Health. Development of the Beiwe smartphone application and data analysis software is funded by NIH grant 1DP2MH103909-01 to Dr. Onnela. The smartphone application was built by Zagaran, Inc., in Cambridge, Massachusetts."
                 )),
                ('call_clinician_button_text',
                 models.TextField(default='Call My Clinician')),
                ('consent_form_text',
                 models.TextField(
                     default=
                     b'I have read and understood the information about the study and all of my questions about the study have been answered by the study researchers.'
                 )),
                ('survey_submit_success_toast_text',
                 models.TextField(
                     default=
                     b"Thank you for completing the survey. A clinician will not see your answers immediately, so if you need help or are thinking about harming yourself, please contact your clinician. You can also press the 'Call My Clinician' button."
                 )),
                ('consent_sections',
                 database.models.JSONTextField(
                     default=
                     b'{"study_tasks": {"text": "", "more": ""}, "data_use": {"text": "", "more": ""}, "withdrawing": {"text": "", "more": ""}, "privacy": {"text": "", "more": ""}, "study_survey": {"text": "", "more": ""}, "welcome": {"text": "", "more": ""}, "data_gathering": {"text": "", "more": ""}, "time_commitment": {"text": "", "more": ""}}'
                 )),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='EncryptionErrorMetadata',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('deleted', models.BooleanField(default=False)),
                ('file_name', models.CharField(max_length=256)),
                ('total_lines', models.PositiveIntegerField()),
                ('number_errors', models.PositiveIntegerField()),
                ('errors_lines', database.models.JSONTextField()),
                ('error_types', database.models.JSONTextField()),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='FileProcessLock',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('deleted', models.BooleanField(default=False)),
                ('lock_time', models.DateTimeField(null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='FileToProcess',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('deleted', models.BooleanField(default=False)),
                ('s3_file_path', models.CharField(max_length=256)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='LineEncryptionError',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('deleted', models.BooleanField(default=False)),
                ('type',
                 models.CharField(choices=[
                     (b'AES_KEY_BAD_LENGTH', b'AES_KEY_BAD_LENGTH'),
                     (b'EMPTY_KEY', b'EMPTY_KEY'),
                     (b'INVALID_LENGTH', b'INVALID_LENGTH'),
                     (b'IV_BAD_LENGTH', b'IV_BAD_LENGTH'),
                     (b'IV_MISSING', b'IV_MISSING'),
                     (b'LINE_EMPTY', b'LINE_EMPTY'),
                     (b'LINE_EMPTY', b'LINE_EMPTY'),
                     (b'MP4_PADDING', b'MP4_PADDING'),
                     (b'MALFORMED_CONFIG', b'MALFORMED_CONFIG'),
                     (b'PADDING_ERROR', b'PADDING_ERROR')
                 ],
                                  max_length=32)),
                ('line', models.TextField(blank=True)),
                ('base64_decryption_key', models.CharField(max_length=256)),
                ('prev_line', models.TextField(blank=True)),
                ('next_line', models.TextField(blank=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Participant',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('deleted', models.BooleanField(default=False)),
                ('password',
                 models.CharField(help_text="A hash of the user's password",
                                  max_length=44,
                                  validators=[
                                      django.core.validators.RegexValidator(
                                          b'^[0-9a-zA-Z_\\-]+={0,2}$')
                                  ])),
                ('salt',
                 models.CharField(max_length=24,
                                  validators=[
                                      django.core.validators.RegexValidator(
                                          b'^[0-9a-zA-Z_\\-]+={0,2}$')
                                  ])),
                ('patient_id',
                 models.CharField(
                     help_text=
                     'Eight-character unique ID with characters chosen from 1-9 and a-z',
                     max_length=8,
                     unique=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             b'^[1-9a-z]+$',
                             message=
                             b'This field can only contain characters 1-9 and a-z.'
                         )
                     ])),
                ('device_id',
                 models.CharField(
                     blank=True,
                     help_text=
                     'The ID of the device that the participant is using for the study, if any.',
                     max_length=256)),
                ('os_type',
                 models.CharField(
                     blank=True,
                     choices=[('IOS', 'IOS'), ('ANDROID', 'ANDROID'),
                              ('', '')],
                     help_text=
                     'The type of device the participant is using, if any.',
                     max_length=16)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Researcher',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('deleted', models.BooleanField(default=False)),
                ('password',
                 models.CharField(help_text="A hash of the user's password",
                                  max_length=44,
                                  validators=[
                                      django.core.validators.RegexValidator(
                                          b'^[0-9a-zA-Z_\\-]+={0,2}$')
                                  ])),
                ('salt',
                 models.CharField(max_length=24,
                                  validators=[
                                      django.core.validators.RegexValidator(
                                          b'^[0-9a-zA-Z_\\-]+={0,2}$')
                                  ])),
                ('username',
                 models.CharField(
                     help_text='User-chosen username, stored in plain text',
                     max_length=32,
                     unique=True)),
                ('admin',
                 models.BooleanField(
                     default=False,
                     help_text='Whether the researcher is also an admin')),
                ('access_key_id',
                 models.CharField(blank=True,
                                  max_length=64,
                                  null=True,
                                  unique=True,
                                  validators=[
                                      django.core.validators.RegexValidator(
                                          b'^[0-9a-zA-Z+/]+={0,2}$')
                                  ])),
                ('access_key_secret',
                 models.CharField(blank=True,
                                  max_length=44,
                                  validators=[
                                      django.core.validators.RegexValidator(
                                          b'^[0-9a-zA-Z_\\-]+={0,2}$')
                                  ])),
                ('access_key_secret_salt',
                 models.CharField(blank=True,
                                  max_length=24,
                                  validators=[
                                      django.core.validators.RegexValidator(
                                          b'^[0-9a-zA-Z_\\-]+={0,2}$')
                                  ])),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Study',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('deleted', models.BooleanField(default=False)),
                ('name',
                 models.TextField(
                     help_text='Name of the study; can be of any length',
                     unique=True)),
                ('encryption_key',
                 models.CharField(
                     help_text='Key used for encrypting the study data',
                     max_length=32,
                     validators=[database.validators.LengthValidator(32)])),
                ('object_id',
                 models.CharField(
                     help_text='ID used for naming S3 files',
                     max_length=24,
                     unique=True,
                     validators=[database.validators.LengthValidator(24)])),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Survey',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('deleted', models.BooleanField(default=False)),
                ('content',
                 database.models.JSONTextField(
                     default='[]',
                     help_text=
                     'JSON blob containing information about the survey questions.'
                 )),
                ('survey_type',
                 models.CharField(choices=[('audio_survey', 'audio_survey'),
                                           ('tracking_survey',
                                            'tracking_survey')],
                                  help_text='What type of survey this is.',
                                  max_length=16)),
                ('settings',
                 database.models.JSONTextField(
                     default='{}',
                     help_text='JSON blob containing settings for the survey.')
                 ),
                ('timings',
                 database.models.JSONTextField(
                     default=b'[[], [], [], [], [], [], []]',
                     help_text=
                     'JSON blob containing the times at which the survey is sent.'
                 )),
                ('last_modified', models.DateTimeField(auto_now=True)),
                ('object_id',
                 models.CharField(
                     max_length=24,
                     unique=True,
                     validators=[database.validators.LengthValidator(24)])),
                ('study',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='surveys',
                                   to='database.Study')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='SurveyArchive',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('deleted', models.BooleanField(default=False)),
                ('content',
                 database.models.JSONTextField(
                     default='[]',
                     help_text=
                     'JSON blob containing information about the survey questions.'
                 )),
                ('survey_type',
                 models.CharField(choices=[('audio_survey', 'audio_survey'),
                                           ('tracking_survey',
                                            'tracking_survey')],
                                  help_text='What type of survey this is.',
                                  max_length=16)),
                ('settings',
                 database.models.JSONTextField(
                     default='{}',
                     help_text='JSON blob containing settings for the survey.')
                 ),
                ('timings',
                 database.models.JSONTextField(
                     default=b'[[], [], [], [], [], [], []]',
                     help_text=
                     'JSON blob containing the times at which the survey is sent.'
                 )),
                ('archive_start', models.DateTimeField()),
                ('archive_end',
                 models.DateTimeField(default=datetime.datetime.utcnow)),
                ('study',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='surveys_archive',
                                   to='database.Study')),
                ('survey',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='archives',
                                   to='database.Survey')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='UploadTracking',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('deleted', models.BooleanField(default=False)),
                ('file_path', models.CharField(max_length=256)),
                ('file_size', models.PositiveIntegerField()),
                ('timestamp', models.DateTimeField()),
                ('participant',
                 models.ForeignKey(on_delete=django.db.models.deletion.PROTECT,
                                   related_name='upload_trackers',
                                   to='database.Participant')),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.AddField(
            model_name='researcher',
            name='studies',
            field=models.ManyToManyField(related_name='researchers',
                                         to='database.Study'),
        ),
        migrations.AddField(
            model_name='participant',
            name='study',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                related_name='participants',
                to='database.Study'),
        ),
        migrations.AddField(
            model_name='filetoprocess',
            name='participant',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                related_name='files_to_process',
                to='database.Participant'),
        ),
        migrations.AddField(
            model_name='filetoprocess',
            name='study',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                related_name='files_to_process',
                to='database.Study'),
        ),
        migrations.AddField(
            model_name='devicesettings',
            name='study',
            field=models.OneToOneField(
                on_delete=django.db.models.deletion.PROTECT,
                related_name='device_settings',
                to='database.Study'),
        ),
        migrations.AddField(
            model_name='decryptionkeyerror',
            name='participant',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                related_name='decryption_key_errors',
                to='database.Participant'),
        ),
        migrations.AddField(
            model_name='chunkregistry',
            name='participant',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                related_name='chunk_registries',
                to='database.Participant'),
        ),
        migrations.AddField(
            model_name='chunkregistry',
            name='study',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.PROTECT,
                related_name='chunk_registries',
                to='database.Study'),
        ),
        migrations.AddField(
            model_name='chunkregistry',
            name='survey',
            field=models.ForeignKey(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                related_name='chunk_registries',
                to='database.Survey'),
        ),
    ]
Exemplo n.º 7
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    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')),
                ('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')),
                ('first_name', models.CharField(max_length=30)),
                ('last_name', models.CharField(max_length=150)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
            ],
            options={
                'verbose_name': 'user',
                'verbose_name_plural': 'users',
                'abstract': False,
            },
            managers=[
                ('objects', database.models.UserManager()),
            ],
        ),
        migrations.CreateModel(
            name='AccessCode',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('code', models.CharField(max_length=10)),
            ],
        ),
        migrations.CreateModel(
            name='Section',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('year_level', models.IntegerField()),
                ('name', models.CharField(max_length=50)),
                ('adviser',
                 models.OneToOneField(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='section',
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Subject',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Student',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('last_name', models.CharField(max_length=200)),
                ('first_name', models.CharField(max_length=200)),
                ('middle_name', models.CharField(blank=True, max_length=200)),
                ('birth_date', models.DateField()),
                ('LRN', models.IntegerField(blank=True, null=True)),
                ('sex',
                 models.CharField(choices=[('M', 'Male'), ('F', 'Female')],
                                  max_length=1)),
                ('section',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     related_name='student_list',
                     to='database.Section')),
            ],
        ),
        migrations.CreateModel(
            name='Grade',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('firstQ_mark', models.IntegerField()),
                ('secondQ_mark', models.IntegerField()),
                ('thirdQ_mark', models.IntegerField()),
                ('fourthQ_mark', models.IntegerField()),
                ('student',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='grades',
                                   to='database.Student')),
                ('subject',
                 models.ForeignKey(
                     on_delete=django.db.models.deletion.DO_NOTHING,
                     to='database.Subject')),
            ],
        ),
        migrations.AddField(
            model_name='user',
            name='access_object',
            field=models.OneToOneField(
                blank=True,
                null=True,
                on_delete=django.db.models.deletion.SET_NULL,
                to='database.AccessCode'),
        ),
        migrations.AddField(
            model_name='user',
            name='groups',
            field=models.ManyToManyField(
                blank=True,
                help_text=
                'The groups this user belongs to. A user will get all permissions granted to each of their groups.',
                related_name='user_set',
                related_query_name='user',
                to='auth.Group',
                verbose_name='groups'),
        ),
        migrations.AddField(
            model_name='user',
            name='user_permissions',
            field=models.ManyToManyField(
                blank=True,
                help_text='Specific permissions for this user.',
                related_name='user_set',
                related_query_name='user',
                to='auth.Permission',
                verbose_name='user permissions'),
        ),
    ]
Exemplo n.º 8
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Activityarea',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10000)),
            ],
        ),
        migrations.CreateModel(
            name='Certificat',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10000)),
            ],
        ),
        migrations.CreateModel(
            name='Credit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=1000, null=True)),
                ('laboratory', models.CharField(max_length=1000)),
                ('institute', models.CharField(max_length=1000)),
                ('adress', models.CharField(max_length=1000, null=True)),
                ('email', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='ElixirCommunities',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10000)),
            ],
            options={
                'verbose_name_plural': 'Elixir Communities',
            },
        ),
        migrations.CreateModel(
            name='Keyword',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10000)),
            ],
        ),
        migrations.CreateModel(
            name='People',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=1000, null=True)),
                ('email', models.CharField(max_length=1000)),
                ('link', models.CharField(max_length=1000)),
            ],
        ),
        migrations.CreateModel(
            name='Publication',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('doi', models.CharField(max_length=100)),
            ],
        ),
        migrations.CreateModel(
            name='Resource',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=1000, null=True)),
                ('description', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='ToolType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=10000)),
            ],
        ),
        migrations.CreateModel(
            name='Event',
            fields=[
                ('resource_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='database.Resource')),
                ('logo', models.URLField(blank=True, null=True)),
                ('event_type', models.CharField(blank=True, max_length=1000, null=True)),
                ('start_date', models.DateTimeField(blank=True, null=True)),
                ('end_date', models.DateTimeField(blank=True, null=True)),
                ('location', models.CharField(blank=True, max_length=1000, null=True)),
                ('link', models.CharField(blank=True, max_length=1000, null=True)),
                ('organizer', models.CharField(blank=True, max_length=1000, null=True)),
                ('sponsors', models.CharField(blank=True, max_length=1000, null=True)),
            ],
            bases=('database.resource',),
        ),
        migrations.CreateModel(
            name='Platform',
            fields=[
                ('resource_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='database.Resource')),
                ('logo', models.URLField(blank=True, null=True)),
                ('address', models.CharField(blank=True, max_length=1000, null=True)),
                ('affiliation', models.CharField(blank=True, max_length=1000, null=True)),
                ('website', models.CharField(blank=True, max_length=1000, null=True)),
                ('structure', models.CharField(blank=True, max_length=1000, null=True)),
                ('infrastructure_type', models.TextField(blank=True, choices=[('PROPRIETAIRE', 'Propriétaire'), ('HEBERGEE', 'Hébergée')], max_length=13, null=True)),
                ('useful_storage_capacity', models.CharField(blank=True, max_length=1000, null=True)),
                ('cpu_number', models.IntegerField(blank=True, null=True)),
                ('data_collection', models.CharField(blank=True, max_length=1000, null=True)),
                ('cpu_hour_per_year', models.CharField(blank=True, max_length=1000, null=True)),
                ('informatics_tools', models.CharField(blank=True, max_length=1000, null=True)),
                ('users_number', models.IntegerField(blank=True, null=True)),
                ('support_condition', models.TextField(blank=True, null=True)),
                ('server_description', models.TextField(blank=True, null=True)),
                ('title_project_support', models.CharField(blank=True, max_length=1000, null=True)),
                ('description_projects_help', models.TextField(blank=True, null=True)),
                ('accompanied_project', models.TextField(blank=True, null=True)),
                ('hosted_projects', models.TextField(blank=True, null=True)),
                ('publications', models.CharField(blank=True, max_length=1000, null=True)),
                ('activity_area', models.ManyToManyField(blank=True, to='database.Activityarea')),
                ('certificate', models.ManyToManyField(blank=True, to='database.Certificat')),
                ('keywords', models.ManyToManyField(blank=True, to='database.Keyword')),
                ('scientific_leader', models.ManyToManyField(blank=True, related_name='scientific_leader_of', to='database.People')),
                ('team', models.ManyToManyField(blank=True, related_name='member_of', to='database.People')),
                ('technical_leader', models.ManyToManyField(blank=True, related_name='technical_leader_of', to='database.People')),
            ],
            bases=('database.resource',),
        ),
        migrations.CreateModel(
            name='Training_material',
            fields=[
                ('resource_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='database.Resource')),
                ('file_name', models.CharField(blank=True, max_length=1000, null=True)),
                ('licence', models.CharField(blank=True, max_length=1000, null=True)),
                ('event_link', models.CharField(blank=True, max_length=1000, null=True)),
                ('publication_date', models.DateTimeField(blank=True)),
                ('target_audience', models.CharField(blank=True, max_length=1000, null=True)),
                ('url_file', models.URLField(blank=True, null=True)),
                ('keywords', models.ManyToManyField(blank=True, to='database.Keyword')),
            ],
            bases=('database.resource',),
        ),
        migrations.CreateModel(
            name='Tool',
            fields=[
                ('resource_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='database.Resource')),
                ('citations', models.CharField(blank=True, max_length=1000, null=True)),
                ('logo', models.URLField(blank=True, null=True)),
                ('access_condition', models.TextField(blank=True, null=True)),
                ('contact_support', models.CharField(blank=True, max_length=1000, null=True)),
                ('input_outils', models.CharField(blank=True, max_length=1000, null=True)),
                ('tool_license', models.CharField(blank=True, max_length=1000, null=True)),
                ('link', models.CharField(blank=True, max_length=1000, null=True)),
                ('prerequisites', models.TextField(blank=True, null=True)),
                ('operating_system', models.CharField(blank=True, max_length=1000, null=True)),
                ('downloads', models.IntegerField(blank=True, null=True)),
                ('software_version', models.IntegerField(blank=True, null=True)),
                ('annual_visits', models.IntegerField(blank=True, null=True)),
                ('unique_visits', models.IntegerField(blank=True, null=True)),
                ('keywords', models.ManyToManyField(blank=True, to='database.Keyword')),
                ('platform', models.ManyToManyField(blank=True, to='database.Platform')),
                ('tool_type', models.ManyToManyField(blank=True, to='database.ToolType')),
            ],
            bases=('database.resource',),
        ),
        migrations.CreateModel(
            name='Service',
            fields=[
                ('resource_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='database.Resource')),
                ('scope', models.TextField()),
                ('is_tool', models.BooleanField(default=False)),
                ('is_data', models.BooleanField(default=False)),
                ('is_training', models.BooleanField(default=False)),
                ('is_compute', models.BooleanField(default=False)),
                ('is_interoperability', models.BooleanField(default=False)),
                ('communities', models.TextField()),
                ('year_created', models.IntegerField(null=True, validators=[django.core.validators.MinValueValidator(1984), database.models.max_value_current_year], verbose_name='year')),
                ('maturity', models.TextField(choices=[('EMERGING', 'Emerging'), ('MATURE', 'Mature'), ('LEGACY', 'Legacy')], max_length=8)),
                ('access', models.TextField()),
                ('quality', models.TextField()),
                ('usage', models.TextField()),
                ('publication_citations_nb', models.IntegerField()),
                ('publication_coauthor_nb', models.IntegerField()),
                ('sab_user_comittee', models.TextField()),
                ('term_of_use', models.TextField()),
                ('ethics_policy', models.TextField()),
                ('funding', models.TextField()),
                ('motivation_catalog', models.BooleanField(default=False)),
                ('motivation_sdp', models.BooleanField(default=False)),
                ('motivation_support_ifb_it', models.BooleanField(default=False)),
                ('motivation_support_ifb_curation', models.BooleanField(default=False)),
                ('motivation_support_ifb_core_resource', models.BooleanField(default=False)),
                ('biotoolsID', models.CharField(blank=True, max_length=1000, null=True)),
                ('credit', models.ManyToManyField(to='database.Credit')),
                ('elixir_communities', models.ManyToManyField(blank=True, to='database.ElixirCommunities')),
                ('key_pub', models.ManyToManyField(blank=True, to='database.Publication')),
                ('toolType', models.ManyToManyField(to='database.ToolType')),
            ],
            bases=('database.resource',),
        ),
        migrations.CreateModel(
            name='Formation',
            fields=[
                ('resource_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='database.Resource')),
                ('logo', models.URLField(blank=True, null=True)),
                ('formation_type', models.CharField(blank=True, max_length=1000, null=True)),
                ('start_date', models.DateTimeField(blank=True, null=True)),
                ('end_date', models.DateTimeField(blank=True, null=True)),
                ('location', models.CharField(blank=True, max_length=1000, null=True)),
                ('access_conditions', models.TextField()),
                ('link', models.CharField(blank=True, max_length=1000, null=True)),
                ('organizer', models.CharField(blank=True, max_length=1000, null=True)),
                ('sponsors', models.CharField(blank=True, max_length=1000, null=True)),
                ('number_people_trained', models.IntegerField(blank=True, null=True)),
                ('number_of_academic_participants', models.IntegerField(blank=True, null=True)),
                ('number_of_non_academic_participants', models.IntegerField(blank=True, null=True)),
                ('training_time', models.DecimalField(blank=True, decimal_places=2, max_digits=4, null=True)),
                ('participation', models.CharField(blank=True, max_length=1000, null=True)),
                ('training_level', models.CharField(blank=True, max_length=1000, null=True)),
                ('training_operator', models.CharField(blank=True, max_length=1000, null=True)),
                ('number_of_sessions', models.IntegerField(blank=True, null=True)),
                ('recurrence', models.CharField(blank=True, max_length=1000, null=True)),
                ('satisfaction_rate', models.CharField(blank=True, max_length=1000, null=True)),
                ('keywords', models.ManyToManyField(blank=True, to='database.Keyword')),
                ('platform', models.ManyToManyField(to='database.Platform')),
            ],
            bases=('database.resource',),
        ),
        migrations.CreateModel(
            name='Database',
            fields=[
                ('resource_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='database.Resource')),
                ('logo', models.URLField(blank=True, null=True)),
                ('access_conditions', models.TextField()),
                ('citations', models.CharField(blank=True, max_length=1000, null=True)),
                ('link_data', models.CharField(blank=True, max_length=1000, null=True)),
                ('annual_visits', models.IntegerField(blank=True, null=True)),
                ('unique_visits', models.IntegerField(blank=True, null=True)),
                ('last_update', models.DateTimeField(blank=True, null=True)),
                ('increase_last_update', models.CharField(blank=True, max_length=1000, null=True)),
                ('keywords', models.ManyToManyField(blank=True, to='database.Keyword')),
                ('platform', models.ManyToManyField(to='database.Platform')),
            ],
            bases=('database.resource',),
        ),
    ]
Exemplo n.º 9
0
class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('auth', '0011_update_proxy_permissions'),
    ]

    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(
                     help_text=
                     'Required. 15 characters or fewer. Letters, numbers and @/./+/-/_ characters',
                     max_length=15,
                     unique=True,
                     validators=[
                         django.core.validators.RegexValidator(
                             re.compile('^[\\w.@+-]+$'),
                             'Enter a valid username.', 'invalid')
                     ],
                     verbose_name='username')),
                ('first_name',
                 models.CharField(max_length=30, verbose_name='first name')),
                ('last_name',
                 models.CharField(max_length=30, verbose_name='last name')),
                ('email',
                 models.EmailField(max_length=255,
                                   unique=True,
                                   verbose_name='email address')),
                ('profile_pic',
                 models.ImageField(
                     blank=True, upload_to=database.models.User.upload_path)),
                ('CPF',
                 models.CharField(max_length=16,
                                  unique=True,
                                  verbose_name='CPF')),
                ('birthdate',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='birthdate')),
                ('usertype',
                 models.IntegerField(
                     blank=True,
                     null=True,
                     validators=[django.core.validators.MaxValueValidator(5)],
                     verbose_name='usertype')),
                ('sign_in_status',
                 models.IntegerField(
                     blank=True,
                     null=True,
                     validators=[django.core.validators.MaxValueValidator(5)],
                     verbose_name='sign in status')),
                ('user_code',
                 models.IntegerField(
                     blank=True,
                     null=True,
                     validators=[
                         django.core.validators.MaxValueValidator(999999999)
                     ],
                     verbose_name='user code')),
                ('access_token',
                 models.TextField(blank=True,
                                  null=True,
                                  verbose_name='access token')),
                ('access_token_created_at',
                 models.DateTimeField(blank=True,
                                      null=True,
                                      verbose_name='access token created at')),
                ('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')),
                ('is_trusty',
                 models.BooleanField(
                     default=False,
                     help_text=
                     'Designates whether this user has confirmed his account.',
                     verbose_name='trusty')),
                ('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',
                'verbose_name_plural': 'users',
            },
        ),
        migrations.CreateModel(
            name='FAQCategory',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Location',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('latitude', models.FloatField()),
                ('longitude', models.FloatField()),
                ('latitudeDelta', models.FloatField()),
                ('longitudeDelta', models.FloatField()),
            ],
        ),
        migrations.CreateModel(
            name='Teste',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('stringArr',
                 django.contrib.postgres.fields.ArrayField(
                     base_field=models.ImageField(blank=True,
                                                  upload_to='upload_path'),
                     size=8)),
            ],
        ),
        migrations.CreateModel(
            name='SituationalDocumentPic',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('document_type', models.CharField(max_length=100)),
                ('document_pic',
                 models.ImageField(
                     blank=True,
                     upload_to=database.models.SituationalDocumentPic.
                     upload_document_path)),
                ('user_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='OfficialDocumentPic',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('document_type', models.CharField(max_length=100)),
                ('document_pic',
                 models.ImageField(blank=True,
                                   upload_to=database.models.
                                   OfficialDocumentPic.upload_document_path)),
                ('user_id',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='FAQ',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('question', models.TextField()),
                ('answer', models.TextField()),
                ('categoy',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to='database.FAQCategory')),
            ],
        ),
    ]