Skip to content

Commit 3e99e19

Browse files
TheSentinel454Elrondclaude
committed
buzz-db: fold the fence and NIP-RS drops into the floor retirement PR
The three contract drops have no ordering dependency on each other, only on app-side work that is already deployed, so they ship together as 0089 (floor), 0090 (community write fence) and 0091 (migration-only NIP-RS, mention-live and mesh-purge triggers). This renumbers the fence and NIP-RS tests, prose and lookups to match. Co-authored-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Luke Tornquist <[email protected]>
1 parent 2ca1b55 commit 3e99e19

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

‎crates/buzz-db/src/runtime/migration.rs‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1481,8 +1481,8 @@ mod postgres_tests {
14811481
assert!(deletion.contains("CREATE FUNCTION enforce_community_tombstone"));
14821482
let retirement = migrations
14831483
.iter()
1484-
.find(|migration| migration.version == 88)
1485-
.expect("retirement migration 0088")
1484+
.find(|migration| migration.version == 90)
1485+
.expect("retirement migration 0090")
14861486
.sql
14871487
.as_str();
14881488
assert!(retirement.starts_with("SET LOCAL lock_timeout = '5s';"));
@@ -1500,7 +1500,7 @@ mod postgres_tests {
15001500
retirement.contains(&format!(
15011501
"DROP TRIGGER IF EXISTS community_write_fence_{table} ON {table};"
15021502
)),
1503-
"0088 must retire the universal fence on {table}"
1503+
"0090 must retire the universal fence on {table}"
15041504
);
15051505
}
15061506
for signature in [

‎crates/buzz-db/src/store/deletion.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4623,7 +4623,7 @@ mod postgres_tests {
46234623
.expect("connect isolated migration DB");
46244624
// Stop just before the retirement migration so every current table
46254625
// exists and the universal fence objects are still present.
4626-
crate::migration::run_migrations_through(&db.pool, 86)
4626+
crate::migration::run_migrations_through(&db.pool, 89)
46274627
.await
46284628
.expect("migrate with fence objects present");
46294629
let store = db.deletion_store();

‎crates/buzz-db/src/store/relay_invite/upgrade_postgres_tests.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -419,7 +419,7 @@ async fn assert_admission_column(pool: &PgPool) {
419419

420420
async fn apply_pgschema_to_existing_database(pool: &PgPool) {
421421
// The pinned migration history has retired triggers on partitioned
422-
// parents (events, delivery_log), including the floor trigger 0087
422+
// parents (events, delivery_log), including the floor trigger 0089
423423
// drops, and auto-named deletion-request checks that the desired schema
424424
// replaces. pgschema orders child-trigger drops
425425
// before their parent (Postgres refuses with 2BP01) and schedules a

‎crates/buzz-db/src/test_support.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ fn drop_cluster_object(admin_url: &str, object: &str, statement: String) {
186186

187187
/// One-session fixture with ordinary triggers disabled, so application
188188
/// admission is the only community write fence it exercises (as it is in
189-
/// production after migration 0088). Communities are active, quiescing, fenced.
189+
/// production after migration 0090). Communities are active, quiescing, fenced.
190190
pub(crate) async fn admission_fixture() -> (crate::Db, [buzz_core::CommunityId; 3]) {
191191
use buzz_core::CommunityId;
192192
use uuid::Uuid;

‎docs/database.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ transaction that owns the write:
7676
Dropping or narrowing an existing trigger or function is welcome. Follow the
7777
retirement sequence below.
7878

79-
**No exception for the community write fence.** Migration 0088 dropped the
79+
**No exception for the community write fence.** Migration 0090 dropped the
8080
universal fence triggers and their helper functions; a new table MUST NOT bring
8181
a fence trigger back. Writers of a new tenant-owned table MUST be
8282
fenced in the application instead, by community admission. New serving work,

0 commit comments

Comments
 (0)