from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('afip', '0020_backfill_receiptvalidation__processed_date'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='receipt',
            name='batch',
        ),
        migrations.RemoveField(
            model_name='receiptvalidation',
            name='validation',
        ),
        migrations.AlterField(
            model_name='receiptvalidation',
            name='processed_date',
            field=models.DateTimeField(verbose_name='processed date'),
        ),
        migrations.DeleteModel(
            name='ReceiptBatch',
        ),
        migrations.DeleteModel(
            name='Validation',
        ),
    ]

from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('afip', '0020_backfill_receiptvalidation__processed_date'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='receipt',
            name='batch',
        ),
        migrations.RemoveField(
            model_name='receiptvalidation',
            name='validation',
        ),
        migrations.AlterField(
            model_name='receiptvalidation',
            name='processed_date',
            field=models.DateTimeField(verbose_name='processed date'),
        ),
        migrations.DeleteModel(
            name='Validation',
        ),
        migrations.DeleteModel(
            name='ReceiptBatch',
        ),
    ]

Tweak a migration to run on non-transactional DBs
Tweak a migration to run on non-transactional DBs

A single migration failed to run on databases with no support for
transactions because those require explicit ordering of commands that's
generally implicit on modern relational DBs.

Switch the order of those queries to prevent that crash.

Fixes #27

  from __future__ import unicode_literals
  
  from django.db import migrations, models
  
  
  class Migration(migrations.Migration):
  
      dependencies = [
          ('afip', '0020_backfill_receiptvalidation__processed_date'),
      ]
  
      operations = [
          migrations.RemoveField(
              model_name='receipt',
              name='batch',
          ),
          migrations.RemoveField(
              model_name='receiptvalidation',
              name='validation',
          ),
          migrations.AlterField(
              model_name='receiptvalidation',
              name='processed_date',
              field=models.DateTimeField(verbose_name='processed date'),
          ),
          migrations.DeleteModel(
-             name='ReceiptBatch',
+             name='Validation',
          ),
          migrations.DeleteModel(
-             name='Validation',
+             name='ReceiptBatch',
          ),
      ]
  
Tweak a migration to run on non-transactional DBs
## Code Before:
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('afip', '0020_backfill_receiptvalidation__processed_date'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='receipt',
            name='batch',
        ),
        migrations.RemoveField(
            model_name='receiptvalidation',
            name='validation',
        ),
        migrations.AlterField(
            model_name='receiptvalidation',
            name='processed_date',
            field=models.DateTimeField(verbose_name='processed date'),
        ),
        migrations.DeleteModel(
            name='ReceiptBatch',
        ),
        migrations.DeleteModel(
            name='Validation',
        ),
    ]

## Instruction:
Tweak a migration to run on non-transactional DBs
## Code After:
from __future__ import unicode_literals

from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('afip', '0020_backfill_receiptvalidation__processed_date'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='receipt',
            name='batch',
        ),
        migrations.RemoveField(
            model_name='receiptvalidation',
            name='validation',
        ),
        migrations.AlterField(
            model_name='receiptvalidation',
            name='processed_date',
            field=models.DateTimeField(verbose_name='processed date'),
        ),
        migrations.DeleteModel(
            name='Validation',
        ),
        migrations.DeleteModel(
            name='ReceiptBatch',
        ),
    ]
