chore(prisma): enforce frontend-owned schema rollout policy
This commit is contained in:
22
scripts/prisma-sync.sh
Executable file
22
scripts/prisma-sync.sh
Executable file
@@ -0,0 +1,22 @@
|
||||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||||
CANONICAL_SCHEMA="$ROOT_DIR/frontend/prisma/schema.prisma"
|
||||
TARGETS=(
|
||||
"$ROOT_DIR/omni_chat/prisma/schema.prisma"
|
||||
"$ROOT_DIR/omni_outbound/prisma/schema.prisma"
|
||||
)
|
||||
|
||||
if [[ ! -f "$CANONICAL_SCHEMA" ]]; then
|
||||
echo "[prisma-sync] Canonical schema not found: $CANONICAL_SCHEMA" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
for target in "${TARGETS[@]}"; do
|
||||
mkdir -p "$(dirname "$target")"
|
||||
cp "$CANONICAL_SCHEMA" "$target"
|
||||
echo "[prisma-sync] Updated $target"
|
||||
done
|
||||
|
||||
echo "[prisma-sync] Done. Canonical source: $CANONICAL_SCHEMA"
|
||||
Reference in New Issue
Block a user