0003_auto_20190629_1122.py 7.33 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
# Generated by Django 2.1.7 on 2019-06-29 09:22

from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [("backend_app", "0002_auto_20190626_2310")]

    operations = [
        migrations.CreateModel(
            name="Partner",
            fields=[
                ("utc_id", models.IntegerField(primary_key=True, serialize=False)),
                ("univ_name", models.CharField(max_length=80)),
                ("address1", models.CharField(max_length=100, null=True)),
                ("address2", models.CharField(max_length=100, null=True)),
                ("zipcode", models.CharField(max_length=40, null=True)),
                ("city", models.CharField(max_length=40)),
                ("country", models.CharField(max_length=50)),
                ("iso_code", models.CharField(max_length=2)),
            ],
            options={"abstract": False},
        ),
        migrations.AlterUniqueTogether(name="specialty", unique_together=set()),
        migrations.RemoveField(model_name="specialty", name="department"),
        migrations.RenameField(
            model_name="exchange", old_name="dual_degree", new_name="double_degree"
        ),
        migrations.RemoveField(model_name="course", name="course_id"),
        migrations.RemoveField(model_name="course", name="nb_credit"),
        migrations.RemoveField(model_name="exchange", name="utc_departure_id"),
        migrations.RemoveField(
            model_name="offer", name="nb_seats_offered_double_degree"
        ),
        migrations.RemoveField(model_name="offer", name="nb_seats_offered_exchange"),
        migrations.RemoveField(model_name="university", name="utc_id"),
        migrations.AddField(
            model_name="course",
            name="ects",
            field=models.DecimalField(
                decimal_places=2, default=0, max_digits=7, null=True
            ),
        ),
        migrations.AddField(
            model_name="course",
            name="utc_id",
            field=models.IntegerField(default=1, unique=True),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="exchange",
            name="utc_id",
            field=models.IntegerField(default=1, unique=True),
            preserve_default=False,
        ),
        migrations.AddField(
            model_name="exchange",
            name="utc_partner_id",
            field=models.IntegerField(null=True),
        ),
        migrations.AddField(
            model_name="offer",
            name="comment",
            field=models.TextField(max_length=500, null=True),
        ),
        migrations.AddField(
            model_name="offer",
            name="double_degree",
            field=models.BooleanField(default=False),
        ),
        migrations.AddField(
            model_name="offer",
            name="is_master_offered",
            field=models.BooleanField(default=False, null=True),
        ),
        migrations.AddField(
            model_name="offer",
            name="utc_partner_id",
            field=models.IntegerField(default=1),
            preserve_default=False,
        ),
        migrations.AlterField(
            model_name="course",
            name="code",
            field=models.CharField(max_length=10, null=True),
        ),
        migrations.AlterField(
            model_name="course",
            name="title",
            field=models.CharField(blank=True, default="", max_length=200),
        ),
        migrations.AlterField(
            model_name="exchange",
            name="semester",
            field=models.CharField(
                choices=[("a", "autumn"), ("p", "spring")],
                default="a",
                max_length=5,
                null=True,
            ),
        ),
        migrations.AlterField(
            model_name="exchange",
            name="student",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.CASCADE,
                to=settings.AUTH_USER_MODEL,
            ),
        ),
        migrations.AlterField(
            model_name="exchange",
            name="student_minor",
            field=models.CharField(max_length=47, null=True),
        ),
        migrations.AlterField(
            model_name="exchange",
            name="student_option",
            field=models.CharField(max_length=7, null=True),
        ),
        migrations.AlterField(
            model_name="exchange",
            name="university",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="backend_app.University",
            ),
        ),
        migrations.AlterField(
            model_name="exchange",
            name="year",
            field=models.PositiveIntegerField(default=2018, null=True),
        ),
        migrations.AlterField(
            model_name="exchangefeedback",
            name="university",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="backend_app.University",
            ),
        ),
        migrations.AlterField(
            model_name="offer",
            name="nb_seats_offered",
            field=models.PositiveIntegerField(null=True),
        ),
        migrations.AlterField(
            model_name="offer",
            name="semester",
            field=models.CharField(
                choices=[("a", "autumn"), ("p", "spring")],
                default="a",
                max_length=2,
                null=True,
            ),
        ),
        migrations.RemoveField(model_name="offer", name="specialties"),
        migrations.AddField(
            model_name="offer",
            name="specialties",
            field=models.CharField(max_length=4000, null=True),
        ),
        migrations.AlterField(
            model_name="offer",
            name="university",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="backend_app.University",
            ),
        ),
        migrations.AlterField(
            model_name="offer",
            name="year",
            field=models.PositiveIntegerField(default=2018, null=True),
        ),
        migrations.DeleteModel(name="Department"),
        migrations.DeleteModel(name="Specialty"),
        migrations.AddField(
            model_name="partner",
            name="university",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                related_name="corresponding_utc_partners",
                to="backend_app.University",
            ),
        ),
        migrations.AddField(
            model_name="exchange",
            name="partner",
            field=models.ForeignKey(
                null=True,
                on_delete=django.db.models.deletion.PROTECT,
                to="backend_app.Partner",
            ),
        ),
        migrations.AddField(
            model_name="offer",
            name="partner",
            field=models.ForeignKey(
                default=1,
                on_delete=django.db.models.deletion.PROTECT,
                to="backend_app.Partner",
            ),
            preserve_default=False,
        ),
    ]