0001_initial.py 40.3 KB
Newer Older
Florent Chehab's avatar
Florent Chehab committed
1
# Generated by Django 2.0.3 on 2018-09-02 14:42
2
3
4
5
6
7
8
9
10
11
12
13
14
15

import backend.utils.friendly_path
from django.conf import settings
import django.contrib.postgres.fields.jsonb
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
16
        ('contenttypes', '0002_remove_content_type_name'),
17
18
19
20
21
22
23
24
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='Campus',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
25
26
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
27
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
28
                ('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)),
29
30
31
32
33
34
35
36
37
38
39
                ('is_main_campus', models.BooleanField()),
                ('name', models.CharField(max_length=200, null=True)),
                ('comment', models.TextField(blank=True, null=True)),
                ('lat', models.DecimalField(decimal_places=6, max_digits=10, validators=[django.core.validators.MinValueValidator(-85.05112878), django.core.validators.MaxValueValidator(85.05112878)])),
                ('lon', models.DecimalField(decimal_places=6, max_digits=10, validators=[django.core.validators.MinValueValidator(-180), django.core.validators.MaxValueValidator(180)])),
            ],
        ),
        migrations.CreateModel(
            name='City',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
40
41
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
42
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
43
44
45
46
                ('name', models.CharField(max_length=200)),
                ('local_name', models.CharField(blank=True, max_length=200, null=True)),
                ('area', models.CharField(blank=True, max_length=200, null=True)),
            ],
47
48
49
            options={
                'abstract': False,
            },
50
51
52
53
        ),
        migrations.CreateModel(
            name='Country',
            fields=[
54
55
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
56
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
57
58
59
60
61
62
63
64
65
66
                ('name', models.CharField(max_length=200)),
                ('iso_alpha2_code', models.CharField(max_length=2, primary_key=True, serialize=False)),
                ('iso_alpha3_code', models.CharField(max_length=3, unique=True)),
                ('region_name', models.CharField(max_length=200)),
                ('region_un_code', models.CharField(max_length=3)),
                ('sub_region_name', models.CharField(blank=True, max_length=200, null=True)),
                ('sub_region_un_code', models.CharField(blank=True, max_length=3, null=True)),
                ('intermediate_region_name', models.CharField(blank=True, max_length=200, null=True)),
                ('intermediate_region_un_code', models.CharField(blank=True, max_length=3, null=True)),
            ],
67
68
69
            options={
                'abstract': False,
            },
70
71
72
73
74
        ),
        migrations.CreateModel(
            name='CountryDri',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
75
76
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
77
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
78
                ('comment', models.TextField(blank=True)),
79
                ('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)),
80
81
82
83
84
85
86
87
88
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='CountryScholarship',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
89
90
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
91
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
92
                ('comment', models.TextField(blank=True)),
93
                ('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)),
94
95
96
97
98
99
100
101
102
103
104
                ('type', models.CharField(max_length=200)),
                ('amount_min', models.DecimalField(decimal_places=2, max_digits=20, validators=[django.core.validators.MinValueValidator(0)])),
                ('amount_max', models.DecimalField(decimal_places=2, max_digits=20, validators=[django.core.validators.MinValueValidator(0)])),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Currency',
            fields=[
105
106
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
107
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
Florent Chehab's avatar
Florent Chehab committed
108
                ('code', models.CharField(max_length=3, primary_key=True, serialize=False)),
109
                ('name', models.CharField(max_length=100)),
Florent Chehab's avatar
Florent Chehab committed
110
111
                ('symbol', models.CharField(blank=True, max_length=30, null=True)),
                ('one_EUR_in_this_currency', models.DecimalField(decimal_places=6, max_digits=20, validators=[django.core.validators.MinValueValidator(0)])),
112
113
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
114
            ],
115
116
117
            options={
                'abstract': False,
            },
118
119
120
121
        ),
        migrations.CreateModel(
            name='Department',
            fields=[
122
123
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
124
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
125
126
127
                ('code', models.CharField(max_length=6, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=100)),
                ('active', models.BooleanField()),
128
129
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
130
            ],
131
132
133
134
135
136
137
138
139
140
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ForTestingModeration',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
141
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
142
143
144
145
146
147
148
149
150
151
152
153
154
155
                ('aaa', models.CharField(max_length=100)),
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='ForTestingVersioning',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
156
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
157
158
159
160
161
162
163
                ('bbb', models.CharField(max_length=100)),
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'abstract': False,
            },
164
165
166
167
168
        ),
        migrations.CreateModel(
            name='Offer',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
169
170
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
171
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
172
173
174
                ('nb_seats_offered', models.PositiveIntegerField()),
                ('nb_seats_offered_exchange', models.PositiveIntegerField(null=True)),
                ('nb_seats_offered_double_degree', models.PositiveIntegerField(null=True)),
175
176
177
178
179
180
181
182
183
184
185
186
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='PendingModeration',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('object_id', models.CharField(max_length=100)),
                ('updated_on', models.DateTimeField(null=True)),
                ('new_object', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
                ('updated_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
187
188
189
190
191
192
            ],
        ),
        migrations.CreateModel(
            name='PreviousDeparture',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
193
194
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
195
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
196
197
198
                ('Utc_departure_id', models.IntegerField()),
                ('is_anonymous', models.BooleanField()),
                ('courses', django.contrib.postgres.fields.jsonb.JSONField(null=True)),
199
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
200
            ],
201
202
203
            options={
                'abstract': False,
            },
204
205
206
207
208
        ),
        migrations.CreateModel(
            name='PreviousDepartureFeedback',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
209
210
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
211
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
212
213
                ('is_anonymous', models.BooleanField(default=True)),
                ('is_public', models.BooleanField(default=False)),
214
                ('courses_and_courses_feedback', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
215
216
217
218
219
                ('adequation_comment', models.TextField()),
                ('integration_comment', models.TextField()),
                ('adequation_grate', models.PositiveIntegerField(validators=[django.core.validators.MaxValueValidator(20)])),
                ('integration_grade', models.PositiveIntegerField(validators=[django.core.validators.MaxValueValidator(20)])),
                ('departure', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to='backend.PreviousDeparture')),
220
221
222
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
223
224
225
226
227
228
229
230
231
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='Recommendation',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
232
233
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
234
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
235
236
237
238
239
                ('is_anonymous', models.BooleanField(default=True)),
                ('is_public', models.BooleanField(default=False)),
                ('order_in_list', models.PositiveIntegerField()),
                ('comment', models.TextField(blank=True, null=True)),
                ('grade', models.PositiveIntegerField(null=True, validators=[django.core.validators.MaxValueValidator(20)])),
240
241
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
242
243
244
245
246
247
            ],
        ),
        migrations.CreateModel(
            name='RecommendationList',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
248
249
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
250
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
251
252
253
254
                ('is_anonymous', models.BooleanField(default=True)),
                ('is_public', models.BooleanField(default=False)),
                ('public', models.BooleanField()),
                ('title', models.CharField(max_length=200)),
255
256
257
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
258
259
260
261
262
            ],
        ),
        migrations.CreateModel(
            name='Semester',
            fields=[
263
264
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
265
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
266
                ('code', models.CharField(max_length=6, primary_key=True, serialize=False)),
267
268
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
269
            ],
270
271
272
            options={
                'abstract': False,
            },
273
274
275
276
277
        ),
        migrations.CreateModel(
            name='Specialty',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
278
279
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
280
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
281
282
283
284
                ('code', models.CharField(max_length=6)),
                ('name', models.CharField(max_length=100)),
                ('active', models.BooleanField()),
                ('department', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='backend.Department')),
285
286
287
288
289
290
291
292
293
294
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Tag',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
295
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
296
                ('name', models.CharField(max_length=100, unique=True)),
297
298
299
                ('config', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict)),
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
300
            ],
301
302
303
            options={
                'abstract': False,
            },
304
305
306
307
308
        ),
        migrations.CreateModel(
            name='University',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
309
310
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
311
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
312
313
314
315
316
317
318
319
320
321
322
323
324
                ('name', models.CharField(max_length=200)),
                ('acronym', models.CharField(blank=True, max_length=20, null=True)),
                ('logo', models.ImageField(default='path/to/my/default/image.jpg', max_length=250, upload_to=backend.utils.friendly_path.friendly_path('uploads/universities/logos/', 'name'))),
                ('website', models.URLField(null=True)),
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='UniversityDri',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
325
326
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
327
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
328
                ('comment', models.TextField(blank=True)),
329
                ('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)),
330
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
331
332
333
334
335
336
337
338
339
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='UniversityScholarship',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
340
341
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
342
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
343
                ('comment', models.TextField(blank=True)),
344
                ('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)),
345
346
347
348
                ('type', models.CharField(max_length=200)),
                ('amount_min', models.DecimalField(decimal_places=2, max_digits=20, validators=[django.core.validators.MinValueValidator(0)])),
                ('amount_max', models.DecimalField(decimal_places=2, max_digits=20, validators=[django.core.validators.MinValueValidator(0)])),
                ('currency', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='backend.Currency')),
349
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
350
351
352
353
354
355
356
357
358
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='UserData',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
359
360
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
361
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
362
                ('contact_info', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
363
                ('contact_info_is_public', models.BooleanField(default=False)),
364
365
                ('config', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
                ('other_data', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
366
367
368
369
370
371
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
372
            name='CampusTaggedItem',
373
            fields=[
374
375
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
376
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
Florent Chehab's avatar
Florent Chehab committed
377
                ('custom_content', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
378
379
380
381
                ('campus', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, primary_key=True, related_name='city_items', serialize=False, to='backend.Campus')),
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('tag', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='backend.Tag')),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
382
383
384
            ],
        ),
        migrations.CreateModel(
385
            name='CityTaggedItem',
386
            fields=[
387
388
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
389
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
Florent Chehab's avatar
Florent Chehab committed
390
                ('custom_content', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
391
392
393
394
                ('city', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, primary_key=True, related_name='city_items', serialize=False, to='backend.City')),
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('tag', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='backend.Tag')),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
395
396
397
            ],
        ),
        migrations.CreateModel(
398
            name='CountryTaggedItem',
399
            fields=[
400
401
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
402
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
Florent Chehab's avatar
Florent Chehab committed
403
                ('custom_content', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
404
                ('country', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, primary_key=True, related_name='country_items', serialize=False, to='backend.Country')),
405
406
407
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('tag', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='backend.Tag')),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
408
409
410
411
412
            ],
        ),
        migrations.CreateModel(
            name='UniversityInfo',
            fields=[
413
414
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
415
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
416
                ('comment', models.TextField(blank=True)),
417
                ('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)),
418
419
420
421
                ('university', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='university_info', serialize=False, to='backend.University')),
                ('cost_exchange', models.DecimalField(decimal_places=2, max_digits=20, null=True, validators=[django.core.validators.MinValueValidator(0)])),
                ('cost_double_degree', models.DecimalField(decimal_places=2, max_digits=20, null=True, validators=[django.core.validators.MinValueValidator(0)])),
                ('costs_currency', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='backend.Currency')),
422
423
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
424
425
426
427
428
429
430
431
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
            name='UniversitySemestersDates',
            fields=[
432
433
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
434
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
435
                ('comment', models.TextField(blank=True)),
436
                ('usefull_links', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=list)),
437
438
439
440
441
                ('university', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='university_semesters_dates', serialize=False, to='backend.University')),
                ('spring_begin', models.DateField(blank=True, null=True)),
                ('spring_end', models.DateField(blank=True, null=True)),
                ('autumn_begin', models.DateField(blank=True, null=True)),
                ('autumn_end', models.DateField(blank=True, null=True)),
442
443
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
444
445
446
447
448
449
            ],
            options={
                'abstract': False,
            },
        ),
        migrations.CreateModel(
450
            name='UniversityTaggedItem',
451
            fields=[
452
453
                ('moderated_on', models.DateTimeField(null=True)),
                ('updated_on', models.DateTimeField(null=True)),
Florent Chehab's avatar
Florent Chehab committed
454
                ('obj_moderation_level', models.SmallIntegerField(default=3, validators=[django.core.validators.MinValueValidator(0)])),
Florent Chehab's avatar
Florent Chehab committed
455
                ('custom_content', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
456
457
458
459
                ('university', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, primary_key=True, related_name='city_items', serialize=False, to='backend.University')),
                ('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
                ('tag', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='+', to='backend.Tag')),
                ('updated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
460
            ],
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
        ),
        migrations.AddField(
            model_name='userdata',
            name='black_list',
            field=models.ManyToManyField(blank=True, related_name='_userdata_black_list_+', to='backend.University'),
        ),
        migrations.AddField(
            model_name='userdata',
            name='moderated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='userdata',
            name='owner',
            field=models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='userdata',
            name='updated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
481
482
483
484
485
486
        ),
        migrations.AddField(
            model_name='universityscholarship',
            name='university',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='univScholarship', to='backend.University'),
        ),
487
488
489
490
491
        migrations.AddField(
            model_name='universityscholarship',
            name='updated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
492
493
494
495
496
        migrations.AddField(
            model_name='universitydri',
            name='university',
            field=models.ManyToManyField(related_name='university_dri', to='backend.University'),
        ),
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
        migrations.AddField(
            model_name='universitydri',
            name='updated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='university',
            name='moderated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='university',
            name='updated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
        migrations.AddField(
            model_name='recommendation',
            name='parent_list',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='recommendations', to='backend.RecommendationList'),
        ),
        migrations.AddField(
            model_name='recommendation',
            name='specialty',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='backend.Specialty'),
        ),
        migrations.AddField(
            model_name='recommendation',
            name='university',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='backend.University'),
        ),
        migrations.AddField(
            model_name='recommendation',
529
530
            name='updated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
        ),
        migrations.AddField(
            model_name='previousdeparture',
            name='semester',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='backend.Semester'),
        ),
        migrations.AddField(
            model_name='previousdeparture',
            name='specialty',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='backend.Specialty'),
        ),
        migrations.AddField(
            model_name='previousdeparture',
            name='university',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='backend.University'),
        ),
547
548
549
550
551
        migrations.AddField(
            model_name='previousdeparture',
            name='updated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
        migrations.AddField(
            model_name='previousdeparture',
            name='user',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='offer',
            name='semester',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='backend.Semester'),
        ),
        migrations.AddField(
            model_name='offer',
            name='specialty',
            field=models.ManyToManyField(related_name='has_seats_at_univ', to='backend.Specialty'),
        ),
        migrations.AddField(
            model_name='offer',
            name='university',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='backend.University'),
        ),
572
573
574
575
576
        migrations.AddField(
            model_name='offer',
            name='updated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
577
578
579
580
581
582
583
584
585
586
        migrations.AddField(
            model_name='countryscholarship',
            name='country',
            field=models.ManyToManyField(related_name='country_scholarhip', to='backend.Country'),
        ),
        migrations.AddField(
            model_name='countryscholarship',
            name='currency',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='backend.Currency'),
        ),
587
588
589
590
591
592
593
594
595
596
        migrations.AddField(
            model_name='countryscholarship',
            name='moderated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='countryscholarship',
            name='updated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
597
598
599
600
601
        migrations.AddField(
            model_name='countrydri',
            name='country',
            field=models.ManyToManyField(related_name='country_dri', to='backend.Country'),
        ),
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
        migrations.AddField(
            model_name='countrydri',
            name='moderated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='countrydri',
            name='updated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='country',
            name='moderated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='country',
            name='updated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
622
623
624
625
626
        migrations.AddField(
            model_name='city',
            name='country',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='backend.Country'),
        ),
627
628
629
630
631
632
633
634
635
636
        migrations.AddField(
            model_name='city',
            name='moderated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='city',
            name='updated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
637
638
639
640
641
        migrations.AddField(
            model_name='campus',
            name='city',
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='backend.City'),
        ),
642
643
644
645
646
        migrations.AddField(
            model_name='campus',
            name='moderated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
        ),
647
648
649
        migrations.AddField(
            model_name='campus',
            name='university',
650
651
652
653
654
655
            field=models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='univ_campus', to='backend.University'),
        ),
        migrations.AddField(
            model_name='campus',
            name='updated_by',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL),
656
657
658
659
660
661
662
        ),
        migrations.AlterUniqueTogether(
            name='specialty',
            unique_together={('code', 'department')},
        ),
        migrations.AlterUniqueTogether(
            name='recommendationlist',
663
            unique_together={('title', 'owner')},
664
665
666
667
668
        ),
        migrations.AlterUniqueTogether(
            name='recommendation',
            unique_together={('order_in_list', 'parent_list')},
        ),
669
670
671
672
        migrations.AlterUniqueTogether(
            name='pendingmoderation',
            unique_together={('content_type', 'object_id')},
        ),
673
674
675
676
677
678
679
680
        migrations.AlterUniqueTogether(
            name='offer',
            unique_together={('semester', 'university')},
        ),
        migrations.AlterUniqueTogether(
            name='campus',
            unique_together={('is_main_campus', 'university')},
        ),
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
        migrations.AlterUniqueTogether(
            name='universitytaggeditem',
            unique_together={('university', 'tag')},
        ),
        migrations.AlterUniqueTogether(
            name='countrytaggeditem',
            unique_together={('country', 'tag')},
        ),
        migrations.AlterUniqueTogether(
            name='citytaggeditem',
            unique_together={('city', 'tag')},
        ),
        migrations.AlterUniqueTogether(
            name='campustaggeditem',
            unique_together={('campus', 'tag')},
        ),
697
    ]