drawdb-io / drawdb

Free, simple, and intuitive online database diagram editor and SQL generator.
https://drawdb.app
GNU Affero General Public License v3.0
22.7k stars 1.58k forks source link

[BUG]When importing SQL source files, bit type fields are not supported #256

Open majiang213 opened 1 month ago

majiang213 commented 1 month ago

Describe the bug As the title

To Reproduce Steps to reproduce the behavior: 1.文件 -> 导入 SQL 源代码

create table a
(
    deleted bit,
);

2.Get an error SyntaxError [Ln 4, Col 1]: Expected "#", "(", "--", "/*", or [ \t\n\r] but ")" found.

image

Expected behavior import success

Desktop (please complete the following information):

Additional context Because it does not support sql type files, I changed the suffix to txt bit_test.txt

1ilit commented 1 month ago

reported https://github.com/taozhi8833998/node-sql-parser/issues/2162

srichatala commented 4 weeks ago

I had similar error as @majiang213 but, what I observed, if you write sql file in following format we can see table created in UI but only the first table created from script. I am expecting to create two tables even though tables doesn't have relationship. correct me if I am wrong.

create table student(
    id int not null,
    name nvarchar(50)
)
go

create table college(
    id int not null,
    name nvarchar(50)
)
go
image