new make targets for running up migrations one at a time
This commit is contained in:
parent
8b64621f46
commit
d313d4823e
10
Makefile
10
Makefile
@ -50,6 +50,11 @@ rollback: $(GOOSE) checkdbvars
|
|||||||
rollback_to: $(GOOSE) checkmigration checkdbvars
|
rollback_to: $(GOOSE) checkmigration checkdbvars
|
||||||
$(GOOSE) -dir db/migrations postgres "$(CONNECT_STRING)" down-to "$(MIGRATION)"
|
$(GOOSE) -dir db/migrations postgres "$(CONNECT_STRING)" down-to "$(MIGRATION)"
|
||||||
|
|
||||||
|
## Apply the next up migration
|
||||||
|
.PHONY: migrate_up_by_one
|
||||||
|
migrate_up_by_one: $(GOOSE) checkdbvars
|
||||||
|
$(GOOSE) -dir db/migrations postgres "$(CONNECT_STRING)" up-by-one
|
||||||
|
|
||||||
## Apply all migrations not already run
|
## Apply all migrations not already run
|
||||||
.PHONY: migrate
|
.PHONY: migrate
|
||||||
migrate: $(GOOSE) checkdbvars
|
migrate: $(GOOSE) checkdbvars
|
||||||
@ -61,6 +66,11 @@ migrate: $(GOOSE) checkdbvars
|
|||||||
migrate_pre_batch_set: $(GOOSE) checkdbvars
|
migrate_pre_batch_set: $(GOOSE) checkdbvars
|
||||||
$(GOOSE) -dir db/pre_batch_processing_migrations postgres "$(CONNECT_STRING)" up
|
$(GOOSE) -dir db/pre_batch_processing_migrations postgres "$(CONNECT_STRING)" up
|
||||||
|
|
||||||
|
## Apply migrations to be ran after a batch processing, one-by-one
|
||||||
|
.PHONY: migrate_post_batch_set_up_by_one
|
||||||
|
migrate_post_batch_set_up_by_one: $(GOOSE) checkdbvars
|
||||||
|
$(GOOSE) -dir db/post_batch_processing_migrations postgres "$(CONNECT_STRING)" up-by-one
|
||||||
|
|
||||||
## Apply migrations to be ran after a batch processing
|
## Apply migrations to be ran after a batch processing
|
||||||
.PHONY: migrate_post_batch_set
|
.PHONY: migrate_post_batch_set
|
||||||
migrate_post_batch_set: $(GOOSE) checkdbvars
|
migrate_post_batch_set: $(GOOSE) checkdbvars
|
||||||
|
Loading…
Reference in New Issue
Block a user