You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I try to convert sakila/sakila-mv-schema.sql to DBML format, but in this file There are a lot of DELIMITER. When sql2dbml encounters these symbols, the following error will appear:
$ sql2dbml --mysql ./sakila/sakila-mv-schema.sql -o mydatabase.dbml
ERROR:
You have a syntax error at "sakila-mv-schema.sql" line 189 column 0. mismatched input 'DELIMITER' expecting {<EOF>, '-'}
A complete log can be found in:
/workspace/test_db/dbml-error.log
The code at "sakila-mv-schema.sql" line 189 is as follows:
...
CREATETABLEfilm_text (
film_id SMALLINTNOT NULL,
title VARCHAR(255) NOT NULL,
description TEXT,
PRIMARY KEY (film_id),
FULLTEXT KEY idx_title_description (title,description)
)ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- After MySQL 5.6.10, InnoDB supports fulltext indexes/*!50610 ALTER TABLE film_text engine=InnoDB */;
---- Triggers for loading film_text from film--
DELIMITER ;;
CREATETRIGGER `ins_film` AFTER INSERT ON`film` FOR EACH ROW BEGININSERT INTO film_text (film_id, title, description)
VALUES (new.film_id, new.title, new.description);
END;;
CREATETRIGGER `upd_film` AFTER UPDATEON`film` FOR EACH ROW BEGIN
IF (old.title!=new.title) OR (old.description!=new.description) OR (old.film_id!=new.film_id)
THEN
UPDATE film_text
SET title=new.title,
description=new.description,
film_id=new.film_idWHERE film_id=old.film_id;
END IF;
END;;
...
The text was updated successfully, but these errors were encountered:
I try to convert sakila/sakila-mv-schema.sql to DBML format, but in this file There are a lot of
DELIMITER
. Whensql2dbml
encounters these symbols, the following error will appear:The code at "sakila-mv-schema.sql" line 189 is as follows:
The text was updated successfully, but these errors were encountered: