cant wait to do all types of shi on ts hook

also turn all into Verifiable macros pls dont fail github
This commit is contained in:
lda
2026-04-27 00:55:30 +07:00 Verified
parent 35bed390f7
commit d91b3dab77
55 changed files with 2216 additions and 244 deletions
+21
View File
@@ -0,0 +1,21 @@
#!/usr/bin/env sh
set -eu
ROOT="$(CDPATH='' cd -- "$(dirname -- "$0")/.." && pwd)"
DB="${SQLX_PREPARE_DB:-/tmp/wakey-sqlx-prepare.sqlite3}"
DATABASE_URL="sqlite://$DB"
if ! cargo sqlx --version >/dev/null 2>&1; then
echo "cargo-sqlx is not installed." >&2
echo "Install it with: cargo install sqlx-cli --no-default-features --features sqlite" >&2
exit 1
fi
rm -f "$DB" "$DB-shm" "$DB-wal"
cd "$ROOT"
DATABASE_URL="$DATABASE_URL" cargo sqlx database create
DATABASE_URL="$DATABASE_URL" cargo sqlx migrate run --source wakey-control-plane/migrations
DATABASE_URL="$DATABASE_URL" cargo sqlx prepare --workspace -- -p wakey-control-plane --all-targets --all-features
echo "SQLx metadata prepared in $ROOT/.sqlx"