feat!: snake_case QQQ names with the sql_workbench_ prefix (for 1.0.0-RC.3) #7

Merged
KofTwentyTwo merged 2 commits from feature/snake-case-table-names into develop 2026-10-12 20:12:06 +00:00
KofTwentyTwo commented 2026-10-12 19:07:36 +00:00 (Migrated from github.com)

For the release captain, for 1.0.0-RC.3. Please don't merge until the RC is cut.

What

This applies the owner naming rule: table names are lowercase snake_case, prefixed with the qbit's name. Only metadata changes; there is no DDL. The physical tables were already sql_workbench_*, so each QQQ table name now equals its backend table name.

Kind Before After
Tables, notebook possible-value source sqlWorkbenchNotebook, …Cell, …NotebookVersion, …ResultSnapshot, …NotebookShare, …Execution sql_workbench_notebook, _cell, _notebook_version, _result_snapshot, _notebook_share, _execution
Enum possible-value source sqlWorkbenchShareAudienceType sql_workbench_share_audience_type
Permissions sqlWorkbench.{hasAccess,write,share}, sqlWorkbenchAdmin.hasAccess, sqlWorkbenchNotebook.read … sql_workbench.*, sql_workbench_admin.hasAccess, sql_workbench_notebook.read …
Security key types sqlWorkbenchUser (sqlWorkbenchAllAccess), sqlWorkbenchAudience sql_workbench_user (sql_workbench_all_access), sql_workbench_audience
Joins sqlWorkbenchNotebookJoinSqlWorkbenchCell … sql_workbench_notebook_join_sql_workbench_cell …
  • A tableNamePrefix or namespace is normalized to snake_case and joined with one _. ns, ns_ and myNs give ns_… and my_ns_….
  • The old names stay as @Deprecated(since = "1.0.0-RC.3") LEGACY_* constants, kept for migration scripts.
  • Not renamed: the sqlWorkbench app, the widget, the process names, the routes, the field names and the Java classes.
  • UPGRADE.md covers permission grants, security keys, and the stored table names in audit_table.name, saved views and saved reports, with sample SQL. It also covers search indexes and frontend links. CHANGELOG.md has a 1.0.0-RC.3 entry.

Alongside #6

This PR doesn't touch the files #6 changes in code; the two only overlap in the README.md and CHANGELOG.md text. Whichever merges second needs a small rebase. #6's README says sqlWorkbench.hasAccess, which should become sql_workbench.hasAccess.

Adopters

kof22 Website-Backend runs RC.1 in production, and its PR #118 picks up the RC. With this RC its inferBackendName mapping no longer has any effect. It needs the permission renames and the stored-reference SQL from UPGRADE.md in its cutover.

Tests

  • ./mvnw verify passes locally: 116 tests (unit plus the Postgres integration suite), 0 failures. Checkstyle and the JaCoCo check pass.
  • The new test SqlWorkbenchQBitProducerTest.testSnakeCaseNamesAndLegacyConstants covers the new names, the legacy constants and prefix normalization. It also checks that a host with no backend mapping gets every table and key type under the new names.

🤖 Generated with Claude Code

For the release captain, for **1.0.0-RC.3**. Please don't merge until the RC is cut. ## What This applies the owner naming rule: table names are lowercase snake_case, prefixed with the qbit's name. **Only metadata changes; there is no DDL.** The physical tables were already `sql_workbench_*`, so each QQQ table name now equals its backend table name. | Kind | Before | After | |---|---|---| | Tables, notebook possible-value source | `sqlWorkbenchNotebook`, `…Cell`, `…NotebookVersion`, `…ResultSnapshot`, `…NotebookShare`, `…Execution` | `sql_workbench_notebook`, `_cell`, `_notebook_version`, `_result_snapshot`, `_notebook_share`, `_execution` | | Enum possible-value source | `sqlWorkbenchShareAudienceType` | `sql_workbench_share_audience_type` | | Permissions | `sqlWorkbench.{hasAccess,write,share}`, `sqlWorkbenchAdmin.hasAccess`, `sqlWorkbenchNotebook.read` … | `sql_workbench.*`, `sql_workbench_admin.hasAccess`, `sql_workbench_notebook.read` … | | Security key types | `sqlWorkbenchUser` (`sqlWorkbenchAllAccess`), `sqlWorkbenchAudience` | `sql_workbench_user` (`sql_workbench_all_access`), `sql_workbench_audience` | | Joins | `sqlWorkbenchNotebookJoinSqlWorkbenchCell` … | `sql_workbench_notebook_join_sql_workbench_cell` … | - A `tableNamePrefix` or namespace is normalized to snake_case and joined with one `_`. `ns`, `ns_` and `myNs` give `ns_…` and `my_ns_…`. - The old names stay as `@Deprecated(since = "1.0.0-RC.3")` `LEGACY_*` constants, kept for migration scripts. - **Not renamed:** the `sqlWorkbench` app, the widget, the process names, the routes, the field names and the Java classes. - `UPGRADE.md` covers permission grants, security keys, and the stored table names in `audit_table.name`, saved views and saved reports, with sample SQL. It also covers search indexes and frontend links. `CHANGELOG.md` has a 1.0.0-RC.3 entry. ## Alongside #6 This PR doesn't touch the files #6 changes in code; the two only overlap in the `README.md` and `CHANGELOG.md` text. Whichever merges second needs a small rebase. #6's README says `sqlWorkbench.hasAccess`, which should become `sql_workbench.hasAccess`. ## Adopters kof22 Website-Backend runs RC.1 in production, and its PR #118 picks up the RC. With this RC its `inferBackendName` mapping no longer has any effect. It needs the permission renames and the stored-reference SQL from `UPGRADE.md` in its cutover. ## Tests - `./mvnw verify` passes locally: 116 tests (unit plus the Postgres integration suite), 0 failures. Checkstyle and the JaCoCo check pass. - The new test `SqlWorkbenchQBitProducerTest.testSnakeCaseNamesAndLegacyConstants` covers the new names, the legacy constants and prefix normalization. It also checks that a host with no backend mapping gets every table and key type under the new names. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sign in to join this conversation.