# -*- coding: utf-8 -*-
# Generated by Django 1.11.3 on 2017-08-15 09: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),
        ('scoping', '0128_auto_20170808_0954'),
    ]

    operations = [
        migrations.CreateModel(
            name='ProjectRoles',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('role', models.CharField(choices=[('OW', 'Owner'), ('AD', 'Admin'), ('RE', 'Reviewer'), ('VE', 'Viewer')], max_length=2)),
                ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.RemoveField(
            model_name='project',
            name='owner',
        ),
        migrations.AddField(
            model_name='projectroles',
            name='project',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='scoping.Project'),
        ),
        migrations.AddField(
            model_name='project',
            name='users',
            field=models.ManyToManyField(through='scoping.ProjectRoles', to=settings.AUTH_USER_MODEL),
        ),
    ]