From 686d750ad935b032dda79fc73414079430e8c698 Mon Sep 17 00:00:00 2001 From: Jeff Bradberry Date: Mon, 3 May 2021 11:01:52 -0400 Subject: [PATCH] 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. --- awx/main/management/commands/check_migrations.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/awx/main/management/commands/check_migrations.py b/awx/main/management/commands/check_migrations.py index b48d130bad..42dcfc891b 100644 --- a/awx/main/management/commands/check_migrations.py +++ b/awx/main/management/commands/check_migrations.py @@ -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