dms/jci/migrations/0001_initial.py

54 lines
2.1 KiB
Python

# -*- coding: utf-8 -*-
# Generated by Django 1.11.5 on 2017-09-15 07:54
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='Goal',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=50)),
],
),
migrations.CreateModel(
name='Standard',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('name', models.CharField(max_length=50)),
('acronym', models.CharField(max_length=50)),
('goal', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='goals', to='jci.Goal')),
('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='jci.Standard')),
],
options={
'abstract': False,
},
),
migrations.CreateModel(
name='StandardClosure',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('depth', models.IntegerField()),
('child', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='standardclosure_parents', to='jci.Standard')),
('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='standardclosure_children', to='jci.Standard')),
],
options={
'db_table': 'jci_standardclosure',
},
),
migrations.AlterUniqueTogether(
name='standardclosure',
unique_together=set([('parent', 'child')]),
),
]