sql2dbml - Mysql 8.0.13+ reference to column in DEFAULT generates incorrect dbml
Open
bug
- Dominant language
- JavaScript
- Stars
- 3.7k
- Forks
- 233
- Avg merge
- 1d 23h
- Merged PRs (30d)
- 4
Description
I ran into the issue that for sql statements like the following
```sql
CREATE TABLE `some_table` (
code VARCHAR(6)
);
-- migration file later on
UPDATE TABLE `some_table`
ADD name VARCHAR(80) DEFAULT(`code`);
```
generates incorrect dbml when generated from an sql dump. The resulting dbml will have double backticks around the word `code`, as follows:
```dbml
name VARCHAR(80) DEFAULT(``code``)
```
This leads to tools following in the pipeline to error.
Contributor guide
Assessment
This issue has not been assessed yet.