diff --git a/django_migration_linter/management/commands/makemigrations.py b/django_migration_linter/management/commands/makemigrations.py index 72adf5e..16f9f82 100644 --- a/django_migration_linter/management/commands/makemigrations.py +++ b/django_migration_linter/management/commands/makemigrations.py @@ -30,11 +30,14 @@ class Command(MakeMigrationsCommand): def write_migration_files(self, changes): super(Command, self).write_migration_files(changes) + if ( not getattr(settings, "MIGRATION_LINTER_OVERRIDE_MAKEMIGRATIONS", False) and not self.lint ): return + if self.dry_run: + return # Lint migrations linter = MigrationLinter(