Commit ca658632 authored by Florent Chehab's avatar Florent Chehab
Browse files

Clean migrations to accelerate testings

Add new unit test that make it fail
parent f5858327
......@@ -3,6 +3,8 @@
from django import template
import yaml
from os.path import join, realpath, dirname
from backend.utils import read_file, write_file
############
# Need to do this first so that Django template engine is working
......@@ -20,16 +22,6 @@ django.setup()
##########
def read_file(file):
with open(file, "r") as myfile:
return myfile.read()
def write_file(file, data):
with open(file, 'w') as the_file:
the_file.write(data)
def render_and_save(template_path, context, output_path):
t = template.Template(read_file(template_path))
c = template.Context({'data': context})
......
# Generated by Django 2.0.3 on 2018-08-22 08:13
# Generated by Django 2.0.3 on 2018-08-29 19:43
import backend.models.tools.usefullLinksField
import backend.utils.friendly_path
......@@ -14,6 +14,7 @@ class Migration(migrations.Migration):
initial = True
dependencies = [
('contenttypes', '0002_remove_content_type_name'),
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
......@@ -22,7 +23,10 @@ class Migration(migrations.Migration):
name='Campus',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=[], validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=list, validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('custom_content', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict)),
('is_main_campus', models.BooleanField()),
('name', models.CharField(max_length=200, null=True)),
('comment', models.TextField(blank=True, null=True)),
......@@ -34,15 +38,22 @@ class Migration(migrations.Migration):
name='City',
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)),
('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)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CityPhoto',
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)),
('photo', models.ImageField(default='path/to/my/default/image.jpg', max_length=250, upload_to=backend.utils.friendly_path.friendly_path('uploads/universities/photos/', 'title'))),
('title', models.CharField(max_length=200)),
('description', models.TextField(blank=True, null=True)),
......@@ -51,6 +62,8 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Country',
fields=[
('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)),
('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)),
......@@ -61,13 +74,19 @@ class Migration(migrations.Migration):
('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)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CountryDri',
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)),
('comment', models.TextField(blank=True)),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=[], validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=list, validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('custom_content', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict)),
],
options={
'abstract': False,
......@@ -77,6 +96,8 @@ class Migration(migrations.Migration):
name='CountryPhoto',
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)),
('photo', models.ImageField(default='path/to/my/default/image.jpg', max_length=250, upload_to=backend.utils.friendly_path.friendly_path('uploads/universities/photos/', 'title'))),
('title', models.CharField(max_length=200)),
('description', models.TextField(blank=True, null=True)),
......@@ -86,8 +107,11 @@ class Migration(migrations.Migration):
name='CountryScholarship',
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)),
('comment', models.TextField(blank=True)),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=[], validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=list, validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('custom_content', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict)),
('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)])),
......@@ -99,51 +123,117 @@ class Migration(migrations.Migration):
migrations.CreateModel(
name='Currency',
fields=[
('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)),
('code', models.CharField(max_length=15, primary_key=True, serialize=False)),
('name', models.CharField(max_length=100)),
('symbol', models.CharField(max_length=5)),
('one_USD_in_this_currency', models.DecimalField(decimal_places=6, max_digits=20, validators=[django.core.validators.MinValueValidator(0)])),
('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='Department',
fields=[
('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)),
('code', models.CharField(max_length=6, primary_key=True, serialize=False)),
('name', models.CharField(max_length=100)),
('active', models.BooleanField()),
('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='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)),
('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)),
('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,
},
),
migrations.CreateModel(
name='Offer',
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)),
('nb_seats_offered', models.PositiveIntegerField()),
('nb_seats_offered_exchange', models.PositiveIntegerField(null=True)),
('nb_seats_offered_double_degree', models.PositiveIntegerField(null=True)),
('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)),
],
),
migrations.CreateModel(
name='PreviousDeparture',
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)),
('Utc_departure_id', models.IntegerField()),
('is_anonymous', models.BooleanField()),
('courses', django.contrib.postgres.fields.jsonb.JSONField(null=True)),
('moderated_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='PreviousDepartureFeedback',
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)),
('is_anonymous', models.BooleanField(default=True)),
('is_public', models.BooleanField(default=False)),
('courses_and_courses_feedback', django.contrib.postgres.fields.jsonb.JSONField(null=True)),
('courses_and_courses_feedback', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
('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')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
('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)),
],
options={
'abstract': False,
......@@ -153,44 +243,80 @@ class Migration(migrations.Migration):
name='Recommendation',
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)),
('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)])),
('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)),
],
),
migrations.CreateModel(
name='RecommendationList',
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)),
('is_anonymous', models.BooleanField(default=True)),
('is_public', models.BooleanField(default=False)),
('public', models.BooleanField()),
('title', models.CharField(max_length=200)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
('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)),
],
),
migrations.CreateModel(
name='Semester',
fields=[
('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)),
('code', models.CharField(max_length=6, primary_key=True, serialize=False)),
('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='Specialty',
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)),
('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')),
('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)),
('name', models.CharField(max_length=100)),
('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)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='University',
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)),
('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'))),
......@@ -204,8 +330,12 @@ class Migration(migrations.Migration):
name='UniversityDri',
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)),
('comment', models.TextField(blank=True)),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=[], validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=list, validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('custom_content', 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)),
],
options={
'abstract': False,
......@@ -215,21 +345,28 @@ class Migration(migrations.Migration):
name='UniversityPhoto',
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)),
('photo', models.ImageField(default='path/to/my/default/image.jpg', max_length=250, upload_to=backend.utils.friendly_path.friendly_path('uploads/universities/photos/', 'title'))),
('title', models.CharField(max_length=200)),
('description', models.TextField(blank=True, null=True)),
('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='UniversityScholarship',
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)),
('comment', models.TextField(blank=True)),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=[], validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=list, validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('custom_content', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict)),
('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')),
('moderated_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='+', to=settings.AUTH_USER_MODEL)),
],
options={
'abstract': False,
......@@ -239,225 +376,73 @@ class Migration(migrations.Migration):
name='UserData',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('is_anonymous', models.BooleanField(default=True)),
('is_public', models.BooleanField(default=False)),
('contact_info', backend.models.tools.usefullLinksField.UsefullLinksField(default=[], null=True, validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)),
('contact_info', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
('contact_info_is_public', models.BooleanField(default=False)),
('config', django.contrib.postgres.fields.jsonb.JSONField(default={}, null=True)),
('other_data', django.contrib.postgres.fields.jsonb.JSONField(default={}, null=True)),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CampusAccommodation',
fields=[
('comment', models.TextField(blank=True)),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=[], validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('campus', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='campus_accomodation', serialize=False, to='backend.Campus')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CampusCultureAndStudentLife',
fields=[
('comment', models.TextField(blank=True)),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=[], validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('campus', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='campus_culture_and_sl', serialize=False, to='backend.Campus')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CampusOtherStuff',
fields=[
('comment', models.TextField(blank=True)),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=[], validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('campus', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='campus_other_stuff', serialize=False, to='backend.Campus')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CampusTransport',
fields=[
('comment', models.TextField(blank=True)),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=[], validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('campus', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='campus_transport', serialize=False, to='backend.Campus')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CityOtherStuff',
fields=[
('comment', models.TextField(blank=True)),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=[], validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('city', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='city_other_stuff', serialize=False, to='backend.City')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CityTourism',
fields=[
('comment', models.TextField(blank=True)),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=[], validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('city', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='city_tourism', serialize=False, to='backend.City')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CityTransport',
fields=[
('comment', models.TextField(blank=True)),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=[], validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('city', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='city_transport', serialize=False, to='backend.City')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CountryCulture',
fields=[
('comment', models.TextField(blank=True)),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=[], validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('country', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='country_culture', serialize=False, to='backend.Country')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CountryHealthInsurance',
fields=[
('comment', models.TextField(blank=True)),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=[], validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('country', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='country_health_insurances', serialize=False, to='backend.Country')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CountryOtherInsurance',
fields=[
('comment', models.TextField(blank=True)),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=[], validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('country', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='country_other_insurances', serialize=False, to='backend.Country')),
('config', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
('other_data', django.contrib.postgres.fields.jsonb.JSONField(default=dict)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CountryOtherStuff',
name='CampusTaggedItem',
fields=[
('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)),
('comment', models.TextField(blank=True)),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=[], validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('country', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='country_other_stuff', serialize=False, to='backend.Country')),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=list, validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('custom_content', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict)),
('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)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CountryTourism',
name='CityTaggedItem',
fields=[
('moderated_on', models.DateTimeField(null=True)),
('updated_on', models.DateTimeField(null=True)),
('comment', models.TextField(blank=True)),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=[], validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('country', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, primary_key=True, related_name='country_tourism', serialize=False, to='backend.Country')),
('usefull_links', backend.models.tools.usefullLinksField.UsefullLinksField(blank=True, default=list, validators=[backend.models.tools.usefullLinksField.validate_usefull_links])),
('custom_content', django.contrib.postgres.fields.jsonb.JSONField(blank=True, default=dict)),
('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)),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='CountryTransport',
name='CountryTaggedItem',
fields=