Export Diagram to Mermaid parse error

Answered

MySQL DDL:

```sql

create table users
(
id int(10)
);

create table posts
(
user_id int(10)
)
 
```

Select Schema or Table Right-Click ,select `Diagrams` -> `Show Diagram...`

If there is a relationship in these tables, like users.id is related to posts.user_id (foreign key can be used)

all select Tables, right-click, select `Export Diagram` `Open in Web Editor` `Mermaid`

Error:

```text

Error: Parse error on line 10:
...--> users : user_id:id
-----------------------^
Expecting 'NEWLINE', 'EOF', got 'LABEL'

```

Demo: (Online FlowChart & Diagrams Editor - Mermaid Live Editor

Just replace the `:` here with other characters, such as `=`

 

0
3 comments

Thank you ✪ ω ✪

---

I also encountered some strange problems, some times the exported TABLE NAME of Mermaid will become strange Node1, Node2, Node....

But I can't reproduce it for now, I'm going to try again

0

Please sign in to leave a comment.