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

from django.db import migrations, models
import django.db.models.deletion
import wq.db.patterns.file.models


class Migration(migrations.Migration):

    initial = True

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

    operations = [
        migrations.CreateModel(
            name='File',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(blank=True, max_length=255, null=True)),
                ('file', wq.db.patterns.file.models.FileField(height_field='height', upload_to='.', width_field='width')),
                ('size', models.IntegerField(blank=True, null=True)),
                ('width', models.IntegerField(blank=True, null=True)),
                ('height', models.IntegerField(blank=True, null=True)),
                ('object_id', models.PositiveIntegerField(db_index=True)),
                ('content_type', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='contenttypes.ContentType')),
            ],
            options={
                'db_table': 'wq_file',
                'ordering': ('name',),
            },
        ),
        migrations.CreateModel(
            name='FileType',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=255)),
                ('mimetype', models.CharField(max_length=255)),
            ],
            options={
                'db_table': 'wq_filetype',
            },
        ),
        migrations.AddField(
            model_name='file',
            name='type',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='file.FileType'),
        ),
    ]
