Support db migrations when using dev containers (#1309)

This commit is contained in:
jbirddog 2024-04-02 08:50:49 -04:00 committed by GitHub
parent b507f45fb0
commit 467d33e4a2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 5 deletions

View File

@ -34,7 +34,7 @@ all: dev-env start-dev run-pyl
build-images:
$(DOCKER_COMPOSE) build
dev-env: stop-dev build-images poetry-i be-poetry-i be-recreate-db fe-npm-i
dev-env: stop-dev build-images poetry-i be-poetry-i be-db-clean fe-npm-i
@/bin/true
start-dev: stop-dev
@ -46,6 +46,12 @@ stop-dev:
be-clear-log-file:
$(IN_BACKEND) rm -f log/unit_testing.log
be-db-clean:
$(IN_BACKEND) ./bin/recreate_db clean
be-db-migrate:
$(IN_BACKEND) ./bin/recreate_db migrate
be-logs:
docker logs -f $(BACKEND_CONTAINER)
@ -63,9 +69,6 @@ be-poetry-rm:
rm -rf "$(BACKEND_CONTAINER)/.venv"; \
fi
be-recreate-db:
$(IN_BACKEND) ./bin/recreate_db clean
be-sh:
$(IN_BACKEND) /bin/bash
@ -120,7 +123,7 @@ take-ownership:
.PHONY: build-images dev-env \
start-dev stop-dev \
be-clear-log-file be-logs be-mypy be-poetry-i be-poetry-lock be-poetry-rm \
be-recreate-db be-sh be-sqlite be-tests be-tests-par \
be-db-clean be-db-migrate be-sh be-sqlite be-tests be-tests-par \
fe-lint-fix fe-logs fe-npm-i fe-sh \
poetry-i poetry-rm pre-commit ruff run-pyl \
take-ownership