# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-11-04 16:46
from __future__ import unicode_literals

from django.conf import settings
import django.contrib.postgres.fields.jsonb
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import share.models.core
import share.models.fields
import share.models.validators


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('auth', '0007_alter_validators_add_error_messages'),
    ]

    operations = [
        migrations.CreateModel(
            name='ShareUser',
            fields=[
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('username', models.TextField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', unique=True, validators=[django.core.validators.MaxLengthValidator(64), django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.')], verbose_name='username')),
                ('first_name', models.TextField(blank=True, validators=[django.core.validators.MaxLengthValidator(64)], verbose_name='first name')),
                ('last_name', models.TextField(blank=True, validators=[django.core.validators.MaxLengthValidator(64)], verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('gravatar', share.models.fields.ShareURLField(blank=True)),
                ('time_zone', models.TextField(blank=True, validators=[django.core.validators.MaxLengthValidator(100)])),
                ('locale', models.TextField(blank=True, validators=[django.core.validators.MaxLengthValidator(100)])),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('is_trusted', models.BooleanField(default=False, help_text='Designates whether the user can push directly into the db.', verbose_name='trusted')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('robot', models.TextField(blank=True, validators=[django.core.validators.MaxLengthValidator(40)])),
                ('long_title', models.TextField(blank=True, validators=[django.core.validators.MaxLengthValidator(100)])),
                ('home_page', share.models.fields.ShareURLField(blank=True)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name_plural': 'Share users',
                'verbose_name': 'Share user',
            },
            managers=[
                ('objects', share.models.core.ShareUserManager()),
            ],
        ),
        migrations.CreateModel(
            name='RawData',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('app_label', models.TextField(db_index=True)),
                ('provider_doc_id', models.TextField()),
                ('data', models.TextField()),
                ('sha256', models.TextField(validators=[django.core.validators.MaxLengthValidator(64)])),
                ('date_seen', models.DateTimeField(auto_now=True)),
                ('date_harvested', models.DateTimeField(auto_now_add=True)),
                ('source', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Raw data',
            },
        ),
        migrations.CreateModel(
            name='ProviderRegistration',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.IntegerField(choices=[(0, 'pending'), (1, 'accepted'), (2, 'implemented'), (3, 'rejected')], default=0)),
                ('submitted_at', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('contact_name', models.TextField(max_length=300)),
                ('contact_email', models.EmailField(max_length=254)),
                ('contact_affiliation', models.TextField(max_length=300)),
                ('direct_source', models.BooleanField(default=False)),
                ('source_name', models.TextField(max_length=300)),
                ('source_description', models.TextField(max_length=1000)),
                ('source_rate_limit', models.TextField(blank=True, default='', max_length=300)),
                ('source_documentation', models.TextField(blank=True, default='', max_length=300)),
                ('source_preferred_metadata_prefix', models.TextField(blank=True, default='', max_length=300)),
                ('source_oai', models.BooleanField(default=False)),
                ('source_base_url', models.URLField(blank=True, default='')),
                ('source_disallowed_sets', models.TextField(blank=True, default='', max_length=300)),
                ('source_additional_info', models.TextField(blank=True, default='', max_length=1000)),
                ('submitted_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-submitted_at'],
            },
        ),
        migrations.AlterUniqueTogether(
            name='rawdata',
            unique_together=set([('provider_doc_id', 'app_label', 'source', 'sha256')]),
        ),
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-11-04 16:46
from __future__ import unicode_literals

from django.conf import settings
import django.contrib.postgres.fields.jsonb
import django.core.validators
from django.db import migrations, models
import django.db.models.deletion
import django.utils.timezone
import share.models.core
import share.models.fields
import share.models.validators


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('contenttypes', '0002_remove_content_type_name'),
        ('auth', '0007_alter_validators_add_error_messages'),
    ]

    operations = [
        migrations.CreateModel(
            name='ShareUser',
            fields=[
                ('password', models.CharField(max_length=128, verbose_name='password')),
                ('last_login', models.DateTimeField(blank=True, null=True, verbose_name='last login')),
                ('is_superuser', models.BooleanField(default=False, help_text='Designates that this user has all permissions without explicitly assigning them.', verbose_name='superuser status')),
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('username', models.TextField(error_messages={'unique': 'A user with that username already exists.'}, help_text='Required. 30 characters or fewer. Letters, digits and @/./+/-/_ only.', unique=True, validators=[django.core.validators.MaxLengthValidator(64), django.core.validators.RegexValidator('^[\\w.@+-]+$', 'Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.')], verbose_name='username')),
                ('first_name', models.TextField(blank=True, validators=[django.core.validators.MaxLengthValidator(64)], verbose_name='first name')),
                ('last_name', models.TextField(blank=True, validators=[django.core.validators.MaxLengthValidator(64)], verbose_name='last name')),
                ('email', models.EmailField(blank=True, max_length=254, verbose_name='email address')),
                ('gravatar', share.models.fields.ShareURLField(blank=True)),
                ('time_zone', models.TextField(blank=True, validators=[django.core.validators.MaxLengthValidator(100)])),
                ('locale', models.TextField(blank=True, validators=[django.core.validators.MaxLengthValidator(100)])),
                ('is_staff', models.BooleanField(default=False, help_text='Designates whether the user can log into this admin site.', verbose_name='staff status')),
                ('is_active', models.BooleanField(default=True, help_text='Designates whether this user should be treated as active. Unselect this instead of deleting accounts.', verbose_name='active')),
                ('is_trusted', models.BooleanField(default=False, help_text='Designates whether the user can push directly into the db.', verbose_name='trusted')),
                ('date_joined', models.DateTimeField(default=django.utils.timezone.now, verbose_name='date joined')),
                ('robot', models.TextField(blank=True, validators=[django.core.validators.MaxLengthValidator(40)])),
                ('long_title', models.TextField(blank=True, validators=[django.core.validators.MaxLengthValidator(100)])),
                ('home_page', share.models.fields.ShareURLField(blank=True)),
                ('groups', models.ManyToManyField(blank=True, help_text='The groups this user belongs to. A user will get all permissions granted to each of their groups.', related_name='user_set', related_query_name='user', to='auth.Group', verbose_name='groups')),
                ('user_permissions', models.ManyToManyField(blank=True, help_text='Specific permissions for this user.', related_name='user_set', related_query_name='user', to='auth.Permission', verbose_name='user permissions')),
            ],
            options={
                'verbose_name_plural': 'Share users',
                'verbose_name': 'Share user',
            },
            managers=[
                ('objects', share.models.core.ShareUserManager()),
            ],
        ),
        migrations.CreateModel(
            name='RawData',
            fields=[
                ('id', models.AutoField(primary_key=True, serialize=False)),
                ('app_label', models.TextField(db_index=True)),
                ('provider_doc_id', models.TextField()),
                ('data', models.TextField()),
                ('sha256', models.TextField(validators=[django.core.validators.MaxLengthValidator(64)])),
                ('date_seen', models.DateTimeField(auto_now=True)),
                ('date_harvested', models.DateTimeField(auto_now_add=True)),
                ('source', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'verbose_name_plural': 'Raw data',
            },
        ),
        migrations.CreateModel(
            name='ProviderRegistration',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('status', models.IntegerField(choices=[(0, 'pending'), (1, 'accepted'), (2, 'implemented'), (3, 'rejected')], default=0)),
                ('submitted_at', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('contact_name', models.TextField(max_length=300)),
                ('contact_email', models.EmailField(max_length=254)),
                ('contact_affiliation', models.TextField(max_length=300)),
                ('direct_source', models.BooleanField(default=False)),
                ('source_name', models.TextField(max_length=300)),
                ('source_description', models.TextField(max_length=1000)),
                ('source_rate_limit', models.TextField(blank=True, default='', max_length=300)),
                ('source_documentation', models.TextField(blank=True, default='', max_length=300)),
                ('source_preferred_metadata_prefix', models.TextField(blank=True, default='', max_length=300)),
                ('source_oai', models.BooleanField(default=False)),
                ('source_base_url', models.URLField(blank=True, default='')),
                ('source_disallowed_sets', models.TextField(blank=True, default='', max_length=300)),
                ('source_additional_info', models.TextField(blank=True, default='', max_length=1000)),
                ('submitted_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-submitted_at'],
            },
        ),
        migrations.AlterUniqueTogether(
            name='rawdata',
            unique_together=set([('provider_doc_id', 'app_label', 'source', 'sha256')]),
        ),
    ]

# -*- coding: utf-8 -*- # Generated by Django 1.9.7 on 2016-11-04 16:46