remove participants link for now (too complicated for MVP)
This commit is contained in:
parent
c83dc809c4
commit
af2825fda8
|
@ -1,72 +0,0 @@
|
||||||
# Generated by Django 3.1.7 on 2021-03-30 23:08
|
|
||||||
|
|
||||||
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='Participant',
|
|
||||||
fields=[
|
|
||||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
||||||
('order_by', models.IntegerField()),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
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)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
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)),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
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')),
|
|
||||||
('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),
|
|
||||||
),
|
|
||||||
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),
|
|
||||||
),
|
|
||||||
]
|
|
|
@ -8,7 +8,7 @@ User = get_user_model()
|
||||||
|
|
||||||
class StoryRound(models.Model):
|
class StoryRound(models.Model):
|
||||||
name = models.CharField(max_length=256)
|
name = models.CharField(max_length=256)
|
||||||
participants = models.ManyToManyField(User, through='Participant')
|
participants = models.ManyToManyField(User) # for ordering add: through='Participant'
|
||||||
created = models.DateTimeField(auto_now_add=True)
|
created = models.DateTimeField(auto_now_add=True)
|
||||||
number_of_rounds = models.IntegerField()
|
number_of_rounds = models.IntegerField()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue