mirror of
https://github.com/tursodatabase/limbo.git
synced 2025-08-04 18:18:03 +00:00
fix: prevent duplicate columns
This commit is contained in:
parent
e3da5a1f09
commit
e7ccb0b707
1 changed files with 6 additions and 0 deletions
|
@ -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");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue