Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems with UNIQUE parsing #236

Closed
cfhowes opened this issue Jan 25, 2024 · 0 comments · Fixed by #237
Closed

Problems with UNIQUE parsing #236

cfhowes opened this issue Jan 25, 2024 · 0 comments · Fixed by #237

Comments

@cfhowes
Copy link
Contributor

cfhowes commented Jan 25, 2024

There appears to be a couple of problems with UNIQUE parsing.

  1. unique ("id", "title")
    I believe that this test is incorrect. The output should not have UNIQUE on the individual columns, but rather should have an entry in constraints.uniques with both columns listed in the columns. See https://www.mysqltutorial.org/mysql-basics/mysql-unique-constraint/#:~:text=To%20define%20a%20UNIQUE%C2%A0%20constraint%20for%20two%20or%20more%20columns%2C%20you%20use%20the%20following%20syntax%3A
  2. UNIQUE KEY statements currently cause the entire table to be ignored. IE UNIQUE KEY "fun_unique_key" ("fun_unique_column"), In this case I think we'd like a single column to parse into a column UNIQUE statement, and multiple columns to parse into the constraints.uniques location.
cfhowes added a commit to cfhowes/simple-ddl-parser that referenced this issue Jan 25, 2024
xnuinside added a commit that referenced this issue Jan 29, 2024
Issue #236: Updates to handle stand-alone UNIQUE and UNIQUE KEY statements
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant