@prisma/orm-target-postgres 8.0.0-rc.14-dev.29 → 8.0.0-rc.14-dev.31

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 (247) hide show
  1. package/dist/{adapter-DzNbNJ24.d.mts → adapter-BOi8Qpb_.d.mts} +6 -4
  2. package/dist/adapter-BOi8Qpb_.d.mts.map +1 -0
  3. package/dist/{adapter-BNrSLsxC-CXrTrSvP.mjs → adapter-DwUKamWE-9wPlFOdx.mjs} +23 -12
  4. package/dist/adapter-DwUKamWE-9wPlFOdx.mjs.map +1 -0
  5. package/dist/adapter.d.mts +7 -7
  6. package/dist/adapter.mjs +7 -7
  7. package/dist/adapter__adapter.d.mts +1 -1
  8. package/dist/adapter__adapter.mjs +1 -1
  9. package/dist/adapter__control.d.mts +2 -2
  10. package/dist/adapter__control.mjs +10 -16
  11. package/dist/adapter__control.mjs.map +1 -1
  12. package/dist/adapter__runtime.d.mts +1 -1
  13. package/dist/adapter__runtime.mjs +9 -6
  14. package/dist/adapter__runtime.mjs.map +1 -1
  15. package/dist/adapter__sql-renderer.d.mts +1 -1
  16. package/dist/adapter__sql-renderer.mjs +1 -1
  17. package/dist/adapter__types.d.mts +3 -3
  18. package/dist/{authoring-C5Ch8RNG-Qgq9GiOY.mjs → authoring-BarDKx1G-BKhOsXKo.mjs} +20 -65
  19. package/dist/authoring-BarDKx1G-BKhOsXKo.mjs.map +1 -0
  20. package/dist/{check-expressions-DJNIFTHB-C86_fR5c.mjs → check-expressions-BRuSxJ5d-CC5OFfR1.mjs} +3 -3
  21. package/dist/{check-expressions-DJNIFTHB-C86_fR5c.mjs.map → check-expressions-BRuSxJ5d-CC5OFfR1.mjs.map} +1 -1
  22. package/dist/{codec-descriptor-B61d-k4C-BdWVU6Fu.mjs → codec-descriptor-CZAGhM_O-DK9auM7J.mjs} +5 -18
  23. package/dist/codec-descriptor-CZAGhM_O-DK9auM7J.mjs.map +1 -0
  24. package/dist/codec-descriptor-DAQDOwCJ.d.mts +1 -0
  25. package/dist/{codec-descriptor-HYqjI24K-CTO3gTEs.d.mts → codec-descriptor-DkeVTJ3N-XTfZgDGp.d.mts} +9 -10
  26. package/dist/codec-descriptor-DkeVTJ3N-XTfZgDGp.d.mts.map +1 -0
  27. package/dist/{codec-helpers-BmUrP6U9-DuO9gpqZ.mjs → codec-helpers-BKrVHgYc-DFnb5u9l.mjs} +4 -6
  28. package/dist/codec-helpers-BKrVHgYc-DFnb5u9l.mjs.map +1 -0
  29. package/dist/{codecs-CWXNVl1P.mjs → codec-registry-CCCOytGc-BFC0dvlt.mjs} +28 -12
  30. package/dist/codec-registry-CCCOytGc-BFC0dvlt.mjs.map +1 -0
  31. package/dist/{codec-type-map-Br7wS7DK-DmphGfZE.d.mts → codec-type-map-B9MLL97E-RMa5Y4R4.d.mts} +4 -4
  32. package/dist/{codec-type-map-Br7wS7DK-DmphGfZE.d.mts.map → codec-type-map-B9MLL97E-RMa5Y4R4.d.mts.map} +1 -1
  33. package/dist/{codec-types-DBeKvpNs-D9JlxBzY.d.mts → codec-types-Du6N0o5U-DMAI6jag.d.mts} +4 -4
  34. package/dist/{codec-types-DBeKvpNs-D9JlxBzY.d.mts.map → codec-types-Du6N0o5U-DMAI6jag.d.mts.map} +1 -1
  35. package/dist/codec-types-uq3Il6e3.d.mts +2 -0
  36. package/dist/{codecs-CnbVrlil--FxLKWM5.mjs → codecs-BzCRfsit-BbLlbudt.mjs} +35 -228
  37. package/dist/codecs-BzCRfsit-BbLlbudt.mjs.map +1 -0
  38. package/dist/{codecs-DxqbAhl0.d.mts → codecs-C0zx-UlM.d.mts} +10 -14
  39. package/dist/codecs-C0zx-UlM.d.mts.map +1 -0
  40. package/dist/{codecs-BU-eLMQi-BB2afWsO.d.mts → codecs-Ckpsj4IT-C7kgMiKv.d.mts} +16 -90
  41. package/dist/codecs-Ckpsj4IT-C7kgMiKv.d.mts.map +1 -0
  42. package/dist/{contract-free-DeK6m1dy.mjs → contract-free-DAGgx1J-.mjs} +8 -5
  43. package/dist/contract-free-DAGgx1J-.mjs.map +1 -0
  44. package/dist/{control-CyiVFspE.mjs → control-C0mAPRzk.mjs} +75 -117
  45. package/dist/control-C0mAPRzk.mjs.map +1 -0
  46. package/dist/{control-xWtRBAPw.d.mts → control-aDBKB9hQ.d.mts} +5 -10
  47. package/dist/control-aDBKB9hQ.d.mts.map +1 -0
  48. package/dist/{control-adapter-Du0EcG5G-CT4qBFrG.mjs → control-adapter-cjnLE0mN-BmNP2taw.mjs} +14 -18
  49. package/dist/control-adapter-cjnLE0mN-BmNP2taw.mjs.map +1 -0
  50. package/dist/control-fp7Azf3F.d.mts +733 -0
  51. package/dist/control-fp7Azf3F.d.mts.map +1 -0
  52. package/dist/{control-policy-BW5Cgq3Z-Dn2ZVBCP.mjs → control-policy-CuJvncMq-C5yshGZP.mjs} +52 -52
  53. package/dist/control-policy-CuJvncMq-C5yshGZP.mjs.map +1 -0
  54. package/dist/{data-type-entries-cjspFU7A-BBOIqLij.mjs → data-type-entries-DYgNhsVx-BWJJHCQR.mjs} +5 -4
  55. package/dist/data-type-entries-DYgNhsVx-BWJJHCQR.mjs.map +1 -0
  56. package/dist/data-types-DzUVlWeo-CBMHoFoH.mjs +366 -0
  57. package/dist/data-types-DzUVlWeo-CBMHoFoH.mjs.map +1 -0
  58. package/dist/data-types-E1wms1_i.d.mts +96 -0
  59. package/dist/data-types-E1wms1_i.d.mts.map +1 -0
  60. package/dist/{ddl-BQFDVert-CcDdETee.mjs → ddl-BzsT_-qY-Cdzm0YIK.mjs} +3 -3
  61. package/dist/{ddl-BQFDVert-CcDdETee.mjs.map → ddl-BzsT_-qY-Cdzm0YIK.mjs.map} +1 -1
  62. package/dist/{default-normalizer-ByDD_gRm-CKeWEb0x.mjs → default-normalizer-C68YhUBS-BjOeKRhS.mjs} +3 -3
  63. package/dist/{default-normalizer-ByDD_gRm-CKeWEb0x.mjs.map → default-normalizer-C68YhUBS-BjOeKRhS.mjs.map} +1 -1
  64. package/dist/{descriptor-meta-Bvq6_NJ8-Cn_M79Lf.mjs → descriptor-meta-CUmf1G9P-GAdC3zfT.mjs} +9 -7
  65. package/dist/descriptor-meta-CUmf1G9P-GAdC3zfT.mjs.map +1 -0
  66. package/dist/{descriptor-meta-BEigA5Gj-eY7nV4N_.mjs → descriptor-meta-gq4MiUXl-DqqHHHSj.mjs} +4 -90
  67. package/dist/descriptor-meta-gq4MiUXl-DqqHHHSj.mjs.map +1 -0
  68. package/dist/{descriptor-meta-runtime-UwYdV8fD-B_m_Ha8r.mjs → descriptor-meta-runtime-D-ZCTI0a-DVgDk2XT.mjs} +5 -3
  69. package/dist/descriptor-meta-runtime-D-ZCTI0a-DVgDk2XT.mjs.map +1 -0
  70. package/dist/{diff-database-schema-D-eMVqv1.d.mts → diff-database-schema-BGcRo8FM.d.mts} +2 -2
  71. package/dist/{diff-database-schema-D-eMVqv1.d.mts.map → diff-database-schema-BGcRo8FM.d.mts.map} +1 -1
  72. package/dist/{diff-database-schema-_bbfF4oI-D_VmL4Ma.mjs → diff-database-schema-BYHT4ZZp-DHQM3yoO.mjs} +18 -26
  73. package/dist/diff-database-schema-BYHT4ZZp-DHQM3yoO.mjs.map +1 -0
  74. package/dist/{errors-1AjGQf6h.d.mts → errors-DZ3zQdpT.d.mts} +2 -2
  75. package/dist/{errors-1AjGQf6h.d.mts.map → errors-DZ3zQdpT.d.mts.map} +1 -1
  76. package/dist/{full-text-DZ_SB64Q.d.mts → full-text-DjD0tAqd.d.mts} +2 -2
  77. package/dist/{full-text-DZ_SB64Q.d.mts.map → full-text-DjD0tAqd.d.mts.map} +1 -1
  78. package/dist/{full-text-index-expression-525ZZWf0-HIGVQbjL.mjs → full-text-index-expression-DKwm2Z9W-CboCsz4N.mjs} +4 -4
  79. package/dist/{full-text-index-expression-525ZZWf0-HIGVQbjL.mjs.map → full-text-index-expression-DKwm2Z9W-CboCsz4N.mjs.map} +1 -1
  80. package/dist/{full-text-parsers-Cg9SDrnx-DA1eBg1b.d.mts → full-text-parsers-DinPC_86-B2P_FyTG.d.mts} +3 -3
  81. package/dist/{full-text-parsers-Cg9SDrnx-DA1eBg1b.d.mts.map → full-text-parsers-DinPC_86-B2P_FyTG.d.mts.map} +1 -1
  82. package/dist/{infer-psl-contract-Burb6YAz-DbKU4cXm.mjs → infer-psl-contract-DBWXA-jx-CmKQgKZJ.mjs} +11 -11
  83. package/dist/infer-psl-contract-DBWXA-jx-CmKQgKZJ.mjs.map +1 -0
  84. package/dist/{issue-planner-BdnqkLvV.d.mts → issue-planner-pmBrIrEN.d.mts} +7 -2
  85. package/dist/issue-planner-pmBrIrEN.d.mts.map +1 -0
  86. package/dist/{migration-D7F66l-1.d.mts → migration-D189kh3f.d.mts} +3 -3
  87. package/dist/{migration-D7F66l-1.d.mts.map → migration-D189kh3f.d.mts.map} +1 -1
  88. package/dist/migration-PTHAY9Cv.mjs.map +1 -1
  89. package/dist/{native-type-normalizer-CW6g9Fut-C5lMRRjS.mjs → native-type-normalizer-CwyVR7xB.mjs} +3 -9
  90. package/dist/native-type-normalizer-CwyVR7xB.mjs.map +1 -0
  91. package/dist/{op-factory-call-DkzlLBzN-Bc6l0sYN.mjs → op-factory-call-4IafSIKD-D2wO2iyZ.mjs} +11 -11
  92. package/dist/op-factory-call-4IafSIKD-D2wO2iyZ.mjs.map +1 -0
  93. package/dist/{op-factory-call-CaEALaar-Nh0fSxQY.d.mts → op-factory-call-CqKUB1XP-CsEGx4Jd.d.mts} +6 -5
  94. package/dist/op-factory-call-CqKUB1XP-CsEGx4Jd.d.mts.map +1 -0
  95. package/dist/op-factory-call-D5UJ7cDi.d.mts +1 -0
  96. package/dist/{operation-types-sVW52HpK.d.mts → operation-types-DfPl4yzR.d.mts} +2 -2
  97. package/dist/{operation-types-sVW52HpK.d.mts.map → operation-types-DfPl4yzR.d.mts.map} +1 -1
  98. package/dist/{pack-AqcQpXNv.d.mts → pack-Cx7B1N8w.d.mts} +6 -33
  99. package/dist/pack-Cx7B1N8w.d.mts.map +1 -0
  100. package/dist/{planner-D7lEhXHR-8Wz1p_6j.mjs → planner-BWKFZaOu--28k5rC4.mjs} +12 -10
  101. package/dist/planner-BWKFZaOu--28k5rC4.mjs.map +1 -0
  102. package/dist/{planner-DECxo-qa.d.mts → planner-CvUO8Zpn.d.mts} +2 -2
  103. package/dist/{planner-DECxo-qa.d.mts.map → planner-CvUO8Zpn.d.mts.map} +1 -1
  104. package/dist/{planner-ddl-builders-DYLyFXrj.d.mts → planner-ddl-builders-Ckcr8Ov1.d.mts} +10 -8
  105. package/dist/planner-ddl-builders-Ckcr8Ov1.d.mts.map +1 -0
  106. package/dist/planner-ddl-builders-O0JqJIBZ-x7JEHEpU.mjs +93 -0
  107. package/dist/planner-ddl-builders-O0JqJIBZ-x7JEHEpU.mjs.map +1 -0
  108. package/dist/planner-identity-values-BTYw1D7D-CzpXx1yD.mjs +72 -0
  109. package/dist/planner-identity-values-BTYw1D7D-CzpXx1yD.mjs.map +1 -0
  110. package/dist/{planner-identity-values-TfEhnoWa.d.mts → planner-identity-values-DvlFit8A.d.mts} +7 -6
  111. package/dist/planner-identity-values-DvlFit8A.d.mts.map +1 -0
  112. package/dist/{planner-produced-postgres-migration-GZTusMRD-DPb6XqDu.mjs → planner-produced-postgres-migration-B-gWwByI-Cy8tx4pu.mjs} +3 -3
  113. package/dist/{planner-produced-postgres-migration-GZTusMRD-DPb6XqDu.mjs.map → planner-produced-postgres-migration-B-gWwByI-Cy8tx4pu.mjs.map} +1 -1
  114. package/dist/planner-produced-postgres-migration-BI_aepPp.d.mts +1 -0
  115. package/dist/{planner-produced-postgres-migration-DE2Ia9Ba-hYITaAdW.d.mts → planner-produced-postgres-migration-DT3i_p3G-CyQUv3ac.d.mts} +3 -3
  116. package/dist/planner-produced-postgres-migration-DT3i_p3G-CyQUv3ac.d.mts.map +1 -0
  117. package/dist/planner-sql-checks-Cr06nK1--B3gPnC1a.mjs +47 -0
  118. package/dist/planner-sql-checks-Cr06nK1--B3gPnC1a.mjs.map +1 -0
  119. package/dist/{planner-sql-checks-CFgbRTJw.d.mts → planner-sql-checks-iNLJS1dW.d.mts} +8 -3
  120. package/dist/{planner-sql-checks-CFgbRTJw.d.mts.map → planner-sql-checks-iNLJS1dW.d.mts.map} +1 -1
  121. package/dist/{postgres-contract-view-Da0ymIZE-CBV3OE-k.mjs → postgres-contract-view-D60F8OWK-Bi5oJkOx.mjs} +12 -10
  122. package/dist/postgres-contract-view-D60F8OWK-Bi5oJkOx.mjs.map +1 -0
  123. package/dist/{postgres-migration-Dq60Mixq-DYNJokZW.mjs → postgres-migration-PLXsv15e-BruyXuKH.mjs} +21 -20
  124. package/dist/postgres-migration-PLXsv15e-BruyXuKH.mjs.map +1 -0
  125. package/dist/{postgres-migration-BCzAcFmN-Bz_I02Gc.d.mts → postgres-migration-e8UybR1y-C_m4i1jp.d.mts} +3 -3
  126. package/dist/{postgres-migration-BCzAcFmN-Bz_I02Gc.d.mts.map → postgres-migration-e8UybR1y-C_m4i1jp.d.mts.map} +1 -1
  127. package/dist/{postgres-schema-C8slJGZo-CFGUyJPt.mjs → postgres-schema-DXd0mebY-CExd_GcQ.mjs} +3 -3
  128. package/dist/{postgres-schema-C8slJGZo-CFGUyJPt.mjs.map → postgres-schema-DXd0mebY-CExd_GcQ.mjs.map} +1 -1
  129. package/dist/{prisma7-binding-Dm24YoM6.mjs → prisma7-binding-BgMvnMgz.mjs} +30 -30
  130. package/dist/prisma7-binding-BgMvnMgz.mjs.map +1 -0
  131. package/dist/{prisma7-binding-C0GpQxEQ.d.mts → prisma7-binding-D2guML1e.d.mts} +8 -35
  132. package/dist/prisma7-binding-D2guML1e.d.mts.map +1 -0
  133. package/dist/{resolve-ddl-schema-Bq4m2dD9-DrlUipYU.mjs → resolve-ddl-schema-CadTChyu-C7F31wpN.mjs} +3 -3
  134. package/dist/{resolve-ddl-schema-Bq4m2dD9-DrlUipYU.mjs.map → resolve-ddl-schema-CadTChyu-C7F31wpN.mjs.map} +1 -1
  135. package/dist/{runtime-4QFzvcCp.d.mts → runtime-aejvKbMy.d.mts} +2 -2
  136. package/dist/{runtime-4QFzvcCp.d.mts.map → runtime-aejvKbMy.d.mts.map} +1 -1
  137. package/dist/{sql-renderer-CgUgFbU4-BY3PCrmG.mjs → sql-renderer-BjJ3MLnI-DQvfiMO6.mjs} +45 -43
  138. package/dist/sql-renderer-BjJ3MLnI-DQvfiMO6.mjs.map +1 -0
  139. package/dist/{sql-renderer-Bd07vbru.d.mts → sql-renderer-D6UgvbqG.d.mts} +6 -5
  140. package/dist/sql-renderer-D6UgvbqG.d.mts.map +1 -0
  141. package/dist/{sql-utils-Bh-mnsSY-D6hnFPrP.mjs → sql-utils-BMXJi06b-CAQOplfq.mjs} +178 -3
  142. package/dist/sql-utils-BMXJi06b-CAQOplfq.mjs.map +1 -0
  143. package/dist/target.d.mts +27 -27
  144. package/dist/target.mjs +28 -28
  145. package/dist/target__codec-descriptor.d.mts +2 -2
  146. package/dist/target__codec-descriptor.mjs +1 -1
  147. package/dist/target__codec-types.d.mts +3 -3
  148. package/dist/target__codecs.d.mts +3 -3
  149. package/dist/target__codecs.mjs +3 -3
  150. package/dist/target__contract-free.mjs +3 -3
  151. package/dist/target__control.d.mts +2 -2
  152. package/dist/target__control.mjs +4 -4
  153. package/dist/target__data-types.d.mts +2 -2
  154. package/dist/target__data-types.mjs +3 -3
  155. package/dist/target__default-normalizer.mjs +1 -1
  156. package/dist/target__diff-database-schema.d.mts +1 -1
  157. package/dist/target__diff-database-schema.mjs +1 -1
  158. package/dist/target__errors.d.mts +1 -1
  159. package/dist/target__full-text.d.mts +2 -2
  160. package/dist/target__issue-planner.d.mts +1 -1
  161. package/dist/target__issue-planner.mjs +1 -1
  162. package/dist/target__migration.d.mts +2 -2
  163. package/dist/target__migration.mjs +2 -2
  164. package/dist/target__native-type-normalizer.mjs +1 -1
  165. package/dist/target__op-factory-call.d.mts +2 -2
  166. package/dist/target__op-factory-call.mjs +1 -1
  167. package/dist/target__operation-types.d.mts +1 -1
  168. package/dist/target__pack.d.mts +1 -1
  169. package/dist/target__pack.mjs +1 -1
  170. package/dist/target__planner-ddl-builders.d.mts +2 -2
  171. package/dist/target__planner-ddl-builders.mjs +1 -1
  172. package/dist/target__planner-identity-values.d.mts +1 -1
  173. package/dist/target__planner-identity-values.mjs +1 -1
  174. package/dist/target__planner-produced-postgres-migration.d.mts +2 -2
  175. package/dist/target__planner-produced-postgres-migration.mjs +1 -1
  176. package/dist/target__planner-sql-checks.d.mts +1 -1
  177. package/dist/target__planner-sql-checks.mjs +1 -1
  178. package/dist/target__planner.d.mts +1 -1
  179. package/dist/target__planner.mjs +2 -2
  180. package/dist/target__prisma7-binding.d.mts +1 -1
  181. package/dist/target__prisma7-binding.mjs +1 -1
  182. package/dist/target__runtime.mjs +3 -3
  183. package/dist/target__runtime.mjs.map +1 -1
  184. package/dist/target__schema-ir-annotations.mjs +1 -1
  185. package/dist/target__sql-utils.mjs +2 -2
  186. package/dist/target__types.mjs +2 -2
  187. package/dist/{types-BPubHbiE-BzhJ05fG.d.mts → types-D6lgKhE5-Cu48rrw9.d.mts} +7 -4
  188. package/dist/types-D6lgKhE5-Cu48rrw9.d.mts.map +1 -0
  189. package/dist/types-LTOC-zv8.d.mts +2 -0
  190. package/package.json +9 -9
  191. package/dist/adapter-BNrSLsxC-CXrTrSvP.mjs.map +0 -1
  192. package/dist/adapter-DzNbNJ24.d.mts.map +0 -1
  193. package/dist/authoring-C5Ch8RNG-Qgq9GiOY.mjs.map +0 -1
  194. package/dist/codec-descriptor-B61d-k4C-BdWVU6Fu.mjs.map +0 -1
  195. package/dist/codec-descriptor-D8_e5hpo.d.mts +0 -1
  196. package/dist/codec-descriptor-HYqjI24K-CTO3gTEs.d.mts.map +0 -1
  197. package/dist/codec-helpers-BmUrP6U9-DuO9gpqZ.mjs.map +0 -1
  198. package/dist/codec-types-Diyz6muR.d.mts +0 -2
  199. package/dist/codecs-BU-eLMQi-BB2afWsO.d.mts.map +0 -1
  200. package/dist/codecs-CWXNVl1P.mjs.map +0 -1
  201. package/dist/codecs-CnbVrlil--FxLKWM5.mjs.map +0 -1
  202. package/dist/codecs-DxqbAhl0.d.mts.map +0 -1
  203. package/dist/contract-free-DeK6m1dy.mjs.map +0 -1
  204. package/dist/control-CyiVFspE.mjs.map +0 -1
  205. package/dist/control-D7_yfEfH.d.mts +0 -402
  206. package/dist/control-D7_yfEfH.d.mts.map +0 -1
  207. package/dist/control-adapter-Du0EcG5G-CT4qBFrG.mjs.map +0 -1
  208. package/dist/control-policy-BW5Cgq3Z-Dn2ZVBCP.mjs.map +0 -1
  209. package/dist/control-xWtRBAPw.d.mts.map +0 -1
  210. package/dist/data-type-entries-cjspFU7A-BBOIqLij.mjs.map +0 -1
  211. package/dist/data-types-BGsYeBpf-B_5bvuEe.mjs +0 -200
  212. package/dist/data-types-BGsYeBpf-B_5bvuEe.mjs.map +0 -1
  213. package/dist/data-types-DZGKP-qZ.d.mts +0 -47
  214. package/dist/data-types-DZGKP-qZ.d.mts.map +0 -1
  215. package/dist/descriptor-meta-BEigA5Gj-eY7nV4N_.mjs.map +0 -1
  216. package/dist/descriptor-meta-Bvq6_NJ8-Cn_M79Lf.mjs.map +0 -1
  217. package/dist/descriptor-meta-runtime-UwYdV8fD-B_m_Ha8r.mjs.map +0 -1
  218. package/dist/diff-database-schema-_bbfF4oI-D_VmL4Ma.mjs.map +0 -1
  219. package/dist/infer-psl-contract-Burb6YAz-DbKU4cXm.mjs.map +0 -1
  220. package/dist/issue-planner-BdnqkLvV.d.mts.map +0 -1
  221. package/dist/native-type-normalizer-CW6g9Fut-C5lMRRjS.mjs.map +0 -1
  222. package/dist/op-factory-call-CaEALaar-Nh0fSxQY.d.mts.map +0 -1
  223. package/dist/op-factory-call-DVz_g8zS.d.mts +0 -1
  224. package/dist/op-factory-call-DkzlLBzN-Bc6l0sYN.mjs.map +0 -1
  225. package/dist/pack-AqcQpXNv.d.mts.map +0 -1
  226. package/dist/planner-D7lEhXHR-8Wz1p_6j.mjs.map +0 -1
  227. package/dist/planner-ddl-builders-BZLzBmuq-BrpA53eH.mjs +0 -128
  228. package/dist/planner-ddl-builders-BZLzBmuq-BrpA53eH.mjs.map +0 -1
  229. package/dist/planner-ddl-builders-DYLyFXrj.d.mts.map +0 -1
  230. package/dist/planner-identity-values-BmHn5C6U-BYBbUAyR.mjs +0 -90
  231. package/dist/planner-identity-values-BmHn5C6U-BYBbUAyR.mjs.map +0 -1
  232. package/dist/planner-identity-values-TfEhnoWa.d.mts.map +0 -1
  233. package/dist/planner-produced-postgres-migration-BMfo2BlI.d.mts +0 -1
  234. package/dist/planner-produced-postgres-migration-DE2Ia9Ba-hYITaAdW.d.mts.map +0 -1
  235. package/dist/planner-sql-checks-Bxz8yvg8-Bj6jGClB.mjs +0 -192
  236. package/dist/planner-sql-checks-Bxz8yvg8-Bj6jGClB.mjs.map +0 -1
  237. package/dist/planner-type-resolution-Bt2f_q-F-C4T6YTae.mjs +0 -15
  238. package/dist/planner-type-resolution-Bt2f_q-F-C4T6YTae.mjs.map +0 -1
  239. package/dist/postgres-contract-view-Da0ymIZE-CBV3OE-k.mjs.map +0 -1
  240. package/dist/postgres-migration-Dq60Mixq-DYNJokZW.mjs.map +0 -1
  241. package/dist/prisma7-binding-C0GpQxEQ.d.mts.map +0 -1
  242. package/dist/prisma7-binding-Dm24YoM6.mjs.map +0 -1
  243. package/dist/sql-renderer-Bd07vbru.d.mts.map +0 -1
  244. package/dist/sql-renderer-CgUgFbU4-BY3PCrmG.mjs.map +0 -1
  245. package/dist/sql-utils-Bh-mnsSY-D6hnFPrP.mjs.map +0 -1
  246. package/dist/types-BPubHbiE-BzhJ05fG.d.mts.map +0 -1
  247. package/dist/types-DQ5Lh5JL.d.mts +0 -2
@@ -0,0 +1,72 @@
1
+ import { A as pgTimestamptz, E as pgTime, F as pgUuid, I as pgVarbit, L as pgVarchar, M as pgTimetz, O as pgTimestamp, T as pgTextArray, _ as pgInt8, a as pgBytea, b as pgJsonb, c as pgDate, f as pgFloat4, g as pgInt4, h as pgInt2, i as pgBool, n as pgBit, o as pgChar, p as pgFloat8, v as pgInterval, w as pgText, x as pgNumeric, y as pgJson } from "./data-types-DzUVlWeo-CBMHoFoH.mjs";
2
+ import { sqlDataTypeOfCodec } from "@prisma/orm-family-sql/contract/data-type";
3
+ import { ifDefined } from "@prisma/orm-framework/utils/defined";
4
+ //#region ../../../3-targets/3-targets/postgres/dist/planner-identity-values-BTYw1D7D.mjs
5
+ /**
6
+ * Resolves the identity value (monoid neutral element) as a SQL literal for a column's type.
7
+ * Checks codec hooks first (extensions can provide type-specific identity values),
8
+ * then falls back to the built-in map, keyed by the data type the column's codec represents.
9
+ */
10
+ function resolveIdentityValue(column, codecHooks, types, storageTypes = {}) {
11
+ const referencedType = column.typeRef ? storageTypes[column.typeRef] : void 0;
12
+ const codecId = referencedType?.codecId ?? column.codecId;
13
+ const typeParams = referencedType?.typeParams ?? column.typeParams;
14
+ if (column.many) return "'{}'";
15
+ const dataType = sqlDataTypeOfCodec(codecId, types).id;
16
+ const hookDefault = codecHooks.get(codecId)?.resolveIdentityValue?.({
17
+ dataType,
18
+ codecId,
19
+ ...ifDefined("typeParams", typeParams)
20
+ });
21
+ if (hookDefault !== void 0) return hookDefault;
22
+ return buildBuiltinIdentityValue(dataType, typeParams);
23
+ }
24
+ const IDENTITY_VALUES = /* @__PURE__ */ new Map([
25
+ [pgText.id, "''"],
26
+ [pgChar.id, "''"],
27
+ [pgVarchar.id, "''"],
28
+ [pgInt2.id, "0"],
29
+ [pgInt4.id, "0"],
30
+ [pgInt8.id, "0"],
31
+ [pgFloat4.id, "0"],
32
+ [pgFloat8.id, "0"],
33
+ [pgNumeric.id, "0"],
34
+ [pgBool.id, "false"],
35
+ [pgUuid.id, "'00000000-0000-0000-0000-000000000000'"],
36
+ [pgJson.id, "'{}'::json"],
37
+ [pgJsonb.id, "'{}'::jsonb"],
38
+ [pgDate.id, "'epoch'"],
39
+ [pgTimestamp.id, "'epoch'"],
40
+ [pgTimestamptz.id, "'epoch'"],
41
+ [pgTime.id, "'00:00:00'"],
42
+ [pgTimetz.id, "'00:00:00+00'"],
43
+ [pgInterval.id, "'0'"],
44
+ [pgBytea.id, "''::bytea"],
45
+ [pgVarbit.id, "B''"],
46
+ [pgTextArray.id, "'{}'"]
47
+ ]);
48
+ /**
49
+ * Returns the built-in identity value (monoid neutral element) as a SQL literal for the given
50
+ * data type — e.g. 0 for integers, '' for text, false for booleans.
51
+ *
52
+ * This is the planner's fallback when no codec hook provides a type-specific identity value.
53
+ *
54
+ * Returns null for other types (for example enums and extension-owned types without a
55
+ * hook), which causes the planner to fall back to the empty-table precheck.
56
+ *
57
+ * @internal Exported for testing only.
58
+ */
59
+ function buildBuiltinIdentityValue(dataType, typeParams) {
60
+ if (dataType === pgBit.id) return buildBitIdentityValue(typeParams);
61
+ return IDENTITY_VALUES.get(dataType) ?? null;
62
+ }
63
+ function buildBitIdentityValue(typeParams) {
64
+ const length = typeParams?.["length"];
65
+ if (length === void 0) return "B'0'";
66
+ if (typeof length !== "number" || !Number.isInteger(length) || length <= 0) return null;
67
+ return `B'${"0".repeat(length)}'`;
68
+ }
69
+ //#endregion
70
+ export { resolveIdentityValue as n, buildBuiltinIdentityValue as t };
71
+
72
+ //# sourceMappingURL=planner-identity-values-BTYw1D7D-CzpXx1yD.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planner-identity-values-BTYw1D7D-CzpXx1yD.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/planner-identity-values-BTYw1D7D.mjs"],"sourcesContent":["import { A as pgTimestamptz, E as pgTime, F as pgUuid, I as pgVarbit, L as pgVarchar, M as pgTimetz, O as pgTimestamp, T as pgTextArray, _ as pgInt8, a as pgBytea, b as pgJsonb, c as pgDate, f as pgFloat4, g as pgInt4, h as pgInt2, i as pgBool, n as pgBit, o as pgChar, p as pgFloat8, v as pgInterval, w as pgText, x as pgNumeric, y as pgJson } from \"./data-types-DzUVlWeo.mjs\";\nimport { sqlDataTypeOfCodec } from \"@internal/sql-contract/data-type\";\nimport { ifDefined } from \"@internal/utils/defined\";\n//#region src/core/migrations/planner-identity-values.ts\n/**\n* Resolves the identity value (monoid neutral element) as a SQL literal for a column's type.\n* Checks codec hooks first (extensions can provide type-specific identity values),\n* then falls back to the built-in map, keyed by the data type the column's codec represents.\n*/\nfunction resolveIdentityValue(column, codecHooks, types, storageTypes = {}) {\n\tconst referencedType = column.typeRef ? storageTypes[column.typeRef] : void 0;\n\tconst codecId = referencedType?.codecId ?? column.codecId;\n\tconst typeParams = referencedType?.typeParams ?? column.typeParams;\n\tif (column.many) return \"'{}'\";\n\tconst dataType = sqlDataTypeOfCodec(codecId, types).id;\n\tconst hookDefault = codecHooks.get(codecId)?.resolveIdentityValue?.({\n\t\tdataType,\n\t\tcodecId,\n\t\t...ifDefined(\"typeParams\", typeParams)\n\t});\n\tif (hookDefault !== void 0) return hookDefault;\n\treturn buildBuiltinIdentityValue(dataType, typeParams);\n}\nconst IDENTITY_VALUES = /* @__PURE__ */ new Map([\n\t[pgText.id, \"''\"],\n\t[pgChar.id, \"''\"],\n\t[pgVarchar.id, \"''\"],\n\t[pgInt2.id, \"0\"],\n\t[pgInt4.id, \"0\"],\n\t[pgInt8.id, \"0\"],\n\t[pgFloat4.id, \"0\"],\n\t[pgFloat8.id, \"0\"],\n\t[pgNumeric.id, \"0\"],\n\t[pgBool.id, \"false\"],\n\t[pgUuid.id, \"'00000000-0000-0000-0000-000000000000'\"],\n\t[pgJson.id, \"'{}'::json\"],\n\t[pgJsonb.id, \"'{}'::jsonb\"],\n\t[pgDate.id, \"'epoch'\"],\n\t[pgTimestamp.id, \"'epoch'\"],\n\t[pgTimestamptz.id, \"'epoch'\"],\n\t[pgTime.id, \"'00:00:00'\"],\n\t[pgTimetz.id, \"'00:00:00+00'\"],\n\t[pgInterval.id, \"'0'\"],\n\t[pgBytea.id, \"''::bytea\"],\n\t[pgVarbit.id, \"B''\"],\n\t[pgTextArray.id, \"'{}'\"]\n]);\n/**\n* Returns the built-in identity value (monoid neutral element) as a SQL literal for the given\n* data type — e.g. 0 for integers, '' for text, false for booleans.\n*\n* This is the planner's fallback when no codec hook provides a type-specific identity value.\n*\n* Returns null for other types (for example enums and extension-owned types without a\n* hook), which causes the planner to fall back to the empty-table precheck.\n*\n* @internal Exported for testing only.\n*/\nfunction buildBuiltinIdentityValue(dataType, typeParams) {\n\tif (dataType === pgBit.id) return buildBitIdentityValue(typeParams);\n\treturn IDENTITY_VALUES.get(dataType) ?? null;\n}\nfunction buildBitIdentityValue(typeParams) {\n\tconst length = typeParams?.[\"length\"];\n\tif (length === void 0) return \"B'0'\";\n\tif (typeof length !== \"number\" || !Number.isInteger(length) || length <= 0) return null;\n\treturn `B'${\"0\".repeat(length)}'`;\n}\n//#endregion\nexport { resolveIdentityValue as n, buildBuiltinIdentityValue as t };\n\n//# sourceMappingURL=planner-identity-values-BTYw1D7D.mjs.map"],"mappings":";;;;;;;;;AASA,SAAS,qBAAqB,QAAQ,YAAY,OAAO,eAAe,CAAC,GAAG;CAC3E,MAAM,iBAAiB,OAAO,UAAU,aAAa,OAAO,WAAW,KAAK;CAC5E,MAAM,UAAU,gBAAgB,WAAW,OAAO;CAClD,MAAM,aAAa,gBAAgB,cAAc,OAAO;CACxD,IAAI,OAAO,MAAM,OAAO;CACxB,MAAM,WAAW,mBAAmB,SAAS,KAAK,CAAC,CAAC;CACpD,MAAM,cAAc,WAAW,IAAI,OAAO,CAAC,EAAE,uBAAuB;EACnE;EACA;EACA,GAAG,UAAU,cAAc,UAAU;CACtC,CAAC;CACD,IAAI,gBAAgB,KAAK,GAAG,OAAO;CACnC,OAAO,0BAA0B,UAAU,UAAU;AACtD;AACA,MAAM,kCAAkC,IAAI,IAAI;CAC/C,CAAC,OAAO,IAAI,IAAI;CAChB,CAAC,OAAO,IAAI,IAAI;CAChB,CAAC,UAAU,IAAI,IAAI;CACnB,CAAC,OAAO,IAAI,GAAG;CACf,CAAC,OAAO,IAAI,GAAG;CACf,CAAC,OAAO,IAAI,GAAG;CACf,CAAC,SAAS,IAAI,GAAG;CACjB,CAAC,SAAS,IAAI,GAAG;CACjB,CAAC,UAAU,IAAI,GAAG;CAClB,CAAC,OAAO,IAAI,OAAO;CACnB,CAAC,OAAO,IAAI,wCAAwC;CACpD,CAAC,OAAO,IAAI,YAAY;CACxB,CAAC,QAAQ,IAAI,aAAa;CAC1B,CAAC,OAAO,IAAI,SAAS;CACrB,CAAC,YAAY,IAAI,SAAS;CAC1B,CAAC,cAAc,IAAI,SAAS;CAC5B,CAAC,OAAO,IAAI,YAAY;CACxB,CAAC,SAAS,IAAI,eAAe;CAC7B,CAAC,WAAW,IAAI,KAAK;CACrB,CAAC,QAAQ,IAAI,WAAW;CACxB,CAAC,SAAS,IAAI,KAAK;CACnB,CAAC,YAAY,IAAI,MAAM;AACxB,CAAC;;;;;;;;;;;;AAYD,SAAS,0BAA0B,UAAU,YAAY;CACxD,IAAI,aAAa,MAAM,IAAI,OAAO,sBAAsB,UAAU;CAClE,OAAO,gBAAgB,IAAI,QAAQ,KAAK;AACzC;AACA,SAAS,sBAAsB,YAAY;CAC1C,MAAM,SAAS,aAAa;CAC5B,IAAI,WAAW,KAAK,GAAG,OAAO;CAC9B,IAAI,OAAO,WAAW,YAAY,CAAC,OAAO,UAAU,MAAM,KAAK,UAAU,GAAG,OAAO;CACnF,OAAO,KAAK,IAAI,OAAO,MAAM,EAAE;AAChC"}
@@ -1,3 +1,4 @@
1
+ import { SqlTypeLookups } from "@prisma/orm-family-sql/contract/data-type";
1
2
  import { StorageColumn, StorageTypeInstance } from "@prisma/orm-family-sql/contract/types";
2
3
  import { CodecControlHooks } from "@prisma/orm-family-sql/family/control";
3
4
  //#region ../../../3-targets/3-targets/postgres/dist/planner-identity-values.d.mts
@@ -5,21 +6,21 @@ import { CodecControlHooks } from "@prisma/orm-family-sql/family/control";
5
6
  /**
6
7
  * Resolves the identity value (monoid neutral element) as a SQL literal for a column's type.
7
8
  * Checks codec hooks first (extensions can provide type-specific identity values),
8
- * then falls back to the built-in map.
9
+ * then falls back to the built-in map, keyed by the data type the column's codec represents.
9
10
  */
10
- declare function resolveIdentityValue(column: StorageColumn, codecHooks: ReadonlyMap<string, CodecControlHooks>, storageTypes?: Record<string, StorageTypeInstance>): string | null;
11
+ declare function resolveIdentityValue(column: StorageColumn, codecHooks: ReadonlyMap<string, CodecControlHooks>, types: SqlTypeLookups, storageTypes?: Record<string, StorageTypeInstance>): string | null;
11
12
  /**
12
13
  * Returns the built-in identity value (monoid neutral element) as a SQL literal for the given
13
- * PostgreSQL native type — e.g. 0 for integers, '' for text, false for booleans.
14
+ * data type — e.g. 0 for integers, '' for text, false for booleans.
14
15
  *
15
16
  * This is the planner's fallback when no codec hook provides a type-specific identity value.
16
17
  *
17
- * Returns null for unrecognized types (for example enums and extension-owned types without a
18
+ * Returns null for other types (for example enums and extension-owned types without a
18
19
  * hook), which causes the planner to fall back to the empty-table precheck.
19
20
  *
20
21
  * @internal Exported for testing only.
21
22
  */
22
- declare function buildBuiltinIdentityValue(nativeType: string, typeParams?: Record<string, unknown>): string | null;
23
+ declare function buildBuiltinIdentityValue(dataType: string, typeParams?: Record<string, unknown>): string | null;
23
24
  //#endregion
24
25
  export { resolveIdentityValue as n, buildBuiltinIdentityValue as t };
25
- //# sourceMappingURL=planner-identity-values-TfEhnoWa.d.mts.map
26
+ //# sourceMappingURL=planner-identity-values-DvlFit8A.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planner-identity-values-DvlFit8A.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/planner-identity-values.d.mts"],"mappings":";;;;;;;;;;iBASiB,qBAAqB,QAAQ,eAAe,YAAY,oBAAoB,oBAAoB,OAAO,gBAAgB,eAAe,eAAe;;;;;;;;;;;;iBAYrJ,0BAA0B,kBAAkB,aAAa"}
@@ -1,7 +1,7 @@
1
- import { t as PostgresMigration } from "./postgres-migration-Dq60Mixq-DYNJokZW.mjs";
1
+ import { t as PostgresMigration } from "./postgres-migration-PLXsv15e-BruyXuKH.mjs";
2
2
  import { t as renderOps } from "./render-ops-D2vJApKB-B281fzmn.mjs";
3
3
  import { t as renderCallsToTypeScript } from "./render-typescript-Dqp1Spgn-B128r1qw.mjs";
4
- //#region ../../../3-targets/3-targets/postgres/dist/planner-produced-postgres-migration-GZTusMRD.mjs
4
+ //#region ../../../3-targets/3-targets/postgres/dist/planner-produced-postgres-migration-B-gWwByI.mjs
5
5
  var TypeScriptRenderablePostgresMigration = class extends PostgresMigration {
6
6
  #calls;
7
7
  #meta;
@@ -44,4 +44,4 @@ var TypeScriptRenderablePostgresMigration = class extends PostgresMigration {
44
44
  //#endregion
45
45
  export { TypeScriptRenderablePostgresMigration as t };
46
46
 
47
- //# sourceMappingURL=planner-produced-postgres-migration-GZTusMRD-DPb6XqDu.mjs.map
47
+ //# sourceMappingURL=planner-produced-postgres-migration-B-gWwByI-Cy8tx4pu.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"planner-produced-postgres-migration-GZTusMRD-DPb6XqDu.mjs","names":["#calls","#meta","#spaceId","#snapshotsImportPath","#lowerer","#operationsCache"],"sources":["../../../../3-targets/3-targets/postgres/dist/planner-produced-postgres-migration-GZTusMRD.mjs"],"sourcesContent":["import { t as PostgresMigration } from \"./postgres-migration-Dq60Mixq.mjs\";\nimport { t as renderOps } from \"./render-ops-D2vJApKB.mjs\";\nimport { t as renderCallsToTypeScript } from \"./render-typescript-Dqp1Spgn.mjs\";\n//#region src/core/migrations/planner-produced-postgres-migration.ts\nvar TypeScriptRenderablePostgresMigration = class extends PostgresMigration {\n\t#calls;\n\t#meta;\n\t#spaceId;\n\t#snapshotsImportPath;\n\t#lowerer;\n\t#operationsCache;\n\tconstructor(calls, meta, spaceId, snapshotsImportPath, lowerer) {\n\t\tsuper();\n\t\tthis.#calls = calls;\n\t\tthis.#meta = meta;\n\t\tthis.#spaceId = spaceId;\n\t\tthis.#snapshotsImportPath = snapshotsImportPath;\n\t\tthis.#lowerer = 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\t/**\n\t* Contract space this planner-produced plan applies to. Threaded\n\t* from the planner options so the runner keys the marker row by\n\t* the right space when executing the plan.\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\nexport { TypeScriptRenderablePostgresMigration as t };\n\n//# sourceMappingURL=planner-produced-postgres-migration-GZTusMRD.mjs.map"],"mappings":";;;;AAIA,IAAI,wCAAwC,cAAc,kBAAkB;CAC3E;CACA;CACA;CACA;CACA;CACA;CACA,YAAY,OAAO,MAAM,SAAS,qBAAqB,SAAS;EAC/D,MAAM;EACN,KAAKA,SAAS;EACd,KAAKC,QAAQ;EACb,KAAKC,WAAW;EAChB,KAAKC,uBAAuB;EAC5B,KAAKC,WAAW;CACjB;CACA,IAAI,aAAa;EAChB,KAAKC,qBAAqB,UAAU,KAAKL,QAAQ,KAAKI,QAAQ;EAC9D,OAAO,KAAKC;CACb;CACA,WAAW;EACV,OAAO,KAAKJ;CACb;;;;;;CAMA,IAAI,UAAU;EACb,OAAO,KAAKC;CACb;CACA,iBAAiB,wBAAwB;EACxC,OAAO,wBAAwB,KAAKF,QAAQ;GAC3C,MAAM,KAAKC,MAAM;GACjB,IAAI,KAAKA,MAAM;GACf,qBAAqB,KAAKE;GAC1B;EACD,CAAC;CACF;AACD"}
1
+ {"version":3,"file":"planner-produced-postgres-migration-B-gWwByI-Cy8tx4pu.mjs","names":["#calls","#meta","#spaceId","#snapshotsImportPath","#lowerer","#operationsCache"],"sources":["../../../../3-targets/3-targets/postgres/dist/planner-produced-postgres-migration-B-gWwByI.mjs"],"sourcesContent":["import { t as PostgresMigration } from \"./postgres-migration-PLXsv15e.mjs\";\nimport { t as renderOps } from \"./render-ops-D2vJApKB.mjs\";\nimport { t as renderCallsToTypeScript } from \"./render-typescript-Dqp1Spgn.mjs\";\n//#region src/core/migrations/planner-produced-postgres-migration.ts\nvar TypeScriptRenderablePostgresMigration = class extends PostgresMigration {\n\t#calls;\n\t#meta;\n\t#spaceId;\n\t#snapshotsImportPath;\n\t#lowerer;\n\t#operationsCache;\n\tconstructor(calls, meta, spaceId, snapshotsImportPath, lowerer) {\n\t\tsuper();\n\t\tthis.#calls = calls;\n\t\tthis.#meta = meta;\n\t\tthis.#spaceId = spaceId;\n\t\tthis.#snapshotsImportPath = snapshotsImportPath;\n\t\tthis.#lowerer = 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\t/**\n\t* Contract space this planner-produced plan applies to. Threaded\n\t* from the planner options so the runner keys the marker row by\n\t* the right space when executing the plan.\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\nexport { TypeScriptRenderablePostgresMigration as t };\n\n//# sourceMappingURL=planner-produced-postgres-migration-B-gWwByI.mjs.map"],"mappings":";;;;AAIA,IAAI,wCAAwC,cAAc,kBAAkB;CAC3E;CACA;CACA;CACA;CACA;CACA;CACA,YAAY,OAAO,MAAM,SAAS,qBAAqB,SAAS;EAC/D,MAAM;EACN,KAAKA,SAAS;EACd,KAAKC,QAAQ;EACb,KAAKC,WAAW;EAChB,KAAKC,uBAAuB;EAC5B,KAAKC,WAAW;CACjB;CACA,IAAI,aAAa;EAChB,KAAKC,qBAAqB,UAAU,KAAKL,QAAQ,KAAKI,QAAQ;EAC9D,OAAO,KAAKC;CACb;CACA,WAAW;EACV,OAAO,KAAKJ;CACb;;;;;;CAMA,IAAI,UAAU;EACb,OAAO,KAAKC;CACb;CACA,iBAAiB,wBAAwB;EACxC,OAAO,wBAAwB,KAAKF,QAAQ;GAC3C,MAAM,KAAKC,MAAM;GACjB,IAAI,KAAKA,MAAM;GACf,qBAAqB,KAAKE;GAC1B;EACD,CAAC;CACF;AACD"}
@@ -0,0 +1 @@
1
+ import "./planner-produced-postgres-migration-DT3i_p3G-CyQUv3ac.mjs";
@@ -1,11 +1,11 @@
1
1
  import { t as PostgresPlanTargetDetails } from "./planner-target-details-HkP4RrRO-_xPQVPF0.mjs";
2
- import { t as PostgresMigration } from "./postgres-migration-BCzAcFmN-Bz_I02Gc.mjs";
2
+ import { t as PostgresMigration } from "./postgres-migration-e8UybR1y-C_m4i1jp.mjs";
3
3
  import { MigrationPlanWithAuthoringSurface, OpFactoryCall } from "@prisma/orm-framework/components/control";
4
4
  import { SqlMigrationPlanOperation } from "@prisma/orm-family-sql/family/control";
5
5
  import { MigrationMeta } from "@prisma/orm-toolchain/migration-tools/migration";
6
6
  import { ImportSpecifierResolver } from "@prisma/orm-framework/components/emission";
7
7
  import { ExecuteRequestLowerer } from "@prisma/orm-family-sql/family/control-adapter";
8
- //#region ../../../3-targets/3-targets/postgres/dist/planner-produced-postgres-migration-DE2Ia9Ba.d.mts
8
+ //#region ../../../3-targets/3-targets/postgres/dist/planner-produced-postgres-migration-DT3i_p3G.d.mts
9
9
  //#region src/core/migrations/planner-produced-postgres-migration.d.ts
10
10
  declare class TypeScriptRenderablePostgresMigration extends PostgresMigration implements MigrationPlanWithAuthoringSurface {
11
11
  #private;
@@ -22,4 +22,4 @@ declare class TypeScriptRenderablePostgresMigration extends PostgresMigration im
22
22
  }
23
23
  //#endregion
24
24
  export { TypeScriptRenderablePostgresMigration as t };
25
- //# sourceMappingURL=planner-produced-postgres-migration-DE2Ia9Ba-hYITaAdW.d.mts.map
25
+ //# sourceMappingURL=planner-produced-postgres-migration-DT3i_p3G-CyQUv3ac.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planner-produced-postgres-migration-DT3i_p3G-CyQUv3ac.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/planner-produced-postgres-migration-DT3i_p3G.d.mts"],"mappings":";;;;;;;;;cAQc,8CAA8C,6BAA6B;;EAEvF,YAAY,gBAAgB,iBAAiB,MAAM,eAAe,iBAAiB,6BAA6B,UAAU;MACtH,wBAAwB,0BAA0B,6BAA6B,QAAQ,0BAA0B;EACrH,YAAY;;;;;;MAMR;EACJ,iBAAiB,wBAAwB"}
@@ -0,0 +1,47 @@
1
+ import { i as quoteIdentifierWhereNeeded } from "./sql-utils-BMXJi06b-CAQOplfq.mjs";
2
+ import { h as postgresCreateNamespace } from "./postgres-schema-DXd0mebY-CExd_GcQ.mjs";
3
+ import { dataTypeParams, renderSqlCatalogText, sqlDataTypeOfCodec, unquotedSqlBaseName } from "@prisma/orm-family-sql/contract/data-type";
4
+ //#region ../../../3-targets/3-targets/postgres/dist/planner-sql-checks-Cr06nK1-.mjs
5
+ function resolveColumnTypeMetadata(column, storageTypes) {
6
+ if (!column.typeRef) return column;
7
+ const referencedType = storageTypes[column.typeRef];
8
+ if (!referencedType) return column;
9
+ return {
10
+ codecId: referencedType.codecId,
11
+ nativeType: referencedType.nativeType,
12
+ typeParams: referencedType.typeParams
13
+ };
14
+ }
15
+ /**
16
+ * String-keyed entry points the migration ops use to render
17
+ * schema-qualified DDL and catalog checks. The `schema` argument is
18
+ * interpreted as a namespace coordinate: the framework `__unbound__`
19
+ * sentinel resolves to the late-bound `PostgresUnboundSchema` singleton
20
+ * (which elides the qualifier so `search_path` decides at runtime); any
21
+ * other id materialises a `PostgresSchema(id)` whose qualifier is the
22
+ * named schema. Helpers route through these `Namespace` concretions so
23
+ * the unbound branch lives in the polymorphic override, not the call
24
+ * site.
25
+ */
26
+ function qualifyTableName(schema, table) {
27
+ return postgresCreateNamespace({
28
+ id: schema,
29
+ entries: { table: {} }
30
+ }).qualifyTable(table);
31
+ }
32
+ /**
33
+ * The type `format_type` prints, for the column's ALTER COLUMN TYPE postcheck: the catalog text of
34
+ * its data type with normalised parameters, or for an enum its name, quoted where Postgres quotes
35
+ * it.
36
+ */
37
+ function buildExpectedFormatType(column, types, storageTypes = {}) {
38
+ const resolved = resolveColumnTypeMetadata(column, storageTypes);
39
+ const dataType = sqlDataTypeOfCodec(resolved.codecId, types);
40
+ const params = dataTypeParams(dataType, resolved.typeParams);
41
+ if (dataType.sql.claimsKind !== void 0) return unquotedSqlBaseName(dataType, params).split(".").map(quoteIdentifierWhereNeeded).join(".");
42
+ return renderSqlCatalogText(dataType, params);
43
+ }
44
+ //#endregion
45
+ export { qualifyTableName as n, buildExpectedFormatType as t };
46
+
47
+ //# sourceMappingURL=planner-sql-checks-Cr06nK1--B3gPnC1a.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"planner-sql-checks-Cr06nK1--B3gPnC1a.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/planner-sql-checks-Cr06nK1-.mjs"],"sourcesContent":["import { i as quoteIdentifierWhereNeeded } from \"./sql-utils-BMXJi06b.mjs\";\nimport { i as postgresCreateNamespace } from \"./postgres-schema-DXd0mebY.mjs\";\nimport { dataTypeParams, renderSqlCatalogText, sqlDataTypeOfCodec, unquotedSqlBaseName } from \"@internal/sql-contract/data-type\";\n//#region src/core/migrations/planner-type-resolution.ts\nfunction resolveColumnTypeMetadata(column, storageTypes) {\n\tif (!column.typeRef) return column;\n\tconst referencedType = storageTypes[column.typeRef];\n\tif (!referencedType) return column;\n\treturn {\n\t\tcodecId: referencedType.codecId,\n\t\tnativeType: referencedType.nativeType,\n\t\ttypeParams: referencedType.typeParams\n\t};\n}\n//#endregion\n//#region src/core/migrations/planner-sql-checks.ts\n/**\n* String-keyed entry points the migration ops use to render\n* schema-qualified DDL and catalog checks. The `schema` argument is\n* interpreted as a namespace coordinate: the framework `__unbound__`\n* sentinel resolves to the late-bound `PostgresUnboundSchema` singleton\n* (which elides the qualifier so `search_path` decides at runtime); any\n* other id materialises a `PostgresSchema(id)` whose qualifier is the\n* named schema. Helpers route through these `Namespace` concretions so\n* the unbound branch lives in the polymorphic override, not the call\n* site.\n*/\nfunction qualifyTableName(schema, table) {\n\treturn postgresCreateNamespace({\n\t\tid: schema,\n\t\tentries: { table: {} }\n\t}).qualifyTable(table);\n}\n/**\n* The type `format_type` prints, for the column's ALTER COLUMN TYPE postcheck: the catalog text of\n* its data type with normalised parameters, or for an enum its name, quoted where Postgres quotes\n* it.\n*/\nfunction buildExpectedFormatType(column, types, storageTypes = {}) {\n\tconst resolved = resolveColumnTypeMetadata(column, storageTypes);\n\tconst dataType = sqlDataTypeOfCodec(resolved.codecId, types);\n\tconst params = dataTypeParams(dataType, resolved.typeParams);\n\tif (dataType.sql.claimsKind !== void 0) return unquotedSqlBaseName(dataType, params).split(\".\").map(quoteIdentifierWhereNeeded).join(\".\");\n\treturn renderSqlCatalogText(dataType, params);\n}\n//#endregion\nexport { qualifyTableName as n, buildExpectedFormatType as t };\n\n//# sourceMappingURL=planner-sql-checks-Cr06nK1-.mjs.map"],"mappings":";;;;AAIA,SAAS,0BAA0B,QAAQ,cAAc;CACxD,IAAI,CAAC,OAAO,SAAS,OAAO;CAC5B,MAAM,iBAAiB,aAAa,OAAO;CAC3C,IAAI,CAAC,gBAAgB,OAAO;CAC5B,OAAO;EACN,SAAS,eAAe;EACxB,YAAY,eAAe;EAC3B,YAAY,eAAe;CAC5B;AACD;;;;;;;;;;;;AAcA,SAAS,iBAAiB,QAAQ,OAAO;CACxC,OAAO,wBAAwB;EAC9B,IAAI;EACJ,SAAS,EAAE,OAAO,CAAC,EAAE;CACtB,CAAC,CAAC,CAAC,aAAa,KAAK;AACtB;;;;;;AAMA,SAAS,wBAAwB,QAAQ,OAAO,eAAe,CAAC,GAAG;CAClE,MAAM,WAAW,0BAA0B,QAAQ,YAAY;CAC/D,MAAM,WAAW,mBAAmB,SAAS,SAAS,KAAK;CAC3D,MAAM,SAAS,eAAe,UAAU,SAAS,UAAU;CAC3D,IAAI,SAAS,IAAI,eAAe,KAAK,GAAG,OAAO,oBAAoB,UAAU,MAAM,CAAC,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,0BAA0B,CAAC,CAAC,KAAK,GAAG;CACxI,OAAO,qBAAqB,UAAU,MAAM;AAC7C"}
@@ -1,5 +1,5 @@
1
+ import { SqlTypeLookups } from "@prisma/orm-family-sql/contract/data-type";
1
2
  import { StorageColumn, StorageTypeInstance } from "@prisma/orm-family-sql/contract/types";
2
- import { CodecControlHooks } from "@prisma/orm-family-sql/family/control";
3
3
  //#region ../../../3-targets/3-targets/postgres/dist/planner-sql-checks.d.mts
4
4
  //#region src/core/migrations/planner-sql-checks.d.ts
5
5
  /**
@@ -14,7 +14,12 @@ import { CodecControlHooks } from "@prisma/orm-family-sql/family/control";
14
14
  * site.
15
15
  */
16
16
  declare function qualifyTableName(schema: string, table: string): string;
17
- declare function buildExpectedFormatType(column: StorageColumn, codecHooks: ReadonlyMap<string, CodecControlHooks>, storageTypes?: Record<string, StorageTypeInstance>): string;
17
+ /**
18
+ * The type `format_type` prints, for the column's ALTER COLUMN TYPE postcheck: the catalog text of
19
+ * its data type with normalised parameters, or for an enum its name, quoted where Postgres quotes
20
+ * it.
21
+ */
22
+ declare function buildExpectedFormatType(column: StorageColumn, types: SqlTypeLookups, storageTypes?: Record<string, StorageTypeInstance>): string;
18
23
  //#endregion
19
24
  export { qualifyTableName as n, buildExpectedFormatType as t };
20
- //# sourceMappingURL=planner-sql-checks-CFgbRTJw.d.mts.map
25
+ //# sourceMappingURL=planner-sql-checks-iNLJS1dW.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"planner-sql-checks-CFgbRTJw.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/planner-sql-checks.d.mts"],"mappings":";;;;;;;;;;;;;;;iBAciB,iBAAiB,gBAAgB;iBACjC,wBAAwB,QAAQ,eAAe,YAAY,oBAAoB,oBAAoB,eAAe,eAAe"}
1
+ {"version":3,"file":"planner-sql-checks-iNLJS1dW.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/planner-sql-checks.d.mts"],"mappings":";;;;;;;;;;;;;;;iBAciB,iBAAiB,gBAAgB;;;;;;iBAMjC,wBAAwB,QAAQ,eAAe,OAAO,gBAAgB,eAAe,eAAe"}
@@ -1,6 +1,9 @@
1
1
  import { S as PG_TEXT_CODEC_ID, _ as PG_INT_CODEC_ID } from "./codec-ids-Cb0yO-IS--e0P2rfI.mjs";
2
- import { _ as roleEntityKind, c as PostgresSchema, f as nativeEnumEntityKind, g as rlsEnablementEntityKind, p as policyEntityKind } from "./postgres-schema-C8slJGZo-CFGUyJPt.mjs";
3
- import { c as postgresAuthoringEntityTypes } from "./authoring-C5Ch8RNG-Qgq9GiOY.mjs";
2
+ import { t as createPostgresBuiltinDataTypeLookup } from "./data-types-DzUVlWeo-CBMHoFoH.mjs";
3
+ import { r as createPostgresBuiltinCodecLookup } from "./codec-registry-CCCOytGc-BFC0dvlt.mjs";
4
+ import { _ as roleEntityKind, c as PostgresSchema, f as nativeEnumEntityKind, g as rlsEnablementEntityKind, p as policyEntityKind } from "./postgres-schema-DXd0mebY-CExd_GcQ.mjs";
5
+ import { c as postgresAuthoringEntityTypes } from "./authoring-BarDKx1G-BKhOsXKo.mjs";
6
+ import { requiredSchemaKeys } from "@prisma/orm-framework/components/codec";
4
7
  import { blindCast } from "@prisma/orm-framework/utils/casts";
5
8
  import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
6
9
  import { isAuthoringEntityTypeDescriptor } from "@prisma/orm-framework/components/authoring";
@@ -9,10 +12,12 @@ import { buildSqlSchemaQualifiedView } from "@prisma/orm-family-sql/contract/con
9
12
  import { createPreserveEmptyPredicate } from "@prisma/orm-framework/contract/hashing-utils";
10
13
  import { SqlContractSerializerBase } from "@prisma/orm-family-sql/family/ir";
11
14
  import { sqlContractCanonicalizationHooks } from "@prisma/orm-family-sql/contract/canonicalization-hooks";
12
- //#region ../../../3-targets/3-targets/postgres/dist/postgres-contract-view-Da0ymIZE.mjs
15
+ //#region ../../../3-targets/3-targets/postgres/dist/postgres-contract-view-D60F8OWK.mjs
13
16
  const POSTGRES_AUTHORING_CTX = {
14
17
  family: "sql",
15
18
  target: "postgres",
19
+ codecLookup: createPostgresBuiltinCodecLookup(),
20
+ dataTypeLookup: createPostgresBuiltinDataTypeLookup(),
16
21
  enumInferenceCodecs: {
17
22
  text: PG_TEXT_CODEC_ID,
18
23
  int: PG_INT_CODEC_ID
@@ -64,13 +69,10 @@ function requiredEntityFieldsSurviveDefaults(kinds) {
64
69
  key
65
70
  ])));
66
71
  }
67
- function isSchemaPropList(value) {
68
- return Array.isArray(value) && value.every((prop) => prop !== null && (typeof prop === "object" || typeof prop === "function") && "kind" in prop && "key" in prop);
69
- }
70
72
  function requiredKeysOf(schema) {
71
- const props = "props" in schema ? schema.props : void 0;
72
- if (!isSchemaPropList(props)) throw new InternalError("entity-kind schema does not expose arktype object props; the required-field preserve set cannot be derived");
73
- return props.flatMap((prop) => prop.kind === "required" && typeof prop.key === "string" ? [prop.key] : []);
73
+ const keys = requiredSchemaKeys(schema);
74
+ if (keys === void 0) throw new InternalError("entity-kind schema does not expose arktype object props; the required-field preserve set cannot be derived");
75
+ return keys;
74
76
  }
75
77
  var PostgresContractSerializer = class extends SqlContractSerializerBase {
76
78
  shouldPreserveEmpty;
@@ -141,4 +143,4 @@ const PostgresContractView = {
141
143
  //#endregion
142
144
  export { PostgresContractView as n, PostgresContractSerializer as t };
143
145
 
144
- //# sourceMappingURL=postgres-contract-view-Da0ymIZE-CBV3OE-k.mjs.map
146
+ //# sourceMappingURL=postgres-contract-view-D60F8OWK-Bi5oJkOx.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postgres-contract-view-D60F8OWK-Bi5oJkOx.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/postgres-contract-view-D60F8OWK.mjs"],"sourcesContent":["import { S as PG_TEXT_CODEC_ID, _ as PG_INT_CODEC_ID } from \"./codec-ids-Cb0yO-IS.mjs\";\nimport { t as createPostgresBuiltinDataTypeLookup } from \"./data-types-DzUVlWeo.mjs\";\nimport { r as createPostgresBuiltinCodecLookup } from \"./codec-registry-CCCOytGc.mjs\";\nimport { n as postgresAuthoringEntityTypes } from \"./authoring-BarDKx1G.mjs\";\nimport { a as nativeEnumEntityKind, c as roleEntityKind, o as policyEntityKind, s as rlsEnablementEntityKind, t as PostgresSchema } from \"./postgres-schema-DXd0mebY.mjs\";\nimport { requiredSchemaKeys } from \"@internal/framework-components/codec\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { isAuthoringEntityTypeDescriptor } from \"@internal/framework-components/authoring\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { buildSqlSchemaQualifiedView } from \"@internal/sql-contract/contract-view\";\nimport { createPreserveEmptyPredicate } from \"@internal/contract/hashing-utils\";\nimport { SqlContractSerializerBase } from \"@internal/family-sql/ir\";\nimport { sqlContractCanonicalizationHooks } from \"@internal/sql-contract/canonicalization-hooks\";\n//#region src/core/postgres-contract-serializer.ts\nconst POSTGRES_AUTHORING_CTX = {\n\tfamily: \"sql\",\n\ttarget: \"postgres\",\n\tcodecLookup: createPostgresBuiltinCodecLookup(),\n\tdataTypeLookup: createPostgresBuiltinDataTypeLookup(),\n\tenumInferenceCodecs: {\n\t\ttext: PG_TEXT_CODEC_ID,\n\t\tint: PG_INT_CODEC_ID\n\t}\n};\nfunction isAuthoringEntityTypeFactoryOutput(output) {\n\treturn typeof output === \"object\" && output !== null && \"factory\" in output && typeof output.factory === \"function\";\n}\n/**\n* Walks a pack's entity-type namespace tree and emits hydration factories\n* keyed by the descriptor's `discriminator`. Used for `storage.types`\n* (codec-triple hydration). Namespace entries hydration dispatches by\n* entries key, not discriminator — handled by `hydrateNamespaceEntities`.\n*/\nfunction collectStorageTypesHydrators(namespace) {\n\tconst registry = /* @__PURE__ */ new Map();\n\tconst walk = (node) => {\n\t\tfor (const value of Object.values(node)) {\n\t\t\tif (isAuthoringEntityTypeDescriptor(value)) {\n\t\t\t\tif (isAuthoringEntityTypeFactoryOutput(value.output)) {\n\t\t\t\t\tconst { factory } = value.output;\n\t\t\t\t\tregistry.set(value.discriminator, (raw) => factory(raw, POSTGRES_AUTHORING_CTX));\n\t\t\t\t}\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (typeof value === \"object\" && value !== null) walk(value);\n\t\t}\n\t};\n\twalk(namespace);\n\treturn registry;\n}\n/**\n* The canonicalization walk drops a field whose value equals its type's\n* default, which for a required field of an entity kind means the emitted\n* contract fails that kind's own schema on the next read (a RESTRICTIVE\n* policy's `permissive: false` is the live case). The set of fields that must\n* survive is therefore the required keys of the registered entity kinds —\n* read off the schemas rather than listed by hand, so a kind that gains a\n* required field is covered the day it gains one.\n*/\nfunction requiredEntityFieldsSurviveDefaults(kinds) {\n\treturn createPreserveEmptyPredicate(kinds.flatMap((kind) => requiredKeysOf(kind.schema).map((key) => [\n\t\t\"storage\",\n\t\t\"namespaces\",\n\t\t\"*\",\n\t\t\"entries\",\n\t\tkind.kind,\n\t\t\"*\",\n\t\tkey\n\t])));\n}\nfunction requiredKeysOf(schema) {\n\tconst keys = requiredSchemaKeys(schema);\n\tif (keys === void 0) throw new InternalError(\"entity-kind schema does not expose arktype object props; the required-field preserve set cannot be derived\");\n\treturn keys;\n}\nvar PostgresContractSerializer = class extends SqlContractSerializerBase {\n\tshouldPreserveEmpty;\n\tconstructor(extraPackEntityKinds = []) {\n\t\tconst storageTypesHydrators = collectStorageTypesHydrators(postgresAuthoringEntityTypes);\n\t\tconst entityKinds = [\n\t\t\tpolicyEntityKind,\n\t\t\troleEntityKind,\n\t\t\trlsEnablementEntityKind,\n\t\t\tnativeEnumEntityKind,\n\t\t\t...extraPackEntityKinds\n\t\t];\n\t\tsuper(storageTypesHydrators, entityKinds);\n\t\tconst preserveRequired = requiredEntityFieldsSurviveDefaults(entityKinds);\n\t\tthis.shouldPreserveEmpty = (path) => preserveRequired(path) || sqlContractCanonicalizationHooks.shouldPreserveEmpty(path);\n\t}\n\thydrateSqlNamespaceEntry(nsId, raw) {\n\t\tconst { id, entries } = blindCast(super.hydrateSqlNamespaceEntry(nsId, raw));\n\t\tconst allSlotsEmpty = Object.values(entries).every((slot) => slot === void 0 || Object.keys(slot).length === 0);\n\t\tif (id === UNBOUND_NAMESPACE_ID && allSlotsEmpty) return PostgresSchema.unbound;\n\t\tconst valueSetSlot = entries[\"valueSet\"];\n\t\tconst hasValueSets = valueSetSlot !== void 0 && Object.keys(valueSetSlot).length > 0;\n\t\treturn new PostgresSchema({\n\t\t\tid,\n\t\t\tentries: {\n\t\t\t\t...entries,\n\t\t\t\ttable: entries[\"table\"] ?? {},\n\t\t\t\t...hasValueSets ? { valueSet: valueSetSlot } : {}\n\t\t\t}\n\t\t});\n\t}\n\tserializeContract(contract) {\n\t\tconst { storage, ...rest } = contract;\n\t\tconst namespacesJson = {};\n\t\tfor (const [nsId, ns] of Object.entries(storage.namespaces)) {\n\t\t\tconst isUnboundSlot = ns.id === UNBOUND_NAMESPACE_ID;\n\t\t\tnamespacesJson[nsId] = {\n\t\t\t\tid: ns.id,\n\t\t\t\tkind: isUnboundSlot ? \"postgres-unbound-schema\" : \"postgres-schema\",\n\t\t\t\tentries: this.serializeNamespaceEntries(ns.entries)\n\t\t\t};\n\t\t}\n\t\tconst storageOut = {\n\t\t\tstorageHash: String(storage.storageHash),\n\t\t\tnamespaces: namespacesJson\n\t\t};\n\t\tif (storage.types !== void 0) {\n\t\t\tconst typesOut = {};\n\t\t\tfor (const [name, entry] of Object.entries(storage.types)) typesOut[name] = this.serializeJsonObject(entry);\n\t\t\tstorageOut[\"types\"] = typesOut;\n\t\t}\n\t\treturn blindCast({\n\t\t\t...rest,\n\t\t\tstorage: storageOut\n\t\t});\n\t}\n};\n//#endregion\n//#region src/core/postgres-contract-view.ts\nconst PostgresContractView = {\n\t/** Wrap an already-deserialized Postgres contract in a schema-qualified view. */\n\tfrom(contract) {\n\t\treturn buildSqlSchemaQualifiedView(contract);\n\t},\n\t/** Deserialize a Postgres contract JSON envelope and wrap it in a view. */\n\tfromJson(json) {\n\t\treturn buildSqlSchemaQualifiedView(new PostgresContractSerializer().deserializeContract(json));\n\t}\n};\n//#endregion\nexport { PostgresContractSerializer as n, PostgresContractView as t };\n\n//# sourceMappingURL=postgres-contract-view-D60F8OWK.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,MAAM,yBAAyB;CAC9B,QAAQ;CACR,QAAQ;CACR,aAAa,iCAAiC;CAC9C,gBAAgB,oCAAoC;CACpD,qBAAqB;EACpB,MAAM;EACN,KAAK;CACN;AACD;AACA,SAAS,mCAAmC,QAAQ;CACnD,OAAO,OAAO,WAAW,YAAY,WAAW,QAAQ,aAAa,UAAU,OAAO,OAAO,YAAY;AAC1G;;;;;;;AAOA,SAAS,6BAA6B,WAAW;CAChD,MAAM,2BAA2B,IAAI,IAAI;CACzC,MAAM,QAAQ,SAAS;EACtB,KAAK,MAAM,SAAS,OAAO,OAAO,IAAI,GAAG;GACxC,IAAI,gCAAgC,KAAK,GAAG;IAC3C,IAAI,mCAAmC,MAAM,MAAM,GAAG;KACrD,MAAM,EAAE,YAAY,MAAM;KAC1B,SAAS,IAAI,MAAM,gBAAgB,QAAQ,QAAQ,KAAK,sBAAsB,CAAC;IAChF;IACA;GACD;GACA,IAAI,OAAO,UAAU,YAAY,UAAU,MAAM,KAAK,KAAK;EAC5D;CACD;CACA,KAAK,SAAS;CACd,OAAO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B,KAAK,MAAM,CAAC,MAAM,OAAO,OAAO,QAAQ,QAAQ,UAAU,GAAG;GAC5D,MAAM,gBAAgB,GAAG,OAAO;GAChC,eAAe,QAAQ;IACtB,IAAI,GAAG;IACP,MAAM,gBAAgB,4BAA4B;IAClD,SAAS,KAAK,0BAA0B,GAAG,OAAO;GACnD;EACD;EACA,MAAM,aAAa;GAClB,aAAa,OAAO,QAAQ,WAAW;GACvC,YAAY;EACb;EACA,IAAI,QAAQ,UAAU,KAAK,GAAG;GAC7B,MAAM,WAAW,CAAC;GAClB,KAAK,MAAM,CAAC,MAAM,UAAU,OAAO,QAAQ,QAAQ,KAAK,GAAG,SAAS,QAAQ,KAAK,oBAAoB,KAAK;GAC1G,WAAW,WAAW;EACvB;EACA,OAAO,UAAU;GAChB,GAAG;GACH,SAAS;EACV,CAAC;CACF;AACD;AAGA,MAAM,uBAAuB;;CAE5B,KAAK,UAAU;EACd,OAAO,4BAA4B,QAAQ;CAC5C;;CAEA,SAAS,MAAM;EACd,OAAO,4BAA4B,IAAI,2BAA2B,CAAC,CAAC,oBAAoB,IAAI,CAAC;CAC9F;AACD"}
@@ -1,25 +1,24 @@
1
1
  import { t as errorPostgresMigrationStackMissing } from "./errors-DYyzTYzE-39CV_aMo.mjs";
2
- import { i as PostgresRlsPolicy, n as PostgresRlsEnablement } from "./postgres-schema-C8slJGZo-CFGUyJPt.mjs";
3
- import { n as postgresResolveDefault } from "./default-normalizer-ByDD_gRm-CKeWEb0x.mjs";
4
- import { t as resolveDdlSchemaForNamespaceStorage } from "./resolve-ddl-schema-Bq4m2dD9-DrlUipYU.mjs";
5
- import { i as renderDefaultLiteral } from "./planner-ddl-builders-BZLzBmuq-BrpA53eH.mjs";
6
- import { A as RenameIndexCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, M as RenameTableCall, N as SetDefaultCall, P as SetNotNullCall, R as installExtension, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, h as CreateTableCall, i as AddNativeEnumValueCall, j as RenamePostgresRlsPolicyCall, k as RenameConstraintCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, p as CreatePostgresRlsPolicyCall, r as AddForeignKeyCall, s as AddPrimaryKeyCall, t as AddCheckConstraintCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-DkzlLBzN-Bc6l0sYN.mjs";
7
- import { a as defaultUniqueName, f as resolveNamespaceIdForDdlSchema, i as defaultPrimaryKeyName, o as issueNode, r as defaultForeignKeyName } from "./control-policy-BW5Cgq3Z-Dn2ZVBCP.mjs";
8
- import { n as buildPostgresPlanDiff, r as contractToPostgresDatabaseSchemaNode, t as buildPostgresNativeTypeExpander } from "./diff-database-schema-_bbfF4oI-D_VmL4Ma.mjs";
9
- import { n as PostgresContractView } from "./postgres-contract-view-Da0ymIZE-CBV3OE-k.mjs";
2
+ import { i as PostgresRlsPolicy, n as PostgresRlsEnablement } from "./postgres-schema-DXd0mebY-CExd_GcQ.mjs";
3
+ import { n as postgresResolveDefault } from "./default-normalizer-C68YhUBS-BjOeKRhS.mjs";
4
+ import { t as resolveDdlSchemaForNamespaceStorage } from "./resolve-ddl-schema-CadTChyu-C7F31wpN.mjs";
5
+ import { i as renderDefaultLiteral } from "./planner-ddl-builders-O0JqJIBZ-x7JEHEpU.mjs";
6
+ import { A as RenameIndexCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, M as RenameTableCall, N as SetDefaultCall, P as SetNotNullCall, R as installExtension, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, h as CreateTableCall, i as AddNativeEnumValueCall, j as RenamePostgresRlsPolicyCall, k as RenameConstraintCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, p as CreatePostgresRlsPolicyCall, r as AddForeignKeyCall, s as AddPrimaryKeyCall, t as AddCheckConstraintCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-4IafSIKD-D2wO2iyZ.mjs";
7
+ import { a as defaultUniqueName, f as resolveNamespaceIdForDdlSchema, i as defaultPrimaryKeyName, o as issueNode, r as defaultForeignKeyName } from "./control-policy-CuJvncMq-C5yshGZP.mjs";
8
+ import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-BYHT4ZZp-DHQM3yoO.mjs";
9
+ import { n as PostgresContractView } from "./postgres-contract-view-D60F8OWK-Bi5oJkOx.mjs";
10
10
  import { t as dataTransform } from "./data-transform-Bo32KRbq-BLn1_UG-.mjs";
11
11
  import { blindCast } from "@prisma/orm-framework/utils/casts";
12
12
  import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
13
13
  import { issueOutcome } from "@prisma/orm-framework/components/control";
14
14
  import { namingOf, parseWireName } from "@prisma/orm-family-sql/schema-ir/naming";
15
15
  import { assertDefined } from "@prisma/orm-framework/utils/assertions";
16
- import { ifDefined } from "@prisma/orm-framework/utils/defined";
17
- import { applyTableRename, buildDataTypeResolver } from "@prisma/orm-family-sql/family/control";
16
+ import { applyTableRename, sqlTypeLookupsOf } from "@prisma/orm-family-sql/family/control";
18
17
  import { SqlCheckConstraintIR, SqlIndexIR } from "@prisma/orm-family-sql/schema-ir/types";
19
18
  import { errorMigrationOperationOptionRemoved } from "@prisma/orm-framework/errors/migration";
20
19
  import { Migration } from "@prisma/orm-family-sql/family/migration";
21
20
  import { MigrationContractViews } from "@prisma/orm-toolchain/migration-tools/migration";
22
- //#region ../../../3-targets/3-targets/postgres/dist/postgres-migration-Dq60Mixq.mjs
21
+ //#region ../../../3-targets/3-targets/postgres/dist/postgres-migration-PLXsv15e.mjs
23
22
  /**
24
23
  * Rename post-pass for indexes, per `(schema, table)`, widening-only,
25
24
  * deterministic by sorted names — the same structure as the policy pass
@@ -199,25 +198,27 @@ function pairCheckRenames(options, issues) {
199
198
  consumed
200
199
  };
201
200
  }
202
- function postgresRenderDefault(def, column) {
201
+ function postgresRenderDefault(def, column, dataTypeId) {
203
202
  if (def.kind === "function") return def.expression;
204
- return renderDefaultLiteral(def.value, column);
203
+ return renderDefaultLiteral(def.value, {
204
+ ...column,
205
+ dataTypeId
206
+ });
205
207
  }
206
208
  /**
207
209
  * The Postgres schema tree a contract describes, as the planner's "from" side:
208
210
  * the target descriptor's `migrations.contractToSchema` hook and the trees
209
211
  * `renameTable` compares to find its companion renames both go through here,
210
- * so they are built with the same expander, default renderer, default resolver
211
- * and data type resolver.
212
+ * so they are built with the same type lookups, default renderer and default resolver.
212
213
  */
213
214
  function postgresContractToSchema(contract, frameworkComponents) {
214
- const expander = buildPostgresNativeTypeExpander(frameworkComponents);
215
+ const types = sqlTypeLookupsOf(frameworkComponents);
215
216
  return contractToPostgresDatabaseSchemaNode(blindCast(contract), {
216
217
  annotationNamespace: "pg",
217
- expandNativeType: expander,
218
+ dataTypeLookup: types.dataTypeLookup,
219
+ codecLookup: types.codecLookup,
218
220
  renderDefault: postgresRenderDefault,
219
- resolveDefault: postgresResolveDefault,
220
- ...ifDefined("dataTypeOf", buildDataTypeResolver(frameworkComponents))
221
+ resolveDefault: postgresResolveDefault
221
222
  });
222
223
  }
223
224
  function renamedMarker(marker, rename) {
@@ -566,4 +567,4 @@ function refuseEarlierSetDefaultOptions(options) {
566
567
  //#endregion
567
568
  export { postgresContractToSchema as a, pairIndexRenames as i, emissionSchemaForNamespace as n, postgresRenderDefault as o, pairCheckRenames as r, PostgresMigration as t };
568
569
 
569
- //# sourceMappingURL=postgres-migration-Dq60Mixq-DYNJokZW.mjs.map
570
+ //# sourceMappingURL=postgres-migration-PLXsv15e-BruyXuKH.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postgres-migration-PLXsv15e-BruyXuKH.mjs","names":["#endView","#startView"],"sources":["../../../../3-targets/3-targets/postgres/dist/postgres-migration-PLXsv15e.mjs"],"sourcesContent":["import { t as errorPostgresMigrationStackMissing } from \"./errors-DYyzTYzE.mjs\";\nimport { _ as PostgresRlsPolicy, v as PostgresRlsEnablement } from \"./postgres-schema-DXd0mebY.mjs\";\nimport { n as postgresResolveDefault } from \"./default-normalizer-C68YhUBS.mjs\";\nimport { t as resolveDdlSchemaForNamespaceStorage } from \"./resolve-ddl-schema-CadTChyu.mjs\";\nimport { r as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from \"./diff-database-schema-BYHT4ZZp.mjs\";\nimport { c as issueNode, f as defaultForeignKeyName, m as defaultUniqueName, n as resolveNamespaceIdForDdlSchema, p as defaultPrimaryKeyName } from \"./control-policy-CuJvncMq.mjs\";\nimport { A as RenameIndexCall, B as installExtension, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, M as RenameTableCall, N as SetDefaultCall, P as SetNotNullCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, h as CreateTableCall, i as AddNativeEnumValueCall, j as RenamePostgresRlsPolicyCall, k as RenameConstraintCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, p as CreatePostgresRlsPolicyCall, r as AddForeignKeyCall, s as AddPrimaryKeyCall, t as AddCheckConstraintCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from \"./op-factory-call-4IafSIKD.mjs\";\nimport { n as renderDefaultLiteral } from \"./planner-ddl-builders-O0JqJIBZ.mjs\";\nimport { t as PostgresContractView } from \"./postgres-contract-view-D60F8OWK.mjs\";\nimport { t as dataTransform } from \"./data-transform-Bo32KRbq.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { issueOutcome } from \"@internal/framework-components/control\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { applyTableRename, sqlTypeLookupsOf } from \"@internal/family-sql/control\";\nimport { namingOf, parseWireName } from \"@internal/sql-schema-ir/naming\";\nimport { assertDefined } from \"@internal/utils/assertions\";\nimport { SqlCheckConstraintIR, SqlIndexIR } from \"@internal/sql-schema-ir/types\";\nimport { errorMigrationOperationOptionRemoved } from \"@internal/errors/migration\";\nimport { Migration } from \"@internal/family-sql/migration\";\nimport { MigrationContractViews } from \"@internal/migration-tools/migration\";\n//#region src/core/migrations/index-and-check-renames.ts\n/**\n* Rename post-pass for indexes, per `(schema, table)`, widening-only,\n* deterministic by sorted names — the same structure as the policy pass\n* below (which stays untouched: policies pair by hash only).\n*\n* Hash pairing (prefix-only renames): extras whose live names parse as\n* wire names, grouped by `(schema, table, hash)`; missing nodes iterated\n* in sorted-name order consume the sorted-name-first candidate.\n*\n* Content pairing (exact→wire convergence), after hash pairing has\n* consumed its matches: the remaining wire-named-missing nodes\n* (`prefix` defined) against the remaining extras of any name shape,\n* paired iff content-equal (columns ordered-strict both-defined-or-\n* both-undefined, `unique`/`type` strict, `options` loose, bodies\n* byte-equal).\n*\n* Leftovers proceed as create/drop exactly as before; without the\n* widening allowance the pass is skipped and pairing degrades to the\n* additive half, like the policy pass.\n*/\nfunction pairIndexRenames(options, issues) {\n\tconst consumed = /* @__PURE__ */ new Set();\n\tconst calls = [];\n\tif (!options.policy.allowedOperationClasses.includes(\"widening\")) return {\n\t\tcalls,\n\t\tconsumed\n\t};\n\tconst missing = [];\n\tconst extra = [];\n\tfor (const issue of issues) {\n\t\tconst node = issueNode(issue);\n\t\tif (node === void 0 || !SqlIndexIR.is(node)) continue;\n\t\tconst ddlSchema = issue.path[1];\n\t\tconst tableName = issue.path[2];\n\t\tif (ddlSchema === void 0 || tableName === void 0) continue;\n\t\tif (issueOutcome(issue) === \"not-found\") missing.push({\n\t\t\tissue,\n\t\t\tnode,\n\t\t\tddlSchema,\n\t\t\ttableName\n\t\t});\n\t\telse if (issueOutcome(issue) === \"not-expected\") extra.push({\n\t\t\tissue,\n\t\t\tnode,\n\t\t\tddlSchema,\n\t\t\ttableName\n\t\t});\n\t}\n\tif (missing.length === 0 || extra.length === 0) return {\n\t\tcalls,\n\t\tconsumed\n\t};\n\tconst byName = (a, b) => a.node.name < b.node.name ? -1 : a.node.name > b.node.name ? 1 : 0;\n\tconst emissionSchema = (ddlSchema) => resolveNamespaceIdForDdlSchema(options.contract, ddlSchema) === UNBOUND_NAMESPACE_ID ? UNBOUND_NAMESPACE_ID : ddlSchema;\n\tconst pairingKey = (finding, hash) => JSON.stringify([\n\t\tfinding.ddlSchema,\n\t\tfinding.tableName,\n\t\thash\n\t]);\n\tconst rename = (missingFinding, candidate) => {\n\t\tconsumed.add(missingFinding.issue);\n\t\tconsumed.add(candidate.issue);\n\t\tcalls.push(new RenameIndexCall(emissionSchema(missingFinding.ddlSchema), missingFinding.tableName, candidate.node.name, missingFinding.node.name));\n\t};\n\tconst sortedMissing = [...missing].sort(byName);\n\tconst extrasByHash = /* @__PURE__ */ new Map();\n\tfor (const finding of extra) {\n\t\tconst parsed = parseWireName(finding.node.name);\n\t\tif (parsed === void 0) continue;\n\t\tconst key = pairingKey(finding, parsed.hash);\n\t\tconst group = extrasByHash.get(key) ?? [];\n\t\tgroup.push(finding);\n\t\textrasByHash.set(key, group);\n\t}\n\tfor (const group of extrasByHash.values()) group.sort(byName);\n\tfor (const missingFinding of sortedMissing) {\n\t\tconst parsed = parseWireName(missingFinding.node.name);\n\t\tif (parsed === void 0) continue;\n\t\tconst candidate = extrasByHash.get(pairingKey(missingFinding, parsed.hash))?.shift();\n\t\tif (candidate === void 0) continue;\n\t\trename(missingFinding, candidate);\n\t}\n\tconst sortedExtras = [...extra].sort(byName);\n\tfor (const missingFinding of sortedMissing) {\n\t\tif (consumed.has(missingFinding.issue)) continue;\n\t\tif (missingFinding.node.prefix === void 0) continue;\n\t\tconst candidate = sortedExtras.find((extraFinding) => !consumed.has(extraFinding.issue) && extraFinding.ddlSchema === missingFinding.ddlSchema && extraFinding.tableName === missingFinding.tableName && missingFinding.node.contentEquals(extraFinding.node, {\n\t\t\tcolumnPresence: \"matching\",\n\t\t\tbodies: \"verbatim\"\n\t\t}));\n\t\tif (candidate === void 0) continue;\n\t\trename(missingFinding, candidate);\n\t}\n\treturn {\n\t\tcalls,\n\t\tconsumed\n\t};\n}\n/**\n* Check-constraint rename post-pass: a `not-found` and a `not-expected`\n* check on the same table whose wire-name content hashes match but whose\n* prefixes differ is a prefix-only rename, and collapses into one\n* `ALTER TABLE … RENAME CONSTRAINT`.\n*\n* This is the index pass's hash-pairing phase and nothing else. There is\n* deliberately no content-pairing phase: a live check body is whatever\n* Postgres reprinted, so it never byte-matches the authored text, and\n* pairing an exact-named live check by content would bless whatever\n* predicate is actually live. Adoption of an old exact-named check stays\n* drop + add.\n*\n* Runs only when the policy allows `widening` (rename's class). Without it\n* the pass no-ops and the pair degrades to the slice-1 behavior: an add,\n* plus a drop when `destructive` is allowed too.\n*/\nfunction pairCheckRenames(options, issues) {\n\tconst consumed = /* @__PURE__ */ new Set();\n\tconst calls = [];\n\tif (!options.policy.allowedOperationClasses.includes(\"widening\")) return {\n\t\tcalls,\n\t\tconsumed\n\t};\n\tconst missing = [];\n\tconst extra = [];\n\tfor (const issue of issues) {\n\t\tconst node = issueNode(issue);\n\t\tif (node === void 0 || !SqlCheckConstraintIR.is(node)) continue;\n\t\tconst ddlSchema = issue.path[1];\n\t\tconst tableName = issue.path[2];\n\t\tif (ddlSchema === void 0 || tableName === void 0) continue;\n\t\tif (issueOutcome(issue) === \"not-found\") missing.push({\n\t\t\tissue,\n\t\t\tnode,\n\t\t\tddlSchema,\n\t\t\ttableName\n\t\t});\n\t\telse if (issueOutcome(issue) === \"not-expected\") extra.push({\n\t\t\tissue,\n\t\t\tnode,\n\t\t\tddlSchema,\n\t\t\ttableName\n\t\t});\n\t}\n\tif (missing.length === 0 || extra.length === 0) return {\n\t\tcalls,\n\t\tconsumed\n\t};\n\tconst byName = (a, b) => a.node.name < b.node.name ? -1 : a.node.name > b.node.name ? 1 : 0;\n\tconst emissionSchema = (ddlSchema) => resolveNamespaceIdForDdlSchema(options.contract, ddlSchema) === UNBOUND_NAMESPACE_ID ? UNBOUND_NAMESPACE_ID : ddlSchema;\n\tconst pairingKey = (finding, hash) => JSON.stringify([\n\t\tfinding.ddlSchema,\n\t\tfinding.tableName,\n\t\thash\n\t]);\n\tconst sortedMissing = [...missing].sort(byName);\n\tconst extrasByHash = /* @__PURE__ */ new Map();\n\tfor (const finding of extra) {\n\t\tconst parsed = parseWireName(finding.node.name);\n\t\tif (parsed === void 0) continue;\n\t\tconst key = pairingKey(finding, parsed.hash);\n\t\tconst group = extrasByHash.get(key) ?? [];\n\t\tgroup.push(finding);\n\t\textrasByHash.set(key, group);\n\t}\n\tfor (const group of extrasByHash.values()) group.sort(byName);\n\tfor (const missingFinding of sortedMissing) {\n\t\tconst parsed = parseWireName(missingFinding.node.name);\n\t\tif (parsed === void 0) continue;\n\t\tconst candidate = extrasByHash.get(pairingKey(missingFinding, parsed.hash))?.shift();\n\t\tif (candidate === void 0) continue;\n\t\tconsumed.add(missingFinding.issue);\n\t\tconsumed.add(candidate.issue);\n\t\tcalls.push(new RenameConstraintCall(emissionSchema(missingFinding.ddlSchema), missingFinding.tableName, \"checkConstraint\", candidate.node.name, missingFinding.node.name));\n\t}\n\treturn {\n\t\tcalls,\n\t\tconsumed\n\t};\n}\n//#endregion\n//#region src/core/migrations/postgres-contract-to-schema.ts\nfunction postgresRenderDefault(def, column, dataTypeId) {\n\tif (def.kind === \"function\") return def.expression;\n\treturn renderDefaultLiteral(def.value, {\n\t\t...column,\n\t\tdataTypeId\n\t});\n}\n/**\n* The Postgres schema tree a contract describes, as the planner's \"from\" side:\n* the target descriptor's `migrations.contractToSchema` hook and the trees\n* `renameTable` compares to find its companion renames both go through here,\n* so they are built with the same type lookups, default renderer and default resolver.\n*/\nfunction postgresContractToSchema(contract, frameworkComponents) {\n\tconst types = sqlTypeLookupsOf(frameworkComponents);\n\treturn contractToPostgresDatabaseSchemaNode(blindCast(contract), {\n\t\tannotationNamespace: \"pg\",\n\t\tdataTypeLookup: types.dataTypeLookup,\n\t\tcodecLookup: types.codecLookup,\n\t\trenderDefault: postgresRenderDefault,\n\t\tresolveDefault: postgresResolveDefault\n\t});\n}\n//#endregion\n//#region src/core/migrations/rename-rls-references.ts\nfunction renamedMarker(marker, rename) {\n\tif (!(marker instanceof PostgresRlsEnablement) || marker.tableName !== rename.from) return marker;\n\treturn new PostgresRlsEnablement({\n\t\ttableName: rename.to,\n\t\tnamespaceId: marker.namespaceId\n\t});\n}\nfunction renamedPolicy(policy, rename) {\n\tif (!(policy instanceof PostgresRlsPolicy) || policy.tableName !== rename.from) return policy;\n\treturn new PostgresRlsPolicy({\n\t\tnaming: namingOf(policy.name, policy.prefix),\n\t\ttableName: rename.to,\n\t\tnamespaceId: policy.namespaceId,\n\t\toperation: policy.operation,\n\t\troles: policy.roles,\n\t\tusing: policy.using,\n\t\twithCheck: policy.withCheck,\n\t\tpermissive: policy.permissive\n\t});\n}\n/**\n* Moves the RLS marker and the policies of a renamed table onto its new name. The marker is keyed by table name; policies are keyed by their own name and only their `tableName` changes. Policy names do not derive from the table name, so none is renamed.\n*/\nfunction renameRlsReferences(entries, rename) {\n\tconst markers = entries[\"rls\"];\n\tconst policies = entries[\"policy\"];\n\treturn {\n\t\t...entries,\n\t\t...markers === void 0 ? {} : { rls: Object.fromEntries(Object.entries(markers).map(([tableName, marker]) => [tableName === rename.from ? rename.to : tableName, renamedMarker(marker, rename)])) },\n\t\t...policies === void 0 ? {} : { policy: Object.fromEntries(Object.entries(policies).map(([name, policy]) => [name, renamedPolicy(policy, rename)])) }\n\t};\n}\n//#endregion\n//#region src/core/migrations/table-rename-constraint-renames.ts\n/** The constraint of the next table the diff pairs with `node` and finds unchanged, as the diff compares them. */\nfunction unchangedIn(node, nextNodes) {\n\treturn nextNodes.find((next) => next.id === node.id && next.isEqualTo(node));\n}\n/**\n* The constraint renames that follow a table rename. A primary key, unique constraint or foreign key the start contract left unnamed carries a name derived from the old table name. When the end contract keeps the same constraint unchanged, it is renamed to the name the end contract gives it explicitly, or otherwise to the name derived from the new table name. A constraint the end contract changes is not renamed, so it keeps its name in the database. A constraint the start contract named keeps its name. Indexes and checks are not handled here: their wire names pair by content hash in the index and check rename passes.\n*/\nfunction constraintRenamesForTableRename(input) {\n\tconst { schemaName, from, to, previous, next } = input;\n\tconst rename = (kind, oldName, unchanged, derivedName) => {\n\t\tif (unchanged === void 0) return [];\n\t\tconst newName = unchanged.name ?? derivedName;\n\t\treturn oldName === newName ? [] : [new RenameConstraintCall(schemaName, to, kind, oldName, newName)];\n\t};\n\tconst primaryKey = previous.primaryKey !== void 0 && previous.primaryKey.name === void 0 ? rename(\"primaryKey\", defaultPrimaryKeyName(from), unchangedIn(previous.primaryKey, next.primaryKey === void 0 ? [] : [next.primaryKey]), defaultPrimaryKeyName(to)) : [];\n\tconst uniques = previous.uniques.filter((unique) => unique.name === void 0).flatMap((unique) => rename(\"unique\", defaultUniqueName(from, unique.columns), unchangedIn(unique, next.uniques), defaultUniqueName(to, unique.columns)));\n\tconst foreignKeys = previous.foreignKeys.filter((fk) => fk.name === void 0).flatMap((fk) => rename(\"foreignKey\", defaultForeignKeyName(from, fk.columns), unchangedIn(fk, next.foreignKeys), defaultForeignKeyName(to, fk.columns)));\n\treturn [\n\t\t...primaryKey,\n\t\t...uniques,\n\t\t...foreignKeys\n\t];\n}\n//#endregion\n//#region src/core/migrations/table-rename-calls.ts\nconst RENAME_POLICY = { allowedOperationClasses: [\"widening\"] };\nfunction emissionSchemaForNamespace(contract, namespaceId) {\n\treturn namespaceId === UNBOUND_NAMESPACE_ID ? UNBOUND_NAMESPACE_ID : resolveDdlSchemaForNamespaceStorage(contract.storage, namespaceId);\n}\nfunction renamedTableNode(schema, contract, rename) {\n\tconst ddlSchema = resolveDdlSchemaForNamespaceStorage(contract.storage, rename.namespaceId);\n\tconst table = Object.values(schema.namespaces).find((namespace) => namespace.schemaName === ddlSchema)?.tables[rename.to];\n\tassertDefined(table, `a resolved rename names table \"${rename.to}\" in schema \"${ddlSchema}\"`);\n\treturn table;\n}\n/**\n* The calls a migration's `renameTable` emits: the table rename, then a rename of each primary key, unique constraint and foreign key the start contract left unnamed, and of each wire-named index and check whose prefix derives from the table name. Only objects the end contract leaves otherwise unchanged are renamed; an unchanged constraint takes the end contract's explicit name if it has one. Throws `MIGRATION.TABLE_RENAME_UNMATCHED` when the start contract lacks the table or the end contract lacks the new name.\n*/\nfunction postgresTableRenameCalls(input) {\n\tconst applied = applyTableRename({\n\t\tstartContract: input.startContract,\n\t\tendContract: input.endContract,\n\t\trename: input.rename,\n\t\trenameTableReferences: renameRlsReferences\n\t});\n\tif (!applied.ok) throw applied.failure;\n\tconst { rename } = applied.value;\n\tconst contract = input.endContract;\n\tconst schemaName = emissionSchemaForNamespace(contract, rename.namespaceId);\n\tconst previousSchema = postgresContractToSchema(applied.value.contract, input.frameworkComponents);\n\tconst nextSchema = postgresContractToSchema(contract, input.frameworkComponents);\n\tconst { issues } = buildPostgresPlanDiff({\n\t\tcontract,\n\t\tactualSchema: previousSchema,\n\t\tframeworkComponents: input.frameworkComponents\n\t});\n\tconst onRenamedTable = (call) => call.schemaName === schemaName && call.tableName === rename.to;\n\tconst pairing = {\n\t\tcontract,\n\t\tpolicy: RENAME_POLICY\n\t};\n\treturn [\n\t\tnew RenameTableCall(schemaName, rename.from, rename.to),\n\t\t...constraintRenamesForTableRename({\n\t\t\tschemaName,\n\t\t\tfrom: rename.from,\n\t\t\tto: rename.to,\n\t\t\tprevious: renamedTableNode(previousSchema, contract, rename),\n\t\t\tnext: renamedTableNode(nextSchema, contract, rename)\n\t\t}),\n\t\t...pairIndexRenames(pairing, issues).calls.filter(onRenamedTable),\n\t\t...pairCheckRenames(pairing, issues).calls.filter(onRenamedTable)\n\t];\n}\n//#endregion\n//#region src/core/migrations/postgres-migration.ts\n/**\n* Target-owned base class for Postgres migrations.\n*\n* Fixes the `SqlMigration` generic to `PostgresPlanTargetDetails` and the\n* abstract `targetId` to the Postgres target-id string literal, so both\n* user-authored migrations and renderer-generated scaffolds (the output of\n* `renderCallsToTypeScript`) can extend `PostgresMigration` directly without\n* redeclaring target-local identity.\n*\n* Mirrors `MongoMigration` in `@internal/family-mongo`: the renderer\n* emits `extends Migration` against a facade re-export of this class\n* from `@internal/postgres/migration`, keeping the authoring surface\n* target-scoped rather than family-scoped.\n*\n* The constructor materializes a single Postgres `SqlControlAdapter` from\n* `stack.adapter.create(stack)` and stores it; the protected `dataTransform`\n* instance method forwards to the free `dataTransform` factory with that\n* stored adapter, so user migrations can write `this.dataTransform(...)`\n* without threading the adapter through every call.\n*\n* Every method requires an explicit `schema`. Postgres migrations name their\n* schema deliberately — there is no default and no `search_path`-relative\n* option. A migration that left the schema unspecified would resolve against\n* whatever `search_path` the connection happened to carry, and that ambiguity\n* is an antipattern in a migration. (The unbound/unspecified namespace concept\n* remains for SQLite, which has no schemas, and for Mongo's connection `db`.)\n*/\nvar PostgresMigration = class extends Migration {\n\ttargetId = \"postgres\";\n\t/**\n\t* Materialized Postgres control adapter, created once per migration\n\t* instance from the injected stack. `undefined` only when the migration\n\t* was instantiated without a stack (test fixtures); `controlAdapterFor`\n\t* throws a MIGRATION.POSTGRES_CONTROL_STACK_MISSING in that case to surface the misuse.\n\t*/\n\tcontrolAdapter;\n\t#endView = new MigrationContractViews(this, \"PostgresMigration\", (json) => PostgresContractView.fromJson(json));\n\t#startView = new MigrationContractViews(this, \"PostgresMigration\", (json) => PostgresContractView.fromJson(json));\n\tconstructor(stack) {\n\t\tsuper(stack);\n\t\tthis.controlAdapter = stack?.adapter ? blindCast(stack.adapter.create(stack)) : void 0;\n\t}\n\tframeworkComponents() {\n\t\tconst stack = this.stack;\n\t\tif (stack === void 0) return [];\n\t\treturn [\n\t\t\tstack.target,\n\t\t\t...stack.adapter === void 0 ? [] : [stack.adapter],\n\t\t\t...stack.extensions\n\t\t];\n\t}\n\t/**\n\t* Returns the materialized control adapter, or throws a MIGRATION.POSTGRES_CONTROL_STACK_MISSING naming\n\t* `operation` when the migration was constructed without a `ControlStack`.\n\t* Single home for the null-check that every DDL/DML method shares.\n\t*/\n\tcontrolAdapterFor(operation) {\n\t\tif (!this.controlAdapter) throw errorPostgresMigrationStackMissing(operation);\n\t\treturn this.controlAdapter;\n\t}\n\t/**\n\t* The typed, schema-qualified Postgres view over this migration's end-state\n\t* contract — `this.endContract.namespace.<schema>.table.<name>`, etc. Throws\n\t* if no `endContractJson` was provided.\n\t*/\n\tget endContract() {\n\t\treturn this.#endView.endContract;\n\t}\n\t/**\n\t* The typed Postgres view over this migration's start-state contract, or\n\t* `null` for a baseline migration (no `startContractJson`).\n\t*/\n\tget startContract() {\n\t\treturn this.#startView.startContract;\n\t}\n\t/**\n\t* Instance-method wrapper around the free `dataTransform` factory that\n\t* supplies the stored control adapter. Authors call this from inside\n\t* `get operations()`; the adapter argument is hidden from the call site.\n\t*/\n\tdataTransform(contract, name, options) {\n\t\treturn dataTransform(contract, name, options, this.controlAdapterFor(\"dataTransform\"));\n\t}\n\t/**\n\t* Emit a `CREATE TABLE` migration operation. Builds a typed DDL node from\n\t* the supplied options and lowers it through the stored control adapter.\n\t* Throws if no adapter is present (i.e. migration instantiated without a stack).\n\t*/\n\tcreateTable(options) {\n\t\treturn new CreateTableCall(options.schema, options.table, options.columns, options.constraints).toOp(this.controlAdapterFor(\"createTable\"));\n\t}\n\t/**\n\t* Emit a `CREATE SCHEMA` migration operation. Builds a typed DDL node from\n\t* the supplied options and lowers it through the stored control adapter.\n\t* Throws if no adapter is present (i.e. migration instantiated without a stack).\n\t*/\n\tcreateSchema(options) {\n\t\treturn new CreateSchemaCall(options.schema).toOp(this.controlAdapterFor(\"createSchema\"));\n\t}\n\t/**\n\t* Emit a `CREATE TYPE ... AS ENUM (...)` migration operation for a managed\n\t* native enum. Builds a typed DDL node and lowers it through the stored\n\t* control adapter (members render in declaration order). Throws if no adapter\n\t* is present.\n\t*/\n\tcreateNativeEnumType(options) {\n\t\treturn new CreateNativeEnumTypeCall(options.schema, options.typeName, options.members).toOp(this.controlAdapterFor(\"createNativeEnumType\"));\n\t}\n\t/**\n\t* Emit a `DROP TYPE` migration operation for a managed native enum, lowered\n\t* through the stored control adapter. Throws if no adapter is present.\n\t*/\n\tdropNativeEnumType(options) {\n\t\treturn new DropNativeEnumTypeCall(options.schema, options.typeName).toOp(this.controlAdapterFor(\"dropNativeEnumType\"));\n\t}\n\t/**\n\t* Emit an `ALTER TYPE ... ADD VALUE` migration operation appending one\n\t* member to a managed native enum, lowered through the stored control\n\t* adapter. Throws if no adapter is present. Every appended value is its\n\t* own operation — call this once per value to append more than one.\n\t*/\n\taddNativeEnumValue(options) {\n\t\treturn new AddNativeEnumValueCall(options.schema, options.typeName, options.value).toOp(this.controlAdapterFor(\"addNativeEnumValue\"));\n\t}\n\taddColumn(options) {\n\t\treturn new AddColumnCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor(\"addColumn\"));\n\t}\n\taddPrimaryKey(options) {\n\t\treturn new AddPrimaryKeyCall(options.schema, options.table, options.constraint, options.columns).toOp(this.controlAdapterFor(\"addPrimaryKey\"));\n\t}\n\taddUnique(options) {\n\t\treturn new AddUniqueCall(options.schema, options.table, options.constraint, options.columns).toOp(this.controlAdapterFor(\"addUnique\"));\n\t}\n\taddForeignKey(options) {\n\t\treturn new AddForeignKeyCall(options.schema, options.table, options.foreignKey).toOp(this.controlAdapterFor(\"addForeignKey\"));\n\t}\n\taddCheckConstraint(options) {\n\t\treturn new AddCheckConstraintCall(options.schema, options.table, options.constraint, options.expression).toOp(this.controlAdapterFor(\"addCheckConstraint\"));\n\t}\n\trenameCheckConstraint(options) {\n\t\treturn this.renameConstraint({\n\t\t\t...options,\n\t\t\tkind: \"checkConstraint\"\n\t\t});\n\t}\n\trenameConstraint(options) {\n\t\treturn new RenameConstraintCall(options.schema ?? UNBOUND_NAMESPACE_ID, options.table, options.kind, options.from, options.to).toOp(this.controlAdapterFor(\"renameConstraint\"));\n\t}\n\tdropCheckConstraint(options) {\n\t\treturn new DropCheckConstraintCall(options.schema, options.table, options.constraint).toOp(this.controlAdapterFor(\"dropCheckConstraint\"));\n\t}\n\tdropConstraint(options) {\n\t\treturn new DropConstraintCall(options.schema, options.table, options.constraint, options.kind ?? \"unique\").toOp(this.controlAdapterFor(\"dropConstraint\"));\n\t}\n\t/**\n\t* Emit the operations that rename a table: the table rename, then a rename of each primary key, unique constraint, foreign key, index and check whose name was derived from the old table name, read from this migration's start and end contracts. Spread the result into `operations`: `...this.renameTable({ table: 'userProfile', to: 'UserProfile' })`. `schema` names the table's namespace when more than one declares the table. Throws `MIGRATION.TABLE_RENAME_UNMATCHED` when the start contract lacks the table or the end contract lacks the new name.\n\t*/\n\trenameTable(options) {\n\t\tconst adapter = this.controlAdapterFor(\"renameTable\");\n\t\treturn postgresTableRenameCalls({\n\t\t\tstartContract: this.startContract,\n\t\t\tendContract: this.endContract,\n\t\t\trename: {\n\t\t\t\tnamespaceId: options.schema,\n\t\t\t\tfrom: options.table,\n\t\t\t\tto: options.to\n\t\t\t},\n\t\t\tframeworkComponents: this.frameworkComponents()\n\t\t}).map(async (call) => call.toOp(adapter));\n\t}\n\tdropTable(options) {\n\t\treturn new DropTableCall(options.schema, options.table).toOp(this.controlAdapterFor(\"dropTable\"));\n\t}\n\tdropColumn(options) {\n\t\treturn new DropColumnCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor(\"dropColumn\"));\n\t}\n\talterColumnType(options) {\n\t\treturn new AlterColumnTypeCall(options.schema, options.table, options.column, options.options).toOp(this.controlAdapterFor(\"alterColumnType\"));\n\t}\n\tsetNotNull(options) {\n\t\treturn new SetNotNullCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor(\"setNotNull\"));\n\t}\n\tdropNotNull(options) {\n\t\treturn new DropNotNullCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor(\"dropNotNull\"));\n\t}\n\tsetDefault(options) {\n\t\trefuseEarlierSetDefaultOptions(options);\n\t\treturn new SetDefaultCall(options.schema, options.table, options.column, options.operationClass).toOp(this.controlAdapterFor(\"setDefault\"));\n\t}\n\tdropDefault(options) {\n\t\treturn new DropDefaultCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor(\"dropDefault\"));\n\t}\n\tcreateIndex(options) {\n\t\treturn new CreateIndexCall(options.schema, options.table, options.index, options.columns !== void 0 ? { columns: options.columns } : { expression: options.expression }, options.extras).toOp(this.controlAdapterFor(\"createIndex\"));\n\t}\n\trenameIndex(options) {\n\t\treturn new RenameIndexCall(options.schema, options.table, options.from, options.to).toOp(this.controlAdapterFor(\"renameIndex\"));\n\t}\n\tdropIndex(options) {\n\t\treturn new DropIndexCall(options.schema, options.table, options.index).toOp(this.controlAdapterFor(\"dropIndex\"));\n\t}\n\tinstallExtension(options) {\n\t\treturn installExtension(options, this.controlAdapterFor(\"installExtension\"));\n\t}\n\tenableRowLevelSecurity(options) {\n\t\treturn new EnableRowLevelSecurityCall(options.schema, options.table).toOp(this.controlAdapterFor(\"enableRowLevelSecurity\"));\n\t}\n\tdisableRowLevelSecurity(options) {\n\t\treturn new DisableRowLevelSecurityCall(options.schema, options.table).toOp(this.controlAdapterFor(\"disableRowLevelSecurity\"));\n\t}\n\tcreateRlsPolicy(options) {\n\t\treturn new CreatePostgresRlsPolicyCall(options.schema, options.table, new PostgresRlsPolicy({\n\t\t\t...options.policy,\n\t\t\tusing: options.policy.using,\n\t\t\twithCheck: options.policy.withCheck\n\t\t})).toOp(this.controlAdapterFor(\"createRlsPolicy\"));\n\t}\n\tdropRlsPolicy(options) {\n\t\treturn new DropPostgresRlsPolicyCall(options.schema, options.table, options.policy).toOp(this.controlAdapterFor(\"dropRlsPolicy\"));\n\t}\n\trenameRlsPolicy(options) {\n\t\treturn new RenamePostgresRlsPolicyCall(options.schema, options.table, options.from, options.to).toOp(this.controlAdapterFor(\"renameRlsPolicy\"));\n\t}\n};\n/**\n* `setDefault` options an earlier version wrote carry the column's name in `column` and its default as SQL text in `defaultSql`.\n*/\nfunction refuseEarlierSetDefaultOptions(options) {\n\tconst column = options.column;\n\tconst columnIsName = typeof column === \"string\";\n\tif (!columnIsName && !Object.hasOwn(options, \"defaultSql\")) return;\n\tthrow errorMigrationOperationOptionRemoved({\n\t\toperation: \"setDefault\",\n\t\toption: \"defaultSql\",\n\t\tsubject: `column ${JSON.stringify(columnIsName ? column : options.column.name)} of table ${JSON.stringify(options.table)}`,\n\t\trewrite: \"Pass the column as `col(name, type, { default, codecRef })`, with its default written as `lit(value)` or `fn(expression)`, in place of its name and `defaultSql`.\",\n\t\tupgradeEntry: \"migration-ts-column-defaults\"\n\t});\n}\n//#endregion\nexport { pairCheckRenames as a, postgresRenderDefault as i, emissionSchemaForNamespace as n, pairIndexRenames as o, postgresContractToSchema as r, PostgresMigration as t };\n\n//# sourceMappingURL=postgres-migration-PLXsv15e.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,SAAS,iBAAiB,SAAS,QAAQ;CAC1C,MAAM,2BAA2B,IAAI,IAAI;CACzC,MAAM,QAAQ,CAAC;CACf,IAAI,CAAC,QAAQ,OAAO,wBAAwB,SAAS,UAAU,GAAG,OAAO;EACxE;EACA;CACD;CACA,MAAM,UAAU,CAAC;CACjB,MAAM,QAAQ,CAAC;CACf,KAAK,MAAM,SAAS,QAAQ;EAC3B,MAAM,OAAO,UAAU,KAAK;EAC5B,IAAI,SAAS,KAAK,KAAK,CAAC,WAAW,GAAG,IAAI,GAAG;EAC7C,MAAM,YAAY,MAAM,KAAK;EAC7B,MAAM,YAAY,MAAM,KAAK;EAC7B,IAAI,cAAc,KAAK,KAAK,cAAc,KAAK,GAAG;EAClD,IAAI,aAAa,KAAK,MAAM,aAAa,QAAQ,KAAK;GACrD;GACA;GACA;GACA;EACD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B,SAAS;EAChC,OAAO,IAAI,4BAA4B,QAAQ,QAAQ,QAAQ,KAAK,CAAC,CAAC,KAAK,KAAK,kBAAkB,yBAAyB,CAAC;CAC7H;CACA,gBAAgB,SAAS;EACxB,OAAO,IAAI,4BAA4B,QAAQ,QAAQ,QAAQ,OAAO,IAAI,kBAAkB;GAC3F,GAAG,QAAQ;GACX,OAAO,QAAQ,OAAO;GACtB,WAAW,QAAQ,OAAO;EAC3B,CAAC,CAAC,CAAC,CAAC,KAAK,KAAK,kBAAkB,iBAAiB,CAAC;CACnD;CACA,cAAc,SAAS;EACtB,OAAO,IAAI,0BAA0B,QAAQ,QAAQ,QAAQ,OAAO,QAAQ,MAAM,CAAC,CAAC,KAAK,KAAK,kBAAkB,eAAe,CAAC;CACjI;CACA,gBAAgB,SAAS;EACxB,OAAO,IAAI,4BAA4B,QAAQ,QAAQ,QAAQ,OAAO,QAAQ,MAAM,QAAQ,EAAE,CAAC,CAAC,KAAK,KAAK,kBAAkB,iBAAiB,CAAC;CAC/I;AACD;;;;AAIA,SAAS,+BAA+B,SAAS;CAChD,MAAM,SAAS,QAAQ;CACvB,MAAM,eAAe,OAAO,WAAW;CACvC,IAAI,CAAC,gBAAgB,CAAC,OAAO,OAAO,SAAS,YAAY,GAAG;CAC5D,MAAM,qCAAqC;EAC1C,WAAW;EACX,QAAQ;EACR,SAAS,UAAU,KAAK,UAAU,eAAe,SAAS,QAAQ,OAAO,IAAI,EAAE,YAAY,KAAK,UAAU,QAAQ,KAAK;EACvH,SAAS;EACT,cAAc;CACf,CAAC;AACF"}
@@ -1,7 +1,7 @@
1
1
  import { r as RenderedRlsPolicyLiteral } from "./postgres-rls-policy-CnDxf3z9-C3LIHAIG.mjs";
2
2
  import { t as PostgresPlanTargetDetails } from "./planner-target-details-HkP4RrRO-_xPQVPF0.mjs";
3
3
  import { n as DataTransformOptions } from "./data-transform-Ck5FbyNO-BNE7QlAo.mjs";
4
- import { N as RenamableConstraintKind, f as CreateIndexExtras, k as ForeignKeySpec, l as AlterColumnTypeOptions } from "./op-factory-call-CaEALaar-Nh0fSxQY.mjs";
4
+ import { N as RenamableConstraintKind, f as CreateIndexExtras, k as ForeignKeySpec, l as AlterColumnTypeOptions } from "./op-factory-call-CqKUB1XP-CsEGx4Jd.mjs";
5
5
  import { t as PostgresContractView } from "./postgres-contract-view-2OP5JnXl-D2fpy4-8.mjs";
6
6
  import { DdlColumn, DdlTableConstraint } from "@prisma/orm-family-sql/relational-core/ast";
7
7
  import { SqlStorage } from "@prisma/orm-family-sql/contract/types";
@@ -10,7 +10,7 @@ import { SqlMigrationPlanOperation } from "@prisma/orm-family-sql/family/control
10
10
  import { Migration } from "@prisma/orm-family-sql/family/migration";
11
11
  import { Contract } from "@prisma/orm-framework/contract/types";
12
12
  import { SqlControlAdapter } from "@prisma/orm-family-sql/family/control-adapter";
13
- //#region ../../../3-targets/3-targets/postgres/dist/postgres-migration-BCzAcFmN.d.mts
13
+ //#region ../../../3-targets/3-targets/postgres/dist/postgres-migration-e8UybR1y.d.mts
14
14
  //#region src/core/migrations/postgres-migration.d.ts
15
15
  /**
16
16
  * Target-owned base class for Postgres migrations.
@@ -277,4 +277,4 @@ declare abstract class PostgresMigration<Start extends Contract<SqlStorage> = Co
277
277
  }
278
278
  //#endregion
279
279
  export { PostgresMigration as t };
280
- //# sourceMappingURL=postgres-migration-BCzAcFmN-Bz_I02Gc.d.mts.map
280
+ //# sourceMappingURL=postgres-migration-e8UybR1y-C_m4i1jp.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"postgres-migration-BCzAcFmN-Bz_I02Gc.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/postgres-migration-BCzAcFmN.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAwCuB,kBAAkB,cAAc,SAAS,cAAc,SAAS,aAAa,YAAY,SAAS,cAAc,SAAS,qBAAqB,UAAU,uCAAuC,OAAO;;WAElN;;;;;;;qBA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MACP,QAAQ,0BAA0B;YAC5B,YAAY;aACX;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,WAAW;aACV;aACA;aACA,QAAQ;aACR;MACP,QAAQ,0BAA0B;YAC5B,YAAY;aACX;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,YAAY;aACX;aACA;aACA;aACA,SAAS;;aAET;aACA;;aAEA;aACA;OACN,QAAQ,0BAA0B;YAC7B,YAAY;aACX;aACA;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,UAAU;aACT;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,iBAAiB;aAChB;aACA;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,uBAAuB;aACtB;aACA;MACP,QAAQ,0BAA0B;YAC5B,wBAAwB;aACvB;aACA;MACP,QAAQ,0BAA0B;YAC5B,gBAAgB;aACf;aACA;aACA,QAAQ;MACf,QAAQ,0BAA0B;YAC5B,cAAc;aACb;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,gBAAgB;aACf;aACA;aACA;aACA;MACP,QAAQ,0BAA0B"}
1
+ {"version":3,"file":"postgres-migration-e8UybR1y-C_m4i1jp.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/postgres-migration-e8UybR1y.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAwCuB,kBAAkB,cAAc,SAAS,cAAc,SAAS,aAAa,YAAY,SAAS,cAAc,SAAS,qBAAqB,UAAU,uCAAuC,OAAO;;WAElN;;;;;;;qBAOU,gBAAgB;EACnC,YAAY,QAAQ;UACZ;;;;;;UAMA;;;;;;MAMJ,eAAe,qBAAqB;;;;;MAKpC,iBAAiB,qBAAqB;;;;;;YAMhC,cAAc,kBAAkB,SAAS,aAAa,UAAU,WAAW,cAAc,SAAS,uBAAuB,QAAQ,0BAA0B;;;;;;YAM3J,YAAY;aACX;aACA;aACA;aACA,kBAAkB;aAClB,uBAAuB;MAC9B,QAAQ,0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;aACX;aACA;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,UAAU;aACT;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,iBAAiB;aAChB;aACA;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,uBAAuB;aACtB;aACA;MACP,QAAQ,0BAA0B;YAC5B,wBAAwB;aACvB;aACA;MACP,QAAQ,0BAA0B;YAC5B,gBAAgB;aACf;aACA;aACA,QAAQ;MACf,QAAQ,0BAA0B;YAC5B,cAAc;aACb;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,gBAAgB;aACf;aACA;aACA;aACA;MACP,QAAQ,0BAA0B"}
@@ -1,6 +1,6 @@
1
1
  import { S as PG_TEXT_CODEC_ID } from "./codec-ids-Cb0yO-IS--e0P2rfI.mjs";
2
+ import { t as escapeLiteral } from "./sql-utils-BMXJi06b-CAQOplfq.mjs";
2
3
  import { t as PostgresNativeEnum } from "./postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs";
3
- import { t as escapeLiteral } from "./sql-utils-Bh-mnsSY-D6hnFPrP.mjs";
4
4
  import { TableSource } from "@prisma/orm-family-sql/relational-core/ast";
5
5
  import { blindCast } from "@prisma/orm-framework/utils/casts";
6
6
  import { type } from "arktype";
@@ -11,7 +11,7 @@ import { invariant } from "@prisma/orm-framework/utils/assertions";
11
11
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
12
12
  import { composeSqlEntityKinds } from "@prisma/orm-family-sql/contract/entity-kinds";
13
13
  import { cfExpr } from "@prisma/orm-family-sql/relational-core/contract-free";
14
- //#region ../../../3-targets/3-targets/postgres/dist/postgres-schema-C8slJGZo.mjs
14
+ //#region ../../../3-targets/3-targets/postgres/dist/postgres-schema-DXd0mebY.mjs
15
15
  /**
16
16
  * Postgres contract-IR marker for `@@rls` on a model: the table named here is
17
17
  * RLS-controlled (`ENABLE ROW LEVEL SECURITY` is driven by this marker, never
@@ -418,4 +418,4 @@ function postgresCreateNamespace(input) {
418
418
  //#endregion
419
419
  export { roleEntityKind as _, PostgresRlsPolicySchema as a, PostgresSchema as c, isPostgresSchema as d, nativeEnumEntityKind as f, rlsEnablementEntityKind as g, postgresCreateNamespace as h, PostgresRlsPolicy as i, PostgresTableSource as l, policyInputFromSerialized as m, PostgresRlsEnablement as n, PostgresRole as o, policyEntityKind as p, PostgresRlsEnablementSchema as r, PostgresRoleSchema as s, PostgresNativeEnumSchema as t, PostgresUnboundSchema as u };
420
420
 
421
- //# sourceMappingURL=postgres-schema-C8slJGZo-CFGUyJPt.mjs.map
421
+ //# sourceMappingURL=postgres-schema-DXd0mebY-CExd_GcQ.mjs.map