site_tps/vote/migrations/0001_initial.py

43 lines
1.6 KiB
Python
Raw Normal View History

2018-01-21 00:10:32 +00:00
# Generated by Django 2.0.1 on 2018-01-21 00:07
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
('content', '0004_video'),
]
operations = [
migrations.CreateModel(
name='Vote',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('vote', models.IntegerField(validators=[django.core.validators.MaxValueValidator(5), django.core.validators.MinValueValidator(0)])),
('categorie', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='content.Category')),
('video', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='content.Video')),
],
),
migrations.CreateModel(
name='Voter',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=100)),
('firstname', models.CharField(max_length=100)),
('email', models.EmailField(max_length=200)),
('password', models.CharField(max_length=100)),
('ecole', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='content.School')),
],
),
migrations.AddField(
model_name='vote',
name='votant',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='vote.Voter'),
),
]