@dbml/cli 5.2.0 → 5.3.1

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.
Files changed (92) hide show
  1. package/__test__/db2dbml/mssql/dbml-error.log +22 -0
  2. package/__test__/db2dbml/mysql/dbml-error.log +6 -0
  3. package/__test__/db2dbml/oracle/dbml-error.log +11 -0
  4. package/__test__/db2dbml/oracle/out-files/schema.dbml +46 -0
  5. package/__test__/db2dbml/postgres/dbml-error.log +7 -0
  6. package/__test__/db2dbml/sqlite/dbml-error.log +52 -0
  7. package/__test__/db2dbml/sqlite/out-files/schema.dbml +108 -0
  8. package/{__tests__ → __test__}/dbml2sql/filename --mysql --out-file/out-files/schema.sql +1 -1
  9. package/{__tests__ → __test__}/dbml2sql/filename --oracle --out-file/out-files/schema.sql +1 -1
  10. package/{__tests__ → __test__}/dbml2sql/filename --out-file/out-files/schema.sql +1 -1
  11. package/{__tests__ → __test__}/dbml2sql/filename --postgres --out-file/out-files/schema.sql +1 -1
  12. package/{__tests__ → __test__}/dbml2sql/filenames --mysql --out-file/out-files/schema.sql +1 -1
  13. package/{__tests__ → __test__}/dbml2sql/filenames --oracle --out-file/out-files/schema.sql +1 -1
  14. package/{__tests__ → __test__}/dbml2sql/filenames --out-file/out-files/schema.sql +1 -1
  15. package/{__tests__ → __test__}/dbml2sql/filenames --postgres --out-file/out-files/schema.sql +1 -1
  16. package/{__tests__ → __test__}/dbml2sql/multiple_schema_mssql/out-files/multiple_schema.out.sql +1 -1
  17. package/{__tests__ → __test__}/dbml2sql/multiple_schema_mysql/out-files/multiple_schema.out.sql +1 -1
  18. package/{__tests__ → __test__}/dbml2sql/multiple_schema_oracle/out-files/multiple_schema.out.sql +1 -1
  19. package/{__tests__ → __test__}/dbml2sql/multiple_schema_pg/out-files/multiple_schema.out.sql +1 -1
  20. package/__test__/dbml2sql/syntax-error/dbml-error.log +1533 -0
  21. package/{__tests__ → __test__}/sql2dbml/multiple_schema_mssql/out-files/multiple_schema.out.dbml +56 -8
  22. package/__test__/sql2dbml/multiple_schema_pg/dbml-error.log +52 -0
  23. package/__test__/sql2dbml/syntax-error/dbml-error.log +1557 -0
  24. package/__test__/sql2dbml/syntax-error-duplicate-endpoints --mssql/dbml-error.log +1615 -0
  25. package/__test__/sql2dbml/syntax-error-duplicate-endpoints --mysql/dbml-error.log +1615 -0
  26. package/__tests__/db2dbml/oracle/expect-out-files/schema.dbml +419 -0
  27. package/__tests__/db2dbml/oracle/options.json +8 -0
  28. package/__tests__/db2dbml/oracle/schema.sql +529 -0
  29. package/__tests__/db2dbml/oracle/stdout.txt +1 -0
  30. package/dbml-error.log +562 -0
  31. package/lib/cli/index.js +1 -0
  32. package/lib/cli/utils.js +1 -1
  33. package/package.json +4 -4
  34. package/src/cli/index.js +1 -0
  35. package/src/cli/utils.js +1 -1
  36. package/yarn-error.log +87 -0
  37. package/__tests__/db2dbml/mssql/dbml-error.log +0 -11
  38. package/__tests__/db2dbml/mssql/out-files/schema.dbml +0 -219
  39. package/__tests__/db2dbml/mysql/dbml-error.log +0 -3
  40. package/__tests__/db2dbml/mysql/out-files/schema.dbml +0 -188
  41. package/__tests__/db2dbml/postgres/dbml-error.log +0 -7
  42. package/__tests__/db2dbml/postgres/out-files/schema.dbml +0 -184
  43. package/__tests__/dbml2sql/syntax-error/dbml-error.log +0 -9
  44. package/__tests__/sql2dbml/multiple_schema_pg/dbml-error.log +0 -0
  45. package/__tests__/sql2dbml/syntax-error/dbml-error.log +0 -9
  46. package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mssql/dbml-error.log +0 -9
  47. package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mysql/dbml-error.log +0 -9
  48. /package/{__tests__ → __test__}/dbml2sql/filename --mysql --out-file/dbml-error.log +0 -0
  49. /package/{__tests__ → __test__}/dbml2sql/filename --mysql stdout/dbml-error.log +0 -0
  50. /package/{__tests__ → __test__}/dbml2sql/filename --oracle --out-file/dbml-error.log +0 -0
  51. /package/{__tests__ → __test__}/dbml2sql/filename --oracle stdout/dbml-error.log +0 -0
  52. /package/{__tests__ → __test__}/dbml2sql/filename --out-file/dbml-error.log +0 -0
  53. /package/{__tests__ → __test__}/dbml2sql/filename --postgres --out-file/dbml-error.log +0 -0
  54. /package/{__tests__ → __test__}/dbml2sql/filename --postgres stdout/dbml-error.log +0 -0
  55. /package/{__tests__ → __test__}/dbml2sql/filename stdout/dbml-error.log +0 -0
  56. /package/{__tests__ → __test__}/dbml2sql/filenames --mysql --out-file/dbml-error.log +0 -0
  57. /package/{__tests__ → __test__}/dbml2sql/filenames --mysql stdout/dbml-error.log +0 -0
  58. /package/{__tests__ → __test__}/dbml2sql/filenames --oracle --out-file/dbml-error.log +0 -0
  59. /package/{__tests__ → __test__}/dbml2sql/filenames --oracle stdout/dbml-error.log +0 -0
  60. /package/{__tests__ → __test__}/dbml2sql/filenames --out-file/dbml-error.log +0 -0
  61. /package/{__tests__ → __test__}/dbml2sql/filenames --postgres --out-file/dbml-error.log +0 -0
  62. /package/{__tests__ → __test__}/dbml2sql/filenames --postgres stdout/dbml-error.log +0 -0
  63. /package/{__tests__ → __test__}/dbml2sql/filenames stdout/dbml-error.log +0 -0
  64. /package/{__tests__ → __test__}/dbml2sql/multiple_schema_mssql/dbml-error.log +0 -0
  65. /package/{__tests__ → __test__}/dbml2sql/multiple_schema_mysql/dbml-error.log +0 -0
  66. /package/{__tests__ → __test__}/dbml2sql/multiple_schema_oracle/dbml-error.log +0 -0
  67. /package/{__tests__ → __test__}/dbml2sql/multiple_schema_pg/dbml-error.log +0 -0
  68. /package/{__tests__ → __test__}/sql2dbml/filename --mssql --out-file/dbml-error.log +0 -0
  69. /package/{__tests__ → __test__}/sql2dbml/filename --mssql --out-file/out-files/schema.dbml +0 -0
  70. /package/{__tests__ → __test__}/sql2dbml/filename --mysql --out-file/dbml-error.log +0 -0
  71. /package/{__tests__ → __test__}/sql2dbml/filename --mysql --out-file/out-files/schema.dbml +0 -0
  72. /package/{__tests__ → __test__}/sql2dbml/filename --mysql stdout/dbml-error.log +0 -0
  73. /package/{__tests__ → __test__}/sql2dbml/filename --out-file/dbml-error.log +0 -0
  74. /package/{__tests__ → __test__}/sql2dbml/filename --out-file/out-files/schema.dbml +0 -0
  75. /package/{__tests__ → __test__}/sql2dbml/filename --postgres --out-file/dbml-error.log +0 -0
  76. /package/{__tests__ → __test__}/sql2dbml/filename --postgres --out-file/out-files/schema.dbml +0 -0
  77. /package/{__tests__ → __test__}/sql2dbml/filename --postgres stdout/dbml-error.log +0 -0
  78. /package/{__tests__ → __test__}/sql2dbml/filename --snowflake stdout/dbml-error.log +0 -0
  79. /package/{__tests__ → __test__}/sql2dbml/filename stdout/dbml-error.log +0 -0
  80. /package/{__tests__ → __test__}/sql2dbml/filenames --mysql --out-file/dbml-error.log +0 -0
  81. /package/{__tests__ → __test__}/sql2dbml/filenames --mysql --out-file/out-files/schema.dbml +0 -0
  82. /package/{__tests__ → __test__}/sql2dbml/filenames --mysql stdout/dbml-error.log +0 -0
  83. /package/{__tests__ → __test__}/sql2dbml/filenames --out-file/dbml-error.log +0 -0
  84. /package/{__tests__ → __test__}/sql2dbml/filenames --out-file/out-files/schema.dbml +0 -0
  85. /package/{__tests__ → __test__}/sql2dbml/filenames --postgres --out-file/dbml-error.log +0 -0
  86. /package/{__tests__ → __test__}/sql2dbml/filenames --postgres --out-file/out-files/schema.dbml +0 -0
  87. /package/{__tests__ → __test__}/sql2dbml/filenames --postgres stdout/dbml-error.log +0 -0
  88. /package/{__tests__ → __test__}/sql2dbml/filenames stdout/dbml-error.log +0 -0
  89. /package/{__tests__ → __test__}/sql2dbml/multiple_schema_mssql/dbml-error.log +0 -0
  90. /package/{__tests__ → __test__}/sql2dbml/multiple_schema_mysql/dbml-error.log +0 -0
  91. /package/{__tests__ → __test__}/sql2dbml/multiple_schema_mysql/out-files/multiple_schema.out.dbml +0 -0
  92. /package/{__tests__ → __test__}/sql2dbml/multiple_schema_pg/out-files/multiple_schema.out.dbml +0 -0
@@ -1,184 +0,0 @@
1
- Enum "dbml_test"."enum_type1" {
2
- "value1"
3
- "value2"
4
- }
5
-
6
- Enum "dbml_test"."enum_type3" {
7
- "value4"
8
- "value5"
9
- }
10
-
11
- Table "dbml_test"."table1" {
12
- "id" int4 [pk, not null, increment]
13
- "status" dbml_test.enum_type1
14
- }
15
-
16
- Table "dbml_test"."table3" {
17
- "id" int4 [pk, not null, increment]
18
- "status" dbml_test.enum_type3
19
- }
20
-
21
- Enum "enum_type1" {
22
- "value1"
23
- "value2"
24
- }
25
-
26
- Enum "enum_type2" {
27
- "value1"
28
- "value3"
29
- }
30
-
31
- Enum "gender_type" {
32
- "Male"
33
- "Female"
34
- "Other"
35
- }
36
-
37
- Table "users" {
38
- "user_id" int4 [pk, not null, increment]
39
- "username" varchar(50) [unique, not null]
40
- "email" varchar(100) [unique, not null, check: `(email)::text ~* '^[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Z|a-z]{2,}$'::text`]
41
- "password_hash" varchar(255) [not null]
42
- "first_name" varchar(50)
43
- "last_name" varchar(50)
44
- "full_name" varchar(100)
45
- "date_of_birth" date [check: `date_of_birth <= (CURRENT_DATE - '13 years'::interval)`]
46
- "created_at" timestamptz [default: `CURRENT_TIMESTAMP`]
47
- "last_login" timestamptz
48
- "is_active" bool [default: true]
49
-
50
- Indexes {
51
- full_name [type: btree, name: "User Name"]
52
- email [type: btree, name: "idx_users_email"]
53
- (is_active, `lower((full_name)::text)`) [type: btree, name: "users_is_active_lower_idx"]
54
- }
55
- }
56
-
57
- Table "products" {
58
- "product_id" int4 [pk, not null, increment]
59
- "name" varchar(100) [not null]
60
- "description" text
61
- "price" numeric(10,2) [not null, check: `price > (0)::numeric`]
62
- "stock_quantity" int4 [not null, check: `stock_quantity >= 0`, default: 0]
63
- "category" varchar(50)
64
- "created_at" timestamptz [default: `CURRENT_TIMESTAMP`]
65
- "updated_at" timestamptz [default: `CURRENT_TIMESTAMP`]
66
- "is_available" bool [default: true]
67
-
68
- Checks {
69
- `created_at <= updated_at` [name: 'chk_created_at']
70
- }
71
-
72
- Indexes {
73
- category [type: btree, name: "idx_products_category"]
74
- }
75
- }
76
-
77
- Table "orders" {
78
- "order_id" int4 [pk, not null, increment]
79
- "user_id" int4 [not null]
80
- "order_date" timestamptz [default: `CURRENT_TIMESTAMP`]
81
- "total_amount" numeric(12,2) [not null, check: `total_amount > (0)::numeric`]
82
- "status" varchar(20) [check: `(status)::text = ANY ((ARRAY['pending'::character varying, 'processing'::character varying, 'shipped'::character varying, 'delivered'::character varying, 'cancelled'::character varying])::text[])`, default: 'pending']
83
- "shipping_address" text [not null]
84
- "billing_address" text [not null]
85
-
86
- Indexes {
87
- (user_id, order_date) [type: btree, name: "idx_orders_user_date"]
88
- }
89
- }
90
-
91
- Table "order_items" {
92
- "order_item_id" int4 [pk, not null, increment]
93
- "order_id" int4 [not null]
94
- "product_id" int4 [not null]
95
- "quantity" int4 [not null, check: `quantity > 0`]
96
- "unit_price" numeric(10,2) [not null, check: `unit_price > (0)::numeric`]
97
-
98
- Indexes {
99
- (order_id, product_id) [type: btree, name: "uq_order_product"]
100
- (order_id, product_id) [type: btree, name: "idx_order_items_order_product"]
101
- }
102
- }
103
-
104
- Table "all_string_types" {
105
- "text_col" text [default: 'default_text']
106
- "varchar_col" varchar(100) [default: 'default_varchar']
107
- "char_col" bpchar(10) [default: 'default_char']
108
- "character_varying_col" varchar(50) [default: 'default_character_varying']
109
- "character_col" bpchar(5) [default: 'default_character']
110
- "name_col" name [default: 'default_name']
111
- "bpchar_col" bpchar(15) [default: 'default_bpchar']
112
- "text_array_col" "text[]" [default: `ARRAY['default_text1', 'default_text2']`]
113
- "json_col" json [default: `{"default_key": "default_value"}`]
114
- "jsonb_col" jsonb [default: `{"default_key": "default_value"}`]
115
- }
116
-
117
- Table "all_default_values" {
118
- "id" int4 [pk, not null, increment]
119
- "boolean_col" bool [default: true]
120
- "integer_col" int4 [default: 42]
121
- "numeric_col" numeric(10,2) [default: 99.99]
122
- "date_col" date [default: `CURRENT_DATE`]
123
- "date_col_specific" date [default: '2024-01-01']
124
- "timestamp_col" timestamp [default: `CURRENT_TIMESTAMP`]
125
- "timestamp_col_specific" timestamp [default: '2024-01-01 12:00:00']
126
- "date_plus_7_days" date [default: `(CURRENT_DATE + '7 days'::interval)`]
127
- "date_minus_30_days" date [default: `(CURRENT_DATE - '30 days'::interval)`]
128
- "timestamp_plus_1_hour" timestamp [default: `(CURRENT_TIMESTAMP + '01:00:00'::interval)`]
129
- "timestamp_minus_15_minutes" timestamp [default: `(CURRENT_TIMESTAMP - '00:15:00'::interval)`]
130
- }
131
-
132
- Table "user_define_data_types" {
133
- "id" int4 [pk, not null, increment]
134
- "name" varchar(50)
135
- "gender" gender_type
136
- "age" int4range
137
- "height" float8 [check: `height > (0)::double precision`]
138
- "weight" float8 [check: `weight > (0)::double precision`]
139
- }
140
-
141
- Table "table_with_comments" {
142
- "id" int4 [pk, not null, increment, note: 'Unique identifier for each item.']
143
- "name" varchar(100) [note: '''Item\'s name.''']
144
- "description" text [note: '''Item\'s description''']
145
- "created_at" timestamptz [default: `CURRENT_TIMESTAMP`, note: 'Timestamp when the item was created.']
146
- Note: '''This table stores information about various items. Such as: \'id\', \'name\', \'description\''''
147
- }
148
-
149
- Table "authors" {
150
- "authorid" int4 [not null, increment]
151
- "nationalityid" int4 [not null]
152
- "authorname" varchar(100)
153
- "birthyear" int4
154
-
155
- Indexes {
156
- (authorid, nationalityid) [type: btree, name: "authors_pkey"]
157
- }
158
- }
159
-
160
- Table "books" {
161
- "bookid" int4 [pk, not null, increment]
162
- "authorid" int4
163
- "nationalityid" int4
164
- "isbn" varchar(20) [unique]
165
- "title" varchar(200)
166
- }
167
-
168
- Table "table1" {
169
- "id" int4 [pk, not null, increment]
170
- "status" enum_type1
171
- }
172
-
173
- Table "table2" {
174
- "id" int4 [pk, not null, increment]
175
- "status" enum_type2
176
- }
177
-
178
- Ref "fk_authornationality":"authors".("authorid", "nationalityid") < "books".("authorid", "nationalityid") [delete: cascade]
179
-
180
- Ref "fk_order":"orders"."order_id" < "order_items"."order_id" [delete: cascade]
181
-
182
- Ref "fk_product":"products"."product_id" < "order_items"."product_id" [delete: cascade]
183
-
184
- Ref "fk_user":"users"."user_id" < "orders"."user_id" [delete: cascade]
@@ -1,9 +0,0 @@
1
- 2025-11-17T09:11:54.568Z
2
- undefined
3
-
4
- 2025-11-17T09:51:53.546Z
5
- undefined
6
-
7
- 2025-11-17T14:37:45.981Z
8
- undefined
9
-
@@ -1,9 +0,0 @@
1
- 2025-11-17T09:12:23.657Z
2
- undefined
3
-
4
- 2025-11-17T09:52:17.717Z
5
- undefined
6
-
7
- 2025-11-17T14:38:11.691Z
8
- undefined
9
-
@@ -1,9 +0,0 @@
1
- 2025-11-17T09:12:24.842Z
2
- undefined
3
-
4
- 2025-11-17T09:52:18.833Z
5
- undefined
6
-
7
- 2025-11-17T14:38:12.931Z
8
- undefined
9
-
@@ -1,9 +0,0 @@
1
- 2025-11-17T09:12:25.985Z
2
- undefined
3
-
4
- 2025-11-17T09:52:19.827Z
5
- undefined
6
-
7
- 2025-11-17T14:38:13.982Z
8
- undefined
9
-