@dbml/cli 2.3.1 → 2.4.2

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 (103) hide show
  1. package/__test__/cli.test.js +3 -1
  2. package/__test__/dbml2sql/filename --mysql --out-file/dbml-error.log +36 -0
  3. package/__test__/dbml2sql/filename --mysql --out-file/expect-out-files/schema.sql +4 -4
  4. package/__test__/dbml2sql/filename --mysql --out-file/out-files/schema.sql +65 -0
  5. package/__test__/dbml2sql/filename --mysql stdout/dbml-error.log +0 -0
  6. package/__test__/dbml2sql/filename --mysql stdout/stdout.txt +4 -4
  7. package/__test__/dbml2sql/filename --out-file/dbml-error.log +36 -0
  8. package/__test__/dbml2sql/filename --out-file/expect-out-files/schema.sql +4 -4
  9. package/__test__/dbml2sql/filename --out-file/out-files/schema.sql +77 -0
  10. package/__test__/dbml2sql/filename --postgres --out-file/dbml-error.log +24 -0
  11. package/__test__/dbml2sql/filename --postgres --out-file/expect-out-files/schema.sql +4 -4
  12. package/__test__/dbml2sql/filename --postgres --out-file/out-files/schema.sql +77 -0
  13. package/__test__/dbml2sql/filename --postgres stdout/dbml-error.log +0 -0
  14. package/__test__/dbml2sql/filename --postgres stdout/stdout.txt +4 -4
  15. package/__test__/dbml2sql/filename stdout/dbml-error.log +0 -0
  16. package/__test__/dbml2sql/filename stdout/stdout.txt +4 -4
  17. package/__test__/dbml2sql/filenames --mysql --out-file/dbml-error.log +24 -0
  18. package/__test__/dbml2sql/filenames --mysql --out-file/expect-out-files/schema.sql +2 -2
  19. package/__test__/dbml2sql/filenames --mysql --out-file/out-files/schema.sql +172 -0
  20. package/__test__/dbml2sql/filenames --mysql stdout/dbml-error.log +0 -0
  21. package/__test__/dbml2sql/filenames --mysql stdout/stdout.txt +2 -2
  22. package/__test__/dbml2sql/filenames --out-file/dbml-error.log +24 -0
  23. package/__test__/dbml2sql/filenames --out-file/expect-out-files/schema.sql +2 -2
  24. package/__test__/dbml2sql/filenames --out-file/out-files/schema.sql +172 -0
  25. package/__test__/dbml2sql/filenames --postgres --out-file/dbml-error.log +24 -0
  26. package/__test__/dbml2sql/filenames --postgres --out-file/expect-out-files/schema.sql +2 -2
  27. package/__test__/dbml2sql/filenames --postgres --out-file/out-files/schema.sql +172 -0
  28. package/__test__/dbml2sql/filenames --postgres stdout/dbml-error.log +0 -0
  29. package/__test__/dbml2sql/filenames --postgres stdout/stdout.txt +2 -2
  30. package/__test__/dbml2sql/filenames stdout/dbml-error.log +0 -0
  31. package/__test__/dbml2sql/filenames stdout/stdout.txt +2 -2
  32. package/__test__/dbml2sql/multiple_schema_mssql/dbml-error.log +24 -0
  33. package/__test__/dbml2sql/multiple_schema_mssql/expect-out-files/multiple_schema.out.sql +58 -0
  34. package/__test__/dbml2sql/multiple_schema_mssql/in-files/multiple_schema.in.dbml +62 -0
  35. package/__test__/dbml2sql/multiple_schema_mssql/options.json +8 -0
  36. package/__test__/dbml2sql/multiple_schema_mssql/out-files/multiple_schema.out.sql +62 -0
  37. package/__test__/dbml2sql/multiple_schema_mssql/stdout.txt +1 -0
  38. package/__test__/dbml2sql/multiple_schema_mysql/dbml-error.log +24 -0
  39. package/__test__/dbml2sql/multiple_schema_mysql/expect-out-files/multiple_schema.out.sql +46 -0
  40. package/__test__/dbml2sql/multiple_schema_mysql/in-files/multiple_schema.in.dbml +62 -0
  41. package/__test__/dbml2sql/multiple_schema_mysql/options.json +8 -0
  42. package/__test__/dbml2sql/multiple_schema_mysql/out-files/multiple_schema.out.sql +50 -0
  43. package/__test__/dbml2sql/multiple_schema_mysql/stdout.txt +1 -0
  44. package/__test__/dbml2sql/multiple_schema_pg/dbml-error.log +24 -0
  45. package/__test__/dbml2sql/multiple_schema_pg/expect-out-files/multiple_schema.out.sql +63 -0
  46. package/__test__/dbml2sql/multiple_schema_pg/in-files/multiple_schema.in.dbml +62 -0
  47. package/__test__/dbml2sql/multiple_schema_pg/options.json +8 -0
  48. package/__test__/dbml2sql/multiple_schema_pg/out-files/multiple_schema.out.sql +67 -0
  49. package/__test__/dbml2sql/multiple_schema_pg/stdout.txt +1 -0
  50. package/__test__/dbml2sql/syntax-error/dbml-error.log +2025 -0
  51. package/__test__/sql2dbml/filename --mssql --out-file/dbml-error.log +51 -0
  52. package/__test__/sql2dbml/filename --mssql --out-file/expect-out-files/schema.dbml +25 -0
  53. package/__test__/sql2dbml/filename --mssql --out-file/in-files/schema.sql +20 -0
  54. package/__test__/sql2dbml/filename --mssql --out-file/options.json +8 -0
  55. package/__test__/sql2dbml/filename --mssql --out-file/out-files/schema.dbml +25 -0
  56. package/__test__/sql2dbml/filename --mssql --out-file/stdout.txt +1 -0
  57. package/__test__/sql2dbml/filename --mysql --out-file/dbml-error.log +24 -0
  58. package/__test__/sql2dbml/filename --mysql --out-file/out-files/schema.dbml +74 -0
  59. package/__test__/sql2dbml/filename --mysql stdout/dbml-error.log +0 -0
  60. package/__test__/sql2dbml/filename --out-file/dbml-error.log +24 -0
  61. package/__test__/sql2dbml/filename --out-file/out-files/schema.dbml +74 -0
  62. package/__test__/sql2dbml/filename --postgres --out-file/dbml-error.log +24 -0
  63. package/__test__/sql2dbml/filename --postgres --out-file/out-files/schema.dbml +74 -0
  64. package/__test__/sql2dbml/filename --postgres stdout/dbml-error.log +0 -0
  65. package/__test__/sql2dbml/filename stdout/dbml-error.log +0 -0
  66. package/__test__/sql2dbml/filenames --mysql --out-file/dbml-error.log +24 -0
  67. package/__test__/sql2dbml/filenames --mysql --out-file/out-files/schema.dbml +170 -0
  68. package/__test__/sql2dbml/filenames --mysql stdout/dbml-error.log +0 -0
  69. package/__test__/sql2dbml/filenames --out-file/dbml-error.log +24 -0
  70. package/__test__/sql2dbml/filenames --out-file/out-files/schema.dbml +170 -0
  71. package/__test__/sql2dbml/filenames --postgres --out-file/dbml-error.log +24 -0
  72. package/__test__/sql2dbml/filenames --postgres --out-file/out-files/schema.dbml +170 -0
  73. package/__test__/sql2dbml/filenames --postgres stdout/dbml-error.log +0 -0
  74. package/__test__/sql2dbml/filenames stdout/dbml-error.log +0 -0
  75. package/__test__/sql2dbml/multiple_schema_mssql/dbml-error.log +121 -0
  76. package/__test__/sql2dbml/multiple_schema_mssql/expect-out-files/multiple_schema.out.dbml +106 -0
  77. package/__test__/sql2dbml/multiple_schema_mssql/in-files/multiple_schema.in.sql +100 -0
  78. package/__test__/sql2dbml/multiple_schema_mssql/options.json +8 -0
  79. package/__test__/sql2dbml/multiple_schema_mssql/out-files/multiple_schema.out.dbml +106 -0
  80. package/__test__/sql2dbml/multiple_schema_mssql/stdout.txt +1 -0
  81. package/__test__/sql2dbml/multiple_schema_mysql/dbml-error.log +104 -0
  82. package/__test__/sql2dbml/multiple_schema_mysql/expect-out-files/multiple_schema.out.dbml +93 -0
  83. package/__test__/sql2dbml/multiple_schema_mysql/in-files/multiple_schema.in.sql +48 -0
  84. package/__test__/sql2dbml/multiple_schema_mysql/options.json +8 -0
  85. package/__test__/sql2dbml/multiple_schema_mysql/out-files/multiple_schema.out.dbml +93 -0
  86. package/__test__/sql2dbml/multiple_schema_mysql/stdout.txt +1 -0
  87. package/__test__/sql2dbml/multiple_schema_pg/dbml-error.log +131 -0
  88. package/__test__/sql2dbml/multiple_schema_pg/expect-out-files/multiple_schema.out.dbml +70 -0
  89. package/__test__/sql2dbml/multiple_schema_pg/in-files/multiple_schema.in.sql +77 -0
  90. package/__test__/sql2dbml/multiple_schema_pg/options.json +8 -0
  91. package/__test__/sql2dbml/multiple_schema_pg/out-files/multiple_schema.out.dbml +70 -0
  92. package/__test__/sql2dbml/multiple_schema_pg/stdout.txt +1 -0
  93. package/__test__/sql2dbml/syntax-error/dbml-error.log +1998 -0
  94. package/bin/dbml2sql.js +0 -0
  95. package/bin/sql2dbml.js +0 -0
  96. package/dbml-error.log +1142 -0
  97. package/lib/cli/export.js +1 -1
  98. package/lib/cli/import.js +1 -1
  99. package/lib/cli/index.js +1 -1
  100. package/package.json +4 -4
  101. package/src/cli/export.js +1 -1
  102. package/src/cli/import.js +1 -1
  103. package/src/cli/index.js +1 -0
@@ -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,24 @@
1
+ 2021-07-13T12:38:13.115Z
2
+ TypeError: Cannot read property 'tick' of undefined
3
+ at importHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\import.js:31:56)
4
+ at sql2dbml (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:34:3)
5
+ at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\sql2dbml_bin.js:5:1)
6
+ at Module._compile (internal/modules/cjs/loader.js:1085:14)
7
+ at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
8
+ at Module.load (internal/modules/cjs/loader.js:950:32)
9
+ at Function.Module._load (internal/modules/cjs/loader.js:790:14)
10
+ at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
11
+ at internal/main/run_main_module.js:17:47
12
+
13
+ 2021-07-13T12:58:44.084Z
14
+ TypeError: Cannot read property 'tick' of undefined
15
+ at importHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\import.js:31:49)
16
+ at sql2dbml (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:34:3)
17
+ at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\sql2dbml_bin.js:5:1)
18
+ at Module._compile (internal/modules/cjs/loader.js:1085:14)
19
+ at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
20
+ at Module.load (internal/modules/cjs/loader.js:950:32)
21
+ at Function.Module._load (internal/modules/cjs/loader.js:790:14)
22
+ at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
23
+ at internal/main/run_main_module.js:17:47
24
+
@@ -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,121 @@
1
+ 2021-07-13T12:38:03.040Z
2
+ TypeError: Cannot read property 'tick' of undefined
3
+ at importHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\import.js:31:56)
4
+ at sql2dbml (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:34:3)
5
+ at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\sql2dbml_bin.js:5:1)
6
+ at Module._compile (internal/modules/cjs/loader.js:1085:14)
7
+ at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
8
+ at Module.load (internal/modules/cjs/loader.js:950:32)
9
+ at Function.Module._load (internal/modules/cjs/loader.js:790:14)
10
+ at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
11
+ at internal/main/run_main_module.js:17:47
12
+
13
+ 2021-07-13T12:58:37.527Z
14
+ TypeError: Cannot read property 'tick' of undefined
15
+ at importHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\import.js:31:49)
16
+ at sql2dbml (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:34:3)
17
+ at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\sql2dbml_bin.js:5:1)
18
+ at Module._compile (internal/modules/cjs/loader.js:1085:14)
19
+ at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
20
+ at Module.load (internal/modules/cjs/loader.js:950:32)
21
+ at Function.Module._load (internal/modules/cjs/loader.js:790:14)
22
+ at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
23
+ at internal/main/run_main_module.js:17:47
24
+
25
+ 2022-02-22T10:50:34.012Z
26
+ Error: ENOENT: no such file or directory, stat 'C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\sql2dbml\multiple_schema_pg\in-files\multiple_schema.in.sql'
27
+ at Proxy.statSync (fs.js:932:3)
28
+ at validateFilePlugin (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\validatePlugins\validatePlugins.js:4:19)
29
+ at C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\utils.js:13:33
30
+ at Array.every (<anonymous>)
31
+ at validateInputFilePaths (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\utils.js:13:16)
32
+ at importHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\import.js:20:5)
33
+ at sql2dbml (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:35:3)
34
+ at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\sql2dbml_bin.js:5:1)
35
+ at Module._compile (internal/modules/cjs/loader.js:1158:30)
36
+ at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
37
+
38
+ 2022-02-22T10:52:21.941Z
39
+ Error: ENOENT: no such file or directory, stat 'C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\sql2dbml\multiple_schema_pg\in-files\multiple_schema.in.sql'
40
+ at Proxy.statSync (fs.js:932:3)
41
+ at validateFilePlugin (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\validatePlugins\validatePlugins.js:4:19)
42
+ at C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\utils.js:13:33
43
+ at Array.every (<anonymous>)
44
+ at validateInputFilePaths (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\utils.js:13:16)
45
+ at importHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\import.js:20:5)
46
+ at sql2dbml (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:35:3)
47
+ at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\sql2dbml_bin.js:5:1)
48
+ at Module._compile (internal/modules/cjs/loader.js:1158:30)
49
+ at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
50
+
51
+ 2022-02-22T10:55:55.159Z
52
+ SyntaxError: You have a syntax error at "multiple_schema.in.sql" line 19 column 22. Expected space but "." found.
53
+ at C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\utils.js:42:13
54
+ at Array.forEach (<anonymous>)
55
+ at generate (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\utils.js:36:14)
56
+ at importHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\import.js:28:7)
57
+ at sql2dbml (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:35:3)
58
+ at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\sql2dbml_bin.js:5:1)
59
+ at Module._compile (internal/modules/cjs/loader.js:1158:30)
60
+ at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
61
+ at Module.load (internal/modules/cjs/loader.js:1002:32)
62
+ at Function.Module._load (internal/modules/cjs/loader.js:901:14)
63
+
64
+ ROOT_ERROR:
65
+ SyntaxError: Expected space but "." found.
66
+ at peg$buildStructuredError (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\node_modules\@dbml\core\lib\parse\postgresParser.js:34:6718)
67
+ at Object.peg$parse [as parse] (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\node_modules\@dbml\core\lib\parse\postgresParser.js:42:339)
68
+ at Function.parsePostgresToJSON (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\node_modules\@dbml\core\lib\parse\Parser.js:49:41)
69
+ at Function.parse (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\node_modules\@dbml\core\lib\parse\Parser.js:77:32)
70
+ at Object._import [as import] (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\node_modules\@dbml\core\lib\import\index.js:15:37)
71
+ at C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\import.js:28:52
72
+ at C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\utils.js:39:23
73
+ at Array.forEach (<anonymous>)
74
+ at generate (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\utils.js:36:14)
75
+ at importHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\import.js:28:7)
76
+ {"start":{"offset":250,"line":19,"column":22},"end":{"offset":251,"line":19,"column":23}}
77
+
78
+ 2022-02-22T10:57:22.482Z
79
+ SyntaxError: You have a syntax error at "multiple_schema.in.sql" line 19 column 22. Expected space but "." found.
80
+ at C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\utils.js:42:13
81
+ at Array.forEach (<anonymous>)
82
+ at generate (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\utils.js:36:14)
83
+ at importHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\import.js:28:7)
84
+ at sql2dbml (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:35:3)
85
+ at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\sql2dbml_bin.js:5:1)
86
+ at Module._compile (internal/modules/cjs/loader.js:1158:30)
87
+ at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
88
+ at Module.load (internal/modules/cjs/loader.js:1002:32)
89
+ at Function.Module._load (internal/modules/cjs/loader.js:901:14)
90
+
91
+ ROOT_ERROR:
92
+ SyntaxError: Expected space but "." found.
93
+ at peg$buildStructuredError (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\node_modules\@dbml\core\lib\parse\postgresParser.js:34:6718)
94
+ at Object.peg$parse [as parse] (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\node_modules\@dbml\core\lib\parse\postgresParser.js:42:339)
95
+ at Function.parsePostgresToJSON (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\node_modules\@dbml\core\lib\parse\Parser.js:49:41)
96
+ at Function.parse (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\node_modules\@dbml\core\lib\parse\Parser.js:77:32)
97
+ at Object._import [as import] (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\node_modules\@dbml\core\lib\import\index.js:15:37)
98
+ at C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\import.js:28:52
99
+ at C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\utils.js:39:23
100
+ at Array.forEach (<anonymous>)
101
+ at generate (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\utils.js:36:14)
102
+ at importHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\import.js:28:7)
103
+ {"start":{"offset":250,"line":19,"column":22},"end":{"offset":251,"line":19,"column":23}}
104
+
105
+ 2022-04-26T04:43:56.219Z
106
+ SyntaxError: You have a syntax error at "multiple_schema.in.sql" line 73 column 1. Expected ";", "ADD", "ALTER", "BACKUP", "BEGIN", "BULK INSERT", "CLOSE", "COLLATE", "CREATE", "DELETE", "DENY", "DISABLE", "DROP", "ENABLE", "END", "EXECUTE", "GO", "GRANT", "IF", "INSERT", "MERGE", "MOVE", "OPEN", "RECEIVE", "RENAME", "RESTORE", "REVOKE", "SEND", "SET", "TRUNCATE TABLE", "UPDATE", EOF, comments, or whitespaces but "E" found.
107
+ at C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\utils.js:42:13
108
+ at Array.forEach (<anonymous>)
109
+ at generate (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\utils.js:36:14)
110
+ at importHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\import.js:28:7)
111
+ at sql2dbml (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:35:3)
112
+ at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\sql2dbml_bin.js:5:1)
113
+ at Module._compile (internal/modules/cjs/loader.js:1158:30)
114
+ at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
115
+ at Module.load (internal/modules/cjs/loader.js:1002:32)
116
+ at Function.Module._load (internal/modules/cjs/loader.js:901:14)
117
+
118
+ ROOT_ERROR:
119
+ undefined
120
+ {"start":{"offset":1944,"line":73,"column":1}}
121
+
@@ -0,0 +1,106 @@
1
+ Enum "users_pjs_enum" {
2
+ "created2"
3
+ "running2"
4
+ "done2"
5
+ "failure2"
6
+ }
7
+
8
+ Enum "users_pjs2_enum" {
9
+ "created2"
10
+ "running2"
11
+ "done2"
12
+ "failure2"
13
+ }
14
+
15
+ Enum "users_pg_enum" {
16
+ "male"
17
+ "female"
18
+ }
19
+
20
+ Enum "users_pg2_enum" {
21
+ "male2"
22
+ "female2"
23
+ }
24
+
25
+ Enum "ecommerce_users_ejs_enum" {
26
+ "created2"
27
+ "running2"
28
+ "done2"
29
+ "failure2"
30
+ }
31
+
32
+ Enum "ecommerce_users_ejs2_enum" {
33
+ "created2"
34
+ "running2"
35
+ "done2"
36
+ "failure2"
37
+ }
38
+
39
+ Enum "ecommerce_users_eg_enum" {
40
+ "male"
41
+ "female"
42
+ }
43
+
44
+ Enum "ecommerce_users_eg2_enum" {
45
+ "male2"
46
+ "female2"
47
+ }
48
+
49
+ Table "users" {
50
+ "id" int [pk]
51
+ "name" nvarchar(255)
52
+ "pjs" users_pjs_enum [not null]
53
+ "pjs2" users_pjs2_enum [not null]
54
+ "pg" users_pg_enum [not null]
55
+ "pg2" users_pg2_enum [not null]
56
+ }
57
+
58
+ Table "products" {
59
+ "id" int [pk]
60
+ "name" nvarchar(255) [note: 'Product name']
61
+ }
62
+
63
+ Ref:"schemaA"."locations"."id" < "schemaA"."products"."lid"
64
+
65
+ Ref "FK_1":"schemaA"."locations"."id" < "schemaA"."products"."lid2"
66
+
67
+ Ref:"users"."id" < "ecommerce"."users"."id"
68
+
69
+ Ref "name_optional":"users"."name" < "ecommerce"."users"."id"
70
+
71
+ Ref:"ecommerce"."users"."id" < "schemaA"."products"."name"
72
+
73
+ Ref:"users"."id" < "schemaA"."locations"."name"
74
+
75
+ Table "ecommerce"."users" {
76
+ "id" int [pk]
77
+ "name" nvarchar(255)
78
+ "ejs" ecommerce_users_ejs_enum [not null]
79
+ "ejs2" ecommerce_users_ejs2_enum [not null]
80
+ "eg" ecommerce_users_eg_enum [not null]
81
+ "eg2" ecommerce_users_eg2_enum [not null]
82
+
83
+ Indexes {
84
+ (name, ejs) [name: "idx_1"]
85
+ }
86
+ Note: 'Note on table users of schema ecommerce'
87
+ }
88
+
89
+ Table "schemaA"."products" {
90
+ "id" int [pk]
91
+ "name" nvarchar(255)
92
+ "created_at" varchar(255) [default: `now()`]
93
+ "lid" int
94
+ "lid2" int
95
+
96
+ Indexes {
97
+ (lid, lid2) [unique, name: "unique_lid_lid2"]
98
+ }
99
+ Note: 'Note on table products of schemaA'
100
+ }
101
+
102
+ Table "schemaA"."locations" {
103
+ "id" int [pk]
104
+ "name" nvarchar(255)
105
+ Note: 'This is a note in table "schemaA"."locations"'
106
+ }