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

Issue with multi-valued index expressions - sql2dbml mysql #578

Open
Rayyan98 opened this issue Jun 7, 2024 · 1 comment
Open

Issue with multi-valued index expressions - sql2dbml mysql #578

Rayyan98 opened this issue Jun 7, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@Rayyan98
Copy link

Rayyan98 commented Jun 7, 2024

We have a table with a mysql multii-valued composite index. Creating a multi-valued index in myql requires casting as per the docs https://dev.mysql.com/doc/refman/8.4/en/create-index.html#create-index-multi-valued

Our sql file to generate the schema contains the following

image

However, when we try to convert it to dbml using sql2dbml, it ends up looking like this

image

The incorrect quotes and formatting cause errors when feeding this file into other tools like dbdocs

Versions tested:

  • 3.5.0 (latest as of this writing)
  • 3.2.0

Not sure if this is a bug or not supported and what the correct should be

Modifying the output using a script as per some examples in the docs seems to make it work with dbdocs

Docs:
image

Working modification:
image

Can this be picked up as a bug and the index definition generated in quotes when a column has a generated or cast element

@huyleminh01
Copy link
Contributor

Hi @Rayyan98 ,

Thank you for reporting this issue.

Currently, we are not supporting the ability to convert the cast keyword as you use case to DBML. So, we added it to our backlog for the future improvement.

Also, if you are interested, please feel free to contribute to this repository.

Thanks.

@huyleminh01 huyleminh01 added the enhancement New feature or request label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants