feat: add basic member support & squash migrations
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
# Generated by Django 5.0.3 on 2024-03-19 16:31
|
||||
# Generated by Django 5.0.3 on 2024-03-23 10:04
|
||||
|
||||
import datetime
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
|
||||
@@ -15,6 +16,27 @@ class Migration(migrations.Migration):
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Image',
|
||||
fields=[
|
||||
('id', models.BigAutoField(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(
|
||||
name='Language',
|
||||
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)),
|
||||
('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')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Language',
|
||||
'verbose_name_plural': 'Languages',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Location',
|
||||
fields=[
|
||||
@@ -36,6 +58,14 @@ class Migration(migrations.Migration):
|
||||
'verbose_name_plural': 'Markdown content',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Rule',
|
||||
fields=[
|
||||
('id', 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=[
|
||||
@@ -48,13 +78,51 @@ class Migration(migrations.Migration):
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Image',
|
||||
name='AdoptionNotice',
|
||||
fields=[
|
||||
('id', models.BigAutoField(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)),
|
||||
('uploaded_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
||||
('created_at', models.DateField(default=datetime.datetime.now, verbose_name='Created at')),
|
||||
('searching_since', models.DateField(verbose_name='Searching for a home since')),
|
||||
('name', models.CharField(max_length=200)),
|
||||
('description', models.TextField(blank=True, null=True, verbose_name='Description')),
|
||||
('further_information', models.URLField(blank=True, null=True, verbose_name='Link to further information')),
|
||||
('group_only', models.BooleanField(default=False, verbose_name='Only group adoption')),
|
||||
('photos', models.ManyToManyField(blank=True, to='fellchensammlung.image')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Member',
|
||||
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)),
|
||||
('preferred_language', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='fellchensammlung.language', verbose_name='Preferred language')),
|
||||
('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL, verbose_name='User')),
|
||||
],
|
||||
options={
|
||||
'verbose_name': 'Member',
|
||||
'verbose_name_plural': 'Members',
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Report',
|
||||
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)),
|
||||
('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')),
|
||||
],
|
||||
),
|
||||
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(
|
||||
@@ -70,19 +138,10 @@ class Migration(migrations.Migration):
|
||||
('location', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='fellchensammlung.location')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='AdoptionNotice',
|
||||
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')),
|
||||
('searching_since', models.DateField(verbose_name='Searching for a home since')),
|
||||
('name', models.CharField(max_length=200)),
|
||||
('description', models.TextField(blank=True, null=True, verbose_name='Description')),
|
||||
('further_information', models.URLField(blank=True, null=True, verbose_name='Link to further information')),
|
||||
('group_only', models.BooleanField(default=False, verbose_name='Only group adoption')),
|
||||
('photos', models.ManyToManyField(blank=True, to='fellchensammlung.image')),
|
||||
('organization', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='fellchensammlung.rescueorganization', verbose_name='Organization')),
|
||||
],
|
||||
migrations.AddField(
|
||||
model_name='adoptionnotice',
|
||||
name='organization',
|
||||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='fellchensammlung.rescueorganization', verbose_name='Organization'),
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Animal',
|
||||
@@ -91,7 +150,7 @@ class Migration(migrations.Migration):
|
||||
('date_of_birth', models.DateField(verbose_name='Date of birth')),
|
||||
('name', models.CharField(max_length=200)),
|
||||
('description', models.TextField(blank=True, null=True, verbose_name='Description')),
|
||||
('sex', models.CharField(choices=[('M_N', 'male_neutered'), ('M', 'male'), ('F_N', 'female_neutered'), ('F', 'female')], max_length=20)),
|
||||
('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')),
|
||||
|
@@ -1,21 +0,0 @@
|
||||
# Generated by Django 5.0.3 on 2024-03-20 09:54
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('fellchensammlung', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Rule',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('title', models.CharField(max_length=200)),
|
||||
('rule_text', models.TextField()),
|
||||
],
|
||||
),
|
||||
]
|
@@ -1,17 +0,0 @@
|
||||
# Generated by Django 5.0.3 on 2024-03-20 10:35
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('fellchensammlung', '0002_rule'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RemoveField(
|
||||
model_name='image',
|
||||
name='uploaded_by',
|
||||
),
|
||||
]
|
@@ -1,18 +0,0 @@
|
||||
# Generated by Django 5.0.3 on 2024-03-20 15:39
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('fellchensammlung', '0003_remove_image_uploaded_by'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='animal',
|
||||
name='sex',
|
||||
field=models.CharField(choices=[('M_N', 'neutered male'), ('M', 'male'), ('F_N', 'neutered female'), ('F', 'female')], max_length=20),
|
||||
),
|
||||
]
|
@@ -1,37 +0,0 @@
|
||||
# Generated by Django 5.0.3 on 2024-03-22 09:20
|
||||
|
||||
import django.db.models.deletion
|
||||
import uuid
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('fellchensammlung', '0004_alter_animal_sex'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Report',
|
||||
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)),
|
||||
('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')),
|
||||
],
|
||||
),
|
||||
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'), ('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()),
|
||||
('private_comment', models.TextField()),
|
||||
('report', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='fellchensammlung.report')),
|
||||
],
|
||||
),
|
||||
]
|
@@ -1,18 +0,0 @@
|
||||
# Generated by Django 5.0.3 on 2024-03-22 11:26
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('fellchensammlung', '0005_report_moderationaction'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='moderationaction',
|
||||
name='action',
|
||||
field=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),
|
||||
),
|
||||
]
|
@@ -1,23 +0,0 @@
|
||||
# Generated by Django 5.0.3 on 2024-03-22 11:28
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('fellchensammlung', '0006_alter_moderationaction_action'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='moderationaction',
|
||||
name='private_comment',
|
||||
field=models.TextField(blank=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='moderationaction',
|
||||
name='public_comment',
|
||||
field=models.TextField(blank=True),
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user