From 0c66b1cdfa14eba922b79c780a9ed3957b0d443b Mon Sep 17 00:00:00 2001 From: Serj Zavadsky Date: Tue, 29 Jan 2019 17:08:42 +0100 Subject: [PATCH] IgnoreMigration operation fix (postgres compatibility fix) --- django_migration_linter/operations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/django_migration_linter/operations.py b/django_migration_linter/operations.py index 344bc73..883355d 100644 --- a/django_migration_linter/operations.py +++ b/django_migration_linter/operations.py @@ -14,7 +14,7 @@ from django.db.migrations.operations.base import Operation -IGNORE_MIGRATION_SQL = "select 1;" +IGNORE_MIGRATION_SQL = "select 1; -- dml ignores this migration" class IgnoreMigration(Operation): @@ -30,7 +30,7 @@ class IgnoreMigration(Operation): schema_editor.execute(IGNORE_MIGRATION_SQL) def database_backwards(self, app_label, schema_editor, from_state, to_state): - schema_editor.execute(IGNORE_MIGRATION_SQL) + schema_editor.execute(IGNORE_MIGRATION_SQL + "(reversed)") def describe(self): return "The Django migration linter will ignore this migration"