# -*- coding: utf-8 -*-
# Generated by Django 1.9.1 on 2016-01-12 03:18
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
    ]

    operations = [
        migrations.CreateModel(
            name='Authority',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('homepage', models.URLField(blank=True, null=True)),
                ('object_url', models.URLField(blank=True, null=True)),
            ],
            options={
                'abstract': False,
                'verbose_name_plural': 'authorities',
                'db_table': 'wq_identifiertype',
            },
        ),
        migrations.CreateModel(
            name='Identifier',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=255)),
                ('slug', models.SlugField(blank=True)),
                ('is_primary', models.BooleanField(default=False)),
                ('object_id', models.PositiveIntegerField()),
                ('authority', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='identify.Authority')),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
            ],
            options={
                'abstract': False,
                'ordering': ['-is_primary', 'authority', 'name'],
                'db_table': 'wq_identifier',
            },
        ),
    ]
