mirror of
https://github.com/ansible/awx.git
synced 2026-01-18 13:11:19 -03:30
Make the check_migrations command a direct alias of makemigration
It already more or less was, but it previously did some machinations around copying and modifying the database settings. These on-the-fly changes to the database connection no longer work after the rearrangement of settings files, so let's just get rid of it.
This commit is contained in:
parent
72a940bef1
commit
686d750ad9
@ -1,13 +1,5 @@
|
||||
from django.db import connections
|
||||
from django.db.backends.sqlite3.base import DatabaseWrapper
|
||||
from django.core.management.commands.makemigrations import Command as MakeMigrations
|
||||
|
||||
|
||||
class Command(MakeMigrations):
|
||||
def execute(self, *args, **options):
|
||||
settings = connections['default'].settings_dict.copy()
|
||||
settings['ENGINE'] = 'sqlite3'
|
||||
if 'application_name' in settings['OPTIONS']:
|
||||
del settings['OPTIONS']['application_name']
|
||||
connections['default'] = DatabaseWrapper(settings)
|
||||
return MakeMigrations().execute(*args, **options)
|
||||
pass
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user