Closed
Description
When trying to parse some SQL like:
ALTER TABLE testtable
ADD UNIQUE KEY name_of_the_unique_constraint (`UNIQUE_COLUMN`);
or
ALTER TABLE testtable
ADD UNIQUE name_of_the_unique_constraint (`UNIQUE_COLUMN`);
the parser considers every token after the ADD
keyword as "unknown", while adding indexes or constraint works well. This is due to the lack of the presence of the options "UNIQUE" and "UNIQUE KEY" in the AlterOperation::$TABLE_OPTIONS
array.
I'll provide a PR about it, fixing also the unit tests about the parser expecting unknown tokens rather than well accepted options.