add migrations #37

Merged
s470631 merged 2 commits from feature/migration into master 2022-05-24 21:03:32 +02:00
2 changed files with 44 additions and 0 deletions
Showing only changes of commit 273ffb7df5 - Show all commits

View 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'),
),
]

View 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)),
],
),
]