Skip to content

Commit 2cf0a83

Browse files
Merge branch 'feat/media-shares' into fix/channel-scoped-media
* feat/media-shares: fix(db): bound the media migration lock wait Signed-off-by: Nikolaj Goodger <[email protected]>
2 parents 7b8bee1 + 11f017f commit 2cf0a83

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -811,6 +811,9 @@ mod postgres_tests {
811811
.as_str()
812812
.contains("CREATE TABLE community_nip_fi_issuers"));
813813
assert_eq!(migrations[67].version, 68);
814+
assert!(strip_sql_comments(migrations[67].sql.as_str())
815+
.trim_start()
816+
.starts_with("SET LOCAL lock_timeout = '5s';"));
814817
for table in ["media_uploaders", "media_shares"] {
815818
assert!(migrations[67]
816819
.sql

‎migrations/0068_media_access.sql‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
SET LOCAL lock_timeout = '5s';
2+
13
-- Durable historical backfill cutoff, independent of the schema install tool.
24
ALTER TABLE communities
35
ADD COLUMN media_shares_recording_started_at TIMESTAMPTZ NOT NULL DEFAULT now();

0 commit comments

Comments
 (0)