Add new Make targets for goose

This commit is contained in:
The Magician 2024-11-25 15:03:16 +00:00
parent 78e1c865c7
commit d2bc986506
1 changed files with 13 additions and 5 deletions

View File

@ -1,9 +1,17 @@
createdb:
mysql --user=root --password=$(shell pass show sevenkeys/mysql) <database/sql/createdb.sql
removedb:
rm -rf cache/
mysql --user=root --password=$(shell pass show sevenkeys/mysql) <database/sql/removedb.sql
connect: connect:
mysql --user=root --password=$(shell pass show sevenkeys/mysql) mysql --user=root --password=$(shell pass show sevenkeys/mysql)
dump: dump:
mysqldump --user=root --password=$(shell pass show sevenkeys/mysql) sevenkeys >sevenkeys.sql mysqldump --user=root --password=$(shell pass show sevenkeys/mysql) sevenkeys >sevenkeys.sql
dev_create:
goose mysql "root:$(shell pass show sevenkeys/mysql)@/sevenkeys_development?parseTime=true" up
dev_rollback:
rm -rf cache/
goose mysql "root:$(shell pass show sevenkeys/mysql)@/sevenkeys_development?parseTime=true" reset
prod_create:
goose mysql "root:$(shell pass show sevenkeys/mysql)@/sevenkeys?parseTime=true" up
prod_rollback:
rm -rf cache/
goose mysql "root:$(shell pass show sevenkeys/mysql)@/sevenkeys?parseTime=true" reset