fixing tests and migration to the serialized deserialized JSONB

This commit is contained in:
Priec
2025-09-17 21:10:11 +02:00
parent 532977056d
commit 095645a209
2 changed files with 6 additions and 15 deletions

View File

@@ -201,6 +201,7 @@ async fn execute_table_definition(
// Indexes
let mut stored_indexes = Vec::new();
let mut indexes = Vec::new();
for idx in request.indexes.drain(..) {
let idx_name = idx.trim().to_string();
validate_identifier_format(&idx_name, "Index name")?;
@@ -211,17 +212,7 @@ async fn execute_table_definition(
)));
}
stored_indexes.push(idx_name);
}
let mut indexes = Vec::new();
for idx in request.indexes.drain(..) {
let idx_name = idx.trim().to_string();
validate_identifier_format(&idx_name, "Index name")?;
if !sql_columns.iter().any(|c| c.starts_with(&format!("\"{}\"", idx_name))) {
return Err(Status::invalid_argument(format!("Index column '{}' not found", idx_name)));
}
stored_indexes.push(idx_name.clone());
indexes.push(idx_name);
}