Add bats check for importing table with absent auto-increment column.

This commit is contained in:
Nick Tobey
2023-05-04 14:25:08 -07:00
parent 13fe337b38
commit d87f6d9fc1

View File

@@ -1296,3 +1296,23 @@ DELIM
[ $status -eq 0 ]
[[ "$output" =~ '1,0,0,0,0,0,0,0,0,0,0,0000-00-00,00:00:00,0000-00-00 00:00:00,0000-00-00 00:00:00,0,first,""' ]] || false
}
@test "import-update-tables: import table with absent auto-increment column" {
dolt sql <<SQL
CREATE TABLE tbl (
id int PRIMARY KEY AUTO_INCREMENT,
v1 int,
v2 int,
INDEX v1 (v1),
INDEX v2 (v2)
);
SQL
cat <<DELIM > auto-increment.csv
v1,v2
4,2
3,1
DELIM
dolt table import -u tbl auto-increment.csv
}