2021-03-31 01:10:04 +02:00
|
|
|
# Generated by Django 3.1.7 on 2021-03-30 23:08
|
2021-03-30 21:25:52 +02: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 = [
|
2021-03-31 01:10:04 +02:00
|
|
|
migrations.CreateModel(
|
|
|
|
name='Participant',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('order_by', models.IntegerField()),
|
|
|
|
],
|
|
|
|
),
|
2021-03-30 21:25:52 +02:00
|
|
|
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)),
|
2021-03-31 01:10:04 +02:00
|
|
|
('created', models.DateTimeField(auto_now_add=True)),
|
|
|
|
],
|
|
|
|
),
|
|
|
|
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(through='writingtogether.Participant', to=settings.AUTH_USER_MODEL)),
|
2021-03-30 21:25:52 +02:00
|
|
|
],
|
|
|
|
),
|
|
|
|
migrations.CreateModel(
|
|
|
|
name='StoryPart',
|
|
|
|
fields=[
|
|
|
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
|
|
('text', models.TextField()),
|
|
|
|
('part_of', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='writingtogether.story')),
|
2021-03-31 01:10:04 +02:00
|
|
|
('previous_part', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='writingtogether.storypart')),
|
2021-03-30 21:25:52 +02:00
|
|
|
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
|
|
|
|
],
|
|
|
|
),
|
2021-03-31 01:10:04 +02:00
|
|
|
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),
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='participant',
|
|
|
|
name='story_round',
|
|
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='writingtogether.storyround'),
|
|
|
|
),
|
|
|
|
migrations.AddField(
|
|
|
|
model_name='participant',
|
|
|
|
name='user',
|
|
|
|
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
|
|
|
|
),
|
2021-03-30 21:25:52 +02:00
|
|
|
]
|