Improvement: New DBML Parser

Hi

Thank you so much for replies. It so great to see your guick reaction to the issue.
I used Donald’s example as I thought the issue was kind of a generic one.

But when I try to upload mine DB I still see it. If I paste whole my sql structure - i still see undefined undefined error.

If try to paste a piece of it: CREATE TABLE users (
id bigint(20) UNSIGNED NOT NULL,
first_name varchar(191) NOT NULL,
last_name varchar(191) NOT NULL,
email varchar(191) NOT NULL,
email_verified_at timestamp NULL DEFAULT NULL,
password varchar(300) NOT NULL,
signature varchar(191) DEFAULT NULL COMMENT ‘Enter your signature here’,
status_id int(11) NOT NULL DEFAULT 1,
organization_id int(11) DEFAULT NULL,
is_responsible_person tinyint(1) NOT NULL DEFAULT 0,
approved tinyint(1) NOT NULL DEFAULT 0 COMMENT ‘0 - не подтвержден; 1 - подтвержден;’,
remember_token varchar(100) DEFAULT NULL,
meeting_links longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(meeting_links)),
created_at timestamp NULL DEFAULT NULL,
updated_at timestamp NULL DEFAULT NULL,
is_from varchar(191) DEFAULT NULL,
end_session tinyint(1) NOT NULL DEFAULT 0 COMMENT ‘0 - не завершить сеанс; 1 - завершить сеанс;’
)

then I get

(7:11) missing ‘)’ at ‘(’
(19:47) no viable alternative at input ‘utf8mb4 COLLATE’

Thanks!

Hi @Ivan_S,
Your SQL looks more like it’s from a MySQL DB than a PostgreSQL DB. Can you try import it to dbml with the MySQL importer?

True, my bad.
Thank you !!

Hope previous fix will help someone.

Thanks again for great tool!

1 Like