this
This commit is contained in:
3 files changed
+14
-2
No files matched your search
+9
-1
@@ -1 +1,9 @@
|
||||
SQLX_OFFLINE=true
|
||||
# Live mode (local dev): query! macros validate every query against the real
|
||||
# schema on each build, so the .sqlx cache is only needed for DB-less builds.
|
||||
# Run scripts/prepare_sqlx_sqlite.sh once first — it creates and migrates the DB.
|
||||
# Use an absolute path so builds work from any working directory.
|
||||
DATABASE_URL=sqlite:///absolute/path/to/wakey-prepare.sqlite3
|
||||
|
||||
# Offline mode (CI / packaging): force the committed .sqlx cache.
|
||||
# Takes precedence over DATABASE_URL when set.
|
||||
#SQLX_OFFLINE=true
|
||||
@@ -20,3 +20,6 @@ target/
|
||||
.env
|
||||
|
||||
.codex
|
||||
|
||||
# sqlx prepare DB (created by scripts/prepare_sqlx_sqlite.sh)
|
||||
wakey-prepare.sqlite3*
|
||||
@@ -2,7 +2,7 @@
|
||||
set -eu
|
||||
|
||||
ROOT="$(CDPATH='' cd -- "$(dirname -- "$0")/.." && pwd)"
|
||||
DB="${SQLX_PREPARE_DB:-/tmp/wakey-sqlx-prepare.sqlite3}"
|
||||
DB="${SQLX_PREPARE_DB:-$ROOT/wakey-prepare.sqlite3}"
|
||||
DATABASE_URL="sqlite://$DB"
|
||||
|
||||
if ! cargo sqlx --version >/dev/null 2>&1; then
|
||||
@@ -23,3 +23,4 @@ cp .sqlx/*.json wakey-control-plane/.sqlx/
|
||||
|
||||
echo "SQLx metadata prepared in $ROOT/.sqlx"
|
||||
echo "SQLx package metadata mirrored in $ROOT/wakey-control-plane/.sqlx"
|
||||
echo "Prepare DB (referenced by .env for live compile-time checking): $DB"
|
||||
Reference in new issue
Block a user