This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class DisableMigrations(object): | |
def __contains__(self, item): | |
return True | |
def __getitem__(self, item): | |
return "notmigrations" | |
MIGRATION_MODULES = DisableMigrations() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# If your test settings file doesn't import any other settings file | |
# then you can use the function directly: | |
def prevent_tests_migrate(db): | |
import django | |
from django.db import connections | |
from django.db.migrations.executor import MigrationExecutor | |
django.setup() | |
ma = MigrationExecutor(connections[db]).loader.migrated_apps | |
return dict(zip(ma, ['{a}.notmigrations'.format(a=a) for a in ma])) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This has moved to... https://github.com/jasoncartwright/recruiterdomains |