# -*- coding: utf-8 -*-
# Generated by Django 1.9.3 on 2016-09-18 20:46
from __future__ import unicode_literals

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),
        ('proposals', '0010_auto_20160908_1412'),
    ]

    operations = [
        migrations.CreateModel(
            name='Score',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('value', models.PositiveSmallIntegerField()),
                ('note', models.TextField(help_text='Only you can see this')),
            ],
            options={
                'permissions': (('can_add_score', 'Can add score'),),
            },
        ),
        migrations.RenameModel(
            old_name='Proposal',
            new_name='Ranking',
        ),
        migrations.AlterUniqueTogether(
            name='ranking',
            unique_together=set([('content_type', 'object_id')]),
        ),
        migrations.AddField(
            model_name='score',
            name='proposal',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='scores', to='proposals.Ranking'),
        ),
        migrations.AddField(
            model_name='score',
            name='user',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
    ]
