Nikhil Soni
a81c7d3f97
fix(sqlmigration): skip saved views with dangling org_id in migration 109 ( #12469 )
...
## Summary
- `restructureSavedViewSpec` (migration 109) bulk-inserts legacy
`saved_views` rows into the new `saved_view` table, which has an
enforced `org_id -> organizations(id)` FK (sqlite runs with
`foreign_keys=ON`).
- Some tenants hit `constraint failed: FOREIGN KEY constraint failed
(787)` on startup because a row's `org_id` didn't match any live
organization -- e.g. an org deleted before the old table had a cascading
FK, or an install where `org_id` was never backfilled
(`015_update_dashboards_savedviews` only backfills it when there's
exactly one org).
- Fix: fetch live organization IDs up front inside the same transaction,
and skip (with a `WarnContext` log, counted in `skipped`) any row whose
non-empty `org_id` isn't among them -- same treatment as the existing
empty-`org_id` skip.
Followup to https://github.com/SigNoz/signoz/pull/12342
Co-authored-by: Claude Sonnet 5 <noreply@anthropic.com >
2026-08-08 07:03:40 +00:00
..
2026-05-23 03:05:06 +00:00
2026-05-26 05:42:34 +00:00
2025-03-20 15:31:41 +00:00
2025-03-20 15:31:41 +00:00
2025-03-20 15:31:41 +00:00
2025-03-20 15:31:41 +00:00
2025-03-20 15:31:41 +00:00
2025-03-20 15:31:41 +00:00
2025-03-20 15:31:41 +00:00
2025-03-20 15:31:41 +00:00
2025-03-20 15:31:41 +00:00
2025-03-20 15:31:41 +00:00
2025-03-20 15:31:41 +00:00
2025-05-23 15:52:58 +05:30
2025-05-23 15:52:58 +05:30
2025-09-09 15:44:27 +05:30
2026-06-06 17:34:35 +00:00
2025-05-23 15:52:58 +05:30
2025-05-23 15:52:58 +05:30
2025-05-23 15:52:58 +05:30
2025-05-23 15:52:58 +05:30
2025-05-23 15:52:58 +05:30
2025-05-23 15:52:58 +05:30
2025-05-23 15:52:58 +05:30
2025-05-23 15:52:58 +05:30
2025-05-23 15:52:58 +05:30
2025-05-23 15:52:58 +05:30
2025-04-11 07:36:31 +05:30
2025-05-25 11:40:39 +05:30
2026-06-12 20:48:08 +00:00
2025-05-23 15:52:58 +05:30
2025-05-23 15:52:58 +05:30
2025-05-23 15:52:58 +05:30
2025-05-23 15:52:58 +05:30
2025-05-23 15:52:58 +05:30
2025-05-23 15:52:58 +05:30
2025-05-24 19:14:29 +05:30
2025-05-27 17:42:08 +00:00
2025-05-31 16:04:13 +05:30
2026-05-05 19:13:09 +05:30
2025-06-02 22:41:38 +05:30
2025-06-03 17:05:42 +05:30
2025-06-09 15:46:22 +05:30
2025-06-18 18:06:36 +05:30
2025-07-08 00:21:26 +05:30
2025-07-08 00:21:26 +05:30
2025-07-08 00:21:26 +05:30
2025-07-08 00:21:26 +05:30
2026-03-22 04:06:31 +00:00
2025-08-07 16:50:37 +05:30
2025-09-01 07:30:57 +00:00
2026-05-05 19:13:09 +05:30
2025-10-16 18:00:38 +05:30
2025-11-14 00:43:02 +05:30
2025-11-18 00:21:46 +05:30
2025-11-19 23:50:39 +05:30
2025-11-19 23:50:39 +05:30
2026-01-02 16:44:20 +05:30
2026-01-02 16:44:20 +05:30
2026-01-03 16:40:06 +05:30
2026-01-27 15:31:15 +05:30
2026-07-13 11:42:42 +00:00
2026-02-03 19:54:07 +05:30
2026-05-05 19:13:09 +05:30
2026-02-03 19:54:07 +05:30
2026-03-17 15:43:58 +00:00
2026-02-17 15:26:56 +05:30
2026-02-17 17:53:13 +05:30
2026-03-22 04:06:31 +00:00
2026-03-09 18:16:04 +00:00
2026-03-09 18:16:04 +00:00
2026-03-31 09:11:49 +00:00
2026-05-05 19:13:09 +05:30
2026-03-23 13:36:20 +00:00
2026-03-23 13:36:20 +00:00
2026-04-01 07:20:59 +00:00
2026-04-01 07:20:59 +00:00
2026-04-01 07:20:59 +00:00
2026-04-03 20:27:04 +00:00
2026-04-21 19:28:01 +00:00
2026-05-08 20:33:02 +00:00
2026-05-12 07:51:02 +00:00
2026-05-12 11:14:21 +00:00
2026-05-14 11:06:17 +00:00
2026-05-14 13:38:42 +00:00
2026-05-15 12:53:48 +00:00
2026-05-19 15:24:27 +00:00
2026-05-20 12:37:25 +00:00
2026-05-23 03:05:06 +00:00
2026-05-25 13:40:06 +00:00
2026-05-26 05:42:34 +00:00
2026-05-26 14:46:44 +00:00
2026-05-27 10:23:39 +00:00
2026-05-29 11:21:05 +00:00
2026-06-10 17:34:46 +00:00
2026-06-11 12:50:32 +00:00
2026-06-12 20:48:08 +00:00
2026-06-17 08:33:07 +00:00
2026-06-26 14:26:43 +00:00
2026-06-26 17:16:04 +00:00
2026-07-01 09:26:53 +00:00
2026-07-13 11:42:42 +00:00
2026-07-14 11:08:59 +00:00
2026-07-27 15:52:06 +00:00
2026-07-22 11:34:25 +00:00
2026-07-26 17:57:39 +00:00
2026-07-29 10:39:41 +00:00
2026-07-30 07:18:31 +00:00
2026-08-03 18:22:43 +00:00
2026-08-04 08:53:34 +00:00
2026-08-06 07:19:21 +00:00
2026-08-08 07:03:40 +00:00
2026-08-07 13:37:56 +00:00
2025-03-20 15:31:41 +00:00
2025-09-09 15:44:27 +05:30