# -*- coding: utf-8 -*-
# Generated by Django 1.10 on 2017-01-28 14:04
from __future__ import unicode_literals

import content.models
import content.storage
from django.db import migrations, models
import django.db.models.deletion
import uuid


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Albumn',
            fields=[
                ('id', models.CharField(default=uuid.uuid4, max_length=64, primary_key=True, serialize=False, verbose_name='Activation key')),
                ('name', models.CharField(db_index=True, max_length=60, unique=True)),
                ('weight', models.IntegerField(default=0)),
                ('slug', models.SlugField(max_length=150, unique=True)),
                ('created', models.DateTimeField(auto_now_add=True, db_index=True)),
                ('active', models.BooleanField(default=True)),
            ],
            options={
                'db_table': 'albumns',
            },
        ),
        migrations.CreateModel(
            name='Block',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('code', models.CharField(blank=True, max_length=64, null=True, unique=True)),
                ('content', models.TextField(blank=True, null=True)),
                ('locale', models.CharField(choices=[('en', 'English'), ('zh', 'Chinese')], default=b'en', max_length=2)),
            ],
            options={
                'db_table': 'blocks',
            },
        ),
        migrations.CreateModel(
            name='Image',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=60, null=True)),
                ('image_key', models.CharField(default=uuid.uuid4, max_length=64, verbose_name='Activation key')),
                ('image', models.ImageField(storage=content.storage.OverwriteStorage(), upload_to=content.models.image_upload_path)),
                ('created', models.DateTimeField(auto_now_add=True)),
                ('active', models.BooleanField(default=True)),
                ('weight', models.IntegerField(default=0)),
                ('albumn', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='content.Albumn')),
            ],
            options={
                'db_table': 'images',
            },
        ),
        migrations.CreateModel(
            name='Page',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=32, null=True, unique=True)),
            ],
            options={
                'db_table': 'pages',
            },
        ),
        migrations.AddField(
            model_name='block',
            name='page',
            field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='content.Page'),
        ),
    ]
