AppFlowy/backend/scripts/Makefile

28 lines
572 B
Makefile
Raw Normal View History

2021-12-01 09:39:23 +00:00
#.EXPORT_ALL_VARIABLES:
#export DB_USER=postgres
#export DB_PASSWORD=password
#export DB_NAME=flowy
#export DB_PORT=5433
#export DATABASE_URL=postgres://${DB_USER}:${DB_PASSWORD}@localhost:${DB_PORT}/${DB_NAME}
#export DB_HOST = "localhost"
2021-12-01 08:44:58 +00:00
init_database:
2021-09-02 09:32:30 +00:00
${ROOT}/init_database.sh
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
echo_db_url:
echo ${DATABASE_URL}