Skip to content

Fix leaked bp_oximeter_read_policy rows #8577

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions nexus/db-model/src/schema_versions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ static KNOWN_VERSIONS: LazyLock<Vec<KnownVersion>> = LazyLock::new(|| {
// | leaving the first copy as an example for the next person.
// v
// KnownVersion::new(next_int, "unique-dirname-with-the-sql-files"),
KnownVersion::new(162, "fix-leaked-bp-oximeter-read-policy-rows"),
KnownVersion::new(161, "inv_cockroachdb_status"),
KnownVersion::new(160, "tuf-trust-root"),
KnownVersion::new(159, "sled-config-desired-host-phase-2"),
Expand Down
2 changes: 1 addition & 1 deletion schema/crdb/dbinit.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6198,7 +6198,7 @@ INSERT INTO omicron.public.db_metadata (
version,
target_version
) VALUES
(TRUE, NOW(), NOW(), '161.0.0', NULL)
(TRUE, NOW(), NOW(), '162.0.0', NULL)
ON CONFLICT DO NOTHING;

COMMIT;
3 changes: 3 additions & 0 deletions schema/crdb/fix-leaked-bp-oximeter-read-policy-rows/up1.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
set local disallow_full_table_scans = off;

DELETE FROM bp_oximeter_read_policy WHERE blueprint_id NOT IN (SELECT blueprint_id FROM blueprint);
Loading