# -*- coding: utf-8 -*-
# Generated by Django 1.10.4 on 2016-12-21 21:48
from __future__ import unicode_literals

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    dependencies = [
        ('scopes', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Identifier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('weight', models.PositiveSmallIntegerField()),
                ('name', models.SlugField(max_length=128)),
                ('regex', models.SlugField(max_length=128)),
            ],
            options={
                'ordering': ('resource__name', 'weight', 'name'),
                'verbose_name_plural': 'Identifiers',
            },
        ),
        migrations.AlterModelOptions(
            name='resource',
            options={'ordering': ('name',), 'verbose_name_plural': 'Resources'},
        ),
        migrations.AlterField(
            model_name='resource',
            name='verbose_name',
            field=models.CharField(max_length=255),
        ),
        migrations.AddField(
            model_name='identifier',
            name='resource',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='identifiers', to='scopes.Resource'),
        ),
        migrations.AlterUniqueTogether(
            name='identifier',
            unique_together=set([('resource', 'name'), ('resource', 'weight')]),
        ),
    ]
