feat: prep sqlx-data.json and apply migrations from it
This commit is contained in:
parent
9877891a46
commit
778960a6df
1 changed files with 10 additions and 1 deletions
11
Makefile
11
Makefile
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue