mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-14 21:41:09 +02:00
chore(setup:db): surface drizzle-kit errors instead of catch-all
push_schema used to print "Failed (may not have db:push script)" for every non-zero exit, lumping real failures (stuck rename prompts, pre-existing public enums) in with missing scripts. Now it prints the real exit code and tails the last 5 lines of drizzle-kit output so the root cause is visible without re-running by hand. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
700861f682
commit
be8f5618c6
1 changed files with 7 additions and 1 deletions
|
|
@ -64,7 +64,13 @@ push_schema() {
|
|||
elif [ $exit_code -eq 0 ]; then
|
||||
echo -e " ${GREEN}✓ Schema pushed${NC}"
|
||||
else
|
||||
echo -e " ${RED}✗ Failed (may not have db:push script)${NC}"
|
||||
# Real failure (push script exists but exit ≠ 0). Surface the last
|
||||
# lines of drizzle-kit output so the root cause is visible without
|
||||
# re-running by hand. Common cases: interactive rename prompt on
|
||||
# stdin-less invocation, or pre-existing public-schema enums the
|
||||
# service's schemaFilter hides.
|
||||
echo -e " ${RED}✗ Schema push failed (exit ${exit_code})${NC}"
|
||||
echo "$output" | tail -5 | sed 's/^/ /'
|
||||
fi
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue