feat: add sqlx offline data generation

This commit is contained in:
realaravinth 2022-05-11 13:27:42 +05:30
parent 6ab6df02ed
commit 136439c97a
No known key found for this signature in database
GPG key ID: AD9F0F08E855ED88

View file

@ -82,6 +82,16 @@ release: frontend ## Build app with release optimizations
run: frontend ## Run app in debug mode
cargo run
sqlx-offline-data: ## prepare sqlx offline data
cargo sqlx prepare --database-url=${POSTGRES_DATABASE_URL} -- --bin mcaptcha \
--all-features
cd db/db-migrations && cargo sqlx prepare \
--database-url=${POSTGRES_DATABASE_URL} -- --bin db-migrations \
--all-features
# cd db/db-sqlx-sqlite/ \
# && DATABASE_URL=${SQLITE_DATABASE_URL} cargo sqlx prepare
test: frontend-test frontend ## Run all available tests
cd db/db-sqlx-postgres &&\
DATABASE_URL=${POSTGRES_DATABASE_URL}\