@prisma/orm-target-mysql 8.0.0-rc.23-dev.6 → 8.0.0-rc.23-dev.8

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 (226) hide show
  1. package/dist/adapter-D0qXT1lj.d.mts +57 -0
  2. package/dist/adapter-D0qXT1lj.d.mts.map +1 -0
  3. package/dist/adapter.d.mts +6 -6
  4. package/dist/adapter.mjs +3 -3
  5. package/dist/adapter__adapter.d.mts +2 -2
  6. package/dist/adapter__adapter.mjs +2 -2
  7. package/dist/adapter__codec-types.d.mts +2 -2
  8. package/dist/adapter__control.d.mts +2 -2
  9. package/dist/adapter__control.mjs +2 -2
  10. package/dist/adapter__runtime.d.mts +1 -1
  11. package/dist/adapter__runtime.mjs +9 -9
  12. package/dist/adapter__runtime.mjs.map +1 -1
  13. package/dist/{codec-descriptor-3xp1XvVH-yVLnNzZ8.mjs → codec-descriptor-3xp1XvVH-DfPKpYeP.mjs} +2 -2
  14. package/dist/codec-descriptor-3xp1XvVH-DfPKpYeP.mjs.map +1 -0
  15. package/dist/codec-descriptor-BRcKIX3h.d.mts +2 -0
  16. package/dist/{codec-descriptor-DXyubAS6-siA0R8Ow.d.mts → codec-descriptor-DXyubAS6-XDBj6Yet.d.mts} +2 -2
  17. package/dist/codec-descriptor-DXyubAS6-XDBj6Yet.d.mts.map +1 -0
  18. package/dist/codec-descriptor-J3TP08l8-BmdgkIU6.d.mts +1 -0
  19. package/dist/{codec-ids-CrR9Xi7r-CarpqbNM.mjs → codec-ids-CrR9Xi7r-CjbGCS3o.mjs} +2 -2
  20. package/dist/codec-ids-CrR9Xi7r-CjbGCS3o.mjs.map +1 -0
  21. package/dist/{codec-ids-Dgh5IpML-76oBMuwK.d.mts → codec-ids-Dgh5IpML-DGXIq6j8.d.mts} +2 -2
  22. package/dist/codec-ids-Dgh5IpML-DGXIq6j8.d.mts.map +1 -0
  23. package/dist/codec-types-BS-lWfda.d.mts +1 -0
  24. package/dist/{codec-types-Bai_CFkk-Blx2GxCH.d.mts → codec-types-Bai_CFkk-DmZ74URd.d.mts} +5 -5
  25. package/dist/codec-types-Bai_CFkk-DmZ74URd.d.mts.map +1 -0
  26. package/dist/codec-types-Dk2h5dBB.d.mts +1 -0
  27. package/dist/{codecs-BMidk26M-DsKq6wt5.d.mts → codecs-BMidk26M-B_iWNti6.d.mts} +5 -5
  28. package/dist/codecs-BMidk26M-B_iWNti6.d.mts.map +1 -0
  29. package/dist/{codecs-C_twedMx.d.mts → codecs-CIJRyUd3.d.mts} +4 -4
  30. package/dist/codecs-CIJRyUd3.d.mts.map +1 -0
  31. package/dist/{codecs-BfiB79-5.mjs → codecs-wVJlFapM.mjs} +7 -7
  32. package/dist/codecs-wVJlFapM.mjs.map +1 -0
  33. package/dist/{contract-free-Cw9Mjcro.d.mts → contract-free-BnJBWENn.d.mts} +3 -3
  34. package/dist/contract-free-BnJBWENn.d.mts.map +1 -0
  35. package/dist/{contract-free-BvCdx_Ee.mjs → contract-free-DekbHRyr.mjs} +4 -4
  36. package/dist/contract-free-DekbHRyr.mjs.map +1 -0
  37. package/dist/control-BBuy6yt5.mjs +73 -0
  38. package/dist/control-BBuy6yt5.mjs.map +1 -0
  39. package/dist/control-BiZaCqna.mjs +89 -0
  40. package/dist/control-BiZaCqna.mjs.map +1 -0
  41. package/dist/{control-BBhWaGnH.mjs → control-CyGJDPay.mjs} +102 -77
  42. package/dist/control-CyGJDPay.mjs.map +1 -0
  43. package/dist/control-D7_IpeiU.d.mts +31 -0
  44. package/dist/control-D7_IpeiU.d.mts.map +1 -0
  45. package/dist/{control-BvSM7mGR.d.mts → control-Dj8nIA1M.d.mts} +13 -4
  46. package/dist/control-Dj8nIA1M.d.mts.map +1 -0
  47. package/dist/{control-MoPFgSaQ.d.mts → control-WNuLF2Wh.d.mts} +29 -56
  48. package/dist/control-WNuLF2Wh.d.mts.map +1 -0
  49. package/dist/{control-tables-CHw2F-rg.d.mts → control-tables-CWJyQ3dZ.d.mts} +2 -2
  50. package/dist/control-tables-CWJyQ3dZ.d.mts.map +1 -0
  51. package/dist/{control-tables-CcQ77JE7-CxTQYoQJ.mjs → control-tables-CcQ77JE7-DKb3ubVU.mjs} +2 -2
  52. package/dist/control-tables-CcQ77JE7-DKb3ubVU.mjs.map +1 -0
  53. package/dist/{data-type-entries-C7VH2IHc-D1d5I8zF.mjs → data-type-entries-C7VH2IHc-DM6TbTaz.mjs} +3 -3
  54. package/dist/data-type-entries-C7VH2IHc-DM6TbTaz.mjs.map +1 -0
  55. package/dist/{data-types-C-rfxpgB.d.mts → data-types-65iVc7q1.d.mts} +3 -3
  56. package/dist/data-types-65iVc7q1.d.mts.map +1 -0
  57. package/dist/{data-types-D2HAT-Qf-CRI506c0.d.mts → data-types-D2HAT-Qf-CSdDz1Pk.d.mts} +2 -2
  58. package/dist/data-types-D2HAT-Qf-CSdDz1Pk.d.mts.map +1 -0
  59. package/dist/{data-types-DOaaPS93-DBkMJyh1.mjs → data-types-DOaaPS93-lycGybNk.mjs} +4 -4
  60. package/dist/data-types-DOaaPS93-lycGybNk.mjs.map +1 -0
  61. package/dist/{date-time-now-generators-DY-8Bodc-DcQ3h4Fg.mjs → date-time-now-generators-DY-8Bodc-DpQ5Se1u.mjs} +4 -4
  62. package/dist/date-time-now-generators-DY-8Bodc-DpQ5Se1u.mjs.map +1 -0
  63. package/dist/ddl-Bobm-S7I.d.mts +1 -0
  64. package/dist/{ddl-DDmMHyA_-Bb8sXoS0.mjs → ddl-DDmMHyA_-grdUmU3J.mjs} +3 -3
  65. package/dist/ddl-DDmMHyA_-grdUmU3J.mjs.map +1 -0
  66. package/dist/{default-normalizer-C8pc7SbL-CKgOEnGl.mjs → default-normalizer-C8pc7SbL-BXd70q02.mjs} +3 -3
  67. package/dist/default-normalizer-C8pc7SbL-BXd70q02.mjs.map +1 -0
  68. package/dist/{default-normalizer-CGIwQiKB.d.mts → default-normalizer-D-8Ii0df.d.mts} +2 -2
  69. package/dist/default-normalizer-D-8Ii0df.d.mts.map +1 -0
  70. package/dist/{descriptor-meta-CsMPRsxp-DhK87vlc.mjs → descriptor-meta-CsMPRsxp-QVV7vNY8.mjs} +6 -6
  71. package/dist/descriptor-meta-CsMPRsxp-QVV7vNY8.mjs.map +1 -0
  72. package/dist/descriptor-meta-pVdZBI-g-BJN4T_on.mjs +32 -0
  73. package/dist/descriptor-meta-pVdZBI-g-BJN4T_on.mjs.map +1 -0
  74. package/dist/driver.d.mts +3 -3
  75. package/dist/driver.mjs +3 -2
  76. package/dist/driver__control.d.mts +2 -2
  77. package/dist/driver__control.mjs +2 -2
  78. package/dist/driver__runtime.d.mts +2 -2
  79. package/dist/driver__runtime.mjs +2 -564
  80. package/dist/{errors-Cng94tYg-D02Eud2d.mjs → errors-Cng94tYg-DTH51xWG.mjs} +2 -2
  81. package/dist/errors-Cng94tYg-DTH51xWG.mjs.map +1 -0
  82. package/dist/{errors-DfrC_yfG.d.mts → errors-DjCkC9IM.d.mts} +2 -2
  83. package/dist/errors-DjCkC9IM.d.mts.map +1 -0
  84. package/dist/{marker-lock-Bwew7cAs-CZ20Y_tA.mjs → marker-lock-Bwew7cAs-ElLxlCQp.mjs} +3 -3
  85. package/dist/marker-lock-Bwew7cAs-ElLxlCQp.mjs.map +1 -0
  86. package/dist/{marker-lock-su6IxinO.d.mts → marker-lock-Px2qK06F.d.mts} +2 -2
  87. package/dist/marker-lock-Px2qK06F.d.mts.map +1 -0
  88. package/dist/{marker-read-Cf80LSbG-CUp3v1e5.mjs → marker-read-D1hp62hF-3-4fEgDD.mjs} +6 -23
  89. package/dist/marker-read-D1hp62hF-3-4fEgDD.mjs.map +1 -0
  90. package/dist/{migration-DmlblTTw.d.mts → migration-DILkj7kB.d.mts} +41 -29
  91. package/dist/migration-DILkj7kB.d.mts.map +1 -0
  92. package/dist/{mysql-contract-serializer-BnTKRSsN-B2O3EreV.mjs → mysql-contract-serializer-BnTKRSsN-BnV7fdYd.mjs} +4 -4
  93. package/dist/mysql-contract-serializer-BnTKRSsN-BnV7fdYd.mjs.map +1 -0
  94. package/dist/{mysql-database-CHl9-oSL-CWZLDXt6.mjs → mysql-database-CHl9-oSL-B1arvq6Q.mjs} +5 -5
  95. package/dist/mysql-database-CHl9-oSL-B1arvq6Q.mjs.map +1 -0
  96. package/dist/{nodes-CvcX47ot-B-ZaUYRj.mjs → nodes-CvcX47ot-CcCy0Oh4.mjs} +2 -2
  97. package/dist/nodes-CvcX47ot-CcCy0Oh4.mjs.map +1 -0
  98. package/dist/{nodes-xc0cR0_c-2YbhgEjb.d.mts → nodes-xc0cR0_c-CLET35o0.d.mts} +2 -2
  99. package/dist/nodes-xc0cR0_c-CLET35o0.d.mts.map +1 -0
  100. package/dist/{now-expression-DVD18CUc-00buJUto.mjs → now-expression-DVD18CUc-DJqdZY96.mjs} +3 -3
  101. package/dist/now-expression-DVD18CUc-DJqdZY96.mjs.map +1 -0
  102. package/dist/{pack-BXvLVBWP.d.mts → pack-COnjX17N.d.mts} +6 -6
  103. package/dist/pack-COnjX17N.d.mts.map +1 -0
  104. package/dist/{planner-target-details-D6g2uSp--C5NKHmCc.d.mts → planner-target-details-D6g2uSp--6VJKSGxe.d.mts} +2 -2
  105. package/dist/planner-target-details-D6g2uSp--6VJKSGxe.d.mts.map +1 -0
  106. package/dist/{require-temporal-DeDQhbTn-Bxc65WbA.mjs → require-temporal-DeDQhbTn-CdpjEWCB.mjs} +3 -3
  107. package/dist/require-temporal-DeDQhbTn-CdpjEWCB.mjs.map +1 -0
  108. package/dist/{runner-C39AEe6--BVG3xPYw.mjs → runner-BIjAWX-E-BgTmrD8f.mjs} +146 -124
  109. package/dist/runner-BIjAWX-E-BgTmrD8f.mjs.map +1 -0
  110. package/dist/runtime-BGF0cSIt.mjs +569 -0
  111. package/dist/runtime-BGF0cSIt.mjs.map +1 -0
  112. package/dist/{runtime-ClRDfPiY.d.mts → runtime-Cm-T3hbP.d.mts} +4 -4
  113. package/dist/runtime-Cm-T3hbP.d.mts.map +1 -0
  114. package/dist/{runtime-BGyTXcQH.d.mts → runtime-DN20lWEg.d.mts} +7 -5
  115. package/dist/runtime-DN20lWEg.d.mts.map +1 -0
  116. package/dist/{runtime-CrB5DXx4.d.mts → runtime-sPIp-JgC.d.mts} +2 -2
  117. package/dist/runtime-sPIp-JgC.d.mts.map +1 -0
  118. package/dist/{sql-utils-bD4SfgX0.mjs → sql-utils-BE8tDXHs.mjs} +3 -3
  119. package/dist/sql-utils-BE8tDXHs.mjs.map +1 -0
  120. package/dist/{sql-utils-Cmv_TVa8-BetrIUcj.mjs → sql-utils-Cmv_TVa8-CNW3UmfQ.mjs} +3 -3
  121. package/dist/sql-utils-Cmv_TVa8-CNW3UmfQ.mjs.map +1 -0
  122. package/dist/{sql-utils-BOS1c2QT.d.mts → sql-utils-DBvre8Ar.d.mts} +2 -2
  123. package/dist/sql-utils-DBvre8Ar.d.mts.map +1 -0
  124. package/dist/{statement-DC62oiSx-Buzptbpk.mjs → statement-CT5tB4uX-CHqHFM3z.mjs} +17 -14
  125. package/dist/statement-CT5tB4uX-CHqHFM3z.mjs.map +1 -0
  126. package/dist/target.d.mts +24 -24
  127. package/dist/target.mjs +22 -21
  128. package/dist/target__codec-descriptor.d.mts +2 -2
  129. package/dist/target__codec-descriptor.mjs +1 -1
  130. package/dist/target__codec-ids.d.mts +1 -1
  131. package/dist/target__codec-ids.mjs +1 -1
  132. package/dist/target__codec-types.d.mts +2 -2
  133. package/dist/target__codecs.d.mts +2 -2
  134. package/dist/target__codecs.mjs +2 -2
  135. package/dist/target__contract-free.d.mts +1 -1
  136. package/dist/target__contract-free.mjs +2 -2
  137. package/dist/target__control-tables.d.mts +1 -1
  138. package/dist/target__control-tables.mjs +1 -1
  139. package/dist/target__control.d.mts +3 -3
  140. package/dist/target__control.mjs +3 -64
  141. package/dist/target__data-types.d.mts +2 -2
  142. package/dist/target__data-types.mjs +2 -2
  143. package/dist/target__ddl.d.mts +2 -2
  144. package/dist/target__ddl.mjs +1 -1
  145. package/dist/target__default-normalizer.d.mts +1 -1
  146. package/dist/target__default-normalizer.mjs +1 -1
  147. package/dist/target__errors.d.mts +1 -1
  148. package/dist/target__errors.mjs +1 -1
  149. package/dist/target__marker-lock.d.mts +1 -1
  150. package/dist/target__marker-lock.mjs +1 -1
  151. package/dist/target__migration.d.mts +2 -2
  152. package/dist/target__migration.mjs +2 -2
  153. package/dist/target__pack.d.mts +1 -1
  154. package/dist/target__pack.mjs +1 -1
  155. package/dist/target__runtime.d.mts +1 -1
  156. package/dist/target__runtime.mjs +3 -3
  157. package/dist/target__runtime.mjs.map +1 -1
  158. package/dist/target__sql-utils.d.mts +1 -1
  159. package/dist/target__sql-utils.mjs +2 -2
  160. package/dist/target__types.d.mts +1 -1
  161. package/dist/target__types.mjs +1 -1
  162. package/dist/{types-CgrFHUdk.d.mts → types-gXYDzQXs.d.mts} +2 -2
  163. package/dist/types-gXYDzQXs.d.mts.map +1 -0
  164. package/package.json +10 -10
  165. package/dist/adapter-Dl4Wwz1I.d.mts +0 -29
  166. package/dist/adapter-Dl4Wwz1I.d.mts.map +0 -1
  167. package/dist/codec-descriptor-3xp1XvVH-yVLnNzZ8.mjs.map +0 -1
  168. package/dist/codec-descriptor-DXyubAS6-siA0R8Ow.d.mts.map +0 -1
  169. package/dist/codec-descriptor-J3TP08l8-ekLvUVxW.d.mts +0 -1
  170. package/dist/codec-descriptor-oLRh9E29.d.mts +0 -2
  171. package/dist/codec-ids-CrR9Xi7r-CarpqbNM.mjs.map +0 -1
  172. package/dist/codec-ids-Dgh5IpML-76oBMuwK.d.mts.map +0 -1
  173. package/dist/codec-types-BH5moCD9.d.mts +0 -1
  174. package/dist/codec-types-Bai_CFkk-Blx2GxCH.d.mts.map +0 -1
  175. package/dist/codec-types-zzVcrnbk.d.mts +0 -1
  176. package/dist/codecs-BMidk26M-DsKq6wt5.d.mts.map +0 -1
  177. package/dist/codecs-BfiB79-5.mjs.map +0 -1
  178. package/dist/codecs-C_twedMx.d.mts.map +0 -1
  179. package/dist/contract-contributions-ChiX6W0F-CAng98bZ.mjs +0 -15
  180. package/dist/contract-contributions-ChiX6W0F-CAng98bZ.mjs.map +0 -1
  181. package/dist/contract-free-BvCdx_Ee.mjs.map +0 -1
  182. package/dist/contract-free-Cw9Mjcro.d.mts.map +0 -1
  183. package/dist/control-5eVF1TXc.mjs +0 -74
  184. package/dist/control-5eVF1TXc.mjs.map +0 -1
  185. package/dist/control-BBhWaGnH.mjs.map +0 -1
  186. package/dist/control-BvSM7mGR.d.mts.map +0 -1
  187. package/dist/control-DHkZbo58.d.mts +0 -25
  188. package/dist/control-DHkZbo58.d.mts.map +0 -1
  189. package/dist/control-MoPFgSaQ.d.mts.map +0 -1
  190. package/dist/control-tables-CHw2F-rg.d.mts.map +0 -1
  191. package/dist/control-tables-CcQ77JE7-CxTQYoQJ.mjs.map +0 -1
  192. package/dist/data-type-entries-C7VH2IHc-D1d5I8zF.mjs.map +0 -1
  193. package/dist/data-types-C-rfxpgB.d.mts.map +0 -1
  194. package/dist/data-types-D2HAT-Qf-CRI506c0.d.mts.map +0 -1
  195. package/dist/data-types-DOaaPS93-DBkMJyh1.mjs.map +0 -1
  196. package/dist/date-time-now-generators-DY-8Bodc-DcQ3h4Fg.mjs.map +0 -1
  197. package/dist/ddl-CT6DPEqg.d.mts +0 -1
  198. package/dist/ddl-DDmMHyA_-Bb8sXoS0.mjs.map +0 -1
  199. package/dist/default-normalizer-C8pc7SbL-CKgOEnGl.mjs.map +0 -1
  200. package/dist/default-normalizer-CGIwQiKB.d.mts.map +0 -1
  201. package/dist/descriptor-meta-CsMPRsxp-DhK87vlc.mjs.map +0 -1
  202. package/dist/driver__runtime.mjs.map +0 -1
  203. package/dist/errors-Cng94tYg-D02Eud2d.mjs.map +0 -1
  204. package/dist/errors-DfrC_yfG.d.mts.map +0 -1
  205. package/dist/marker-lock-Bwew7cAs-CZ20Y_tA.mjs.map +0 -1
  206. package/dist/marker-lock-su6IxinO.d.mts.map +0 -1
  207. package/dist/marker-read-Cf80LSbG-CUp3v1e5.mjs.map +0 -1
  208. package/dist/migration-DmlblTTw.d.mts.map +0 -1
  209. package/dist/mysql-contract-serializer-BnTKRSsN-B2O3EreV.mjs.map +0 -1
  210. package/dist/mysql-database-CHl9-oSL-CWZLDXt6.mjs.map +0 -1
  211. package/dist/nodes-CvcX47ot-B-ZaUYRj.mjs.map +0 -1
  212. package/dist/nodes-xc0cR0_c-2YbhgEjb.d.mts.map +0 -1
  213. package/dist/now-expression-DVD18CUc-00buJUto.mjs.map +0 -1
  214. package/dist/pack-BXvLVBWP.d.mts.map +0 -1
  215. package/dist/planner-target-details-D6g2uSp--C5NKHmCc.d.mts.map +0 -1
  216. package/dist/require-temporal-DeDQhbTn-Bxc65WbA.mjs.map +0 -1
  217. package/dist/runner-C39AEe6--BVG3xPYw.mjs.map +0 -1
  218. package/dist/runtime-BGyTXcQH.d.mts.map +0 -1
  219. package/dist/runtime-ClRDfPiY.d.mts.map +0 -1
  220. package/dist/runtime-CrB5DXx4.d.mts.map +0 -1
  221. package/dist/sql-utils-BOS1c2QT.d.mts.map +0 -1
  222. package/dist/sql-utils-Cmv_TVa8-BetrIUcj.mjs.map +0 -1
  223. package/dist/sql-utils-bD4SfgX0.mjs.map +0 -1
  224. package/dist/statement-DC62oiSx-Buzptbpk.mjs.map +0 -1
  225. package/dist/target__control.mjs.map +0 -1
  226. package/dist/types-CgrFHUdk.d.mts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"mysql-database-CHl9-oSL-CWZLDXt6.mjs","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/mysql-database-CHl9-oSL.mjs"],"sourcesContent":["import \"./codec-ids-CrR9Xi7r.mjs\";\nimport { s as mysqlError } from \"./errors-Cng94tYg.mjs\";\nimport { n as quoteIdentifier } from \"./sql-utils-Cmv_TVa8.mjs\";\nimport { S as mysqlTimestamp, b as mysqlTime, l as mysqlDatetime } from \"./data-types-DOaaPS93.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { SqlNamespaceBase } from \"@internal/sql-contract/types\";\nimport { UNBOUND_NAMESPACE_ID, freezeNode, hydrateNamespaceEntities } from \"@internal/framework-components/ir\";\nimport { tableEntityKind } from \"@internal/sql-contract/entity-kinds\";\n//#region src/core/mysql-database.ts\nconst MYSQL_NAMESPACE_KIND = \"mysql-namespace\";\n/**\n* The MySQL database a connection uses, as the contract's one namespace. Tables are addressed unqualified, so the contract runs against whichever database the connection names.\n*/\nvar MysqlDatabase = class extends SqlNamespaceBase {\n\tid;\n\tentries;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.id = input.id;\n\t\tconst dispatched = hydrateNamespaceEntities(input.entries, /* @__PURE__ */ new Map([[\"table\", tableEntityKind]]), \"carry\");\n\t\tthis.entries = Object.freeze(blindCast(dispatched));\n\t\tObject.defineProperty(this, \"kind\", {\n\t\t\tvalue: MYSQL_NAMESPACE_KIND,\n\t\t\twritable: false,\n\t\t\tenumerable: false,\n\t\t\tconfigurable: true\n\t\t});\n\t\tfreezeNode(this);\n\t}\n\tget table() {\n\t\treturn this.entries.table ?? Object.freeze({});\n\t}\n\tqualifier() {\n\t\treturn \"\";\n\t}\n\tqualifyTable(tableName) {\n\t\treturn quoteIdentifier(tableName);\n\t}\n};\nfunction isLoose(value) {\n\treturn typeof value === \"object\" && value !== null;\n}\nfunction enumMembersOf(namespace, tableName, columnName, column) {\n\tconst subject = `Column \"${tableName}\".\"${columnName}\"`;\n\tconst ref = column[\"valueSet\"];\n\tconst valueSetName = isLoose(ref) && ref[\"namespaceId\"] === namespace.id ? ref[\"entityName\"] : void 0;\n\tconst valueSet = typeof valueSetName === \"string\" ? namespace.entries[\"valueSet\"]?.[valueSetName] : void 0;\n\tconst values = isLoose(valueSet) ? valueSet[\"values\"] : void 0;\n\tif (!Array.isArray(values) || !values.every((value) => typeof value === \"string\")) throw mysqlError(\"CONTRACT.TYPE_PARAMS_INVALID\", `${subject} is a MySQL enum but has no enum whose text members it can list.`, {\n\t\twhy: \"A native MySQL enum column is written with its members, which come from the enum that types the column.\",\n\t\tfix: \"Type the column with a PSL enum or an enumType() whose members are text.\",\n\t\tmeta: {\n\t\t\ttable: tableName,\n\t\t\tcolumn: columnName\n\t\t}\n\t});\n\treturn values;\n}\nfunction isEnumColumn(column) {\n\treturn isLoose(column) && column[\"codecId\"] === \"mysql/enum@1\";\n}\nfunction sameMembers(left, right) {\n\treturn left.length === right.length && left.every((value, index) => value === right[index]);\n}\nfunction enumColumnWithMembers(namespace, tableName, columnName, column) {\n\tconst typeParams = isLoose(column[\"typeParams\"]) ? column[\"typeParams\"] : {};\n\tconst values = enumMembersOf(namespace, tableName, columnName, column);\n\tconst listed = typeParams[\"values\"];\n\tif (listed !== void 0 && !(Array.isArray(listed) && sameMembers(listed, values))) throw mysqlError(\"CONTRACT.TYPE_PARAMS_INVALID\", `Column \"${tableName}\".\"${columnName}\" lists enum members that differ from the members of the enum that types it.`, {\n\t\twhy: \"A MySQL enum column takes its members from its enum, in the order the enum declares them, so the database and the contract enforce the same members.\",\n\t\tfix: \"Remove the column’s own members, or make them equal the enum’s members in the same order.\",\n\t\tmeta: {\n\t\t\ttable: tableName,\n\t\t\tcolumn: columnName,\n\t\t\tcolumnValues: listed,\n\t\t\tvalueSetValues: values\n\t\t}\n\t});\n\treturn {\n\t\t...column,\n\t\ttypeParams: {\n\t\t\t...typeParams,\n\t\t\tvalues\n\t\t}\n\t};\n}\n/** The data types whose bare column type holds whole seconds. */\nconst PRECISION_DATA_TYPES = /* @__PURE__ */ new Set([\n\tmysqlDatetime.id,\n\tmysqlTimestamp.id,\n\tmysqlTime.id\n]);\nfunction isUnwrittenPrecisionColumn(column) {\n\tif (!isLoose(column) || !PRECISION_DATA_TYPES.has(column[\"dataType\"])) return false;\n\tconst typeParams = column[\"typeParams\"];\n\treturn !isLoose(typeParams) || typeParams[\"precision\"] === void 0;\n}\n/** A `datetime`, `timestamp` or `time` column with no precision written records 0, the fraction digits MySQL gives the bare type, so its codec writes a value MySQL does not round; a codec reference with no precision is a raw parameter's, which is written whole. */\nfunction withZeroPrecision(column) {\n\tconst typeParams = isLoose(column[\"typeParams\"]) ? column[\"typeParams\"] : {};\n\treturn {\n\t\t...column,\n\t\ttypeParams: {\n\t\t\t...typeParams,\n\t\t\tprecision: 0\n\t\t}\n\t};\n}\nfunction withFilledTypeParams(namespace, tableName, table) {\n\tif (!isLoose(table)) return table;\n\tconst columns = table[\"columns\"];\n\tif (!isLoose(columns) || !Object.values(columns).some((column) => isEnumColumn(column) || isUnwrittenPrecisionColumn(column))) return table;\n\tconst filled = Object.fromEntries(Object.entries(columns).map(([columnName, column]) => {\n\t\tif (isEnumColumn(column)) return [columnName, enumColumnWithMembers(namespace, tableName, columnName, column)];\n\t\tif (isUnwrittenPrecisionColumn(column)) return [columnName, withZeroPrecision(column)];\n\t\treturn [columnName, column];\n\t}));\n\treturn {\n\t\t...table,\n\t\tcolumns: filled\n\t};\n}\n/**\n* Writes the type parameters MySQL gives a column that the authored schema leaves out. Each MySQL enum column's members, from the value set the column names, go into its type parameters in the order the enum declares them, and a column whose own members differ from them is refused; the column's type is then `enum('A','B')`, so the database enforces the members and `db verify` sees a change to them as a change of the column's type. A `datetime`, `timestamp` or `time` column with no precision records precision 0.\n*/\nfunction fillTypeParams(input) {\n\tconst tables = input.entries[\"table\"];\n\tif (tables === void 0) return input;\n\treturn {\n\t\t...input,\n\t\tentries: {\n\t\t\t...input.entries,\n\t\t\ttable: Object.fromEntries(Object.entries(tables).map(([tableName, table]) => [tableName, withFilledTypeParams(input, tableName, table)]))\n\t\t}\n\t};\n}\n/**\n* The MySQL target's refusal of expression and partial indexes, which it neither writes nor introspects yet.\n*/\nfunction rejectSqlBodyIndexes(input) {\n\tfor (const [tableName, table] of Object.entries(input.entries[\"table\"] ?? {})) {\n\t\tconst indexes = isLoose(table) ? table[\"indexes\"] : void 0;\n\t\tfor (const index of Array.isArray(indexes) ? indexes : []) {\n\t\t\tif (!isLoose(index)) continue;\n\t\t\tif (index[\"expression\"] !== void 0 || index[\"where\"] !== void 0) throw mysqlError(\"CONTRACT.ARGUMENT_INVALID\", `MySQL does not support expression or partial indexes yet: index \"${String(index[\"name\"] ?? \"<unnamed>\")}\" on table \"${tableName}\" declares ${index[\"expression\"] !== void 0 ? \"an expression\" : \"a where predicate\"}. Use a fields-only index.`, { meta: { table: tableName } });\n\t\t}\n\t}\n}\n/**\n* The namespace factory the MySQL target hands `defineContract` and the PSL interpreter. MySQL has one namespace per connection, the framework's unbound slot.\n*/\nfunction mysqlCreateNamespace(input) {\n\tif (input.id !== UNBOUND_NAMESPACE_ID) throw mysqlError(\"CONTRACT.NAMESPACE_INVALID\", `The MySQL target has one namespace, \"${UNBOUND_NAMESPACE_ID}\"; it received \"${input.id}\".`, { meta: { received: input.id } });\n\trejectSqlBodyIndexes(input);\n\treturn new MysqlDatabase(fillTypeParams(input));\n}\n//#endregion\nexport { mysqlCreateNamespace as n, MysqlDatabase as t };\n\n//# sourceMappingURL=mysql-database-CHl9-oSL.mjs.map"],"mappings":";;;;;;;;AASA,MAAM,uBAAuB;;;;AAI7B,IAAI,gBAAgB,cAAc,iBAAiB;CAClD;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,KAAK,MAAM;EAChB,MAAM,aAAa,yBAAyB,MAAM,yBAAyB,IAAI,IAAI,CAAC,CAAC,SAAS,eAAe,CAAC,CAAC,GAAG,OAAO;EACzH,KAAK,UAAU,OAAO,OAAO,UAAU,UAAU,CAAC;EAClD,OAAO,eAAe,MAAM,QAAQ;GACnC,OAAO;GACP,UAAU;GACV,YAAY;GACZ,cAAc;EACf,CAAC;EACD,WAAW,IAAI;CAChB;CACA,IAAI,QAAQ;EACX,OAAO,KAAK,QAAQ,SAAS,OAAO,OAAO,CAAC,CAAC;CAC9C;CACA,YAAY;EACX,OAAO;CACR;CACA,aAAa,WAAW;EACvB,OAAO,gBAAgB,SAAS;CACjC;AACD;AACA,SAAS,QAAQ,OAAO;CACvB,OAAO,OAAO,UAAU,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C,KAAK,CAAC,WAAW,WAAW,CAAC,WAAW,qBAAqB,OAAO,WAAW,KAAK,CAAC,CAAC,CAAC;EACzI;CACD;AACD;;;;AAIA,SAAS,qBAAqB,OAAO;CACpC,KAAK,MAAM,CAAC,WAAW,UAAU,OAAO,QAAQ,MAAM,QAAQ,YAAY,CAAC,CAAC,GAAG;EAC9E,MAAM,UAAU,QAAQ,KAAK,IAAI,MAAM,aAAa,KAAK;EACzD,KAAK,MAAM,SAAS,MAAM,QAAQ,OAAO,IAAI,UAAU,CAAC,GAAG;GAC1D,IAAI,CAAC,QAAQ,KAAK,GAAG;GACrB,IAAI,MAAM,kBAAkB,KAAK,KAAK,MAAM,aAAa,KAAK,GAAG,MAAM,WAAW,6BAA6B,oEAAoE,OAAO,MAAM,WAAW,WAAW,EAAE,cAAc,UAAU,aAAa,MAAM,kBAAkB,KAAK,IAAI,kBAAkB,oBAAoB,6BAA6B,EAAE,MAAM,EAAE,OAAO,UAAU,EAAE,CAAC;EAChY;CACD;AACD;;;;AAIA,SAAS,qBAAqB,OAAO;CACpC,IAAI,MAAM,OAAO,sBAAsB,MAAM,WAAW,8BAA8B,wCAAwC,qBAAqB,kBAAkB,MAAM,GAAG,KAAK,EAAE,MAAM,EAAE,UAAU,MAAM,GAAG,EAAE,CAAC;CACnN,qBAAqB,KAAK;CAC1B,OAAO,IAAI,cAAc,eAAe,KAAK,CAAC;AAC/C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"nodes-CvcX47ot-B-ZaUYRj.mjs","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/nodes-CvcX47ot.mjs"],"sourcesContent":["import { DdlNode } from \"@internal/sql-relational-core/ast\";\n//#region src/core/ddl/nodes.ts\nvar MysqlDdlNode = class extends DdlNode {};\nvar MysqlCreateTable = class extends MysqlDdlNode {\n\tkind = \"create-table\";\n\ttable;\n\tifNotExists;\n\tcolumns;\n\tconstraints;\n\tconstructor(options) {\n\t\tsuper();\n\t\tthis.table = options.table;\n\t\tthis.ifNotExists = options.ifNotExists;\n\t\tthis.columns = Object.freeze([...options.columns]);\n\t\tthis.constraints = options.constraints === void 0 ? void 0 : Object.freeze([...options.constraints]);\n\t\tthis.freeze();\n\t}\n\taccept(visitor) {\n\t\treturn visitor.createTable(this);\n\t}\n};\n//#endregion\nexport { MysqlDdlNode as n, MysqlCreateTable as t };\n\n//# sourceMappingURL=nodes-CvcX47ot.mjs.map"],"mappings":";;AAEA,IAAI,eAAe,cAAc,QAAQ,CAAC;AAC1C,IAAI,mBAAmB,cAAc,aAAa;CACjD,OAAO;CACP;CACA;CACA;CACA;CACA,YAAY,SAAS;EACpB,MAAM;EACN,KAAK,QAAQ,QAAQ;EACrB,KAAK,cAAc,QAAQ;EAC3B,KAAK,UAAU,OAAO,OAAO,CAAC,GAAG,QAAQ,OAAO,CAAC;EACjD,KAAK,cAAc,QAAQ,gBAAgB,KAAK,IAAI,KAAK,IAAI,OAAO,OAAO,CAAC,GAAG,QAAQ,WAAW,CAAC;EACnG,KAAK,OAAO;CACb;CACA,OAAO,SAAS;EACf,OAAO,QAAQ,YAAY,IAAI;CAChC;AACD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"nodes-xc0cR0_c-2YbhgEjb.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/nodes-xc0cR0_c.d.mts"],"mappings":";;;UAEU,gBAAgB;EACxB,YAAY,MAAM,mBAAmB;;uBAEhB,qBAAqB;WACjC,OAAO,GAAG,SAAS,gBAAgB,KAAK;;cAErC,yBAAyB;WAC5B;WACA;WACA;WACA,SAAS,cAAc;WACvB,aAAa,cAAc;EACpC,YAAY;aACD;aACA;aACA,kBAAkB;aAClB,uBAAuB;;EAElC,OAAO,GAAG,SAAS,gBAAgB,KAAK;;KAErC,kBAAkB"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"now-expression-DVD18CUc-00buJUto.mjs","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/now-expression-DVD18CUc.mjs"],"sourcesContent":["import { S as mysqlTimestamp, b as mysqlTime, i as mysqlChar, l as mysqlDatetime, s as mysqlDate, v as mysqlText, w as mysqlVarchar } from \"./data-types-DOaaPS93.mjs\";\nimport { sqlRawDataType } from \"@internal/sql-contract/data-type\";\n//#region src/core/now-expression.ts\n/** The name of the current instant, as a contract writes it. */\nconst MYSQL_INSTANT_NOW = \"now()\";\n/** The name a `now()` default on a `date` column reads back as: MySQL reports `curdate()`, which writes a date, not an instant. */\nconst MYSQL_DATE_NOW = \"CURRENT_DATE\";\n/** The name a `now()` default on a `time` column reads back as: MySQL reports `curtime(p)`, which writes a time of day. */\nconst MYSQL_TIME_NOW = \"CURRENT_TIME\";\nconst CURRENT_VALUE_BY_DATA_TYPE = /* @__PURE__ */ new Map([\n\t[mysqlDatetime.id, MYSQL_INSTANT_NOW],\n\t[mysqlTimestamp.id, MYSQL_INSTANT_NOW],\n\t[mysqlDate.id, MYSQL_DATE_NOW],\n\t[mysqlTime.id, MYSQL_TIME_NOW],\n\t[mysqlText.id, MYSQL_INSTANT_NOW],\n\t[mysqlVarchar.id, MYSQL_INSTANT_NOW],\n\t[mysqlChar.id, MYSQL_INSTANT_NOW],\n\t[sqlRawDataType.id, MYSQL_INSTANT_NOW]\n]);\n/**\n* The current value a `now()` default writes on a column of `dataTypeId`: the current date on `mysql/date`, the current time of day on `mysql/time`, and the current instant on `datetime`, `timestamp`, text, a raw column, whose values Prisma does not read, and a column of no known data type. `undefined` on a data type that stores no date or time, such as `mysql/int` or `mysql/duration`, as PostgreSQL refuses `now()` on an `integer` or an `interval` column.\n*/\nfunction mysqlCurrentValueFor(dataTypeId) {\n\treturn dataTypeId === void 0 ? MYSQL_INSTANT_NOW : CURRENT_VALUE_BY_DATA_TYPE.get(dataTypeId);\n}\n/** The MySQL expression for a current value, with the column's fraction digits, which MySQL requires to match the column's. */\nfunction mysqlNowExpression(current, precision) {\n\tconst digits = precision === void 0 || precision === 0 ? \"\" : `(${precision})`;\n\tswitch (current) {\n\t\tcase MYSQL_INSTANT_NOW: return `CURRENT_TIMESTAMP${digits}`;\n\t\tcase MYSQL_DATE_NOW: return \"CURRENT_DATE\";\n\t\tcase MYSQL_TIME_NOW: return `CURRENT_TIME${digits}`;\n\t}\n}\n//#endregion\nexport { mysqlNowExpression as a, mysqlCurrentValueFor as i, MYSQL_INSTANT_NOW as n, MYSQL_TIME_NOW as r, MYSQL_DATE_NOW as t };\n\n//# sourceMappingURL=now-expression-DVD18CUc.mjs.map"],"mappings":";;;;AAIA,MAAM,oBAAoB;;AAE1B,MAAM,iBAAiB;;AAEvB,MAAM,iBAAiB;AACvB,MAAM,6CAA6C,IAAI,IAAI;CAC1D,CAAC,cAAc,IAAI,iBAAiB;CACpC,CAAC,eAAe,IAAI,iBAAiB;CACrC,CAAC,UAAU,IAAI,cAAc;CAC7B,CAAC,UAAU,IAAI,cAAc;CAC7B,CAAC,UAAU,IAAI,iBAAiB;CAChC,CAAC,aAAa,IAAI,iBAAiB;CACnC,CAAC,UAAU,IAAI,iBAAiB;CAChC,CAAC,eAAe,IAAI,iBAAiB;AACtC,CAAC;;;;AAID,SAAS,qBAAqB,YAAY;CACzC,OAAO,eAAe,KAAK,IAAI,oBAAoB,2BAA2B,IAAI,UAAU;AAC7F;;AAEA,SAAS,mBAAmB,SAAS,WAAW;CAC/C,MAAM,SAAS,cAAc,KAAK,KAAK,cAAc,IAAI,KAAK,IAAI,UAAU;CAC5E,QAAQ,SAAR;EACC,KAAK,mBAAmB,OAAO,oBAAoB;EACnD,KAAK,gBAAgB,OAAO;EAC5B,KAAK,gBAAgB,OAAO,eAAe;CAC5C;AACD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"pack-BXvLVBWP.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/pack.d.mts"],"mappings":";;;;;;;;;;;KAWK;UACK;WACC,MAAM;WACN;;;;;KAKN;;;UAGK;WACC;WACA,MAAM;WACN;;UAED;WACC;WACA,MAAM;WACN,UAAU,cAAc;WACxB;;KAEN,eAAe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,cAAc,MAAM,aAAa;EACjC,QAAQ,MAAM,aAAa;;;;cAIf;WACH;WACA;WACA;WACA;aACE;eACE;iBACE;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;qBAGJ;uBACE;uBACA;;;;iBAIN;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;yBACE;;;qBAGJ;uBACE;uBACA;;qBAEF;uBACE;uBACA;;;;;eAKR;iBACE;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;iBAKR;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;;eAMV;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;mBACA;;mBAEA;mBACA;mBACA;mBACA;mBACA;;mBAEA;mBACA;mBACA;mBACA;;iBAEF;mBACE;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;mBAGF;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;mBAGF;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;mBAGF;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;mBAGF;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;mBAGF;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;;eAIN;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;mBACA;;mBAEA;mBACA;mBACA;mBACA;mBACA;;iBAEF;mBACE;qBACE;qBACA;;mBAEF;;mBAEA;qBACE;qBACA;;mBAEF;;;eAGJ;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;mBACA;;mBAEA;mBACA;mBACA;mBACA;mBACA;;mBAEA;mBACA;mBACA;mBACA;;iBAEF;mBACE;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;mBAGF;qBACE;qBACA;;mBAEF;mBACA;qBACE;;;;eAIN;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;mBACA;;mBAEA;mBACA;mBACA;mBACA;mBACA;;iBAEF;mBACE;qBACE;qBACA;;mBAEF;;;eAGJ;iBACE;iBACA;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;mBACE;mBACA;mBACA;mBACA;;iBAEF;mBACE;mBACA;qBACE;uBACE;uBACA;;;;;eAKR;iBACE;iBACA;iBACA;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;iBACA;iBACA;mBACE;;;eAGJ;iBACE;iBACA;iBACA;iBACA;mBACE;;;;aAIN,WAAW,SAAS,kEAAkE;aACtF,uEAAuE;;WAEzE;aACE;aACA,YAAY,8DAA8D;eACxE;eACA;iBACE;iBACA,MAAM,uBAAuB,cAAc,eAAe;iBAC1D;;;aAGJ;;aAEA;aACA,YAAY,8DAA8D;eACxE;eACA;iBACE;iBACA,MAAM,WAAW;iBACjB;;;aAGJ;;aAEA;aACA,YAAY,8DAA8D;eACxE;eACA;iBACE;iBACA,MAAM,wBAAwB,cAAc,gBAAgB;iBAC5D;;;aAGJ;;aAEA;aACA,8DAA8D;4DACf;WACjD;aACE,yBAAyB;aACzB,gFAAgF;;WAElF;WACA;WACA;WACA;WACA;WACA;WACA,mEAAmE;WACnE;aACE;aACA;;WAEF,eAAe;;cAEZ,kCAAkC;WACrC,eAAe;WACf;aACE;eACE;eACA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"planner-target-details-D6g2uSp--C5NKHmCc.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/planner-target-details-D6g2uSp-.d.mts"],"mappings":";;KACK;;UAEK;WACC,YAAY;WACZ;WACA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"require-temporal-DeDQhbTn-Bxc65WbA.mjs","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/require-temporal-DeDQhbTn.mjs"],"sourcesContent":["import { a as errorTemporalUnavailableForDefault, i as errorTemporalUnavailable } from \"./errors-Cng94tYg.mjs\";\nimport { findTemporal } from \"@internal/type-implementations/temporal\";\n//#region src/core/require-temporal.ts\n/**\n* The `Temporal` to use: the runtime's own when it has one, else the fallback. Throws\n* `RUNTIME.TEMPORAL_UNAVAILABLE` when there is neither.\n*/\nfunction requireTemporal(meta) {\n\tconst temporal = findTemporal();\n\tif (temporal !== void 0) return temporal;\n\tthrow \"generatorId\" in meta ? errorTemporalUnavailableForDefault(meta.generatorId) : errorTemporalUnavailable(meta.codecId, meta.operation);\n}\n//#endregion\nexport { requireTemporal as t };\n\n//# sourceMappingURL=require-temporal-DeDQhbTn.mjs.map"],"mappings":";;;;;;;AAOA,SAAS,gBAAgB,MAAM;CAC9B,MAAM,WAAW,aAAa;CAC9B,IAAI,aAAa,KAAK,GAAG,OAAO;CAChC,MAAM,iBAAiB,OAAO,mCAAmC,KAAK,WAAW,IAAI,yBAAyB,KAAK,SAAS,KAAK,SAAS;AAC3I"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"runner-C39AEe6--BVG3xPYw.mjs","names":["#written","#calls","#meta","#spaceId","#snapshotsImportPath","#destination","#lowerer","#operationsCache","#planSql","#applySpaces","#applySpace","#checkDestination","#checkPolicy","#ensureControlTables","#checkOrigin","#applyOperations","#writeMarkerAndLedger","#allHold","#runChecks","#runSteps","#writeLedger"],"sources":["../../../../3-targets/mysql/1-target/dist/runner-C39AEe6-.mjs"],"sourcesContent":["import { s as mysqlError } from \"./errors-Cng94tYg.mjs\";\nimport { n as quoteIdentifier } from \"./sql-utils-Cmv_TVa8.mjs\";\nimport { t as CONTROL_TABLE_NAMES } from \"./control-tables-CcQ77JE7.mjs\";\nimport { t as createTable } from \"./ddl-DDmMHyA_.mjs\";\nimport { t as mysqlResolveDefault } from \"./default-normalizer-C8pc7SbL.mjs\";\nimport { i as withMarkerLock } from \"./marker-lock-Bwew7cAs.mjs\";\nimport { dataTypeParams } from \"@internal/framework-components/codec\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError, isInternalError } from \"@internal/utils/internal-error\";\nimport { isStructuredError } from \"@internal/utils/structured-error\";\nimport { DdlColumn, FunctionColumnDefault, LiteralColumnDefault, PrimaryKeyConstraint, UniqueConstraint, opaqueSql } from \"@internal/sql-relational-core/ast\";\nimport { isSqlDataType, renderSqlTypeName } from \"@internal/sql-contract/data-type\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { contractSnapshotJsonSpecifier, contractSnapshotTypesSpecifier, diffSchemas, expectAbsent, expectPresent, failedPostcheckWhy, failedPrecheckWhy, issueOutcome, migrationRunnerFailure, orderIssuesByDependencies, schemaCheckWhy, withDatabaseUnchanged, withFailingSpace } from \"@internal/framework-components/control\";\nimport { NO_RENAMED_ORIGINS, contractToSchemaIR, createSqlTextSources, plannerFailure, runnerFailure, runnerSuccess, sqlTypeLookupsOf, subjectsOfCalls } from \"@internal/family-sql/control\";\nimport { RelationalSchemaNodeKind, SqlSchemaIR, sqlColumnTypesEqual } from \"@internal/sql-schema-ir/types\";\nimport { UNBOUND_NAMESPACE_ID, entityAt } from \"@internal/framework-components/ir\";\nimport { notOk, ok, okVoid } from \"@internal/utils/result\";\nimport { TsExpression, jsonToTsSource, renderImports } from \"@internal/ts-render\";\nimport { REFERENTIAL_ACTION_SQL } from \"@internal/sql-contract/referential-action-sql\";\nimport { Migration } from \"@internal/family-sql/migration\";\nimport { isThenable } from \"@internal/utils/promise\";\nimport { resolveRequirementSpecifiers } from \"@internal/framework-components/emission\";\nimport { detectScaffoldRuntime, shebangLineFor } from \"@internal/migration-tools/migration-ts\";\n//#region src/core/migrations/diff-database-schema.ts\n/**\n* The schema IR a contract describes on MySQL: one flat tree of tables, each column typed by the data type its codec represents. A MySQL database holds no schemas, so foreign keys name no referenced schema, as introspection reports them.\n*/\nfunction mysqlContractToSchema(contract, types) {\n\treturn contractToSchemaIR(contract, {\n\t\tannotationNamespace: \"mysql\",\n\t\tresolveDefault: mysqlResolveDefault,\n\t\tdataTypeLookup: types.dataTypeLookup,\n\t\tcodecLookup: types.codecLookup\n\t});\n}\n/** The control policy of the table an issue is about. The tree is flat, so the table's name is the second segment of the issue's path. */\nfunction resolveControlPolicy(issue, contract) {\n\tconst tableName = issue.path[1];\n\tif (tableName === void 0) return void 0;\n\tfor (const namespaceId of Object.keys(contract.storage.namespaces)) {\n\t\tconst table = entityAt(contract.storage, {\n\t\t\tnamespaceId,\n\t\t\tentityKind: \"table\",\n\t\t\tentityName: tableName\n\t\t});\n\t\tif (table !== void 0) return table.control;\n\t}\n}\n/** The full-tree diff `db verify` derives its verdict from: the contract's tree against the one introspection built. */\nfunction diffMysqlSchema(input) {\n\tif (!(input.schema instanceof SqlSchemaIR)) throw mysqlError(\"CONTRACT.TARGET_MISMATCH\", \"The MySQL schema diff received a schema tree that MySQL introspection did not build.\");\n\tconst expected = mysqlContractToSchema(input.contract, sqlTypeLookupsOf(input.frameworkComponents));\n\tconst actual = input.schema;\n\tconst namespacesWithTables = Object.values(input.contract.storage.namespaces).filter((ns) => Object.keys(ns.entries.table ?? {}).length > 0);\n\treturn {\n\t\tissues: diffSchemas(expected, actual),\n\t\tresolveControlPolicy: (issue) => resolveControlPolicy(issue, input.contract),\n\t\tnamespacePairs: namespacesWithTables.map(() => ({ actual }))\n\t};\n}\n//#endregion\n//#region src/core/migrations/column-ddl.ts\n/** The type DDL writes for a column node: the type it is stored as, with the parameters the contract writes, as MySQL reports it in `COLUMN_TYPE`. */\nfunction columnTypeSql(column) {\n\tconst type = column.storedType;\n\tif (type === void 0 || !isSqlDataType(type)) throw new InternalError(`column \"${column.name}\" has no data type; the expected tree must be derived via contractToSchemaIR for planning`);\n\treturn renderSqlTypeName(type, dataTypeParams(type, column.codecRef?.typeParams));\n}\nfunction ddlDefaultOf(columnDefault) {\n\tif (columnDefault === void 0) return void 0;\n\treturn columnDefault.kind === \"literal\" ? new LiteralColumnDefault(columnDefault.value) : new FunctionColumnDefault(opaqueSql(columnDefault.expression));\n}\n/** The default a column node's DDL writes: the one the contract authored, which `resolvedDefault` normalises for the diff. */\nfunction columnDefaultOf(column) {\n\treturn column.authoredDefault ?? column.resolvedDefault;\n}\n/** The `DdlColumn` of a column node. An `autoincrement()` default stays a function default, which the adapter writes as `AUTO_INCREMENT`. */\nfunction ddlColumnFromNode(column) {\n\tconst columnDefault = ddlDefaultOf(columnDefaultOf(column));\n\treturn new DdlColumn({\n\t\tname: column.name,\n\t\ttype: columnTypeSql(column),\n\t\t...column.nullable ? {} : { notNull: true },\n\t\t...columnDefault === void 0 ? {} : { default: columnDefault },\n\t\t...column.codecRef === void 0 ? {} : { codecRef: column.codecRef }\n\t});\n}\n/** The name a unique constraint is created and dropped by; MySQL names an unnamed one after its first column, which the contract never leaves to it. */\nfunction uniqueName(table, unique) {\n\treturn unique.name ?? `${table}_${unique.columns.join(\"_\")}_key`;\n}\n/** The constraints `CREATE TABLE` writes for a table node: its primary key and unique constraints. Foreign keys are added after every table exists, so tables can reference each other. */\nfunction tableConstraintsFromNode(table) {\n\treturn [...table.primaryKey === void 0 ? [] : [new PrimaryKeyConstraint({ columns: table.primaryKey.columns })], ...table.uniques.map((unique) => new UniqueConstraint({\n\t\tcolumns: unique.columns,\n\t\tname: uniqueName(table.name, unique)\n\t}))];\n}\n//#endregion\n//#region src/core/migrations/operations.ts\nfunction step(description, sql, params, expectation) {\n\treturn {\n\t\tdescription,\n\t\tsql,\n\t\t...ifDefined(\"params\", params),\n\t\t...ifDefined(\"expectation\", expectation)\n\t};\n}\nconst IN_DATABASE = \"TABLE_SCHEMA = DATABASE()\";\nfunction count(from, where, params) {\n\treturn {\n\t\tsql: `SELECT COUNT(*) FROM information_schema.${from} WHERE ${IN_DATABASE} AND ${where}`,\n\t\tparams\n\t};\n}\nfunction present(query) {\n\treturn {\n\t\tsql: `SELECT (${query.sql}) > 0 AS result`,\n\t\tparams: query.params\n\t};\n}\nfunction absent(query) {\n\treturn {\n\t\tsql: `SELECT (${query.sql}) = 0 AS result`,\n\t\tparams: query.params\n\t};\n}\nconst tableQuery = (table) => count(\"TABLES\", \"TABLE_NAME = ?\", [table]);\nconst columnQuery = (table, column) => count(\"COLUMNS\", \"TABLE_NAME = ? AND COLUMN_NAME = ?\", [table, column]);\nconst indexQuery = (table, index) => count(\"STATISTICS\", \"TABLE_NAME = ? AND INDEX_NAME = ?\", [table, index]);\nconst constraintQuery = (table, name, type) => count(\"TABLE_CONSTRAINTS\", \"TABLE_NAME = ? AND CONSTRAINT_NAME = ? AND CONSTRAINT_TYPE = ?\", [\n\ttable,\n\tname,\n\ttype\n]);\n/** A step that holds when `query` finds the object, or finds none, as `holds` says. */\nfunction check(description, query, holds, object) {\n\tconst { sql, params } = holds === \"present\" ? present(query) : absent(query);\n\treturn step(description, sql, params, holds === \"present\" ? expectPresent(object) : expectAbsent(object));\n}\nconst tableChecks = (table) => ({\n\tpresent: (description) => check(description, tableQuery(table), \"present\", `table \"${table}\"`),\n\tabsent: (description) => check(description, tableQuery(table), \"absent\", `table \"${table}\"`)\n});\nconst columnChecks = (table, column) => ({\n\tpresent: (description) => check(description, columnQuery(table, column), \"present\", `column \"${column}\" on \"${table}\"`),\n\tabsent: (description) => check(description, columnQuery(table, column), \"absent\", `column \"${column}\" on \"${table}\"`)\n});\nconst indexChecks = (table, index) => ({\n\tpresent: (description) => check(description, indexQuery(table, index), \"present\", `index \"${index}\" on \"${table}\"`),\n\tabsent: (description) => check(description, indexQuery(table, index), \"absent\", `index \"${index}\" on \"${table}\"`)\n});\nconst constraintChecks = (table, name, type) => {\n\tconst object = `${type === \"UNIQUE\" ? \"unique constraint\" : \"foreign key\"} \"${name}\" on \"${table}\"`;\n\treturn {\n\t\tpresent: (description) => check(description, constraintQuery(table, name, type), \"present\", object),\n\t\tabsent: (description) => check(description, constraintQuery(table, name, type), \"absent\", object)\n\t};\n};\nfunction columnList(columns) {\n\treturn columns.map(quoteIdentifier).join(\", \");\n}\n/** The column definition `ALTER TABLE … ADD COLUMN` writes, with the default the adapter renders through the column's codec. */\nasync function columnDefinitionSql(column, table, lowerer) {\n\tconst defaultClause = await lowerer.renderColumnDefault(column, table);\n\treturn [\n\t\tquoteIdentifier(column.name),\n\t\tcolumn.type,\n\t\t...column.notNull ? [\"NOT NULL\"] : [],\n\t\t...defaultClause.length > 0 ? [defaultClause] : []\n\t].join(\" \");\n}\nfunction foreignKeyActionsSql(actions) {\n\treturn [...actions.onDelete === void 0 ? [] : [` ON DELETE ${REFERENTIAL_ACTION_SQL[actions.onDelete]}`], ...actions.onUpdate === void 0 ? [] : [` ON UPDATE ${REFERENTIAL_ACTION_SQL[actions.onUpdate]}`]].join(\"\");\n}\n/** An operation written out in full in `migration.ts`, such as a table rename made by hand. */\nfunction rawSql(op) {\n\treturn op;\n}\n//#endregion\n//#region src/core/migrations/planner-target-details.ts\nfunction buildTargetDetails(objectType, name, table) {\n\treturn {\n\t\tobjectType,\n\t\tname,\n\t\t...ifDefined(\"table\", table)\n\t};\n}\n//#endregion\n//#region src/core/migrations/op-factory-call.ts\nconst TARGET_MIGRATION_MODULE = \"@internal/mysql/migration\";\n/** The refusal of a `MysqlMigration` operation that needs the control adapter, on an instance built without a control stack. */\nfunction mysqlMigrationStackMissing(operation) {\n\treturn mysqlError(\"MIGRATION.MYSQL_CONTROL_STACK_MISSING\", `MysqlMigration.${operation} requires a control adapter`, {\n\t\twhy: `MysqlMigration.${operation} was invoked on an instance constructed without a ControlStack, so it cannot render its DDL.`,\n\t\tfix: \"Construct the migration via the migration CLI entrypoint, which assembles a ControlStack from prisma.config.ts, or pass a ControlStack with a MySQL adapter to the migration constructor in test fixtures.\",\n\t\tmeta: { operation }\n\t});\n}\nvar MysqlOpFactoryCallNode = class extends TsExpression {\n\timportRequirements() {\n\t\treturn [];\n\t}\n\tfreeze() {\n\t\tObject.freeze(this);\n\t}\n\tlowererFor(lowerer) {\n\t\tif (lowerer === void 0) throw mysqlMigrationStackMissing(this.factoryName);\n\t\treturn lowerer;\n\t}\n};\n/** Whether `call` is one of this target's calls. */\nfunction isMysqlOpFactoryCall(call) {\n\treturn call instanceof MysqlOpFactoryCallNode;\n}\nfunction renderColumnDefault(def, sql) {\n\treturn def.kind === \"literal\" ? `lit(${jsonToTsSource(def.value)})` : `fn(${sql.source(def.expression.text)})`;\n}\nfunction renderColumn(column, sql) {\n\tconst options = [\n\t\t...column.notNull ? [\"notNull: true\"] : [],\n\t\t...column.default === void 0 ? [] : [`default: ${renderColumnDefault(column.default, sql)}`],\n\t\t...column.codecRef === void 0 ? [] : [`codecRef: ${jsonToTsSource(column.codecRef)}`]\n\t];\n\tconst optionsSource = options.length > 0 ? `, { ${options.join(\", \")} }` : \"\";\n\treturn `col(${jsonToTsSource(column.name)}, ${jsonToTsSource(column.type)}${optionsSource})`;\n}\nfunction renderConstraint(constraint) {\n\tconst named = constraint.name === void 0 ? \"\" : `, { name: ${jsonToTsSource(constraint.name)} }`;\n\tswitch (constraint.kind) {\n\t\tcase \"primary-key\": return `primaryKey(${jsonToTsSource(constraint.columns)}${named})`;\n\t\tcase \"unique\": return `unique(${jsonToTsSource(constraint.columns)}${named})`;\n\t\tcase \"foreign-key\":\n\t\tcase \"check-expression\": throw mysqlError(\"CONTRACT.CONSTRAINT_INVALID\", `The MySQL createTable call writes primary keys and unique constraints only; add ${constraint.kind === \"foreign-key\" ? \"a foreign key with addForeignKey\" : \"no CHECK constraint\"} (constraint \"${constraint.name ?? \"\"}\").`, { meta: { constraintKind: constraint.kind } });\n\t}\n}\nfunction columnImports(columns) {\n\tconst symbols = new Set(columns.length > 0 ? [\"col\"] : []);\n\tfor (const column of columns) {\n\t\tif (column.default?.kind === \"literal\") symbols.add(\"lit\");\n\t\tif (column.default?.kind === \"function\") symbols.add(\"fn\");\n\t}\n\treturn [...symbols].map((symbol) => ({\n\t\tmoduleSpecifier: TARGET_MIGRATION_MODULE,\n\t\tsymbol\n\t}));\n}\nvar CreateTableCall = class extends MysqlOpFactoryCallNode {\n\ttableName;\n\tfactoryName = \"createTable\";\n\toperationClass = \"additive\";\n\tlabel;\n\tcolumns;\n\tconstraints;\n\tconstructor(tableName, columns, constraints) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.columns = Object.freeze([...columns]);\n\t\tthis.constraints = Object.freeze([...constraints]);\n\t\tthis.label = `Create table ${tableName}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tconst statement = await this.lowererFor(lowerer).lowerToExecuteRequest(createTable({\n\t\t\ttable: this.tableName,\n\t\t\tcolumns: this.columns,\n\t\t\tconstraints: this.constraints\n\t\t}));\n\t\tconst table = tableChecks(this.tableName);\n\t\treturn {\n\t\t\tid: `table.${this.tableName}`,\n\t\t\tlabel: this.label,\n\t\t\tsummary: `Creates table ${this.tableName} with its columns, primary key and unique constraints`,\n\t\t\toperationClass: \"additive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"mysql\",\n\t\t\t\tdetails: buildTargetDetails(\"table\", this.tableName)\n\t\t\t},\n\t\t\tprecheck: [table.absent(`ensure table \"${this.tableName}\" does not exist`)],\n\t\t\texecute: [step(`create table \"${this.tableName}\"`, statement.sql, statement.params)],\n\t\t\tpostcheck: [table.present(`verify table \"${this.tableName}\" exists`)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn this.#written().source;\n\t}\n\timportRequirements() {\n\t\treturn this.#written().imports;\n\t}\n\t#written() {\n\t\tconst sql = createSqlTextSources(TARGET_MIGRATION_MODULE);\n\t\tconst columns = this.columns.map((column) => renderColumn(column, sql)).join(\", \");\n\t\tconst constraints = this.constraints.map(renderConstraint);\n\t\tconst source = `this.createTable({ table: ${jsonToTsSource(this.tableName)}, columns: [${columns}]${constraints.length > 0 ? `, constraints: [${constraints.join(\", \")}]` : \"\"} })`;\n\t\tconst constraintImports = [...new Set(this.constraints.map((c) => c.kind === \"primary-key\" ? \"primaryKey\" : \"unique\"))].map((symbol) => ({\n\t\t\tmoduleSpecifier: TARGET_MIGRATION_MODULE,\n\t\t\tsymbol\n\t\t}));\n\t\treturn {\n\t\t\tsource,\n\t\t\timports: [\n\t\t\t\t...columnImports(this.columns),\n\t\t\t\t...constraintImports,\n\t\t\t\t...sql.imports()\n\t\t\t]\n\t\t};\n\t}\n};\nvar DropTableCall = class extends MysqlOpFactoryCallNode {\n\ttableName;\n\tfactoryName = \"dropTable\";\n\toperationClass = \"destructive\";\n\tlabel;\n\tconstructor(tableName) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.label = `Drop table ${tableName}`;\n\t\tthis.freeze();\n\t}\n\ttoOp() {\n\t\tconst table = tableChecks(this.tableName);\n\t\treturn {\n\t\t\tid: `dropTable.${this.tableName}`,\n\t\t\tlabel: this.label,\n\t\t\tsummary: `Drops table ${this.tableName} which is not in the contract`,\n\t\t\toperationClass: \"destructive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"mysql\",\n\t\t\t\tdetails: buildTargetDetails(\"table\", this.tableName)\n\t\t\t},\n\t\t\tprecheck: [table.present(`ensure table \"${this.tableName}\" exists`)],\n\t\t\texecute: [step(`drop table \"${this.tableName}\"`, `DROP TABLE ${quoteIdentifier(this.tableName)}`)],\n\t\t\tpostcheck: [table.absent(`verify table \"${this.tableName}\" is gone`)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.dropTable({ table: ${jsonToTsSource(this.tableName)} })`;\n\t}\n};\nvar AddColumnCall = class extends MysqlOpFactoryCallNode {\n\ttableName;\n\tcolumn;\n\tfactoryName = \"addColumn\";\n\toperationClass = \"additive\";\n\tlabel;\n\tcolumnName;\n\tconstructor(tableName, column) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.column = column;\n\t\tthis.columnName = column.name;\n\t\tthis.label = `Add column ${column.name} on ${tableName}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tconst definition = await columnDefinitionSql(this.column, this.tableName, this.lowererFor(lowerer));\n\t\tconst column = columnChecks(this.tableName, this.columnName);\n\t\treturn {\n\t\t\tid: `column.${this.tableName}.${this.columnName}`,\n\t\t\tlabel: this.label,\n\t\t\tsummary: `Adds column ${this.columnName} to ${this.tableName}`,\n\t\t\toperationClass: \"additive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"mysql\",\n\t\t\t\tdetails: buildTargetDetails(\"column\", this.columnName, this.tableName)\n\t\t\t},\n\t\t\tprecheck: [tableChecks(this.tableName).present(`ensure table \"${this.tableName}\" exists`), column.absent(`ensure column \"${this.columnName}\" is missing on \"${this.tableName}\"`)],\n\t\t\texecute: [step(`add column \"${this.columnName}\" to \"${this.tableName}\"`, `ALTER TABLE ${quoteIdentifier(this.tableName)} ADD COLUMN ${definition}`)],\n\t\t\tpostcheck: [column.present(`verify column \"${this.columnName}\" exists on \"${this.tableName}\"`)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn this.#written().source;\n\t}\n\timportRequirements() {\n\t\treturn this.#written().imports;\n\t}\n\t#written() {\n\t\tconst sql = createSqlTextSources(TARGET_MIGRATION_MODULE);\n\t\treturn {\n\t\t\tsource: `this.addColumn({ table: ${jsonToTsSource(this.tableName)}, column: ${renderColumn(this.column, sql)} })`,\n\t\t\timports: [...columnImports([this.column]), ...sql.imports()]\n\t\t};\n\t}\n};\nvar DropColumnCall = class extends MysqlOpFactoryCallNode {\n\ttableName;\n\tcolumnName;\n\tfactoryName = \"dropColumn\";\n\toperationClass = \"destructive\";\n\tlabel;\n\tconstructor(tableName, columnName) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.columnName = columnName;\n\t\tthis.label = `Drop column ${columnName} on ${tableName}`;\n\t\tthis.freeze();\n\t}\n\ttoOp() {\n\t\tconst column = columnChecks(this.tableName, this.columnName);\n\t\treturn {\n\t\t\tid: `dropColumn.${this.tableName}.${this.columnName}`,\n\t\t\tlabel: this.label,\n\t\t\tsummary: `Drops column ${this.columnName} on ${this.tableName} which is not in the contract`,\n\t\t\toperationClass: \"destructive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"mysql\",\n\t\t\t\tdetails: buildTargetDetails(\"column\", this.columnName, this.tableName)\n\t\t\t},\n\t\t\tprecheck: [column.present(`ensure column \"${this.columnName}\" exists on \"${this.tableName}\"`)],\n\t\t\texecute: [step(`drop column \"${this.columnName}\" from \"${this.tableName}\"`, `ALTER TABLE ${quoteIdentifier(this.tableName)} DROP COLUMN ${quoteIdentifier(this.columnName)}`)],\n\t\t\tpostcheck: [column.absent(`verify column \"${this.columnName}\" is gone from \"${this.tableName}\"`)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.dropColumn({ table: ${jsonToTsSource(this.tableName)}, column: ${jsonToTsSource(this.columnName)} })`;\n\t}\n};\nvar CreateIndexCall = class extends MysqlOpFactoryCallNode {\n\ttableName;\n\tindexName;\n\tcolumns;\n\tunique;\n\tfactoryName = \"createIndex\";\n\toperationClass = \"additive\";\n\tlabel;\n\tconstructor(tableName, indexName, columns, unique) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.indexName = indexName;\n\t\tthis.columns = columns;\n\t\tthis.unique = unique;\n\t\tthis.label = `Create ${unique ? \"unique \" : \"\"}index ${indexName} on ${tableName}`;\n\t\tthis.freeze();\n\t}\n\ttoOp() {\n\t\tconst index = indexChecks(this.tableName, this.indexName);\n\t\treturn {\n\t\t\tid: `index.${this.tableName}.${this.indexName}`,\n\t\t\tlabel: this.label,\n\t\t\tsummary: `Creates ${this.unique ? \"unique \" : \"\"}index ${this.indexName} on ${this.tableName}`,\n\t\t\toperationClass: \"additive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"mysql\",\n\t\t\t\tdetails: buildTargetDetails(\"index\", this.indexName, this.tableName)\n\t\t\t},\n\t\t\tprecheck: [index.absent(`ensure index \"${this.indexName}\" is missing`)],\n\t\t\texecute: [step(`create index \"${this.indexName}\"`, `CREATE ${this.unique ? \"UNIQUE \" : \"\"}INDEX ${quoteIdentifier(this.indexName)} ON ${quoteIdentifier(this.tableName)} (${columnList(this.columns)})`)],\n\t\t\tpostcheck: [index.present(`verify index \"${this.indexName}\" exists`)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.createIndex({ table: ${jsonToTsSource(this.tableName)}, index: ${jsonToTsSource(this.indexName)}, columns: ${jsonToTsSource(this.columns)}${this.unique ? \", unique: true\" : \"\"} })`;\n\t}\n};\nvar DropIndexCall = class extends MysqlOpFactoryCallNode {\n\ttableName;\n\tindexName;\n\tfactoryName = \"dropIndex\";\n\toperationClass = \"widening\";\n\tlabel;\n\tconstructor(tableName, indexName) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.indexName = indexName;\n\t\tthis.label = `Drop index ${indexName} on ${tableName}`;\n\t\tthis.freeze();\n\t}\n\ttoOp() {\n\t\tconst index = indexChecks(this.tableName, this.indexName);\n\t\treturn {\n\t\t\tid: `dropIndex.${this.tableName}.${this.indexName}`,\n\t\t\tlabel: this.label,\n\t\t\tsummary: `Drops index ${this.indexName} on ${this.tableName} which is not in the contract`,\n\t\t\toperationClass: \"widening\",\n\t\t\ttarget: {\n\t\t\t\tid: \"mysql\",\n\t\t\t\tdetails: buildTargetDetails(\"index\", this.indexName, this.tableName)\n\t\t\t},\n\t\t\tprecheck: [index.present(`ensure index \"${this.indexName}\" exists`)],\n\t\t\texecute: [step(`drop index \"${this.indexName}\"`, `DROP INDEX ${quoteIdentifier(this.indexName)} ON ${quoteIdentifier(this.tableName)}`)],\n\t\t\tpostcheck: [index.absent(`verify index \"${this.indexName}\" is gone`)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.dropIndex({ table: ${jsonToTsSource(this.tableName)}, index: ${jsonToTsSource(this.indexName)} })`;\n\t}\n};\nvar AddUniqueCall = class extends MysqlOpFactoryCallNode {\n\ttableName;\n\tconstraintName;\n\tcolumns;\n\tfactoryName = \"addUnique\";\n\toperationClass = \"additive\";\n\tlabel;\n\tconstructor(tableName, constraintName, columns) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.constraintName = constraintName;\n\t\tthis.columns = columns;\n\t\tthis.label = `Add unique constraint ${constraintName} on ${tableName}`;\n\t\tthis.freeze();\n\t}\n\ttoOp() {\n\t\tconst constraint = constraintChecks(this.tableName, this.constraintName, \"UNIQUE\");\n\t\treturn {\n\t\t\tid: `unique.${this.tableName}.${this.constraintName}`,\n\t\t\tlabel: this.label,\n\t\t\tsummary: `Adds unique constraint ${this.constraintName} on ${this.tableName}`,\n\t\t\toperationClass: \"additive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"mysql\",\n\t\t\t\tdetails: buildTargetDetails(\"unique\", this.constraintName, this.tableName)\n\t\t\t},\n\t\t\tprecheck: [constraint.absent(`ensure unique constraint \"${this.constraintName}\" is missing`)],\n\t\t\texecute: [step(`add unique constraint \"${this.constraintName}\"`, `ALTER TABLE ${quoteIdentifier(this.tableName)} ADD CONSTRAINT ${quoteIdentifier(this.constraintName)} UNIQUE (${columnList(this.columns)})`)],\n\t\t\tpostcheck: [constraint.present(`verify unique constraint \"${this.constraintName}\" exists`)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.addUnique({ table: ${jsonToTsSource(this.tableName)}, name: ${jsonToTsSource(this.constraintName)}, columns: ${jsonToTsSource(this.columns)} })`;\n\t}\n};\nvar DropUniqueCall = class extends MysqlOpFactoryCallNode {\n\ttableName;\n\tconstraintName;\n\tfactoryName = \"dropUnique\";\n\toperationClass = \"widening\";\n\tlabel;\n\tconstructor(tableName, constraintName) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.constraintName = constraintName;\n\t\tthis.label = `Drop unique constraint ${constraintName} on ${tableName}`;\n\t\tthis.freeze();\n\t}\n\ttoOp() {\n\t\tconst constraint = constraintChecks(this.tableName, this.constraintName, \"UNIQUE\");\n\t\treturn {\n\t\t\tid: `dropUnique.${this.tableName}.${this.constraintName}`,\n\t\t\tlabel: this.label,\n\t\t\tsummary: `Drops unique constraint ${this.constraintName} on ${this.tableName} which is not in the contract`,\n\t\t\toperationClass: \"widening\",\n\t\t\ttarget: {\n\t\t\t\tid: \"mysql\",\n\t\t\t\tdetails: buildTargetDetails(\"unique\", this.constraintName, this.tableName)\n\t\t\t},\n\t\t\tprecheck: [constraint.present(`ensure unique constraint \"${this.constraintName}\" exists`)],\n\t\t\texecute: [step(`drop unique constraint \"${this.constraintName}\"`, `ALTER TABLE ${quoteIdentifier(this.tableName)} DROP INDEX ${quoteIdentifier(this.constraintName)}`)],\n\t\t\tpostcheck: [constraint.absent(`verify unique constraint \"${this.constraintName}\" is gone`)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.dropUnique({ table: ${jsonToTsSource(this.tableName)}, name: ${jsonToTsSource(this.constraintName)} })`;\n\t}\n};\nvar AddForeignKeyCall = class extends MysqlOpFactoryCallNode {\n\ttableName;\n\tforeignKey;\n\tfactoryName = \"addForeignKey\";\n\toperationClass = \"additive\";\n\tlabel;\n\tconstructor(tableName, foreignKey) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.foreignKey = foreignKey;\n\t\tthis.label = `Add foreign key ${foreignKey.name} on ${tableName}`;\n\t\tthis.freeze();\n\t}\n\ttoOp() {\n\t\tconst { name, columns, references } = this.foreignKey;\n\t\tconst constraint = constraintChecks(this.tableName, name, \"FOREIGN KEY\");\n\t\treturn {\n\t\t\tid: `foreignKey.${this.tableName}.${name}`,\n\t\t\tlabel: this.label,\n\t\t\tsummary: `Adds foreign key ${name} on ${this.tableName} referencing ${references.table}`,\n\t\t\toperationClass: \"additive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"mysql\",\n\t\t\t\tdetails: buildTargetDetails(\"foreignKey\", name, this.tableName)\n\t\t\t},\n\t\t\tprecheck: [constraint.absent(`ensure foreign key \"${name}\" is missing`)],\n\t\t\texecute: [step(`add foreign key \"${name}\"`, `ALTER TABLE ${quoteIdentifier(this.tableName)} ADD CONSTRAINT ${quoteIdentifier(name)} FOREIGN KEY (${columnList(columns)}) REFERENCES ${quoteIdentifier(references.table)} (${columnList(references.columns)})${foreignKeyActionsSql(this.foreignKey)}`)],\n\t\t\tpostcheck: [constraint.present(`verify foreign key \"${name}\" exists`)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\tconst { name, columns, references, onDelete, onUpdate } = this.foreignKey;\n\t\treturn `this.addForeignKey({ ${[\n\t\t\t`table: ${jsonToTsSource(this.tableName)}`,\n\t\t\t`name: ${jsonToTsSource(name)}`,\n\t\t\t`columns: ${jsonToTsSource(columns)}`,\n\t\t\t`references: ${jsonToTsSource(references)}`,\n\t\t\t...onDelete === void 0 ? [] : [`onDelete: ${jsonToTsSource(onDelete)}`],\n\t\t\t...onUpdate === void 0 ? [] : [`onUpdate: ${jsonToTsSource(onUpdate)}`]\n\t\t].join(\", \")} })`;\n\t}\n};\nvar DropForeignKeyCall = class extends MysqlOpFactoryCallNode {\n\ttableName;\n\tconstraintName;\n\tfactoryName = \"dropForeignKey\";\n\toperationClass = \"widening\";\n\tlabel;\n\tconstructor(tableName, constraintName) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.constraintName = constraintName;\n\t\tthis.label = `Drop foreign key ${constraintName} on ${tableName}`;\n\t\tthis.freeze();\n\t}\n\ttoOp() {\n\t\tconst constraint = constraintChecks(this.tableName, this.constraintName, \"FOREIGN KEY\");\n\t\treturn {\n\t\t\tid: `dropForeignKey.${this.tableName}.${this.constraintName}`,\n\t\t\tlabel: this.label,\n\t\t\tsummary: `Drops foreign key ${this.constraintName} on ${this.tableName} which is not in the contract`,\n\t\t\toperationClass: \"widening\",\n\t\t\ttarget: {\n\t\t\t\tid: \"mysql\",\n\t\t\t\tdetails: buildTargetDetails(\"foreignKey\", this.constraintName, this.tableName)\n\t\t\t},\n\t\t\tprecheck: [constraint.present(`ensure foreign key \"${this.constraintName}\" exists`)],\n\t\t\texecute: [step(`drop foreign key \"${this.constraintName}\"`, `ALTER TABLE ${quoteIdentifier(this.tableName)} DROP FOREIGN KEY ${quoteIdentifier(this.constraintName)}`)],\n\t\t\tpostcheck: [constraint.absent(`verify foreign key \"${this.constraintName}\" is gone`)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.dropForeignKey({ table: ${jsonToTsSource(this.tableName)}, name: ${jsonToTsSource(this.constraintName)} })`;\n\t}\n};\n/** An operation built elsewhere, such as the table rename a user writes by hand, carried as it is and written as `rawSql({...})`. */\nvar RawSqlCall = class extends MysqlOpFactoryCallNode {\n\top;\n\tfactoryName = \"rawSql\";\n\toperationClass;\n\tlabel;\n\tconstructor(op) {\n\t\tsuper();\n\t\tthis.op = op;\n\t\tthis.label = op.label;\n\t\tthis.operationClass = op.operationClass;\n\t\tthis.freeze();\n\t}\n\ttoOp() {\n\t\treturn this.op;\n\t}\n\trenderTypeScript() {\n\t\treturn `rawSql(${jsonToTsSource(this.op)})`;\n\t}\n\timportRequirements() {\n\t\treturn [{\n\t\t\tmoduleSpecifier: TARGET_MIGRATION_MODULE,\n\t\t\tsymbol: \"rawSql\"\n\t\t}];\n\t}\n};\n/** The table rename a user writes by hand on MySQL, which the planner does not plan yet. */\nfunction renameTableByHandOp(from, to) {\n\tconst fromTable = tableChecks(from);\n\tconst toTable = tableChecks(to);\n\treturn {\n\t\tid: `renameTable.${from}`,\n\t\tlabel: `Rename table ${from} to ${to}`,\n\t\toperationClass: \"widening\",\n\t\ttarget: {\n\t\t\tid: \"mysql\",\n\t\t\tdetails: buildTargetDetails(\"table\", to)\n\t\t},\n\t\tprecheck: [fromTable.present(`ensure table \"${from}\" exists`), toTable.absent(`ensure table \"${to}\" does not exist`)],\n\t\texecute: [step(`rename table \"${from}\" to \"${to}\"`, `RENAME TABLE ${quoteIdentifier(from)} TO ${quoteIdentifier(to)}`)],\n\t\tpostcheck: [toTable.present(`verify table \"${to}\" exists`), fromTable.absent(`verify table \"${from}\" no longer exists`)]\n\t};\n}\nfunction foreignKeySpecOf(fk, table) {\n\treturn {\n\t\tname: fk.name ?? `${table}_${fk.columns.join(\"_\")}_fkey`,\n\t\tcolumns: fk.columns,\n\t\treferences: {\n\t\t\ttable: fk.referencedTable,\n\t\t\tcolumns: fk.referencedColumns\n\t\t},\n\t\t...ifDefined(\"onDelete\", fk.onDelete),\n\t\t...ifDefined(\"onUpdate\", fk.onUpdate)\n\t};\n}\n//#endregion\n//#region src/core/migrations/issue-planner.ts\n/**\n* Drops each issue under a missing or extra node: the call for a table or column accounts for everything beneath it.\n*/\nfunction coalesceSubtreeIssues(issues) {\n\tconst collapsing = issues.filter((issue) => {\n\t\tconst outcome = issueOutcome(issue);\n\t\treturn outcome === \"not-found\" || outcome === \"not-expected\";\n\t}).map((issue) => issue.path);\n\treturn issues.filter((issue) => !collapsing.some((ancestor) => issue.path.length > ancestor.length && ancestor.every((segment, index) => issue.path[index] === segment)));\n}\nfunction issueNode(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\treturn node === void 0 ? void 0 : blindCast(node);\n}\nfunction expectedNode(issue) {\n\treturn blindCast(issue.expected);\n}\nfunction actualNode(issue) {\n\treturn blindCast(issue.actual);\n}\nfunction location(table, column) {\n\treturn {\n\t\tentityKind: \"table\",\n\t\t...table === void 0 ? {} : { entityName: table },\n\t\t...column === void 0 ? {} : { column }\n\t};\n}\nfunction placeOf(issue, at) {\n\tif (at?.entityName === void 0) return issue.path.slice(1).join(\".\");\n\treturn at.column === void 0 ? at.entityName : `${at.entityName}.${at.column}`;\n}\n/** The conflict for a change the MySQL planner does not plan yet. */\nfunction notYetSupported(kind, change, issue, conflictLocation) {\n\treturn {\n\t\tkind,\n\t\tsummary: `${change} is not yet supported on MySQL (${placeOf(issue, conflictLocation)})`,\n\t\twhy: \"The MySQL planner creates and drops tables, columns, indexes, unique constraints and foreign keys; it does not change a column, a default, a primary key or a CHECK constraint yet. Use `migration new` to write this change by hand.\",\n\t\t...conflictLocation === void 0 ? {} : { location: conflictLocation }\n\t};\n}\nfunction createTableCalls(table) {\n\treturn [\n\t\tnew CreateTableCall(table.name, Object.values(table.columns).map(ddlColumnFromNode), tableConstraintsFromNode(table)),\n\t\t...table.indexes.flatMap((index) => index.columns === void 0 ? [] : [new CreateIndexCall(table.name, index.name, index.columns, index.unique)]),\n\t\t...table.foreignKeys.map((fk) => new AddForeignKeyCall(table.name, foreignKeySpecOf(fk, table.name)))\n\t];\n}\nfunction mapTableIssue(issue) {\n\tswitch (issueOutcome(issue)) {\n\t\tcase \"not-found\": {\n\t\t\tconst table = expectedNode(issue);\n\t\t\treturn table.indexes.find((index) => index.columns === void 0) === void 0 ? ok(createTableCalls(table)) : notOk(notYetSupported(\"indexIncompatible\", \"An expression index\", issue, location(table.name)));\n\t\t}\n\t\tcase \"not-expected\": {\n\t\t\tconst table = actualNode(issue);\n\t\t\treturn ok(CONTROL_TABLE_NAMES.has(table.name) ? [] : [new DropTableCall(table.name)]);\n\t\t}\n\t\tdefault: return notOk(notYetSupported(\"unsupportedOperation\", \"Changing a table\", issue));\n\t}\n}\nfunction mapColumnIssue(issue, table) {\n\tswitch (issueOutcome(issue)) {\n\t\tcase \"not-found\": {\n\t\t\tconst column = expectedNode(issue);\n\t\t\tconst columnDefault = columnDefaultOf(column);\n\t\t\treturn column.nullable || columnDefault !== void 0 && !(columnDefault.kind === \"function\" && columnDefault.expression === \"autoincrement()\") ? ok([new AddColumnCall(table, ddlColumnFromNode(column))]) : notOk(notYetSupported(\"nullabilityConflict\", \"Adding a required column without a default\", issue, location(table, column.name)));\n\t\t}\n\t\tcase \"not-expected\": return ok([new DropColumnCall(table, actualNode(issue).name)]);\n\t\tdefault: {\n\t\t\tconst expected = expectedNode(issue);\n\t\t\tconst typesEqual = sqlColumnTypesEqual(expected, actualNode(issue));\n\t\t\treturn notOk(notYetSupported(typesEqual ? \"nullabilityConflict\" : \"typeMismatch\", typesEqual ? \"Changing a column's nullability\" : \"Changing a column's type\", issue, location(table, expected.name)));\n\t\t}\n\t}\n}\nfunction mapIndexIssue(issue, table) {\n\tswitch (issueOutcome(issue)) {\n\t\tcase \"not-found\": {\n\t\t\tconst index = expectedNode(issue);\n\t\t\treturn index.columns === void 0 ? notOk(notYetSupported(\"indexIncompatible\", \"An expression index\", issue, location(table))) : ok([new CreateIndexCall(table, index.name, index.columns, index.unique)]);\n\t\t}\n\t\tcase \"not-expected\": return ok([new DropIndexCall(table, actualNode(issue).name)]);\n\t\tdefault: return notOk(notYetSupported(\"indexIncompatible\", \"Changing an index\", issue, location(table)));\n\t}\n}\nfunction mapUniqueIssue(issue, table) {\n\tswitch (issueOutcome(issue)) {\n\t\tcase \"not-found\": {\n\t\t\tconst unique = expectedNode(issue);\n\t\t\treturn ok([new AddUniqueCall(table, uniqueName(table, unique), unique.columns)]);\n\t\t}\n\t\tcase \"not-expected\": return ok([new DropUniqueCall(table, uniqueName(table, actualNode(issue)))]);\n\t\tdefault: return notOk(notYetSupported(\"indexIncompatible\", \"Changing a unique constraint\", issue, location(table)));\n\t}\n}\nfunction mapForeignKeyIssue(issue, table) {\n\tswitch (issueOutcome(issue)) {\n\t\tcase \"not-found\": return ok([new AddForeignKeyCall(table, foreignKeySpecOf(expectedNode(issue), table))]);\n\t\tcase \"not-expected\": return ok([new DropForeignKeyCall(table, foreignKeySpecOf(actualNode(issue), table).name)]);\n\t\tdefault: return notOk(notYetSupported(\"foreignKeyConflict\", \"Changing a foreign key\", issue, location(table)));\n\t}\n}\nfunction mapIssueToCalls(issue) {\n\tconst node = issueNode(issue);\n\tconst table = issue.path[1];\n\tif (node === void 0) return notOk(notYetSupported(\"unsupportedOperation\", \"A change with no node\", issue));\n\tif (node.nodeKind === RelationalSchemaNodeKind.table) return mapTableIssue(issue);\n\tif (table === void 0) return notOk(notYetSupported(\"unsupportedOperation\", `A ${node.nodeKind} change`, issue));\n\tswitch (node.nodeKind) {\n\t\tcase RelationalSchemaNodeKind.column: return mapColumnIssue(issue, table);\n\t\tcase RelationalSchemaNodeKind.index: return mapIndexIssue(issue, table);\n\t\tcase RelationalSchemaNodeKind.unique: return mapUniqueIssue(issue, table);\n\t\tcase RelationalSchemaNodeKind.foreignKey: return mapForeignKeyIssue(issue, table);\n\t\tcase RelationalSchemaNodeKind.columnDefault: return notOk(notYetSupported(\"unsupportedOperation\", \"Changing a column's default\", issue, location(table)));\n\t\tcase RelationalSchemaNodeKind.primaryKey: return notOk(notYetSupported(\"indexIncompatible\", \"Changing a primary key\", issue, location(table)));\n\t\tcase RelationalSchemaNodeKind.check: return notOk(notYetSupported(\"unsupportedOperation\", \"A CHECK constraint\", issue, location(table)));\n\t\tdefault: return notOk(notYetSupported(\"unsupportedOperation\", `A ${node.nodeKind} change`, issue));\n\t}\n}\n/**\n* The order calls run in: foreign keys are dropped before the tables, columns and indexes they use, and added after every table, column and index they need exists. The index InnoDB made for a dropped key is dropped right after the key, before any key is added, so a new key on the same columns makes its own.\n*/\nconst CALL_ORDER = [\n\t\"dropForeignKey\",\n\t\"createTable\",\n\t\"addColumn\",\n\t\"addUnique\",\n\t\"createIndex\",\n\t\"addForeignKey\",\n\t\"dropUnique\",\n\t\"dropIndex\",\n\t\"dropColumn\",\n\t\"dropTable\",\n\t\"rawSql\"\n];\nfunction locationOfCall(call) {\n\treturn \"tableName\" in call ? {\n\t\tentityKind: \"table\",\n\t\tentityName: call.tableName,\n\t\t...\"columnName\" in call ? { column: call.columnName } : {},\n\t\t...\"indexName\" in call ? { index: call.indexName } : {}\n\t} : void 0;\n}\nfunction conflictForDisallowedCall(call, allowed) {\n\tconst callLocation = locationOfCall(call);\n\treturn {\n\t\tkind: call instanceof CreateIndexCall || call instanceof DropIndexCall ? \"indexIncompatible\" : \"missingButNonAdditive\",\n\t\tsummary: `Operation \"${call.label}\" requires class \"${call.operationClass}\", but policy allows only: ${allowed.join(\", \")}`,\n\t\twhy: \"Use `migration new` to author a custom migration for this change.\",\n\t\trefusedOperationClass: call.operationClass,\n\t\t...callLocation === void 0 ? {} : { location: callLocation }\n\t};\n}\nconst MAX_IDENTIFIER_CHARACTERS = 64;\n/** The names a call gives new objects, each with where the conflict that refuses it points. */\nfunction namesGiven(call) {\n\tif (call instanceof CreateTableCall) return [\n\t\t{\n\t\t\tname: call.tableName,\n\t\t\tat: location(call.tableName)\n\t\t},\n\t\t...call.columns.map((column) => ({\n\t\t\tname: column.name,\n\t\t\tat: location(call.tableName, column.name)\n\t\t})),\n\t\t...call.constraints.flatMap((constraint) => constraint.name === void 0 ? [] : [{\n\t\t\tname: constraint.name,\n\t\t\tat: {\n\t\t\t\t...location(call.tableName),\n\t\t\t\tconstraint: constraint.name\n\t\t\t}\n\t\t}])\n\t];\n\tif (call instanceof AddColumnCall) return [{\n\t\tname: call.column.name,\n\t\tat: location(call.tableName, call.column.name)\n\t}];\n\tif (call instanceof CreateIndexCall) return [{\n\t\tname: call.indexName,\n\t\tat: {\n\t\t\t...location(call.tableName),\n\t\t\tindex: call.indexName\n\t\t}\n\t}];\n\tif (call instanceof AddUniqueCall) return [{\n\t\tname: call.constraintName,\n\t\tat: {\n\t\t\t...location(call.tableName),\n\t\t\tconstraint: call.constraintName\n\t\t}\n\t}];\n\tif (call instanceof AddForeignKeyCall) return [{\n\t\tname: call.foreignKey.name,\n\t\tat: {\n\t\t\t...location(call.tableName),\n\t\t\tconstraint: call.foreignKey.name\n\t\t}\n\t}];\n\treturn [];\n}\nfunction placeText(at) {\n\treturn at.column === void 0 ? `${at.entityName}` : `${at.entityName}.${at.column}`;\n}\n/** MySQL refuses a name longer than 64 characters only when the statement runs, after the statements before it committed, so the planner refuses it first. */\nfunction longNameConflicts(call) {\n\treturn namesGiven(call).filter(({ name }) => Array.from(name).length > MAX_IDENTIFIER_CHARACTERS).map(({ name, at }) => ({\n\t\tkind: \"unsupportedOperation\",\n\t\tsummary: `The name ${name} is longer than the ${MAX_IDENTIFIER_CHARACTERS} characters MySQL allows (${placeText(at)})`,\n\t\twhy: `MySQL refuses a table, column, index or constraint name longer than ${MAX_IDENTIFIER_CHARACTERS} characters. Give it a shorter name in the contract.`,\n\t\tlocation: at\n\t}));\n}\nfunction isAutoincrement(column) {\n\treturn column.default?.kind === \"function\" && column.default.expression.text === \"autoincrement()\";\n}\n/** MySQL refuses a table whose `AUTO_INCREMENT` column does not lead a key, so the planner refuses it first. */\nfunction autoincrementKeyConflicts(call) {\n\tif (!(call instanceof CreateTableCall)) return [];\n\tconst keyLeaders = new Set(call.constraints.flatMap((constraint) => constraint.kind === \"primary-key\" || constraint.kind === \"unique\" ? constraint.columns.slice(0, 1) : []));\n\treturn call.columns.filter((column) => isAutoincrement(column) && !column.primaryKey && !keyLeaders.has(column.name)).map((column) => ({\n\t\tkind: \"unsupportedOperation\",\n\t\tsummary: `An autoincrement column that is not the first column of the primary key or a unique constraint is not supported on MySQL (${call.tableName}.${column.name})`,\n\t\twhy: \"MySQL requires an AUTO_INCREMENT column to be the first column of a key, and refuses the table otherwise.\",\n\t\tlocation: location(call.tableName, column.name)\n\t}));\n}\n/** Whether an index on `indexColumns` can serve a foreign key on `keyColumns`: InnoDB needs the key's columns first, in order. */\nfunction servesKey(indexColumns, keyColumns) {\n\treturn keyColumns.length <= indexColumns.length && keyColumns.every((column, position) => indexColumns[position] === column);\n}\nfunction indexColumnLists(table, leaving) {\n\treturn [\n\t\t...table.primaryKey === void 0 ? [] : [table.primaryKey.columns],\n\t\t...table.uniques.flatMap((unique) => uniqueName(table.name, unique) === leaving ? [] : [unique.columns]),\n\t\t...table.indexes.flatMap((index) => index.name === leaving || index.columns === void 0 ? [] : [index.columns])\n\t];\n}\nfunction isKeyServed(table, keyColumns, leaving) {\n\treturn indexColumnLists(table, leaving).some((columns) => servesKey(columns, keyColumns));\n}\n/**\n* When a foreign key is dropped and no other index served it, InnoDB made an index of its own, with the key's name, and keeps it after the key is gone. Introspection leaves that index out while the key exists, so it is dropped with the key unless the destination keeps an index of that name.\n*/\nfunction innoDbIndexDrops(calls, expected, actual) {\n\treturn calls.flatMap((call) => {\n\t\tif (!(call instanceof DropForeignKeyCall)) return [];\n\t\tconst before = actual.tables[call.tableName];\n\t\tconst after = expected.tables[call.tableName];\n\t\tconst key = before?.foreignKeys.find((fk) => foreignKeySpecOf(fk, call.tableName).name === call.constraintName);\n\t\tif (before === void 0 || after === void 0 || key === void 0) return [];\n\t\tif (isKeyServed(before, key.columns)) return [];\n\t\tif (after.indexes.some((index) => index.name === call.constraintName)) return [];\n\t\treturn [{\n\t\t\tcall: new DropIndexCall(call.tableName, call.constraintName),\n\t\t\tindexName: call.constraintName,\n\t\t\tcolumns: key.columns\n\t\t}];\n\t});\n}\nfunction droppedIndexes(calls, actual) {\n\treturn calls.flatMap((call) => {\n\t\tconst table = \"tableName\" in call ? actual.tables[call.tableName] : void 0;\n\t\tif (table === void 0) return [];\n\t\tif (call instanceof DropIndexCall) {\n\t\t\tconst index = table.indexes.find(({ name }) => name === call.indexName);\n\t\t\treturn index?.columns === void 0 ? [] : [{\n\t\t\t\tcall,\n\t\t\t\tindexName: call.indexName,\n\t\t\t\tcolumns: index.columns\n\t\t\t}];\n\t\t}\n\t\tif (call instanceof DropUniqueCall) {\n\t\t\tconst unique = table.uniques.find((candidate) => uniqueName(table.name, candidate) === call.constraintName);\n\t\t\treturn unique === void 0 ? [] : [{\n\t\t\t\tcall,\n\t\t\t\tindexName: call.constraintName,\n\t\t\t\tcolumns: unique.columns\n\t\t\t}];\n\t\t}\n\t\treturn [];\n\t});\n}\n/**\n* A dropped index that one of `protectedKeys` uses, when no index the destination keeps can take over: MySQL refuses that drop.\n*/\nfunction conflictForIndexAKeyUses(dropped, expected, protectedKeys) {\n\tconst tableName = dropped.call.tableName;\n\tconst table = expected.tables[tableName];\n\tconst key = table?.foreignKeys.find((fk) => protectedKeys(tableName, fk) && servesKey(dropped.columns, fk.columns) && !isKeyServed(table, fk.columns, dropped.indexName));\n\tif (key === void 0) return void 0;\n\treturn {\n\t\tkind: \"indexIncompatible\",\n\t\tsummary: `Dropping index ${dropped.indexName}, which foreign key ${foreignKeySpecOf(key, tableName).name} uses, is not yet supported on MySQL (${tableName})`,\n\t\twhy: \"MySQL refuses to drop an index a foreign key uses. Keep an index whose first columns are the foreign key's columns, or use `migration new` to drop the foreign key, drop the index and add the foreign key again.\",\n\t\tlocation: {\n\t\t\tentityKind: \"table\",\n\t\t\tentityName: tableName,\n\t\t\tindex: dropped.indexName\n\t\t}\n\t};\n}\n/** The calls that turn `actual` into `expected` for `issues`, in the order they run, or the conflicts that stop the plan. */\nfunction planIssues(input) {\n\tconst calls = [];\n\tconst conflicts = [];\n\tconst allowed = input.policy.allowedOperationClasses;\n\tfor (const issue of orderIssuesByDependencies(input.issues)) {\n\t\tconst mapped = mapIssueToCalls(issue);\n\t\tif (!mapped.ok) {\n\t\t\tconflicts.push(mapped.failure);\n\t\t\tcontinue;\n\t\t}\n\t\tfor (const call of mapped.value) {\n\t\t\tconflicts.push(...longNameConflicts(call), ...autoincrementKeyConflicts(call));\n\t\t\tif (allowed.includes(call.operationClass)) calls.push(call);\n\t\t\telse conflicts.push(conflictForDisallowedCall(call, allowed));\n\t\t}\n\t}\n\tconst droppedKeys = new Set(calls.flatMap((call) => call instanceof DropForeignKeyCall ? [`${call.tableName}.${call.constraintName}`] : []));\n\tconst isKeptKey = (tableName, fk) => !droppedKeys.has(`${tableName}.${foreignKeySpecOf(fk, tableName).name}`);\n\tfor (const dropped of droppedIndexes(calls, input.actual)) {\n\t\tconst conflict = conflictForIndexAKeyUses(dropped, input.expected, () => true);\n\t\tif (conflict !== void 0) conflicts.push(conflict);\n\t}\n\tconst innoDbIndexes = innoDbIndexDrops(calls, input.expected, input.actual);\n\tfor (const dropped of innoDbIndexes) {\n\t\tconst conflict = conflictForIndexAKeyUses(dropped, input.expected, isKeptKey);\n\t\tif (conflict !== void 0) conflicts.push(conflict);\n\t\tif (!allowed.includes(dropped.call.operationClass)) conflicts.push(conflictForDisallowedCall(dropped.call, allowed));\n\t}\n\tif (conflicts.length > 0) return notOk(conflicts);\n\tconst inOrder = (factoryName) => calls.filter((call) => call.factoryName === factoryName);\n\treturn ok([\n\t\t...inOrder(\"dropForeignKey\"),\n\t\t...innoDbIndexes.map(({ call }) => call),\n\t\t...CALL_ORDER.filter((factoryName) => factoryName !== \"dropForeignKey\").flatMap(inOrder)\n\t]);\n}\n//#endregion\n//#region src/core/migrations/mysql-migration.ts\n/**\n* The base class of a MySQL `migration.ts`. Each protected method returns the operation its name says, rendered through the MySQL control adapter the migration CLI builds from `prisma.config.ts`.\n*/\nvar MysqlMigration = class extends Migration {\n\ttargetId = \"mysql\";\n\tcontrolAdapter;\n\tconstructor(stack) {\n\t\tsuper(stack);\n\t\tthis.controlAdapter = stack?.adapter === void 0 ? void 0 : blindCast(stack.adapter.create(stack));\n\t}\n\tadapterFor(operation) {\n\t\tif (this.controlAdapter === void 0) throw mysqlMigrationStackMissing(operation);\n\t\treturn this.controlAdapter;\n\t}\n\tcreateTable(options) {\n\t\treturn new CreateTableCall(options.table, options.columns, options.constraints ?? []).toOp(this.adapterFor(\"createTable\"));\n\t}\n\tdropTable(options) {\n\t\treturn new DropTableCall(options.table).toOp();\n\t}\n\taddColumn(options) {\n\t\treturn new AddColumnCall(options.table, options.column).toOp(this.adapterFor(\"addColumn\"));\n\t}\n\tdropColumn(options) {\n\t\treturn new DropColumnCall(options.table, options.column).toOp();\n\t}\n\tcreateIndex(options) {\n\t\treturn new CreateIndexCall(options.table, options.index, options.columns, options.unique === true).toOp();\n\t}\n\tdropIndex(options) {\n\t\treturn new DropIndexCall(options.table, options.index).toOp();\n\t}\n\taddUnique(options) {\n\t\treturn new AddUniqueCall(options.table, options.name, options.columns).toOp();\n\t}\n\tdropUnique(options) {\n\t\treturn new DropUniqueCall(options.table, options.name).toOp();\n\t}\n\taddForeignKey(options) {\n\t\treturn new AddForeignKeyCall(options.table, {\n\t\t\tname: options.name,\n\t\t\tcolumns: options.columns,\n\t\t\treferences: options.references,\n\t\t\t...ifDefined(\"onDelete\", options.onDelete),\n\t\t\t...ifDefined(\"onUpdate\", options.onUpdate)\n\t\t}).toOp();\n\t}\n\tdropForeignKey(options) {\n\t\treturn new DropForeignKeyCall(options.table, options.name).toOp();\n\t}\n};\n//#endregion\n//#region src/core/migrations/render-ops.ts\nfunction assertMysqlOp(op, factoryName) {\n\tconst targetId = blindCast(op).target?.id;\n\tif (targetId !== \"mysql\") throw new InternalError(`renderOps: expected a mysql operation but got target.id=\"${String(targetId)}\" for op.id=\"${op.id}\" (factoryName=\"${factoryName}\").`);\n}\nfunction checkedOp(opOrPromise, factoryName) {\n\tif (isThenable(opOrPromise)) {\n\t\tconst checked = opOrPromise.then((op) => {\n\t\t\tassertMysqlOp(op, factoryName);\n\t\t\treturn op;\n\t\t});\n\t\tchecked.catch(() => void 0);\n\t\treturn checked;\n\t}\n\tassertMysqlOp(opOrPromise, factoryName);\n\treturn opOrPromise;\n}\n/** The operations `calls` lower to, in order, each checked to be a MySQL operation. */\nfunction renderOps(calls, lowerer) {\n\treturn calls.map((call) => checkedOp(isMysqlOpFactoryCall(call) ? call.toOp(lowerer) : blindCast(call).toOp(lowerer), call.factoryName));\n}\n//#endregion\n//#region src/core/migrations/render-typescript.ts\n/** The base class and the CLI entrypoint every scaffold imports, both from the MySQL facade's `migration` module. */\nconst BASE_IMPORTS = [{\n\tmoduleSpecifier: \"@internal/mysql/migration\",\n\tsymbol: \"Migration\"\n}, {\n\tmoduleSpecifier: \"@internal/mysql/migration\",\n\tsymbol: \"MigrationCLI\"\n}];\nfunction renderCallsToTypeScript(calls, meta) {\n\tconst imports = buildImports(calls, meta);\n\tconst operationsBody = calls.map((c) => c.renderTypeScript()).join(\",\\n\");\n\tconst hasStart = meta.from !== null;\n\tconst startField = hasStart ? [\" override readonly startContractJson = startContract;\"] : [];\n\treturn [\n\t\tshebangLineFor(detectScaffoldRuntime()),\n\t\timports,\n\t\t\"\",\n\t\t`export default class M extends Migration<${hasStart ? \"Start\" : \"never\"}, End> {`,\n\t\t...startField,\n\t\t\" override readonly endContractJson = endContract;\",\n\t\t\"\",\n\t\t\" override get operations() {\",\n\t\t\" return [\",\n\t\tindent(operationsBody, 6),\n\t\t\" ];\",\n\t\t\" }\",\n\t\t\"}\",\n\t\t\"\",\n\t\t\"MigrationCLI.run(import.meta.url, M);\",\n\t\t\"\"\n\t].join(\"\\n\");\n}\nfunction buildImports(calls, meta) {\n\tconst requirements = [...BASE_IMPORTS, ...contractImports(meta)];\n\tfor (const call of calls) for (const req of call.importRequirements()) requirements.push(req);\n\treturn renderImports(resolveRequirementSpecifiers(requirements, meta.resolveImportSpecifier));\n}\nfunction contractImports(meta) {\n\tconst reqs = [{\n\t\tmoduleSpecifier: contractSnapshotJsonSpecifier(meta.snapshotsImportPath, meta.to),\n\t\tsymbol: \"endContract\",\n\t\tkind: \"default\",\n\t\tattributes: { type: \"json\" }\n\t}, {\n\t\tmoduleSpecifier: contractSnapshotTypesSpecifier(meta.snapshotsImportPath, meta.to),\n\t\tsymbol: \"Contract\",\n\t\talias: \"End\",\n\t\ttypeOnly: true\n\t}];\n\tif (meta.from !== null) {\n\t\treqs.push({\n\t\t\tmoduleSpecifier: contractSnapshotJsonSpecifier(meta.snapshotsImportPath, meta.from),\n\t\t\tsymbol: \"startContract\",\n\t\t\tkind: \"default\",\n\t\t\tattributes: { type: \"json\" }\n\t\t});\n\t\treqs.push({\n\t\t\tmoduleSpecifier: contractSnapshotTypesSpecifier(meta.snapshotsImportPath, meta.from),\n\t\t\tsymbol: \"Contract\",\n\t\t\talias: \"Start\",\n\t\t\ttypeOnly: true\n\t\t});\n\t}\n\treturn reqs;\n}\nfunction indent(text, spaces) {\n\tconst pad = \" \".repeat(spaces);\n\treturn text.split(\"\\n\").map((line) => line.trim() ? `${pad}${line}` : line).join(\"\\n\");\n}\n//#endregion\n//#region src/core/migrations/planner-produced-mysql-migration.ts\n/** The plan the MySQL planner produces: its operations, and the `migration.ts` that writes them. */\nvar TypeScriptRenderableMysqlMigration = class extends MysqlMigration {\n\t#calls;\n\t#meta;\n\t#destination;\n\t#spaceId;\n\t#snapshotsImportPath;\n\t#lowerer;\n\t#operationsCache;\n\tconstructor(options) {\n\t\tsuper();\n\t\tthis.#calls = options.calls;\n\t\tthis.#meta = options.meta;\n\t\tthis.#spaceId = options.spaceId;\n\t\tthis.#snapshotsImportPath = options.snapshotsImportPath;\n\t\tthis.#destination = options.destination ?? { storageHash: options.meta.to };\n\t\tthis.#lowerer = options.lowerer;\n\t}\n\tget operations() {\n\t\tthis.#operationsCache ??= renderOps(this.#calls, this.#lowerer);\n\t\treturn this.#operationsCache;\n\t}\n\tdescribe() {\n\t\treturn this.#meta;\n\t}\n\tget destination() {\n\t\treturn this.#destination;\n\t}\n\tget spaceId() {\n\t\treturn this.#spaceId;\n\t}\n\trenderTypeScript(resolveImportSpecifier) {\n\t\treturn renderCallsToTypeScript(this.#calls, {\n\t\t\tfrom: this.#meta.from,\n\t\t\tto: this.#meta.to,\n\t\t\tsnapshotsImportPath: this.#snapshotsImportPath,\n\t\t\tresolveImportSpecifier\n\t\t});\n\t}\n};\n//#endregion\n//#region src/core/migrations/planner.ts\nconst mysqlTableRenameByHand = {\n\trenderTableRename: (rename) => new RawSqlCall(renameTableByHandOp(rename.from, rename.to)).renderTypeScript(),\n\ttableRenameByHand: (rename) => [`RENAME TABLE ${quoteIdentifier(rename.from)} TO ${quoteIdentifier(rename.to)}`]\n};\nfunction tableTarget(table, column) {\n\treturn {\n\t\tstorageName: column === void 0 ? table : `${table}.${column}`,\n\t\ttable: {\n\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\t\ttable,\n\t\t\tcolumn\n\t\t}\n\t};\n}\nfunction callSubjects(call) {\n\tconst dataLoss = call instanceof DropTableCall ? [{\n\t\t...tableTarget(call.tableName),\n\t\tloss: \"drop\"\n\t}] : call instanceof DropColumnCall ? [{\n\t\t...tableTarget(call.tableName, call.columnName),\n\t\tloss: \"drop\"\n\t}] : [];\n\treturn {\n\t\toperationCount: 1,\n\t\tlabel: call.label,\n\t\tdataLoss,\n\t\taccessChanges: [],\n\t\ttemporaryValues: []\n\t};\n}\n/** Whether `issue` is an extra table some contract space owns, which this space must leave alone. */\nfunction isTableOwnedElsewhere(issue, ownership) {\n\tif (issueOutcome(issue) !== \"not-expected\") return false;\n\tif (issueNode(issue)?.nodeKind !== RelationalSchemaNodeKind.table) return false;\n\tconst table = issue.path[1];\n\treturn table !== void 0 && ownership.declaresEntity({\n\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\tentityKind: \"table\",\n\t\tentityName: table\n\t});\n}\n/**\n* The MySQL migration planner. It diffs the contract's schema against the live one and plans creating and dropping tables, columns, indexes, unique constraints and foreign keys. Every other change, and every statement such as a rename, is refused with a conflict that says it is not yet supported on MySQL.\n*/\nvar MysqlMigrationPlanner = class {\n\t#lowerer;\n\tconstructor(lowerer) {\n\t\tthis.#lowerer = lowerer;\n\t}\n\tplan(options) {\n\t\treturn this.#planSql(blindCast(options));\n\t}\n\temptyMigration(context, spaceId) {\n\t\treturn new TypeScriptRenderableMysqlMigration({\n\t\t\tcalls: [],\n\t\t\tmeta: {\n\t\t\t\tfrom: context.fromHash,\n\t\t\t\tto: context.toHash\n\t\t\t},\n\t\t\tspaceId,\n\t\t\tsnapshotsImportPath: context.snapshotsImportPath,\n\t\t\tlowerer: this.#lowerer\n\t\t});\n\t}\n\t#planSql(options) {\n\t\tif (!options.policy.allowedOperationClasses.includes(\"additive\")) return plannerFailure([{\n\t\t\tkind: \"unsupportedOperation\",\n\t\t\tsummary: \"Migration planner requires additive operations be allowed\",\n\t\t\twhy: \"The planner requires the \\\"additive\\\" operation class to be allowed in the policy.\"\n\t\t}]);\n\t\tconst [statement] = options.statements;\n\t\tif (statement !== void 0) return plannerFailure([statementNotYetSupported(statement)]);\n\t\tif (!(options.schema instanceof SqlSchemaIR)) throw mysqlError(\"CONTRACT.TARGET_MISMATCH\", \"The MySQL planner received a schema tree that neither MySQL introspection nor contractToSchema built.\");\n\t\tconst expected = mysqlContractToSchema(options.contract, sqlTypeLookupsOf(options.frameworkComponents));\n\t\tconst actual = options.schema;\n\t\tconst allowed = options.policy.allowedOperationClasses;\n\t\tconst strict = allowed.includes(\"widening\") || allowed.includes(\"destructive\");\n\t\tconst { ownership } = options;\n\t\tconst planned = planIssues({\n\t\t\tissues: coalesceSubtreeIssues(diffSchemas(expected, actual)).filter((issue) => (strict || issueOutcome(issue) !== \"not-expected\") && (ownership === void 0 || !isTableOwnedElsewhere(issue, ownership))),\n\t\t\texpected,\n\t\t\tactual,\n\t\t\tpolicy: options.policy\n\t\t});\n\t\tif (!planned.ok) return plannerFailure(planned.failure);\n\t\tconst calls = planned.value;\n\t\treturn {\n\t\t\tkind: \"success\",\n\t\t\tplan: new TypeScriptRenderableMysqlMigration({\n\t\t\t\tcalls,\n\t\t\t\tmeta: {\n\t\t\t\t\tfrom: options.origin?.storageHash ?? null,\n\t\t\t\t\tto: options.contract.storage.storageHash\n\t\t\t\t},\n\t\t\t\tspaceId: options.spaceId,\n\t\t\t\tsnapshotsImportPath: options.snapshotsImportPath,\n\t\t\t\tdestination: {\n\t\t\t\t\tstorageHash: options.contract.storage.storageHash,\n\t\t\t\t\t...options.contract.profileHash === void 0 ? {} : { profileHash: options.contract.profileHash }\n\t\t\t\t},\n\t\t\t\tlowerer: this.#lowerer\n\t\t\t}),\n\t\t\tappliedStatements: [],\n\t\t\t...subjectsOfCalls(calls.map(callSubjects), {\n\t\t\t\tfromContract: options.fromContract,\n\t\t\t\tcontract: options.contract,\n\t\t\t\torigins: NO_RENAMED_ORIGINS,\n\t\t\t\tbyHand: mysqlTableRenameByHand,\n\t\t\t\tremovedVariants: []\n\t\t\t})\n\t\t};\n\t}\n};\nfunction statementNotYetSupported(statement) {\n\treturn {\n\t\tkind: \"statementRefused\",\n\t\tsummary: `A ${statement.kind} statement is not yet supported on MySQL`,\n\t\twhy: \"The MySQL planner plans no rename, conversion or backfill yet. Plan the change without the statement, or write it by hand in a migration of its own with `migration new`.\",\n\t\trefusedStatement: statement\n\t};\n}\nfunction createMysqlMigrationPlanner(lowerer) {\n\treturn new MysqlMigrationPlanner(lowerer);\n}\n//#endregion\n//#region src/core/migrations/runner.ts\n/** An error without a structured code, such as a driver's socket error, thrown while a space applied: reported as `MIGRATION.EXECUTION_FAILED`, with its own code, when it has one, in `errorCode`. */\nfunction failureFromThrown(error) {\n\tconst errorCode = typeof error === \"object\" && error !== null ? Reflect.get(error, \"code\") : void 0;\n\treturn migrationRunnerFailure(\"MIGRATION.EXECUTION_FAILED\", error instanceof Error ? error.message : String(error), {\n\t\tmeta: typeof errorCode === \"string\" ? { errorCode } : {},\n\t\tcause: error\n\t});\n}\n/** The structured error thrown while a space applied, keeping its code, advice and docs link, with the space and whether the database changed added to its facts. */\nfunction withSpaceFacts(error, failingSpace, databaseUnchanged) {\n\treturn Object.assign(error, { meta: {\n\t\t...error.meta ?? {},\n\t\tfailingSpace,\n\t\tdatabaseUnchanged\n\t} });\n}\nfunction stepHolds(rows) {\n\tconst value = rows[0] === void 0 ? void 0 : Object.values(rows[0])[0];\n\tif (typeof value === \"string\") return value !== \"0\" && value.length > 0;\n\treturn Boolean(value);\n}\nfunction skipRecord(operation) {\n\treturn Object.freeze({\n\t\tid: operation.id,\n\t\tlabel: operation.label,\n\t\t...ifDefined(\"summary\", operation.summary),\n\t\toperationClass: operation.operationClass,\n\t\ttarget: operation.target,\n\t\tprecheck: Object.freeze([]),\n\t\texecute: Object.freeze([]),\n\t\tpostcheck: Object.freeze([...operation.postcheck]),\n\t\tmeta: Object.freeze({\n\t\t\t...operation.meta ?? {},\n\t\t\trunner: Object.freeze({\n\t\t\t\tskipped: true,\n\t\t\t\treason: \"postcheck_pre_satisfied\"\n\t\t\t})\n\t\t})\n\t});\n}\n/**\n* The MySQL migration runner. MySQL commits every DDL statement as it runs, so no transaction can undo an apply: the runner applies one space at a time, checks each operation before and after it runs, verifies the space's schema with the caller's strictness (every space, not only the app space), and only then writes the space's marker and ledger entries, in one transaction. A failure leaves the spaces before it applied, and running the apply again skips what already holds. The whole apply holds the marker lock, which MySQL keeps for the session, so it is released on the same connection when the apply ends.\n*/\nvar MysqlMigrationRunner = class {\n\tfamily;\n\tconstructor(family) {\n\t\tthis.family = family;\n\t}\n\tasync execute(options) {\n\t\tconst { driver, perSpaceOptions } = options;\n\t\tif (perSpaceOptions.length === 0) return ok({ perSpaceResults: [] });\n\t\treturn withMarkerLock(driver, () => this.#applySpaces(driver, perSpaceOptions), (result) => result.ok);\n\t}\n\tasync executeOnConnection(options) {\n\t\treturn this.#applySpace(options, { changedDatabase: false });\n\t}\n\tasync #applySpaces(driver, perSpaceOptions) {\n\t\tconst perSpaceResults = [];\n\t\tlet changedBefore = false;\n\t\tfor (const spaceOptions of perSpaceOptions) {\n\t\t\tconst space = spaceOptions.space ?? spaceOptions.plan.spaceId;\n\t\t\tconst progress = { changedDatabase: false };\n\t\t\tlet result;\n\t\t\ttry {\n\t\t\t\tresult = await this.#applySpace({\n\t\t\t\t\t...spaceOptions,\n\t\t\t\t\tdriver,\n\t\t\t\t\tspace\n\t\t\t\t}, progress);\n\t\t\t} catch (error) {\n\t\t\t\tif (isInternalError(error)) throw error;\n\t\t\t\tconst databaseUnchanged = !changedBefore && !progress.changedDatabase;\n\t\t\t\tif (isStructuredError(error)) throw withSpaceFacts(error, space, databaseUnchanged);\n\t\t\t\tresult = notOk(failureFromThrown(error));\n\t\t\t}\n\t\t\tif (!result.ok) return notOk(withFailingSpace(withDatabaseUnchanged(result.failure, !changedBefore && !progress.changedDatabase), space));\n\t\t\tchangedBefore ||= progress.changedDatabase;\n\t\t\tperSpaceResults.push({\n\t\t\t\tspace,\n\t\t\t\tvalue: result.value\n\t\t\t});\n\t\t}\n\t\treturn ok({ perSpaceResults });\n\t}\n\tasync #applySpace(options, progress) {\n\t\tconst { driver } = options;\n\t\tif (options.space !== void 0 && options.space !== options.plan.spaceId) throw mysqlError(\"MIGRATION.CONTRACT_SPACE_VIOLATION\", `SqlMigrationRunner: options.space (${options.space}) does not match plan.spaceId (${options.plan.spaceId})`, { meta: {\n\t\t\tspace: options.space,\n\t\t\tplanSpaceId: options.plan.spaceId\n\t\t} });\n\t\tconst space = options.plan.spaceId;\n\t\tconst operations = blindCast(await Promise.all(options.plan.operations));\n\t\tconst destinationCheck = this.#checkDestination(options.plan.destination, options.destinationContract);\n\t\tif (!destinationCheck.ok) return destinationCheck;\n\t\tconst policyCheck = this.#checkPolicy(options.policy, operations);\n\t\tif (!policyCheck.ok) return policyCheck;\n\t\tawait this.#ensureControlTables(driver, options);\n\t\tconst existingMarker = await this.family.readMarker({\n\t\t\tdriver,\n\t\t\tspace\n\t\t});\n\t\tconst originCheck = this.#checkOrigin(existingMarker, options.plan.origin ?? null);\n\t\tif (!originCheck.ok) return originCheck;\n\t\tconst isSelfEdge = options.plan.origin?.storageHash === options.plan.destination.storageHash;\n\t\tconst applied = existingMarker !== null && existingMarker.storageHash === options.plan.destination.storageHash && (options.plan.destination.profileHash === void 0 || existingMarker.profileHash === options.plan.destination.profileHash) && options.plan.origin != null && !isSelfEdge ? {\n\t\t\tresult: okVoid(),\n\t\t\texecuted: [],\n\t\t\texecutedCount: 0\n\t\t} : await this.#applyOperations(driver, options, operations, progress);\n\t\tif (!applied.result.ok) return applied.result;\n\t\tconst schema = await this.family.introspect({\n\t\t\tdriver,\n\t\t\tcontract: options.destinationContract\n\t\t});\n\t\tconst verified = this.family.verifySchema({\n\t\t\tcontract: options.destinationContract,\n\t\t\tschema,\n\t\t\tstrict: options.strictVerification ?? true,\n\t\t\tframeworkComponents: options.frameworkComponents\n\t\t});\n\t\tif (!verified.ok) return runnerFailure(\"MIGRATION.SCHEMA_VERIFY_FAILED\", verified.summary, {\n\t\t\twhy: schemaCheckWhy(verified.schema.issues),\n\t\t\tmeta: { schemaIssues: verified.schema.issues }\n\t\t});\n\t\tconst existingInvariants = new Set(existingMarker?.invariants ?? []);\n\t\tif (!(isSelfEdge && applied.executedCount === 0 && options.plan.providedInvariants.every((id) => existingInvariants.has(id)))) {\n\t\t\tconst written = await this.#writeMarkerAndLedger(driver, options, existingMarker, applied.executed, progress);\n\t\t\tif (!written.ok) return written;\n\t\t}\n\t\treturn runnerSuccess({\n\t\t\toperationsPlanned: operations.length,\n\t\t\toperationsExecuted: applied.executedCount\n\t\t});\n\t}\n\tasync #ensureControlTables(driver, options) {\n\t\tfor (const query of this.family.bootstrapControlTableQueries()) {\n\t\t\tconst statement = await this.family.lowerAst(query, { contract: options.destinationContract });\n\t\t\tawait driver.query(statement.sql, statement.params);\n\t\t}\n\t}\n\tasync #applyOperations(driver, options, operations, progress) {\n\t\tconst checks = options.executionChecks;\n\t\tconst runPrechecks = checks?.prechecks !== false;\n\t\tconst runPostchecks = checks?.postchecks !== false;\n\t\tconst runIdempotency = checks?.idempotencyChecks !== false;\n\t\tconst executed = [];\n\t\tlet executedCount = 0;\n\t\tconst stop = (result) => ({\n\t\t\tresult,\n\t\t\texecuted,\n\t\t\texecutedCount\n\t\t});\n\t\tfor (const operation of operations) {\n\t\t\toptions.callbacks?.onOperationStart?.(operation);\n\t\t\ttry {\n\t\t\t\tif (runPostchecks && runIdempotency && await this.#allHold(driver, operation.postcheck)) {\n\t\t\t\t\texecuted.push(skipRecord(operation));\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tif (runPrechecks) {\n\t\t\t\t\tconst precheck = await this.#runChecks(driver, operation, \"precheck\");\n\t\t\t\t\tif (!precheck.ok) return stop(precheck);\n\t\t\t\t}\n\t\t\t\tconst execution = await this.#runSteps(driver, operation, progress);\n\t\t\t\tif (!execution.ok) return stop(execution);\n\t\t\t\texecutedCount += 1;\n\t\t\t\tif (runPostchecks) {\n\t\t\t\t\tconst postcheck = await this.#runChecks(driver, operation, \"postcheck\");\n\t\t\t\t\tif (!postcheck.ok) return stop(postcheck);\n\t\t\t\t}\n\t\t\t\texecuted.push(operation);\n\t\t\t} finally {\n\t\t\t\toptions.callbacks?.onOperationComplete?.(operation);\n\t\t\t}\n\t\t}\n\t\treturn stop(okVoid());\n\t}\n\tasync #allHold(driver, steps) {\n\t\tif (steps.length === 0) return false;\n\t\tfor (const step of steps) if (!stepHolds((await driver.query(step.sql, step.params ?? [])).rows)) return false;\n\t\treturn true;\n\t}\n\tasync #runChecks(driver, operation, phase) {\n\t\tfor (const step of operation[phase]) {\n\t\t\tif (stepHolds((await driver.query(step.sql, step.params ?? [])).rows)) continue;\n\t\t\tconst failedCheck = {\n\t\t\t\toperationId: operation.id,\n\t\t\t\tphase,\n\t\t\t\tdescription: step.description,\n\t\t\t\t...ifDefined(\"expectation\", step.expectation)\n\t\t\t};\n\t\t\treturn runnerFailure(phase === \"precheck\" ? \"MIGRATION.PRECHECK_FAILED\" : \"MIGRATION.POSTCHECK_FAILED\", `Operation ${operation.id} failed during ${phase}: ${step.description}`, {\n\t\t\t\twhy: phase === \"precheck\" ? failedPrecheckWhy(failedCheck) : failedPostcheckWhy(failedCheck),\n\t\t\t\tmeta: { failedCheck }\n\t\t\t});\n\t\t}\n\t\treturn okVoid();\n\t}\n\t/** Runs an operation's steps, and records in `progress` each one that reached the database, which a DDL statement changes for good. */\n\tasync #runSteps(driver, operation, progress) {\n\t\tfor (const step of operation.execute) try {\n\t\t\tawait driver.query(step.sql, step.params ?? []);\n\t\t\tprogress.changedDatabase = true;\n\t\t} catch (error) {\n\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\treturn runnerFailure(\"MIGRATION.EXECUTION_FAILED\", `Operation ${operation.id} failed during execution: ${step.description}`, {\n\t\t\t\twhy: message,\n\t\t\t\tmeta: {\n\t\t\t\t\toperationId: operation.id,\n\t\t\t\t\tstepDescription: step.description,\n\t\t\t\t\tsql: step.sql\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn okVoid();\n\t}\n\tasync #writeMarkerAndLedger(driver, options, existingMarker, executed, progress) {\n\t\tconst { plan } = options;\n\t\tconst destination = {\n\t\t\tstorageHash: plan.destination.storageHash,\n\t\t\tprofileHash: plan.destination.profileHash ?? options.destinationContract.profileHash ?? plan.destination.storageHash,\n\t\t\tinvariants: plan.providedInvariants\n\t\t};\n\t\tawait driver.query(\"START TRANSACTION\");\n\t\ttry {\n\t\t\tif (existingMarker === null) await this.family.initMarker({\n\t\t\t\tdriver,\n\t\t\t\tspace: plan.spaceId,\n\t\t\t\tdestination\n\t\t\t});\n\t\t\telse if (!await this.family.updateMarker({\n\t\t\t\tdriver,\n\t\t\t\tspace: plan.spaceId,\n\t\t\t\texpectedFrom: existingMarker.storageHash,\n\t\t\t\tdestination\n\t\t\t})) {\n\t\t\t\tawait driver.query(\"ROLLBACK\");\n\t\t\t\tconst found = await this.family.readMarker({\n\t\t\t\t\tdriver,\n\t\t\t\t\tspace: plan.spaceId\n\t\t\t\t});\n\t\t\t\treturn runnerFailure(\"MIGRATION.MARKER_CAS_FAILURE\", \"Marker was modified by another process during migration execution.\", { meta: {\n\t\t\t\t\tspace: plan.spaceId,\n\t\t\t\t\texpectedStorageHash: existingMarker.storageHash,\n\t\t\t\t\tfoundStorageHash: found?.storageHash ?? null,\n\t\t\t\t\tdestinationStorageHash: plan.destination.storageHash\n\t\t\t\t} });\n\t\t\t}\n\t\t\tawait this.#writeLedger(driver, options, executed);\n\t\t} catch (error) {\n\t\t\tawait driver.query(\"ROLLBACK\").catch(() => void 0);\n\t\t\tthrow error;\n\t\t}\n\t\tprogress.changedDatabase = true;\n\t\tawait driver.query(\"COMMIT\");\n\t\treturn okVoid();\n\t}\n\tasync #writeLedger(driver, options, executed) {\n\t\tconst { plan, migrationEdges } = options;\n\t\tconst edgeOperations = migrationEdges.reduce((sum, edge) => sum + edge.operationCount, 0);\n\t\tif (edgeOperations !== plan.operations.length) throw new InternalError(`Ledger write: plan.operations length (${plan.operations.length}) does not match sum of migrationEdges operationCount (${edgeOperations})`);\n\t\tlet offset = 0;\n\t\tfor (const edge of migrationEdges) {\n\t\t\tconst operations = executed.slice(offset, offset + edge.operationCount);\n\t\t\toffset += edge.operationCount;\n\t\t\tawait this.family.writeLedgerEntry({\n\t\t\t\tdriver,\n\t\t\t\tspace: plan.spaceId,\n\t\t\t\tentry: {\n\t\t\t\t\tedgeId: `${edge.from}->${edge.to}`,\n\t\t\t\t\tfrom: edge.from,\n\t\t\t\t\tto: edge.to,\n\t\t\t\t\tmigrationName: edge.dirName,\n\t\t\t\t\tmigrationHash: edge.migrationHash,\n\t\t\t\t\toperations\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\t#checkDestination(destination, contract) {\n\t\tif (destination.storageHash !== contract.storage.storageHash) return runnerFailure(\"MIGRATION.DESTINATION_CONTRACT_MISMATCH\", `Plan destination storage hash (${destination.storageHash}) does not match provided contract storage hash (${contract.storage.storageHash}).`, { meta: {\n\t\t\tplanStorageHash: destination.storageHash,\n\t\t\tcontractStorageHash: contract.storage.storageHash\n\t\t} });\n\t\tif (destination.profileHash !== void 0 && contract.profileHash !== void 0 && destination.profileHash !== contract.profileHash) return runnerFailure(\"MIGRATION.DESTINATION_CONTRACT_MISMATCH\", `Plan destination profile hash (${destination.profileHash}) does not match provided contract profile hash (${contract.profileHash}).`, { meta: {\n\t\t\tplanProfileHash: destination.profileHash,\n\t\t\tcontractProfileHash: contract.profileHash\n\t\t} });\n\t\treturn okVoid();\n\t}\n\t#checkPolicy(policy, operations) {\n\t\tconst allowed = new Set(policy.allowedOperationClasses);\n\t\tconst refused = operations.find((operation) => !allowed.has(operation.operationClass));\n\t\tif (refused === void 0) return okVoid();\n\t\treturn runnerFailure(\"MIGRATION.POLICY_VIOLATION\", `Operation ${refused.id} has class \"${refused.operationClass}\" which is not allowed by policy.`, {\n\t\t\twhy: `Policy only allows: ${policy.allowedOperationClasses.join(\", \")}.`,\n\t\t\tmeta: {\n\t\t\t\toperationId: refused.id,\n\t\t\t\toperationClass: refused.operationClass,\n\t\t\t\tallowedClasses: policy.allowedOperationClasses\n\t\t\t}\n\t\t});\n\t}\n\t#checkOrigin(marker, origin) {\n\t\tif (origin === null) return okVoid();\n\t\tif (marker === null) return runnerFailure(\"MIGRATION.MARKER_ORIGIN_MISMATCH\", `Missing contract marker: expected origin storage hash ${origin.storageHash}.`, { meta: { expectedOriginStorageHash: origin.storageHash } });\n\t\tif (marker.storageHash !== origin.storageHash) return runnerFailure(\"MIGRATION.MARKER_ORIGIN_MISMATCH\", `Existing contract marker (${marker.storageHash}) does not match plan origin (${origin.storageHash}).`, { meta: {\n\t\t\tmarkerStorageHash: marker.storageHash,\n\t\t\texpectedOriginStorageHash: origin.storageHash\n\t\t} });\n\t\tif (origin.profileHash !== void 0 && marker.profileHash !== origin.profileHash) return runnerFailure(\"MIGRATION.MARKER_ORIGIN_MISMATCH\", `Existing contract marker profile hash (${marker.profileHash}) does not match plan origin profile hash (${origin.profileHash}).`, { meta: {\n\t\t\tmarkerProfileHash: marker.profileHash,\n\t\t\texpectedOriginProfileHash: origin.profileHash\n\t\t} });\n\t\treturn okVoid();\n\t}\n};\nfunction createMysqlMigrationRunner(family) {\n\treturn new MysqlMigrationRunner(family);\n}\n//#endregion\nexport { rawSql as _, MysqlMigration as a, AddUniqueCall as c, DropColumnCall as d, DropForeignKeyCall as f, RawSqlCall as g, DropUniqueCall as h, TypeScriptRenderableMysqlMigration as i, CreateIndexCall as l, DropTableCall as m, MysqlMigrationPlanner as n, AddColumnCall as o, DropIndexCall as p, createMysqlMigrationPlanner as r, AddForeignKeyCall as s, createMysqlMigrationRunner as t, CreateTableCall as u, diffMysqlSchema as v, mysqlContractToSchema as y };\n\n//# sourceMappingURL=runner-C39AEe6-.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,SAAS,sBAAsB,UAAU,OAAO;CAC/C,OAAO,mBAAmB,UAAU;EACnC,qBAAqB;EACrB,gBAAgB;EAChB,gBAAgB,MAAM;EACtB,aAAa,MAAM;CACpB,CAAC;AACF;;AAEA,SAAS,qBAAqB,OAAO,UAAU;CAC9C,MAAM,YAAY,MAAM,KAAK;CAC7B,IAAI,cAAc,KAAK,GAAG,OAAO,KAAK;CACtC,KAAK,MAAM,eAAe,OAAO,KAAK,SAAS,QAAQ,UAAU,GAAG;EACnE,MAAM,QAAQ,SAAS,SAAS,SAAS;GACxC;GACA,YAAY;GACZ,YAAY;EACb,CAAC;EACD,IAAI,UAAU,KAAK,GAAG,OAAO,MAAM;CACpC;AACD;;AAEA,SAAS,gBAAgB,OAAO;CAC/B,IAAI,EAAE,MAAM,kBAAkB,cAAc,MAAM,WAAW,4BAA4B,sFAAsF;CAC/K,MAAM,WAAW,sBAAsB,MAAM,UAAU,iBAAiB,MAAM,mBAAmB,CAAC;CAClG,MAAM,SAAS,MAAM;CACrB,MAAM,uBAAuB,OAAO,OAAO,MAAM,SAAS,QAAQ,UAAU,CAAC,CAAC,QAAQ,OAAO,OAAO,KAAK,GAAG,QAAQ,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;CAC3I,OAAO;EACN,QAAQ,YAAY,UAAU,MAAM;EACpC,uBAAuB,UAAU,qBAAqB,OAAO,MAAM,QAAQ;EAC3E,gBAAgB,qBAAqB,WAAW,EAAE,OAAO,EAAE;CAC5D;AACD;;AAIA,SAAS,cAA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AA8B,aAAa,QAAQ,GAAG,cAAc,QAAQ,eAAe,oCAAoC;GACnJ,KAAK,uBAAuB,OAAO,wBAAwB,KAAK,IAAI,EAAE;GACtE,MAAM;IACL,aAAa,QAAQ;IACrB,gBAAgB,QAAQ;IACxB,gBAAgB,OAAO;GACxB;EACD,CAAC;CACF;CACA,aAAa,QAAQ,QAAQ;EAC5B,IAAI,WAAW,MAAM,OAAO,OAAO;EACnC,IAAI,WAAW,MAAM,OAAO,cAAc,oCAAoC,yDAAyD,OAAO,YAAY,IAAI,EAAE,MAAM,EAAE,2BAA2B,OAAO,YAAY,EAAE,CAAC;EACzN,IAAI,OAAO,gBAAgB,OAAO,aAAa,OAAO,cAAc,oCAAoC,6BAA6B,OAAO,YAAY,gCAAgC,OAAO,YAAY,KAAK,EAAE,MAAM;GACvN,mBAAmB,OAAO;GAC1B,2BAA2B,OAAO;EACnC,EAAE,CAAC;EACH,IAAI,OAAO,gBAAgB,KAAK,KAAK,OAAO,gBAAgB,OAAO,aAAa,OAAO,cAAc,oCAAoC,0CAA0C,OAAO,YAAY,6CAA6C,OAAO,YAAY,KAAK,EAAE,MAAM;GAClR,mBAAmB,OAAO;GAC1B,2BAA2B,OAAO;EACnC,EAAE,CAAC;EACH,OAAO,OAAO;CACf;AACD;AACA,SAAS,2BAA2B,QAAQ;CAC3C,OAAO,IAAI,qBAAqB,MAAM;AACvC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime-BGyTXcQH.d.mts","names":[],"sources":["../../../../3-targets/mysql/3-driver/dist/runtime.d.mts"],"mappings":";;;;;;;UAMU;;WAEC;;WAEA;;WAEA;;;;;KAKN;WACM;WACA;;KAEN,qBAAqB,wCAAwC,UAAU;UAClE;;WAEC;WACA,cAAc;;WAEd,kBAAkB;;;;cAIf,8BAA8B,wCAAwC,0BAA0B"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime-ClRDfPiY.d.mts","names":[],"sources":["../../../../3-targets/mysql/2-adapter/dist/runtime.d.mts"],"mappings":";;;;;;;;;KAQK,gBAAgB,SAAS;;;cAGhB,4BAA4B,QAAQ,aAAa,eAAe;;WAEnE;WACA;WACA,SAAS;EAClB,YAAY,QAAQ;EACpB,MAAM,KAAK,aAAa,SAAS,eAAe,iBAAiB;;;iBAGlD,mBAAmB,QAAQ,qBAAqB,SAAS;;;KAGrE,8BAA8B,yCAAyC,kBAAkB;cAChF,+BAA+B,qCAAqC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"runtime-CrB5DXx4.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;iBAWiB,WAAW,SAAS,kBAAkB,SAAS;iBAC/C,gBAAgB,SAAS;iBACzB,aAAa,SAAS,kBAAkB,SAAS;iBACjD,iBAAiB,SAAS;iBAC1B,cAAc,SAAS;;;;cAI1B;WACH;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB,UAAU;;WAE3B;WACA,iBAAiB;;;;;cAKd,gCAAgC,0BAA0B,SAAS;EAC/E;YACU,yBAAyB,cAAc,KAAK,0BAA0B,YAAY;EAC5F,kBAAkB,UAAU,SAAS,cAAc;;;;UAI3C,mCAAmC;cAC/B,8BAA8B,oCAAoC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"sql-utils-BOS1c2QT.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/sql-utils.d.mts"],"mappings":";;;UAEU;WACC;WACA;WACA;;;;;KAKN;WACM;WACA;IACP;;;;iBAIa,iBAAiB,cAAc;;;;iBAI/B,gBAAgB;;iBAEhB,cAAc;;iBAEd,aAAa"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"sql-utils-Cmv_TVa8-BetrIUcj.mjs","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/sql-utils-Cmv_TVa8.mjs"],"sourcesContent":["import { s as mysqlError } from \"./errors-Cng94tYg.mjs\";\n//#region src/core/sql-utils.ts\n/** A MySQL identifier in backticks, with each backtick doubled. */\nfunction quoteIdentifier(identifier) {\n\tif (identifier.length === 0) throw mysqlError(\"CONTRACT.IDENTIFIER_INVALID\", \"Identifier cannot be empty\", { meta: {\n\t\tvalue: identifier,\n\t\tcontext: \"identifier\"\n\t} });\n\tif (identifier.includes(\"\\0\")) throw mysqlError(\"CONTRACT.IDENTIFIER_INVALID\", \"Identifier cannot contain null bytes\", { meta: {\n\t\tvalue: identifier.replace(/\\0/g, \"\\\\0\"),\n\t\tcontext: \"identifier\"\n\t} });\n\treturn `\\`${identifier.replace(/`/g, \"``\")}\\``;\n}\n/** The body of a MySQL string literal: quotes doubled and backslashes escaped, as MySQL reads them under its default SQL mode. */\nfunction escapeLiteral(value) {\n\tif (value.includes(\"\\0\")) throw mysqlError(\"CONTRACT.IDENTIFIER_INVALID\", \"Literal value cannot contain null bytes\", { meta: {\n\t\tvalue: value.replace(/\\0/g, \"\\\\0\"),\n\t\tcontext: \"literal\"\n\t} });\n\treturn value.replace(/\\\\/g, \"\\\\\\\\\").replace(/'/g, \"''\");\n}\n/** A MySQL string literal. */\nfunction quoteLiteral(value) {\n\treturn `'${escapeLiteral(value)}'`;\n}\n//#endregion\nexport { quoteIdentifier as n, quoteLiteral as r, escapeLiteral as t };\n\n//# sourceMappingURL=sql-utils-Cmv_TVa8.mjs.map"],"mappings":";;;AAGA,SAAS,gBAAgB,YAAY;CACpC,IAAI,WAAW,WAAW,GAAG,MAAM,WAAW,+BAA+B,8BAA8B,EAAE,MAAM;EAClH,OAAO;EACP,SAAS;CACV,EAAE,CAAC;CACH,IAAI,WAAW,SAAS,IAAI,GAAG,MAAM,WAAW,+BAA+B,wCAAwC,EAAE,MAAM;EAC9H,OAAO,WAAW,QAAQ,OAAO,KAAK;EACtC,SAAS;CACV,EAAE,CAAC;CACH,OAAO,KAAK,WAAW,QAAQ,MAAM,IAAI,EAAE;AAC5C;;AAEA,SAAS,cAAc,OAAO;CAC7B,IAAI,MAAM,SAAS,IAAI,GAAG,MAAM,WAAW,+BAA+B,2CAA2C,EAAE,MAAM;EAC5H,OAAO,MAAM,QAAQ,OAAO,KAAK;EACjC,SAAS;CACV,EAAE,CAAC;CACH,OAAO,MAAM,QAAQ,OAAO,MAAM,CAAC,CAAC,QAAQ,MAAM,IAAI;AACvD;;AAEA,SAAS,aAAa,OAAO;CAC5B,OAAO,IAAI,cAAc,KAAK,EAAE;AACjC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"sql-utils-bD4SfgX0.mjs","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/sql-utils.mjs"],"sourcesContent":["import { s as mysqlError } from \"./errors-Cng94tYg.mjs\";\nimport { n as quoteIdentifier, r as quoteLiteral, t as escapeLiteral } from \"./sql-utils-Cmv_TVa8.mjs\";\n//#region src/core/sql-lexer.ts\nconst NUMBERED_PLACEHOLDER = /^\\?([1-9]\\d*)$/;\nfunction placeholderToken(text) {\n\tconst digits = NUMBERED_PLACEHOLDER.exec(text)?.[1];\n\treturn {\n\t\tkind: \"placeholder\",\n\t\ttext,\n\t\tnumber: digits === void 0 ? void 0 : Number(digits)\n\t};\n}\n/** The index just past the quoted text that opens at `start`, where a doubled quote stays inside and, outside a backtick identifier, a backslash escapes the next character. The session clears `NO_BACKSLASH_ESCAPES` and `ANSI_QUOTES`, so MySQL reads quotes the same way. */\nfunction endOfQuoted(sql, start, quote) {\n\tlet index = start + 1;\n\twhile (index < sql.length) {\n\t\tconst char = sql[index];\n\t\tif (char === \"\\\\\" && quote !== \"`\") index += 2;\n\t\telse if (char === quote) {\n\t\t\tif (sql[index + 1] !== quote) return index + 1;\n\t\t\tindex += 2;\n\t\t} else index += 1;\n\t}\n\treturn sql.length;\n}\nfunction endOf(sql, start, terminator) {\n\tconst end = sql.indexOf(terminator, start);\n\treturn end === -1 ? sql.length : end + terminator.length;\n}\n/** MySQL opens a `--` comment when the next character is whitespace or a control character, or the text ends: `my_isspace` or `my_iscntrl` in its lexer. */\nfunction opensDashComment(sql, index) {\n\tif (!sql.startsWith(\"--\", index)) return false;\n\tconst next = sql.charCodeAt(index + 2);\n\treturn Number.isNaN(next) || next <= 32 || next === 127;\n}\nfunction isDigit(char) {\n\treturn char !== void 0 && char >= \"0\" && char <= \"9\";\n}\n/** A character of an unquoted identifier, keyword or number, as MySQL reads one: a letter, a digit, `$`, `_`, or any character past ASCII. */\nfunction isWordChar(char) {\n\tif (char === void 0) return false;\n\tconst lower = char.toLowerCase();\n\treturn isDigit(char) || lower >= \"a\" && lower <= \"z\" || char === \"$\" || char === \"_\" || char >= \"€\";\n}\nfunction isWhitespace(char) {\n\treturn char === \" \" || char === \"\t\" || char === \"\\n\" || char === \"\\r\" || char === \"\\f\" || char === \"\\v\";\n}\nfunction endOfRun(sql, start, belongs) {\n\tlet end = start;\n\twhile (end < sql.length && belongs(sql[end])) end += 1;\n\treturn end;\n}\n/**\n* Splits MySQL SQL into tokens as MySQL's lexer reads it: a `?` inside a quoted string, a backtick identifier or a `#`, `--` or block comment is not a placeholder, and a keyword inside one is not a word. Joining the tokens' text gives the SQL back. Refuses an executable `/*!` comment, whose content MySQL runs as SQL and whose strings the comment's closing marker does not end.\n*/\nfunction tokenizeMysqlSql(sql) {\n\tconst tokens = [];\n\tlet index = 0;\n\twhile (index < sql.length) {\n\t\tconst char = sql[index];\n\t\tlet kind = \"symbol\";\n\t\tlet end = index + 1;\n\t\tif (char === \"'\" || char === \"\\\"\" || char === \"`\") {\n\t\t\tkind = \"quoted\";\n\t\t\tend = endOfQuoted(sql, index, char);\n\t\t} else if (char === \"#\" || opensDashComment(sql, index) || sql.startsWith(\"/*\", index)) {\n\t\t\tif (sql.startsWith(\"/*!\", index)) throw mysqlError(\"RUNTIME.AST_INVALID\", \"A MySQL statement may not contain an executable /*! comment, whose content MySQL runs as SQL\", { meta: {\n\t\t\t\ttarget: \"mysql\",\n\t\t\t\tposition: index\n\t\t\t} });\n\t\t\tkind = \"comment\";\n\t\t\tend = sql.startsWith(\"/*\", index) ? endOf(sql, index + 2, \"*/\") : endOf(sql, index, \"\\n\");\n\t\t} else if (char === \"?\") {\n\t\t\tkind = \"placeholder\";\n\t\t\tend = endOfRun(sql, end, isDigit);\n\t\t} else if (isWhitespace(char)) {\n\t\t\tkind = \"whitespace\";\n\t\t\tend = endOfRun(sql, index, isWhitespace);\n\t\t} else if (isWordChar(char)) {\n\t\t\tkind = \"word\";\n\t\t\tend = endOfRun(sql, index, isWordChar);\n\t\t}\n\t\tconst text = sql.slice(index, end);\n\t\ttokens.push(kind === \"placeholder\" ? placeholderToken(text) : {\n\t\t\tkind,\n\t\t\ttext\n\t\t});\n\t\tindex = end;\n\t}\n\treturn tokens;\n}\n//#endregion\nexport { escapeLiteral, quoteIdentifier, quoteLiteral, tokenizeMysqlSql };\n\n//# sourceMappingURL=sql-utils.mjs.map"],"mappings":";;AAGA,MAAM,uBAAuB;AAC7B,SAAS,iBAAiB,MAAM;CAC/B,MAAM,SAAS,qBAAqB,KAAK,IAAI,CAAC,GAAG;CACjD,OAAO;EACN,MAAM;EACN;EACA,QAAQ,WAAW,KAAK,IAAI,KAAK,IAAI,OAAO,MAAM;CACnD;AACD;;AAEA,SAAS,YAAY,KAAK,OAAO,OAAO;CACvC,IAAI,QAAQ,QAAQ;CACpB,OAAO,QAAQ,IAAI,QAAQ;EAC1B,MAAM,OAAO,IAAI;EACjB,IAAI,SAAS,QAAQ,UAAU,KAAK,SAAS;OACxC,IAAI,SAAS,OAAO;GACxB,IAAI,IAAI,QAAQ,OAAO,OAAO,OAAO,QAAQ;GAC7C,SAAS;EACV,OAAO,SAAS;CACjB;CACA,OAAO,IAAI;AACZ;AACA,SAAS,MAAM,KAAK,OAAO,YAAY;CACtC,MAAM,MAAM,IAAI,QAAQ,YAAY,KAAK;CACzC,OAAO,QAAQ,KAAK,IAAI,SAAS,MAAM,WAAW;AACnD;;AAEA,SAAS,iBAAiB,KAAK,OAAO;CACrC,IAAI,CAAC,IAAI,WAAW,MA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ACzF,OAAO,IAAI,SAAS,KAAK;GACxB,OAAO;GACP,MAAM,SAAS,KAAK,KAAK,OAAO;EACjC,OAAO,IAAI,aAAa,IAAI,GAAG;GAC9B,OAAO;GACP,MAAM,SAAS,KAAK,OAAO,YAAY;EACxC,OAAO,IAAI,WAAW,IAAI,GAAG;GAC5B,OAAO;GACP,MAAM,SAAS,KAAK,OAAO,UAAU;EACtC;EACA,MAAM,OAAO,IAAI,MAAM,OAAO,GAAG;EACjC,OAAO,KAAK,SAAS,gBAAgB,iBAAiB,IAAI,IAAI;GAC7D;GACA;EACD,CAAC;EACD,QAAQ;CACT;CACA,OAAO;AACR"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"statement-DC62oiSx-Buzptbpk.mjs","names":["#queue","#statement","#ensured"],"sources":["../../../../3-targets/mysql/3-driver/dist/statement-DC62oiSx.mjs"],"sourcesContent":["import { readFileSync } from \"node:fs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { type } from \"arktype\";\nimport { SqlConnectionError, SqlQueryError } from \"@internal/sql-errors\";\nimport { quoteIdentifier, tokenizeMysqlSql } from \"@internal/target-mysql/sql-utils\";\nimport { assertDefined } from \"@internal/utils/assertions\";\nimport { mysqlError } from \"@internal/target-mysql/errors\";\n//#region src/core/client-query-lock.ts\nvar AsyncMutex = class {\n\t#queue = Promise.resolve();\n\tasync lock() {\n\t\tconst previous = this.#queue;\n\t\tlet releaseLock;\n\t\tthis.#queue = new Promise((resolve) => {\n\t\t\treleaseLock = resolve;\n\t\t});\n\t\tawait previous;\n\t\treturn () => {\n\t\t\treleaseLock?.();\n\t\t\treleaseLock = void 0;\n\t\t};\n\t}\n};\n/**\n* One statement at a time on each client, in the order sent, as the Postgres driver's per-client lock runs them, on the runtime and the control driver alike. The lock is held until the statement settles, or for a stream's whole life, so a statement sent while a stream is open waits for it.\n*/\nconst clientQueryLocks = /* @__PURE__ */ new WeakMap();\nfunction acquireClientQueryLock(client) {\n\tlet mutex = clientQueryLocks.get(client);\n\tif (mutex === void 0) {\n\t\tmutex = new AsyncMutex();\n\t\tclientQueryLocks.set(client, mutex);\n\t}\n\treturn mutex.lock();\n}\n//#endregion\n//#region src/core/session-setup.ts\n/**\n* Removes the `sql_mode` entries the MySQL target does not support, `NO_BACKSLASH_ESCAPES` and `ANSI_QUOTES`, and the combination mode `ANSI`, which MySQL lists beside its parts and which would set `ANSI_QUOTES` again; no other combination mode includes either. It adds `NO_AUTO_VALUE_ON_ZERO`, so an explicit 0 in an auto-increment column is stored as 0, as Postgres stores it, rather than replaced with a generated value. Leaves no empty entry between two commas.\n*/\nconst SET_SQL_MODE = \"SET SESSION sql_mode = TRIM(LEADING ',' FROM CONCAT(REPLACE(REPLACE(REPLACE(REPLACE(CONCAT(',', @@SESSION.sql_mode, ','), ',NO_BACKSLASH_ESCAPES,', ','), ',ANSI_QUOTES,', ','), ',ANSI,', ','), ',NO_AUTO_VALUE_ON_ZERO,', ','), 'NO_AUTO_VALUE_ON_ZERO'))\";\n/** Makes MySQL read each statement, and the package write it, as utf8mb4. */\nconst SET_UTF8MB4 = \"SET NAMES utf8mb4 COLLATE utf8mb4_unicode_ci\";\n/**\n* The statements every new connection runs once, before any other. The lexer that finds placeholders reads a backslash as an escape and `\"…\"` as a string, so the session clears NO_BACKSLASH_ESCAPES and ANSI_QUOTES and MySQL reads quoted text the same way, and sets NO_AUTO_VALUE_ON_ZERO; and it reads each statement as utf8mb4. These hold no value, so they run through the package's `initSql`; the target's session settings, which do, are set afterwards.\n*/\nconst SESSION_SETUP = [SET_SQL_MODE, SET_UTF8MB4];\n//#endregion\n//#region src/core/text-or-bytes.ts\n/** MySQL's `binary` collation, which marks a string or blob column that holds bytes. */\nconst BINARY_COLLATION = 63;\n/** The column types whose value is text, or bytes when the column's collation is binary. */\nconst CHARACTER_OR_BLOB_TYPES = /* @__PURE__ */ new Set([\n\t\"VARCHAR\",\n\t\"VAR_STRING\",\n\t\"STRING\",\n\t\"TINY_BLOB\",\n\t\"MEDIUM_BLOB\",\n\t\"LONG_BLOB\",\n\t\"BLOB\"\n]);\n/** The column types whose value MySQL sends as text. A type outside this list, such as BIT, GEOMETRY or one the package has no name for, is read as bytes. */\nconst TEXT_TYPES = /* @__PURE__ */ new Set([\n\t...CHARACTER_OR_BLOB_TYPES,\n\t\"DECIMAL\",\n\t\"NEWDECIMAL\",\n\t\"FLOAT\",\n\t\"DOUBLE\",\n\t\"TINY\",\n\t\"SHORT\",\n\t\"INT\",\n\t\"INT24\",\n\t\"BIGINT\",\n\t\"YEAR\",\n\t\"DATE\",\n\t\"NEWDATE\",\n\t\"TIME\",\n\t\"TIME2\",\n\t\"DATETIME\",\n\t\"DATETIME2\",\n\t\"TIMESTAMP\",\n\t\"TIMESTAMP2\",\n\t\"JSON\",\n\t\"ENUM\",\n\t\"SET\",\n\t\"NULL\"\n]);\n/**\n* Reads each column as the row value ADR 155 sets at the driver boundary: a binary string or blob, BIT, GEOMETRY and a column of a type the package does not know as its bytes, every other column as text, and NULL as `null`. Bytes are a plain `Uint8Array`, not the package's `Buffer`.\n*/\nconst readTextOrBytes = (field) => {\n\tif (!TEXT_TYPES.has(field.type) || CHARACTER_OR_BLOB_TYPES.has(field.type) && field.collation.index === BINARY_COLLATION) {\n\t\tconst bytes = field.buffer();\n\t\treturn bytes === null ? null : new Uint8Array(bytes.buffer, bytes.byteOffset, bytes.byteLength);\n\t}\n\treturn field.string();\n};\n//#endregion\n//#region src/core/connection-options.ts\nconst DEFAULT_CONNECT_TIMEOUT_MILLIS = 2e4;\nconst DEFAULT_IDLE_TIMEOUT_MILLIS = 3e4;\nconst urlParameters = type({\n\t\"ssl?\": type(\"'true' | '1' | 'false' | '0'\").pipe((text) => text === \"true\" || text === \"1\"),\n\t\"sslmode?\": \"'disable' | 'prefer' | 'require' | 'verify-ca' | 'verify-full' | 'no-verify'\",\n\t\"sslcert?\": \"string > 0\",\n\t\"sslkey?\": \"string > 0\",\n\t\"sslrootcert?\": \"string > 0\",\n\t\"allowPublicKeyRetrieval?\": type(\"'true' | 'false'\").pipe((text) => text === \"true\")\n});\n/** The form each URL parameter's value must take, for the refusal of a value. */\nconst PARAMETER_FORMS = {\n\tssl: \"true, 1, false or 0\",\n\tsslmode: \"disable, prefer, require, verify-ca, verify-full or no-verify\",\n\tsslcert: \"the path of a PEM file\",\n\tsslkey: \"the path of a PEM file\",\n\tsslrootcert: \"the path of a PEM file\",\n\tallowPublicKeyRetrieval: \"true or false\"\n};\nfunction isParameterName(name) {\n\treturn Object.hasOwn(PARAMETER_FORMS, name);\n}\n/**\n* Options the URL cannot change. The package writes each value into its statement at a bare `?`; every option that would change where or how it writes one (named placeholders, an object written as `SET` entries, several statements in one) stays off, and `logParam` keeps values out of error messages. `permitRedirect` stays off, so a server cannot send the client, with its credentials, to another host, which `pg` never does. `typeCast` reads every column as text or bytes, so no column reaches a codec as a value the package parsed. `foundRows` makes an UPDATE count the rows it matched, as Postgres's row count does. The connection is utf8mb4: the driver reads each statement as utf8mb4 to find its placeholders, and MySQL must read it the same way.\n*/\nconst FIXED_OPTIONS = {\n\tcollation: \"UTF8MB4_UNICODE_CI\",\n\tmultipleStatements: false,\n\tnamedPlaceholders: false,\n\tpermitSetMultiParamEntries: false,\n\tpermitLocalInfile: false,\n\tlogParam: false,\n\tpermitRedirect: false,\n\tfoundRows: true,\n\ttypeCast: readTextOrBytes\n};\n/** Refuses the URL. `parameters` names the parameters at fault; no value from the URL goes into the error, because a URL carries the password. */\nfunction invalidBinding(reason, parameters) {\n\treturn structuredError(\"RUNTIME.BINDING_INVALID\", `MySQL connection URL: ${reason}`, { meta: {\n\t\treceived: parameters.join(\", \"),\n\t\treason\n\t} });\n}\n/** Parses `url` as the Postgres facade does, refusing it without the parser's error, which carries the whole URL. */\nfunction parseUrl(url) {\n\ttry {\n\t\treturn new URL(url);\n\t} catch {\n\t\tthrow invalidBinding(\"the URL cannot be parsed\", []);\n\t}\n}\nfunction readUrl(url) {\n\tconst parsed = parseUrl(url);\n\tif (parsed.searchParams.has(\"charset\")) throw invalidBinding(\"the driver always uses utf8mb4, because it reads each statement as utf8mb4 to find its placeholders; remove the charset parameter\", [\"charset\"]);\n\tconst names = [...new Set(parsed.searchParams.keys())].filter(isParameterName);\n\tconst parameters = urlParameters(Object.fromEntries([...parsed.searchParams].filter(([name]) => isParameterName(name))));\n\tif (parameters instanceof type.errors) {\n\t\tconst invalid = names.filter((name) => parameters.some((error) => error.path[0] === name));\n\t\tthrow invalidBinding(invalid.map((name) => `${name} must be ${PARAMETER_FORMS[name]}`).join(\"; \"), invalid);\n\t}\n\tif (parameters.sslcert !== void 0 && parameters.sslkey === void 0) throw invalidBinding(\"sslcert names the client's certificate and needs sslkey; to check the server's certificate against a CA file, as sslcert did in Prisma 7, use sslrootcert\", [\"sslcert\"]);\n\treturn {\n\t\tparsed,\n\t\tparameters\n\t};\n}\nfunction readPem(parameter, path) {\n\ttry {\n\t\treturn readFileSync(path, \"utf8\");\n\t} catch {\n\t\tthrow invalidBinding(`the file ${parameter} names cannot be read`, [parameter]);\n\t}\n}\n/**\n* The TLS settings the URL gives, read as `pg-connection-string` reads them for the Postgres driver: `ssl=true` turns TLS on and `ssl=false` off; `sslcert`, `sslkey`, `sslrootcert` or `sslmode` turn it on, with the certificate, key and CA read from the files they name. `sslmode=disable` turns it off; `no-verify` accepts any server certificate; every other mode verifies the certificate and the host name, as `verify-full` does.\n*/\nfunction tlsOptions(parameters) {\n\tconst { sslcert, sslkey, sslrootcert, sslmode } = parameters;\n\tif ([\n\t\tsslcert,\n\t\tsslkey,\n\t\tsslrootcert,\n\t\tsslmode\n\t].every((value) => value === void 0)) return parameters.ssl;\n\tif (sslmode === \"disable\") return false;\n\treturn {\n\t\t...ifDefined(\"cert\", sslcert === void 0 ? void 0 : readPem(\"sslcert\", sslcert)),\n\t\t...ifDefined(\"key\", sslkey === void 0 ? void 0 : readPem(\"sslkey\", sslkey)),\n\t\t...ifDefined(\"ca\", sslrootcert === void 0 ? void 0 : readPem(\"sslrootcert\", sslrootcert)),\n\t\t...sslmode === \"no-verify\" ? { rejectUnauthorized: false } : {}\n\t};\n}\nfunction connectionOptions(parsed, parameters, connectTimeoutMs) {\n\treturn {\n\t\thost: decodeURIComponent(parsed.hostname).replace(/^\\[(.*)\\]$/, \"$1\"),\n\t\t...ifDefined(\"port\", parsed.port === \"\" ? void 0 : Number(parsed.port)),\n\t\tuser: decodeURIComponent(parsed.username),\n\t\tpassword: decodeURIComponent(parsed.password),\n\t\tdatabase: decodeURIComponent(parsed.pathname.slice(1)),\n\t\t...ifDefined(\"ssl\", tlsOptions(parameters)),\n\t\tallowPublicKeyRetrieval: parameters.allowPublicKeyRetrieval ?? false,\n\t\tconnectTimeout: connectTimeoutMs ?? DEFAULT_CONNECT_TIMEOUT_MILLIS,\n\t\tinitSql: [...SESSION_SETUP],\n\t\t...FIXED_OPTIONS\n\t};\n}\n/** The `mariadb` options for one connection to the server a `mysql://` URL names. Ignores a URL parameter the driver does not read, as `pg` does, and refuses a charset. */\nfunction mysqlConnectionOptions(url, settings) {\n\tconst { parsed, parameters } = readUrl(url);\n\treturn connectionOptions(parsed, parameters, settings?.connectTimeoutMs);\n}\n/** How long a connection may stay idle before the pool, and the driver's cancel connection, close it. */\nfunction mysqlPoolIdleTimeoutMillis(poolOptions) {\n\treturn poolOptions?.idleTimeoutMillis ?? DEFAULT_IDLE_TIMEOUT_MILLIS;\n}\n/**\n* The `mariadb` pool options for a `mysql://` URL, sized and timed as the Postgres driver's `pg.Pool`: it opens a connection only when one is needed (`minimumIdle: 0`), closes one idle for `idleTimeoutMillis`, and waits `connectionTimeoutMillis` both to open a connection and for a pooled one to come free.\n*/\nfunction mysqlPoolOptions(url, poolOptions) {\n\tconst { parsed, parameters } = readUrl(url);\n\tconst timeoutMs = poolOptions?.connectionTimeoutMillis ?? DEFAULT_CONNECT_TIMEOUT_MILLIS;\n\treturn {\n\t\t...connectionOptions(parsed, parameters, timeoutMs),\n\t\tacquireTimeout: timeoutMs,\n\t\tminimumIdle: 0,\n\t\tidleTimeout: Math.ceil(mysqlPoolIdleTimeoutMillis(poolOptions) / 1e3),\n\t\t...ifDefined(\"connectionLimit\", poolOptions?.max)\n\t};\n}\n//#endregion\n//#region src/core/descriptor-meta.ts\nconst mysqlDriverDescriptorMeta = {\n\tkind: \"driver\",\n\tfamilyId: \"sql\",\n\ttargetId: \"mysql\",\n\tid: \"mysql\",\n\tversion: \"0.0.1\",\n\tcapabilities: {}\n};\n//#endregion\n//#region src/core/normalize-error.ts\nfunction isMariadbError(error) {\n\treturn error instanceof Error && \"errno\" in error && typeof error.errno === \"number\";\n}\n/** Whether `error` left its connection unusable: the package marks a lost socket, and a server error of SQLSTATE class 08, as fatal. */\nfunction isFatal(error) {\n\treturn error instanceof Error && \"fatal\" in error && error.fatal === true;\n}\nfunction serverMessage(error) {\n\treturn isMariadbError(error) ? error.sqlMessage ?? error.message : error.message;\n}\n/** The error a statement ends with when its connection is lost or closed under it: a `SqlConnectionError` a retry on a new connection can get past, as on Postgres. */\nfunction connectionLost(cause) {\n\treturn new SqlConnectionError(serverMessage(cause), {\n\t\tcause,\n\t\ttransient: true,\n\t\t...ifDefined(\"sqlState\", isMariadbError(cause) ? cause.sqlState ?? void 0 : void 0)\n\t});\n}\n/** Node's socket and DNS error codes, and whether a retry can succeed after each, as the Postgres driver classifies them. */\nconst NODE_CONNECTION_CODES = /* @__PURE__ */ new Map([\n\t[\"ECONNRESET\", true],\n\t[\"ETIMEDOUT\", true],\n\t[\"EPIPE\", true],\n\t[\"EAI_AGAIN\", true],\n\t[\"ECONNREFUSED\", false],\n\t[\"ENOTFOUND\", false],\n\t[\"EHOSTUNREACH\", false]\n]);\n/** Whether a retry can succeed after `error`, for a Node socket or DNS error; undefined for any other. */\nfunction nodeConnectionTransience(error) {\n\treturn error instanceof Error && \"code\" in error && typeof error.code === \"string\" ? NODE_CONNECTION_CODES.get(error.code) : void 0;\n}\nconst ER_GET_CONNECTION_TIMEOUT = 45028;\nconst ER_INITIAL_SQL_ERROR = 45030;\nconst ER_CANNOT_RETRIEVE_RSA_KEY = 45044;\n/** The errors MySQL refuses a sign-in with: access denied, access denied for a socket-authenticated account, and an authentication plugin the server has not loaded. Another attempt with the same URL fails the same way. */\nconst SIGN_IN_REFUSED = /* @__PURE__ */ new Set([\n\t1045,\n\t1698,\n\t1524\n]);\n/** Whether `error` is one another attempt to connect with the same settings cannot get past: a refused connection, an unknown or unreachable host, a refused sign-in, a sign-in that needs the server's public key, or session setup MySQL refuses. */\nfunction connectingCannotSucceed(error) {\n\tif (nodeConnectionTransience(error) === false) return true;\n\treturn isMariadbError(error) && (SIGN_IN_REFUSED.has(error.errno) || error.errno === ER_CANNOT_RETRIEVE_RSA_KEY || error.errno === ER_INITIAL_SQL_ERROR);\n}\nconst UNIQUE_VIOLATION = \"23505\";\nconst FOREIGN_KEY_VIOLATION = \"23503\";\n/** The SQLSTATE Postgres sends for each constraint MySQL reports under a shared SQLSTATE, as the SQLite driver maps its own codes, so a consumer such as `isUniqueConstraintViolation` reads them alike. */\nconst CONSTRAINT_SQLSTATES = /* @__PURE__ */ new Map([\n\t[1062, UNIQUE_VIOLATION],\n\t[1586, UNIQUE_VIOLATION],\n\t[1216, FOREIGN_KEY_VIOLATION],\n\t[1217, FOREIGN_KEY_VIOLATION],\n\t[1451, FOREIGN_KEY_VIOLATION],\n\t[1452, FOREIGN_KEY_VIOLATION],\n\t[1048, \"23502\"],\n\t[3819, \"23514\"]\n]);\nconst PUBLIC_KEY_FIX = \"Add allowPublicKeyRetrieval=true to the URL, or connect over TLS with sslmode or ssl=true in the URL. Fetching the key over plain TCP lets a machine between the client and the server pose as the server and read the password; TLS does not.\";\n/** The fix for a failed connection when the package's error names its cause, such as a sign-in that needs the server's public key. */\nfunction connectionFix(error) {\n\treturn isMariadbError(error) && error.errno === ER_CANNOT_RETRIEVE_RSA_KEY ? PUBLIC_KEY_FIX : void 0;\n}\nfunction publicKeyNeeded(error) {\n\treturn new SqlConnectionError(`MySQL sign-in needs the server's public key: the account signs in with caching_sha2_password or sha256_password over a connection without TLS. ${PUBLIC_KEY_FIX}`, {\n\t\tcause: error,\n\t\ttransient: false\n\t});\n}\nfunction poolTimedOut(error) {\n\tconst cause = error.cause;\n\tif (connectingCannotSucceed(cause)) return normalizeMysqlError(cause);\n\treturn new SqlConnectionError(cause instanceof Error ? `Timed out waiting for a pooled MySQL connection; the pool could not open one: ${serverMessage(cause)}` : \"Timed out waiting for a pooled MySQL connection; every connection in the pool was in use.\", {\n\t\tcause: error,\n\t\ttransient: true\n\t});\n}\n/**\n* An error from the `mariadb` package as the driver reports it, in the family's types as the Postgres driver reports its own: a Node socket or DNS error as a `SqlConnectionError`, transient as the Postgres driver's table says; a lost connection and a pool that gave no connection in time as a transient `SqlConnectionError`; a sign-in that needs the server's public key, and session setup that fails, as a `SqlConnectionError` that is not transient; a sign-in MySQL refuses, as Postgres's 28P01, and an error MySQL reported about a statement as `SqlQueryError` with its SQLSTATE, a constraint violation with the SQLSTATE Postgres sends; and any other error unchanged. A pool that timed out because it could not connect in a way no retry can get past reports that error.\n*/\nfunction normalizeMysqlError(error) {\n\tconst transient = nodeConnectionTransience(error);\n\tif (transient !== void 0 && error instanceof Error) return new SqlConnectionError(error.message, {\n\t\tcause: error,\n\t\ttransient\n\t});\n\tif (!isMariadbError(error)) return error;\n\tif (error.errno === ER_CANNOT_RETRIEVE_RSA_KEY) return publicKeyNeeded(error);\n\tif (error.errno === ER_INITIAL_SQL_ERROR) return new SqlConnectionError(serverMessage(error), {\n\t\tcause: error,\n\t\ttransient: false\n\t});\n\tif (isFatal(error) && !SIGN_IN_REFUSED.has(error.errno)) return connectionLost(error);\n\tif (error.errno === ER_GET_CONNECTION_TIMEOUT) return poolTimedOut(error);\n\tif (typeof error.sqlState !== \"string\") return error;\n\treturn new SqlQueryError(error.sqlMessage ?? error.message, {\n\t\tcause: error,\n\t\tsqlState: CONSTRAINT_SQLSTATES.get(error.errno) ?? error.sqlState\n\t});\n}\n//#endregion\n//#region src/core/session-settings.ts\nconst DECIMAL_INTEGER = /^-?\\d+$/;\n/** A setting's value as MySQL takes it: decimal integer text as a whole number, because MySQL refuses text for an integer variable, and any other text as it is. */\nfunction settingValue(value) {\n\treturn DECIMAL_INTEGER.test(value) ? BigInt(value) : value;\n}\n/** The one statement that sets `sessionSettings`: each name a quoted identifier, each value a parameter. Undefined when there is nothing to set. */\nfunction sessionSettingsStatement(sessionSettings) {\n\tconst entries = Object.entries(sessionSettings);\n\tif (entries.length === 0) return void 0;\n\treturn {\n\t\tsql: `SET SESSION ${entries.map(([name]) => `${quoteIdentifier(name)} = ?`).join(\", \")}`,\n\t\tvalues: entries.map(([, value]) => settingValue(value))\n\t};\n}\n/** Sets the session settings on `connection`, the package writing each value into the statement. Throws the package's error as it is. */\nasync function applySessionSettings(connection, statement) {\n\tawait connection.query(statement.sql, [...statement.values]);\n}\n/**\n* Ensures the session settings a target declares on each physical connection the runtime driver gets from its pool, once, as the Postgres driver's `SessionSettingsGuard` does for a pool it did not start the sessions of. The package hands out a new wrapper for each `getConnection`, so a connection is known by its `info`, which belongs to the physical connection.\n*/\nvar SessionSettingsGuard = class {\n\t#statement;\n\t#ensured = /* @__PURE__ */ new WeakSet();\n\tconstructor(sessionSettings) {\n\t\tthis.#statement = sessionSettingsStatement(sessionSettings);\n\t}\n\tasync ensure(connection) {\n\t\tconst key = connection.info;\n\t\tassertDefined(key, \"the package gives every connection its info when it creates it\");\n\t\tif (this.#statement === void 0 || this.#ensured.has(key)) return;\n\t\tawait applySessionSettings(connection, this.#statement);\n\t\tthis.#ensured.add(key);\n\t}\n};\n//#endregion\n//#region src/core/parameter-values.ts\nfunction unsendable(message, paramIndex, received) {\n\treturn mysqlError(\"RUNTIME.ENCODE_FAILED\", message, { meta: {\n\t\ttarget: \"mysql\",\n\t\tparamIndex,\n\t\treceived\n\t} });\n}\nconst BIGINT_MIN = -(2n ** 63n);\nconst BIGINT_MAX = 2n ** 63n - 1n;\nconst LONE_SURROGATE = /\\p{Surrogate}/u;\nfunction withinBigint(value) {\n\treturn value >= BIGINT_MIN && value <= BIGINT_MAX;\n}\nfunction receivedKind(value) {\n\tif (value instanceof Date) return \"Date\";\n\tif (Array.isArray(value)) return \"array\";\n\treturn typeof value;\n}\n/**\n* The value the `mariadb` package writes into the statement for a parameter. A finite number or a bigint goes as it is, and the package writes its digits. A non-finite number is refused, because the package would write `NaN` or `Infinity` into the SQL. A bigint must fit a signed BIGINT, so a parameter's type never depends on its value. A `Uint8Array` goes as a Buffer over the same bytes, because the package writes any other `Uint8Array` as JSON text. A `Date` is refused: the package writes it in the process's local time zone, and the MySQL codecs send dates as text. So is text with a lone UTF-16 surrogate, which the package writes as `?` or U+FFFD depending on the text's length.\n*/\nfunction bindValue(value, index) {\n\tif (value === null || value === void 0) return null;\n\tif (typeof value === \"number\") {\n\t\tif (!Number.isFinite(value)) throw unsendable(`Parameter ${index + 1} is ${value}, which MySQL cannot store`, index, String(value));\n\t\treturn value;\n\t}\n\tif (typeof value === \"bigint\") {\n\t\tif (withinBigint(value)) return value;\n\t\tthrow unsendable(`Parameter ${index + 1} is an integer outside MySQL's signed 64-bit BIGINT`, index, \"bigint\");\n\t}\n\tif (Buffer.isBuffer(value)) return value;\n\tif (value instanceof Uint8Array) return Buffer.from(value.buffer, value.byteOffset, value.byteLength);\n\tif (typeof value === \"string\") {\n\t\tif (!LONE_SURROGATE.test(value)) return value;\n\t\tthrow unsendable(`Parameter ${index + 1} is text with a lone UTF-16 surrogate, which is not a character and has no utf8mb4 form; the mariadb package would store it as ? or as U+FFFD, depending on the length of the text`, index, \"string\");\n\t}\n\tif (typeof value === \"boolean\") return value;\n\tconst received = receivedKind(value);\n\tthrow unsendable(`Parameter ${index + 1} is of type ${received}; a MySQL parameter must be text, a number, a bigint, a boolean, bytes or null, and a Date is sent as text by its codec`, index, received);\n}\n//#endregion\n//#region src/core/positional-params.ts\nfunction placeholderMismatch(placeholders, values) {\n\treturn structuredError(\"RUNTIME.PARAM_PLACEHOLDER_MISMATCH\", `The MySQL statement writes placeholders ${JSON.stringify(placeholders)} for ${values} parameter value(s); write each value as a numbered ?N, or every value as a bare ? in order, and no other placeholder.`, {\n\t\twhy: \"A placeholder that does not match a value binds a value to the wrong place in the statement, or leaves a value unbound.\",\n\t\tfix: \"Pass values into raw SQL through interpolation rather than writing a `?` in the SQL text.\",\n\t\tmeta: {\n\t\t\tplaceholders,\n\t\t\tparams: values\n\t\t}\n\t});\n}\n/** The index into `values` each placeholder takes: `?N` takes value N, and bare `?`s take the values in order. */\nfunction valueIndexes(placeholders, values) {\n\tconst texts = placeholders.map((placeholder) => placeholder.text);\n\tif (texts.every((text) => text === \"?\")) {\n\t\tif (placeholders.length !== values) throw placeholderMismatch(texts, values);\n\t\treturn placeholders.map((_, index) => index);\n\t}\n\tconst indexes = placeholders.map((placeholder) => (placeholder.number ?? 0) - 1);\n\tif (!(indexes.every((index) => index >= 0 && index < values) && new Set(indexes).size === values)) throw placeholderMismatch(texts, values);\n\treturn indexes;\n}\n/**\n* The statement with each placeholder written as MySQL's positional `?`, and its values in that order. The adapter writes numbered `?N` placeholders, a value written as often as its `?N` appears; the control plane writes bare `?`s, which take the values in order. `tokenizeMysqlSql` reads the statement as MySQL's lexer does, so a `?` inside a quoted string, a backtick identifier or a comment stays text. Refuses a statement that mixes the two forms, or whose placeholders and values do not match.\n*/\nfunction positionalParams(sql, values) {\n\tconst tokens = tokenizeMysqlSql(sql);\n\tconst indexes = valueIndexes(tokens.filter((token) => token.kind === \"placeholder\"), values.length);\n\treturn {\n\t\tsql: tokens.map((token) => token.kind === \"placeholder\" ? \"?\" : token.text).join(\"\"),\n\t\tvalues: indexes.map((index) => bindValue(values[index], index))\n\t};\n}\n//#endregion\n//#region src/core/statement.ts\n/** The server status flag MySQL sets in every reply while it reports `NO_BACKSLASH_ESCAPES` in the session's `sql_mode`. */\nconst NO_BACKSLASH_ESCAPES = 512;\nfunction noBackslashEscapesRefusal(params) {\n\treturn mysqlError(\"RUNTIME.SQL_MODE_UNSUPPORTED\", \"MySQL reports NO_BACKSLASH_ESCAPES in this connection's sql_mode, which the MySQL target does not support, so the driver does not send a statement with values\", {\n\t\twhy: \"In this mode MySQL ends a string at a backslash and a quote, while the mariadb package, which writes the values into the statement, finds its placeholders as if the backslash escaped the quote, so a value could land outside its string literal and run as SQL. The driver removes the mode on every connection it opens, so a statement on this connection made MySQL report it: a raw SET sql_mode that set it, which stays until the connection closes or a statement clears it, or a stored procedure that set it inside itself, after which MySQL restores the mode the connection had, which may be off, but keeps reporting this one until a statement sets sql_mode again.\",\n\t\tfix: `Do not set NO_BACKSLASH_ESCAPES on a connection Prisma uses, in raw SQL, a stored procedure or a trigger. A raw SET run outside a transaction stays on whichever pooled connection ran it; restart the client to close that connection. A statement that needs the mode must run in a transaction or on a connection you hold, which must set the mode back before it is released, with ${SET_SQL_MODE}. A statement without values still runs.`,\n\t\tmeta: {\n\t\t\tsqlMode: \"NO_BACKSLASH_ESCAPES\",\n\t\t\tparams\n\t\t}\n\t});\n}\n/** The character set MySQL last reported for the statements the connection sends, as the package records it: utf8mb3 and utf8mb4 both as `utf8`, told apart by their longest character. */\nfunction reportedCharacterSet(collation) {\n\tif (typeof collation === \"object\" && collation !== null && \"charset\" in collation && \"maxLength\" in collation) return collation.charset === \"utf8\" ? `utf8mb${String(collation.maxLength)}` : String(collation.charset);\n\treturn \"unknown\";\n}\nfunction characterSetRefusal(characterSet, params) {\n\treturn mysqlError(\"RUNTIME.CHARACTER_SET_UNSUPPORTED\", `The driver could not confirm that MySQL reads this connection's statements as utf8mb4: the character set the mariadb package last recorded for it is ${characterSet}. The MySQL target supports only utf8mb4, so the driver does not send a statement with values`, {\n\t\twhy: \"The mariadb package, which writes the values into the statement, encodes the statement in the character set it last recorded and finds its placeholders byte by byte. In a character set such as sjis, cp932, big5 or gbk, the second byte of some characters is a backslash, so the package can read the end of a string literal in the SQL differently from MySQL, and a value could run as SQL. The package records the character set from the server greeting and from MySQL's report of changed session variables. Two causes are known: a statement on this connection changed character_set_client, such as a raw SET NAMES; or the server does not report character_set_client in session_track_system_variables, so the package never saw the driver set utf8mb4 and still holds the default character set from the greeting.\",\n\t\tfix: `If a statement changed the character set: do not change it on a connection Prisma uses. A raw SET run outside a transaction stays on whichever pooled connection ran it; restart the client to close that connection. A statement that needs another character set must run in a transaction or on a connection you hold, which must set it back before it is released, with ${SET_UTF8MB4}. If no statement changed it: add character_set_client back to the server's session_track_system_variables, as in MySQL's default, and restart the client. A statement without values still runs.`,\n\t\tmeta: {\n\t\t\tcharacterSet,\n\t\t\tparams\n\t\t}\n\t});\n}\n/**\n* The statement to hand to `connection`: `sql` with its placeholders written as `?` and the values in their order, for the package to write in. A statement without values comes back as written with no values, so the package sends it without searching it for placeholders. Refuses a statement with values while the server last reported `NO_BACKSLASH_ESCAPES` on, or while the package's record of the character set is not utf8mb4, which a statement the application sends or a server that does not report `character_set_client` can cause. A statement without values still runs, so the setting can be put back; the driver's lexer still reads a backslash as an escape then, so at worst it refuses such a statement for a `?` it reads outside a string.\n*/\nfunction statementFor(connection, sql, params) {\n\tconst { info } = connection;\n\tassertDefined(info, \"the package gives every connection its info when it creates it\");\n\tif (params.length > 0) {\n\t\tif ((info.status & NO_BACKSLASH_ESCAPES) !== 0) throw noBackslashEscapesRefusal(params.length);\n\t\tconst characterSet = reportedCharacterSet(info.collation);\n\t\tif (characterSet !== \"utf8mb4\") throw characterSetRefusal(characterSet, params.length);\n\t}\n\tconst statement = positionalParams(sql, params);\n\treturn params.length > 0 ? statement : {\n\t\tsql,\n\t\tvalues: void 0\n\t};\n}\n//#endregion\nexport { connectingCannotSucceed as a, isFatal as c, mysqlConnectionOptions as d, mysqlPoolIdleTimeoutMillis as f, sessionSettingsStatement as i, normalizeMysqlError as l, acquireClientQueryLock as m, SessionSettingsGuard as n, connectionFix as o, mysqlPoolOptions as p, applySessionSettings as r, connectionLost as s, statementFor as t, mysqlDriverDescriptorMeta as u };\n\n//# sourceMappingURL=statement-DC62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AgB,MAAM,MAAM,IAAI,CAAC,CAAC,KAAK,EAAE;EACnF,QAAQ,QAAQ,KAAK,UAAU,UAAU,OAAO,QAAQ,KAAK,CAAC;CAC/D;AACD;;AAIA,MAAM,uBAAuB;AAC7B,SAAS,0BAA0B,QAAQ;CAC1C,OAAO,WAAW,gCAAgC,kKAAkK;EACnN,KAAK;EACL,KAAK,2XAA2X,aAAa;EAC7Y,MAAM;GACL,SAAS;GACT;EACD;CACD,CAAC;AACF;;AAEA,SAAS,qBAAqB,WAAW;CACxC,IAAI,OAAO,cAAc,YAAY,cAAc,QAAQ,aAAa,aAAa,eAAe,WAAW,OAAO,UAAU,YAAY,SAAS,SAAS,OAAO,UAAU,SAAS,MAAM,OAAO,UAAU,OAAO;CACtN,OAAO;AACR;AACA,SAAS,oBAAoB,cAAc,QAAQ;CAClD,OAAO,WAAW,qCAAqC,wJAAwJ,aAAa,gGAAgG;EAC3T,KAAK;EACL,KAAK,gXAAgX,YAAY;EACjY,MAAM;GACL;GACA;EACD;CACD,CAAC;AACF;;;;AAIA,SAAS,aAAa,YAAY,KAAK,QAAQ;CAC9C,MAAM,EAAE,SAAS;CACjB,cAAc,MAAM,gEAAgE;CACpF,IAAI,OAAO,SAAS,GAAG;EACtB,KAAK,KAAK,SAAS,0BAA0B,GAAG,MAAM,0BAA0B,OAAO,MAAM;EAC7F,MAAM,eAAe,qBAAqB,KAAK,SAAS;EACxD,IAAI,iBAAiB,WAAW,MAAM,oBAAoB,cAAc,OAAO,MAAM;CACtF;CACA,MAAM,YAAY,iBAAiB,KAAK,MAAM;CAC9C,OAAO,OAAO,SAAS,IAAI,YAAY;EACtC;EACA,QAAQ,KAAK;CACd;AACD"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"target__control.mjs","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/control.mjs"],"sourcesContent":["import { s as mysqlError } from \"./errors-Cng94tYg.mjs\";\nimport { n as mysqlScalarTypeConstructors, t as mysqlTargetDescriptorMeta } from \"./descriptor-meta-CsMPRsxp.mjs\";\nimport { t as MysqlContractSerializer } from \"./mysql-contract-serializer-BnTKRSsN.mjs\";\nimport { r as createMysqlMigrationPlanner, t as createMysqlMigrationRunner, v as diffMysqlSchema, y as mysqlContractToSchema } from \"./runner-C39AEe6-.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { setFallbackTemporal } from \"@internal/type-implementations/temporal\";\nimport { sqlTypeLookupsOf } from \"@internal/family-sql/control\";\nimport { SqlStorage } from \"@internal/sql-contract/types\";\nimport { relationalNodeEntityKind, relationalNodeGranularity } from \"@internal/sql-schema-ir/types\";\nimport { Temporal } from \"temporal-polyfill/full/implementation\";\nimport { SqlSchemaVerifierBase } from \"@internal/family-sql/ir\";\n//#region src/core/migrations/mysql-schema-verifier.ts\n/** The MySQL `SchemaVerifier`. Verification runs through `diffSchema`; these hooks add nothing, as on the other SQL targets. */\nvar MysqlSchemaVerifier = class extends SqlSchemaVerifierBase {\n\tverifyCommonSqlSchema(_options) {\n\t\treturn [];\n\t}\n\tverifyTargetExtensions(_options) {\n\t\treturn [];\n\t}\n};\n//#endregion\n//#region src/core/migrations/control-target.ts\nfunction isSqlContract(contract) {\n\treturn contract === null || contract.storage instanceof SqlStorage;\n}\nfunction createMysqlControlTargetDescriptor() {\n\tsetFallbackTemporal(Temporal);\n\treturn {\n\t\t...mysqlTargetDescriptorMeta,\n\t\tcontractSerializer: new MysqlContractSerializer(),\n\t\tschemaVerifier: new MysqlSchemaVerifier(),\n\t\tdiffSchema: diffMysqlSchema,\n\t\tclassifySubjectGranularity: relationalNodeGranularity,\n\t\tclassifyEntityKind: relationalNodeEntityKind,\n\t\tmigrations: {\n\t\t\tcreatePlanner(adapter) {\n\t\t\t\treturn createMysqlMigrationPlanner(adapter);\n\t\t\t},\n\t\t\tcreateRunner(family) {\n\t\t\t\treturn blindCast(createMysqlMigrationRunner(family));\n\t\t\t},\n\t\t\tcontractToSchema(contract, frameworkComponents) {\n\t\t\t\tif (!isSqlContract(contract)) throw mysqlError(\"CONTRACT.TARGET_MISMATCH\", \"The MySQL target received a contract that is not a SQL contract.\");\n\t\t\t\treturn mysqlContractToSchema(contract, sqlTypeLookupsOf(frameworkComponents));\n\t\t\t}\n\t\t},\n\t\tcreate() {\n\t\t\treturn {\n\t\t\t\tfamilyId: \"sql\",\n\t\t\t\ttargetId: \"mysql\"\n\t\t\t};\n\t\t},\n\t\tcreatePlanner(adapter) {\n\t\t\treturn createMysqlMigrationPlanner(adapter);\n\t\t},\n\t\tcreateRunner(family) {\n\t\t\treturn createMysqlMigrationRunner(family);\n\t\t}\n\t};\n}\nconst mysqlControlTargetDescriptor = createMysqlControlTargetDescriptor();\n//#endregion\nexport { mysqlControlTargetDescriptor as default, mysqlScalarTypeConstructors };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,IAAI,sBAAsB,cAAc,sBAAsB;CAC7D,sBAAsB,UAAU;EAC/B,OAAO,CAAC;CACT;CACA,uBAAuB,UAAU;EAChC,OAAO,CAAC;CACT;AACD;AAGA,SAAS,cAAc,UAAU;CAChC,OAAO,aAAa,QAAQ,SAAS,mBAAmB;AACzD;AACA,SAAS,qCAAqC;CAC7C,oBAAoB,QAAQ;CAC5B,OAAO;EACN,GAAG;EACH,oBAAoB,IAAI,wBAAwB;EAChD,gBAAgB,IAAI,oBAAoB;EACxC,YAAY;EACZ,4BAA4B;EAC5B,oBAAoB;EACpB,YAAY;GACX,cAAc,SAAS;IACtB,OAAO,4BAA4B,OAAO;GAC3C;GACA,aAAa,QAAQ;IACpB,OAAO,UAAU,2BAA2B,MAAM,CAAC;GACpD;GACA,iBAAiB,UAAU,qBAAqB;IAC/C,IAAI,CAAC,cAAc,QAAQ,GAAG,MAAM,WAAW,4BAA4B,kEAAkE;IAC7I,OAAO,sBAAsB,UAAU,iBAAiB,mBAAmB,CAAC;GAC7E;EACD;EACA,SAAS;GACR,OAAO;IACN,UAAU;IACV,UAAU;GACX;EACD;EACA,cAAc,SAAS;GACtB,OAAO,4BAA4B,OAAO;EAC3C;EACA,aAAa,QAAQ;GACpB,OAAO,2BAA2B,MAAM;EACzC;CACD;AACD;AACA,MAAM,+BAA+B,mCAAmC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types-CgrFHUdk.d.mts","names":[],"sources":["../../../../3-targets/mysql/1-target/dist/types.d.mts"],"mappings":";;;;;;cAKc,sBAAsB;WACzB;WACA;WACA,SAAS;EAClB,YAAY,OAAO;MACf,SAAS,SAAS,eAAe;EACrC;EACA,aAAa;;;;;iBAKE,qBAAqB,OAAO,oBAAoB"}