diff options
author | MisterCoder <> | 2019-11-13 19:34:43 +0100 |
---|---|---|
committer | William Desportes <williamdes@wdes.fr> | 2019-11-13 19:39:01 +0100 |
commit | 2c3041f91b51ba9de24f8ff99094706c77194fcb (patch) | |
tree | a48d8d356ba43fe1860ea08c2e820eb51e374c59 /src/Components/AlterOperation.php | |
parent | 35a895a1ad4f4b068e44c4cd17c04759c71eed13 (diff) | |
download | sql-parser-2c3041f91b51ba9de24f8ff99094706c77194fcb.zip sql-parser-2c3041f91b51ba9de24f8ff99094706c77194fcb.tar.gz sql-parser-2c3041f91b51ba9de24f8ff99094706c77194fcb.tar.bz2 |
fixes #267 - ALTER TABLE ... PRIMARY/UNIQUE KEY "Missing comma" error
Diffstat (limited to 'src/Components/AlterOperation.php')
-rw-r--r-- | src/Components/AlterOperation.php | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Components/AlterOperation.php b/src/Components/AlterOperation.php index b3f8e26..e3a3f9f 100644 --- a/src/Components/AlterOperation.php +++ b/src/Components/AlterOperation.php @@ -331,6 +331,7 @@ class AlterOperation extends Component * between column and table alteration * * @param string $tokenValue Value of current token + * @return bool */ private static function checkIfColumnDefinitionKeyword($tokenValue) { @@ -339,7 +340,11 @@ class AlterOperation extends Component 'COMMENT', 'DEFAULT', 'CHARACTER SET', - 'COLLATE' + 'COLLATE', + 'PRIMARY', + 'UNIQUE', + 'PRIMARY KEY', + 'UNIQUE KEY' ); // Since these options can be used for // both table as well as a specific column in the table |