@dbml/cli 11.0.0-alpha.6 → 11.0.1-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 (352) hide show
  1. package/LICENSE +0 -0
  2. package/README.md +0 -0
  3. package/__tests__/cli.test.ts +0 -0
  4. package/__tests__/db2dbml/mssql/options.json +0 -0
  5. package/__tests__/db2dbml/mssql/schema.sql +0 -0
  6. package/__tests__/db2dbml/mssql/stdout.txt +0 -0
  7. package/__tests__/db2dbml/mysql/options.json +0 -0
  8. package/__tests__/db2dbml/mysql/schema.sql +0 -0
  9. package/__tests__/db2dbml/mysql/stdout.txt +0 -0
  10. package/__tests__/db2dbml/oracle/options.json +0 -0
  11. package/__tests__/db2dbml/oracle/schema.sql +0 -0
  12. package/__tests__/db2dbml/oracle/stdout.txt +0 -0
  13. package/__tests__/db2dbml/postgres/options.json +0 -0
  14. package/__tests__/db2dbml/postgres/schema.sql +0 -0
  15. package/__tests__/db2dbml/postgres/stdout.txt +0 -0
  16. package/__tests__/db2dbml_bin.js +0 -0
  17. package/__tests__/dbml2sql/filename --mysql --out-file/expect-out-files/schema.sql +0 -0
  18. package/__tests__/dbml2sql/filename --mysql --out-file/in-files/schema.dbml +0 -0
  19. package/__tests__/dbml2sql/filename --mysql --out-file/options.json +0 -0
  20. package/__tests__/dbml2sql/filename --mysql --out-file/stdout.txt +0 -0
  21. package/__tests__/dbml2sql/filename --mysql stdout/in-files/schema.dbml +0 -0
  22. package/__tests__/dbml2sql/filename --mysql stdout/options.json +0 -0
  23. package/__tests__/dbml2sql/filename --mysql stdout/stdout.txt +0 -0
  24. package/__tests__/dbml2sql/filename --oracle --out-file/in-files/schema.dbml +0 -0
  25. package/__tests__/dbml2sql/filename --oracle --out-file/options.json +0 -0
  26. package/__tests__/dbml2sql/filename --oracle --out-file/stdout.txt +0 -0
  27. package/__tests__/dbml2sql/filename --oracle stdout/in-files/schema.dbml +0 -0
  28. package/__tests__/dbml2sql/filename --oracle stdout/options.json +0 -0
  29. package/__tests__/dbml2sql/filename --out-file/expect-out-files/schema.sql +0 -0
  30. package/__tests__/dbml2sql/filename --out-file/in-files/schema.dbml +0 -0
  31. package/__tests__/dbml2sql/filename --out-file/options.json +0 -0
  32. package/__tests__/dbml2sql/filename --out-file/stdout.txt +0 -0
  33. package/__tests__/dbml2sql/filename --postgres --out-file/expect-out-files/schema.sql +0 -0
  34. package/__tests__/dbml2sql/filename --postgres --out-file/in-files/schema.dbml +0 -0
  35. package/__tests__/dbml2sql/filename --postgres --out-file/options.json +0 -0
  36. package/__tests__/dbml2sql/filename --postgres --out-file/stdout.txt +0 -0
  37. package/__tests__/dbml2sql/filename --postgres stdout/in-files/schema.dbml +0 -0
  38. package/__tests__/dbml2sql/filename --postgres stdout/options.json +0 -0
  39. package/__tests__/dbml2sql/filename --postgres stdout/stdout.txt +0 -0
  40. package/__tests__/dbml2sql/filename stdout/in-files/schema.dbml +0 -0
  41. package/__tests__/dbml2sql/filename stdout/options.json +0 -0
  42. package/__tests__/dbml2sql/filename stdout/stdout.txt +0 -0
  43. package/__tests__/dbml2sql/filenames --mysql --out-file/expect-out-files/schema.sql +0 -0
  44. package/__tests__/dbml2sql/filenames --mysql --out-file/in-files/business.dbml +0 -0
  45. package/__tests__/dbml2sql/filenames --mysql --out-file/in-files/customer.dbml +0 -0
  46. package/__tests__/dbml2sql/filenames --mysql --out-file/in-files/inventory.dbml +0 -0
  47. package/__tests__/dbml2sql/filenames --mysql --out-file/options.json +0 -0
  48. package/__tests__/dbml2sql/filenames --mysql --out-file/stdout.txt +0 -0
  49. package/__tests__/dbml2sql/filenames --mysql stdout/in-files/business.dbml +0 -0
  50. package/__tests__/dbml2sql/filenames --mysql stdout/in-files/customer.dbml +0 -0
  51. package/__tests__/dbml2sql/filenames --mysql stdout/in-files/inventory.dbml +0 -0
  52. package/__tests__/dbml2sql/filenames --mysql stdout/options.json +0 -0
  53. package/__tests__/dbml2sql/filenames --mysql stdout/stdout.txt +0 -0
  54. package/__tests__/dbml2sql/filenames --oracle --out-file/expect-out-files/schema.sql +0 -0
  55. package/__tests__/dbml2sql/filenames --oracle --out-file/in-files/business.dbml +0 -0
  56. package/__tests__/dbml2sql/filenames --oracle --out-file/in-files/customer.dbml +0 -0
  57. package/__tests__/dbml2sql/filenames --oracle --out-file/in-files/inventory.dbml +0 -0
  58. package/__tests__/dbml2sql/filenames --oracle --out-file/options.json +0 -0
  59. package/__tests__/dbml2sql/filenames --oracle --out-file/stdout.txt +0 -0
  60. package/__tests__/dbml2sql/filenames --oracle stdout/in-files/business.dbml +0 -0
  61. package/__tests__/dbml2sql/filenames --oracle stdout/in-files/customer.dbml +0 -0
  62. package/__tests__/dbml2sql/filenames --oracle stdout/in-files/inventory.dbml +0 -0
  63. package/__tests__/dbml2sql/filenames --oracle stdout/options.json +0 -0
  64. package/__tests__/dbml2sql/filenames --oracle stdout/stdout.txt +0 -0
  65. package/__tests__/dbml2sql/filenames --out-file/expect-out-files/schema.sql +0 -0
  66. package/__tests__/dbml2sql/filenames --out-file/in-files/business.dbml +0 -0
  67. package/__tests__/dbml2sql/filenames --out-file/in-files/customer.dbml +0 -0
  68. package/__tests__/dbml2sql/filenames --out-file/in-files/inventory.dbml +0 -0
  69. package/__tests__/dbml2sql/filenames --out-file/options.json +0 -0
  70. package/__tests__/dbml2sql/filenames --out-file/stdout.txt +0 -0
  71. package/__tests__/dbml2sql/filenames --postgres --out-file/expect-out-files/schema.sql +0 -0
  72. package/__tests__/dbml2sql/filenames --postgres --out-file/in-files/business.dbml +0 -0
  73. package/__tests__/dbml2sql/filenames --postgres --out-file/in-files/customer.dbml +0 -0
  74. package/__tests__/dbml2sql/filenames --postgres --out-file/in-files/inventory.dbml +0 -0
  75. package/__tests__/dbml2sql/filenames --postgres --out-file/options.json +0 -0
  76. package/__tests__/dbml2sql/filenames --postgres --out-file/stdout.txt +0 -0
  77. package/__tests__/dbml2sql/filenames --postgres stdout/in-files/business.dbml +0 -0
  78. package/__tests__/dbml2sql/filenames --postgres stdout/in-files/customer.dbml +0 -0
  79. package/__tests__/dbml2sql/filenames --postgres stdout/in-files/inventory.dbml +0 -0
  80. package/__tests__/dbml2sql/filenames --postgres stdout/options.json +0 -0
  81. package/__tests__/dbml2sql/filenames --postgres stdout/stdout.txt +0 -0
  82. package/__tests__/dbml2sql/filenames stdout/in-files/business.dbml +0 -0
  83. package/__tests__/dbml2sql/filenames stdout/in-files/customer.dbml +0 -0
  84. package/__tests__/dbml2sql/filenames stdout/in-files/inventory.dbml +0 -0
  85. package/__tests__/dbml2sql/filenames stdout/options.json +0 -0
  86. package/__tests__/dbml2sql/filenames stdout/stdout.txt +0 -0
  87. package/{__test__/dbml2sql/filename --mysql stdout → __tests__/dbml2sql/multifile --postgres stdout}/dbml-error.log +0 -0
  88. package/__tests__/dbml2sql/multifile --postgres stdout/in-files/main.dbml +2 -0
  89. package/__tests__/dbml2sql/multifile --postgres stdout/in-files/sub/orders.dbml +6 -0
  90. package/__tests__/dbml2sql/multifile --postgres stdout/in-files/types.dbml +4 -0
  91. package/__tests__/dbml2sql/multifile --postgres stdout/options.json +6 -0
  92. package/__tests__/dbml2sql/multifile --postgres stdout/stdout.txt +12 -0
  93. package/{__test__/dbml2sql/filename --oracle --out-file → __tests__/dbml2sql/multifile aliased import stdout}/dbml-error.log +0 -0
  94. package/__tests__/dbml2sql/multifile aliased import stdout/in-files/auth.dbml +0 -0
  95. package/__tests__/dbml2sql/multifile aliased import stdout/in-files/main.dbml +0 -0
  96. package/__tests__/dbml2sql/multifile aliased import stdout/options.json +0 -0
  97. package/__tests__/dbml2sql/multifile aliased import stdout/stdout.txt +0 -0
  98. package/{__test__/dbml2sql/filename --oracle stdout → __tests__/dbml2sql/multifile circular import stdout}/dbml-error.log +0 -0
  99. package/__tests__/dbml2sql/multifile circular import stdout/in-files/a.dbml +0 -0
  100. package/__tests__/dbml2sql/multifile circular import stdout/in-files/b.dbml +0 -0
  101. package/__tests__/dbml2sql/multifile circular import stdout/options.json +0 -0
  102. package/__tests__/dbml2sql/multifile circular import stdout/stdout.txt +0 -0
  103. package/{__test__/dbml2sql/filename --postgres stdout → __tests__/dbml2sql/multifile complex stdout}/dbml-error.log +0 -0
  104. package/__tests__/dbml2sql/multifile complex stdout/in-files/auth.dbml +0 -0
  105. package/__tests__/dbml2sql/multifile complex stdout/in-files/catalog.dbml +0 -0
  106. package/__tests__/dbml2sql/multifile complex stdout/in-files/enums.dbml +0 -0
  107. package/__tests__/dbml2sql/multifile complex stdout/in-files/main.dbml +0 -0
  108. package/__tests__/dbml2sql/multifile complex stdout/options.json +0 -0
  109. package/__tests__/dbml2sql/multifile complex stdout/stdout.txt +0 -0
  110. package/__tests__/dbml2sql/multifile error entry-syntax-error/dbml-error.log +5 -0
  111. package/__tests__/dbml2sql/multifile error entry-syntax-error/in-files/lib.dbml +0 -0
  112. package/__tests__/dbml2sql/multifile error entry-syntax-error/in-files/main.dbml +0 -0
  113. package/__tests__/dbml2sql/multifile error entry-syntax-error/options.json +0 -0
  114. package/__tests__/dbml2sql/multifile error entry-syntax-error/stdout.txt +1 -1
  115. package/__tests__/dbml2sql/multifile error import-not-found/dbml-error.log +446 -0
  116. package/__tests__/dbml2sql/multifile error import-not-found/in-files/main.dbml +0 -0
  117. package/__tests__/dbml2sql/multifile error import-not-found/options.json +0 -0
  118. package/__tests__/dbml2sql/multifile error import-not-found/stdout.txt +0 -0
  119. package/__tests__/dbml2sql/multifile error imported-syntax-error/dbml-error.log +5 -0
  120. package/__tests__/dbml2sql/multifile error imported-syntax-error/in-files/broken.dbml +0 -0
  121. package/__tests__/dbml2sql/multifile error imported-syntax-error/in-files/main.dbml +0 -0
  122. package/__tests__/dbml2sql/multifile error imported-syntax-error/options.json +0 -0
  123. package/__tests__/dbml2sql/multifile error imported-syntax-error/stdout.txt +1 -1
  124. package/__tests__/dbml2sql/multifile error transitive-use-not-visible/dbml-error.log +4 -0
  125. package/__tests__/dbml2sql/multifile error transitive-use-not-visible/in-files/base.dbml +0 -0
  126. package/__tests__/dbml2sql/multifile error transitive-use-not-visible/in-files/main.dbml +0 -0
  127. package/__tests__/dbml2sql/multifile error transitive-use-not-visible/in-files/types.dbml +0 -0
  128. package/__tests__/dbml2sql/multifile error transitive-use-not-visible/options.json +0 -0
  129. package/__tests__/dbml2sql/multifile error transitive-use-not-visible/stdout.txt +0 -0
  130. package/{__test__/dbml2sql/filename stdout → __tests__/dbml2sql/multifile records pulling stdout}/dbml-error.log +0 -0
  131. package/__tests__/dbml2sql/multifile records pulling stdout/in-files/base.dbml +0 -0
  132. package/__tests__/dbml2sql/multifile records pulling stdout/in-files/main.dbml +0 -0
  133. package/__tests__/dbml2sql/multifile records pulling stdout/options.json +0 -0
  134. package/__tests__/dbml2sql/multifile records pulling stdout/stdout.txt +0 -0
  135. package/{__test__/dbml2sql/filenames --mysql stdout → __tests__/dbml2sql/multifile refs across files stdout}/dbml-error.log +0 -0
  136. package/__tests__/dbml2sql/multifile refs across files stdout/in-files/main.dbml +0 -0
  137. package/__tests__/dbml2sql/multifile refs across files stdout/in-files/orders.dbml +0 -0
  138. package/__tests__/dbml2sql/multifile refs across files stdout/in-files/users.dbml +0 -0
  139. package/__tests__/dbml2sql/multifile refs across files stdout/options.json +0 -0
  140. package/__tests__/dbml2sql/multifile refs across files stdout/stdout.txt +0 -0
  141. package/{__test__/dbml2sql/filenames --oracle --out-file → __tests__/dbml2sql/multifile schema pulling stdout}/dbml-error.log +0 -0
  142. package/__tests__/dbml2sql/multifile schema pulling stdout/in-files/auth.dbml +0 -0
  143. package/__tests__/dbml2sql/multifile schema pulling stdout/in-files/main.dbml +0 -0
  144. package/__tests__/dbml2sql/multifile schema pulling stdout/options.json +0 -0
  145. package/__tests__/dbml2sql/multifile schema pulling stdout/stdout.txt +0 -0
  146. package/{__test__/dbml2sql/filenames --oracle stdout → __tests__/dbml2sql/multifile tablegroup pulling stdout}/dbml-error.log +0 -0
  147. package/__tests__/dbml2sql/multifile tablegroup pulling stdout/in-files/base.dbml +0 -0
  148. package/__tests__/dbml2sql/multifile tablegroup pulling stdout/in-files/main.dbml +0 -0
  149. package/__tests__/dbml2sql/multifile tablegroup pulling stdout/options.json +0 -0
  150. package/__tests__/dbml2sql/multifile tablegroup pulling stdout/stdout.txt +0 -0
  151. package/{__test__/dbml2sql/filenames --postgres stdout → __tests__/dbml2sql/multifile transitive reuse stdout}/dbml-error.log +0 -0
  152. package/__tests__/dbml2sql/multifile transitive reuse stdout/in-files/base.dbml +0 -0
  153. package/__tests__/dbml2sql/multifile transitive reuse stdout/in-files/main.dbml +0 -0
  154. package/__tests__/dbml2sql/multifile transitive reuse stdout/in-files/types.dbml +0 -0
  155. package/__tests__/dbml2sql/multifile transitive reuse stdout/options.json +0 -0
  156. package/__tests__/dbml2sql/multifile transitive reuse stdout/stdout.txt +0 -0
  157. package/__tests__/dbml2sql/multiple_schema_mssql/in-files/multiple_schema.in.dbml +0 -0
  158. package/__tests__/dbml2sql/multiple_schema_mssql/options.json +0 -0
  159. package/__tests__/dbml2sql/multiple_schema_mssql/stdout.txt +0 -0
  160. package/__tests__/dbml2sql/multiple_schema_mysql/expect-out-files/multiple_schema.out.sql +0 -0
  161. package/__tests__/dbml2sql/multiple_schema_mysql/in-files/multiple_schema.in.dbml +0 -0
  162. package/__tests__/dbml2sql/multiple_schema_mysql/options.json +0 -0
  163. package/__tests__/dbml2sql/multiple_schema_mysql/stdout.txt +0 -0
  164. package/__tests__/dbml2sql/multiple_schema_oracle/expect-out-files/multiple_schema.out.sql +0 -0
  165. package/__tests__/dbml2sql/multiple_schema_oracle/in-files/multiple_schema.in.dbml +0 -0
  166. package/__tests__/dbml2sql/multiple_schema_oracle/options.json +0 -0
  167. package/__tests__/dbml2sql/multiple_schema_oracle/stdout.txt +0 -0
  168. package/__tests__/dbml2sql/multiple_schema_pg/expect-out-files/multiple_schema.out.sql +0 -0
  169. package/__tests__/dbml2sql/multiple_schema_pg/in-files/multiple_schema.in.dbml +0 -0
  170. package/__tests__/dbml2sql/multiple_schema_pg/options.json +0 -0
  171. package/__tests__/dbml2sql/multiple_schema_pg/stdout.txt +0 -0
  172. package/__tests__/dbml2sql/single file stdout/in-files/schema.dbml +0 -0
  173. package/__tests__/dbml2sql/single file stdout/options.json +0 -0
  174. package/__tests__/dbml2sql/single file stdout/stdout.txt +0 -0
  175. package/__tests__/dbml2sql/syntax-error/in-files/ecommerce.dbml +0 -0
  176. package/__tests__/dbml2sql/syntax-error/options.json +0 -0
  177. package/__tests__/dbml2sql/syntax-error/stdout.txt +1 -1
  178. package/__tests__/dbml2sql_bin.js +0 -0
  179. package/__tests__/sql2dbml/custom-error-alter-table-column-not-found --oracle/in-files/schema.sql +0 -0
  180. package/__tests__/sql2dbml/custom-error-alter-table-column-not-found --oracle/options.json +0 -0
  181. package/__tests__/sql2dbml/custom-error-alter-table-column-not-found --oracle/stdout.txt +0 -0
  182. package/__tests__/sql2dbml/custom-error-alter-table-table-not-found --oracle/in-files/schema.sql +0 -0
  183. package/__tests__/sql2dbml/custom-error-alter-table-table-not-found --oracle/options.json +0 -0
  184. package/__tests__/sql2dbml/custom-error-alter-table-table-not-found --oracle/stdout.txt +0 -0
  185. package/__tests__/sql2dbml/custom-error-column-comment-column-not-found --oracle/in-files/schema.sql +0 -0
  186. package/__tests__/sql2dbml/custom-error-column-comment-column-not-found --oracle/options.json +0 -0
  187. package/__tests__/sql2dbml/custom-error-column-comment-column-not-found --oracle/stdout.txt +0 -0
  188. package/__tests__/sql2dbml/custom-error-column-comment-table-not-found --oracle/in-files/schema.sql +0 -0
  189. package/__tests__/sql2dbml/custom-error-column-comment-table-not-found --oracle/options.json +0 -0
  190. package/__tests__/sql2dbml/custom-error-column-comment-table-not-found --oracle/stdout.txt +0 -0
  191. package/__tests__/sql2dbml/custom-error-create-index-table-not-found --oracle/in-files/schema.sql +0 -0
  192. package/__tests__/sql2dbml/custom-error-create-index-table-not-found --oracle/options.json +0 -0
  193. package/__tests__/sql2dbml/custom-error-create-index-table-not-found --oracle/stdout.txt +0 -0
  194. package/__tests__/sql2dbml/custom-error-table-comment-table-not-found --oracle/in-files/schema.sql +0 -0
  195. package/__tests__/sql2dbml/custom-error-table-comment-table-not-found --oracle/options.json +0 -0
  196. package/__tests__/sql2dbml/custom-error-table-comment-table-not-found --oracle/stdout.txt +0 -0
  197. package/__tests__/sql2dbml/filename --mssql --out-file/expect-out-files/schema.dbml +0 -0
  198. package/__tests__/sql2dbml/filename --mssql --out-file/in-files/schema.sql +0 -0
  199. package/__tests__/sql2dbml/filename --mssql --out-file/options.json +0 -0
  200. package/__tests__/sql2dbml/filename --mssql --out-file/stdout.txt +0 -0
  201. package/__tests__/sql2dbml/filename --mysql --out-file/in-files/schema.sql +0 -0
  202. package/__tests__/sql2dbml/filename --mysql --out-file/options.json +0 -0
  203. package/__tests__/sql2dbml/filename --mysql --out-file/stdout.txt +0 -0
  204. package/__tests__/sql2dbml/filename --mysql stdout/in-files/schema.sql +0 -0
  205. package/__tests__/sql2dbml/filename --mysql stdout/options.json +0 -0
  206. package/__tests__/sql2dbml/filename --oracle --out-file/in-files/schema.sql +0 -0
  207. package/__tests__/sql2dbml/filename --oracle --out-file/options.json +0 -0
  208. package/__tests__/sql2dbml/filename --oracle --out-file/stdout.txt +0 -0
  209. package/__tests__/sql2dbml/filename --out-file/in-files/schema.sql +0 -0
  210. package/__tests__/sql2dbml/filename --out-file/options.json +0 -0
  211. package/__tests__/sql2dbml/filename --out-file/stdout.txt +0 -0
  212. package/__tests__/sql2dbml/filename --postgres --out-file/in-files/schema.sql +0 -0
  213. package/__tests__/sql2dbml/filename --postgres --out-file/options.json +0 -0
  214. package/__tests__/sql2dbml/filename --postgres --out-file/stdout.txt +0 -0
  215. package/__tests__/sql2dbml/filename --postgres stdout/in-files/schema.sql +0 -0
  216. package/__tests__/sql2dbml/filename --postgres stdout/options.json +0 -0
  217. package/__tests__/sql2dbml/filename --snowflake stdout/in-files/schema.sql +0 -0
  218. package/__tests__/sql2dbml/filename --snowflake stdout/options.json +0 -0
  219. package/__tests__/sql2dbml/filename stdout/in-files/schema.sql +0 -0
  220. package/__tests__/sql2dbml/filename stdout/options.json +0 -0
  221. package/__tests__/sql2dbml/filenames --mysql --out-file/in-files/business.sql +0 -0
  222. package/__tests__/sql2dbml/filenames --mysql --out-file/in-files/customer.sql +0 -0
  223. package/__tests__/sql2dbml/filenames --mysql --out-file/in-files/inventory.sql +0 -0
  224. package/__tests__/sql2dbml/filenames --mysql --out-file/options.json +0 -0
  225. package/__tests__/sql2dbml/filenames --mysql --out-file/stdout.txt +0 -0
  226. package/__tests__/sql2dbml/filenames --mysql stdout/in-files/business.sql +0 -0
  227. package/__tests__/sql2dbml/filenames --mysql stdout/in-files/customer.sql +0 -0
  228. package/__tests__/sql2dbml/filenames --mysql stdout/in-files/inventory.sql +0 -0
  229. package/__tests__/sql2dbml/filenames --mysql stdout/options.json +0 -0
  230. package/__tests__/sql2dbml/filenames --out-file/in-files/business.sql +0 -0
  231. package/__tests__/sql2dbml/filenames --out-file/in-files/customer.sql +0 -0
  232. package/__tests__/sql2dbml/filenames --out-file/in-files/inventory.sql +0 -0
  233. package/__tests__/sql2dbml/filenames --out-file/options.json +0 -0
  234. package/__tests__/sql2dbml/filenames --out-file/stdout.txt +0 -0
  235. package/__tests__/sql2dbml/filenames --postgres --out-file/in-files/business.sql +0 -0
  236. package/__tests__/sql2dbml/filenames --postgres --out-file/in-files/customer.sql +0 -0
  237. package/__tests__/sql2dbml/filenames --postgres --out-file/in-files/inventory.sql +0 -0
  238. package/__tests__/sql2dbml/filenames --postgres --out-file/options.json +0 -0
  239. package/__tests__/sql2dbml/filenames --postgres --out-file/stdout.txt +0 -0
  240. package/__tests__/sql2dbml/filenames --postgres stdout/in-files/business.sql +0 -0
  241. package/__tests__/sql2dbml/filenames --postgres stdout/in-files/customer.sql +0 -0
  242. package/__tests__/sql2dbml/filenames --postgres stdout/in-files/inventory.sql +0 -0
  243. package/__tests__/sql2dbml/filenames --postgres stdout/options.json +0 -0
  244. package/__tests__/sql2dbml/filenames stdout/in-files/business.sql +0 -0
  245. package/__tests__/sql2dbml/filenames stdout/in-files/customer.sql +0 -0
  246. package/__tests__/sql2dbml/filenames stdout/in-files/inventory.sql +0 -0
  247. package/__tests__/sql2dbml/filenames stdout/options.json +0 -0
  248. package/__tests__/sql2dbml/multiple_schema_mssql/options.json +0 -0
  249. package/__tests__/sql2dbml/multiple_schema_mssql/stdout.txt +0 -0
  250. package/__tests__/sql2dbml/multiple_schema_mysql/in-files/multiple_schema.in.sql +0 -0
  251. package/__tests__/sql2dbml/multiple_schema_mysql/options.json +0 -0
  252. package/__tests__/sql2dbml/multiple_schema_mysql/stdout.txt +0 -0
  253. package/__tests__/sql2dbml/multiple_schema_pg/in-files/multiple_schema.in.sql +0 -0
  254. package/__tests__/sql2dbml/multiple_schema_pg/options.json +0 -0
  255. package/__tests__/sql2dbml/multiple_schema_pg/stdout.txt +0 -0
  256. package/__tests__/sql2dbml/syntax-error/in-files/business.sql +0 -0
  257. package/__tests__/sql2dbml/syntax-error/options.json +0 -0
  258. package/__tests__/sql2dbml/syntax-error/stdout.txt +0 -0
  259. package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mssql/in-files/schema.sql +0 -0
  260. package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mssql/options.json +0 -0
  261. package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mssql/stdout.txt +0 -0
  262. package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mysql/in-files/schema.sql +0 -0
  263. package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mysql/options.json +0 -0
  264. package/__tests__/sql2dbml/syntax-error-duplicate-endpoints --mysql/stdout.txt +0 -0
  265. package/__tests__/sql2dbml_bin.js +0 -0
  266. package/__tests__/testHelpers.ts +0 -0
  267. package/__tests__/windows/multifile-backslash/in-files/main.dbml +2 -0
  268. package/__tests__/windows/multifile-backslash/in-files/sub/orders.dbml +6 -0
  269. package/__tests__/windows/multifile-backslash/in-files/types.dbml +4 -0
  270. package/__tests__/windows/multifile-backslash/options.json +6 -0
  271. package/__tests__/windows/multifile-backslash/stdout.txt +12 -0
  272. package/{__test__/dbml2sql/filenames stdout → __tests__/windows/multifile-relative}/dbml-error.log +0 -0
  273. package/__tests__/windows/multifile-relative/in-files/main.dbml +2 -0
  274. package/__tests__/windows/multifile-relative/in-files/sub/orders.dbml +6 -0
  275. package/__tests__/windows/multifile-relative/in-files/types.dbml +4 -0
  276. package/__tests__/windows/multifile-relative/options.json +6 -0
  277. package/__tests__/windows/multifile-relative/stdout.txt +12 -0
  278. package/__tests__/windows.test.ts +34 -0
  279. package/dbml-error.log +0 -330
  280. package/eslint.config.ts +0 -0
  281. package/lib/index.js +230 -307
  282. package/package.json +6 -6
  283. package/src/NodeProjectLayout.ts +9 -1
  284. package/src/cli/config.ts +0 -0
  285. package/src/cli/connector.ts +0 -0
  286. package/src/cli/export.ts +0 -0
  287. package/src/cli/import.ts +4 -5
  288. package/src/cli/index.ts +0 -0
  289. package/src/cli/outputPlugins/outputConsolePlugin.ts +0 -0
  290. package/src/cli/outputPlugins/outputFilePlugin.ts +0 -0
  291. package/src/cli/utils.ts +4 -3
  292. package/src/cli/validatePlugins/validatePlugins.ts +0 -0
  293. package/src/errors/domainError.ts +0 -0
  294. package/src/errors/index.ts +0 -0
  295. package/src/errors/syntaxError.ts +0 -0
  296. package/src/helpers/logger.ts +0 -0
  297. package/src/index.ts +0 -0
  298. package/tsconfig.json +0 -0
  299. package/vite.config.ts +0 -0
  300. package/__test__/dbml2sql/filename --mysql --out-file/dbml-error.log +0 -36
  301. package/__test__/dbml2sql/filename --mysql --out-file/out-files/schema.sql +0 -65
  302. package/__test__/dbml2sql/filename --oracle --out-file/out-files/schema.sql +0 -61
  303. package/__test__/dbml2sql/filename --out-file/dbml-error.log +0 -36
  304. package/__test__/dbml2sql/filename --out-file/out-files/schema.sql +0 -77
  305. package/__test__/dbml2sql/filename --postgres --out-file/dbml-error.log +0 -24
  306. package/__test__/dbml2sql/filename --postgres --out-file/out-files/schema.sql +0 -77
  307. package/__test__/dbml2sql/filenames --mysql --out-file/dbml-error.log +0 -24
  308. package/__test__/dbml2sql/filenames --mysql --out-file/out-files/schema.sql +0 -172
  309. package/__test__/dbml2sql/filenames --oracle --out-file/out-files/schema.sql +0 -172
  310. package/__test__/dbml2sql/filenames --out-file/dbml-error.log +0 -24
  311. package/__test__/dbml2sql/filenames --out-file/out-files/schema.sql +0 -172
  312. package/__test__/dbml2sql/filenames --postgres --out-file/dbml-error.log +0 -24
  313. package/__test__/dbml2sql/filenames --postgres --out-file/out-files/schema.sql +0 -172
  314. package/__test__/dbml2sql/multiple_schema_mssql/dbml-error.log +0 -24
  315. package/__test__/dbml2sql/multiple_schema_mssql/out-files/multiple_schema.out.sql +0 -62
  316. package/__test__/dbml2sql/multiple_schema_mysql/dbml-error.log +0 -24
  317. package/__test__/dbml2sql/multiple_schema_mysql/out-files/multiple_schema.out.sql +0 -50
  318. package/__test__/dbml2sql/multiple_schema_oracle/dbml-error.log +0 -0
  319. package/__test__/dbml2sql/multiple_schema_oracle/out-files/multiple_schema.out.sql +0 -88
  320. package/__test__/dbml2sql/multiple_schema_pg/dbml-error.log +0 -24
  321. package/__test__/dbml2sql/multiple_schema_pg/out-files/multiple_schema.out.sql +0 -67
  322. package/__test__/dbml2sql/syntax-error/dbml-error.log +0 -2112
  323. package/__test__/sql2dbml/filename --mssql --out-file/dbml-error.log +0 -51
  324. package/__test__/sql2dbml/filename --mssql --out-file/out-files/schema.dbml +0 -25
  325. package/__test__/sql2dbml/filename --mysql --out-file/dbml-error.log +0 -24
  326. package/__test__/sql2dbml/filename --mysql --out-file/out-files/schema.dbml +0 -74
  327. package/__test__/sql2dbml/filename --mysql stdout/dbml-error.log +0 -0
  328. package/__test__/sql2dbml/filename --out-file/dbml-error.log +0 -24
  329. package/__test__/sql2dbml/filename --out-file/out-files/schema.dbml +0 -74
  330. package/__test__/sql2dbml/filename --postgres --out-file/dbml-error.log +0 -24
  331. package/__test__/sql2dbml/filename --postgres --out-file/out-files/schema.dbml +0 -74
  332. package/__test__/sql2dbml/filename --postgres stdout/dbml-error.log +0 -0
  333. package/__test__/sql2dbml/filename --snowflake stdout/dbml-error.log +0 -54
  334. package/__test__/sql2dbml/filename stdout/dbml-error.log +0 -0
  335. package/__test__/sql2dbml/filenames --mysql --out-file/dbml-error.log +0 -24
  336. package/__test__/sql2dbml/filenames --mysql --out-file/out-files/schema.dbml +0 -170
  337. package/__test__/sql2dbml/filenames --mysql stdout/dbml-error.log +0 -0
  338. package/__test__/sql2dbml/filenames --out-file/dbml-error.log +0 -24
  339. package/__test__/sql2dbml/filenames --out-file/out-files/schema.dbml +0 -170
  340. package/__test__/sql2dbml/filenames --postgres --out-file/dbml-error.log +0 -24
  341. package/__test__/sql2dbml/filenames --postgres --out-file/out-files/schema.dbml +0 -170
  342. package/__test__/sql2dbml/filenames --postgres stdout/dbml-error.log +0 -3
  343. package/__test__/sql2dbml/filenames stdout/dbml-error.log +0 -0
  344. package/__test__/sql2dbml/multiple_schema_mssql/dbml-error.log +0 -121
  345. package/__test__/sql2dbml/multiple_schema_mssql/out-files/multiple_schema.out.dbml +0 -106
  346. package/__test__/sql2dbml/multiple_schema_mysql/dbml-error.log +0 -104
  347. package/__test__/sql2dbml/multiple_schema_mysql/out-files/multiple_schema.out.dbml +0 -136
  348. package/__test__/sql2dbml/multiple_schema_pg/dbml-error.log +0 -131
  349. package/__test__/sql2dbml/multiple_schema_pg/out-files/multiple_schema.out.dbml +0 -101
  350. package/__test__/sql2dbml/syntax-error/dbml-error.log +0 -2088
  351. package/__test__/sql2dbml/syntax-error-duplicate-endpoints --mssql/dbml-error.log +0 -36
  352. package/__test__/sql2dbml/syntax-error-duplicate-endpoints --mysql/dbml-error.log +0 -39
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package",
3
3
  "name": "@dbml/cli",
4
- "version": "11.0.0-alpha.6",
4
+ "version": "11.0.1-alpha.0",
5
5
  "description": "",
6
6
  "main": "lib/index.js",
7
7
  "license": "Apache-2.0",
@@ -9,7 +9,7 @@
9
9
  "test": "vitest run",
10
10
  "test:watch": "vitest watch",
11
11
  "coverage": "vitest --coverage",
12
- "build": "rm -rf ./lib && tsc --noEmit && vite build",
12
+ "build": "rimraf ./lib && tsc --noEmit && vite build",
13
13
  "dev": "vite build --watch",
14
14
  "prepublish": "npm run build",
15
15
  "lint": "eslint $(git diff --relative --name-only --diff-filter=ACMRTUXB master -- . | grep -E '\\.(js|ts)$')",
@@ -33,9 +33,9 @@
33
33
  ],
34
34
  "dependencies": {
35
35
  "@babel/cli": "^7.21.0",
36
- "@dbml/connector": "^11.0.0-alpha.6",
37
- "@dbml/core": "^11.0.0-alpha.6",
38
- "@dbml/parse": "^11.0.0-alpha.6",
36
+ "@dbml/connector": "^11.0.1-alpha.0",
37
+ "@dbml/core": "^11.0.1-alpha.0",
38
+ "@dbml/parse": "^11.0.1-alpha.0",
39
39
  "bluebird": "^3.5.5",
40
40
  "chalk": "^2.4.2",
41
41
  "commander": "^2.20.0",
@@ -46,7 +46,7 @@
46
46
  "strip-ansi": "^5.2.0",
47
47
  "winston": "^3.2.1"
48
48
  },
49
- "gitHead": "8d191d7fc27af2f5daab6d9074f7c3882f3541ab",
49
+ "gitHead": "af62dc01c834b6183e9557f98b4d807313c4565a",
50
50
  "engines": {
51
51
  "node": ">=18"
52
52
  }
@@ -2,7 +2,7 @@ import {
2
2
  readFileSync, readdirSync, statSync,
3
3
  } from 'node:fs';
4
4
  import {
5
- type DbmlProjectLayout, Filepath,
5
+ type DbmlProjectLayout, type FileSpecifierInfo, Filepath,
6
6
  } from '@dbml/parse';
7
7
  import {
8
8
  fileLogger,
@@ -26,6 +26,14 @@ export class NodeProjectLayout implements DbmlProjectLayout {
26
26
  return resolved.absolute.endsWith('.dbml') ? resolved : Filepath.from(resolved.absolute + '.dbml');
27
27
  }
28
28
 
29
+ getFileSpecifierInfo (currentFilepath: Filepath, targetFilepath: Filepath): FileSpecifierInfo | undefined {
30
+ let specifier = targetFilepath.relativeTo(currentFilepath.dirname);
31
+ if (specifier.endsWith('.dbml')) specifier = specifier.slice(0, -'.dbml'.length);
32
+ return {
33
+ specifier,
34
+ };
35
+ }
36
+
29
37
  getSource (filePath: Filepath): string | undefined {
30
38
  return safeReadFileSync(filePath.fsPath, 'utf-8');
31
39
  }
package/src/cli/config.ts CHANGED
File without changes
File without changes
package/src/cli/export.ts CHANGED
File without changes
package/src/cli/import.ts CHANGED
@@ -1,8 +1,9 @@
1
1
  import path from 'path';
2
2
  import {
3
- CompilerError, importer,
3
+ CompilerDiagnostics, importer,
4
4
  } from '@dbml/core';
5
5
  import type {
6
+ CompilerDiagnostic,
6
7
  ImportFormat,
7
8
  } from '@dbml/core';
8
9
  import chalk from 'chalk';
@@ -45,10 +46,8 @@ export default async function importHandler (program: Command) {
45
46
  console.log(` ${chalk.green(figures.main.tick)} Generated DBML file from SQL file (${config[format].name}): ${path.basename(opts.outFile)}`);
46
47
  }
47
48
  } catch (error) {
48
- if (error instanceof CompilerError) {
49
- const msg = `\n ${error.diags.map((diag) => new SyntaxError(diag.filepath ?? '', diag)).map(({
50
- message,
51
- }) => message).join('\n ')}`;
49
+ if (error instanceof CompilerDiagnostics) {
50
+ const msg = `\n ${error.diags.map((diag: CompilerDiagnostic) => new SyntaxError(diag.filepath ?? '', diag)).map((e: SyntaxError) => e.message).join('\n ')}`;
52
51
  consoleLogger.error(msg);
53
52
  fileLogger.error(msg);
54
53
  return;
package/src/cli/index.ts CHANGED
File without changes
File without changes
File without changes
package/src/cli/utils.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import fs from 'fs';
2
2
  import path from 'path';
3
3
  import {
4
- CompilerError,
4
+ CompilerDiagnostics,
5
+ type CompilerDiagnostic,
5
6
  type ExportFormat,
6
7
  } from '@dbml/core';
7
8
  import {
@@ -88,8 +89,8 @@ function generate (
88
89
  const content = transform(source);
89
90
  outputPlugin.write(content);
90
91
  } catch (e) {
91
- if (e instanceof CompilerError) {
92
- throw e.map((diag) => ({
92
+ if (e instanceof CompilerDiagnostics) {
93
+ throw e.map((diag: CompilerDiagnostic) => ({
93
94
  ...diag,
94
95
  message: diag.message,
95
96
  filepath: path.basename(_path),
File without changes
File without changes
File without changes
File without changes
File without changes
package/src/index.ts CHANGED
File without changes
package/tsconfig.json CHANGED
File without changes
package/vite.config.ts CHANGED
File without changes
@@ -1,36 +0,0 @@
1
- 2021-07-13T12:37:40.734Z
2
- TypeError: Cannot read property 'tick' of undefined
3
- at exportHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\export.js:37:56)
4
- at dbml2sql (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:19:3)
5
- at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\dbml2sql_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:47:15.905Z
14
- TypeError: Cannot read property 'tick' of undefined
15
- at exportHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\export.js:37:56)
16
- at dbml2sql (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:19:3)
17
- at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\dbml2sql_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
- 2021-07-13T12:58:20.418Z
26
- TypeError: Cannot read property 'tick' of undefined
27
- at exportHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\export.js:37:49)
28
- at dbml2sql (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:19:3)
29
- at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\dbml2sql_bin.js:5:1)
30
- at Module._compile (internal/modules/cjs/loader.js:1085:14)
31
- at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
32
- at Module.load (internal/modules/cjs/loader.js:950:32)
33
- at Function.Module._load (internal/modules/cjs/loader.js:790:14)
34
- at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
35
- at internal/main/run_main_module.js:17:47
36
-
@@ -1,65 +0,0 @@
1
- -- SQL dump generated using DBML (dbml.dbdiagram.io)
2
- -- Database: MySQL
3
- -- Generated at: 2024-08-12T11:56:40.986Z
4
-
5
- CREATE TABLE `orders` (
6
- `id` int PRIMARY KEY AUTO_INCREMENT,
7
- `user_id` int UNIQUE NOT NULL,
8
- `status` ENUM ('created', 'running', 'done', 'failure'),
9
- `created_at` varchar(255)
10
- );
11
-
12
- CREATE TABLE `order_items` (
13
- `order_id` int,
14
- `product_id` int,
15
- `quantity` int DEFAULT 1
16
- );
17
-
18
- CREATE TABLE `products` (
19
- `id` int PRIMARY KEY,
20
- `name` varchar(255),
21
- `merchant_id` int NOT NULL,
22
- `price` int,
23
- `status` ENUM ('Out of Stock', 'In Stock'),
24
- `created_at` datetime DEFAULT (now())
25
- );
26
-
27
- CREATE TABLE `users` (
28
- `id` int PRIMARY KEY,
29
- `full_name` varchar(255),
30
- `email` varchar(255) UNIQUE,
31
- `gender` varchar(255),
32
- `date_of_birth` varchar(255),
33
- `created_at` varchar(255),
34
- `country_code` int
35
- );
36
-
37
- CREATE TABLE `merchants` (
38
- `id` int PRIMARY KEY,
39
- `merchant_name` varchar(255),
40
- `country_code` int,
41
- `created_at` varchar(255),
42
- `admin_id` int
43
- );
44
-
45
- CREATE TABLE `countries` (
46
- `code` int PRIMARY KEY,
47
- `name` varchar(255),
48
- `continent_name` varchar(255)
49
- );
50
-
51
- CREATE INDEX `product_status` ON `products` (`merchant_id`, `status`);
52
-
53
- CREATE UNIQUE INDEX `products_index_1` ON `products` (`id`) USING HASH;
54
-
55
- ALTER TABLE `order_items` ADD FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`);
56
-
57
- ALTER TABLE `order_items` ADD FOREIGN KEY (`product_id`) REFERENCES `products` (`id`);
58
-
59
- ALTER TABLE `users` ADD FOREIGN KEY (`country_code`) REFERENCES `countries` (`code`);
60
-
61
- ALTER TABLE `merchants` ADD FOREIGN KEY (`country_code`) REFERENCES `countries` (`code`);
62
-
63
- ALTER TABLE `products` ADD FOREIGN KEY (`merchant_id`) REFERENCES `merchants` (`id`);
64
-
65
- ALTER TABLE `merchants` ADD FOREIGN KEY (`admin_id`) REFERENCES `users` (`id`);
@@ -1,61 +0,0 @@
1
- -- SQL dump generated using DBML (dbml.dbdiagram.io)
2
- -- Database: Oracle
3
- -- Generated at: 2024-08-12T11:56:41.926Z
4
-
5
- CREATE TABLE "orders" (
6
- "id" int GENERATED AS IDENTITY PRIMARY KEY,
7
- "user_id" int UNIQUE NOT NULL,
8
- "status" nvarchar2(255) NOT NULL CHECK ("status" IN ('created', 'running', 'done', 'failure'))
9
- );
10
-
11
- CREATE TABLE "order_items" (
12
- "order_id" int,
13
- "product_id" int,
14
- "quantity" int DEFAULT 1
15
- );
16
-
17
- CREATE TABLE "products" (
18
- "id" int PRIMARY KEY,
19
- "name" nvarchar2(255),
20
- "merchant_id" int NOT NULL,
21
- "price" int,
22
- "status" nvarchar2(255) NOT NULL CHECK ("status" IN ('Out of Stock', 'In Stock')),
23
- "created_at" timestamp DEFAULT current_timestamp
24
- );
25
-
26
- CREATE TABLE "users" (
27
- "id" int PRIMARY KEY,
28
- "full_name" nvarchar2(255),
29
- "email" nvarchar2(255) UNIQUE,
30
- "gender" nvarchar2(255),
31
- "date_of_birth" date,
32
- "created_at" timestamp,
33
- "country_code" int
34
- );
35
-
36
- CREATE TABLE "merchants" (
37
- "id" int PRIMARY KEY,
38
- "merchant_name" nvarchar2(255),
39
- "country_code" int,
40
- "created_at" timestamp,
41
- "admin_id" int
42
- );
43
-
44
- CREATE TABLE "countries" (
45
- "code" int PRIMARY KEY,
46
- "name" nvarchar2(255)
47
- );
48
-
49
- CREATE INDEX "product_status" ON "products" ("merchant_id", "status");
50
-
51
- ALTER TABLE "order_items" ADD FOREIGN KEY ("order_id") REFERENCES "orders" ("id");
52
-
53
- ALTER TABLE "order_items" ADD FOREIGN KEY ("product_id") REFERENCES "products" ("id");
54
-
55
- ALTER TABLE "users" ADD FOREIGN KEY ("country_code") REFERENCES "countries" ("code");
56
-
57
- ALTER TABLE "merchants" ADD FOREIGN KEY ("country_code") REFERENCES "countries" ("code");
58
-
59
- ALTER TABLE "products" ADD FOREIGN KEY ("merchant_id") REFERENCES "merchants" ("id");
60
-
61
- ALTER TABLE "merchants" ADD FOREIGN KEY ("admin_id") REFERENCES "users" ("id");
@@ -1,36 +0,0 @@
1
- 2021-07-13T12:37:43.283Z
2
- TypeError: Cannot read property 'tick' of undefined
3
- at exportHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\export.js:37:56)
4
- at dbml2sql (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:19:3)
5
- at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\dbml2sql_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:47:19.039Z
14
- TypeError: Cannot read property 'tick' of undefined
15
- at exportHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\export.js:37:56)
16
- at dbml2sql (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:19:3)
17
- at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\dbml2sql_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
- 2021-07-13T12:58:22.994Z
26
- TypeError: Cannot read property 'tick' of undefined
27
- at exportHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\export.js:37:49)
28
- at dbml2sql (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:19:3)
29
- at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\dbml2sql_bin.js:5:1)
30
- at Module._compile (internal/modules/cjs/loader.js:1085:14)
31
- at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
32
- at Module.load (internal/modules/cjs/loader.js:950:32)
33
- at Function.Module._load (internal/modules/cjs/loader.js:790:14)
34
- at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:76:12)
35
- at internal/main/run_main_module.js:17:47
36
-
@@ -1,77 +0,0 @@
1
- -- SQL dump generated using DBML (dbml.dbdiagram.io)
2
- -- Database: PostgreSQL
3
- -- Generated at: 2024-08-12T11:56:42.841Z
4
-
5
- CREATE TYPE "orders_status" AS ENUM (
6
- 'created',
7
- 'running',
8
- 'done',
9
- 'failure'
10
- );
11
-
12
- CREATE TYPE "product status" AS ENUM (
13
- 'Out of Stock',
14
- 'In Stock'
15
- );
16
-
17
- CREATE TABLE "orders" (
18
- "id" INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
19
- "user_id" int UNIQUE NOT NULL,
20
- "status" orders_status,
21
- "created_at" varchar
22
- );
23
-
24
- CREATE TABLE "order_items" (
25
- "order_id" int,
26
- "product_id" int,
27
- "quantity" int DEFAULT 1
28
- );
29
-
30
- CREATE TABLE "products" (
31
- "id" int PRIMARY KEY,
32
- "name" varchar,
33
- "merchant_id" int NOT NULL,
34
- "price" int,
35
- "status" "product status",
36
- "created_at" datetime DEFAULT (now())
37
- );
38
-
39
- CREATE TABLE "users" (
40
- "id" int PRIMARY KEY,
41
- "full_name" varchar,
42
- "email" varchar UNIQUE,
43
- "gender" varchar,
44
- "date_of_birth" varchar,
45
- "created_at" varchar,
46
- "country_code" int
47
- );
48
-
49
- CREATE TABLE "merchants" (
50
- "id" int PRIMARY KEY,
51
- "merchant_name" varchar,
52
- "country_code" int,
53
- "created_at" varchar,
54
- "admin_id" int
55
- );
56
-
57
- CREATE TABLE "countries" (
58
- "code" int PRIMARY KEY,
59
- "name" varchar,
60
- "continent_name" varchar
61
- );
62
-
63
- CREATE INDEX "product_status" ON "products" ("merchant_id", "status");
64
-
65
- CREATE UNIQUE INDEX ON "products" USING HASH ("id");
66
-
67
- ALTER TABLE "order_items" ADD FOREIGN KEY ("order_id") REFERENCES "orders" ("id");
68
-
69
- ALTER TABLE "order_items" ADD FOREIGN KEY ("product_id") REFERENCES "products" ("id");
70
-
71
- ALTER TABLE "users" ADD FOREIGN KEY ("country_code") REFERENCES "countries" ("code");
72
-
73
- ALTER TABLE "merchants" ADD FOREIGN KEY ("country_code") REFERENCES "countries" ("code");
74
-
75
- ALTER TABLE "products" ADD FOREIGN KEY ("merchant_id") REFERENCES "merchants" ("id");
76
-
77
- ALTER TABLE "merchants" ADD FOREIGN KEY ("admin_id") REFERENCES "users" ("id");
@@ -1,24 +0,0 @@
1
- 2021-07-13T12:37:44.406Z
2
- TypeError: Cannot read property 'tick' of undefined
3
- at exportHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\export.js:37:56)
4
- at dbml2sql (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:19:3)
5
- at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\dbml2sql_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:23.999Z
14
- TypeError: Cannot read property 'tick' of undefined
15
- at exportHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\export.js:37:49)
16
- at dbml2sql (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:19:3)
17
- at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\dbml2sql_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
-
@@ -1,77 +0,0 @@
1
- -- SQL dump generated using DBML (dbml.dbdiagram.io)
2
- -- Database: PostgreSQL
3
- -- Generated at: 2024-08-12T11:56:43.303Z
4
-
5
- CREATE TYPE "orders_status" AS ENUM (
6
- 'created',
7
- 'running',
8
- 'done',
9
- 'failure'
10
- );
11
-
12
- CREATE TYPE "product status" AS ENUM (
13
- 'Out of Stock',
14
- 'In Stock'
15
- );
16
-
17
- CREATE TABLE "orders" (
18
- "id" INT GENERATED BY DEFAULT AS IDENTITY PRIMARY KEY,
19
- "user_id" int UNIQUE NOT NULL,
20
- "status" orders_status,
21
- "created_at" varchar
22
- );
23
-
24
- CREATE TABLE "order_items" (
25
- "order_id" int,
26
- "product_id" int,
27
- "quantity" int DEFAULT 1
28
- );
29
-
30
- CREATE TABLE "products" (
31
- "id" int PRIMARY KEY,
32
- "name" varchar,
33
- "merchant_id" int NOT NULL,
34
- "price" int,
35
- "status" "product status",
36
- "created_at" datetime DEFAULT (now())
37
- );
38
-
39
- CREATE TABLE "users" (
40
- "id" int PRIMARY KEY,
41
- "full_name" varchar,
42
- "email" varchar UNIQUE,
43
- "gender" varchar,
44
- "date_of_birth" varchar,
45
- "created_at" varchar,
46
- "country_code" int
47
- );
48
-
49
- CREATE TABLE "merchants" (
50
- "id" int PRIMARY KEY,
51
- "merchant_name" varchar,
52
- "country_code" int,
53
- "created_at" varchar,
54
- "admin_id" int
55
- );
56
-
57
- CREATE TABLE "countries" (
58
- "code" int PRIMARY KEY,
59
- "name" varchar,
60
- "continent_name" varchar
61
- );
62
-
63
- CREATE INDEX "product_status" ON "products" ("merchant_id", "status");
64
-
65
- CREATE UNIQUE INDEX ON "products" USING HASH ("id");
66
-
67
- ALTER TABLE "order_items" ADD FOREIGN KEY ("order_id") REFERENCES "orders" ("id");
68
-
69
- ALTER TABLE "order_items" ADD FOREIGN KEY ("product_id") REFERENCES "products" ("id");
70
-
71
- ALTER TABLE "users" ADD FOREIGN KEY ("country_code") REFERENCES "countries" ("code");
72
-
73
- ALTER TABLE "merchants" ADD FOREIGN KEY ("country_code") REFERENCES "countries" ("code");
74
-
75
- ALTER TABLE "products" ADD FOREIGN KEY ("merchant_id") REFERENCES "merchants" ("id");
76
-
77
- ALTER TABLE "merchants" ADD FOREIGN KEY ("admin_id") REFERENCES "users" ("id");
@@ -1,24 +0,0 @@
1
- 2021-07-13T12:37:47.900Z
2
- TypeError: Cannot read property 'tick' of undefined
3
- at exportHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\export.js:37:56)
4
- at dbml2sql (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:19:3)
5
- at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\dbml2sql_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:26.936Z
14
- TypeError: Cannot read property 'tick' of undefined
15
- at exportHandler (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\export.js:37:49)
16
- at dbml2sql (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\src\cli\index.js:19:3)
17
- at Object.<anonymous> (C:\Users\Inspiron101\Desktop\Holistics\dbml\packages\dbml-cli\__test__\dbml2sql_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
-