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

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='DBFile',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('db_file',
                 models.FileField(upload_to=database.models.db_file_name)),
                ('uploaded_at',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('author',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
Exemplo n.º 2
0
class Migration(migrations.Migration):

    dependencies = [
        ('database', '0023_problemsubmition_status'),
    ]

    operations = [
        migrations.CreateModel(
            name='ProblemSubmission',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('timestamp',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('score', models.FloatField(default=0)),
                ('status', models.CharField(default='', max_length=20)),
                ('code',
                 models.FileField(upload_to=database.models.PS_dirpath)),
                ('problem',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to='database.problem')),
                ('user',
                 models.ForeignKey(
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.DeleteModel(name='ProblemSubmition', ),
    ]
class Migration(migrations.Migration):

    dependencies = [
        ('database', '0010_auto_20171110_0018'),
    ]

    operations = [
        migrations.AlterField(
            model_name='capsule',
            name='letter',
            field=models.FileField(blank=True,
                                   upload_to=database.models._upload_path),
        ),
        migrations.AlterField(
            model_name='capsule',
            name='media',
            field=models.FileField(blank=True,
                                   upload_to=database.models._upload_path),
        ),
    ]
Exemplo n.º 4
0
class Migration(migrations.Migration):

    dependencies = [
        ('database', '0021_comments'),
    ]

    operations = [
        migrations.AlterField(
            model_name='media',
            name='file',
            field=models.FileField(upload_to=database.models._upload_path),
        ),
    ]
Exemplo n.º 5
0
class Migration(migrations.Migration):

    dependencies = [
        ('database', '0024_auto_20201213_0226'),
    ]

    operations = [
        migrations.AlterField(
            model_name='problemsubmission',
            name='code',
            field=models.FileField(null=True,
                                   upload_to=database.models.PS_dirpath),
        ),
    ]
Exemplo n.º 6
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.º 7
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.º 8
0
class Migration(migrations.Migration):

    dependencies = [
        ('database', '0014_auto_20171127_0611'),
    ]

    operations = [
        migrations.CreateModel(
            name='Letters',
            fields=[
                ('lid', models.AutoField(primary_key=True, serialize=False)),
                ('title', models.CharField(default='', max_length=255)),
                ('text', models.TextField(default='')),
            ],
        ),
        migrations.CreateModel(
            name='Media',
            fields=[
                ('title', models.CharField(default='', max_length=255)),
                ('mid', models.AutoField(primary_key=True, serialize=False)),
                ('location', models.FileField(blank=True, upload_to=database.models._upload_path)),
            ],
        ),
        migrations.AlterField(
            model_name='capsule',
            name='contributors',
            field=models.ManyToManyField(related_name='capsule_contributors', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='capsule',
            name='description',
            field=models.TextField(default=''),
        ),
        migrations.AlterField(
            model_name='capsule',
            name='letter',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='letters', to='database.Letters'),
        ),
        migrations.AlterField(
            model_name='capsule',
            name='media',
            field=models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, related_name='media', to='database.Media'),
        ),
        migrations.AlterField(
            model_name='capsule',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='capsule_owner', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='capsule',
            name='recipients',
            field=models.ManyToManyField(related_name='capsule_recipients', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='capsule',
            name='title',
            field=models.CharField(max_length=255),
        ),
        migrations.AddField(
            model_name='media',
            name='cid',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cid_of_media', to='database.Capsule'),
        ),
        migrations.AddField(
            model_name='media',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='media_owner', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='letters',
            name='cid',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='cid_of_letter', to='database.Capsule'),
        ),
        migrations.AddField(
            model_name='letters',
            name='owner',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='letter_owner', to=settings.AUTH_USER_MODEL),
        ),
    ]
Exemplo n.º 9
0
class Migration(migrations.Migration):

    dependencies = [
        ('database', '0044_problemjudgedetail_memoryused'),
    ]

    operations = [
        migrations.CreateModel(
            name='Game',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('name', models.CharField(default='', max_length=128)),
                ('detail', mdeditor.fields.MDTextField()),
                ('judgeWeight', models.IntegerField(default=0)),
                ('contest',
                 models.ForeignKey(
                     blank=True,
                     null=True,
                     on_delete=django.db.models.deletion.SET_NULL,
                     related_name='game',
                     to='database.contest')),
            ],
        ),
        migrations.CreateModel(
            name='GameBot',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('addition', models.CharField(default='', max_length=128)),
                ('code',
                 models.FileField(null=True,
                                  upload_to=database.models.GameBot_dirpath)),
                ('ai',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='bot',
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='GameRecord',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('timestamp',
                 models.DateTimeField(default=django.utils.timezone.now)),
                ('timeUsed', models.FloatField(default=0)),
            ],
        ),
        migrations.CreateModel(
            name='GameBotScore',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('score', models.FloatField(default=0)),
                ('bot',
                 models.ForeignKey(on_delete=django.db.models.deletion.CASCADE,
                                   related_name='bot',
                                   to='database.gamebot')),
            ],
        ),
        migrations.CreateModel(
            name='GameBotPlay',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('originalScore', models.FloatField(default=0)),
                ('deltaScore', models.FloatField(default=0)),
                ('bot',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='database.gamebot')),
                ('record',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='database.gamerecord')),
            ],
        ),
        migrations.CreateModel(
            name='GameAi',
            fields=[
                ('id',
                 models.AutoField(auto_created=True,
                                  primary_key=True,
                                  serialize=False,
                                  verbose_name='ID')),
                ('title', models.CharField(default='', max_length=128)),
                ('game',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   related_name='ai',
                                   to='database.game')),
                ('team',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to='database.team')),
                ('user',
                 models.ForeignKey(blank=True,
                                   null=True,
                                   on_delete=django.db.models.deletion.CASCADE,
                                   to=settings.AUTH_USER_MODEL)),
            ],
        ),
    ]
class Migration(migrations.Migration):

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

    operations = [
        migrations.RemoveField(
            model_name='capsule',
            name='comments',
        ),
        migrations.RemoveField(
            model_name='capsule',
            name='letters',
        ),
        migrations.RemoveField(
            model_name='capsule',
            name='contributors',
        ),
        migrations.AddField(
            model_name='capsule',
            name='contributors',
            field=models.ManyToManyField(related_name='contributors',
                                         to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='capsule',
            name='description',
            field=models.TextField(),
        ),
        migrations.AlterField(
            model_name='capsule',
            name='media',
            field=models.FileField(blank=True,
                                   upload_to=database.models._upload_path),
        ),
        migrations.AlterField(
            model_name='capsule',
            name='owner',
            field=models.ForeignKey(
                on_delete=django.db.models.deletion.CASCADE,
                related_name='owner',
                to=settings.AUTH_USER_MODEL),
        ),
        migrations.RemoveField(
            model_name='capsule',
            name='recipients',
        ),
        migrations.AddField(
            model_name='capsule',
            name='recipients',
            field=models.ManyToManyField(related_name='recipients',
                                         to=settings.AUTH_USER_MODEL),
        ),
        migrations.AlterField(
            model_name='capsule',
            name='title',
            field=models.TextField(),
        ),
        migrations.AlterField(
            model_name='user',
            name='location',
            field=models.TextField(),
        ),
        migrations.AlterField(
            model_name='user',
            name='photo',
            field=models.ImageField(blank=True,
                                    upload_to=database.models._upload_path),
        ),
    ]