Skip to content

Commit 486f134

Browse files
nipunn1313Convex, Inc.
authored and
Convex, Inc.
committedApr 4, 2025·
Fix component initialization to cover new system tables in components. (#36205)
We have new system tables that should exist in components. This will make sure they get created if they don't exist. GitOrigin-RevId: e6443e54362376219ded9178de16d26ab6426fdd
1 parent 49495fc commit 486f134

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
 

‎crates/model/src/lib.rs

+20
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ pub use database::defaults::{
9090
};
9191
use database::{
9292
defaults::bootstrap_system_tables,
93+
BootstrapComponentsModel,
9394
ComponentDefinitionsTable,
9495
ComponentsTable,
9596
Database,
@@ -379,6 +380,25 @@ pub async fn initialize_application_system_tables<RT: Runtime>(
379380
}
380381
}
381382
}
383+
for component_id in BootstrapComponentsModel::new(&mut tx)
384+
.all_component_paths()
385+
.keys()
386+
.copied()
387+
{
388+
if component_id.is_root() {
389+
continue;
390+
}
391+
for table in component_system_tables() {
392+
initialize_application_system_table(
393+
&mut tx,
394+
table,
395+
component_id.into(),
396+
&DEFAULT_TABLE_NUMBERS,
397+
)
398+
.await?;
399+
}
400+
}
401+
382402
database
383403
.commit_with_write_source(tx, "init_app_system_tables")
384404
.await?;

0 commit comments

Comments
 (0)
Please sign in to comment.