mirror of
https://github.com/block/buzz.git
synced 2026-10-31 22:41:12 +00:00
chore(buzz-db): renumber NIP-FI migrations 0040/0041 → 0041/0042
main landed 0040_push_message_kinds.sql (#6269) which collides with the previous NIP-FI numbering. Renumber: 0040_nip_fi_identity_foundation.sql → 0041 0041_nip_fi_authorization_foundation.sql → 0042 Update all test references, run_to() calls, and schema.sql comments to match. The push_match_trigger test (migrations[39].version == 40) is unchanged — it covers the push-notification migration at 0040, not NIP-FI. Signed-off-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Hayt <9e1c23a3fd83f61da34420e4e88ff1b16e45cafcc0cd9019eb07d4ecfa8ca9b0@buzz.block.builderlab.xyz>
This commit is contained in:
@@ -2852,9 +2852,9 @@ mod tests {
|
||||
let pool = connect_test_pool().await;
|
||||
reset_public_schema(&pool).await;
|
||||
MIGRATOR
|
||||
.run_to(41, &pool)
|
||||
.run_to(42, &pool)
|
||||
.await
|
||||
.expect("apply migrations 1-41");
|
||||
.expect("apply migrations 1-42");
|
||||
|
||||
let community_id = uuid::Uuid::new_v4();
|
||||
sqlx::query("INSERT INTO communities (id, host) VALUES ($1, $2)")
|
||||
@@ -2984,9 +2984,9 @@ mod tests {
|
||||
let pool = connect_test_pool().await;
|
||||
reset_public_schema(&pool).await;
|
||||
MIGRATOR
|
||||
.run_to(40, &pool)
|
||||
.run_to(41, &pool)
|
||||
.await
|
||||
.expect("apply migrations 1-40");
|
||||
.expect("apply migrations 1-41");
|
||||
|
||||
let community_id = uuid::Uuid::new_v4();
|
||||
sqlx::query("INSERT INTO communities (id, host) VALUES ($1, $2)")
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
-- audio admission ledger, 30382 projection, delivery queue, exporter claim,
|
||||
-- acknowledgement, retry scheduler, or online retention/compaction workflow.
|
||||
--
|
||||
-- This migration applies to migration 0040's resulting state. Its scope is the
|
||||
-- This migration applies to migration 0041's resulting state. Its scope is the
|
||||
-- NIP-FI *final-admission* surface: replay/receipt, audit events, invalidation,
|
||||
-- capacity, protected-object authority, restore version deltas, and the closed
|
||||
-- admission result. Closed vocabularies below carry only the core subset;
|
||||
@@ -716,7 +716,7 @@ CREATE CONSTRAINT TRIGGER authorization_event_receipt_cardinality
|
||||
DEFERRABLE INITIALLY DEFERRED
|
||||
FOR EACH ROW EXECUTE FUNCTION authorization_operation_receipt_event_guard_v1();
|
||||
|
||||
-- Same ledger posture as migration 0040's identity relations: the admission,
|
||||
-- Same ledger posture as migration 0041's identity relations: the admission,
|
||||
-- replay, audit, and invalidation relations below are append-only denial and
|
||||
-- authority facts protected by immutable no_delete/no_truncate triggers, so
|
||||
-- they carry community_id as provenance rather than deletable ownership. Widen
|
||||
|
||||
@@ -1904,7 +1904,7 @@ INSERT INTO _operator_global_tables (table_name, reason) VALUES
|
||||
|
||||
|
||||
-- ============================================================================
|
||||
-- NIP-FI core identity + base-lifecycle foundation (mirror of migration 0040).
|
||||
-- NIP-FI core identity + base-lifecycle foundation (mirror of migration 0041).
|
||||
-- The community_write_fence_excluded_table definition above already folds in
|
||||
-- the NIP-FI ledger relations; the per-migration CREATE OR REPLACE bodies are
|
||||
-- intentionally omitted here (desired state keeps one consolidated definition).
|
||||
@@ -2751,7 +2751,7 @@ CREATE TRIGGER identity_lifecycle_selectors_no_truncate
|
||||
|
||||
|
||||
-- ============================================================================
|
||||
-- NIP-FI final-admission foundation (mirror of migration 0041).
|
||||
-- NIP-FI final-admission foundation (mirror of migration 0042).
|
||||
-- ============================================================================
|
||||
|
||||
CREATE TABLE authorization_invalidation_domains (
|
||||
@@ -2906,7 +2906,7 @@ CREATE TABLE authorization_event_capacity (
|
||||
-- 10 protected allowed, 11 protected denied, 14 invalidation advanced.
|
||||
-- The extended-lifecycle audit kinds (4 recovered, 5 principal enabled,
|
||||
-- 7 principal disabled, 8 admission lost) are deferred to the FI-LIFECYCLE
|
||||
-- migration, matching 0040's core lifecycle carve. Kinds 12 and 13 are
|
||||
-- migration, matching 0041's core lifecycle carve. Kinds 12 and 13 are
|
||||
-- retired: kind 24244 publication/withdrawal is ephemeral connection state and
|
||||
-- never a durable authorization event.
|
||||
CREATE TABLE authorization_events (
|
||||
|
||||
Reference in New Issue
Block a user