simple-ddl-parser icon indicating copy to clipboard operation
simple-ddl-parser copied to clipboard

MySQL - UNIQUE in Create Table with constraint name

Open hubg398 opened this issue 1 year ago • 0 comments

parse_results = DDLParser("""
CREATE TABLE `api_tokenbucket` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `value` VARCHAR(80),
  UNIQUE `constraint_name`(
    `value`
  )
);
"""
, silent=False).run(output_mode='mysql')

The above fails to parse. It works if we remove

'constraint_name'

Cheers

hubg398 avatar Jun 11 '24 00:06 hubg398