Title: ci(migrations): fail dev schema push with an actionable error on rename/drop prompt by TheodoreSpeaks · Pull Request #4999 · simstudioai/sim · GitHub
Open Graph Title: ci(migrations): fail dev schema push with an actionable error on rename/drop prompt by TheodoreSpeaks · Pull Request #4999 · simstudioai/sim
X Title: ci(migrations): fail dev schema push with an actionable error on rename/drop prompt by TheodoreSpeaks · Pull Request #4999 · simstudioai/sim
Description: Problem The dev DB migration step runs bun run db:push --force. When CI ran it against the dev DB it crashed with: Error: Interactive prompts require a TTY terminal ... at promptNamedWithSchemasConflict ... at tablesResolver --force only suppresses drizzle's data-loss confirmation. It does not suppress the rename-vs-drop disambiguation prompt (promptNamedWithSchemasConflict), which fires whenever a diff contains both new and missing objects at the same level — drizzle can't tell a rename from a drop+create, so it asks. In CI there's no TTY, so hanji throws before reading input (piping an answer can't help). This happened because the dev DB drifted: migration 0231_sim_trigger_workspace_events.sql (#4941) creates sim_trigger_state and drops workspace_notification_delivery / workspace_notification_subscription in one shot. Staging/prod run db:migrate and apply it cleanly; only dev (which uses db:push, no migration journal) sees it as an ambiguous diff and prompts. Change CI already failed here — just opaquely. This converts the bare stack trace into an actionable failure: the dev push step captures the output, and on the specific Interactive prompts require a TTY error emits a GitHub ::error:: annotation explaining the cause and the fix (drop the stale objects on the dev DB to match schema.ts — the same DROPs the versioned migration already applied to staging/prod). Exit status is preserved either way; success path is unchanged. No detection/auto-reconcile script — deliberately fail loud and let a human reconcile, matching how staging/prod already handle the drop via the versioned migration. Test Verified the capture + exit-code logic under bash -e -o pipefail: failure captures status, emits the annotation, and propagates the non-zero exit; success path falls through untouched. YAML validated. 🤖 Generated with Claude Code
Open Graph Description: Problem The dev DB migration step runs bun run db:push --force. When CI ran it against the dev DB it crashed with: Error: Interactive prompts require a TTY terminal ... at promptNamedWithSchemasCo...
X Description: Problem The dev DB migration step runs bun run db:push --force. When CI ran it against the dev DB it crashed with: Error: Interactive prompts require a TTY terminal ... at promptNamedWithSchemasCo...
Opengraph URL: https://github.com/simstudioai/sim/pull/4999
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react-reconciler,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@d5750093facf |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:25346ecb-0481-b983-22ab-896f8159d364 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | D3D2:34FC0A:DC1D64:12CD125:6AFB5CD6 |
| html-safe-nonce | b51c09db2e1171ff6d7a48f7f9cd450cd5da99c9b9a91e2f9894713379ea972c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEM0QyOjM0RkMwQTpEQzFENjQ6MTJDRDEyNTo2QUZCNUNENiIsInZpc2l0b3JfaWQiOiIzMTU1MTg1NDI4NTYwMTkxNTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a3591917c61f2facabbb6513098f611b3e7ab7fd65836f5dcb14dc96493dc49d |
| hovercard-subject-tag | pull_request:3856505789 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/simstudioai/sim/pull/4999/files |
| twitter:image | https://avatars.githubusercontent.com/u/19564703?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/19564703?s=400&v=4 |
| og:image:alt | Problem The dev DB migration step runs bun run db:push --force. When CI ran it against the dev DB it crashed with: Error: Interactive prompts require a TTY terminal ... at promptNamedWithSchemasCo... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | ea33d13c96d0ff66bd8fa906b193d2213536b78cb06b0c50a4632c58b1418f94 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/simstudioai/sim git https://github.com/simstudioai/sim.git |
| octolytics-dimension-user_id | 199344406 |
| octolytics-dimension-user_login | simstudioai |
| octolytics-dimension-repository_id | 912559512 |
| octolytics-dimension-repository_nwo | simstudioai/sim |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 912559512 |
| octolytics-dimension-repository_network_root_nwo | simstudioai/sim |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 59ef97164c52cf59bd10558ddec9c4f482763988 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width