now not creating tables with the year_ prefix and living in the gen schema by default

This commit is contained in:
filipriec
2025-06-17 11:45:55 +02:00
parent 3eb9523103
commit 8ebe74484c
8 changed files with 82 additions and 41 deletions

View File

@@ -24,11 +24,9 @@ fn is_valid_identifier(s: &str) -> bool {
}
fn sanitize_table_name(s: &str) -> String {
let year = OffsetDateTime::now_utc().year();
let cleaned = s.replace(|c: char| !c.is_ascii_alphanumeric() && c != '_', "")
s.replace(|c: char| !c.is_ascii_alphanumeric() && c != '_', "")
.trim()
.to_lowercase();
format!("{}_{}", year, cleaned)
.to_lowercase()
}
fn sanitize_identifier(s: &str) -> String {