AppFlowy/backend/scripts/Makefile

23 lines
459 B
Makefile
Raw Normal View History

2021-12-01 15:29:16 +00:00
.PHONY: init_database add_migrations run_migrations reset_db
2021-12-01 08:44:58 +00:00
init_database:
2021-09-02 09:32:30 +00:00
${ROOT}/init_database.sh
2021-12-01 15:29:16 +00:00
run_docker:
source $(shell pwd)/env.sh && docker-compose up -d db && docker-compose up -d backend
reset_db:
2021-08-24 05:10:53 +00:00
#diesel database reset
sqlx database reset
add_migrations:
#make table="the name of your table" add_migrations
2021-08-24 05:10:53 +00:00
# diesel migration generation $(table)
sqlx migrate add $(table)
run_migrations:
2021-08-24 05:10:53 +00:00
# diesel migration run
sqlx migrate run