text: # -*- coding: utf-8 -*-
  # Generated by Django 1.9.7 on 2017-05-16 22:32
  from __future__ import unicode_literals
  
  import django.db.models.deletion
  import jsonfield.fields
  import kolibri.content.models
  import mptt.fields
  from django.db import migrations, models
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
      ]
  
      operations = [
          migrations.CreateModel(
              name='AssessmentMetaData',
              fields=[
                  ('id', kolibri.content.models.UUIDField(primary_key=True, serialize=False)),
                  ('assessment_item_ids', jsonfield.fields.JSONField(default=[])),
                  ('number_of_assessments', models.IntegerField()),
                  ('mastery_model', jsonfield.fields.JSONField(default={})),
                  ('randomize', models.BooleanField(default=False)),
                  ('is_manipulable', models.BooleanField(default=False)),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='ChannelMetadata',
              fields=[
                  ('id', kolibri.content.models.UUIDField(primary_key=True, serialize=False)),
                  ('name', models.CharField(max_length=200)),
                  ('description', models.CharField(blank=True, max_length=400)),
                  ('author', models.CharField(blank=True, max_length=400)),
                  ('version', models.IntegerField(default=0)),
                  ('thumbnail', models.TextField(blank=True)),
                  ('root_pk', kolibri.content.models.UUIDField()),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='ChannelMetadataCache',
              fields=[
                  ('id', kolibri.content.models.UUIDField(primary_key=True, serialize=False)),
                  ('name', models.CharField(max_length=200)),
                  ('description', models.CharField(blank=True, max_length=400)),
                  ('author', models.CharField(blank=True, max_length=400)),
                  ('version', models.IntegerField(default=0)),
                  ('thumbnail', models.TextField(blank=True)),
                  ('root_pk', kolibri.content.models.UUIDField()),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='ContentNode',
              fields=[
                  ('id', kolibri.content.models.UUIDField(primary_key=True, serialize=False)),
                  ('title', models.CharField(max_length=200)),
                  ('content_id', kolibri.content.models.UUIDField(db_index=True)),
                  ('description', models.CharField(blank=True, max_length=400, null=True)),
                  ('sort_order', models.FloatField(blank=True, null=True)),
                  ('license_owner', models.CharField(blank=True, max_length=200)),
                  ('author', models.CharField(blank=True, max_length=200)),
                  ('kind', models.CharField(blank=True, choices=[(b'topic', b'Topic'), (b'video', b'Video'), (b'audio', b'Audio'), (b'exercise', b'Exercise'), (b'document', b'Document'), (b'html5', b'HTML5 App')], max_length=200)),
                  ('available', models.BooleanField(default=False)),
                  ('stemmed_metaphone', models.CharField(blank=True, max_length=1800)),
                  ('lft', models.PositiveIntegerField(db_index=True, editable=False)),
                  ('rght', models.PositiveIntegerField(db_index=True, editable=False)),
                  ('tree_id', models.PositiveIntegerField(db_index=True, editable=False)),
                  ('level', models.PositiveIntegerField(db_index=True, editable=False)),
                  ('has_prerequisite', models.ManyToManyField(blank=True, related_name='prerequisite_for', to='content.ContentNode')),
              ],
              options={
                  'ordering': ('sort_order',),
              },
          ),
          migrations.CreateModel(
              name='ContentTag',
              fields=[
                  ('id', kolibri.content.models.UUIDField(primary_key=True, serialize=False)),
                  ('tag_name', models.CharField(blank=True, max_length=30)),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='File',
              fields=[
                  ('id', kolibri.content.models.UUIDField(primary_key=True, serialize=False)),
                  ('checksum', models.CharField(blank=True, max_length=400)),
                  ('extension', models.CharField(blank=True, choices=[(b'mp4', b'MP4 Video'), (b'vtt', b'VTT Subtitle'), (b'srt', b'SRT Subtitle'), (b'mp3', b'MP3 Audio'), (b'wav', b'WAV Audio'), (b'pdf', b'PDF Document'), (b'jpg', b'JPG Image'), (b'jpeg', b'JPEG Image'), (b'png', b'PNG Image'), (b'json', b'JSON'), (b'svg', b'SVG Image'), (b'perseus', b'Perseus Exercise'), (b'zip', b'HTML5 Zip')], max_length=40)),
                  ('available', models.BooleanField(default=False)),
                  ('file_size', models.IntegerField(blank=True, null=True)),
                  ('preset', models.CharField(blank=True, choices=[(b'high_res_video', b'High Resolution'), (b'low_res_video', b'Low Resolution'), (b'vector_video', b'Vectorized'), (b'video_thumbnail', b'Thumbnail'), (b'video_subtitle', b'Subtitle'), (b'audio', b'Audio'), (b'audio_thumbnail', b'Thumbnail'), (b'document', b'Document'), (b'document_thumbnail', b'Thumbnail'), (b'exercise', b'Exercise'), (b'exercise_thumbnail', b'Thumbnail'), (b'exercise_image', b'Exercise Image'), (b'exercise_graphie', b'Exercise Graphie'), (b'channel_thumbnail', b'Channel Thumbnail'), (b'html5_zip', b'HTML5 Zip'), (b'html5_thumbnail', b'HTML5 Thumbnail')], max_length=150)),
                  ('supplementary', models.BooleanField(default=False)),
                  ('thumbnail', models.BooleanField(default=False)),
                  ('priority', models.IntegerField(blank=True, null=True)),
                  ('contentnode', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='files', to='content.ContentNode')),
              ],
              options={
                  'ordering': ['priority'],
              },
          ),
          migrations.CreateModel(
              name='Language',
              fields=[
                  ('id', models.CharField(max_length=7, primary_key=True, serialize=False)),
                  ('lang_code', models.CharField(db_index=True, max_length=3)),
                  ('lang_subcode', models.CharField(blank=True, db_index=True, max_length=3, null=True)),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.CreateModel(
              name='License',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('license_name', models.CharField(max_length=50)),
                  ('license_description', models.CharField(blank=True, max_length=400, null=True)),
              ],
              options={
                  'abstract': False,
              },
          ),
          migrations.AddField(
              model_name='file',
              name='lang',
              field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='content.Language'),
          ),
          migrations.AddField(
              model_name='contentnode',
              name='license',
              field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='content.License'),
          ),
          migrations.AddField(
              model_name='contentnode',
              name='parent',
              field=mptt.fields.TreeForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='children', to='content.ContentNode'),
          ),
          migrations.AddField(
              model_name='contentnode',
              name='related',
              field=models.ManyToManyField(blank=True, related_name='_contentnode_related_+', to='content.ContentNode'),
          ),
          migrations.AddField(
              model_name='contentnode',
              name='tags',
              field=models.ManyToManyField(blank=True, related_name='tagged_content', to='content.ContentTag'),
          ),
          migrations.AddField(
              model_name='assessmentmetadata',
              name='contentnode',
              field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='assessmentmetadata', to='content.ContentNode'),
          ),
      ]
  