@dbml/cli 5.5.1 → 5.6.0-alpha.0

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 (95) hide show
  1. package/__tests__/db2dbml/mssql/dbml-error.log +22 -0
  2. package/__tests__/db2dbml/mysql/dbml-error.log +6 -0
  3. package/__tests__/db2dbml/oracle/dbml-error.log +28 -0
  4. package/__tests__/db2dbml/postgres/dbml-error.log +14 -0
  5. package/__tests__/dbml2sql/filename --mysql --out-file/dbml-error.log +0 -0
  6. package/__tests__/dbml2sql/filename --mysql --out-file/out-files/schema.sql +65 -0
  7. package/__tests__/dbml2sql/filename --mysql stdout/dbml-error.log +0 -0
  8. package/__tests__/dbml2sql/filename --oracle --out-file/dbml-error.log +0 -0
  9. package/__tests__/dbml2sql/filename --oracle --out-file/out-files/schema.sql +61 -0
  10. package/__tests__/dbml2sql/filename --oracle stdout/dbml-error.log +0 -0
  11. package/__tests__/dbml2sql/filename --out-file/dbml-error.log +0 -0
  12. package/__tests__/dbml2sql/filename --out-file/out-files/schema.sql +77 -0
  13. package/__tests__/dbml2sql/filename --postgres --out-file/dbml-error.log +0 -0
  14. package/__tests__/dbml2sql/filename --postgres --out-file/out-files/schema.sql +77 -0
  15. package/__tests__/dbml2sql/filename --postgres stdout/dbml-error.log +0 -0
  16. package/__tests__/dbml2sql/filename stdout/dbml-error.log +0 -0
  17. package/__tests__/dbml2sql/filenames --mysql --out-file/dbml-error.log +0 -0
  18. package/__tests__/dbml2sql/filenames --mysql --out-file/out-files/schema.sql +172 -0
  19. package/__tests__/dbml2sql/filenames --mysql stdout/dbml-error.log +0 -0
  20. package/__tests__/dbml2sql/filenames --oracle --out-file/dbml-error.log +0 -0
  21. package/__tests__/dbml2sql/filenames --oracle --out-file/out-files/schema.sql +172 -0
  22. package/__tests__/dbml2sql/filenames --oracle stdout/dbml-error.log +0 -0
  23. package/__tests__/dbml2sql/filenames --out-file/dbml-error.log +0 -0
  24. package/__tests__/dbml2sql/filenames --out-file/out-files/schema.sql +172 -0
  25. package/__tests__/dbml2sql/filenames --postgres --out-file/dbml-error.log +0 -0
  26. package/__tests__/dbml2sql/filenames --postgres --out-file/out-files/schema.sql +172 -0
  27. package/__tests__/dbml2sql/filenames --postgres stdout/dbml-error.log +0 -0
  28. package/__tests__/dbml2sql/filenames stdout/dbml-error.log +0 -0
  29. package/__tests__/dbml2sql/multiple_schema_mssql/dbml-error.log +0 -0
  30. package/__tests__/dbml2sql/multiple_schema_mssql/out-files/multiple_schema.out.sql +62 -0
  31. package/__tests__/dbml2sql/multiple_schema_mysql/dbml-error.log +0 -0
  32. package/__tests__/dbml2sql/multiple_schema_mysql/out-files/multiple_schema.out.sql +50 -0
  33. package/__tests__/dbml2sql/multiple_schema_oracle/dbml-error.log +0 -0
  34. package/__tests__/dbml2sql/multiple_schema_oracle/out-files/multiple_schema.out.sql +88 -0
  35. package/__tests__/dbml2sql/multiple_schema_pg/dbml-error.log +0 -0
  36. package/__tests__/dbml2sql/multiple_schema_pg/out-files/multiple_schema.out.sql +67 -0
  37. package/__tests__/dbml2sql/syntax-error/dbml-error.log +6 -0
  38. package/__tests__/sql2dbml/custom-error-alter-table-column-not-found --oracle/dbml-error.log +6 -0
  39. package/__tests__/sql2dbml/custom-error-alter-table-table-not-found --oracle/dbml-error.log +6 -0
  40. package/__tests__/sql2dbml/custom-error-column-comment-column-not-found --oracle/dbml-error.log +6 -0
  41. package/__tests__/sql2dbml/custom-error-column-comment-table-not-found --oracle/dbml-error.log +6 -0
  42. package/__tests__/sql2dbml/custom-error-create-index-table-not-found --oracle/dbml-error.log +6 -0
  43. package/__tests__/sql2dbml/custom-error-table-comment-table-not-found --oracle/dbml-error.log +6 -0
  44. package/__tests__/sql2dbml/filename --mssql --out-file/dbml-error.log +0 -0
  45. package/__tests__/sql2dbml/filename --mssql --out-file/out-files/schema.dbml +25 -0
  46. package/__tests__/sql2dbml/filename --mysql --out-file/dbml-error.log +0 -0
  47. package/__tests__/sql2dbml/filename --mysql --out-file/out-files/schema.dbml +74 -0
  48. package/__tests__/sql2dbml/filename --mysql stdout/dbml-error.log +0 -0
  49. package/__tests__/sql2dbml/filename --oracle --out-file/dbml-error.log +0 -0
  50. package/__tests__/sql2dbml/filename --oracle --out-file/out-files/schema.dbml +83 -0
  51. package/__tests__/sql2dbml/filename --out-file/dbml-error.log +0 -0
  52. package/__tests__/sql2dbml/filename --out-file/out-files/schema.dbml +74 -0
  53. package/__tests__/sql2dbml/filename --postgres --out-file/dbml-error.log +0 -0
  54. package/__tests__/sql2dbml/filename --postgres --out-file/out-files/schema.dbml +74 -0
  55. package/__tests__/sql2dbml/filename --postgres stdout/dbml-error.log +0 -0
  56. package/__tests__/sql2dbml/filename --snowflake stdout/dbml-error.log +0 -0
  57. package/__tests__/sql2dbml/filename stdout/dbml-error.log +0 -0
  58. package/__tests__/sql2dbml/filenames --mysql --out-file/dbml-error.log +0 -0
  59. package/__tests__/sql2dbml/filenames --mysql --out-file/out-files/schema.dbml +170 -0
  60. package/__tests__/sql2dbml/filenames --mysql stdout/dbml-error.log +0 -0
  61. package/__tests__/sql2dbml/filenames --out-file/dbml-error.log +0 -0
  62. package/__tests__/sql2dbml/filenames --out-file/out-files/schema.dbml +170 -0
  63. package/__tests__/sql2dbml/filenames --postgres --out-file/dbml-error.log +0 -0
  64. package/__tests__/sql2dbml/filenames --postgres --out-file/out-files/schema.dbml +170 -0
  65. package/__tests__/sql2dbml/filenames --postgres stdout/dbml-error.log +0 -0
  66. package/__tests__/sql2dbml/filenames stdout/dbml-error.log +0 -0
  67. package/__tests__/sql2dbml/multiple_schema_mssql/dbml-error.log +0 -0
  68. package/__tests__/sql2dbml/multiple_schema_mssql/out-files/multiple_schema.out.dbml +58 -0
  69. package/__tests__/sql2dbml/multiple_schema_mysql/dbml-error.log +0 -0
  70. package/__tests__/sql2dbml/multiple_schema_mysql/out-files/multiple_schema.out.dbml +136 -0
  71. package/__tests__/sql2dbml/multiple_schema_pg/dbml-error.log +0 -0
  72. package/__tests__/sql2dbml/multiple_schema_pg/out-files/multiple_schema.out.dbml +101 -0
  73. package/__tests__/sql2dbml/syntax-error/dbml-error.log +6 -0
  74. package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mssql/dbml-error.log +6 -0
  75. package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mysql/dbml-error.log +6 -0
  76. package/eslint.config.ts +13 -6
  77. package/lib/index.js +374 -20
  78. package/package.json +9 -26
  79. package/tsconfig.json +2 -1
  80. package/vite.config.ts +50 -0
  81. package/.babelrc +0 -19
  82. package/jest.config.ts +0 -14
  83. package/lib/cli/config.js +0 -29
  84. package/lib/cli/connector.js +0 -38
  85. package/lib/cli/export.js +0 -37
  86. package/lib/cli/import.js +0 -36
  87. package/lib/cli/index.js +0 -76
  88. package/lib/cli/outputPlugins/outputConsolePlugin.js +0 -12
  89. package/lib/cli/outputPlugins/outputFilePlugin.js +0 -28
  90. package/lib/cli/utils.js +0 -81
  91. package/lib/cli/validatePlugins/validatePlugins.js +0 -14
  92. package/lib/errors/domainError.js +0 -15
  93. package/lib/errors/index.js +0 -20
  94. package/lib/errors/syntaxError.js +0 -23
  95. package/lib/helpers/logger.js +0 -74
@@ -0,0 +1,170 @@
1
+ Table "staff" {
2
+ "id" int [pk]
3
+ "first_name" varchar(255)
4
+ "last_name" varchar(255)
5
+ "address_id" int
6
+ "picture" blob
7
+ "email" varchar(255)
8
+ "store_id" int
9
+ "active" boolean
10
+ "user_name" varchar(255)
11
+ "password" varchar(255)
12
+ "last_update" timestamp
13
+ }
14
+
15
+ Table "store" {
16
+ "id" int [pk]
17
+ "manager_staff_id" int
18
+ "address_id" int
19
+ "last_update" timestamp
20
+ }
21
+
22
+ Table "payment" {
23
+ "id" int [pk]
24
+ "customer_id" int
25
+ "staff_id" int
26
+ "rental_id" int
27
+ "amount" decimal
28
+ "payment_date" datetime
29
+ "last_update" timestamp
30
+ }
31
+
32
+ Table "rental" {
33
+ "id" int [pk]
34
+ "rental_date" datetime
35
+ "inventory_id" int
36
+ "customer_id" int
37
+ "return_date" datetime
38
+ "staff_id" int
39
+ "last_update" timestamp
40
+ }
41
+
42
+ Ref:"store"."id" < "staff"."store_id"
43
+
44
+ Ref:"staff"."id" < "store"."manager_staff_id"
45
+
46
+ Ref:"staff"."id" < "payment"."staff_id"
47
+
48
+ Ref:"rental"."id" < "payment"."rental_id"
49
+
50
+ Ref:"staff"."id" < "rental"."staff_id"
51
+ Table "country" {
52
+ "id" int [pk]
53
+ "country" varchar(255)
54
+ "last_update" timestamp
55
+ }
56
+
57
+ Table "city" {
58
+ "id" int [pk]
59
+ "city" varchar(255)
60
+ "country_id" int
61
+ "last_update" timestamp
62
+ }
63
+
64
+ Table "address" {
65
+ "id" int [pk]
66
+ "address" varchar(255)
67
+ "address2" varchar(255)
68
+ "district" varchar(255)
69
+ "city_id" int
70
+ "postal_code" varchar(255)
71
+ "phone" varchar(255)
72
+ "last_update" timestamp
73
+ }
74
+
75
+ Table "customer" {
76
+ "id" int [pk]
77
+ "store_id" int
78
+ "first_name" varchar(255)
79
+ "last_name" varchar(255)
80
+ "email" varchar(255)
81
+ "address_id" int
82
+ "active" boolean
83
+ "create_Date" timestamp
84
+ "last_update" timestamp
85
+
86
+ Indexes {
87
+ (id, first_name) [type: btree, name: "customer_index_0"]
88
+ }
89
+ }
90
+
91
+ Ref:"country"."id" < "city"."country_id"
92
+
93
+ Ref:"city"."id" < "address"."city_id"
94
+
95
+ Ref:"address"."id" < "customer"."address_id"
96
+ Table "category" {
97
+ "id" int [pk]
98
+ "name" varchar(255)
99
+ "last_update" timestamp
100
+ }
101
+
102
+ Table "film_category" {
103
+ "id" int [pk]
104
+ "category_id" int
105
+ "last_update" timestamp
106
+ }
107
+
108
+ Table "language" {
109
+ "id" int [pk]
110
+ "name" varchar(255)
111
+ "last_update" timestamp
112
+ }
113
+
114
+ Table "film_text" {
115
+ "id" int [pk]
116
+ "film_id" int
117
+ "title" varchar(255)
118
+ "description" text
119
+ }
120
+
121
+ Table "actor" {
122
+ "id" int [pk]
123
+ "first_name" varchar(255)
124
+ "last_name" varchar(255)
125
+ "last_update" timestamp
126
+ }
127
+
128
+ Table "film" {
129
+ "id" int [pk]
130
+ "title" varchar(255)
131
+ "description" text
132
+ "releaase_year" int
133
+ "language_id" int
134
+ "original_language_id" int
135
+ "rental_duration" int
136
+ "rental_rate" decimal
137
+ "length" int
138
+ "replacement_cost" decimal
139
+ "rating" varchar(255)
140
+ "special_feature" varchar(255)
141
+ "last_update" timestamp
142
+ }
143
+
144
+ Table "film_actor" {
145
+ "id" int [pk]
146
+ "film_id" int
147
+ "actor_id" int
148
+ "last_update" timestamp
149
+ }
150
+
151
+ Table "inventory" {
152
+ "id" int [pk]
153
+ "film_id" int
154
+ "store_id" int
155
+ "last_update" timestamp
156
+ }
157
+
158
+ Ref:"category"."id" < "film_category"."category_id"
159
+
160
+ Ref:"inventory"."film_id" < "film_text"."film_id"
161
+
162
+ Ref:"language"."id" < "film"."language_id"
163
+
164
+ Ref:"language"."id" < "film"."original_language_id"
165
+
166
+ Ref:"film"."id" < "film_actor"."film_id"
167
+
168
+ Ref:"actor"."id" < "film_actor"."actor_id"
169
+
170
+ Ref:"film"."id" < "inventory"."film_id"
@@ -0,0 +1,170 @@
1
+ Table "staff" {
2
+ "id" int [pk]
3
+ "first_name" varchar
4
+ "last_name" varchar
5
+ "address_id" int
6
+ "picture" blob
7
+ "email" varchar
8
+ "store_id" int
9
+ "active" boolean
10
+ "user_name" varchar
11
+ "password" varchar
12
+ "last_update" timestamp
13
+ }
14
+
15
+ Table "store" {
16
+ "id" int [pk]
17
+ "manager_staff_id" int
18
+ "address_id" int
19
+ "last_update" timestamp
20
+ }
21
+
22
+ Table "payment" {
23
+ "id" int [pk]
24
+ "customer_id" int
25
+ "staff_id" int
26
+ "rental_id" int
27
+ "amount" decimal
28
+ "payment_date" datetime
29
+ "last_update" timestamp
30
+ }
31
+
32
+ Table "rental" {
33
+ "id" int [pk]
34
+ "rental_date" datetime
35
+ "inventory_id" int
36
+ "customer_id" int
37
+ "return_date" ddatetime
38
+ "staff_id" int
39
+ "last_update" timestamp
40
+ }
41
+
42
+ Ref:"store"."id" < "staff"."store_id"
43
+
44
+ Ref:"staff"."id" < "store"."manager_staff_id"
45
+
46
+ Ref:"staff"."id" < "payment"."staff_id"
47
+
48
+ Ref:"rental"."id" < "payment"."rental_id"
49
+
50
+ Ref:"staff"."id" < "rental"."staff_id"
51
+ Table "country" {
52
+ "id" int [pk]
53
+ "country" varchar
54
+ "last_update" timestamp
55
+ }
56
+
57
+ Table "city" {
58
+ "id" int [pk]
59
+ "city" varchar
60
+ "country_id" int
61
+ "last_update" timestamp
62
+ }
63
+
64
+ Table "address" {
65
+ "id" int [pk]
66
+ "address" varchar
67
+ "address2" varchar
68
+ "district" varchar
69
+ "city_id" int
70
+ "postal_code" varchar
71
+ "phone" varchar
72
+ "last_update" timestamp
73
+ }
74
+
75
+ Table "customer" {
76
+ "id" int [pk]
77
+ "store_id" int
78
+ "first_name" varchar
79
+ "last_name" varchar
80
+ "email" varchar
81
+ "address_id" int
82
+ "active" boolean
83
+ "create_Date" timestamp
84
+ "last_update" timestamp
85
+
86
+ Indexes {
87
+ (id, first_name) [type: btree]
88
+ }
89
+ }
90
+
91
+ Ref:"country"."id" < "city"."country_id"
92
+
93
+ Ref:"city"."id" < "address"."city_id"
94
+
95
+ Ref:"address"."id" < "customer"."address_id"
96
+ Table "category" {
97
+ "id" int [pk]
98
+ "name" varchar
99
+ "last_update" timestamp
100
+ }
101
+
102
+ Table "film_category" {
103
+ "id" int [pk]
104
+ "category_id" int
105
+ "last_update" timestamp
106
+ }
107
+
108
+ Table "language" {
109
+ "id" int [pk]
110
+ "name" varchar
111
+ "last_update" timestamp
112
+ }
113
+
114
+ Table "film_text" {
115
+ "id" int [pk]
116
+ "film_id" int
117
+ "title" varchar
118
+ "description" text
119
+ }
120
+
121
+ Table "actor" {
122
+ "id" int [pk]
123
+ "first_name" varchar
124
+ "last_name" varchar
125
+ "last_update" timestamp
126
+ }
127
+
128
+ Table "film" {
129
+ "id" int [pk]
130
+ "title" varchar
131
+ "description" text
132
+ "releaase_year" int
133
+ "language_id" int
134
+ "original_language_id" int
135
+ "rental_duration" int
136
+ "rental_rate" decimal
137
+ "length" int
138
+ "replacement_cost" decimal
139
+ "rating" varchar
140
+ "special_feature" varchar
141
+ "last_update" timestamp
142
+ }
143
+
144
+ Table "film_actor" {
145
+ "id" int [pk]
146
+ "film_id" int
147
+ "actor_id" int
148
+ "last_update" timestamp
149
+ }
150
+
151
+ Table "inventory" {
152
+ "id" int [pk]
153
+ "film_id" int
154
+ "store_id" int
155
+ "last_update" timestamp
156
+ }
157
+
158
+ Ref:"category"."id" < "film_category"."category_id"
159
+
160
+ Ref:"inventory"."film_id" < "film_text"."film_id"
161
+
162
+ Ref:"language"."id" < "film"."language_id"
163
+
164
+ Ref:"language"."id" < "film"."original_language_id"
165
+
166
+ Ref:"film"."id" < "film_actor"."film_id"
167
+
168
+ Ref:"actor"."id" < "film_actor"."actor_id"
169
+
170
+ Ref:"film"."id" < "inventory"."film_id"
@@ -0,0 +1,170 @@
1
+ Table "staff" {
2
+ "id" int [pk]
3
+ "first_name" varchar
4
+ "last_name" varchar
5
+ "address_id" int
6
+ "picture" blob
7
+ "email" varchar
8
+ "store_id" int
9
+ "active" boolean
10
+ "user_name" varchar
11
+ "password" varchar
12
+ "last_update" timestamp
13
+ }
14
+
15
+ Table "store" {
16
+ "id" int [pk]
17
+ "manager_staff_id" int
18
+ "address_id" int
19
+ "last_update" timestamp
20
+ }
21
+
22
+ Table "payment" {
23
+ "id" int [pk]
24
+ "customer_id" int
25
+ "staff_id" int
26
+ "rental_id" int
27
+ "amount" decimal
28
+ "payment_date" datetime
29
+ "last_update" timestamp
30
+ }
31
+
32
+ Table "rental" {
33
+ "id" int [pk]
34
+ "rental_date" datetime
35
+ "inventory_id" int
36
+ "customer_id" int
37
+ "return_date" ddatetime
38
+ "staff_id" int
39
+ "last_update" timestamp
40
+ }
41
+
42
+ Ref:"store"."id" < "staff"."store_id"
43
+
44
+ Ref:"staff"."id" < "store"."manager_staff_id"
45
+
46
+ Ref:"staff"."id" < "payment"."staff_id"
47
+
48
+ Ref:"rental"."id" < "payment"."rental_id"
49
+
50
+ Ref:"staff"."id" < "rental"."staff_id"
51
+ Table "country" {
52
+ "id" int [pk]
53
+ "country" varchar
54
+ "last_update" timestamp
55
+ }
56
+
57
+ Table "city" {
58
+ "id" int [pk]
59
+ "city" varchar
60
+ "country_id" int
61
+ "last_update" timestamp
62
+ }
63
+
64
+ Table "address" {
65
+ "id" int [pk]
66
+ "address" varchar
67
+ "address2" varchar
68
+ "district" varchar
69
+ "city_id" int
70
+ "postal_code" varchar
71
+ "phone" varchar
72
+ "last_update" timestamp
73
+ }
74
+
75
+ Table "customer" {
76
+ "id" int [pk]
77
+ "store_id" int
78
+ "first_name" varchar
79
+ "last_name" varchar
80
+ "email" varchar
81
+ "address_id" int
82
+ "active" boolean
83
+ "create_Date" timestamp
84
+ "last_update" timestamp
85
+
86
+ Indexes {
87
+ (id, first_name) [type: btree]
88
+ }
89
+ }
90
+
91
+ Ref:"country"."id" < "city"."country_id"
92
+
93
+ Ref:"city"."id" < "address"."city_id"
94
+
95
+ Ref:"address"."id" < "customer"."address_id"
96
+ Table "category" {
97
+ "id" int [pk]
98
+ "name" varchar
99
+ "last_update" timestamp
100
+ }
101
+
102
+ Table "film_category" {
103
+ "id" int [pk]
104
+ "category_id" int
105
+ "last_update" timestamp
106
+ }
107
+
108
+ Table "language" {
109
+ "id" int [pk]
110
+ "name" varchar
111
+ "last_update" timestamp
112
+ }
113
+
114
+ Table "film_text" {
115
+ "id" int [pk]
116
+ "film_id" int
117
+ "title" varchar
118
+ "description" text
119
+ }
120
+
121
+ Table "actor" {
122
+ "id" int [pk]
123
+ "first_name" varchar
124
+ "last_name" varchar
125
+ "last_update" timestamp
126
+ }
127
+
128
+ Table "film" {
129
+ "id" int [pk]
130
+ "title" varchar
131
+ "description" text
132
+ "releaase_year" int
133
+ "language_id" int
134
+ "original_language_id" int
135
+ "rental_duration" int
136
+ "rental_rate" decimal
137
+ "length" int
138
+ "replacement_cost" decimal
139
+ "rating" varchar
140
+ "special_feature" varchar
141
+ "last_update" timestamp
142
+ }
143
+
144
+ Table "film_actor" {
145
+ "id" int [pk]
146
+ "film_id" int
147
+ "actor_id" int
148
+ "last_update" timestamp
149
+ }
150
+
151
+ Table "inventory" {
152
+ "id" int [pk]
153
+ "film_id" int
154
+ "store_id" int
155
+ "last_update" timestamp
156
+ }
157
+
158
+ Ref:"category"."id" < "film_category"."category_id"
159
+
160
+ Ref:"inventory"."film_id" < "film_text"."film_id"
161
+
162
+ Ref:"language"."id" < "film"."language_id"
163
+
164
+ Ref:"language"."id" < "film"."original_language_id"
165
+
166
+ Ref:"film"."id" < "film_actor"."film_id"
167
+
168
+ Ref:"actor"."id" < "film_actor"."actor_id"
169
+
170
+ Ref:"film"."id" < "inventory"."film_id"
@@ -0,0 +1,58 @@
1
+ Table "users" {
2
+ "id" int [pk]
3
+ "name" nvarchar(255)
4
+ "pjs" nvarchar(255) [not null, check: `[pjs] IN ('created2', 'running2', 'done2', 'failure2')`]
5
+ "pjs2" nvarchar(255) [not null, check: `[pjs2] IN ('created2', 'running2', 'done2', 'failure2')`]
6
+ "pg" nvarchar(255) [not null, check: `[pg] IN ('male', 'female')`]
7
+ "pg2" nvarchar(255) [not null, check: `[pg2] IN ('male2', 'female2')`]
8
+ }
9
+
10
+ Table "products" {
11
+ "id" int [pk]
12
+ "name" nvarchar(255) [note: 'Product name']
13
+ }
14
+
15
+ Ref:"schemaA"."locations"."id" < "schemaA"."products"."lid"
16
+
17
+ Ref "FK_1":"schemaA"."locations"."id" < "schemaA"."products"."lid2"
18
+
19
+ Ref:"users"."id" < "ecommerce"."users"."id"
20
+
21
+ Ref "name_optional":"users"."name" < "ecommerce"."users"."id"
22
+
23
+ Ref:"ecommerce"."users"."id" < "schemaA"."products"."name"
24
+
25
+ Ref:"users"."id" < "schemaA"."locations"."name"
26
+
27
+ Table "ecommerce"."users" {
28
+ "id" int [pk]
29
+ "name" nvarchar(255)
30
+ "ejs" nvarchar(255) [not null, check: `[ejs] IN ('created2', 'running2', 'done2', 'failure2')`]
31
+ "ejs2" nvarchar(255) [not null, check: `[ejs2] IN ('created2', 'running2', 'done2', 'failure2')`]
32
+ "eg" nvarchar(255) [not null, check: `[eg] IN ('male', 'female')`]
33
+ "eg2" nvarchar(255) [not null, check: `[eg2] IN ('male2', 'female2')`]
34
+
35
+ Indexes {
36
+ (name, ejs) [name: "idx_1"]
37
+ }
38
+ Note: 'Note on table users of schema ecommerce'
39
+ }
40
+
41
+ Table "schemaA"."products" {
42
+ "id" int [pk]
43
+ "name" nvarchar(255)
44
+ "created_at" varchar(255) [default: `now()`]
45
+ "lid" int
46
+ "lid2" int
47
+
48
+ Indexes {
49
+ (lid, lid2) [unique, name: "unique_lid_lid2"]
50
+ }
51
+ Note: 'Note on table products of schemaA'
52
+ }
53
+
54
+ Table "schemaA"."locations" {
55
+ "id" int [pk]
56
+ "name" nvarchar(255)
57
+ Note: 'This is a note in table "schemaA"."locations"'
58
+ }