Closed hubg398 closed 2 months ago
@hubg398, thanks for opening the issue! I will try to take a look on it this week
@hubg398 I fixed case integer_column__unique_key
INT NOT NULL AUTO_INCREMENT UNIQUE KEY, , but I cannot find docs for DB where AUTO_INCREMENT can be used with INDEX, can you give some info about that is this DB and link for the doc with that statement? I will really appreciate
I fixed the first case in PR https://github.com/xnuinside/simple-ddl-parser/pull/256 and released version 1.5.0
Wow quick, thanks. Giving it a go.
Yea you're right it doesn't make sense to have AUTO_INCREMENT with INDEX, I think MySQL parses it without applying the AUTO_INCREMENT.
Either way, without the AUTO_INCREMENT
DDLParser("""CREATE TABLE `posts`(
`integer_column__index` INT NOT NULL INDEX
);""").run()
print(parse_results)
also returns [], which is probably not expected?
@hubg398 I think, I didn't add INDEX in column definition at all, I will add it, maybe today with patch release
@hubg398 INDEX support in column definition released in version 1.5.1 - https://github.com/xnuinside/simple-ddl-parser/pull/258. I just published release - https://pypi.org/project/simple-ddl-parser/. If will be needed anything else - feel free to open the new one issue.
🙏 Super appreciative of it, tested and works like a charm, thanks!
Is your feature request related to a problem? Please describe. It fails parsing INDEX and UNIQUE KEY of columns, within CREATE TABLE .... statements. Which should be valid, at least for MySQL
Sample SQL:
Thanks btw for the work on this parser, works a charm in a lot of cases.