# -*- coding: utf-8 -*-
# Generated by Django 1.11 on 2017-04-08 16:35
from __future__ import unicode_literals

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


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Architecture',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=8, unique=True)),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='BasePackage',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('base_directory', models.FilePathField(allow_files=False, allow_folders=True, max_length=128, path='/home/alucryd/packages', recursive=True, unique=True)),
                ('name', models.CharField(max_length=32, null=True)),
                ('version', models.CharField(max_length=32, null=True)),
                ('building', models.BooleanField(default=False)),
                ('builds', models.BooleanField(default=False)),
                ('official', models.BooleanField(default=False)),
                ('architectures', models.ManyToManyField(to='django_pkgbuild.Architecture')),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Build',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('version', models.CharField(max_length=32)),
                ('target', models.CharField(max_length=32, null=True)),
                ('date', models.DateField(null=True)),
                ('architecture', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='django_pkgbuild.Architecture')),
                ('base_package', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='build_history', to='django_pkgbuild.BasePackage')),
            ],
        ),
        migrations.CreateModel(
            name='Package',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32)),
                ('virtual', models.BooleanField(default=False)),
                ('base_package', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='packages', to='django_pkgbuild.BasePackage')),
                ('provides', models.ManyToManyField(related_name='providers', to='django_pkgbuild.Package')),
            ],
            options={
                'ordering': ['name'],
            },
        ),
        migrations.CreateModel(
            name='Repository',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=32, unique=True)),
                ('description', models.CharField(max_length=256)),
                ('target', models.CharField(choices=[('extra', 'extra'), ('testing', 'testing'), ('stg', 'staging')], max_length=8, null=True)),
                ('multilib', models.BooleanField(default=False)),
                ('architectures', models.ManyToManyField(to='django_pkgbuild.Architecture')),
                ('packages', models.ManyToManyField(blank=True, to='django_pkgbuild.Package')),
            ],
            options={
                'verbose_name_plural': 'Repositories',
                'ordering': ['name'],
            },
        ),
        migrations.AddField(
            model_name='basepackage',
            name='build_depends',
            field=models.ManyToManyField(blank=True, related_name='reverse_build_depends', to='django_pkgbuild.Package'),
        ),
    ]
