mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 19:41:09 +02:00
fix(presi): wire up db:push for presi schema via @mana/api
The presi module's schema was defined inline in routes.ts but had no working db:push mechanism — the old references to @presi/server and @presi/backend no longer exist after consolidation. Extracts schema into its own file, adds a dedicated drizzle config, and updates the setup script so tables are actually created. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
474ba93d70
commit
a9c51517eb
7 changed files with 104 additions and 75 deletions
|
|
@ -54,9 +54,10 @@ create_schema_if_not_exists() {
|
|||
push_schema() {
|
||||
local filter=$1
|
||||
local name=$2
|
||||
local script=${3:-db:push}
|
||||
echo -e "${YELLOW}Pushing schema for ${name}...${NC}"
|
||||
local output
|
||||
output=$(pnpm --filter "$filter" db:push --force 2>&1)
|
||||
output=$(pnpm --filter "$filter" "$script" --force 2>&1)
|
||||
local exit_code=$?
|
||||
if echo "$output" | grep -q "No projects matched the filters\|None of the selected packages has"; then
|
||||
echo -e " ${YELLOW}⊘ Skipped (no db:push script for ${filter})${NC}"
|
||||
|
|
@ -117,7 +118,7 @@ setup_service() {
|
|||
push_schema "@traces/server" "traces"
|
||||
;;
|
||||
presi)
|
||||
push_schema "@presi/server" "presi"
|
||||
push_schema "@mana/api" "presi" "db:push:presi"
|
||||
;;
|
||||
uload)
|
||||
push_schema "@mana/uload-database" "uload"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue