# -*- coding: utf-8 -*-
# Generated by Django 1.9 on 2015-12-21 12:22
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):

    initial = True

    dependencies = [
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='BookCopy',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('book_status', models.IntegerField(choices=[(1, 'Available'), (2, 'In Circulation'), (3, 'Temporarily Unavailable'), (4, 'Unavailable'), (5, 'Protected'), (6, 'Damaged')])),
                ('remarks', models.TextField(blank=True, default='')),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('updated_on', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='BookDetail',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=1024)),
                ('author', models.CharField(default='Unknown', max_length=1024)),
                ('description', models.TextField(blank=True, default='')),
                ('publisher', models.CharField(blank=True, default='', max_length=512)),
                ('published_on', models.DateField(blank=True, null=True)),
                ('pages', models.PositiveIntegerField(blank=True, default=0, null=True)),
                ('ddc', models.CharField(blank=True, default='', max_length=1024)),
                ('llcc', models.CharField(blank=True, default='', max_length=1024)),
                ('isbn', models.CharField(blank=True, default='', max_length=1024)),
                ('tags', models.CharField(blank=True, max_length=1024, null=True)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('updated_on', models.DateTimeField(auto_now=True)),
            ],
        ),
        migrations.CreateModel(
            name='Category',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=512)),
                ('slug', models.SlugField(max_length=128, unique=True)),
                ('description', models.TextField(blank=True, default='')),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('updated_on', models.DateTimeField(auto_now=True)),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='category_updated_by', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Language',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=512)),
                ('short_code', models.CharField(db_index=True, max_length=8, unique=True)),
                ('description', models.TextField(blank=True, default='')),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('updated_on', models.DateTimeField(auto_now=True)),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('updated_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='language_updated_by', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='Periodical',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=1024)),
                ('description', models.TextField(blank=True, default='')),
                ('publisher', models.CharField(blank=True, default='', max_length=512)),
                ('tags', models.CharField(blank=True, max_length=1024, null=True)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('updated_on', models.DateTimeField(auto_now=True)),
                ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='items.Category')),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('language', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='items.Language')),
                ('updated_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='periodical_updated_by', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.CreateModel(
            name='PeriodicalIssue',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('issue_status', models.IntegerField(choices=[(1, 'Available'), (2, 'In Circulation'), (3, 'Temporarily Unavailable'), (4, 'Unavailable'), (5, 'Protected'), (6, 'Damaged')])),
                ('published_on', models.DateField(blank=True, null=True)),
                ('volume', models.PositiveIntegerField(blank=True, null=True)),
                ('issue', models.PositiveIntegerField(blank=True, null=True)),
                ('remarks', models.TextField(blank=True, default='')),
                ('tags', models.CharField(blank=True, max_length=1024, null=True)),
                ('created_on', models.DateTimeField(auto_now_add=True)),
                ('updated_on', models.DateTimeField(auto_now=True)),
                ('created_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)),
                ('periodical', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='items.Periodical')),
                ('updated_by', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='periodical_issue_updated_by', to=settings.AUTH_USER_MODEL)),
            ],
        ),
        migrations.AddField(
            model_name='bookdetail',
            name='category',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='items.Category'),
        ),
        migrations.AddField(
            model_name='bookdetail',
            name='created_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='bookdetail',
            name='language',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='items.Language'),
        ),
        migrations.AddField(
            model_name='bookdetail',
            name='updated_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='book_detail_updated_by', to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='bookcopy',
            name='book_detail',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='items.BookDetail'),
        ),
        migrations.AddField(
            model_name='bookcopy',
            name='created_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL),
        ),
        migrations.AddField(
            model_name='bookcopy',
            name='updated_by',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='book_copy_updated_by', to=settings.AUTH_USER_MODEL),
        ),
    ]

[(15, 'django.db.migrations.swappable_dependency', 'migrations.swappable_dependency', (['settings.AUTH_USER_MODEL'], {}), False, 'from django.db import migrations, models\n'), (109, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""items.Category"""'}), False, 'from django.db import migrations, models\n'), (114, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'to': 'settings.AUTH_USER_MODEL'}), False, 'from django.db import migrations, models\n'), (119, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""items.Language"""'}), False, 'from django.db import migrations, models\n'), (124, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""book_detail_updated_by"""', 'to': 'settings.AUTH_USER_MODEL'}), False, 'from django.db import migrations, models\n'), (129, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""items.BookDetail"""'}), False, 'from django.db import migrations, models\n'), (134, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'to': 'settings.AUTH_USER_MODEL'}), False, 'from django.db import migrations, models\n'), (139, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""book_copy_updated_by"""', 'to': 'settings.AUTH_USER_MODEL'}), False, 'from django.db import migrations, models\n'), (22, 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), False, 'from django.db import migrations, models\n'), (23, 'django.db.models.IntegerField', 'models.IntegerField', ([], {'choices': "[(1, 'Available'), (2, 'In Circulation'), (3, 'Temporarily Unavailable'), (\n    4, 'Unavailable'), (5, 'Protected'), (6, 'Damaged')]"}), False, 'from django.db import migrations, models\n'), (24, 'django.db.models.TextField', 'models.TextField', ([], {'blank': '(True)', 'default': '""""""'}), False, 'from django.db import migrations, models\n'), (25, 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), False, 'from django.db import migrations, models\n'), (26, 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now': '(True)'}), False, 'from django.db import migrations, models\n'), (32, 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), False, 'from django.db import migrations, models\n'), (33, 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(1024)'}), False, 'from django.db import migrations, models\n'), (34, 'django.db.models.CharField', 'models.CharField', ([], {'default': '"""Unknown"""', 'max_length': '(1024)'}), False, 'from django.db import migrations, models\n'), (35, 'django.db.models.TextField', 'models.TextField', ([], {'blank': '(True)', 'default': '""""""'}), False, 'from django.db import migrations, models\n'), (36, 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'default': '""""""', 'max_length': '(512)'}), False, 'from django.db import migrations, models\n'), (37, 'django.db.models.DateField', 'models.DateField', ([], {'blank': '(True)', 'null': '(True)'}), False, 'from django.db import migrations, models\n'), (38, 'django.db.models.PositiveIntegerField', 'models.PositiveIntegerField', ([], {'blank': '(True)', 'default': '(0)', 'null': '(True)'}), False, 'from django.db import migrations, models\n'), (39, 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'default': '""""""', 'max_length': '(1024)'}), False, 'from django.db import migrations, models\n'), (40, 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'default': '""""""', 'max_length': '(1024)'}), False, 'from django.db import migrations, models\n'), (41, 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'default': '""""""', 'max_length': '(1024)'}), False, 'from django.db import migrations, models\n'), (42, 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'max_length': '(1024)', 'null': '(True)'}), False, 'from django.db import migrations, models\n'), (43, 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), False, 'from django.db import migrations, models\n'), (44, 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now': '(True)'}), False, 'from django.db import migrations, models\n'), (50, 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), False, 'from django.db import migrations, models\n'), (51, 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(512)'}), False, 'from django.db import migrations, models\n'), (52, 'django.db.models.SlugField', 'models.SlugField', ([], {'max_length': '(128)', 'unique': '(True)'}), False, 'from django.db import migrations, models\n'), (53, 'django.db.models.TextField', 'models.TextField', ([], {'blank': '(True)', 'default': '""""""'}), False, 'from django.db import migrations, models\n'), (54, 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), False, 'from django.db import migrations, models\n'), (55, 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now': '(True)'}), False, 'from django.db import migrations, models\n'), (56, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'to': 'settings.AUTH_USER_MODEL'}), False, 'from django.db import migrations, models\n'), (57, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""category_updated_by"""', 'to': 'settings.AUTH_USER_MODEL'}), False, 'from django.db import migrations, models\n'), (63, 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), False, 'from django.db import migrations, models\n'), (64, 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(512)'}), False, 'from django.db import migrations, models\n'), (65, 'django.db.models.CharField', 'models.CharField', ([], {'db_index': '(True)', 'max_length': '(8)', 'unique': '(True)'}), False, 'from django.db import migrations, models\n'), (66, 'django.db.models.TextField', 'models.TextField', ([], {'blank': '(True)', 'default': '""""""'}), False, 'from django.db import migrations, models\n'), (67, 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), False, 'from django.db import migrations, models\n'), (68, 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now': '(True)'}), False, 'from django.db import migrations, models\n'), (69, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'to': 'settings.AUTH_USER_MODEL'}), False, 'from django.db import migrations, models\n'), (70, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""language_updated_by"""', 'to': 'settings.AUTH_USER_MODEL'}), False, 'from django.db import migrations, models\n'), (76, 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), False, 'from django.db import migrations, models\n'), (77, 'django.db.models.CharField', 'models.CharField', ([], {'max_length': '(1024)'}), False, 'from django.db import migrations, models\n'), (78, 'django.db.models.TextField', 'models.TextField', ([], {'blank': '(True)', 'default': '""""""'}), False, 'from django.db import migrations, models\n'), (79, 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'default': '""""""', 'max_length': '(512)'}), False, 'from django.db import migrations, models\n'), (80, 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'max_length': '(1024)', 'null': '(True)'}), False, 'from django.db import migrations, models\n'), (81, 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), False, 'from django.db import migrations, models\n'), (82, 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now': '(True)'}), False, 'from django.db import migrations, models\n'), (83, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""items.Category"""'}), False, 'from django.db import migrations, models\n'), (84, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'to': 'settings.AUTH_USER_MODEL'}), False, 'from django.db import migrations, models\n'), (85, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""items.Language"""'}), False, 'from django.db import migrations, models\n'), (86, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""periodical_updated_by"""', 'to': 'settings.AUTH_USER_MODEL'}), False, 'from django.db import migrations, models\n'), (92, 'django.db.models.AutoField', 'models.AutoField', ([], {'auto_created': '(True)', 'primary_key': '(True)', 'serialize': '(False)', 'verbose_name': '"""ID"""'}), False, 'from django.db import migrations, models\n'), (93, 'django.db.models.IntegerField', 'models.IntegerField', ([], {'choices': "[(1, 'Available'), (2, 'In Circulation'), (3, 'Temporarily Unavailable'), (\n    4, 'Unavailable'), (5, 'Protected'), (6, 'Damaged')]"}), False, 'from django.db import migrations, models\n'), (94, 'django.db.models.DateField', 'models.DateField', ([], {'blank': '(True)', 'null': '(True)'}), False, 'from django.db import migrations, models\n'), (95, 'django.db.models.PositiveIntegerField', 'models.PositiveIntegerField', ([], {'blank': '(True)', 'null': '(True)'}), False, 'from django.db import migrations, models\n'), (96, 'django.db.models.PositiveIntegerField', 'models.PositiveIntegerField', ([], {'blank': '(True)', 'null': '(True)'}), False, 'from django.db import migrations, models\n'), (97, 'django.db.models.TextField', 'models.TextField', ([], {'blank': '(True)', 'default': '""""""'}), False, 'from django.db import migrations, models\n'), (98, 'django.db.models.CharField', 'models.CharField', ([], {'blank': '(True)', 'max_length': '(1024)', 'null': '(True)'}), False, 'from django.db import migrations, models\n'), (99, 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now_add': '(True)'}), False, 'from django.db import migrations, models\n'), (100, 'django.db.models.DateTimeField', 'models.DateTimeField', ([], {'auto_now': '(True)'}), False, 'from django.db import migrations, models\n'), (101, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'to': 'settings.AUTH_USER_MODEL'}), False, 'from django.db import migrations, models\n'), (102, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'to': '"""items.Periodical"""'}), False, 'from django.db import migrations, models\n'), (103, 'django.db.models.ForeignKey', 'models.ForeignKey', ([], {'on_delete': 'django.db.models.deletion.CASCADE', 'related_name': '"""periodical_issue_updated_by"""', 'to': 'settings.AUTH_USER_MODEL'}), False, 'from django.db import migrations, models\n')]