mirror of
https://github.com/Memo-2023/mana-monorepo.git
synced 2026-05-16 15:39:40 +02:00
The migration was failing on staging because the auth schema already existed from previous db:push operations. This fix makes all DDL statements idempotent: - CREATE SCHEMA IF NOT EXISTS for all schemas - DO $$ BEGIN ... EXCEPTION WHEN duplicate_object ... END $$ for ENUMs - CREATE TABLE IF NOT EXISTS for all tables - CREATE INDEX IF NOT EXISTS for all indexes - DO $$ BEGIN ... EXCEPTION WHEN duplicate_object ... END $$ for constraints This ensures migrations can run safely against databases that already have the schema partially or fully created. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| migrations | ||
| schema | ||
| connection.ts | ||
| migrate.ts | ||