# -*- coding: utf-8 -*-
# Generated by Django 1.9.13 on 2017-08-24 08:32
from __future__ import unicode_literals

from django.db import migrations, models
from django.db.migrations import SeparateDatabaseAndState
import django.db.models.deletion
TABLES = [
    'Activity',
    'ValueType',
    'VerificationStatus',
    'Title',
    'Location',
    'Transaction',

    'BudgetIdentifier',
    'BudgetIdentifierSector',
    'BudgetIdentifierSectorCategory',
    'BudgetIdentifierVocabulary',

    'ContactType',
    'CountryBudgetItem',
    'CrsAdd',
    'CrsAddLoanStatus',
    'CrsAddLoanTerms',
    'Ffs',
    'FfsForecast',

    'GeographicVocabulary',
    'GeographicalPrecision',
    'GazetteerAgency',
    'GeographicLocationReach',
    'GeographicExactness',

    'LoanRepaymentPeriod',
    'LoanRepaymentType',
    'OrganisationIdentifier',
    'OrganisationRegistrationAgency',
    'PublisherType',
]


class Migration(migrations.Migration):

    dependencies = [
        ('iati', '0023_iati_to_aims_altertables'),
        ('aims', '0045_prepare_move_oldaims_aims')
    ]
    state_operations = [migrations.DeleteModel(model) for model in TABLES]

    operations = [

        migrations.AlterField(
            model_name='Location',
            name='gazetteer_ref',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE,
                                    to='aims.GazetteerAgency'),
        ),
        migrations.AlterField(
            model_name='Location',
            name='precision',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE,
                                    to='aims.GeographicalPrecision'),
        ),
        migrations.AlterField(
            model_name='Location',
            name='exactness',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE,
                                    to='aims.GeographicExactness'),
        ),
        migrations.AlterField(
            model_name='Location',
            name='location_reach',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE,
                                    to='aims.GeographicLocationReach'),
        ),
        migrations.AlterField(
            model_name='location',
            name='adm_vocabulary',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE,
                                    related_name='administrative_vocabulary', to='aims.GeographicVocabulary'),
        ),
        migrations.AlterField(
            model_name='location',
            name='location_id_vocabulary',
            field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE,
                                    related_name='location_id_vocabulary', to='aims.GeographicVocabulary'),
        ),

        SeparateDatabaseAndState(None, state_operations)
    ]
