holistics / holistics/dbml

Issue with multi-valued index expressions - sql2dbml mysql

Open
#578 1 comment 1 reaction 1 assignee Claimed by @huydo862003 View on GitHub
bug
Dominant language
JavaScript
Stars
3.7k
Forks
233
Avg merge
1d 23h
Merged PRs (30d)
4

Description

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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.