Skip to content

Commit

Permalink
dev: Allow to pass a VERSION param to make db-migrate
Browse files Browse the repository at this point in the history
  • Loading branch information
marien-probesys committed Nov 7, 2024
1 parent 13a0343 commit adb3dfb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -76,15 +76,16 @@ ifndef NO_SEED
endif

.PHONY: db-migrate
db-migrate: ## Migrate the database
$(CONSOLE) doctrine:migrations:migrate --no-interaction
db-migrate: VERSION ?= latest
db-migrate: ## Migrate the database (can take a VERSION argument)
$(CONSOLE) doctrine:migrations:migrate --no-interaction $(VERSION)

.PHONY: db-rollback
db-rollback: ## Rollback the database to the previous version
$(CONSOLE) doctrine:migrations:migrate --no-interaction prev

.PHONY: db-reset
db-reset: ## Reset the database
db-reset: ## Reset the database (take a FORCE argument)
ifndef FORCE
$(error Please run the operation with FORCE=true)
endif
Expand Down

0 comments on commit adb3dfb

Please sign in to comment.