uccser/cs-field-guide

View on GitHub
csfieldguide/curriculum_guides/migrations/0001_initial.py

Summary

Maintainability
A
0 mins
Test Coverage
# -*- coding: utf-8 -*-
# Generated by Django 1.11.16 on 2019-06-13 00:43
from __future__ import unicode_literals

import django.contrib.postgres.fields
from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
        ('interactives', '0013_interactive_is_interactive'),
    ]

    operations = [
        migrations.CreateModel(
            name='CurriculumGuide',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('languages', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=10), default=[], size=None)),
                ('slug', models.SlugField(unique=True)),
                ('name', models.CharField(default='', max_length=100)),
                ('name_en', models.CharField(default='', max_length=100, null=True)),
                ('name_de', models.CharField(default='', max_length=100, null=True)),
                ('name_es', models.CharField(default='', max_length=100, null=True)),
                ('number', models.SmallIntegerField(unique=True)),
                ('introduction', models.TextField(default='')),
                ('introduction_en', models.TextField(default='', null=True)),
                ('introduction_de', models.TextField(default='', null=True)),
                ('introduction_es', models.TextField(default='', null=True)),
                ('icon', models.CharField(max_length=100)),
                ('interactives', models.ManyToManyField(related_name='curriculum_guide', to='interactives.Interactive')),
            ],
            options={
                'verbose_name': 'Curriculum Guide',
                'verbose_name_plural': 'Curriculum Guides',
                'ordering': ['number'],
            },
        ),
        migrations.CreateModel(
            name='CurriculumGuideSection',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('languages', django.contrib.postgres.fields.ArrayField(base_field=models.CharField(max_length=10), default=[], size=None)),
                ('slug', models.SlugField()),
                ('name', models.CharField(default='', max_length=100)),
                ('name_en', models.CharField(default='', max_length=100, null=True)),
                ('name_de', models.CharField(default='', max_length=100, null=True)),
                ('name_es', models.CharField(default='', max_length=100, null=True)),
                ('number', models.SmallIntegerField()),
                ('content', models.TextField(default='')),
                ('content_en', models.TextField(default='', null=True)),
                ('content_de', models.TextField(default='', null=True)),
                ('content_es', models.TextField(default='', null=True)),
                ('curriculum_guide', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='curriculum_guide_sections', to='curriculum_guides.CurriculumGuide')),
            ],
            options={
                'verbose_name': 'Curriculum Guide section',
                'verbose_name_plural': 'Curriculum Guide sections',
                'ordering': ['number'],
            },
        ),
    ]