Skip to content

Commit

Permalink
feat: Add migrate Make command. (openedx#32705)
Browse files Browse the repository at this point in the history
To make edx-platform more consistent with other IDAs and to
help deprecate more of paver, we are adding the ability to
run `make migrate` in a local environment as a replacement
for `paver update_db`.

openedx-unsupported/devstack#1085
  • Loading branch information
dianakhuang authored Jul 12, 2023
1 parent 86eb49a commit e28bbe9
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
.PHONY: base-requirements check-types clean \
compile-requirements detect_changed_source_translations dev-requirements \
docker_auth docker_build docker_push docker_tag docs extract_translations \
guides help lint-imports local-requirements pre-requirements pull \
pull_translations push_translations requirements shell swagger \
guides help lint-imports local-requirements migrate migrate-lms migrate-cms \
pre-requirements pull pull_translations push_translations requirements shell swagger \
technical-docs test-requirements ubuntu-requirements upgrade-package upgrade

# Careful with mktemp syntax: it has to work on Mac and Ubuntu, which have differences.
Expand Down Expand Up @@ -170,6 +170,16 @@ docker_push: docker_tag docker_auth ## push to docker hub
lint-imports:
lint-imports

migrate-lms:
python manage.py lms showmigrations --database default --traceback --pythonpath=.
python manage.py lms migrate --database default --traceback --pythonpath=.

migrate-cms:
python manage.py cms showmigrations --database default --traceback --pythonpath=.
python manage.py cms migrate --database default --noinput --traceback --pythonpath=.

migrate: migrate-lms migrate-cms

# WARNING (EXPERIMENTAL):
# This installs the Ubuntu requirements necessary to make `pip install` and some other basic
# dev commands to pass. This is not necessarily everything needed to get a working edx-platform.
Expand Down

0 comments on commit e28bbe9

Please sign in to comment.