0001_initial.py 44.6 KB
Newer Older
1
# Generated by Django 2.0.3 on 2018-09-10 14:19
2

3
import backend.fields.jSONField
4
import backend.models.abstract.my_model.myModel
Florent Chehab's avatar
Florent Chehab committed
5
import backend.models.university.university
6
7
8
9
10
11
12
13
14
15
16
from django.conf import settings
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
Florent Chehab's avatar
Florent Chehab committed
17
        ('contenttypes', '0002_remove_content_type_name'),
18
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
19
20
21
22
23
24
25
    ]

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