Skip to content

Commit 557771d

Browse files
nipunn1313Convex, Inc.
authored and
Convex, Inc.
committed
Delete the BackendServingRecord table (#35725)
GitOrigin-RevId: 6ecaf3c58787a18bb2783b6056cdb65d61fb6207
1 parent 69e529d commit 557771d

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

crates/model/src/migrations.rs

+14-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ impl fmt::Display for MigrationCompletionCriterion {
8181
// migrations unless explicitly dropping support.
8282
// Add a user name next to the version when you make a change to highlight merge
8383
// conflicts.
84-
pub const DATABASE_VERSION: DatabaseVersion = 116; // lee
84+
pub const DATABASE_VERSION: DatabaseVersion = 117; // nipunn
8585

8686
pub struct MigrationWorker<RT: Runtime> {
8787
rt: RT,
@@ -379,6 +379,19 @@ impl<RT: Runtime> MigrationWorker<RT> {
379379
116 => MigrationCompletionCriterion::LogLine(
380380
format!("Created system table: {}", *CANONICAL_URLS_TABLE).into(),
381381
),
382+
117 => {
383+
let backend_serving_record_table: TableName = "_backend_serving_record"
384+
.parse()
385+
.expect("Invalid built-in backend_serving_record table");
386+
let mut tx = self.db.begin_system().await?;
387+
TableModel::new(&mut tx)
388+
.delete_active_table(TableNamespace::Global, backend_serving_record_table)
389+
.await?;
390+
self.db
391+
.commit_with_write_source(tx, "migration_117")
392+
.await?;
393+
MigrationCompletionCriterion::MigrationComplete(to_version)
394+
},
382395
// NOTE: Make sure to increase DATABASE_VERSION when adding new migrations.
383396
_ => anyhow::bail!("Version did not define a migration! {}", to_version),
384397
};

0 commit comments

Comments
 (0)