@dbml/cli 9.0.0-optional-ref.6 → 9.0.0-optional-ref.8
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 +20 -0
- package/__tests__/db2dbml/mssql/expect-out-files/schema.dbml +5 -5
- package/__tests__/db2dbml/mysql/dbml-error.log +26 -0
- package/__tests__/db2dbml/mysql/expect-out-files/schema.dbml +4 -4
- package/__tests__/db2dbml/oracle/dbml-error.log +28 -0
- package/__tests__/db2dbml/oracle/expect-out-files/schema.dbml +9 -9
- package/__tests__/db2dbml/postgres/dbml-error.log +14 -0
- package/__tests__/db2dbml/postgres/expect-out-files/schema.dbml +4 -4
- package/__tests__/dbml2sql/filename --mysql --out-file/out-files/schema.sql +1 -1
- package/__tests__/dbml2sql/filename --oracle --out-file/out-files/schema.sql +1 -1
- package/__tests__/dbml2sql/filename --out-file/out-files/schema.sql +1 -1
- package/__tests__/dbml2sql/filename --postgres --out-file/out-files/schema.sql +1 -1
- package/__tests__/dbml2sql/filenames --mysql --out-file/out-files/schema.sql +1 -1
- package/__tests__/dbml2sql/filenames --oracle --out-file/out-files/schema.sql +1 -1
- package/__tests__/dbml2sql/filenames --out-file/out-files/schema.sql +1 -1
- package/__tests__/dbml2sql/filenames --postgres --out-file/out-files/schema.sql +1 -1
- package/__tests__/dbml2sql/multifile error entry-syntax-error/dbml-error.log +15 -0
- package/__tests__/dbml2sql/multifile error import-not-found/dbml-error.log +1338 -0
- package/__tests__/dbml2sql/multifile error imported-syntax-error/dbml-error.log +15 -0
- package/__tests__/dbml2sql/multifile error transitive-use-not-visible/dbml-error.log +12 -0
- package/__tests__/dbml2sql/multiple_schema_mssql/out-files/multiple_schema.out.sql +1 -1
- package/__tests__/dbml2sql/multiple_schema_mysql/out-files/multiple_schema.out.sql +1 -1
- package/__tests__/dbml2sql/multiple_schema_oracle/out-files/multiple_schema.out.sql +1 -1
- package/__tests__/dbml2sql/multiple_schema_pg/out-files/multiple_schema.out.sql +1 -1
- package/__tests__/dbml2sql/syntax-error/dbml-error.log +15 -0
- package/__tests__/sql2dbml/custom-error-alter-table-column-not-found --oracle/dbml-error.log +16 -0
- package/__tests__/sql2dbml/custom-error-alter-table-table-not-found --oracle/dbml-error.log +16 -0
- package/__tests__/sql2dbml/custom-error-column-comment-column-not-found --oracle/dbml-error.log +16 -0
- package/__tests__/sql2dbml/custom-error-column-comment-table-not-found --oracle/dbml-error.log +16 -0
- package/__tests__/sql2dbml/custom-error-create-index-table-not-found --oracle/dbml-error.log +16 -0
- package/__tests__/sql2dbml/custom-error-table-comment-table-not-found --oracle/dbml-error.log +16 -0
- package/__tests__/sql2dbml/filename --mysql --out-file/out-files/schema.dbml +6 -6
- package/__tests__/sql2dbml/filename --oracle --out-file/out-files/schema.dbml +12 -12
- package/__tests__/sql2dbml/filename --out-file/out-files/schema.dbml +6 -6
- package/__tests__/sql2dbml/filename --postgres --out-file/out-files/schema.dbml +6 -6
- package/__tests__/sql2dbml/filenames --mysql --out-file/out-files/schema.dbml +15 -15
- package/__tests__/sql2dbml/filenames --out-file/out-files/schema.dbml +15 -15
- package/__tests__/sql2dbml/filenames --postgres --out-file/out-files/schema.dbml +15 -15
- package/__tests__/sql2dbml/multiple_schema_mssql/out-files/multiple_schema.out.dbml +1 -1
- package/__tests__/sql2dbml/multiple_schema_mysql/out-files/multiple_schema.out.dbml +8 -8
- package/__tests__/sql2dbml/multiple_schema_pg/out-files/multiple_schema.out.dbml +7 -7
- package/__tests__/sql2dbml/syntax-error/dbml-error.log +12 -0
- package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mssql/dbml-error.log +12 -0
- package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mysql/dbml-error.log +12 -0
- package/lib/index.js +5 -5
- package/package.json +5 -5
|
@@ -788,3 +788,23 @@ ConnectionError: Login failed for user 'SA'.
|
|
|
788
788
|
at /home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:2363:18
|
|
789
789
|
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
790
790
|
|
|
791
|
+
2026-07-15T09:01:17.378Z
|
|
792
|
+
ConnectionError: Login failed for user 'SA'.
|
|
793
|
+
at /home/huydna/projects/dbml/node_modules/mssql/lib/tedious/connection-pool.js:85:17
|
|
794
|
+
at Connection.onConnect (/home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:849:9)
|
|
795
|
+
at Object.onceWrapper (node:events:634:26)
|
|
796
|
+
at Connection.emit (node:events:519:28)
|
|
797
|
+
at Connection.emit (/home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:970:18)
|
|
798
|
+
at /home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:2363:18
|
|
799
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
800
|
+
|
|
801
|
+
2026-07-15T11:09:24.591Z
|
|
802
|
+
ConnectionError: Login failed for user 'SA'.
|
|
803
|
+
at /home/huydna/projects/dbml/node_modules/mssql/lib/tedious/connection-pool.js:85:17
|
|
804
|
+
at Connection.onConnect (/home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:849:9)
|
|
805
|
+
at Object.onceWrapper (node:events:634:26)
|
|
806
|
+
at Connection.emit (node:events:519:28)
|
|
807
|
+
at Connection.emit (/home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:970:18)
|
|
808
|
+
at /home/huydna/projects/dbml/node_modules/tedious/lib/connection.js:2363:18
|
|
809
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
810
|
+
|
|
@@ -215,12 +215,12 @@ Table "dbo"."TestDescriptionTable" {
|
|
|
215
215
|
Note: 'This is the custom comment name on table.'
|
|
216
216
|
}
|
|
217
217
|
|
|
218
|
-
Ref "FK_AuthorNationality":"dbo"."Authors".("AuthorID", "NationalityID")
|
|
218
|
+
Ref "FK_AuthorNationality":"dbo"."Authors".("AuthorID", "NationalityID") ?<? "dbo"."Books".("AuthorID", "NationalityID")
|
|
219
219
|
|
|
220
|
-
Ref "fk_product":"dbo"."products"."product_id"
|
|
220
|
+
Ref "fk_product":"dbo"."products"."product_id" <? "dbo"."order_items"."product_id" [update: cascade]
|
|
221
221
|
|
|
222
|
-
Ref "fk_order":"dbo"."orders"."order_id"
|
|
222
|
+
Ref "fk_order":"dbo"."orders"."order_id" <? "dbo"."order_items"."order_id" [update: cascade, delete: cascade]
|
|
223
223
|
|
|
224
|
-
Ref "fk_user":"dbo"."users"."user_id"
|
|
224
|
+
Ref "fk_user":"dbo"."users"."user_id" <? "dbo"."orders"."user_id" [update: cascade, delete: cascade]
|
|
225
225
|
|
|
226
|
-
Ref "fk_gender":"dbo"."gender_reference"."value"
|
|
226
|
+
Ref "fk_gender":"dbo"."gender_reference"."value" ?<? "dbo"."user_define_data_types"."gender"
|
|
@@ -1025,3 +1025,29 @@ Error: Unknown database 'dbml_test'
|
|
|
1025
1025
|
at Object..js (node:internal/modules/cjs/loader:1839:10)
|
|
1026
1026
|
at Module.load (node:internal/modules/cjs/loader:1441:32)
|
|
1027
1027
|
|
|
1028
|
+
2026-07-15T09:01:18.591Z
|
|
1029
|
+
Error: Unknown database 'dbml_test'
|
|
1030
|
+
at c (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3241:47763)
|
|
1031
|
+
at yr (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3241:52059)
|
|
1032
|
+
at Pr (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3360:500)
|
|
1033
|
+
at Module.Ei (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3739:1080)
|
|
1034
|
+
at connectionHandler (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:2630:54)
|
|
1035
|
+
at Module.db2dbml (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:2841:2)
|
|
1036
|
+
at Object.<anonymous> (/home/huydna/projects/dbml/packages/dbml-cli/bin/db2dbml.js:3:19)
|
|
1037
|
+
at Module._compile (node:internal/modules/cjs/loader:1706:14)
|
|
1038
|
+
at Object..js (node:internal/modules/cjs/loader:1839:10)
|
|
1039
|
+
at Module.load (node:internal/modules/cjs/loader:1441:32)
|
|
1040
|
+
|
|
1041
|
+
2026-07-15T11:09:25.756Z
|
|
1042
|
+
Error: Unknown database 'dbml_test'
|
|
1043
|
+
at c (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3241:47763)
|
|
1044
|
+
at yr (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3241:52059)
|
|
1045
|
+
at Pr (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3360:500)
|
|
1046
|
+
at Module.Ei (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3739:1080)
|
|
1047
|
+
at connectionHandler (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:2630:54)
|
|
1048
|
+
at Module.db2dbml (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:2841:2)
|
|
1049
|
+
at Object.<anonymous> (/home/huydna/projects/dbml/packages/dbml-cli/bin/db2dbml.js:3:19)
|
|
1050
|
+
at Module._compile (node:internal/modules/cjs/loader:1706:14)
|
|
1051
|
+
at Object..js (node:internal/modules/cjs/loader:1839:10)
|
|
1052
|
+
at Module.load (node:internal/modules/cjs/loader:1441:32)
|
|
1053
|
+
|
|
@@ -191,10 +191,10 @@ Table "users" {
|
|
|
191
191
|
}
|
|
192
192
|
}
|
|
193
193
|
|
|
194
|
-
Ref "fk_test_composite":"composite_key_2".("id2_1", "id2_2")
|
|
194
|
+
Ref "fk_test_composite":"composite_key_2".("id2_1", "id2_2") <? "composite_key_1".("id1_1", "id1_2")
|
|
195
195
|
|
|
196
|
-
Ref "fk_detail_items_orders":"orders"."order_id"
|
|
196
|
+
Ref "fk_detail_items_orders":"orders"."order_id" <? "order_items"."order_id" [delete: cascade]
|
|
197
197
|
|
|
198
|
-
Ref "fk_detail_items_products":"products"."id"
|
|
198
|
+
Ref "fk_detail_items_products":"products"."id" <? "order_items"."product_id"
|
|
199
199
|
|
|
200
|
-
Ref "fk_order_user":"users"."user_id"
|
|
200
|
+
Ref "fk_order_user":"users"."user_id" ?<? "orders"."user_id" [delete: set null]
|
|
@@ -1104,3 +1104,31 @@ connect ECONNREFUSED 127.0.0.1:1521
|
|
|
1104
1104
|
at async ThinConnectionImpl.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/connection.js:859:5)
|
|
1105
1105
|
at async getConnection (/home/huydna/projects/dbml/node_modules/oracledb/lib/oracledb.js:791:3)
|
|
1106
1106
|
|
|
1107
|
+
2026-07-15T09:01:19.791Z
|
|
1108
|
+
Error: NJS-503: connection to host 127.0.0.1 port 1521 could not be established. (CONNECTION_ID=jsYpjNX2CzshcBVKdp2Now==)
|
|
1109
|
+
connect ECONNREFUSED 127.0.0.1:1521
|
|
1110
|
+
at Object.throwErr (/home/huydna/projects/dbml/node_modules/oracledb/lib/errors.js:776:10)
|
|
1111
|
+
at NTTCP.ntConnect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js:206:16)
|
|
1112
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
1113
|
+
at async NTTCP.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js:222:7)
|
|
1114
|
+
at async NetworkSession.transportConnect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:182:5)
|
|
1115
|
+
at async NetworkSession.connect2 (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:222:7)
|
|
1116
|
+
at async NetworkSession.connect1 (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:336:23)
|
|
1117
|
+
at async NetworkSession.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:623:5)
|
|
1118
|
+
at async ThinConnectionImpl.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/connection.js:859:5)
|
|
1119
|
+
at async getConnection (/home/huydna/projects/dbml/node_modules/oracledb/lib/oracledb.js:791:3)
|
|
1120
|
+
|
|
1121
|
+
2026-07-15T11:09:26.934Z
|
|
1122
|
+
Error: NJS-503: connection to host 127.0.0.1 port 1521 could not be established. (CONNECTION_ID=XzhCIAJGO76+lrMjSijZ5Q==)
|
|
1123
|
+
connect ECONNREFUSED 127.0.0.1:1521
|
|
1124
|
+
at Object.throwErr (/home/huydna/projects/dbml/node_modules/oracledb/lib/errors.js:776:10)
|
|
1125
|
+
at NTTCP.ntConnect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js:206:16)
|
|
1126
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
1127
|
+
at async NTTCP.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/ntTcp.js:222:7)
|
|
1128
|
+
at async NetworkSession.transportConnect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:182:5)
|
|
1129
|
+
at async NetworkSession.connect2 (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:222:7)
|
|
1130
|
+
at async NetworkSession.connect1 (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:336:23)
|
|
1131
|
+
at async NetworkSession.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/sqlnet/networkSession.js:623:5)
|
|
1132
|
+
at async ThinConnectionImpl.connect (/home/huydna/projects/dbml/node_modules/oracledb/lib/thin/connection.js:859:5)
|
|
1133
|
+
at async getConnection (/home/huydna/projects/dbml/node_modules/oracledb/lib/oracledb.js:791:3)
|
|
1134
|
+
|
|
@@ -400,20 +400,20 @@ Table "SPECIAL_DATA_TYPES" {
|
|
|
400
400
|
"UROWID_SIZED" urowid(100)
|
|
401
401
|
}
|
|
402
402
|
|
|
403
|
-
Ref "FK_SELF_REF":"SELF_REF_FK"."ID"
|
|
403
|
+
Ref "FK_SELF_REF":"SELF_REF_FK"."ID" ?<? "SELF_REF_FK"."PARENT_ID" [delete: set null]
|
|
404
404
|
|
|
405
|
-
Ref "FK_CHILD_PARENT":"FK_PARENT"."ID"
|
|
405
|
+
Ref "FK_CHILD_PARENT":"FK_PARENT"."ID" <? "FK_CHILD"."PARENT_ID" [delete: cascade]
|
|
406
406
|
|
|
407
|
-
Ref "FK_COMPOSITE_SELF":"COMPOSITE_SELF_REF".("DEPT_ID", "EMP_ID")
|
|
407
|
+
Ref "FK_COMPOSITE_SELF":"COMPOSITE_SELF_REF".("DEPT_ID", "EMP_ID") ?<? "COMPOSITE_SELF_REF".("PARENT_DEPT_ID", "PARENT_EMP_ID") [delete: set null]
|
|
408
408
|
|
|
409
|
-
Ref "FK_ALTER_PARENT":"ALTER_FK_PARENT"."ID"
|
|
409
|
+
Ref "FK_ALTER_PARENT":"ALTER_FK_PARENT"."ID" ?<? "ALTER_FK_CHILD"."PARENT_ID" [delete: cascade]
|
|
410
410
|
|
|
411
|
-
Ref "FK_ALTER_SELF":"ALTER_SELF_REF"."ID"
|
|
411
|
+
Ref "FK_ALTER_SELF":"ALTER_SELF_REF"."ID" ?<? "ALTER_SELF_REF"."PARENT_ID" [delete: set null]
|
|
412
412
|
|
|
413
|
-
Ref "FK_ALTER_COMPOSITE":"ALTER_COMPOSITE_FK_PARENT".("DEPT_ID", "EMP_ID")
|
|
413
|
+
Ref "FK_ALTER_COMPOSITE":"ALTER_COMPOSITE_FK_PARENT".("DEPT_ID", "EMP_ID") ?<? "ALTER_COMPOSITE_FK_CHILD".("REF_DEPT_ID", "REF_EMP_ID")
|
|
414
414
|
|
|
415
|
-
Ref "FK_REF_SIMPLE":"REF_SIMPLE_PARENT"."ID"
|
|
415
|
+
Ref "FK_REF_SIMPLE":"REF_SIMPLE_PARENT"."ID" ?<? "REF_SIMPLE_CHILD"."PARENT_ID"
|
|
416
416
|
|
|
417
|
-
Ref "FK_REF_COMPOSITE":"REF_COMPOSITE_PARENT".("KEY1", "KEY2")
|
|
417
|
+
Ref "FK_REF_COMPOSITE":"REF_COMPOSITE_PARENT".("KEY1", "KEY2") ?<? "REF_COMPOSITE_CHILD".("FK1", "FK2")
|
|
418
418
|
|
|
419
|
-
Ref "FK_ALTER_COMP_SELF":"ALTER_COMP_SELF_REF".("DEPT_ID", "EMP_ID")
|
|
419
|
+
Ref "FK_ALTER_COMP_SELF":"ALTER_COMP_SELF_REF".("DEPT_ID", "EMP_ID") ?<? "ALTER_COMP_SELF_REF".("PARENT_DEPT_ID", "PARENT_EMP_ID")
|
|
@@ -558,3 +558,17 @@ Error: PostgreSQL connection error: AggregateError
|
|
|
558
558
|
at async di (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3701:279)
|
|
559
559
|
at async connectionHandler (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:2630:22)
|
|
560
560
|
|
|
561
|
+
2026-07-15T09:01:20.989Z
|
|
562
|
+
Error: PostgreSQL connection error: AggregateError
|
|
563
|
+
at ni (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3484:2977)
|
|
564
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
565
|
+
at async di (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3701:279)
|
|
566
|
+
at async connectionHandler (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:2630:22)
|
|
567
|
+
|
|
568
|
+
2026-07-15T11:09:28.096Z
|
|
569
|
+
Error: PostgreSQL connection error: AggregateError
|
|
570
|
+
at ni (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3484:2977)
|
|
571
|
+
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
|
|
572
|
+
at async di (/home/huydna/projects/dbml/packages/dbml-connector/dist/index.js:3701:279)
|
|
573
|
+
at async connectionHandler (/home/huydna/projects/dbml/packages/dbml-cli/lib/index.js:2630:22)
|
|
574
|
+
|
|
@@ -187,10 +187,10 @@ Table "table_with_composite_primary_and_unique_indexes" {
|
|
|
187
187
|
}
|
|
188
188
|
}
|
|
189
189
|
|
|
190
|
-
Ref "fk_authornationality":"authors".("authorid", "nationalityid")
|
|
190
|
+
Ref "fk_authornationality":"authors".("authorid", "nationalityid") ?<? "books".("authorid", "nationalityid") [delete: cascade]
|
|
191
191
|
|
|
192
|
-
Ref "fk_order":"orders"."order_id"
|
|
192
|
+
Ref "fk_order":"orders"."order_id" <? "order_items"."order_id" [delete: cascade]
|
|
193
193
|
|
|
194
|
-
Ref "fk_product":"products"."product_id"
|
|
194
|
+
Ref "fk_product":"products"."product_id" <? "order_items"."product_id" [delete: cascade]
|
|
195
195
|
|
|
196
|
-
Ref "fk_user":"users"."user_id"
|
|
196
|
+
Ref "fk_user":"users"."user_id" <? "orders"."user_id" [delete: cascade]
|
|
@@ -260,3 +260,18 @@
|
|
|
260
260
|
./in-files/main.dbml(5,15): Expect an identifier
|
|
261
261
|
./in-files/main.dbml(4,11): Unknown column setting 'pk user_id int'
|
|
262
262
|
|
|
263
|
+
2026-07-15T09:00:16.654Z
|
|
264
|
+
|
|
265
|
+
./in-files/main.dbml(5,15): Expect an identifier
|
|
266
|
+
./in-files/main.dbml(4,11): Unknown column setting 'pk user_id int'
|
|
267
|
+
|
|
268
|
+
2026-07-15T09:02:00.773Z
|
|
269
|
+
|
|
270
|
+
./in-files/main.dbml(5,15): Expect an identifier
|
|
271
|
+
./in-files/main.dbml(4,11): Unknown column setting 'pk user_id int'
|
|
272
|
+
|
|
273
|
+
2026-07-15T11:08:23.706Z
|
|
274
|
+
|
|
275
|
+
./in-files/main.dbml(5,15): Expect an identifier
|
|
276
|
+
./in-files/main.dbml(4,11): Unknown column setting 'pk user_id int'
|
|
277
|
+
|