# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-20 20:09
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('message_id', models.CharField(db_index=True, max_length=4096)),
                ('in_reply_to', models.CharField(blank=True, db_index=True, max_length=4096)),
                ('date', models.DateTimeField(db_index=True)),
                ('subject', models.CharField(max_length=4096)),
                ('stripped_subject', models.CharField(db_index=True, max_length=4096)),
                ('version', models.PositiveSmallIntegerField(default=0)),
                ('sender', models.CharField(db_index=True, max_length=4096)),
                ('receivers', models.TextField()),
                ('prefixes', models.TextField(blank=True)),
                ('is_series_head', models.BooleanField()),
                ('is_complete', models.BooleanField(default=False)),
                ('is_patch', models.BooleanField()),
                ('patch_num', models.PositiveSmallIntegerField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='MessageProperty',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256)),
                ('value', models.TextField(blank=True)),
                ('message', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Message')),
            ],
            options={
                'verbose_name_plural': 'Message Properties',
            },
        ),
        migrations.CreateModel(
            name='Module',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, unique=True)),
                ('enabled', models.BooleanField(default=True)),
                ('config', models.TextField(blank=True)),
            ],
        ),
        migrations.CreateModel(
            name='ModuleAsset',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=256, unique=True)),
                ('text', models.TextField(blank=True)),
                ('file', models.ImageField(blank=True, upload_to='module-asset')),
                ('module', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='api.Module')),
            ],
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=1024)),
                ('mailing_list', models.CharField(blank=True, max_length=4096)),
                ('url', models.CharField(blank=True, max_length=4096)),
                ('git', models.CharField(blank=True, max_length=4096)),
                ('description', models.TextField(blank=True)),
                ('logo', models.ImageField(blank=True, upload_to='logo')),
            ],
        ),
        migrations.AddField(
            model_name='message',
            name='project',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Project'),
        ),
        migrations.AlterUniqueTogether(
            name='messageproperty',
            unique_together=set([('message', 'name')]),
        ),
        migrations.AlterUniqueTogether(
            name='message',
            unique_together=set([('project', 'message_id')]),
        ),
    ]

# -*- coding: utf-8 -*-
# Generated by Django 1.9.6 on 2016-06-20 20:09
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Message',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('message_id', models.CharField(db_index=True, max_length=4096)),
                ('in_reply_to', models.CharField(blank=True, db_index=True, max_length=4096)),
                ('date', models.DateTimeField(db_index=True)),
                ('subject', models.CharField(max_length=4096)),
                ('stripped_subject', models.CharField(db_index=True, max_length=4096)),
                ('version', models.PositiveSmallIntegerField(default=0)),
                ('sender', models.CharField(db_index=True, max_length=4096)),
                ('receivers', models.TextField()),
                ('prefixes', models.TextField(blank=True)),
                ('is_series_head', models.BooleanField()),
                ('is_complete', models.BooleanField(default=False)),
                ('is_patch', models.BooleanField()),
                ('patch_num', models.PositiveSmallIntegerField(blank=True, null=True)),
            ],
        ),
        migrations.CreateModel(
            name='MessageProperty',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256)),
                ('value', models.TextField(blank=True)),
                ('message', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Message')),
            ],
            options={
                'verbose_name_plural': 'Message Properties',
            },
        ),
        migrations.CreateModel(
            name='Module',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=128, unique=True)),
                ('enabled', models.BooleanField(default=True)),
                ('config', models.TextField(blank=True)),
            ],
        ),
        migrations.CreateModel(
            name='ModuleAsset',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=256, unique=True)),
                ('text', models.TextField(blank=True)),
                ('file', models.ImageField(blank=True, upload_to='module-asset')),
                ('module', models.ForeignKey(blank=True, on_delete=django.db.models.deletion.CASCADE, to='api.Module')),
            ],
        ),
        migrations.CreateModel(
            name='Project',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(db_index=True, max_length=1024)),
                ('mailing_list', models.CharField(blank=True, max_length=4096)),
                ('url', models.CharField(blank=True, max_length=4096)),
                ('git', models.CharField(blank=True, max_length=4096)),
                ('description', models.TextField(blank=True)),
                ('logo', models.ImageField(blank=True, upload_to='logo')),
            ],
        ),
        migrations.AddField(
            model_name='message',
            name='project',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='api.Project'),
        ),
        migrations.AlterUniqueTogether(
            name='messageproperty',
            unique_together=set([('message', 'name')]),
        ),
        migrations.AlterUniqueTogether(
            name='message',
            unique_together=set([('project', 'message_id')]),
        ),
    ]

# -*- coding: utf-8 -*- # Generated by Django 1.9.6 on 2016-06-20 20:09