# -*- coding: utf-8 -*-
# Generated by Django 1.9.2 on 2016-04-02 11:05
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='Graph',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256)),
                ('title', models.CharField(blank=True, max_length=256)),
                ('priority', models.IntegerField(default=0)),
                ('command', models.TextField()),
            ],
            options={
                'ordering': ['-priority'],
            },
        ),
        migrations.CreateModel(
            name='GraphGroup',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=256, unique=True)),
                ('title', models.CharField(max_length=256)),
            ],
        ),
        migrations.AddField(
            model_name='graph',
            name='group',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='graphs', to='collectd_rest.GraphGroup'),
        ),
        migrations.AlterUniqueTogether(
            name='graph',
            unique_together=set([('name', 'group')]),
        ),
    ]
