bobbai00 opened a new pull request, #6196: URL: https://github.com/apache/texera/pull/6196
### What changes were proposed in this PR? Fixes the schema-currency check in `bin/local-dev/main.sh` (`infra_ensure_db_schema`). It previously probed a single hard-coded table (`feedback`) as a proxy for "schema is current", so any table added *after* `feedback` was invisible: a carried-over Postgres volume reported `postgres: schema already current`, the DDL was skipped, jOOQ codegen (`common/dao`) ran against a stale schema, and `sbt dist` failed with a **misleading** `not found: value <TABLE>` error that gave no hint the real cause was a stale DB. Now the expected table set is derived from `sql/texera_ddl.sql` itself, so the check can't drift when a new table is added. Because `texera_ddl.sql` is **not** idempotent (it `DROP`s and recreates the database and every table), it is only run to bootstrap a genuinely empty volume; on a partially-stale volume the script fails fast listing the missing tables and how to resolve them, instead of silently skipping (misleading build failure) or destructively wiping local data. ### Any related issues, documentation, discussions? Closes #6194 ### How was this PR tested? Manually, against the `bin/local-dev.sh` stack: - Verified the DDL parser extracts all 32 tables (including `workflow_cover_image`, the table whose absence triggered the original failure). - Stale volume (missing `workflow_cover_image`): the check now fails fast with the missing-table list and remediation steps rather than reporting "schema already current". - Current volume (all tables present): reports `schema already current` and skips, as before. - Empty volume: bootstraps from `texera_ddl.sql`, as before. - `bash -n bin/local-dev/main.sh` passes. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Opus 4.8 (1M context) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
