@dbml/cli 3.9.5 → 3.9.6

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 (28) hide show
  1. package/__test__/dbml2sql/filename --mysql --out-file/out-files/schema.sql +1 -1
  2. package/__test__/dbml2sql/filename --oracle --out-file/out-files/schema.sql +1 -1
  3. package/__test__/dbml2sql/filename --out-file/out-files/schema.sql +1 -1
  4. package/__test__/dbml2sql/filename --postgres --out-file/out-files/schema.sql +1 -1
  5. package/__test__/dbml2sql/filenames --mysql --out-file/out-files/schema.sql +1 -1
  6. package/__test__/dbml2sql/filenames --oracle --out-file/out-files/schema.sql +1 -1
  7. package/__test__/dbml2sql/filenames --out-file/out-files/schema.sql +1 -1
  8. package/__test__/dbml2sql/filenames --postgres --out-file/out-files/schema.sql +1 -1
  9. package/__test__/dbml2sql/multiple_schema_mssql/out-files/multiple_schema.out.sql +1 -1
  10. package/__test__/dbml2sql/multiple_schema_mysql/out-files/multiple_schema.out.sql +1 -1
  11. package/__test__/dbml2sql/multiple_schema_oracle/out-files/multiple_schema.out.sql +1 -1
  12. package/__test__/dbml2sql/multiple_schema_pg/out-files/multiple_schema.out.sql +1 -1
  13. package/__test__/dbml2sql/syntax-error/dbml-error.log +1517 -8
  14. package/__test__/sql2dbml/multiple_schema_pg/dbml-error.log +52 -0
  15. package/__test__/sql2dbml/syntax-error/dbml-error.log +1542 -9
  16. package/__test__/sql2dbml/syntax-error-duplicate-endpoints --mssql/dbml-error.log +1603 -12
  17. package/__test__/sql2dbml/syntax-error-duplicate-endpoints --mysql/dbml-error.log +1603 -12
  18. package/dbml-error.log +305 -234
  19. package/package.json +4 -4
  20. package/yarn-error.log +87 -0
  21. package/__test__/db2dbml/mssql/dbml-error.log +0 -614
  22. package/__test__/db2dbml/mssql/out-files/schema.dbml +0 -203
  23. package/__test__/db2dbml/mysql/dbml-error.log +0 -492
  24. package/__test__/db2dbml/mysql/out-files/schema.dbml +0 -180
  25. package/__test__/db2dbml/postgres/dbml-error.log +0 -319
  26. package/__test__/db2dbml/postgres/out-files/schema.dbml +0 -180
  27. package/__test__/sql2dbml/filename --snowflake stdout/dbml-error.log +0 -0
  28. package/snowflake.log +0 -8
@@ -1,203 +0,0 @@
1
- Enum "dbo"."chk_status" {
2
- "cancelled"
3
- "delivered"
4
- "shipped"
5
- "processing"
6
- "pending"
7
- }
8
-
9
- Enum "dbo"."chk_gender" {
10
- "Other"
11
- "Female"
12
- "Male"
13
- }
14
-
15
- Table "dbo"."users" {
16
- "user_id" int(10) [pk, not null, increment]
17
- "username" varchar(50) [unique, not null]
18
- "email" varchar(100) [unique, not null]
19
- "password_hash" varchar(255) [not null]
20
- "first_name" varchar(50)
21
- "last_name" varchar(50)
22
- "full_name" varchar(100)
23
- "full_name_lower" varchar(100)
24
- "date_of_birth" date
25
- "created_at" datetime2 [default: `getdate()`]
26
- "last_login" datetime2
27
- "is_active" bit [default: 1]
28
-
29
- Indexes {
30
- email [type: nonclustered, name: "idx_users_email"]
31
- full_name [type: nonclustered, name: "idx_users_full_name"]
32
- (is_active, full_name_lower) [type: nonclustered, name: "idx_users_is_active_full_name"]
33
- }
34
- }
35
-
36
- Table "dbo"."products" {
37
- "product_id" int(10) [pk, not null, increment]
38
- "name" varchar(100) [not null]
39
- "description" text
40
- "price" decimal(10,2) [not null]
41
- "stock_quantity" int(10) [not null, default: 0]
42
- "category" varchar(50)
43
- "created_at" datetime2 [default: `getdate()`]
44
- "updated_at" datetime2 [default: `getdate()`]
45
- "is_available" bit [default: 1]
46
-
47
- Indexes {
48
- category [type: nonclustered, name: "idx_products_category"]
49
- }
50
- }
51
-
52
- Table "dbo"."orders" {
53
- "order_id" int(10) [pk, not null, increment]
54
- "user_id" int(10) [not null]
55
- "order_date" datetime2 [default: `getdate()`]
56
- "total_amount" decimal(12,2) [not null]
57
- "status" dbo.chk_status [default: 'pending']
58
- "shipping_address" text [not null]
59
- "billing_address" text [not null]
60
-
61
- Indexes {
62
- (user_id, order_date) [type: nonclustered, name: "idx_orders_user_date"]
63
- }
64
- }
65
-
66
- Table "dbo"."order_items" {
67
- "order_item_id" int(10) [pk, not null, increment]
68
- "order_id" int(10) [unique, not null]
69
- "product_id" int(10) [unique, not null]
70
- "quantity" int(10) [not null]
71
- "unit_price" decimal(10,2) [not null]
72
-
73
- Indexes {
74
- (order_id, product_id) [type: nonclustered, name: "idx_order_items_order_product"]
75
- }
76
- }
77
-
78
- Table "dbo"."StringTypes" {
79
- "Id" int(10) [pk, not null, increment]
80
- "CharField" char(10) [default: 'N/A']
81
- "VarcharField" varchar(50) [default: '{"default_key": "default_value"}']
82
- "VarcharMaxField" varchar(MAX) [default: 'N/A']
83
- "TextField" text [default: 'N/A']
84
- "NCharField" nchar(10) [default: `N'N/A'`]
85
- "NVarCharField" nvarchar(50) [default: `N'N/A'`]
86
- "NVarCharMaxField" nvarchar(MAX) [default: `N'N/A'`]
87
- "NTextField" ntext [default: `N'N/A'`]
88
- }
89
-
90
- Table "dbo"."NumberTypes" {
91
- "ID" int(10) [pk, not null, increment]
92
- "TINYINTCol" tinyint(3) [default: 0]
93
- "SMALLINTCol" smallint(5) [default: 0]
94
- "INTCol" int(10) [default: 0]
95
- "BIGINTCol" bigint(19) [default: 0]
96
- "DECIMALCol" decimal(10,2) [default: 0.00]
97
- "NUMERICCol" numeric(10,2) [default: 0.00]
98
- "FLOATCol" float(53) [default: 0.0]
99
- "REALCol" real(24) [default: 0.0]
100
- "BITCol" bit [default: 0]
101
- }
102
-
103
- Table "dbo"."NumberTypesNoDefault" {
104
- "ID" int(10) [pk, not null, increment]
105
- "TINYINTCol" tinyint(3)
106
- "SMALLINTCol" smallint(5)
107
- "INTCol" int(10)
108
- "BIGINTCol" bigint(19)
109
- "DECIMALCol" decimal(10,2)
110
- "NUMERICCol" numeric(10,2)
111
- "FLOATCol" float(53)
112
- "REALCol" real(24)
113
- "BITCol" bit
114
- }
115
-
116
- Table "dbo"."DatetimeTypes" {
117
- "ID" int(10) [pk, not null, increment]
118
- "DATECol" date [default: `getdate()`]
119
- "TIMECol" time [default: `CONVERT([time],getdate())`]
120
- "DATETIMECol" datetime [default: `getdate()`]
121
- "DATETIME2Col" datetime2 [default: `sysdatetime()`]
122
- "SMALLDATETIMECol" smalldatetime [default: `getdate()`]
123
- "ROWVERSIONCol" timestamp [not null]
124
- "DATETIMEOFFSETCol" datetimeoffset [default: `sysdatetimeoffset()`]
125
- }
126
-
127
- Table "dbo"."ObjectTypes" {
128
- "Id" int(10) [pk, not null, increment]
129
- "XmlField" xml [default: '''<Books>
130
- <Book>
131
- <Title>The Great Gatsby</Title>
132
- <Author>F. Scott Fitzgerald</Author>
133
- <Year>1925</Year>
134
- <Price>10.99</Price>
135
- <Publisher>Scribner</Publisher>
136
- <Location>New York</Location>
137
- <Genre>Fiction</Genre>
138
- <Subgenre>Classic</Subgenre>
139
- </Book>
140
- <Book>
141
- <Title>1984</Title>
142
- <Author>George Orwell</Author>
143
- <Year>1949</Year>
144
- <Price>8.99</Price>
145
- <Publisher>Secker & Warburg</Publisher>
146
- <Location>London</Location>
147
- <Genre>Dystopian</Genre>
148
- <Subgenre>Political Fiction</Subgenre>
149
- </Book>
150
- </Books>''']
151
- "JsonField" nvarchar(MAX) [default: `N'{"defaultKey": "defaultValue", "status": "active", "count": 0}'`]
152
- "BinaryField" binary(50) [default: `0x00`]
153
- "VarBinaryField" varbinary(50) [default: `0x00`]
154
- "VarBinaryMaxField" varbinary(MAX) [default: `0x00`]
155
- "ImageField" image [default: `0x00`]
156
- }
157
-
158
- Table "dbo"."gender_reference" {
159
- "value" nvarchar(10) [pk, not null]
160
- }
161
-
162
- Table "dbo"."user_define_data_types" {
163
- "id" int(10) [pk, not null, increment]
164
- "name" nvarchar(50)
165
- "gender" dbo.chk_gender
166
- "age_start" int(10)
167
- "age_end" int(10)
168
- "height" float(53)
169
- "weight" float(53)
170
- }
171
-
172
- Table "dbo"."table_with_comments" {
173
- "id" int(10) [pk, not null, increment, note: 'Unique identifier for each item.']
174
- "name" varchar(100) [note: 'Name of the item.']
175
- "description" text [note: '''Item\'s description''']
176
- "created_at" datetime2 [default: `getdate()`, note: 'Timestamp when the item was created.']
177
- Note: 'This table stores information about various items.'
178
- }
179
-
180
- Table "dbo"."Authors" {
181
- "AuthorID" int(10) [pk, not null]
182
- "NationalityID" int(10) [pk, not null]
183
- "AuthorName" nvarchar(100) [unique]
184
- "BirthYear" int(10) [unique]
185
- }
186
-
187
- Table "dbo"."Books" {
188
- "BookID" int(10) [pk, not null]
189
- "AuthorID" int(10) [pk, not null]
190
- "NationalityID" int(10)
191
- "ISBN" nvarchar(20) [unique]
192
- "Title" nvarchar(200)
193
- }
194
-
195
- Ref "FK_AuthorNationality":"dbo"."Authors".("AuthorID", "NationalityID") < "dbo"."Books".("AuthorID", "NationalityID")
196
-
197
- Ref "fk_product":"dbo"."products"."product_id" < "dbo"."order_items"."product_id" [update: cascade]
198
-
199
- Ref "fk_order":"dbo"."orders"."order_id" < "dbo"."order_items"."order_id" [update: cascade, delete: cascade]
200
-
201
- Ref "fk_user":"dbo"."users"."user_id" < "dbo"."orders"."user_id" [update: cascade, delete: cascade]
202
-
203
- Ref "fk_gender":"dbo"."gender_reference"."value" < "dbo"."user_define_data_types"."gender"