# Generated by Django 3.1.5 on 2021-01-19 10:35 from django.db import migrations, models import django.db.models.deletion class Migration(migrations.Migration): initial = True dependencies = [ ] operations = [ migrations.CreateModel( name='XMLElement', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=80)), ('description', models.TextField(blank=True)), ('slug', models.CharField(max_length=80, unique=True)), ('is_featured', models.BooleanField(default=False)), ], options={ 'db_table': 'xml_elements', 'verbose_name': 'XML element', 'verbose_name_plural': 'XML elements', }, ), migrations.CreateModel( name='DataType', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=80)), ('slug', models.CharField(max_length=80, unique=True)), ('description', models.TextField(blank=True)), ('is_featured', models.BooleanField(default=False)), ], options={ 'db_table': 'data_types', }, ), migrations.CreateModel( name='XMLRelationship', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('min_amount', models.IntegerField(blank=True, null=True)), ('max_amount', models.IntegerField(blank=True, null=True)), ('child', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='child_rel', to='spec.xmlelement')), ('parent', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='parent_rel', to='spec.xmlelement')), ], options={ 'db_table': 'xml_relationships', }, ), migrations.CreateModel( name='ExampleDocument', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=300)), ('slug', models.CharField(max_length=100, unique=True)), ('blurb', models.TextField(blank=True)), ('document', models.TextField()), ('image_url', models.CharField(blank=True, max_length=300)), ('is_featured', models.BooleanField(default=False)), ], options={ 'db_table': 'example_documents', }, ), migrations.CreateModel( name='Concept', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100)), ('slug', models.CharField(max_length=100, unique=True)), ('description', models.TextField(blank=True)), ('is_featured', models.BooleanField(default=False)), ], options={ 'db_table': 'concepts', }, ), migrations.CreateModel( name='ExampleDocumentConcept', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('concept', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='spec.concept')), ('example', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='spec.exampledocument')), ], options={ 'db_table': 'example_concepts', }, ), migrations.CreateModel( name='ElementConcept', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('concept', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='spec.concept')), ('element', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='spec.xmlelement')), ], options={ 'db_table': 'element_concepts', }, ), migrations.CreateModel( name='XMLAttribute', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=80)), ('is_required', models.BooleanField()), ('description', models.TextField(blank=True)), ('element', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='spec.xmlelement')), ('data_type', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, to='spec.datatype')), ], options={ 'db_table': 'xml_attributes', 'verbose_name': 'XML attribute', 'verbose_name_plural': 'XML attributes', }, ), ]