mirror of
https://github.com/ansible/awx.git
synced 2026-05-14 12:57:40 -02: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:
@@ -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
|
from django.core.management.commands.makemigrations import Command as MakeMigrations
|
||||||
|
|
||||||
|
|
||||||
class Command(MakeMigrations):
|
class Command(MakeMigrations):
|
||||||
def execute(self, *args, **options):
|
pass
|
||||||
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)
|
|
||||||
|
|||||||
Reference in New Issue
Block a user