disallow destroying relations with indices

main
Ziyang Hu 2 years ago
parent 2abdda43f9
commit b07e28c420

@ -584,6 +584,9 @@ impl<'a> SessionTx<'a> {
bail!("Cannot destroy temp relation");
}
let store = self.get_relation(name, true)?;
if !stored.indices.is_empty() {
bail!("Cannot remove stored relation `{}` with indices attached.", name);
}
if store.access_level < AccessLevel::Normal {
bail!(InsufficientAccessLevel(
store.name.to_string(),

Loading…
Cancel
Save