add migrations #37
19
questions/migrations/0004_question_tournament.py
Normal file
19
questions/migrations/0004_question_tournament.py
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
# Generated by Django 3.2.9 on 2022-05-24 17:54
|
||||||
|
|
||||||
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
('trials', '0023_tournament'),
|
||||||
|
('questions', '0003_alter_question_description'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.AddField(
|
||||||
|
model_name='question',
|
||||||
|
name='tournament',
|
||||||
|
field=models.ManyToManyField(null=True, to='trials.Tournament'),
|
||||||
|
),
|
||||||
|
]
|
25
trials/migrations/0023_tournament.py
Normal file
25
trials/migrations/0023_tournament.py
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
# Generated by Django 3.2.9 on 2022-05-24 17:54
|
||||||
|
|
||||||
|
from django.conf import settings
|
||||||
|
from django.db import migrations, models
|
||||||
|
import django.db.models.deletion
|
||||||
|
|
||||||
|
|
||||||
|
class Migration(migrations.Migration):
|
||||||
|
|
||||||
|
dependencies = [
|
||||||
|
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||||
|
('trials', '0022_test_difficulty_label'),
|
||||||
|
]
|
||||||
|
|
||||||
|
operations = [
|
||||||
|
migrations.CreateModel(
|
||||||
|
name='Tournament',
|
||||||
|
fields=[
|
||||||
|
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||||
|
('name', models.CharField(max_length=100)),
|
||||||
|
('password', models.CharField(max_length=100)),
|
||||||
|
('created_by', models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='tournaments', to=settings.AUTH_USER_MODEL)),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
Loading…
Reference in New Issue
Block a user