Commit ea522a17 by Kevin Falcone

Merge pull request #12288 from edx/jibsheet/paver-migrate-multiple-dbs

Switch to using the standard edxapp-migrate-(lms|cms) tools
parents 1dfe0e8a b7e070e0
......@@ -155,7 +155,8 @@ class TestPaverServerTasks(PaverTestCase):
"""
settings = options.get("settings", "devstack")
call_task("pavelib.servers.update_db", options=options)
db_command = "python manage.py {server} --settings={settings} migrate --traceback --pythonpath=."
# pylint: disable=line-too-long
db_command = "NO_EDXAPP_SUDO=1 EDX_PLATFORM_SETTINGS_OVERRIDE={settings} /edx/bin/edxapp-migrate-{server} --traceback --pythonpath=. "
self.assertEquals(
self.task_messages,
[
......
......@@ -239,12 +239,16 @@ def run_all_servers(options):
])
def update_db(options):
"""
Runs syncdb and then migrate.
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'):
sh(django_cmd(system, settings, 'migrate', fake, '--traceback', '--pythonpath=.'))
# 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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment