diff --git a/CHANGELOG.md b/CHANGELOG.md index b621b47..6c9db14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,9 +21,9 @@ All notable changes to this project are documented here. The format follows Keep - **Pinning a result works with QQQ core permission enforcement on.** `getUserPermissionNames()` now includes `sql_workbench_result_snapshot.insert`: pinning is a top-level insert, which core enforcement checks, so hosts no longer need to grant it by hand. Record locks still limit snapshots to the user's own notebooks. ### Deprecated -- `LEGACY_TABLE_NAME` on each entity, `ShareAudienceType.LEGACY_NAME` and `SqlWorkbenchQBitConfig.LEGACY_*` hold the pre-RC.3 names, for migrating stored references only. +- `LEGACY_TABLE_NAME` on each entity, `ShareAudienceType.LEGACY_NAME` and `SqlWorkbenchQBitConfig.LEGACY_*` hold the pre-RC.4 names, for migrating stored references only. -### Upgrade from RC.2 +### Upgrade from RC.2 (or RC.3, a copy of RC.2) - Follow [UPGRADE.md](UPGRADE.md): grant the renamed permissions and rename stored table names (audit, saved views and reports). No DDL. ## [1.0.0-RC.3] - 2026-10-12 diff --git a/README.md b/README.md index 46d2af8..06c6b6c 100644 --- a/README.md +++ b/README.md @@ -244,7 +244,7 @@ A checklist for adding the workbench to a QQQ application. Each row points to th | ESB and search | Optional: wire `SqlWorkbenchIntegrations.esbTableNames` and `quickSearchTables` into your ESB and Quick Search config ([ESB and Quick Search](#esb-and-quick-search)). | | Turning writes off | `withWriteModeEnabled(false)` disables write mode for everyone. | | Known limitations | Raw SQL bypasses QQQ security, audits, listeners and automations ([Safety model](#safety-model)). H2 and generic backends have no enforced read-only transaction. Only PostgreSQL DDL ships. Shares are read-only (no shared editing). | -| Upgrading | From RC.2: the QQQ names became snake_case (`sql_workbench_*`; no DDL). See [UPGRADE.md](UPGRADE.md) for permissions and stored table names. From RC.1: also run the share-table DDL and backfill, grant the new permission lists (the tables no longer rely on the admin `hasAccess` permission alone), call `applyToSession`, and use QQQ `4.1.0-RC.4` or later. | +| Upgrading | From RC.2 (or RC.3, a copy of RC.2): the QQQ names became snake_case (`sql_workbench_*`; no DDL). See [UPGRADE.md](UPGRADE.md) for permissions and stored table names. From RC.1: also run the share-table DDL and backfill, grant the new permission lists (the tables no longer rely on the admin `hasAccess` permission alone), call `applyToSession`, and use QQQ `4.1.0-RC.4` or later. | Nothing in the qbit is specific to one host application. diff --git a/UPGRADE.md b/UPGRADE.md index 127c606..9ba915c 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,10 +1,12 @@ # Upgrading -## To 1.0.0-RC.3: snake_case names (metadata only) +## To 1.0.0-RC.4: snake_case names (metadata only) -The owner naming rule now applies to every QRun-IO qbit: table names are lowercase snake_case, prefixed with the qbit's name. In 1.0.0-RC.3 the SQL Workbench's QQQ names change to match. **The database does not change**: the physical tables were already `sql_workbench_*` (`docs/ddl/postgres.sql`), so no DDL runs. What changes is the names QQQ uses, and anything your app stored under the old names. +The rename shipped in 1.0.0-RC.4. 1.0.0-RC.3 on Maven Central is an accidental republish of the RC.2 code (see CHANGELOG.md), so upgrading from RC.3 is the same as upgrading from RC.2. -| Kind | Before (RC.1, RC.2) | From RC.3 | +The owner naming rule now applies to every QRun-IO qbit: table names are lowercase snake_case, prefixed with the qbit's name. In 1.0.0-RC.4 the SQL Workbench's QQQ names change to match. **The database does not change**: the physical tables were already `sql_workbench_*` (`docs/ddl/postgres.sql`), so no DDL runs. What changes is the names QQQ uses, and anything your app stored under the old names. + +| Kind | Before (RC.1, RC.2, RC.3) | From RC.4 | |---|---|---| | Tables (and the notebook possible-value source) | `sqlWorkbenchNotebook`, `sqlWorkbenchCell`, `sqlWorkbenchNotebookVersion`, `sqlWorkbenchResultSnapshot`, `sqlWorkbenchNotebookShare`, `sqlWorkbenchExecution` | `sql_workbench_notebook`, `sql_workbench_cell`, `sql_workbench_notebook_version`, `sql_workbench_result_snapshot`, `sql_workbench_notebook_share`, `sql_workbench_execution` | | Enum possible-value source | `sqlWorkbenchShareAudienceType` | `sql_workbench_share_audience_type` | diff --git a/src/main/java/com/kingsrook/qbits/sqlworkbench/SqlWorkbenchQBitConfig.java b/src/main/java/com/kingsrook/qbits/sqlworkbench/SqlWorkbenchQBitConfig.java index 0a080ac..3a479d0 100644 --- a/src/main/java/com/kingsrook/qbits/sqlworkbench/SqlWorkbenchQBitConfig.java +++ b/src/main/java/com/kingsrook/qbits/sqlworkbench/SqlWorkbenchQBitConfig.java @@ -71,23 +71,23 @@ public class SqlWorkbenchQBitConfig implements QBitConfig public static final String ALL_ACCESS_SECURITY_KEY_NAME = "sql_workbench_all_access"; /////////////////////////////////////////////////////////////////////////// - // names before 1.0.0-RC.3, when the owner rule (lowercase snake_case, // + // names before 1.0.0-RC.4, when the owner rule (lowercase snake_case, // // prefixed with the qbit name) was applied; kept only so hosts can // // migrate stored references (see UPGRADE.md) // /////////////////////////////////////////////////////////////////////////// - @Deprecated(since = "1.0.0-RC.3") + @Deprecated(since = "1.0.0-RC.4") public static final String LEGACY_ACCESS_PERMISSION_BASE_NAME = "sqlWorkbench"; - @Deprecated(since = "1.0.0-RC.3") + @Deprecated(since = "1.0.0-RC.4") public static final String LEGACY_WRITE_PERMISSION_NAME = "sqlWorkbench.write"; - @Deprecated(since = "1.0.0-RC.3") + @Deprecated(since = "1.0.0-RC.4") public static final String LEGACY_SHARE_PERMISSION_NAME = "sqlWorkbench.share"; - @Deprecated(since = "1.0.0-RC.3") + @Deprecated(since = "1.0.0-RC.4") public static final String LEGACY_ADMIN_PERMISSION_BASE_NAME = "sqlWorkbenchAdmin"; - @Deprecated(since = "1.0.0-RC.3") + @Deprecated(since = "1.0.0-RC.4") public static final String LEGACY_USER_SECURITY_KEY_TYPE_NAME = "sqlWorkbenchUser"; - @Deprecated(since = "1.0.0-RC.3") + @Deprecated(since = "1.0.0-RC.4") public static final String LEGACY_AUDIENCE_SECURITY_KEY_TYPE_NAME = "sqlWorkbenchAudience"; - @Deprecated(since = "1.0.0-RC.3") + @Deprecated(since = "1.0.0-RC.4") public static final String LEGACY_ALL_ACCESS_SECURITY_KEY_NAME = "sqlWorkbenchAllAccess"; private String backendName; diff --git a/src/main/java/com/kingsrook/qbits/sqlworkbench/model/ShareAudienceType.java b/src/main/java/com/kingsrook/qbits/sqlworkbench/model/ShareAudienceType.java index d169843..b8de203 100644 --- a/src/main/java/com/kingsrook/qbits/sqlworkbench/model/ShareAudienceType.java +++ b/src/main/java/com/kingsrook/qbits/sqlworkbench/model/ShareAudienceType.java @@ -33,9 +33,9 @@ public enum ShareAudienceType implements PossibleValueEnum public static final String NAME = "sql_workbench_share_audience_type"; /******************************************************************************* - ** The possible-value source name before 1.0.0-RC.3. + ** The possible-value source name before 1.0.0-RC.4. *******************************************************************************/ - @Deprecated(since = "1.0.0-RC.3") + @Deprecated(since = "1.0.0-RC.4") public static final String LEGACY_NAME = "sqlWorkbenchShareAudienceType"; private final String label; diff --git a/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchCell.java b/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchCell.java index 48b3d5e..b936dbc 100644 --- a/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchCell.java +++ b/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchCell.java @@ -32,10 +32,10 @@ public class SqlWorkbenchCell extends QRecordEntity public static final String TABLE_NAME = "sql_workbench_cell"; /******************************************************************************* - ** The table name before 1.0.0-RC.3 (owner rule: lowercase snake_case, + ** The table name before 1.0.0-RC.4 (owner rule: lowercase snake_case, ** prefixed with the qbit name). Kept for migrating stored references only. *******************************************************************************/ - @Deprecated(since = "1.0.0-RC.3") + @Deprecated(since = "1.0.0-RC.4") public static final String LEGACY_TABLE_NAME = "sqlWorkbenchCell"; @QField(isEditable = false, isPrimaryKey = true) diff --git a/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchExecution.java b/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchExecution.java index 57b25f3..8bb000d 100644 --- a/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchExecution.java +++ b/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchExecution.java @@ -34,10 +34,10 @@ public class SqlWorkbenchExecution extends QRecordEntity public static final String TABLE_NAME = "sql_workbench_execution"; /******************************************************************************* - ** The table name before 1.0.0-RC.3 (owner rule: lowercase snake_case, + ** The table name before 1.0.0-RC.4 (owner rule: lowercase snake_case, ** prefixed with the qbit name). Kept for migrating stored references only. *******************************************************************************/ - @Deprecated(since = "1.0.0-RC.3") + @Deprecated(since = "1.0.0-RC.4") public static final String LEGACY_TABLE_NAME = "sqlWorkbenchExecution"; @QField(isEditable = false, isPrimaryKey = true) diff --git a/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchNotebook.java b/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchNotebook.java index 24b3c7f..a19d6bc 100644 --- a/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchNotebook.java +++ b/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchNotebook.java @@ -33,10 +33,10 @@ public class SqlWorkbenchNotebook extends QRecordEntity public static final String TABLE_NAME = "sql_workbench_notebook"; /******************************************************************************* - ** The table name before 1.0.0-RC.3 (owner rule: lowercase snake_case, + ** The table name before 1.0.0-RC.4 (owner rule: lowercase snake_case, ** prefixed with the qbit name). Kept for migrating stored references only. *******************************************************************************/ - @Deprecated(since = "1.0.0-RC.3") + @Deprecated(since = "1.0.0-RC.4") public static final String LEGACY_TABLE_NAME = "sqlWorkbenchNotebook"; @QField(isEditable = false, isPrimaryKey = true) diff --git a/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchNotebookShare.java b/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchNotebookShare.java index c858d3a..e36a363 100644 --- a/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchNotebookShare.java +++ b/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchNotebookShare.java @@ -36,10 +36,10 @@ public class SqlWorkbenchNotebookShare extends QRecordEntity public static final String TABLE_NAME = "sql_workbench_notebook_share"; /******************************************************************************* - ** The table name before 1.0.0-RC.3 (owner rule: lowercase snake_case, + ** The table name before 1.0.0-RC.4 (owner rule: lowercase snake_case, ** prefixed with the qbit name). Kept for migrating stored references only. *******************************************************************************/ - @Deprecated(since = "1.0.0-RC.3") + @Deprecated(since = "1.0.0-RC.4") public static final String LEGACY_TABLE_NAME = "sqlWorkbenchNotebookShare"; @QField(isEditable = false, isPrimaryKey = true) diff --git a/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchNotebookVersion.java b/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchNotebookVersion.java index 5e2665e..bb57985 100644 --- a/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchNotebookVersion.java +++ b/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchNotebookVersion.java @@ -32,10 +32,10 @@ public class SqlWorkbenchNotebookVersion extends QRecordEntity public static final String TABLE_NAME = "sql_workbench_notebook_version"; /******************************************************************************* - ** The table name before 1.0.0-RC.3 (owner rule: lowercase snake_case, + ** The table name before 1.0.0-RC.4 (owner rule: lowercase snake_case, ** prefixed with the qbit name). Kept for migrating stored references only. *******************************************************************************/ - @Deprecated(since = "1.0.0-RC.3") + @Deprecated(since = "1.0.0-RC.4") public static final String LEGACY_TABLE_NAME = "sqlWorkbenchNotebookVersion"; @QField(isEditable = false, isPrimaryKey = true) diff --git a/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchResultSnapshot.java b/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchResultSnapshot.java index bf30969..add76cc 100644 --- a/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchResultSnapshot.java +++ b/src/main/java/com/kingsrook/qbits/sqlworkbench/model/SqlWorkbenchResultSnapshot.java @@ -33,10 +33,10 @@ public class SqlWorkbenchResultSnapshot extends QRecordEntity public static final String TABLE_NAME = "sql_workbench_result_snapshot"; /******************************************************************************* - ** The table name before 1.0.0-RC.3 (owner rule: lowercase snake_case, + ** The table name before 1.0.0-RC.4 (owner rule: lowercase snake_case, ** prefixed with the qbit name). Kept for migrating stored references only. *******************************************************************************/ - @Deprecated(since = "1.0.0-RC.3") + @Deprecated(since = "1.0.0-RC.4") public static final String LEGACY_TABLE_NAME = "sqlWorkbenchResultSnapshot"; @QField(isEditable = false, isPrimaryKey = true) diff --git a/src/test/java/com/kingsrook/qbits/sqlworkbench/SqlWorkbenchQBitProducerTest.java b/src/test/java/com/kingsrook/qbits/sqlworkbench/SqlWorkbenchQBitProducerTest.java index 8e083aa..e06bbad 100644 --- a/src/test/java/com/kingsrook/qbits/sqlworkbench/SqlWorkbenchQBitProducerTest.java +++ b/src/test/java/com/kingsrook/qbits/sqlworkbench/SqlWorkbenchQBitProducerTest.java @@ -178,9 +178,9 @@ class SqlWorkbenchQBitProducerTest extends BaseSqlWorkbenchTest /******************************************************************************* - ** Owner naming rule (1.0.0-RC.3): table, possible-value source, permission + ** Owner naming rule (1.0.0-RC.4): table, possible-value source, permission ** and security key names are lowercase snake_case prefixed with the qbit's - ** name; the pre-RC.3 names stay available only as deprecated constants. + ** name; the pre-RC.4 names stay available only as deprecated constants. *******************************************************************************/ @Test @SuppressWarnings("deprecation")