add install-db in Makefile
This commit is contained in:
parent
3e22feba73
commit
124fe88ec1
5
Makefile
5
Makefile
@ -13,6 +13,11 @@ clean-install:
|
||||
rm -fr $(NODE_MODULES)
|
||||
rm -fr $(VENV)
|
||||
|
||||
install-db:
|
||||
psql -U postgres -f fittrackee_api/db/create.sql
|
||||
$(FLASK) db upgrade --directory $(MIGRATIONS)
|
||||
$(FLASK) init_data
|
||||
|
||||
init-db:
|
||||
$(FLASK) drop_db
|
||||
$(FLASK) db upgrade --directory $(MIGRATIONS)
|
||||
|
@ -14,7 +14,7 @@ export PIPENV_VENV_IN_PROJECT=true
|
||||
|
||||
# Python env
|
||||
PYTHON_VERSION ?= python
|
||||
VENV = $(PWD)/fittrackee_api/.venv
|
||||
VENV = $(PWD)/.venv
|
||||
PYTHON = $(VENV)/bin/python
|
||||
PIPENV = $(shell command -v pipenv 2> /dev/null)
|
||||
FLASK = $(VENV)/bin/flask
|
||||
|
@ -1,5 +1,7 @@
|
||||
DROP DATABASE IF EXISTS fittrackee;
|
||||
DROP DATABASE IF EXISTS fittrackee_test;
|
||||
DROP USER fittrackee;
|
||||
|
||||
CREATE DATABASE fittrackee;
|
||||
CREATE DATABASE fittrackee_test;
|
||||
CREATE USER fittrackee WITH PASSWORD 'fittrackee';
|
||||
|
Loading…
Reference in New Issue
Block a user