mirror of
https://github.com/block/buzz.git
synced 2026-10-27 12:40:30 +00:00
fix(db): resolve duplicate migration version (#1863)
Signed-off-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co> Co-authored-by: npub12gtutshhh76rx0jx697f32f9tffd4hhp3hx58fp4x6u4uemkm7sqf8f757 <5217c5c2f7bfb4333e46d17c98a9255a52dadee18dcd43a43536b95e6776dfa0@sprout-oss.stage.blox.sqprod.co>
This commit is contained in:
@@ -549,7 +549,7 @@ mod tests {
|
||||
let mut migrations: Vec<_> = MIGRATOR.iter().collect();
|
||||
migrations.sort_by_key(|migration| migration.version);
|
||||
|
||||
assert_eq!(migrations.len(), 16);
|
||||
assert_eq!(migrations.len(), 17);
|
||||
assert_eq!(migrations[0].version, 1);
|
||||
assert_eq!(&*migrations[0].description, "initial schema");
|
||||
assert!(migrations[0]
|
||||
@@ -765,18 +765,24 @@ mod tests {
|
||||
.as_str()
|
||||
.contains("_operator_global_tables"));
|
||||
|
||||
// Product feedback is a deployment-private sidecar; community_id is
|
||||
// provenance, not an operator-review authorization boundary.
|
||||
assert_eq!(migrations[15].version, 16);
|
||||
assert!(migrations[15]
|
||||
.sql
|
||||
.as_str()
|
||||
.contains("ADD COLUMN archived_at"));
|
||||
|
||||
// Product feedback is a deployment-private sidecar; community_id is
|
||||
// provenance, not an operator-review authorization boundary.
|
||||
assert_eq!(migrations[16].version, 17);
|
||||
assert!(migrations[16]
|
||||
.sql
|
||||
.as_str()
|
||||
.contains("CREATE TABLE product_feedback"));
|
||||
assert!(migrations[15]
|
||||
assert!(migrations[16]
|
||||
.sql
|
||||
.as_str()
|
||||
.contains("community_id UUID NOT NULL"));
|
||||
assert!(migrations[15]
|
||||
assert!(migrations[16]
|
||||
.sql
|
||||
.as_str()
|
||||
.contains("('product_feedback', 'deployment product inbox"));
|
||||
@@ -1023,7 +1029,7 @@ mod tests {
|
||||
run_migrations(&pool)
|
||||
.await
|
||||
.expect("retry succeeds after operator repair");
|
||||
assert_eq!(applied_versions(&pool).await.last().copied(), Some(16));
|
||||
assert_eq!(applied_versions(&pool).await.last().copied(), Some(17));
|
||||
}
|
||||
|
||||
#[tokio::test]
|
||||
|
||||
Reference in New Issue
Block a user