fix!: Exchange migration

This commit is contained in:
moanos [he/him] 2024-04-14 13:26:41 +02:00
parent 34d8862b47
commit 5429e3ced1

View File

@ -1,4 +1,4 @@
# Generated by Django 5.0.3 on 2024-04-13 00:02 # Generated by Django 5.0.3 on 2024-04-14 09:08
import datetime import datetime
import django.contrib.auth.models import django.contrib.auth.models
@ -15,180 +15,574 @@ class Migration(migrations.Migration):
initial = True initial = True
dependencies = [ dependencies = [
('auth', '0012_alter_user_first_name_max_length'), ("auth", "0012_alter_user_first_name_max_length"),
] ]
operations = [ operations = [
migrations.CreateModel( migrations.CreateModel(
name='Image', name="Image",
fields=[ fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), (
('title', models.CharField(max_length=200)), "id",
('image', models.ImageField(upload_to='images')), models.BigAutoField(
('alt_text', models.TextField(max_length=2000)), auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("title", models.CharField(max_length=200)),
("image", models.ImageField(upload_to="images")),
("alt_text", models.TextField(max_length=2000)),
], ],
), ),
migrations.CreateModel( migrations.CreateModel(
name='Language', name="Language",
fields=[ fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), (
('name', models.CharField(help_text='Enter a natural languages name (e.g. English, French, Japanese etc.).', max_length=200, unique=True)), "id",
('languagecode', models.CharField(help_text='Enter the language code for this language. For further information see http://www.i18nguy.com/unicode/language-identifiers.html', max_length=10, verbose_name='Language code')), models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"name",
models.CharField(
help_text="Der Name einer natürliche Sprache wie Deutsch, Englisch oder Arabisch.",
max_length=200,
unique=True,
),
),
(
"languagecode",
models.CharField(
help_text="Der standartisierte Sprachcode. Mehr Informationen: http://www.i18nguy.com/unicode/language-identifiers.html",
max_length=10,
verbose_name="Sprachcode",
),
),
], ],
options={ options={
'verbose_name': 'Language', "verbose_name": "Sprache",
'verbose_name_plural': 'Languages', "verbose_name_plural": "Sprachen",
}, },
), ),
migrations.CreateModel( migrations.CreateModel(
name='Location', name="Location",
fields=[ fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), (
('name', models.CharField(max_length=200)), "id",
('postcode', models.CharField(max_length=200)), models.BigAutoField(
('country', models.CharField(choices=[('DE', 'Germany'), ('AT', 'Austria'), ('CH', 'Switzerland')], max_length=20)), auto_created=True,
('description', models.TextField(blank=True, null=True, verbose_name='Description')), primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("name", models.CharField(max_length=200)),
("postcode", models.CharField(max_length=200)),
(
"country",
models.CharField(
choices=[
("DE", "Germany"),
("AT", "Austria"),
("CH", "Switzerland"),
],
max_length=20,
),
),
(
"description",
models.TextField(
blank=True, null=True, verbose_name="Beschreibung"
),
),
], ],
), ),
migrations.CreateModel( migrations.CreateModel(
name='MarkdownContent', name="Rule",
fields=[ fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), (
('title', models.CharField(max_length=100)), "id",
('content', models.TextField()), models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("title", models.CharField(max_length=200)),
("rule_text", models.TextField()),
],
),
migrations.CreateModel(
name="Species",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"name",
models.CharField(
help_text="Name der Tierart",
max_length=200,
verbose_name="Name",
),
),
], ],
options={ options={
'verbose_name_plural': 'Markdown content', "verbose_name": "Tierart",
"verbose_name_plural": "Tierarten",
}, },
), ),
migrations.CreateModel( migrations.CreateModel(
name='Rule', name="User",
fields=[ fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), (
('title', models.CharField(max_length=200)), "id",
('rule_text', models.TextField()), models.BigAutoField(
], auto_created=True,
), primary_key=True,
migrations.CreateModel( serialize=False,
name='Species', verbose_name="ID",
fields=[ ),
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ),
('name', models.CharField(help_text='Enter a animal species', max_length=200, verbose_name='Name')), ("password", models.CharField(max_length=128, verbose_name="password")),
(
"last_login",
models.DateTimeField(
blank=True, null=True, verbose_name="last login"
),
),
(
"is_superuser",
models.BooleanField(
default=False,
help_text="Designates that this user has all permissions without explicitly assigning them.",
verbose_name="superuser status",
),
),
(
"username",
models.CharField(
error_messages={
"unique": "A user with that username already exists."
},
help_text="Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.",
max_length=150,
unique=True,
validators=[
django.contrib.auth.validators.UnicodeUsernameValidator()
],
verbose_name="username",
),
),
(
"first_name",
models.CharField(
blank=True, max_length=150, verbose_name="first name"
),
),
(
"last_name",
models.CharField(
blank=True, max_length=150, verbose_name="last name"
),
),
(
"email",
models.EmailField(
blank=True, max_length=254, verbose_name="email address"
),
),
(
"is_staff",
models.BooleanField(
default=False,
help_text="Designates whether the user can log into this admin site.",
verbose_name="staff status",
),
),
(
"is_active",
models.BooleanField(
default=True,
help_text="Designates whether this user should be treated as active. Unselect this instead of deleting accounts.",
verbose_name="active",
),
),
(
"date_joined",
models.DateTimeField(
default=django.utils.timezone.now, verbose_name="date joined"
),
),
(
"groups",
models.ManyToManyField(
blank=True,
help_text="The groups this user belongs to. A user will get all permissions granted to each of their groups.",
related_name="user_set",
related_query_name="user",
to="auth.group",
verbose_name="groups",
),
),
(
"user_permissions",
models.ManyToManyField(
blank=True,
help_text="Specific permissions for this user.",
related_name="user_set",
related_query_name="user",
to="auth.permission",
verbose_name="user permissions",
),
),
], ],
options={ options={
'verbose_name': 'Species', "verbose_name": "user",
'verbose_name_plural': 'Species', "verbose_name_plural": "users",
}, "abstract": False,
),
migrations.CreateModel(
name='User',
fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('password', models.CharField(max_length=128, verbose_name='password')),
('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
('username', models.CharField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only.', max_length=150, unique=True, validators=[django.contrib.auth.validators.UnicodeUsernameValidator()], verbose_name='username')),
('first_name', models.CharField(blank=True, max_length=150, verbose_name='first name')),
('last_name', models.CharField(blank=True, max_length=150, verbose_name='last name')),
('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.group', verbose_name='groups')),
('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.permission', verbose_name='user permissions')),
],
options={
'verbose_name': 'user',
'verbose_name_plural': 'users',
'abstract': False,
}, },
managers=[ managers=[
('objects', django.contrib.auth.models.UserManager()), ("objects", django.contrib.auth.models.UserManager()),
], ],
), ),
migrations.CreateModel( migrations.CreateModel(
name='AdoptionNotice', name="AdoptionNotice",
fields=[ fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), (
('created_at', models.DateField(default=datetime.datetime.now, verbose_name='Created at')), "id",
('searching_since', models.DateField(verbose_name='Searching for a home since')), models.BigAutoField(
('name', models.CharField(max_length=200)), auto_created=True,
('description', models.TextField(blank=True, null=True, verbose_name='Description')), primary_key=True,
('further_information', models.URLField(blank=True, null=True, verbose_name='Link to further information')), serialize=False,
('group_only', models.BooleanField(default=False, verbose_name='Only group adoption')), verbose_name="ID",
('photos', models.ManyToManyField(blank=True, to='fellchensammlung.image')), ),
),
(
"created_at",
models.DateField(
default=datetime.datetime.now, verbose_name="Erstellt am"
),
),
(
"searching_since",
models.DateField(verbose_name="Sucht nach einem Zuhause seit"),
),
("name", models.CharField(max_length=200)),
(
"description",
models.TextField(
blank=True, null=True, verbose_name="Beschreibung"
),
),
(
"further_information",
models.URLField(
blank=True, null=True, verbose_name="Link zu mehr Informationen"
),
),
(
"group_only",
models.BooleanField(
default=False, verbose_name="Ausschließlich Gruppenadoption"
),
),
(
"photos",
models.ManyToManyField(blank=True, to="fellchensammlung.image"),
),
], ],
options={ options={
'permissions': [('create_active_adoption_notice', 'Can create an active adoption notice')], "permissions": [
(
"create_active_adoption_notice",
"Can create an active adoption notice",
)
],
}, },
), ),
migrations.CreateModel( migrations.CreateModel(
name='Member', name="MarkdownContent",
fields=[ fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), (
('trust_level', models.CharField(choices=[('admin', 'Administrator*in'), ('Moderator', 'Moderator*in'), ('Koordinator*in', 'Koordinator*in'), ('Mitglied', 'Mitglied')], default='Mitglied', max_length=100)), "id",
('preferred_language', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='fellchensammlung.language', verbose_name='Preferred language')), models.BigAutoField(
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User')), auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
("title", models.CharField(max_length=100)),
("content", models.TextField()),
(
"text_code",
models.CharField(
blank=True, max_length=24, verbose_name="text_code"
),
),
(
"language",
models.OneToOneField(
on_delete=django.db.models.deletion.PROTECT,
to="fellchensammlung.language",
),
),
], ],
options={ options={
'verbose_name': 'Member', "verbose_name_plural": "Markdown content",
'verbose_name_plural': 'Members',
}, },
), ),
migrations.CreateModel( migrations.CreateModel(
name='Report', name="Member",
fields=[ fields=[
('id', models.UUIDField(default=uuid.uuid4, help_text='ID dieses reports', primary_key=True, serialize=False, verbose_name='ID')), (
('status', models.CharField(choices=[('action taken', 'Action was taken'), ('no action taken', 'No action was taken'), ('waiting', 'Waiting for moderator action')], max_length=30)), "id",
('comment', models.TextField(blank=True)), models.BigAutoField(
('created_at', models.DateTimeField(auto_now_add=True)), auto_created=True,
('adoption_notice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='fellchensammlung.adoptionnotice')), primary_key=True,
('reported_broken_rules', models.ManyToManyField(blank=True, to='fellchensammlung.rule')), serialize=False,
verbose_name="ID",
),
),
(
"trust_level",
models.CharField(
choices=[
("admin", "Administrator*in"),
("Moderator", "Moderator*in"),
("Koordinator*in", "Koordinator*in"),
("Mitglied", "Mitglied"),
],
default="Mitglied",
max_length=100,
),
),
(
"preferred_language",
models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.PROTECT,
to="fellchensammlung.language",
verbose_name="Bevorzugte Sprache",
),
),
(
"user",
models.OneToOneField(
on_delete=django.db.models.deletion.CASCADE,
to=settings.AUTH_USER_MODEL,
verbose_name="Nutzer*in",
),
),
], ],
options={ options={
'permissions': [], "verbose_name": "Nutzer*in",
"verbose_name_plural": "Nutzer*innen",
}, },
), ),
migrations.CreateModel( migrations.CreateModel(
name='ModerationAction', name="Report",
fields=[ fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), (
('action', models.CharField(choices=[('user_banned', 'User was banned'), ('content_deleted', 'Content was deleted'), ('comment', 'Comment was added'), ('other_action_taken', 'Other action was taken'), ('no_action_taken', 'No action was taken')], max_length=30)), "id",
('created_at', models.DateTimeField(auto_now_add=True)), models.UUIDField(
('public_comment', models.TextField(blank=True)), default=uuid.uuid4,
('private_comment', models.TextField(blank=True)), help_text="ID dieses reports",
('report', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='fellchensammlung.report')), primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"status",
models.CharField(
choices=[
("action taken", "Action was taken"),
("no action taken", "No action was taken"),
("waiting", "Waiting for moderator action"),
],
max_length=30,
),
),
("comment", models.TextField(blank=True)),
("created_at", models.DateTimeField(auto_now_add=True)),
(
"adoption_notice",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="fellchensammlung.adoptionnotice",
),
),
(
"reported_broken_rules",
models.ManyToManyField(blank=True, to="fellchensammlung.rule"),
),
],
options={
"permissions": [],
},
),
migrations.CreateModel(
name="ModerationAction",
fields=[
(
"id",
models.BigAutoField(
auto_created=True,
primary_key=True,
serialize=False,
verbose_name="ID",
),
),
(
"action",
models.CharField(
choices=[
("user_banned", "User was banned"),
("content_deleted", "Content was deleted"),
("comment", "Comment was added"),
("other_action_taken", "Other action was taken"),
("no_action_taken", "No action was taken"),
],
max_length=30,
),
),
("created_at", models.DateTimeField(auto_now_add=True)),
("public_comment", models.TextField(blank=True)),
("private_comment", models.TextField(blank=True)),
(
"report",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="fellchensammlung.report",
),
),
], ],
), ),
migrations.CreateModel( migrations.CreateModel(
name='RescueOrganization', name="RescueOrganization",
fields=[ fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), (
('name', models.CharField(max_length=200)), "id",
('trusted', models.BooleanField(default=False, verbose_name='Trusted')), models.BigAutoField(
('instagram', models.URLField(blank=True, null=True, verbose_name='Instagram profile')), auto_created=True,
('facebook', models.URLField(blank=True, null=True, verbose_name='Facebook profile')), primary_key=True,
('fediverse_profile', models.URLField(blank=True, null=True, verbose_name='Fediverse profile')), serialize=False,
('website', models.URLField(blank=True, null=True, verbose_name='Website')), verbose_name="ID",
('location', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='fellchensammlung.location')), ),
),
("name", models.CharField(max_length=200)),
(
"trusted",
models.BooleanField(default=False, verbose_name="Vertrauenswürdig"),
),
(
"instagram",
models.URLField(
blank=True, null=True, verbose_name="Instagram Profil"
),
),
(
"facebook",
models.URLField(
blank=True, null=True, verbose_name="Facebook Profil"
),
),
(
"fediverse_profile",
models.URLField(
blank=True, null=True, verbose_name="Fediverse Profil"
),
),
(
"website",
models.URLField(blank=True, null=True, verbose_name="Website"),
),
(
"location",
models.ForeignKey(
on_delete=django.db.models.deletion.PROTECT,
to="fellchensammlung.location",
),
),
], ],
), ),
migrations.AddField( migrations.AddField(
model_name='adoptionnotice', model_name="adoptionnotice",
name='organization', name="organization",
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='fellchensammlung.rescueorganization', verbose_name='Organization'), field=models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="fellchensammlung.rescueorganization",
verbose_name="Organisation",
),
), ),
migrations.CreateModel( migrations.CreateModel(
name='Animal', name="Animal",
fields=[ fields=[
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), (
('date_of_birth', models.DateField(verbose_name='Date of birth')), "id",
('name', models.CharField(max_length=200)), models.BigAutoField(
('description', models.TextField(blank=True, null=True, verbose_name='Description')), auto_created=True,
('sex', models.CharField(choices=[('M_N', 'neutered male'), ('M', 'male'), ('F_N', 'neutered female'), ('F', 'female')], max_length=20)), primary_key=True,
('adoption_notice', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='fellchensammlung.adoptionnotice')), serialize=False,
('photos', models.ManyToManyField(blank=True, to='fellchensammlung.image')), verbose_name="ID",
('species', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='fellchensammlung.species')), ),
),
("date_of_birth", models.DateField(verbose_name="Geburtsdatum")),
("name", models.CharField(max_length=200)),
(
"description",
models.TextField(
blank=True, null=True, verbose_name="Beschreibung"
),
),
(
"sex",
models.CharField(
choices=[
("M_N", "neutered male"),
("M", "male"),
("F_N", "neutered female"),
("F", "female"),
],
max_length=20,
),
),
(
"adoption_notice",
models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
to="fellchensammlung.adoptionnotice",
),
),
(
"photos",
models.ManyToManyField(blank=True, to="fellchensammlung.image"),
),
(
"species",
models.ForeignKey(
on_delete=django.db.models.deletion.PROTECT,
to="fellchensammlung.species",
),
),
], ],
), ),
] ]