dineug / erd-editor

Entity-Relationship Diagram Editor
https://erd-editor.io
MIT License
931 stars 97 forks source link

Fails to import relationships from importing a Postgres DDL #376

Closed bryanhughes closed 1 month ago

bryanhughes commented 3 months ago

Describe the bug I imported our production Postgres DDL to test out. It seems to fail to read in ALL foreign key relationships. On closer examination, the tool seems to not support ALTER or COMMENT statements, which is critical issues

To Reproduce Steps to reproduce the behavior:

  1. Import a Postgres DDL .sql file

Expected behavior A full diagram with relationships

Screenshots

Screenshot 2024-07-30 at 6 56 18 AM Screenshot 2024-07-30 at 6 56 36 AM

VSCode (please complete the following information): Version: 1.87.2 (Universal) Commit: 863d2581ecda6849923a2118d93a088b0745d9d6 Date: 2024-03-08T15:21:31.043Z Electron: 27.3.2 ElectronBuildId: 26836302 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Darwin arm64 23.5.0

Extension: v1.0.20

Additional context Wish it worked

dineug commented 3 months ago

It would be very helpful if you could provide an example of the reproducible syntax. Since it might take some time to make corrections, it would be faster if you could correct it to a working syntax so I can use it immediately.

https://github.com/dineug/erd-editor/blob/main/packages/schema-sql-parser/src/schema_sql_test_case.md#alter-table-add-foreign-key @bryanhughes

dineug commented 1 month ago

Modified in VSCode extension v2.0.1