GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||
GeezerVison is showing github.com — v0.6.54: migration error logs by icecrasher321 · Pull Request #4261 · simstudioai/sim Conversation
Contributor
improvement(migrations): log better errors (#4260)
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
PR SummaryMedium Risk Overview Updates Reviewed by Cursor Bugbot for commit 41a1b50. Configure here. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Greptile SummaryThis PR makes two targeted improvements to the migration infrastructure: it moves the Confidence Score: 5/5Safe to merge — both changes are correct, well-documented, and idempotent. The SQL reordering fixes a real constraint-violation bug that would have caused migration 0194 to fail on databases with multi-workspace users; the DROP INDEX IF EXISTS is idempotent so re-runs are safe. The printMigrationError function is purely additive, handles all error shapes defensively, and the function declaration is correctly hoisted in the ES module scope. No P0/P1 findings. No files require special attention. Important Files Changed
Sequence DiagramsequenceDiagram
participant Script as migrate.ts
participant Drizzle as drizzle-orm migrator
participant PG as PostgreSQL
Script->>Drizzle: migrate(drizzle(client), { migrationsFolder })
Drizzle->>PG: Run migration SQL statements
alt Migration succeeds
PG-->>Drizzle: OK
Drizzle-->>Script: resolved
Script->>Script: console.log("Migrations applied successfully.")
else Migration fails
PG-->>Drizzle: PostgresError (code, constraint, hint, query…)
Drizzle-->>Script: throws Error
Script->>Script: printMigrationError(error)
Note over Script: Logs message, PG fields (code,<br/>constraint, hint, table, etc.),<br/>failing query, parameters,<br/>cause chain, stack
Script->>Script: process.exit(1)
end
Script->>PG: client.end() [finally]
Reviews (1): Last reviewed commit: "improvement(migrations): log better erro..." | Re-trigger Greptile |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
41a1b50a
Deployed
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.