5 more tests to go
This commit is contained in:
@@ -229,7 +229,7 @@ async fn execute_table_definition(
|
||||
return Err(Status::invalid_argument("Invalid column name"));
|
||||
}
|
||||
if col_name.ends_with("_id") || col_name == "id" || col_name == "deleted" || col_name == "created_at" {
|
||||
return Err(Status::invalid_argument("Invalid column name"));
|
||||
return Err(Status::invalid_argument("Column name cannot be 'id', 'deleted', 'created_at' or end with '_id'"));
|
||||
}
|
||||
let sql_type = map_field_type(&col_def.field_type)?;
|
||||
columns.push(format!("\"{}\" {}", col_name, sql_type));
|
||||
|
||||
Reference in New Issue
Block a user