versioning of FK for archiving

This commit is contained in:
Priec
2026-08-11 21:07:21 +02:00
parent 077d69d756
commit dcc07ee708
13 changed files with 529 additions and 11 deletions

View File

@@ -60,7 +60,26 @@ pub(crate) async fn load_page(
.into_inner();
let effective_profile = draft.effective_profile_name();
match tree
if draft.global {
let global_tables = tree
.profiles
.iter()
.flat_map(|profile| profile.tables.iter())
.filter(|table| table.global)
.map(|table| table.name.clone())
.collect::<std::collections::BTreeSet<_>>()
.into_iter()
.collect::<Vec<_>>();
draft.existing_profile_tables = tree
.profiles
.iter()
.flat_map(|profile| profile.tables.iter())
.map(|table| table.name.clone())
.collect::<std::collections::BTreeSet<_>>()
.into_iter()
.collect();
draft.set_available_relation_tables(global_tables);
} else { match tree
.profiles
.iter()
.find(|profile| profile.name == effective_profile)
@@ -82,7 +101,7 @@ pub(crate) async fn load_page(
draft.existing_profile_tables.clear();
draft.relation_tables.clear();
}
}
}}
Ok(AddTablePageState {
nav: crate::ui::Nav::new(headers, "admin").with_authorization(&authorization),