@dbml/cli 10.4.0-alpha.2 → 10.4.0-alpha.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__tests__/db2dbml/mssql/dbml-error.log +99 -0
- package/__tests__/db2dbml/mysql/dbml-error.log +27 -0
- package/__tests__/db2dbml/oracle/dbml-error.log +112 -0
- package/__tests__/db2dbml/postgres/dbml-error.log +56 -0
- package/__tests__/dbml2sql/filename --mysql --out-file/out-files/schema.sql +65 -0
- package/__tests__/dbml2sql/filename --oracle --out-file/out-files/schema.sql +61 -0
- package/__tests__/dbml2sql/filename --oracle stdout/dbml-error.log +0 -0
- package/__tests__/dbml2sql/filename --out-file/dbml-error.log +0 -0
- package/__tests__/dbml2sql/filename --out-file/out-files/schema.sql +77 -0
- package/__tests__/dbml2sql/filename --postgres --out-file/dbml-error.log +0 -0
- package/__tests__/dbml2sql/filename --postgres --out-file/out-files/schema.sql +77 -0
- package/__tests__/dbml2sql/filename --postgres stdout/dbml-error.log +0 -0
- package/__tests__/dbml2sql/filename stdout/dbml-error.log +0 -0
- package/__tests__/dbml2sql/filenames --mysql --out-file/dbml-error.log +0 -0
- package/__tests__/dbml2sql/filenames --mysql --out-file/out-files/schema.sql +172 -0
- package/__tests__/dbml2sql/filenames --mysql stdout/dbml-error.log +0 -0
- package/__tests__/dbml2sql/filenames --oracle --out-file/dbml-error.log +0 -0
- package/__tests__/dbml2sql/filenames --oracle --out-file/out-files/schema.sql +172 -0
- package/__tests__/dbml2sql/filenames --oracle stdout/dbml-error.log +0 -0
- package/__tests__/dbml2sql/filenames --out-file/dbml-error.log +0 -0
- package/__tests__/dbml2sql/filenames --out-file/out-files/schema.sql +172 -0
- package/__tests__/dbml2sql/filenames --postgres --out-file/dbml-error.log +0 -0
- package/__tests__/dbml2sql/filenames --postgres --out-file/out-files/schema.sql +172 -0
- package/__tests__/dbml2sql/filenames --postgres stdout/dbml-error.log +0 -0
- package/__tests__/dbml2sql/filenames stdout/dbml-error.log +0 -0
- package/__tests__/dbml2sql/multifile error entry-syntax-error/dbml-error.log +41 -1
- package/__tests__/dbml2sql/multifile error entry-syntax-error/stdout.txt +1 -1
- package/__tests__/dbml2sql/multifile error import-not-found/dbml-error.log +6921 -441
- package/__tests__/dbml2sql/multifile error imported-syntax-error/dbml-error.log +41 -1
- package/__tests__/dbml2sql/multifile error imported-syntax-error/stdout.txt +1 -1
- package/__tests__/dbml2sql/multifile error transitive-use-not-visible/dbml-error.log +33 -1
- package/__tests__/dbml2sql/multiple_schema_mssql/dbml-error.log +0 -0
- package/__tests__/dbml2sql/multiple_schema_mssql/out-files/multiple_schema.out.sql +62 -0
- package/__tests__/dbml2sql/multiple_schema_mysql/dbml-error.log +0 -0
- package/__tests__/dbml2sql/multiple_schema_mysql/out-files/multiple_schema.out.sql +50 -0
- package/__tests__/dbml2sql/multiple_schema_oracle/dbml-error.log +0 -0
- package/__tests__/dbml2sql/multiple_schema_oracle/out-files/multiple_schema.out.sql +88 -0
- package/__tests__/dbml2sql/multiple_schema_pg/dbml-error.log +0 -0
- package/__tests__/dbml2sql/multiple_schema_pg/out-files/multiple_schema.out.sql +67 -0
- package/__tests__/dbml2sql/single file stdout/dbml-error.log +0 -0
- package/__tests__/dbml2sql/syntax-error/dbml-error.log +45 -0
- package/__tests__/dbml2sql/syntax-error/stdout.txt +1 -1
- package/__tests__/sql2dbml/custom-error-alter-table-column-not-found --oracle/dbml-error.log +36 -0
- package/__tests__/sql2dbml/custom-error-alter-table-column-not-found --oracle/stdout.txt +1 -1
- package/__tests__/sql2dbml/custom-error-alter-table-table-not-found --oracle/dbml-error.log +36 -0
- package/__tests__/sql2dbml/custom-error-column-comment-column-not-found --oracle/dbml-error.log +36 -0
- package/__tests__/sql2dbml/custom-error-column-comment-table-not-found --oracle/dbml-error.log +36 -0
- package/__tests__/sql2dbml/custom-error-create-index-table-not-found --oracle/dbml-error.log +36 -0
- package/__tests__/sql2dbml/custom-error-table-comment-table-not-found --oracle/dbml-error.log +36 -0
- package/__tests__/sql2dbml/filename --mssql --out-file/dbml-error.log +0 -0
- package/__tests__/sql2dbml/filename --mssql --out-file/out-files/schema.dbml +25 -0
- package/__tests__/sql2dbml/filename --mysql --out-file/dbml-error.log +0 -0
- package/__tests__/sql2dbml/filename --mysql --out-file/out-files/schema.dbml +74 -0
- package/__tests__/sql2dbml/filename --mysql stdout/dbml-error.log +0 -0
- package/__tests__/sql2dbml/filename --oracle --out-file/dbml-error.log +0 -0
- package/__tests__/sql2dbml/filename --oracle --out-file/out-files/schema.dbml +83 -0
- package/__tests__/sql2dbml/filename --out-file/dbml-error.log +0 -0
- package/__tests__/sql2dbml/filename --out-file/out-files/schema.dbml +74 -0
- package/__tests__/sql2dbml/filename --postgres --out-file/dbml-error.log +0 -0
- package/__tests__/sql2dbml/filename --postgres --out-file/out-files/schema.dbml +74 -0
- package/__tests__/sql2dbml/filename --postgres stdout/dbml-error.log +0 -0
- package/__tests__/sql2dbml/filename --snowflake stdout/dbml-error.log +0 -0
- package/__tests__/sql2dbml/filename stdout/dbml-error.log +0 -0
- package/__tests__/sql2dbml/filenames --mysql --out-file/dbml-error.log +0 -0
- package/__tests__/sql2dbml/filenames --mysql --out-file/out-files/schema.dbml +170 -0
- package/__tests__/sql2dbml/filenames --mysql stdout/dbml-error.log +0 -0
- package/__tests__/sql2dbml/filenames --out-file/dbml-error.log +0 -0
- package/__tests__/sql2dbml/filenames --out-file/out-files/schema.dbml +170 -0
- package/__tests__/sql2dbml/filenames --postgres --out-file/dbml-error.log +0 -0
- package/__tests__/sql2dbml/filenames --postgres --out-file/out-files/schema.dbml +170 -0
- package/__tests__/sql2dbml/filenames --postgres stdout/dbml-error.log +0 -0
- package/__tests__/sql2dbml/filenames stdout/dbml-error.log +0 -0
- package/__tests__/sql2dbml/multiple_schema_mssql/dbml-error.log +0 -0
- package/__tests__/sql2dbml/multiple_schema_mssql/out-files/multiple_schema.out.dbml +58 -0
- package/__tests__/sql2dbml/multiple_schema_mysql/dbml-error.log +0 -0
- package/__tests__/sql2dbml/multiple_schema_mysql/out-files/multiple_schema.out.dbml +136 -0
- package/__tests__/sql2dbml/multiple_schema_pg/dbml-error.log +0 -0
- package/__tests__/sql2dbml/multiple_schema_pg/out-files/multiple_schema.out.dbml +101 -0
- package/__tests__/sql2dbml/syntax-error/dbml-error.log +36 -0
- package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mssql/dbml-error.log +36 -0
- package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mssql/stdout.txt +1 -1
- package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mysql/dbml-error.log +36 -0
- package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mysql/stdout.txt +1 -1
- package/lib/index.js +28 -84
- package/package.json +5 -5
- /package/__tests__/dbml2sql/{multifile --postgres stdout → filename --mysql --out-file}/dbml-error.log +0 -0
- /package/__tests__/{windows/multifile-relative → dbml2sql/filename --mysql stdout}/dbml-error.log +0 -0
- /package/{dbml-error.log → __tests__/dbml2sql/filename --oracle --out-file/dbml-error.log} +0 -0
|
@@ -1,4 +1,44 @@
|
|
|
1
|
-
2026-
|
|
1
|
+
2026-06-15T10:57:46.746Z
|
|
2
|
+
|
|
3
|
+
./in-files/broken.dbml(4,1): Expect an identifier
|
|
4
|
+
./in-files/broken.dbml(2,11): Unknown column setting 'pk name varchar'
|
|
5
|
+
|
|
6
|
+
2026-06-15T10:58:51.926Z
|
|
7
|
+
|
|
8
|
+
./in-files/broken.dbml(4,1): Expect an identifier
|
|
9
|
+
./in-files/broken.dbml(2,11): Unknown column setting 'pk name varchar'
|
|
10
|
+
|
|
11
|
+
2026-07-22T11:03:37.719Z
|
|
12
|
+
|
|
13
|
+
./in-files/broken.dbml(4,1): Expect an identifier
|
|
14
|
+
./in-files/broken.dbml(2,11): Custom setting 'pk name varchar' must be a string or a color literal
|
|
15
|
+
|
|
16
|
+
2026-07-22T11:07:10.314Z
|
|
17
|
+
|
|
18
|
+
./in-files/broken.dbml(4,1): Expect an identifier
|
|
19
|
+
./in-files/broken.dbml(2,11): Custom setting 'pk name varchar' must be a string or a color literal
|
|
20
|
+
|
|
21
|
+
2026-07-22T11:09:52.085Z
|
|
22
|
+
|
|
23
|
+
./in-files/broken.dbml(4,1): Expect an identifier
|
|
24
|
+
./in-files/broken.dbml(2,11): Custom setting 'pk name varchar' must be a string or a color literal
|
|
25
|
+
|
|
26
|
+
2026-10-19T04:21:56.473Z
|
|
27
|
+
|
|
28
|
+
./in-files/broken.dbml(4,1): Expect an identifier
|
|
29
|
+
./in-files/broken.dbml(2,11): Custom setting 'pk name varchar' must be a string or a color literal
|
|
30
|
+
|
|
31
|
+
2026-10-19T04:25:06.491Z
|
|
32
|
+
|
|
33
|
+
./in-files/broken.dbml(4,1): Expect an identifier
|
|
34
|
+
./in-files/broken.dbml(2,11): Custom setting 'pk name varchar' must be a string or a color literal
|
|
35
|
+
|
|
36
|
+
2026-10-19T08:37:38.016Z
|
|
37
|
+
|
|
38
|
+
./in-files/broken.dbml(4,1): Expect an identifier
|
|
39
|
+
./in-files/broken.dbml(2,11): Custom setting 'pk name varchar' must be a string, a color literal, a number literal, or a boolean literal
|
|
40
|
+
|
|
41
|
+
2026-10-20T03:59:07.937Z
|
|
2
42
|
|
|
3
43
|
./in-files/broken.dbml(4,1): Expect an identifier
|
|
4
44
|
./in-files/broken.dbml(2,11): Custom setting 'pk name varchar' must be a string or a color literal
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
ERROR:
|
|
2
2
|
./in-files/broken.dbml(4,1): Expect an identifier
|
|
3
|
-
./in-files/broken.dbml(2,11): Custom setting 'pk name varchar' must be a string or a
|
|
3
|
+
./in-files/broken.dbml(2,11): Custom setting 'pk name varchar' must be a string, a color literal, a number literal, or a boolean literal
|
|
4
4
|
|
|
5
5
|
A complete log can be found in:
|
|
@@ -1,4 +1,36 @@
|
|
|
1
|
-
2026-
|
|
1
|
+
2026-06-15T10:57:47.480Z
|
|
2
|
+
|
|
3
|
+
./in-files/main.dbml(3,17): Table 'products' does not exist in Schema 'public'
|
|
4
|
+
|
|
5
|
+
2026-06-15T10:58:52.521Z
|
|
6
|
+
|
|
7
|
+
./in-files/main.dbml(3,17): Table 'products' does not exist in Schema 'public'
|
|
8
|
+
|
|
9
|
+
2026-07-22T11:03:38.305Z
|
|
10
|
+
|
|
11
|
+
./in-files/main.dbml(3,17): Table 'products' does not exist in Schema 'public'
|
|
12
|
+
|
|
13
|
+
2026-07-22T11:07:10.911Z
|
|
14
|
+
|
|
15
|
+
./in-files/main.dbml(3,17): Table 'products' does not exist in Schema 'public'
|
|
16
|
+
|
|
17
|
+
2026-07-22T11:09:52.678Z
|
|
18
|
+
|
|
19
|
+
./in-files/main.dbml(3,17): Table 'products' does not exist in Schema 'public'
|
|
20
|
+
|
|
21
|
+
2026-10-19T04:21:57.114Z
|
|
22
|
+
|
|
23
|
+
./in-files/main.dbml(3,17): Table 'products' does not exist in Schema 'public'
|
|
24
|
+
|
|
25
|
+
2026-10-19T04:25:07.062Z
|
|
26
|
+
|
|
27
|
+
./in-files/main.dbml(3,17): Table 'products' does not exist in Schema 'public'
|
|
28
|
+
|
|
29
|
+
2026-10-19T08:37:38.605Z
|
|
30
|
+
|
|
31
|
+
./in-files/main.dbml(3,17): Table 'products' does not exist in Schema 'public'
|
|
32
|
+
|
|
33
|
+
2026-10-20T03:59:08.733Z
|
|
2
34
|
|
|
3
35
|
./in-files/main.dbml(3,17): Table 'products' does not exist in Schema 'public'
|
|
4
36
|
|
|
File without changes
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
-- SQL dump generated using DBML (dbml.dbdiagram.io)
|
|
2
|
+
-- Database: SQL Server
|
|
3
|
+
-- Generated at: 2026-10-20T03:59:14.089Z
|
|
4
|
+
|
|
5
|
+
CREATE SCHEMA [schemaB]
|
|
6
|
+
GO
|
|
7
|
+
|
|
8
|
+
CREATE SCHEMA [ecommerce]
|
|
9
|
+
GO
|
|
10
|
+
|
|
11
|
+
CREATE SCHEMA [schemaA]
|
|
12
|
+
GO
|
|
13
|
+
|
|
14
|
+
CREATE TABLE [users] (
|
|
15
|
+
[id] int PRIMARY KEY,
|
|
16
|
+
[name] nvarchar(255),
|
|
17
|
+
[pjs] nvarchar(255) CHECK ([pjs] IN ('created2', 'running2', 'done2', 'failure2')),
|
|
18
|
+
[pjs2] nvarchar(255) CHECK ([pjs2] IN ('created2', 'running2', 'done2', 'failure2')),
|
|
19
|
+
[pg] nvarchar(255) CHECK ([pg] IN ('male', 'female')),
|
|
20
|
+
[pg2] nvarchar(255) CHECK ([pg2] IN ('male2', 'female2'))
|
|
21
|
+
)
|
|
22
|
+
GO
|
|
23
|
+
|
|
24
|
+
CREATE TABLE [products] (
|
|
25
|
+
[id] int PRIMARY KEY,
|
|
26
|
+
[name] nvarchar(255)
|
|
27
|
+
)
|
|
28
|
+
GO
|
|
29
|
+
|
|
30
|
+
CREATE TABLE [ecommerce].[users] (
|
|
31
|
+
[id] int PRIMARY KEY,
|
|
32
|
+
[name] nvarchar(255),
|
|
33
|
+
[ejs] nvarchar(255) CHECK ([ejs] IN ('created2', 'running2', 'done2', 'failure2')),
|
|
34
|
+
[ejs2] nvarchar(255) CHECK ([ejs2] IN ('created2', 'running2', 'done2', 'failure2')),
|
|
35
|
+
[eg] nvarchar(255) CHECK ([eg] IN ('male', 'female')),
|
|
36
|
+
[eg2] nvarchar(255) CHECK ([eg2] IN ('male2', 'female2'))
|
|
37
|
+
)
|
|
38
|
+
GO
|
|
39
|
+
|
|
40
|
+
CREATE TABLE [schemaA].[products] (
|
|
41
|
+
[id] int PRIMARY KEY,
|
|
42
|
+
[name] nvarchar(255)
|
|
43
|
+
)
|
|
44
|
+
GO
|
|
45
|
+
|
|
46
|
+
CREATE TABLE [schemaA].[locations] (
|
|
47
|
+
[id] int PRIMARY KEY,
|
|
48
|
+
[name] nvarchar(255)
|
|
49
|
+
)
|
|
50
|
+
GO
|
|
51
|
+
|
|
52
|
+
ALTER TABLE [schemaA].[products] ADD FOREIGN KEY ([name]) REFERENCES [ecommerce].[users] ([id])
|
|
53
|
+
GO
|
|
54
|
+
|
|
55
|
+
ALTER TABLE [schemaA].[locations] ADD FOREIGN KEY ([name]) REFERENCES [users] ([id])
|
|
56
|
+
GO
|
|
57
|
+
|
|
58
|
+
ALTER TABLE [ecommerce].[users] ADD FOREIGN KEY ([id]) REFERENCES [users] ([id])
|
|
59
|
+
GO
|
|
60
|
+
|
|
61
|
+
ALTER TABLE [ecommerce].[users] ADD CONSTRAINT [name_optional] FOREIGN KEY ([id]) REFERENCES [users] ([name])
|
|
62
|
+
GO
|
|
File without changes
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
-- SQL dump generated using DBML (dbml.dbdiagram.io)
|
|
2
|
+
-- Database: MySQL
|
|
3
|
+
-- Generated at: 2026-10-20T03:59:15.065Z
|
|
4
|
+
|
|
5
|
+
CREATE SCHEMA `schemaB`;
|
|
6
|
+
|
|
7
|
+
CREATE SCHEMA `ecommerce`;
|
|
8
|
+
|
|
9
|
+
CREATE SCHEMA `schemaA`;
|
|
10
|
+
|
|
11
|
+
CREATE TABLE `users` (
|
|
12
|
+
`id` int PRIMARY KEY,
|
|
13
|
+
`name` varchar(255),
|
|
14
|
+
`pjs` ENUM ('created2', 'running2', 'done2', 'failure2'),
|
|
15
|
+
`pjs2` ENUM ('created2', 'running2', 'done2', 'failure2'),
|
|
16
|
+
`pg` ENUM ('male', 'female'),
|
|
17
|
+
`pg2` ENUM ('male2', 'female2')
|
|
18
|
+
);
|
|
19
|
+
|
|
20
|
+
CREATE TABLE `products` (
|
|
21
|
+
`id` int PRIMARY KEY,
|
|
22
|
+
`name` varchar(255)
|
|
23
|
+
);
|
|
24
|
+
|
|
25
|
+
CREATE TABLE `ecommerce`.`users` (
|
|
26
|
+
`id` int PRIMARY KEY,
|
|
27
|
+
`name` varchar(255),
|
|
28
|
+
`ejs` ENUM ('created2', 'running2', 'done2', 'failure2'),
|
|
29
|
+
`ejs2` ENUM ('created2', 'running2', 'done2', 'failure2'),
|
|
30
|
+
`eg` ENUM ('male', 'female'),
|
|
31
|
+
`eg2` ENUM ('male2', 'female2')
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
CREATE TABLE `schemaA`.`products` (
|
|
35
|
+
`id` int PRIMARY KEY,
|
|
36
|
+
`name` varchar(255)
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
CREATE TABLE `schemaA`.`locations` (
|
|
40
|
+
`id` int PRIMARY KEY,
|
|
41
|
+
`name` varchar(255)
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
ALTER TABLE `schemaA`.`products` ADD FOREIGN KEY (`name`) REFERENCES `ecommerce`.`users` (`id`);
|
|
45
|
+
|
|
46
|
+
ALTER TABLE `schemaA`.`locations` ADD FOREIGN KEY (`name`) REFERENCES `users` (`id`);
|
|
47
|
+
|
|
48
|
+
ALTER TABLE `ecommerce`.`users` ADD FOREIGN KEY (`id`) REFERENCES `users` (`id`);
|
|
49
|
+
|
|
50
|
+
ALTER TABLE `ecommerce`.`users` ADD CONSTRAINT `name_optional` FOREIGN KEY (`id`) REFERENCES `users` (`name`);
|
|
File without changes
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
-- SQL dump generated using DBML (dbml.dbdiagram.io)
|
|
2
|
+
-- Database: Oracle
|
|
3
|
+
-- Generated at: 2026-10-20T03:59:16.092Z
|
|
4
|
+
|
|
5
|
+
CREATE USER "C##test01"
|
|
6
|
+
NO AUTHENTICATION
|
|
7
|
+
DEFAULT TABLESPACE system
|
|
8
|
+
TEMPORARY TABLESPACE temp
|
|
9
|
+
QUOTA UNLIMITED ON system;
|
|
10
|
+
|
|
11
|
+
CREATE USER "C##test02"
|
|
12
|
+
NO AUTHENTICATION
|
|
13
|
+
DEFAULT TABLESPACE system
|
|
14
|
+
TEMPORARY TABLESPACE temp
|
|
15
|
+
QUOTA UNLIMITED ON system;
|
|
16
|
+
|
|
17
|
+
CREATE TABLE "users" (
|
|
18
|
+
"id" int PRIMARY KEY
|
|
19
|
+
);
|
|
20
|
+
|
|
21
|
+
CREATE TABLE "products" (
|
|
22
|
+
"id" int PRIMARY KEY,
|
|
23
|
+
"user_id" int NOT NULL
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
CREATE TABLE "C##test02"."users_products" (
|
|
27
|
+
"users_id" int,
|
|
28
|
+
"products_id" int,
|
|
29
|
+
PRIMARY KEY ("users_id", "products_id")
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
CREATE TABLE "users_products" (
|
|
33
|
+
"users_id" int,
|
|
34
|
+
"products_id" int,
|
|
35
|
+
PRIMARY KEY ("users_id", "products_id")
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
CREATE TABLE "C##test01"."users_products" (
|
|
39
|
+
"users_id" int,
|
|
40
|
+
"products_id" int,
|
|
41
|
+
PRIMARY KEY ("users_id", "products_id")
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
CREATE TABLE "C##test01"."users" (
|
|
45
|
+
"id" int PRIMARY KEY
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
CREATE TABLE "C##test01"."products" (
|
|
49
|
+
"id" int PRIMARY KEY,
|
|
50
|
+
"user_id" int NOT NULL
|
|
51
|
+
);
|
|
52
|
+
|
|
53
|
+
CREATE TABLE "C##test02"."users" (
|
|
54
|
+
"id" int PRIMARY KEY
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
CREATE TABLE "C##test02"."products" (
|
|
58
|
+
"id" int PRIMARY KEY,
|
|
59
|
+
"user_id" int NOT NULL
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
GRANT REFERENCES ON "C##test01"."users" TO PUBLIC;
|
|
63
|
+
|
|
64
|
+
GRANT REFERENCES ON "users" TO PUBLIC;
|
|
65
|
+
|
|
66
|
+
GRANT REFERENCES ON "C##test02"."users" TO PUBLIC;
|
|
67
|
+
|
|
68
|
+
GRANT REFERENCES ON "products" TO PUBLIC;
|
|
69
|
+
|
|
70
|
+
GRANT REFERENCES ON "C##test02"."products" TO PUBLIC;
|
|
71
|
+
|
|
72
|
+
ALTER TABLE "products" ADD FOREIGN KEY ("user_id") REFERENCES "C##test01"."users" ("id") DEFERRABLE INITIALLY IMMEDIATE;
|
|
73
|
+
|
|
74
|
+
ALTER TABLE "C##test01"."products" ADD FOREIGN KEY ("user_id") REFERENCES "users" ("id") DEFERRABLE INITIALLY IMMEDIATE;
|
|
75
|
+
|
|
76
|
+
ALTER TABLE "C##test01"."products" ADD FOREIGN KEY ("user_id") REFERENCES "C##test01"."users" ("id") DEFERRABLE INITIALLY IMMEDIATE;
|
|
77
|
+
|
|
78
|
+
ALTER TABLE "C##test02"."users_products" ADD FOREIGN KEY ("users_id") REFERENCES "C##test02"."users" ("id") DEFERRABLE INITIALLY IMMEDIATE;
|
|
79
|
+
|
|
80
|
+
ALTER TABLE "C##test02"."users_products" ADD FOREIGN KEY ("products_id") REFERENCES "products" ("id") DEFERRABLE INITIALLY IMMEDIATE;
|
|
81
|
+
|
|
82
|
+
ALTER TABLE "users_products" ADD FOREIGN KEY ("users_id") REFERENCES "users" ("id") DEFERRABLE INITIALLY IMMEDIATE;
|
|
83
|
+
|
|
84
|
+
ALTER TABLE "users_products" ADD FOREIGN KEY ("products_id") REFERENCES "C##test02"."products" ("id") DEFERRABLE INITIALLY IMMEDIATE;
|
|
85
|
+
|
|
86
|
+
ALTER TABLE "C##test01"."users_products" ADD FOREIGN KEY ("users_id") REFERENCES "C##test01"."users" ("id") DEFERRABLE INITIALLY IMMEDIATE;
|
|
87
|
+
|
|
88
|
+
ALTER TABLE "C##test01"."users_products" ADD FOREIGN KEY ("products_id") REFERENCES "C##test02"."products" ("id") DEFERRABLE INITIALLY IMMEDIATE;
|
|
File without changes
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
-- SQL dump generated using DBML (dbml.dbdiagram.io)
|
|
2
|
+
-- Database: PostgreSQL
|
|
3
|
+
-- Generated at: 2026-10-20T03:59:17.256Z
|
|
4
|
+
|
|
5
|
+
CREATE SCHEMA "schemaB";
|
|
6
|
+
|
|
7
|
+
CREATE SCHEMA "ecommerce";
|
|
8
|
+
|
|
9
|
+
CREATE SCHEMA "schemaA";
|
|
10
|
+
|
|
11
|
+
CREATE TYPE "job_status" AS ENUM (
|
|
12
|
+
'created2',
|
|
13
|
+
'running2',
|
|
14
|
+
'done2',
|
|
15
|
+
'failure2'
|
|
16
|
+
);
|
|
17
|
+
|
|
18
|
+
CREATE TYPE "gender" AS ENUM (
|
|
19
|
+
'male2',
|
|
20
|
+
'female2'
|
|
21
|
+
);
|
|
22
|
+
|
|
23
|
+
CREATE TYPE "schemaB"."gender" AS ENUM (
|
|
24
|
+
'male',
|
|
25
|
+
'female'
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
CREATE TABLE "users" (
|
|
29
|
+
"id" int PRIMARY KEY,
|
|
30
|
+
"name" varchar,
|
|
31
|
+
"pjs" job_status,
|
|
32
|
+
"pjs2" job_status,
|
|
33
|
+
"pg" "schemaB".gender,
|
|
34
|
+
"pg2" gender
|
|
35
|
+
);
|
|
36
|
+
|
|
37
|
+
CREATE TABLE "products" (
|
|
38
|
+
"id" int PRIMARY KEY,
|
|
39
|
+
"name" varchar
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
CREATE TABLE "ecommerce"."users" (
|
|
43
|
+
"id" int PRIMARY KEY,
|
|
44
|
+
"name" varchar,
|
|
45
|
+
"ejs" job_status,
|
|
46
|
+
"ejs2" job_status,
|
|
47
|
+
"eg" "schemaB".gender,
|
|
48
|
+
"eg2" gender
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
CREATE TABLE "schemaA"."products" (
|
|
52
|
+
"id" int PRIMARY KEY,
|
|
53
|
+
"name" varchar
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
CREATE TABLE "schemaA"."locations" (
|
|
57
|
+
"id" int PRIMARY KEY,
|
|
58
|
+
"name" varchar
|
|
59
|
+
);
|
|
60
|
+
|
|
61
|
+
ALTER TABLE "schemaA"."products" ADD FOREIGN KEY ("name") REFERENCES "ecommerce"."users" ("id") DEFERRABLE INITIALLY IMMEDIATE;
|
|
62
|
+
|
|
63
|
+
ALTER TABLE "schemaA"."locations" ADD FOREIGN KEY ("name") REFERENCES "users" ("id") DEFERRABLE INITIALLY IMMEDIATE;
|
|
64
|
+
|
|
65
|
+
ALTER TABLE "ecommerce"."users" ADD FOREIGN KEY ("id") REFERENCES "users" ("id") DEFERRABLE INITIALLY IMMEDIATE;
|
|
66
|
+
|
|
67
|
+
ALTER TABLE "ecommerce"."users" ADD CONSTRAINT "name_optional" FOREIGN KEY ("id") REFERENCES "users" ("name") DEFERRABLE INITIALLY IMMEDIATE;
|
|
File without changes
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
2026-06-15T10:57:55.049Z
|
|
2
|
+
|
|
3
|
+
ecommerce.dbml(17,24): Expect an identifier
|
|
4
|
+
ecommerce.dbml(16,11): Unknown column setting 'pk manager_staff_id int'
|
|
5
|
+
|
|
6
|
+
2026-06-15T10:58:59.111Z
|
|
7
|
+
|
|
8
|
+
ecommerce.dbml(17,24): Expect an identifier
|
|
9
|
+
ecommerce.dbml(16,11): Unknown column setting 'pk manager_staff_id int'
|
|
10
|
+
|
|
11
|
+
2026-07-22T11:03:44.850Z
|
|
12
|
+
|
|
13
|
+
ecommerce.dbml(17,24): Expect an identifier
|
|
14
|
+
ecommerce.dbml(17,30): Custom setting 'pk manager_staff_id int' must be a string or a color literal
|
|
15
|
+
|
|
16
|
+
2026-07-22T11:07:17.627Z
|
|
17
|
+
|
|
18
|
+
ecommerce.dbml(17,24): Expect an identifier
|
|
19
|
+
ecommerce.dbml(17,30): Custom setting 'pk manager_staff_id int' must be a string or a color literal
|
|
20
|
+
|
|
21
|
+
2026-07-22T11:09:59.265Z
|
|
22
|
+
|
|
23
|
+
ecommerce.dbml(17,24): Expect an identifier
|
|
24
|
+
ecommerce.dbml(17,30): Custom setting 'pk manager_staff_id int' must be a string or a color literal
|
|
25
|
+
|
|
26
|
+
2026-10-19T04:22:04.375Z
|
|
27
|
+
|
|
28
|
+
ecommerce.dbml(17,24): Expect an identifier
|
|
29
|
+
ecommerce.dbml(17,30): Custom setting 'pk manager_staff_id int' must be a string or a color literal
|
|
30
|
+
|
|
31
|
+
2026-10-19T04:25:13.499Z
|
|
32
|
+
|
|
33
|
+
ecommerce.dbml(17,24): Expect an identifier
|
|
34
|
+
ecommerce.dbml(17,30): Custom setting 'pk manager_staff_id int' must be a string or a color literal
|
|
35
|
+
|
|
36
|
+
2026-10-19T08:37:45.397Z
|
|
37
|
+
|
|
38
|
+
ecommerce.dbml(17,24): Expect an identifier
|
|
39
|
+
ecommerce.dbml(17,30): Custom setting 'pk manager_staff_id int' must be a string, a color literal, a number literal, or a boolean literal
|
|
40
|
+
|
|
41
|
+
2026-10-20T03:59:19.149Z
|
|
42
|
+
|
|
43
|
+
ecommerce.dbml(17,24): Expect an identifier
|
|
44
|
+
ecommerce.dbml(17,30): Custom setting 'pk manager_staff_id int' must be a string or a color literal
|
|
45
|
+
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
ERROR:
|
|
2
2
|
ecommerce.dbml(17,24): Expect an identifier
|
|
3
|
-
ecommerce.dbml(17,30): Custom setting 'pk manager_staff_id int' must be a string or a
|
|
3
|
+
ecommerce.dbml(17,30): Custom setting 'pk manager_staff_id int' must be a string, a color literal, a number literal, or a boolean literal
|
|
4
4
|
|
|
5
5
|
A complete log can be found in:
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
2026-06-15T10:57:55.826Z
|
|
2
|
+
|
|
3
|
+
You have a syntax error at "schema.sql" line 1 column 1. Column "name" do not exist in table "Users"
|
|
4
|
+
|
|
5
|
+
2026-06-15T10:58:59.805Z
|
|
6
|
+
|
|
7
|
+
You have a syntax error at "schema.sql" line 1 column 1. Column "name" do not exist in table "Users"
|
|
8
|
+
|
|
9
|
+
2026-07-22T11:03:45.565Z
|
|
10
|
+
|
|
11
|
+
You have a syntax error at "schema.sql" line 1 column 1. Column "name" do not exist in table "Users"
|
|
12
|
+
|
|
13
|
+
2026-07-22T11:07:18.369Z
|
|
14
|
+
|
|
15
|
+
You have a syntax error at "schema.sql" line 1 column 1. Column "name" do not exist in table "Users"
|
|
16
|
+
|
|
17
|
+
2026-07-22T11:09:59.964Z
|
|
18
|
+
|
|
19
|
+
You have a syntax error at "schema.sql" line 1 column 1. Column "name" do not exist in table "Users"
|
|
20
|
+
|
|
21
|
+
2026-10-19T04:22:05.122Z
|
|
22
|
+
|
|
23
|
+
You have a syntax error at "schema.sql". Column "name" do not exist in table "Users"
|
|
24
|
+
|
|
25
|
+
2026-10-19T04:25:14.187Z
|
|
26
|
+
|
|
27
|
+
You have a syntax error at "schema.sql". Column "name" do not exist in table "Users"
|
|
28
|
+
|
|
29
|
+
2026-10-19T08:37:46.110Z
|
|
30
|
+
|
|
31
|
+
You have a syntax error at "schema.sql" line 1 column 1. Column "name" do not exist in table "Users"
|
|
32
|
+
|
|
33
|
+
2026-10-20T03:59:20.292Z
|
|
34
|
+
|
|
35
|
+
You have a syntax error at "schema.sql". Column "name" do not exist in table "Users"
|
|
36
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
2026-06-15T10:57:56.588Z
|
|
2
|
+
|
|
3
|
+
You have a syntax error at "schema.sql" line 1 column 13. Table "Users" not found
|
|
4
|
+
|
|
5
|
+
2026-06-15T10:59:00.474Z
|
|
6
|
+
|
|
7
|
+
You have a syntax error at "schema.sql" line 1 column 13. Table "Users" not found
|
|
8
|
+
|
|
9
|
+
2026-07-22T11:03:46.249Z
|
|
10
|
+
|
|
11
|
+
You have a syntax error at "schema.sql" line 1 column 13. Table "Users" not found
|
|
12
|
+
|
|
13
|
+
2026-07-22T11:07:19.062Z
|
|
14
|
+
|
|
15
|
+
You have a syntax error at "schema.sql" line 1 column 13. Table "Users" not found
|
|
16
|
+
|
|
17
|
+
2026-07-22T11:10:00.633Z
|
|
18
|
+
|
|
19
|
+
You have a syntax error at "schema.sql" line 1 column 13. Table "Users" not found
|
|
20
|
+
|
|
21
|
+
2026-10-19T04:22:05.836Z
|
|
22
|
+
|
|
23
|
+
You have a syntax error at "schema.sql" line 1 column 13. Table "Users" not found
|
|
24
|
+
|
|
25
|
+
2026-10-19T04:25:14.841Z
|
|
26
|
+
|
|
27
|
+
You have a syntax error at "schema.sql" line 1 column 13. Table "Users" not found
|
|
28
|
+
|
|
29
|
+
2026-10-19T08:37:46.812Z
|
|
30
|
+
|
|
31
|
+
You have a syntax error at "schema.sql" line 1 column 13. Table "Users" not found
|
|
32
|
+
|
|
33
|
+
2026-10-20T03:59:21.220Z
|
|
34
|
+
|
|
35
|
+
You have a syntax error at "schema.sql" line 1 column 13. Table "Users" not found
|
|
36
|
+
|
package/__tests__/sql2dbml/custom-error-column-comment-column-not-found --oracle/dbml-error.log
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
2026-06-15T10:57:57.324Z
|
|
2
|
+
|
|
3
|
+
You have a syntax error at "schema.sql" line 5 column 19. Column "name" not found in table "Users"
|
|
4
|
+
|
|
5
|
+
2026-06-15T10:59:01.152Z
|
|
6
|
+
|
|
7
|
+
You have a syntax error at "schema.sql" line 5 column 19. Column "name" not found in table "Users"
|
|
8
|
+
|
|
9
|
+
2026-07-22T11:03:46.950Z
|
|
10
|
+
|
|
11
|
+
You have a syntax error at "schema.sql" line 5 column 19. Column "name" not found in table "Users"
|
|
12
|
+
|
|
13
|
+
2026-07-22T11:07:19.781Z
|
|
14
|
+
|
|
15
|
+
You have a syntax error at "schema.sql" line 5 column 19. Column "name" not found in table "Users"
|
|
16
|
+
|
|
17
|
+
2026-07-22T11:10:01.330Z
|
|
18
|
+
|
|
19
|
+
You have a syntax error at "schema.sql" line 5 column 19. Column "name" not found in table "Users"
|
|
20
|
+
|
|
21
|
+
2026-10-19T04:22:06.549Z
|
|
22
|
+
|
|
23
|
+
You have a syntax error at "schema.sql" line 5 column 19. Column "name" not found in table "Users"
|
|
24
|
+
|
|
25
|
+
2026-10-19T04:25:15.512Z
|
|
26
|
+
|
|
27
|
+
You have a syntax error at "schema.sql" line 5 column 19. Column "name" not found in table "Users"
|
|
28
|
+
|
|
29
|
+
2026-10-19T08:37:47.525Z
|
|
30
|
+
|
|
31
|
+
You have a syntax error at "schema.sql" line 5 column 19. Column "name" not found in table "Users"
|
|
32
|
+
|
|
33
|
+
2026-10-20T03:59:22.344Z
|
|
34
|
+
|
|
35
|
+
You have a syntax error at "schema.sql" line 5 column 19. Column "name" not found in table "Users"
|
|
36
|
+
|
package/__tests__/sql2dbml/custom-error-column-comment-table-not-found --oracle/dbml-error.log
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
2026-06-15T10:57:58.140Z
|
|
2
|
+
|
|
3
|
+
You have a syntax error at "schema.sql" line 5 column 19. Table "Posts" not found
|
|
4
|
+
|
|
5
|
+
2026-06-15T10:59:01.857Z
|
|
6
|
+
|
|
7
|
+
You have a syntax error at "schema.sql" line 5 column 19. Table "Posts" not found
|
|
8
|
+
|
|
9
|
+
2026-07-22T11:03:47.703Z
|
|
10
|
+
|
|
11
|
+
You have a syntax error at "schema.sql" line 5 column 19. Table "Posts" not found
|
|
12
|
+
|
|
13
|
+
2026-07-22T11:07:20.484Z
|
|
14
|
+
|
|
15
|
+
You have a syntax error at "schema.sql" line 5 column 19. Table "Posts" not found
|
|
16
|
+
|
|
17
|
+
2026-07-22T11:10:02.028Z
|
|
18
|
+
|
|
19
|
+
You have a syntax error at "schema.sql" line 5 column 19. Table "Posts" not found
|
|
20
|
+
|
|
21
|
+
2026-10-19T04:22:07.245Z
|
|
22
|
+
|
|
23
|
+
You have a syntax error at "schema.sql" line 5 column 19. Table "Posts" not found
|
|
24
|
+
|
|
25
|
+
2026-10-19T04:25:16.225Z
|
|
26
|
+
|
|
27
|
+
You have a syntax error at "schema.sql" line 5 column 19. Table "Posts" not found
|
|
28
|
+
|
|
29
|
+
2026-10-19T08:37:48.244Z
|
|
30
|
+
|
|
31
|
+
You have a syntax error at "schema.sql" line 5 column 19. Table "Posts" not found
|
|
32
|
+
|
|
33
|
+
2026-10-20T03:59:23.283Z
|
|
34
|
+
|
|
35
|
+
You have a syntax error at "schema.sql" line 5 column 19. Table "Posts" not found
|
|
36
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
2026-06-15T10:57:58.952Z
|
|
2
|
+
|
|
3
|
+
You have a syntax error at "schema.sql" line 1 column 28. Table Users not found
|
|
4
|
+
|
|
5
|
+
2026-06-15T10:59:02.515Z
|
|
6
|
+
|
|
7
|
+
You have a syntax error at "schema.sql" line 1 column 28. Table Users not found
|
|
8
|
+
|
|
9
|
+
2026-07-22T11:03:48.395Z
|
|
10
|
+
|
|
11
|
+
You have a syntax error at "schema.sql" line 1 column 28. Table Users not found
|
|
12
|
+
|
|
13
|
+
2026-07-22T11:07:21.181Z
|
|
14
|
+
|
|
15
|
+
You have a syntax error at "schema.sql" line 1 column 28. Table Users not found
|
|
16
|
+
|
|
17
|
+
2026-07-22T11:10:02.726Z
|
|
18
|
+
|
|
19
|
+
You have a syntax error at "schema.sql" line 1 column 28. Table Users not found
|
|
20
|
+
|
|
21
|
+
2026-10-19T04:22:07.927Z
|
|
22
|
+
|
|
23
|
+
You have a syntax error at "schema.sql" line 1 column 28. Table Users not found
|
|
24
|
+
|
|
25
|
+
2026-10-19T04:25:16.906Z
|
|
26
|
+
|
|
27
|
+
You have a syntax error at "schema.sql" line 1 column 28. Table Users not found
|
|
28
|
+
|
|
29
|
+
2026-10-19T08:37:48.934Z
|
|
30
|
+
|
|
31
|
+
You have a syntax error at "schema.sql" line 1 column 28. Table Users not found
|
|
32
|
+
|
|
33
|
+
2026-10-20T03:59:24.107Z
|
|
34
|
+
|
|
35
|
+
You have a syntax error at "schema.sql" line 1 column 28. Table Users not found
|
|
36
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
2026-06-15T10:57:59.710Z
|
|
2
|
+
|
|
3
|
+
You have a syntax error at "schema.sql" line 5 column 18. Table "Posts" not found
|
|
4
|
+
|
|
5
|
+
2026-06-15T10:59:03.186Z
|
|
6
|
+
|
|
7
|
+
You have a syntax error at "schema.sql" line 5 column 18. Table "Posts" not found
|
|
8
|
+
|
|
9
|
+
2026-07-22T11:03:49.135Z
|
|
10
|
+
|
|
11
|
+
You have a syntax error at "schema.sql" line 5 column 18. Table "Posts" not found
|
|
12
|
+
|
|
13
|
+
2026-07-22T11:07:21.886Z
|
|
14
|
+
|
|
15
|
+
You have a syntax error at "schema.sql" line 5 column 18. Table "Posts" not found
|
|
16
|
+
|
|
17
|
+
2026-07-22T11:10:03.411Z
|
|
18
|
+
|
|
19
|
+
You have a syntax error at "schema.sql" line 5 column 18. Table "Posts" not found
|
|
20
|
+
|
|
21
|
+
2026-10-19T04:22:08.603Z
|
|
22
|
+
|
|
23
|
+
You have a syntax error at "schema.sql" line 5 column 18. Table "Posts" not found
|
|
24
|
+
|
|
25
|
+
2026-10-19T04:25:17.560Z
|
|
26
|
+
|
|
27
|
+
You have a syntax error at "schema.sql" line 5 column 18. Table "Posts" not found
|
|
28
|
+
|
|
29
|
+
2026-10-19T08:37:49.632Z
|
|
30
|
+
|
|
31
|
+
You have a syntax error at "schema.sql" line 5 column 18. Table "Posts" not found
|
|
32
|
+
|
|
33
|
+
2026-10-20T03:59:24.899Z
|
|
34
|
+
|
|
35
|
+
You have a syntax error at "schema.sql" line 5 column 18. Table "Posts" not found
|
|
36
|
+
|
|
File without changes
|