initial
This commit is contained in:
40
quiz/migrations/0001_initial.py
Normal file
40
quiz/migrations/0001_initial.py
Normal file
@@ -0,0 +1,40 @@
|
||||
# Generated by Django 4.2.13 on 2024-07-01 08:27
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('content', '0005_question_buzzword'),
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Quiz',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('author', models.ForeignKey(null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL)),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='Question',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('points', models.DecimalField(decimal_places=1, default=1.0, max_digits=10)),
|
||||
('order', models.IntegerField(default=1)),
|
||||
('description', models.TextField(blank=True, null=True)),
|
||||
('created_at', models.DateTimeField(auto_now_add=True)),
|
||||
('updated_at', models.DateTimeField(auto_now=True)),
|
||||
('question', models.ForeignKey(on_delete=django.db.models.deletion.RESTRICT, related_name='content_question', to='content.question')),
|
||||
('quiz', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='quiz.quiz')),
|
||||
],
|
||||
),
|
||||
]
|
||||
19
quiz/migrations/0002_quiz_name.py
Normal file
19
quiz/migrations/0002_quiz_name.py
Normal file
@@ -0,0 +1,19 @@
|
||||
# Generated by Django 4.2.13 on 2024-07-01 09:08
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('quiz', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='quiz',
|
||||
name='name',
|
||||
field=models.CharField(default='Moepquiz', max_length=250),
|
||||
preserve_default=False,
|
||||
),
|
||||
]
|
||||
22
quiz/migrations/0003_alter_quiz_author.py
Normal file
22
quiz/migrations/0003_alter_quiz_author.py
Normal file
@@ -0,0 +1,22 @@
|
||||
# Generated by Django 4.2.13 on 2024-07-02 08:09
|
||||
|
||||
from django.conf import settings
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
import lib.middleware.current_user
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
|
||||
('quiz', '0002_quiz_name'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='quiz',
|
||||
name='author',
|
||||
field=models.ForeignKey(default=lib.middleware.current_user.get_current_user, null=True, on_delete=django.db.models.deletion.SET_NULL, to=settings.AUTH_USER_MODEL),
|
||||
),
|
||||
]
|
||||
0
quiz/migrations/__init__.py
Normal file
0
quiz/migrations/__init__.py
Normal file
Reference in New Issue
Block a user