text: # -*- coding: utf-8 -*-
  # Generated by Django 1.9.5 on 2016-11-17 13:31
  from __future__ import unicode_literals
  
  from django.db import migrations, models
  import django.db.models.deletion
  
  
  class Migration(migrations.Migration):
  
      initial = True
  
      dependencies = [
          ('municipal_finance', '0001_initial'),
      ]
  
      operations = [
          migrations.CreateModel(
              name='AgedCreditorFacts',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('demarcation_code', models.TextField(blank=True, null=True)),
                  ('period_code', models.TextField(blank=True, null=True)),
                  ('g1_amount', models.BigIntegerField(blank=True, null=True)),
                  ('l1_amount', models.BigIntegerField(blank=True, null=True)),
                  ('l120_amount', models.BigIntegerField(blank=True, null=True)),
                  ('l150_amount', models.BigIntegerField(blank=True, null=True)),
                  ('l180_amount', models.BigIntegerField(blank=True, null=True)),
                  ('l30_amount', models.BigIntegerField(blank=True, null=True)),
                  ('l60_amount', models.BigIntegerField(blank=True, null=True)),
                  ('l90_amount', models.BigIntegerField(blank=True, null=True)),
                  ('total_amount', models.BigIntegerField(blank=True, null=True)),
                  ('financial_year', models.IntegerField()),
                  ('period_length', models.TextField()),
                  ('financial_period', models.IntegerField()),
                  ('amount_type_code', models.TextField()),
              ],
              options={
                  'db_table': 'aged_creditor_facts',
              },
          ),
          migrations.CreateModel(
              name='AgedCreditorItems',
              fields=[
                  ('code', models.TextField(primary_key=True, serialize=False)),
                  ('label', models.TextField(blank=True, null=True)),
                  ('position_in_return_form', models.IntegerField(blank=True, null=True)),
                  ('return_form_structure', models.TextField(blank=True, null=True)),
                  ('composition', models.TextField(blank=True, null=True)),
              ],
              options={
                  'db_table': 'aged_creditor_items',
              },
          ),
          migrations.CreateModel(
              name='AgedDebtorFacts',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('demarcation_code', models.TextField(blank=True, null=True)),
                  ('period_code', models.TextField(blank=True, null=True)),
                  ('customer_group_code', models.TextField(blank=True, null=True)),
                  ('bad_amount', models.BigIntegerField(blank=True, null=True)),
                  ('badi_amount', models.BigIntegerField(blank=True, null=True)),
                  ('g1_amount', models.BigIntegerField(blank=True, null=True)),
                  ('l1_amount', models.BigIntegerField(blank=True, null=True)),
                  ('l120_amount', models.BigIntegerField(blank=True, null=True)),
                  ('l150_amount', models.BigIntegerField(blank=True, null=True)),
                  ('l180_amount', models.BigIntegerField(blank=True, null=True)),
                  ('l30_amount', models.BigIntegerField(blank=True, null=True)),
                  ('l60_amount', models.BigIntegerField(blank=True, null=True)),
                  ('l90_amount', models.BigIntegerField(blank=True, null=True)),
                  ('total_amount', models.BigIntegerField(blank=True, null=True)),
                  ('financial_year', models.IntegerField()),
                  ('period_length', models.TextField()),
                  ('financial_period', models.IntegerField()),
                  ('amount_type_code', models.TextField()),
              ],
              options={
                  'db_table': 'aged_debtor_facts',
              },
          ),
          migrations.CreateModel(
              name='AgedDebtorItems',
              fields=[
                  ('code', models.TextField(primary_key=True, serialize=False)),
                  ('label', models.TextField(blank=True, null=True)),
                  ('position_in_return_form', models.IntegerField(blank=True, null=True)),
                  ('return_form_structure', models.TextField(blank=True, null=True)),
                  ('composition', models.TextField(blank=True, null=True)),
              ],
              options={
                  'db_table': 'aged_debtor_items',
              },
          ),
          migrations.CreateModel(
              name='AmountType',
              fields=[
                  ('code', models.TextField(primary_key=True, serialize=False)),
                  ('label', models.TextField(blank=True, null=True)),
              ],
              options={
                  'db_table': 'amount_type',
              },
          ),
          migrations.CreateModel(
              name='AuditOpinionFacts',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('demarcation_code', models.TextField()),
                  ('financial_year', models.IntegerField()),
                  ('opinion_code', models.TextField()),
                  ('opinion_label', models.TextField()),
                  ('report_url', models.TextField(blank=True, null=True)),
              ],
              options={
                  'db_table': 'audit_opinion_facts',
              },
          ),
          migrations.CreateModel(
              name='AuditOpinions',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('demarcation_code', models.TextField()),
                  ('financial_year', models.TextField()),
                  ('opinion_code', models.TextField()),
                  ('opinion_label', models.TextField()),
              ],
              options={
                  'db_table': 'audit_opinions',
              },
          ),
          migrations.CreateModel(
              name='BsheetFacts',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('demarcation_code', models.TextField()),
                  ('period_code', models.TextField()),
                  ('amount', models.BigIntegerField(blank=True, null=True)),
                  ('financial_year', models.IntegerField()),
                  ('period_length', models.TextField()),
                  ('financial_period', models.IntegerField()),
                  ('amount_type_code', models.TextField()),
              ],
              options={
                  'db_table': 'bsheet_facts',
              },
          ),
          migrations.CreateModel(
              name='BsheetItems',
              fields=[
                  ('code', models.TextField(primary_key=True, serialize=False)),
                  ('label', models.TextField(blank=True, null=True)),
                  ('position_in_return_form', models.IntegerField(blank=True, null=True)),
                  ('return_form_structure', models.TextField(blank=True, null=True)),
                  ('composition', models.TextField(blank=True, null=True)),
              ],
              options={
                  'db_table': 'bsheet_items',
              },
          ),
          migrations.CreateModel(
              name='CapitalFacts',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('demarcation_code', models.TextField(blank=True, null=True)),
                  ('period_code', models.TextField(blank=True, null=True)),
                  ('new_assets', models.BigIntegerField(blank=True, null=True)),
                  ('renewal_of_existing', models.BigIntegerField(blank=True, null=True)),
                  ('total_assets', models.BigIntegerField(blank=True, null=True)),
                  ('repairs_maintenance', models.BigIntegerField(blank=True, null=True)),
                  ('asset_register_summary', models.BigIntegerField(blank=True, null=True)),
                  ('financial_year', models.IntegerField()),
                  ('period_length', models.TextField()),
                  ('financial_period', models.IntegerField()),
                  ('amount_type_code', models.TextField()),
              ],
              options={
                  'db_table': 'capital_facts',
              },
          ),
          migrations.CreateModel(
              name='CapitalItems',
              fields=[
                  ('code', models.TextField(primary_key=True, serialize=False)),
                  ('label', models.TextField(blank=True, null=True)),
                  ('position_in_return_form', models.IntegerField(blank=True, null=True)),
                  ('return_form_structure', models.TextField(blank=True, null=True)),
                  ('composition', models.TextField(blank=True, null=True)),
              ],
              options={
                  'db_table': 'capital_items',
              },
          ),
          migrations.CreateModel(
              name='CflowFacts',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('demarcation_code', models.TextField(blank=True, null=True)),
                  ('period_code', models.TextField(blank=True, null=True)),
                  ('amount', models.BigIntegerField(blank=True, null=True)),
                  ('amount_type_code', models.TextField()),
                  ('financial_year', models.IntegerField()),
                  ('period_length', models.TextField()),
                  ('financial_period', models.IntegerField()),
              ],
              options={
                  'db_table': 'cflow_facts',
              },
          ),
          migrations.CreateModel(
              name='CflowItems',
              fields=[
                  ('code', models.TextField(primary_key=True, serialize=False)),
                  ('label', models.TextField(blank=True, null=True)),
                  ('position_in_return_form', models.IntegerField(blank=True, null=True)),
                  ('return_form_structure', models.TextField(blank=True, null=True)),
                  ('composition', models.TextField(blank=True, null=True)),
              ],
              options={
                  'db_table': 'cflow_items',
              },
          ),
          migrations.CreateModel(
              name='ConditionalGrants',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('code', models.TextField(blank=True, null=True)),
                  ('name', models.TextField(blank=True, null=True)),
              ],
              options={
                  'db_table': 'conditional_grants',
              },
          ),
          migrations.CreateModel(
              name='ConditionalGrantsFacts',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('demarcation_code', models.TextField(blank=True, null=True)),
                  ('period_code', models.TextField(blank=True, null=True)),
                  ('grant_code', models.TextField(blank=True, null=True)),
                  ('amount', models.BigIntegerField(blank=True, null=True)),
                  ('amount_type_code', models.TextField()),
                  ('financial_year', models.IntegerField()),
                  ('period_length', models.TextField()),
                  ('financial_period', models.IntegerField()),
              ],
              options={
                  'db_table': 'conditional_grants_facts',
              },
          ),
          migrations.CreateModel(
              name='GovernmentFunctions',
              fields=[
                  ('code', models.TextField(primary_key=True, serialize=False)),
                  ('label', models.TextField(blank=True, null=True)),
                  ('category_label', models.TextField(blank=True, null=True)),
                  ('subcategory_label', models.TextField(blank=True, null=True)),
              ],
              options={
                  'db_table': 'government_functions',
              },
          ),
          migrations.CreateModel(
              name='IncexpFacts',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('demarcation_code', models.TextField(blank=True, null=True)),
                  ('period_code', models.TextField(blank=True, null=True)),
                  ('function_code', models.TextField(blank=True, null=True)),
                  ('item_code', models.TextField(blank=True, null=True)),
                  ('amount', models.BigIntegerField(blank=True, null=True)),
                  ('financial_year', models.IntegerField()),
                  ('period_length', models.TextField()),
                  ('financial_period', models.IntegerField()),
                  ('amount_type_code', models.TextField()),
              ],
              options={
                  'db_table': 'incexp_facts',
              },
          ),
          migrations.CreateModel(
              name='IncexpItems',
              fields=[
                  ('code', models.TextField(primary_key=True, serialize=False)),
                  ('label', models.TextField(blank=True, null=True)),
                  ('position_in_return_form', models.IntegerField(blank=True, null=True)),
                  ('return_form_structure', models.TextField(blank=True, null=True)),
                  ('composition', models.TextField(blank=True, null=True)),
              ],
              options={
                  'db_table': 'incexp_items',
              },
          ),
          migrations.CreateModel(
              name='MunicipalityStaffContacts',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('demarcation_code', models.TextField(blank=True, null=True)),
                  ('role', models.TextField(blank=True, null=True)),
                  ('title', models.TextField(blank=True, null=True)),
                  ('name', models.TextField(blank=True, null=True)),
                  ('office_number', models.TextField(blank=True, null=True)),
                  ('fax_number', models.TextField(blank=True, null=True)),
                  ('email_address', models.TextField(blank=True, null=True)),
              ],
              options={
                  'db_table': 'municipality_staff_contacts',
              },
          ),
          migrations.CreateModel(
              name='RepmaintFacts',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('demarcation_code', models.TextField(blank=True, null=True)),
                  ('period_code', models.TextField(blank=True, null=True)),
                  ('item_code', models.TextField(blank=True, null=True)),
                  ('amount', models.BigIntegerField(blank=True, null=True)),
                  ('financial_year', models.IntegerField()),
                  ('period_length', models.TextField()),
                  ('financial_period', models.IntegerField()),
                  ('amount_type_code', models.TextField()),
              ],
              options={
                  'db_table': 'repmaint_facts',
              },
          ),
          migrations.CreateModel(
              name='RepmaintItems',
              fields=[
                  ('code', models.TextField(primary_key=True, serialize=False)),
                  ('label', models.TextField(blank=True, null=True)),
                  ('position_in_return_form', models.IntegerField(blank=True, null=True)),
                  ('return_form_structure', models.TextField(blank=True, null=True)),
                  ('composition', models.TextField(blank=True, null=True)),
              ],
              options={
                  'db_table': 'repmaint_items',
              },
          ),
          migrations.CreateModel(
              name='UifwexpFacts',
              fields=[
                  ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                  ('demarcation_code', models.TextField(blank=True, null=True)),
                  ('financial_year', models.IntegerField(blank=True, null=True)),
                  ('item_code', models.TextField(blank=True, null=True)),
                  ('item_label', models.TextField(blank=True, null=True)),
                  ('amount', models.BigIntegerField(blank=True, null=True)),
              ],
              options={
                  'db_table': 'uifwexp_facts',
              },
          ),
          migrations.AlterUniqueTogether(
              name='uifwexpfacts',
              unique_together=set([('demarcation_code', 'financial_year', 'item_code')]),
          ),
          migrations.AlterUniqueTogether(
              name='repmaintfacts',
              unique_together=set([('demarcation_code', 'period_code', 'item_code')]),
          ),
          migrations.AlterUniqueTogether(
              name='incexpfacts',
              unique_together=set([('demarcation_code', 'period_code', 'function_code', 'item_code')]),
          ),
          migrations.AlterUniqueTogether(
              name='conditionalgrantsfacts',
              unique_together=set([('demarcation_code', 'period_code', 'grant_code')]),
          ),
          migrations.AddField(
              model_name='cflowfacts',
              name='item_code',
              field=models.ForeignKey(blank=True, db_column='item_code', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='municipal_finance.CflowItems'),
          ),
          migrations.AddField(
              model_name='capitalfacts',
              name='function_code',
              field=models.ForeignKey(blank=True, db_column='function_code', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='municipal_finance.GovernmentFunctions'),
          ),
          migrations.AddField(
              model_name='capitalfacts',
              name='item_code',
              field=models.ForeignKey(blank=True, db_column='item_code', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='municipal_finance.CapitalItems'),
          ),
          migrations.AddField(
              model_name='bsheetfacts',
              name='item_code',
              field=models.ForeignKey(blank=True, db_column='item_code', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='municipal_finance.BsheetItems'),
          ),
          migrations.AlterUniqueTogether(
              name='auditopinions',
              unique_together=set([('demarcation_code', 'financial_year')]),
          ),
          migrations.AddField(
              model_name='ageddebtorfacts',
              name='item_code',
              field=models.ForeignKey(blank=True, db_column='item_code', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='municipal_finance.AgedDebtorItems'),
          ),
          migrations.AddField(
              model_name='agedcreditorfacts',
              name='item_code',
              field=models.ForeignKey(blank=True, db_column='item_code', null=True, on_delete=django.db.models.deletion.DO_NOTHING, to='municipal_finance.AgedCreditorItems'),
          ),
          migrations.AlterUniqueTogether(
              name='cflowfacts',
              unique_together=set([('demarcation_code', 'period_code', 'item_code')]),
          ),
          migrations.AlterUniqueTogether(
              name='capitalfacts',
              unique_together=set([('demarcation_code', 'period_code', 'function_code', 'item_code')]),
          ),
          migrations.AlterUniqueTogether(
              name='bsheetfacts',
              unique_together=set([('demarcation_code', 'period_code', 'item_code')]),
          ),
          migrations.AlterUniqueTogether(
              name='ageddebtorfacts',
              unique_together=set([('demarcation_code', 'period_code', 'customer_group_code', 'item_code')]),
          ),
      ]
  