feat: prep sqlx-data.json and apply migrations from it

This commit is contained in:
Aravinth Manivannan 2022-09-09 17:16:10 +05:30
parent 9877891a46
commit 778960a6df
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
1 changed files with 10 additions and 1 deletions

View File

@ -7,7 +7,7 @@ check: ## Check for syntax errors on all workspaces
clean: ## Delete build artifacts
@cargo clean
coverage: migrate ## Generate code coverage report in HTML format
coverage: ## Generate code coverage report in HTML format
$(call cache_bust)
cargo tarpaulin -t 1200 --out Html
@ -29,6 +29,10 @@ lint: ## Lint codebase
cargo fmt -v --all -- --emit files
cargo clippy --workspace --tests --all-features
migrate: ## run migrations
unset DATABASE_URL && cargo build
cargo run -- migrate
release: ## Build app with release optimizations
cargo build --release
@ -36,6 +40,11 @@ run: ## Run app in debug mode
cargo run
sqlx-offline-data: ## prepare sqlx offline data
cargo sqlx prepare \
--database-url=${POSTGRES_DATABASE_URL} -- \
--all-features
test: ## Run all available tests
cargo test --no-fail-fast