diff --git a/crates/buzz-db/src/runtime/migration.rs b/crates/buzz-db/src/runtime/migration.rs index 77afeb5754..10f66bfb22 100644 --- a/crates/buzz-db/src/runtime/migration.rs +++ b/crates/buzz-db/src/runtime/migration.rs @@ -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)") diff --git a/migrations/0042_nip_fi_authorization_foundation.sql b/migrations/0042_nip_fi_authorization_foundation.sql index 586b34d9e9..633d115070 100644 --- a/migrations/0042_nip_fi_authorization_foundation.sql +++ b/migrations/0042_nip_fi_authorization_foundation.sql @@ -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 diff --git a/schema/schema.sql b/schema/schema.sql index c6c5c4edb8..537ea283e4 100644 --- a/schema/schema.sql +++ b/schema/schema.sql @@ -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 (