mirror of
https://github.com/mCaptcha/mCaptcha.git
synced 2026-02-11 10:05:41 +00:00
feat: run migrations using sqlx also
This commit is contained in:
10
Makefile
10
Makefile
@@ -28,6 +28,13 @@ define run_migrations ## run database migrations
|
|||||||
cd db/db-migrations/ && cargo run
|
cd db/db-migrations/ && cargo run
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define run_dev_migrations ## run database migrations
|
||||||
|
cd db/db-sqlx-maria/ && \
|
||||||
|
DATABASE_URL=${MARIA_DATABASE_URL} sqlx migrate run
|
||||||
|
cd db/db-sqlx-postgres/ && \
|
||||||
|
DATABASE_URL=${POSTGRES_DATABASE_URL} sqlx migrate run
|
||||||
|
endef
|
||||||
|
|
||||||
define frontend_env ## install frontend deps
|
define frontend_env ## install frontend deps
|
||||||
yarn install
|
yarn install
|
||||||
cd docs/openapi && yarn install
|
cd docs/openapi && yarn install
|
||||||
@@ -128,6 +135,9 @@ lint: ## Lint codebase
|
|||||||
migrate: ## Run database migrations
|
migrate: ## Run database migrations
|
||||||
$(call run_migrations)
|
$(call run_migrations)
|
||||||
|
|
||||||
|
migrate.dev: ## Run database migrations during development
|
||||||
|
$(call run_dev_migrations)
|
||||||
|
|
||||||
release: frontend ## Build app with release optimizations
|
release: frontend ## Build app with release optimizations
|
||||||
$(call cache_bust)
|
$(call cache_bust)
|
||||||
cargo build --release
|
cargo build --release
|
||||||
|
|||||||
Reference in New Issue
Block a user