# -*- coding: utf-8 -*-
# Generated by Django 1.9.4 on 2016-05-02 21:53
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('repository', '0001_initial'),
    ]

    operations = [
        migrations.CreateModel(
            name='Object',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('date_created', models.DateTimeField(verbose_name='date created')),
            ],
        ),
        migrations.CreateModel(
            name='File',
            fields=[
                ('object_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='object.Object')),
                ('name', models.CharField(max_length=100)),
                ('size', models.IntegerField(default=0)),
            ],
            bases=('object.object',),
        ),
        migrations.CreateModel(
            name='Folder',
            fields=[
                ('object_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='object.Object')),
                ('name', models.CharField(max_length=100)),
                ('repository_folder', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='repository_folder', to='repository.Repository')),
                ('subfolder', models.ForeignKey(blank=True, default=None, null=True, on_delete=django.db.models.deletion.CASCADE, to='object.Folder')),
            ],
            bases=('object.object',),
        ),
        migrations.AddField(
            model_name='file',
            name='folder_obj',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='folder_obj', to='object.Folder'),
        ),
    ]
