recreate initial migration

This commit is contained in:
2022-09-04 13:36:33 +02:00
parent e4ea057ecb
commit b55ff2f4ea
2 changed files with 83 additions and 23 deletions

View File

@@ -1,6 +1,12 @@
# Generated by Django 4.0.6 on 2022-07-12 18:34 # Generated by Django 4.0.6 on 2022-09-09 15:12
from django.conf import settings
import django.contrib.auth.models
import django.contrib.auth.validators
from django.db import migrations, models from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import gaehsnitz.models
class Migration(migrations.Migration): class Migration(migrations.Migration):
@@ -8,18 +14,90 @@ class Migration(migrations.Migration):
initial = True initial = True
dependencies = [ dependencies = [
('auth', '0012_alter_user_first_name_max_length'),
] ]
operations = [ operations = [
migrations.CreateModel(
name='User',
fields=[
('id', models.SmallAutoField(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=[
('objects', django.contrib.auth.models.UserManager()),
],
),
migrations.CreateModel(
name='Drink',
fields=[
('id', models.SmallAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=32, unique=True)),
('crates_ordered', models.PositiveSmallIntegerField(help_text='just informational to see how good we planned, not the actual consumed/paid drinks')),
('crates_purchased', models.PositiveSmallIntegerField()),
('crates_returned', models.PositiveSmallIntegerField()),
('purchase_price_per_crate', gaehsnitz.models.PriceField(decimal_places=2, max_digits=6)),
('deposit_per_crate', gaehsnitz.models.PriceField(decimal_places=2, max_digits=6)),
('bottles_per_crate', models.PositiveSmallIntegerField()),
('bottle_size', models.FloatField()),
('sale_price_per_bottle', gaehsnitz.models.PriceField(decimal_places=2, max_digits=6)),
],
),
migrations.CreateModel( migrations.CreateModel(
name='Payment', name='Payment',
fields=[ fields=[
('id', models.SmallAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('id', models.SmallAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('other_party', models.TextField()), ('purpose', models.CharField(max_length=64)),
('topic', models.PositiveSmallIntegerField(choices=[(0, 'Spenden/Vorauszahlungen'), (1, 'Eintrittsgeld'), (2, 'Getränke-/Essensverkauf'), (10, 'Gelände'), (11, 'Bands'), (12, 'Getränke-/Essenseinkauf')])),
('amount', models.PositiveIntegerField()),
('date', models.DateField()), ('date', models.DateField()),
('note', models.TextField(blank=True)), ('amount', gaehsnitz.models.PriceField(decimal_places=2, max_digits=6)),
('from_user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='payments', related_query_name='payment', to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Payback',
fields=[
('id', models.SmallAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date', models.DateField()),
('amount', gaehsnitz.models.PriceField(decimal_places=2, max_digits=6)),
('note', models.CharField(blank=True, default='', max_length=64)),
('to_user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='paybacks', related_query_name='payback', to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Donation',
fields=[
('id', models.SmallAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('date', models.DateField()),
('amount', gaehsnitz.models.PriceField(decimal_places=2, max_digits=6)),
('note', models.CharField(blank=True, default='', max_length=64)),
('from_user', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='donations', related_query_name='donation', to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='Consumption',
fields=[
('id', models.SmallAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('amount', models.PositiveSmallIntegerField()),
('day', models.PositiveSmallIntegerField(choices=[(1, 'Do'), (2, 'Fr'), (3, 'Sa')])),
('for_free', models.BooleanField(default=False)),
('drink', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='consumption_list', related_query_name='consumption', to='gaehsnitz.drink')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='consumption_list', related_query_name='consumption', to=settings.AUTH_USER_MODEL)),
], ],
), ),
] ]

View File

@@ -1,18 +0,0 @@
# Generated by Django 4.0.6 on 2022-07-17 12:38
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('gaehsnitz', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='payment',
name='is_estimated',
field=models.BooleanField(default=False),
),
]