mirror of
https://github.com/status-im/status-protocol-go.git
synced 2025-03-04 04:20:38 +00:00
add new-migration Makefile target (#56)
This commit is contained in:
parent
7d230faaa7
commit
1f260e9ec1
15
Makefile
15
Makefile
@ -41,3 +41,18 @@ install-dev:
|
||||
generate:
|
||||
go generate ./...
|
||||
.PHONY: generate
|
||||
|
||||
new-migration:
|
||||
@if [ -z "$$DIR" ]; then \
|
||||
echo 'missing DIR var'; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
@if [ -z "$$NAME" ]; then \
|
||||
echo 'missing NAME var'; \
|
||||
exit 1; \
|
||||
fi
|
||||
|
||||
mkdir -p $(DIR)
|
||||
touch $(DIR)/`date +"%s"`_$(NAME).down.sql ./$(DIR)/`date +"%s"`_$(NAME).up.sql
|
||||
.PHONY: create-migration
|
||||
|
Loading…
x
Reference in New Issue
Block a user