diff --git a/paracelsus/transformers/mermaid.py b/paracelsus/transformers/mermaid.py index aba7bef..6414150 100644 --- a/paracelsus/transformers/mermaid.py +++ b/paracelsus/transformers/mermaid.py @@ -30,12 +30,11 @@ def _column(self, column: Column) -> str: column_str += " PK" elif len(column.foreign_keys) > 0: column_str += " FK" - options.append(f"Foreign key references {column.table.name}") elif column.unique: column_str += " UK" if column.comment: - options.append(f"{column.comment}") + options.append(column.comment) if column.nullable: options.append("nullable") diff --git a/tests/transformers/test_mermaid.py b/tests/transformers/test_mermaid.py index 3b5f878..cd176e1 100644 --- a/tests/transformers/test_mermaid.py +++ b/tests/transformers/test_mermaid.py @@ -4,7 +4,6 @@ def test_mermaid(metaclass): mermaid = Mermaid(metaclass=metaclass) graph_string = str(mermaid) - print(graph_string) assert "users {" in graph_string assert "posts {" in graph_string @@ -15,6 +14,6 @@ def test_mermaid(metaclass): assert "users ||--o{ comments : author" in graph_string assert "CHAR(32) author FK" in graph_string - assert 'CHAR(32) post FK "Foreign key references comments,nullable"' in graph_string + assert 'CHAR(32) post FK "nullable"' in graph_string assert 'BOOLEAN live "True if post is published,nullable"' in graph_string assert "DATETIME created" in graph_string