geschichten/writingtogether/migrations/0001_initial.py

57 lines
2.3 KiB
Python

# Generated by Django 3.1.7 on 2021-04-19 22:00
from django.conf import settings
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
]
operations = [
migrations.CreateModel(
name='Story',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(blank=True, max_length=256, null=True)),
('created', models.DateTimeField(auto_now_add=True)),
('finished', models.BooleanField(default=False)),
],
),
migrations.CreateModel(
name='StoryRound',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=256)),
('created', models.DateTimeField(auto_now_add=True)),
('number_of_rounds', models.IntegerField()),
('participants', models.ManyToManyField(to=settings.AUTH_USER_MODEL)),
],
),
migrations.CreateModel(
name='StoryPart',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('text', models.TextField(blank=True, null=True)),
('part_of', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='writingtogether.story')),
('previous_part', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='writingtogether.storypart')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
],
),
migrations.AddField(
model_name='story',
name='part_of_round',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='writingtogether.storyround'),
),
migrations.AddField(
model_name='story',
name='started_by',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
),
]