dolt
dolt copied to clipboard
Prevent altering table tables to have `FULLTEXT` key property
We don't support FULLTEXT keys, yet, so we should prevent altering tables to have them.
These two queries should return an error:
dolt> create table t (a int primary key, b int);
dolt> alter table t modify column b int fulltext key;
dolt> create table t (a int primary key);
dolt> alter table t add column b int fulltext key;
Example:
test-fk-indexes $ dolt sql -q "create table t (a int primary key, b int)"
test-fk-indexes $ dolt sql -q "alter table t modify column b int fulltext key;"
test-fk-indexes $ dolt sql -q "show create table t"
+-------+------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-------+------------------------------------------------------------------------------------------------------------------------------------+
| t | CREATE TABLE `t` (
`a` int NOT NULL,
`b` int,
PRIMARY KEY (`a`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_bin |
+-------+------------------------------------------------------------------------------------------------------------------------------------+
Resolving this in favor of #2987. We allow you to define some DDL we don't support on a table for mysqldump
compatibility.