From 02127673f859b4a1d499c0b4055d5e29ee58093b Mon Sep 17 00:00:00 2001 From: Yagnesh1998 <127923546+Yagnesh1998@users.noreply.github.com> Date: Tue, 25 Jul 2023 19:38:37 +0530 Subject: [PATCH] feat: remove paver update_db in depr (#32832) --- pavelib/paver_tests/test_servers.py | 16 ---------------- pavelib/servers.py | 21 --------------------- 2 files changed, 37 deletions(-) diff --git a/pavelib/paver_tests/test_servers.py b/pavelib/paver_tests/test_servers.py index af60d247de29..dbbab3b00b6b 100644 --- a/pavelib/paver_tests/test_servers.py +++ b/pavelib/paver_tests/test_servers.py @@ -159,22 +159,6 @@ def test_celery(self, options): call_task("pavelib.servers.celery", options=options) assert self.task_messages == [EXPECTED_CELERY_COMMAND.format(settings=settings)] - @ddt.data( - [{}], - [{"settings": "aws"}], - ) - @ddt.unpack - def test_update_db(self, options): - """ - Test the "update_db" task. - """ - settings = options.get("settings", Env.DEVSTACK_SETTINGS) - call_task("pavelib.servers.update_db", options=options) - # pylint: disable=line-too-long - db_command = "NO_EDXAPP_SUDO=1 EDX_PLATFORM_SETTINGS_OVERRIDE={settings} /edx/bin/edxapp-migrate-{server} --traceback --pythonpath=. " - assert self.task_messages == [db_command.format(server='lms', settings=settings), - db_command.format(server='cms', settings=settings)] - @ddt.data( ["lms", {}], ["lms", {"settings": "aws"}], diff --git a/pavelib/servers.py b/pavelib/servers.py index 2571a287503a..1f82059a6d3c 100644 --- a/pavelib/servers.py +++ b/pavelib/servers.py @@ -233,27 +233,6 @@ def run_all_servers(options): ]) -@task -@needs('pavelib.prereqs.install_prereqs') -@cmdopts([ - ("settings=", "s", "Django settings"), - ("fake-initial", None, "Fake the initial migrations"), -]) -@timed -def update_db(options): - """ - Migrates the lms and cms across all databases - """ - settings = getattr(options, 'settings', DEFAULT_SETTINGS) - fake = "--fake-initial" if getattr(options, 'fake_initial', False) else "" - for system in ('lms', 'cms'): - # pylint: disable=line-too-long - sh("NO_EDXAPP_SUDO=1 EDX_PLATFORM_SETTINGS_OVERRIDE={settings} /edx/bin/edxapp-migrate-{system} --traceback --pythonpath=. {fake}".format( - settings=settings, - system=system, - fake=fake)) - - @task @needs('pavelib.prereqs.install_prereqs') @consume_args