mirror of
https://github.com/aljazceru/turso.git
synced 2026-01-25 10:54:28 +01:00
fix: prevent duplicate columns
This commit is contained in:
@@ -220,6 +220,12 @@ pub fn translate_alter_table(
|
||||
)));
|
||||
};
|
||||
|
||||
if btree.get_column(&rename_to).is_some() {
|
||||
return Err(LimboError::ParseError(format!(
|
||||
"duplicate column name: \"{rename_from}\""
|
||||
)));
|
||||
};
|
||||
|
||||
let sqlite_schema = schema
|
||||
.get_btree_table(SQLITE_TABLEID)
|
||||
.expect("sqlite_schema should be on schema");
|
||||
|
||||
Reference in New Issue
Block a user