OpenMetadata/bootstrap/sql
Pere Miquel Brull 62c12a133d
Fix 1.13.0 preview→enabled migration for event subscriptions (#26473)
* Fix preview→enabled migration for event_subscription_entity and QRTZ tables

The 1.13.0 migration renamed `preview` to `enabled` in `apps_marketplace`
and `installed_apps`, but missed the `event_subscription_entity` table.

The ReverseMetadata app stores the full App entity as an escaped JSON
string inside `event_subscription_entity.json -> config -> app`. Since
it's a string value (not a nested JSON object), standard JSON path
operations can't reach the `"preview"` field — string replacement is
needed instead.

Also truncates QRTZ tables to clear stale Quartz job data that may
contain old App JSON. Both schedulers re-create their jobs from the
database on startup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* Use DELETE instead of TRUNCATE for QRTZ cleanup to respect FK constraints

TRUNCATE fails on tables referenced by foreign keys in MySQL (and
without CASCADE in PostgreSQL). Switch to DELETE FROM with correct
FK ordering (children before parents) and add missing child tables
(QRTZ_SIMPROP_TRIGGERS, QRTZ_BLOB_TRIGGERS).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-13 15:17:59 +01:00
..
migrations Fix 1.13.0 preview→enabled migration for event subscriptions (#26473) 2026-03-13 15:17:59 +01:00
schema Deprecate Flyway and use Native migrations (#12865) 2023-08-17 14:39:05 -07:00