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

mysql import fails to escape trailing singlequotes in column comments #572

Open
kalvdans opened this issue May 12, 2024 · 0 comments
Open

Comments

@kalvdans
Copy link

Consider the following mysql:

CREATE TABLE `curation_sample` (
  `sample_size` double DEFAULT NULL COMMENT 'The size of the sample in unit ''sample size unit'''
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci COMMENT='GENERATED:2024-05-02 20:28:51;';

sql2dbml outputs the following DBML document for this:

Table "curation_sample" {
  "sample_size" double [default: NULL, note: '''The size of the sample in unit ''sample size unit''''']
  Note: 'GENERATED:2024-05-02 20:28:51;'
}

The string ends with five single-quotes so it is not parsed correctly by a conformant DBML consumer.

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

No branches or pull requests

1 participant