vcp-elearning/tkupek_elearning/elearning/migrations/0003_auto_20160209_1801.py
2016-02-21 18:01:57 +01:00

36 lines
1.3 KiB
Python

# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-02-09 18:01
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('elearning', '0002_setting_button_solution'),
]
operations = [
migrations.CreateModel(
name='User',
fields=[
('token', models.CharField(max_length=7, primary_key=True, serialize=False)),
('name', models.CharField(max_length=100, null=True)),
],
),
migrations.CreateModel(
name='UserAnswer',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('answers', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='elearning.Option')),
('questionId', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='elearning.Question')),
('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='elearning.User')),
],
),
migrations.AlterUniqueTogether(
name='useranswer',
unique_together={('user', 'questionId')},
),
]