@prisma/orm-target-postgres 0.16.0-dev.36

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 (279) hide show
  1. package/LICENSE +201 -0
  2. package/README.md +23 -0
  3. package/dist/adapter-CWvVo0PV.d.mts +22 -0
  4. package/dist/adapter-CWvVo0PV.d.mts.map +1 -0
  5. package/dist/adapter-DhqcO3YO-jzwDVcCv.mjs +70 -0
  6. package/dist/adapter-DhqcO3YO-jzwDVcCv.mjs.map +1 -0
  7. package/dist/adapter.d.mts +12 -0
  8. package/dist/adapter.mjs +7 -0
  9. package/dist/adapter__adapter.d.mts +2 -0
  10. package/dist/adapter__adapter.mjs +2 -0
  11. package/dist/adapter__column-types.d.mts +2 -0
  12. package/dist/adapter__column-types.mjs +2 -0
  13. package/dist/adapter__control.d.mts +5 -0
  14. package/dist/adapter__control.mjs +441 -0
  15. package/dist/adapter__control.mjs.map +1 -0
  16. package/dist/adapter__operation-types.d.mts +2 -0
  17. package/dist/adapter__operation-types.mjs +1 -0
  18. package/dist/adapter__runtime.d.mts +2 -0
  19. package/dist/adapter__runtime.mjs +38 -0
  20. package/dist/adapter__runtime.mjs.map +1 -0
  21. package/dist/adapter__types.d.mts +4 -0
  22. package/dist/adapter__types.mjs +1 -0
  23. package/dist/authoring-03FwIL2k-kPjZAp3s.mjs +757 -0
  24. package/dist/authoring-03FwIL2k-kPjZAp3s.mjs.map +1 -0
  25. package/dist/canonicalize-CQlxSR4D-MnrT5gtW.d.mts +34 -0
  26. package/dist/canonicalize-CQlxSR4D-MnrT5gtW.d.mts.map +1 -0
  27. package/dist/canonicalize-CrN3u_xM-D4MrOqcB.mjs +59 -0
  28. package/dist/canonicalize-CrN3u_xM-D4MrOqcB.mjs.map +1 -0
  29. package/dist/codec-descriptor-Bec_zukr-BfvtUqhm.d.mts +37 -0
  30. package/dist/codec-descriptor-Bec_zukr-BfvtUqhm.d.mts.map +1 -0
  31. package/dist/codec-descriptor-Bg-_412t.d.mts +1 -0
  32. package/dist/codec-descriptor-CB6x0xEu-C-Zn2IEz.mjs +135 -0
  33. package/dist/codec-descriptor-CB6x0xEu-C-Zn2IEz.mjs.map +1 -0
  34. package/dist/codec-ids-CsOU3xDv-mPI0INiF.d.mts +33 -0
  35. package/dist/codec-ids-CsOU3xDv-mPI0INiF.d.mts.map +1 -0
  36. package/dist/codec-ids-fgafMLR7.d.mts +1 -0
  37. package/dist/codec-ids-tX7Svtz--BuOfRaVU.mjs +33 -0
  38. package/dist/codec-ids-tX7Svtz--BuOfRaVU.mjs.map +1 -0
  39. package/dist/codec-types-BHwY9Ff-.d.mts +2 -0
  40. package/dist/codec-types-mWhnDEAf-CAQzGFnF.d.mts +82 -0
  41. package/dist/codec-types-mWhnDEAf-CAQzGFnF.d.mts.map +1 -0
  42. package/dist/codecs-CBl0nD44-CaWPc1bd.mjs +1486 -0
  43. package/dist/codecs-CBl0nD44-CaWPc1bd.mjs.map +1 -0
  44. package/dist/codecs-CHIVTNZs.mjs +15 -0
  45. package/dist/codecs-CHIVTNZs.mjs.map +1 -0
  46. package/dist/codecs-Cvqvb9pV-Cdc51FKY.d.mts +589 -0
  47. package/dist/codecs-Cvqvb9pV-Cdc51FKY.d.mts.map +1 -0
  48. package/dist/codecs-DBn-uIv-.d.mts +15 -0
  49. package/dist/codecs-DBn-uIv-.d.mts.map +1 -0
  50. package/dist/column-types-BH-MU6uU.d.mts +108 -0
  51. package/dist/column-types-BH-MU6uU.d.mts.map +1 -0
  52. package/dist/column-types-CwAyCgp2.mjs +126 -0
  53. package/dist/column-types-CwAyCgp2.mjs.map +1 -0
  54. package/dist/contract-free-BZUS18FU.mjs +118 -0
  55. package/dist/contract-free-BZUS18FU.mjs.map +1 -0
  56. package/dist/contract-free-DzpGxLfb.d.mts +258 -0
  57. package/dist/contract-free-DzpGxLfb.d.mts.map +1 -0
  58. package/dist/control-2F195jJk.d.mts +11 -0
  59. package/dist/control-2F195jJk.d.mts.map +1 -0
  60. package/dist/control-6WFTtLAM.mjs +60 -0
  61. package/dist/control-6WFTtLAM.mjs.map +1 -0
  62. package/dist/control-B-FTbEnE.d.mts +22 -0
  63. package/dist/control-B-FTbEnE.d.mts.map +1 -0
  64. package/dist/control-D85zv_aY.d.mts +199 -0
  65. package/dist/control-D85zv_aY.d.mts.map +1 -0
  66. package/dist/control-DRMWptiJ.mjs +1355 -0
  67. package/dist/control-DRMWptiJ.mjs.map +1 -0
  68. package/dist/control-adapter-B9t0g7Pf-HrCxlM65.mjs +1901 -0
  69. package/dist/control-adapter-B9t0g7Pf-HrCxlM65.mjs.map +1 -0
  70. package/dist/control-policy-Cl3RRSPg-CT3QGpR3.mjs +1257 -0
  71. package/dist/control-policy-Cl3RRSPg-CT3QGpR3.mjs.map +1 -0
  72. package/dist/data-transform-BSM7TQpE.d.mts +1 -0
  73. package/dist/data-transform-ChZzy2dP-CxVCat_8.mjs +53 -0
  74. package/dist/data-transform-ChZzy2dP-CxVCat_8.mjs.map +1 -0
  75. package/dist/data-transform-Ck5FbyNO-BNE7QlAo.d.mts +38 -0
  76. package/dist/data-transform-Ck5FbyNO-BNE7QlAo.d.mts.map +1 -0
  77. package/dist/ddl-B4Rh8ntj.d.mts +1 -0
  78. package/dist/ddl-BdP4q3KY-Duef4uHw.mjs +395 -0
  79. package/dist/ddl-BdP4q3KY-Duef4uHw.mjs.map +1 -0
  80. package/dist/default-normalizer-B36TOul4.d.mts +31 -0
  81. package/dist/default-normalizer-B36TOul4.d.mts.map +1 -0
  82. package/dist/default-normalizer-Ba5ZebHM-isV86rjy.mjs +253 -0
  83. package/dist/default-normalizer-Ba5ZebHM-isV86rjy.mjs.map +1 -0
  84. package/dist/descriptor-meta-2IlVC6_d-DnV00Qd_.mjs +351 -0
  85. package/dist/descriptor-meta-2IlVC6_d-DnV00Qd_.mjs.map +1 -0
  86. package/dist/descriptor-meta-DnHabAS3-C53XXPQw.mjs +28 -0
  87. package/dist/descriptor-meta-DnHabAS3-C53XXPQw.mjs.map +1 -0
  88. package/dist/descriptor-meta-runtime-UwYdV8fD-B_m_Ha8r.mjs +13 -0
  89. package/dist/descriptor-meta-runtime-UwYdV8fD-B_m_Ha8r.mjs.map +1 -0
  90. package/dist/diff-database-schema-BfRs2vrG-D2o4KII0.mjs +390 -0
  91. package/dist/diff-database-schema-BfRs2vrG-D2o4KII0.mjs.map +1 -0
  92. package/dist/diff-database-schema-DsoNznGC.d.mts +38 -0
  93. package/dist/diff-database-schema-DsoNznGC.d.mts.map +1 -0
  94. package/dist/driver.d.mts +3 -0
  95. package/dist/driver.mjs +2 -0
  96. package/dist/driver__control.d.mts +2 -0
  97. package/dist/driver__control.mjs +2 -0
  98. package/dist/driver__runtime.d.mts +2 -0
  99. package/dist/driver__runtime.mjs +597 -0
  100. package/dist/driver__runtime.mjs.map +1 -0
  101. package/dist/errors-DCcVX4j1.d.mts +32 -0
  102. package/dist/errors-DCcVX4j1.d.mts.map +1 -0
  103. package/dist/errors-kYxOQjdD-D4T3rbVp.mjs +39 -0
  104. package/dist/errors-kYxOQjdD-D4T3rbVp.mjs.map +1 -0
  105. package/dist/issue-planner-jkY6p-Ca.d.mts +105 -0
  106. package/dist/issue-planner-jkY6p-Ca.d.mts.map +1 -0
  107. package/dist/migration-CBSAPE8S.d.mts +25 -0
  108. package/dist/migration-CBSAPE8S.d.mts.map +1 -0
  109. package/dist/migration-PTHAY9Cv.mjs +21 -0
  110. package/dist/migration-PTHAY9Cv.mjs.map +1 -0
  111. package/dist/namespace-ids-xtp_ZY86-Cpp8PTxD.mjs +7 -0
  112. package/dist/namespace-ids-xtp_ZY86-Cpp8PTxD.mjs.map +1 -0
  113. package/dist/native-type-normalizer-DqJlOTeX.d.mts +19 -0
  114. package/dist/native-type-normalizer-DqJlOTeX.d.mts.map +1 -0
  115. package/dist/native-type-normalizer-yvd3tqv-.mjs +38 -0
  116. package/dist/native-type-normalizer-yvd3tqv-.mjs.map +1 -0
  117. package/dist/nodes-BU-V-aZA-RqwPH68u.d.mts +235 -0
  118. package/dist/nodes-BU-V-aZA-RqwPH68u.d.mts.map +1 -0
  119. package/dist/nodes-DAvDJLvJ-BBdvFXNa.mjs +255 -0
  120. package/dist/nodes-DAvDJLvJ-BBdvFXNa.mjs.map +1 -0
  121. package/dist/normalize-error-CNjgVO71-CLlZ3CuJ.mjs +121 -0
  122. package/dist/normalize-error-CNjgVO71-CLlZ3CuJ.mjs.map +1 -0
  123. package/dist/op-factory-call-DifL68KT-Bo6pxs-R.mjs +2009 -0
  124. package/dist/op-factory-call-DifL68KT-Bo6pxs-R.mjs.map +1 -0
  125. package/dist/op-factory-call-FEA5mnWH.d.mts +1 -0
  126. package/dist/op-factory-call-jd4cgfjA-CyNT4YVn.d.mts +521 -0
  127. package/dist/op-factory-call-jd4cgfjA-CyNT4YVn.d.mts.map +1 -0
  128. package/dist/operation-types-BfRocNI8.d.mts +22 -0
  129. package/dist/operation-types-BfRocNI8.d.mts.map +1 -0
  130. package/dist/pack-DFM4tmob.d.mts +610 -0
  131. package/dist/pack-DFM4tmob.d.mts.map +1 -0
  132. package/dist/planner-Bmje9ii8-B99fEsNM.mjs +588 -0
  133. package/dist/planner-Bmje9ii8-B99fEsNM.mjs.map +1 -0
  134. package/dist/planner-DL4Bh5Nk.d.mts +163 -0
  135. package/dist/planner-DL4Bh5Nk.d.mts.map +1 -0
  136. package/dist/planner-ddl-builders-CbfICQfm-CxYiLrhX.mjs +102 -0
  137. package/dist/planner-ddl-builders-CbfICQfm-CxYiLrhX.mjs.map +1 -0
  138. package/dist/planner-ddl-builders-ijp60-JO.d.mts +19 -0
  139. package/dist/planner-ddl-builders-ijp60-JO.d.mts.map +1 -0
  140. package/dist/planner-identity-values-BmHn5C6U-BYBbUAyR.mjs +90 -0
  141. package/dist/planner-identity-values-BmHn5C6U-BYBbUAyR.mjs.map +1 -0
  142. package/dist/planner-identity-values-TfEhnoWa.d.mts +25 -0
  143. package/dist/planner-identity-values-TfEhnoWa.d.mts.map +1 -0
  144. package/dist/planner-produced-postgres-migration-B0PQLLUb-qsS6cQqX.d.mts +25 -0
  145. package/dist/planner-produced-postgres-migration-B0PQLLUb-qsS6cQqX.d.mts.map +1 -0
  146. package/dist/planner-produced-postgres-migration-C3GPZWeC.d.mts +1 -0
  147. package/dist/planner-produced-postgres-migration-Cicg2sXg-Ck9iDxGI.mjs +47 -0
  148. package/dist/planner-produced-postgres-migration-Cicg2sXg-Ck9iDxGI.mjs.map +1 -0
  149. package/dist/planner-schema-lookup-C4DHAddq.d.mts +21 -0
  150. package/dist/planner-schema-lookup-C4DHAddq.d.mts.map +1 -0
  151. package/dist/planner-schema-lookup-kMIVP2y--CdO4VlnF.mjs +57 -0
  152. package/dist/planner-schema-lookup-kMIVP2y--CdO4VlnF.mjs.map +1 -0
  153. package/dist/planner-sql-checks-CFgbRTJw.d.mts +20 -0
  154. package/dist/planner-sql-checks-CFgbRTJw.d.mts.map +1 -0
  155. package/dist/planner-sql-checks-DRc_78n8-C9nHOrvU.mjs +152 -0
  156. package/dist/planner-sql-checks-DRc_78n8-C9nHOrvU.mjs.map +1 -0
  157. package/dist/planner-target-details-HkP4RrRO-_xPQVPF0.d.mts +12 -0
  158. package/dist/planner-target-details-HkP4RrRO-_xPQVPF0.d.mts.map +1 -0
  159. package/dist/planner-type-resolution-Bt2f_q-F-C4T6YTae.mjs +15 -0
  160. package/dist/planner-type-resolution-Bt2f_q-F-C4T6YTae.mjs.map +1 -0
  161. package/dist/postgres-contract-view-2OP5JnXl-D2fpy4-8.d.mts +36 -0
  162. package/dist/postgres-contract-view-2OP5JnXl-D2fpy4-8.d.mts.map +1 -0
  163. package/dist/postgres-contract-view-FdLX7dV9-Cat1VKV9.mjs +144 -0
  164. package/dist/postgres-contract-view-FdLX7dV9-Cat1VKV9.mjs.map +1 -0
  165. package/dist/postgres-database-schema-node-CyfpHXDr-BqyozkQE.d.mts +285 -0
  166. package/dist/postgres-database-schema-node-CyfpHXDr-BqyozkQE.d.mts.map +1 -0
  167. package/dist/postgres-migration-CDJj7CvD-Bsqs_fVo.d.mts +260 -0
  168. package/dist/postgres-migration-CDJj7CvD-Bsqs_fVo.d.mts.map +1 -0
  169. package/dist/postgres-migration-CJshdIZn-DYYjgdD0.mjs +201 -0
  170. package/dist/postgres-migration-CJshdIZn-DYYjgdD0.mjs.map +1 -0
  171. package/dist/postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs +45 -0
  172. package/dist/postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs.map +1 -0
  173. package/dist/postgres-rls-policy-CnDxf3z9-C3LIHAIG.d.mts +61 -0
  174. package/dist/postgres-rls-policy-CnDxf3z9-C3LIHAIG.d.mts.map +1 -0
  175. package/dist/postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs +204 -0
  176. package/dist/postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs.map +1 -0
  177. package/dist/postgres-schema-KSzLDONj-CsXGoY8b.mjs +421 -0
  178. package/dist/postgres-schema-KSzLDONj-CsXGoY8b.mjs.map +1 -0
  179. package/dist/postgres-schema-Xsjt3RKO-Buv2X8ai.d.mts +269 -0
  180. package/dist/postgres-schema-Xsjt3RKO-Buv2X8ai.d.mts.map +1 -0
  181. package/dist/postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs +212 -0
  182. package/dist/postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs.map +1 -0
  183. package/dist/render-ops-DPwhZt2W.d.mts +11 -0
  184. package/dist/render-ops-DPwhZt2W.d.mts.map +1 -0
  185. package/dist/render-ops-DxzTxSsv-Bz85uUHk.mjs +34 -0
  186. package/dist/render-ops-DxzTxSsv-Bz85uUHk.mjs.map +1 -0
  187. package/dist/render-typescript-6sCFvMBh.d.mts +21 -0
  188. package/dist/render-typescript-6sCFvMBh.d.mts.map +1 -0
  189. package/dist/render-typescript-Cw3lFO28-Cx0lXWmv.mjs +117 -0
  190. package/dist/render-typescript-Cw3lFO28-Cx0lXWmv.mjs.map +1 -0
  191. package/dist/resolve-ddl-schema-CxqlLW47-0GiHRziS.mjs +22 -0
  192. package/dist/resolve-ddl-schema-CxqlLW47-0GiHRziS.mjs.map +1 -0
  193. package/dist/runtime-BbSRVwdd.d.mts +12 -0
  194. package/dist/runtime-BbSRVwdd.d.mts.map +1 -0
  195. package/dist/runtime-CDewySU9.d.mts +55 -0
  196. package/dist/runtime-CDewySU9.d.mts.map +1 -0
  197. package/dist/runtime-_TfO66h5.d.mts +32 -0
  198. package/dist/runtime-_TfO66h5.d.mts.map +1 -0
  199. package/dist/schema-ir-annotations-DuuYh0gl.d.mts +15 -0
  200. package/dist/schema-ir-annotations-DuuYh0gl.d.mts.map +1 -0
  201. package/dist/schema-node-kinds-qlnURWJy-Bo30pwTM.d.mts +30 -0
  202. package/dist/schema-node-kinds-qlnURWJy-Bo30pwTM.d.mts.map +1 -0
  203. package/dist/sql-utils-BnBlQxyh-DaX9Nb7Z.mjs +90 -0
  204. package/dist/sql-utils-BnBlQxyh-DaX9Nb7Z.mjs.map +1 -0
  205. package/dist/sql-utils-DW6fkczF.d.mts +62 -0
  206. package/dist/sql-utils-DW6fkczF.d.mts.map +1 -0
  207. package/dist/table-source-ikHOZmhD-DriY1Lcr.d.mts +15 -0
  208. package/dist/table-source-ikHOZmhD-DriY1Lcr.d.mts.map +1 -0
  209. package/dist/target.d.mts +47 -0
  210. package/dist/target.mjs +34 -0
  211. package/dist/target__codec-descriptor.d.mts +3 -0
  212. package/dist/target__codec-descriptor.mjs +2 -0
  213. package/dist/target__codec-ids.d.mts +3 -0
  214. package/dist/target__codec-ids.mjs +2 -0
  215. package/dist/target__codec-types.d.mts +4 -0
  216. package/dist/target__codec-types.mjs +1 -0
  217. package/dist/target__codecs.d.mts +3 -0
  218. package/dist/target__codecs.mjs +3 -0
  219. package/dist/target__contract-free.d.mts +3 -0
  220. package/dist/target__contract-free.mjs +4 -0
  221. package/dist/target__control.d.mts +2 -0
  222. package/dist/target__control.mjs +2 -0
  223. package/dist/target__data-transform.d.mts +3 -0
  224. package/dist/target__data-transform.mjs +2 -0
  225. package/dist/target__ddl.d.mts +4 -0
  226. package/dist/target__ddl.mjs +2 -0
  227. package/dist/target__default-normalizer.d.mts +2 -0
  228. package/dist/target__default-normalizer.mjs +2 -0
  229. package/dist/target__diff-database-schema.d.mts +2 -0
  230. package/dist/target__diff-database-schema.mjs +2 -0
  231. package/dist/target__errors.d.mts +2 -0
  232. package/dist/target__errors.mjs +2 -0
  233. package/dist/target__issue-planner.d.mts +2 -0
  234. package/dist/target__issue-planner.mjs +2 -0
  235. package/dist/target__migration.d.mts +4 -0
  236. package/dist/target__migration.mjs +5 -0
  237. package/dist/target__native-type-normalizer.d.mts +2 -0
  238. package/dist/target__native-type-normalizer.mjs +2 -0
  239. package/dist/target__op-factory-call.d.mts +3 -0
  240. package/dist/target__op-factory-call.mjs +2 -0
  241. package/dist/target__pack.d.mts +2 -0
  242. package/dist/target__pack.mjs +2 -0
  243. package/dist/target__planner-ddl-builders.d.mts +2 -0
  244. package/dist/target__planner-ddl-builders.mjs +2 -0
  245. package/dist/target__planner-identity-values.d.mts +2 -0
  246. package/dist/target__planner-identity-values.mjs +2 -0
  247. package/dist/target__planner-produced-postgres-migration.d.mts +3 -0
  248. package/dist/target__planner-produced-postgres-migration.mjs +2 -0
  249. package/dist/target__planner-schema-lookup.d.mts +2 -0
  250. package/dist/target__planner-schema-lookup.mjs +2 -0
  251. package/dist/target__planner-sql-checks.d.mts +2 -0
  252. package/dist/target__planner-sql-checks.mjs +2 -0
  253. package/dist/target__planner-target-details.d.mts +2 -0
  254. package/dist/target__planner-target-details.mjs +1 -0
  255. package/dist/target__planner.d.mts +2 -0
  256. package/dist/target__planner.mjs +3 -0
  257. package/dist/target__render-ops.d.mts +2 -0
  258. package/dist/target__render-ops.mjs +2 -0
  259. package/dist/target__render-typescript.d.mts +2 -0
  260. package/dist/target__render-typescript.mjs +2 -0
  261. package/dist/target__rls-canonicalize.d.mts +2 -0
  262. package/dist/target__rls-canonicalize.mjs +2 -0
  263. package/dist/target__runtime.d.mts +3 -0
  264. package/dist/target__runtime.mjs +23 -0
  265. package/dist/target__runtime.mjs.map +1 -0
  266. package/dist/target__schema-ir-annotations.d.mts +2 -0
  267. package/dist/target__schema-ir-annotations.mjs +2 -0
  268. package/dist/target__sql-utils.d.mts +2 -0
  269. package/dist/target__sql-utils.mjs +2 -0
  270. package/dist/target__types.d.mts +7 -0
  271. package/dist/target__types.mjs +5 -0
  272. package/dist/types-CkryN1AS-6MNZLjLY.d.mts +27 -0
  273. package/dist/types-CkryN1AS-6MNZLjLY.d.mts.map +1 -0
  274. package/dist/types-Cp_Jf2tk.d.mts +1 -0
  275. package/dist/types-ue6jkJyF-BQJzjx1P.d.mts +10 -0
  276. package/dist/types-ue6jkJyF-BQJzjx1P.d.mts.map +1 -0
  277. package/dist/types-xa86TkcV.d.mts +32 -0
  278. package/dist/types-xa86TkcV.d.mts.map +1 -0
  279. package/package.json +95 -0
@@ -0,0 +1,285 @@
1
+ import { i as RlsPolicyOperation } from "./postgres-rls-policy-CnDxf3z9-C3LIHAIG.mjs";
2
+ import { SqlObjectNaming } from "@prisma/orm-family-sql/schema-ir/naming";
3
+ import { DiffableNode, SchemaNodeRef } from "@prisma/orm-framework/components/control";
4
+ import { PrimaryKey, SqlAnnotations, SqlCheckConstraintIR, SqlColumnIR, SqlForeignKeyIR, SqlIndexIR, SqlSchemaIRNode, SqlTableIRInput, SqlUniqueIR } from "@prisma/orm-family-sql/schema-ir/types";
5
+ import { ControlPolicy } from "@prisma/orm-framework/contract/types";
6
+ //#region ../../../3-targets/3-targets/postgres/dist/postgres-database-schema-node-CyfpHXDr.d.mts
7
+ //#region src/core/schema-ir/postgres-native-enum-schema-node.d.ts
8
+ interface PostgresNativeEnumSchemaNodeInput {
9
+ /** The Postgres type name (`CREATE TYPE <typeName> AS ENUM (…)`). */
10
+ readonly typeName: string;
11
+ /** The owning DDL schema name — enum types are schema-scoped. */
12
+ readonly namespaceId: string;
13
+ /** Member values in declaration (`pg_enum.enumsortorder`) order. */
14
+ readonly members: readonly string[];
15
+ /** The contract entity's control grade — expected-side nodes only. */
16
+ readonly control?: ControlPolicy;
17
+ }
18
+ /**
19
+ * Schema-diff leaf node for a native Postgres enum type.
20
+ *
21
+ * This is a derived, transient node walked by the differ — it is NEVER
22
+ * serialized. Both sides derive it on the namespace node: the expected side
23
+ * from the contract's hydrated `entries.native_enum` entities, the actual
24
+ * side from the adapter's introspected `nativeEnums`.
25
+ *
26
+ * Enum types are schema-scoped, so identity is (namespace, type name): the
27
+ * namespace coordinate comes from tree position (the differ pairs enum nodes
28
+ * only inside an already-paired namespace) and `id` carries the type name,
29
+ * prefixed with the entries-kind vocabulary (`native_enum:<typeName>`) so it
30
+ * cannot collide with a sibling table of the same name — the same
31
+ * sibling-prefix convention relational column nodes use (`column:<name>`).
32
+ *
33
+ * `isEqualTo` compares members POSITIONALLY — `['a','b'] ≠ ['b','a']` —
34
+ * because Postgres enum sort order is semantic. `control` is contract
35
+ * metadata, not database state, and does not participate in equality.
36
+ */
37
+ declare class PostgresNativeEnumSchemaNode extends SqlSchemaIRNode implements DiffableNode {
38
+ readonly nodeKind: "postgres-native-enum";
39
+ readonly typeName: string;
40
+ readonly namespaceId: string;
41
+ readonly members: readonly string[];
42
+ readonly control?: ControlPolicy;
43
+ constructor(input: PostgresNativeEnumSchemaNodeInput);
44
+ get id(): string;
45
+ children(): readonly DiffableNode[];
46
+ isEqualTo(other: DiffableNode): boolean;
47
+ static is(node: SqlSchemaIRNode): node is PostgresNativeEnumSchemaNode;
48
+ static assert(node: SqlSchemaIRNode): asserts node is PostgresNativeEnumSchemaNode;
49
+ }
50
+ //#endregion
51
+ //#region src/core/schema-ir/postgres-policy-schema-node.d.ts
52
+ interface PostgresPolicySchemaNodeInput {
53
+ /** The node's identity. Read back off a built node with `namingOf`. */
54
+ readonly naming: SqlObjectNaming;
55
+ /** Name of the table this policy attaches to, by name within the same schema. */
56
+ readonly tableName: string;
57
+ /** Namespace coordinate (schema name). */
58
+ readonly namespaceId: string;
59
+ readonly operation: RlsPolicyOperation;
60
+ /** Sorted role names rendered in `TO <roles>`. */
61
+ readonly roles: readonly string[];
62
+ /** USING predicate SQL string, if present. */
63
+ readonly using: string | undefined;
64
+ /** WITH CHECK predicate SQL string, if present. */
65
+ readonly withCheck: string | undefined;
66
+ /** `true` = `AS PERMISSIVE`, `false` = `AS RESTRICTIVE`. */
67
+ readonly permissive: boolean;
68
+ /**
69
+ * This policy's table node, plus one entry per role it grants to — each
70
+ * as the root-anchored chain the differ pairs siblings with. Stamped by
71
+ * the derivation, which holds the parent (database/namespace) context.
72
+ * Never compared by `isEqualTo`.
73
+ */
74
+ readonly dependsOn: readonly SchemaNodeRef[] | undefined;
75
+ }
76
+ /**
77
+ * Schema-diff leaf node for a Postgres row-level security policy.
78
+ *
79
+ * This is a derived, transient node walked by the differ — it is NEVER serialized.
80
+ * Built by project-from-contract and project-from-database from their respective
81
+ * `PostgresRlsPolicy` contract entities / introspected rows.
82
+ *
83
+ * `id` is the full physical name. `isEqualTo` is mode-selected by the
84
+ * receiver's `prefix`: a wire-named receiver (`prefix` present) compares ids
85
+ * only — the wire name encodes a body hash, so name-equality is
86
+ * body-equality and predicate bodies are never byte-compared (Postgres
87
+ * reprints them). An exact receiver (`prefix` absent) compares content:
88
+ * `operation`/`permissive` strict, `roles` sorted, and `using ?? ''` /
89
+ * `withCheck ?? ''` verbatim byte-for-byte — reliable precisely when the
90
+ * body text was captured from a Postgres reprint (contract infer).
91
+ */
92
+ declare class PostgresPolicySchemaNode extends SqlSchemaIRNode implements DiffableNode {
93
+ readonly nodeKind: "postgres-policy";
94
+ readonly name: string;
95
+ readonly prefix?: string;
96
+ readonly tableName: string;
97
+ readonly namespaceId: string;
98
+ readonly operation: RlsPolicyOperation;
99
+ readonly roles: readonly string[];
100
+ readonly using?: string;
101
+ readonly withCheck?: string;
102
+ readonly permissive: boolean;
103
+ /** See {@link PostgresPolicySchemaNodeInput.dependsOn}. Non-enumerable so it stays out of JSON and structural equality, matching `SqlColumnIR.codecRef`. */
104
+ readonly dependsOn?: readonly SchemaNodeRef[];
105
+ constructor(input: PostgresPolicySchemaNodeInput);
106
+ get id(): string;
107
+ children(): readonly DiffableNode[];
108
+ isEqualTo(other: DiffableNode): boolean;
109
+ /**
110
+ * The single policy content-equality relation — the exact-mode
111
+ * {@link isEqualTo} and the planner's rename content-pairing both call
112
+ * this rather than growing a parallel relation: `operation` and
113
+ * `permissive` strict, `roles` compared deduplicated-and-sorted (the same
114
+ * set semantics as the wire-hash tuple, so the two never disagree),
115
+ * `using`/`withCheck` VERBATIM byte-for-byte with absent ≡ empty —
116
+ * deliberately NOT the normalized wire-hash bodies.
117
+ */
118
+ contentEquals(other: PostgresPolicySchemaNode): boolean;
119
+ static is(node: SqlSchemaIRNode): node is PostgresPolicySchemaNode;
120
+ static assert(node: SqlSchemaIRNode | undefined): asserts node is PostgresPolicySchemaNode;
121
+ }
122
+ //#endregion
123
+ //#region src/core/schema-ir/postgres-table-schema-node.d.ts
124
+ interface PostgresTableSchemaNodeInput extends SqlTableIRInput {
125
+ readonly policies?: readonly PostgresPolicySchemaNode[];
126
+ /**
127
+ * Whether row-level security is enabled on this table. Expected side:
128
+ * stamped from the contract's `entries.rls` marker (never from the
129
+ * policy set). Actual side: stamped from `pg_class.relrowsecurity` at
130
+ * introspection. Required with no default so every construction site
131
+ * supplies a deliberate value.
132
+ */
133
+ readonly rlsEnabled: boolean;
134
+ }
135
+ /**
136
+ * Postgres-specific table schema-diff node. Carries all `SqlTableIR` fields
137
+ * plus `policies`, and implements `DiffableNode` so the table instance is
138
+ * directly the diff-tree node — no separate wrapper needed.
139
+ *
140
+ * Extends `SqlSchemaIRNode` directly rather than `SqlTableIR` because
141
+ * `SqlTableIR` calls `freezeNode` in its own constructor, which prevents
142
+ * subclass field initialisation.
143
+ *
144
+ * `id` is the table name. `isEqualTo` compares id + `rlsEnabled` — the
145
+ * table's one own diffable attribute; all other structural drift is
146
+ * expressed by its children. `children()` returns every column, the primary
147
+ * key (when present), every foreign key, unique, index, and check constraint,
148
+ * plus the policy nodes — one flat list, so a drifted column and a drifted
149
+ * policy are both reported by the same walk. Order is deterministic (object
150
+ * key order for columns, array order for the rest) so two structurally equal
151
+ * tables always produce the same child list.
152
+ */
153
+ declare class PostgresTableSchemaNode extends SqlSchemaIRNode implements DiffableNode {
154
+ readonly nodeKind: "postgres-table";
155
+ readonly name: string;
156
+ readonly columns: Readonly<Record<string, SqlColumnIR>>;
157
+ readonly foreignKeys: ReadonlyArray<SqlForeignKeyIR>;
158
+ readonly uniques: ReadonlyArray<SqlUniqueIR>;
159
+ readonly indexes: ReadonlyArray<SqlIndexIR>;
160
+ readonly primaryKey?: PrimaryKey;
161
+ readonly annotations?: SqlAnnotations;
162
+ readonly checks?: ReadonlyArray<SqlCheckConstraintIR>;
163
+ readonly policies: readonly PostgresPolicySchemaNode[];
164
+ readonly rlsEnabled: boolean;
165
+ constructor(input: PostgresTableSchemaNodeInput);
166
+ get id(): string;
167
+ /**
168
+ * Equal iff the ids (names) match AND `rlsEnabled` matches — the table's
169
+ * one own attribute in the diff; all other structural drift is expressed
170
+ * by children. A paired `not-equal` therefore always means enablement
171
+ * drift, which the planner maps to ENABLE/DISABLE ROW LEVEL SECURITY.
172
+ */
173
+ isEqualTo(other: DiffableNode): boolean;
174
+ children(): readonly DiffableNode[];
175
+ static is(node: SqlSchemaIRNode): node is PostgresTableSchemaNode;
176
+ static assert(node: SqlSchemaIRNode): asserts node is PostgresTableSchemaNode;
177
+ }
178
+ //#endregion
179
+ //#region src/core/schema-ir/postgres-namespace-schema-node.d.ts
180
+ interface PostgresNamespaceSchemaNodeInput {
181
+ readonly schemaName: string;
182
+ readonly tables: Readonly<Record<string, PostgresTableSchemaNode>>;
183
+ /**
184
+ * The native-enum diff nodes belonging to this namespace, member values in
185
+ * `pg_enum.enumsortorder` (declaration) order. The expected
186
+ * (contract-projected) side attaches each node's `control` (the contract
187
+ * entity's grade); introspection builds nodes with no `control`.
188
+ */
189
+ readonly nativeEnums?: readonly PostgresNativeEnumSchemaNode[];
190
+ }
191
+ /**
192
+ * One-per-Postgres-schema diff-tree node. Groups the tables belonging to a
193
+ * single namespace. Per-schema consumers (the relational planner,
194
+ * toSchemaView) read this node's `tables` field structurally via
195
+ * `blindCast`/`SqlSchemaIRNode` — not through a static `SqlSchemaIR`
196
+ * assignment — because `nodeKind` carries this node's own literal
197
+ * (`postgres-namespace`), distinct from `SqlSchemaIR`'s own (`sql-schema`).
198
+ *
199
+ * `id` is the schema name; `isEqualTo` is identity on it; `children()` returns
200
+ * the table nodes plus `nativeEnums`.
201
+ *
202
+ * `nativeEnums` is the diff-tree representation of native enum types the
203
+ * differ pairs — the sole enum carrier, built directly by both sides: the
204
+ * expected (contract-projected) side and introspection alike hand in
205
+ * `PostgresNativeEnumSchemaNode`s.
206
+ */
207
+ declare class PostgresNamespaceSchemaNode extends SqlSchemaIRNode implements DiffableNode {
208
+ readonly nodeKind: "postgres-namespace";
209
+ readonly schemaName: string;
210
+ readonly tables: Readonly<Record<string, PostgresTableSchemaNode>>;
211
+ readonly nativeEnums: readonly PostgresNativeEnumSchemaNode[];
212
+ constructor(input: PostgresNamespaceSchemaNodeInput);
213
+ get id(): string;
214
+ isEqualTo(other: DiffableNode): boolean;
215
+ children(): readonly DiffableNode[];
216
+ static is(node: SqlSchemaIRNode): node is PostgresNamespaceSchemaNode;
217
+ static assert(node: SqlSchemaIRNode): asserts node is PostgresNamespaceSchemaNode;
218
+ }
219
+ //#endregion
220
+ //#region src/core/schema-ir/postgres-role-schema-node.d.ts
221
+ interface PostgresRoleSchemaNodeInput {
222
+ readonly name: string;
223
+ /**
224
+ * Namespace coordinate. Roles are cluster-scoped; callers pass
225
+ * `UNBOUND_NAMESPACE_ID` from `@internal/framework-components/ir`.
226
+ */
227
+ readonly namespaceId: string;
228
+ }
229
+ /**
230
+ * Schema-diff leaf node for a Postgres database role.
231
+ *
232
+ * This is a derived, transient node walked by the differ — it is NEVER serialized.
233
+ * Built by project-from-contract and project-from-database from their respective
234
+ * `PostgresRole` contract entities / introspected rows.
235
+ *
236
+ * Roles are cluster-scoped, so `id` is the bare role name. The differ pairs
237
+ * siblings by `(nodeKind, id)`, so a role and a namespace may share a name
238
+ * (role `public`, schema `public`) without colliding. `isEqualTo` compares
239
+ * ids — name-equality is role-equality for cluster-scoped objects.
240
+ */
241
+ declare class PostgresRoleSchemaNode extends SqlSchemaIRNode implements DiffableNode {
242
+ readonly nodeKind: "postgres-role";
243
+ readonly name: string;
244
+ readonly namespaceId: string;
245
+ constructor(input: PostgresRoleSchemaNodeInput);
246
+ get id(): string;
247
+ children(): readonly DiffableNode[];
248
+ isEqualTo(other: DiffableNode): boolean;
249
+ static is(node: SqlSchemaIRNode): node is PostgresRoleSchemaNode;
250
+ static assert(node: SqlSchemaIRNode): asserts node is PostgresRoleSchemaNode;
251
+ }
252
+ //#endregion
253
+ //#region src/core/schema-ir/postgres-database-schema-node.d.ts
254
+ interface PostgresDatabaseSchemaNodeInput {
255
+ readonly namespaces: Readonly<Record<string, PostgresNamespaceSchemaNode>>;
256
+ readonly roles: readonly PostgresRoleSchemaNode[];
257
+ readonly existingSchemas: readonly string[];
258
+ readonly pgVersion: string;
259
+ }
260
+ /**
261
+ * The root of the Postgres schema-diff tree: one node per database.
262
+ *
263
+ * `id` is the fixed sentinel `'database'` — the root has no siblings and
264
+ * the value is never emitted into migration paths. `isEqualTo` is identity
265
+ * (roots always share the `'database'` id). `children()` yields the namespace
266
+ * nodes followed by the role nodes — both are root-level diff subjects. The
267
+ * differ pairs siblings by `(nodeKind, id)`, so a role and a namespace may
268
+ * share a name without colliding.
269
+ */
270
+ declare class PostgresDatabaseSchemaNode extends SqlSchemaIRNode implements DiffableNode {
271
+ readonly nodeKind: "postgres-database";
272
+ readonly namespaces: Readonly<Record<string, PostgresNamespaceSchemaNode>>;
273
+ readonly roles: readonly PostgresRoleSchemaNode[];
274
+ readonly existingSchemas: readonly string[];
275
+ readonly pgVersion: string;
276
+ constructor(input: PostgresDatabaseSchemaNodeInput);
277
+ get id(): string;
278
+ isEqualTo(other: DiffableNode): boolean;
279
+ children(): readonly DiffableNode[];
280
+ static is(node: SqlSchemaIRNode): node is PostgresDatabaseSchemaNode;
281
+ static assert(node: SqlSchemaIRNode): asserts node is PostgresDatabaseSchemaNode;
282
+ }
283
+ //#endregion
284
+ export { PostgresNativeEnumSchemaNode as a, PostgresPolicySchemaNodeInput as c, PostgresTableSchemaNode as d, PostgresTableSchemaNodeInput as f, PostgresNamespaceSchemaNodeInput as i, PostgresRoleSchemaNode as l, PostgresDatabaseSchemaNodeInput as n, PostgresNativeEnumSchemaNodeInput as o, PostgresNamespaceSchemaNode as r, PostgresPolicySchemaNode as s, PostgresDatabaseSchemaNode as t, PostgresRoleSchemaNodeInput as u };
285
+ //# sourceMappingURL=postgres-database-schema-node-CyfpHXDr-BqyozkQE.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postgres-database-schema-node-CyfpHXDr-BqyozkQE.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/postgres-database-schema-node-CyfpHXDr.d.mts"],"mappings":";;;;;;;UAMU;;WAEC;;WAEA;;WAEA;;WAEA,UAAU;;;;;;;;;;;;;;;;;;;;;cAqBP,qCAAqC,2BAA2B;WACnE;WACA;WACA;WACA;WACA,UAAU;EACnB,YAAY,OAAO;MACf;EACJ,qBAAqB;EACrB,UAAU,OAAO;SACV,GAAG,MAAM,kBAAkB,QAAQ;SACnC,OAAO,MAAM,0BAA0B,QAAQ;;;;UAI9C;;WAEC,QAAQ;;WAER;;WAEA;WACA,WAAW;;WAEX;;WAEA;;WAEA;;WAEA;;;;;;;WAOA,oBAAoB;;;;;;;;;;;;;;;;;;cAkBjB,iCAAiC,2BAA2B;WAC/D;WACA;WACA;WACA;WACA;WACA,WAAW;WACX;WACA;WACA;WACA;;WAEA,qBAAqB;EAC9B,YAAY,OAAO;MACf;EACJ,qBAAqB;EACrB,UAAU,OAAO;;;;;;;;;;EAUjB,cAAc,OAAO;SACd,GAAG,MAAM,kBAAkB,QAAQ;SACnC,OAAO,MAAM,sCAAsC,QAAQ;;;;UAI1D,qCAAqC;WACpC,oBAAoB;;;;;;;;WAQpB;;;;;;;;;;;;;;;;;;;;cAoBG,gCAAgC,2BAA2B;WAC9D;WACA;WACA,SAAS,SAAS,eAAe;WACjC,aAAa,cAAc;WAC3B,SAAS,cAAc;WACvB,SAAS,cAAc;WACvB,aAAa;WACb,cAAc;WACd,SAAS,cAAc;WACvB,mBAAmB;WACnB;EACT,YAAY,OAAO;MACf;;;;;;;EAOJ,UAAU,OAAO;EACjB,qBAAqB;SACd,GAAG,MAAM,kBAAkB,QAAQ;SACnC,OAAO,MAAM,0BAA0B,QAAQ;;;;UAI9C;WACC;WACA,QAAQ,SAAS,eAAe;;;;;;;WAOhC,uBAAuB;;;;;;;;;;;;;;;;;;cAkBpB,oCAAoC,2BAA2B;WAClE;WACA;WACA,QAAQ,SAAS,eAAe;WAChC,sBAAsB;EAC/B,YAAY,OAAO;MACf;EACJ,UAAU,OAAO;EACjB,qBAAqB;SACd,GAAG,MAAM,kBAAkB,QAAQ;SACnC,OAAO,MAAM,0BAA0B,QAAQ;;;;UAI9C;WACC;;;;;WAKA;;;;;;;;;;;;;;cAcG,+BAA+B,2BAA2B;WAC7D;WACA;WACA;EACT,YAAY,OAAO;MACf;EACJ,qBAAqB;EACrB,UAAU,OAAO;SACV,GAAG,MAAM,kBAAkB,QAAQ;SACnC,OAAO,MAAM,0BAA0B,QAAQ;;;;UAI9C;WACC,YAAY,SAAS,eAAe;WACpC,gBAAgB;WAChB;WACA;;;;;;;;;;;;cAYG,mCAAmC,2BAA2B;WACjE;WACA,YAAY,SAAS,eAAe;WACpC,gBAAgB;WAChB;WACA;EACT,YAAY,OAAO;MACf;EACJ,UAAU,OAAO;EACjB,qBAAqB;SACd,GAAG,MAAM,kBAAkB,QAAQ;SACnC,OAAO,MAAM,0BAA0B,QAAQ"}
@@ -0,0 +1,260 @@
1
+ import { r as RenderedRlsPolicyLiteral } from "./postgres-rls-policy-CnDxf3z9-C3LIHAIG.mjs";
2
+ import { t as PostgresPlanTargetDetails } from "./planner-target-details-HkP4RrRO-_xPQVPF0.mjs";
3
+ import { n as DataTransformOptions } from "./data-transform-Ck5FbyNO-BNE7QlAo.mjs";
4
+ import { f as CreateIndexExtras, k as ForeignKeySpec, l as AlterColumnTypeOptions } from "./op-factory-call-jd4cgfjA-CyNT4YVn.mjs";
5
+ import { t as PostgresContractView } from "./postgres-contract-view-2OP5JnXl-D2fpy4-8.mjs";
6
+ import { DdlColumn, DdlTableConstraint } from "@prisma/orm-family-sql/relational-core/ast";
7
+ import { SqlStorage } from "@prisma/orm-family-sql/contract/types";
8
+ import { ControlStack } from "@prisma/orm-framework/components/control";
9
+ import { SqlMigrationPlanOperation } from "@prisma/orm-family-sql/family/control";
10
+ import { Migration } from "@prisma/orm-family-sql/family/migration";
11
+ import { Contract } from "@prisma/orm-framework/contract/types";
12
+ import { SqlControlAdapter } from "@prisma/orm-family-sql/family/control-adapter";
13
+ //#region ../../../3-targets/3-targets/postgres/dist/postgres-migration-CDJj7CvD.d.mts
14
+ //#region src/core/migrations/postgres-migration.d.ts
15
+ /**
16
+ * Target-owned base class for Postgres migrations.
17
+ *
18
+ * Fixes the `SqlMigration` generic to `PostgresPlanTargetDetails` and the
19
+ * abstract `targetId` to the Postgres target-id string literal, so both
20
+ * user-authored migrations and renderer-generated scaffolds (the output of
21
+ * `renderCallsToTypeScript`) can extend `PostgresMigration` directly without
22
+ * redeclaring target-local identity.
23
+ *
24
+ * Mirrors `MongoMigration` in `@internal/family-mongo`: the renderer
25
+ * emits `extends Migration` against a facade re-export of this class
26
+ * from `@internal/postgres/migration`, keeping the authoring surface
27
+ * target-scoped rather than family-scoped.
28
+ *
29
+ * The constructor materializes a single Postgres `SqlControlAdapter` from
30
+ * `stack.adapter.create(stack)` and stores it; the protected `dataTransform`
31
+ * instance method forwards to the free `dataTransform` factory with that
32
+ * stored adapter, so user migrations can write `this.dataTransform(...)`
33
+ * without threading the adapter through every call.
34
+ *
35
+ * Every method requires an explicit `schema`. Postgres migrations name their
36
+ * schema deliberately — there is no default and no `search_path`-relative
37
+ * option. A migration that left the schema unspecified would resolve against
38
+ * whatever `search_path` the connection happened to carry, and that ambiguity
39
+ * is an antipattern in a migration. (The unbound/unspecified namespace concept
40
+ * remains for SQLite, which has no schemas, and for Mongo's connection `db`.)
41
+ */
42
+ declare abstract class PostgresMigration<Start extends Contract<SqlStorage> = Contract<SqlStorage>, End extends Contract<SqlStorage> = Contract<SqlStorage>> extends Migration<PostgresPlanTargetDetails, 'postgres', Start, End> {
43
+ #private;
44
+ readonly targetId: "postgres";
45
+ /**
46
+ * Materialized Postgres control adapter, created once per migration
47
+ * instance from the injected stack. `undefined` only when the migration
48
+ * was instantiated without a stack (test fixtures); `controlAdapterFor`
49
+ * throws a MIGRATION.POSTGRES_CONTROL_STACK_MISSING in that case to surface the misuse.
50
+ */
51
+ protected readonly controlAdapter: SqlControlAdapter<'postgres'> | undefined;
52
+ constructor(stack?: ControlStack<'sql', 'postgres'>);
53
+ /**
54
+ * Returns the materialized control adapter, or throws a MIGRATION.POSTGRES_CONTROL_STACK_MISSING naming
55
+ * `operation` when the migration was constructed without a `ControlStack`.
56
+ * Single home for the null-check that every DDL/DML method shares.
57
+ */
58
+ private controlAdapterFor;
59
+ /**
60
+ * The typed, schema-qualified Postgres view over this migration's end-state
61
+ * contract — `this.endContract.namespace.<schema>.table.<name>`, etc. Throws
62
+ * if no `endContractJson` was provided.
63
+ */
64
+ get endContract(): PostgresContractView<End>;
65
+ /**
66
+ * The typed Postgres view over this migration's start-state contract, or
67
+ * `null` for a baseline migration (no `startContractJson`).
68
+ */
69
+ get startContract(): PostgresContractView<Start> | null;
70
+ /**
71
+ * Instance-method wrapper around the free `dataTransform` factory that
72
+ * supplies the stored control adapter. Authors call this from inside
73
+ * `get operations()`; the adapter argument is hidden from the call site.
74
+ */
75
+ protected dataTransform<TContract extends Contract<SqlStorage>>(contract: TContract, name: string, options: DataTransformOptions): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
76
+ /**
77
+ * Emit a `CREATE TABLE` migration operation. Builds a typed DDL node from
78
+ * the supplied options and lowers it through the stored control adapter.
79
+ * Throws if no adapter is present (i.e. migration instantiated without a stack).
80
+ */
81
+ protected createTable(options: {
82
+ readonly schema: string;
83
+ readonly table: string;
84
+ readonly ifNotExists?: boolean;
85
+ readonly columns: readonly DdlColumn[];
86
+ readonly constraints?: readonly DdlTableConstraint[];
87
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
88
+ /**
89
+ * Emit a `CREATE SCHEMA` migration operation. Builds a typed DDL node from
90
+ * the supplied options and lowers it through the stored control adapter.
91
+ * Throws if no adapter is present (i.e. migration instantiated without a stack).
92
+ */
93
+ protected createSchema(options: {
94
+ readonly schema: string;
95
+ readonly ifNotExists?: boolean;
96
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
97
+ /**
98
+ * Emit a `CREATE TYPE ... AS ENUM (...)` migration operation for a managed
99
+ * native enum. Builds a typed DDL node and lowers it through the stored
100
+ * control adapter (members render in declaration order). Throws if no adapter
101
+ * is present.
102
+ */
103
+ protected createNativeEnumType(options: {
104
+ readonly schema: string;
105
+ readonly typeName: string;
106
+ readonly members: readonly string[];
107
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
108
+ /**
109
+ * Emit a `DROP TYPE` migration operation for a managed native enum, lowered
110
+ * through the stored control adapter. Throws if no adapter is present.
111
+ */
112
+ protected dropNativeEnumType(options: {
113
+ readonly schema: string;
114
+ readonly typeName: string;
115
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
116
+ /**
117
+ * Emit an `ALTER TYPE ... ADD VALUE` migration operation appending one
118
+ * member to a managed native enum, lowered through the stored control
119
+ * adapter. Throws if no adapter is present. Every appended value is its
120
+ * own operation — call this once per value to append more than one.
121
+ */
122
+ protected addNativeEnumValue(options: {
123
+ readonly schema: string;
124
+ readonly typeName: string;
125
+ readonly value: string;
126
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
127
+ protected addColumn(options: {
128
+ readonly schema: string;
129
+ readonly table: string;
130
+ readonly column: DdlColumn;
131
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
132
+ protected addPrimaryKey(options: {
133
+ readonly schema: string;
134
+ readonly table: string;
135
+ readonly constraint: string;
136
+ readonly columns: readonly string[];
137
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
138
+ protected addUnique(options: {
139
+ readonly schema: string;
140
+ readonly table: string;
141
+ readonly constraint: string;
142
+ readonly columns: readonly string[];
143
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
144
+ protected addForeignKey(options: {
145
+ readonly schema: string;
146
+ readonly table: string;
147
+ readonly foreignKey: ForeignKeySpec;
148
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
149
+ protected addCheckConstraint(options: {
150
+ readonly schema: string;
151
+ readonly table: string;
152
+ readonly constraint: string;
153
+ readonly column: string;
154
+ readonly values: readonly string[];
155
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
156
+ protected dropCheckConstraint(options: {
157
+ readonly schema: string;
158
+ readonly table: string;
159
+ readonly constraint: string;
160
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
161
+ protected dropConstraint(options: {
162
+ readonly schema: string;
163
+ readonly table: string;
164
+ readonly constraint: string;
165
+ readonly kind?: 'foreignKey' | 'unique' | 'primaryKey';
166
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
167
+ protected dropTable(options: {
168
+ readonly schema: string;
169
+ readonly table: string;
170
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
171
+ protected dropColumn(options: {
172
+ readonly schema: string;
173
+ readonly table: string;
174
+ readonly column: string;
175
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
176
+ protected alterColumnType(options: {
177
+ readonly schema: string;
178
+ readonly table: string;
179
+ readonly column: string;
180
+ readonly options: AlterColumnTypeOptions;
181
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
182
+ protected setNotNull(options: {
183
+ readonly schema: string;
184
+ readonly table: string;
185
+ readonly column: string;
186
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
187
+ protected dropNotNull(options: {
188
+ readonly schema: string;
189
+ readonly table: string;
190
+ readonly column: string;
191
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
192
+ protected setDefault(options: {
193
+ readonly schema: string;
194
+ readonly table: string;
195
+ readonly column: string;
196
+ readonly defaultSql: string;
197
+ readonly operationClass?: 'additive' | 'widening';
198
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
199
+ protected dropDefault(options: {
200
+ readonly schema: string;
201
+ readonly table: string;
202
+ readonly column: string;
203
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
204
+ protected createIndex(options: {
205
+ readonly schema: string;
206
+ readonly table: string;
207
+ readonly index: string;
208
+ readonly extras?: CreateIndexExtras;
209
+ } & ({
210
+ readonly columns: readonly string[];
211
+ readonly expression?: never;
212
+ } | {
213
+ readonly expression: string;
214
+ readonly columns?: never;
215
+ })): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
216
+ protected renameIndex(options: {
217
+ readonly schema: string;
218
+ readonly table: string;
219
+ readonly from: string;
220
+ readonly to: string;
221
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
222
+ protected dropIndex(options: {
223
+ readonly schema: string;
224
+ readonly table: string;
225
+ readonly index: string;
226
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
227
+ protected installExtension(options: {
228
+ readonly extensionName: string;
229
+ readonly invariantId: string;
230
+ readonly id: string;
231
+ readonly label?: string;
232
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
233
+ protected enableRowLevelSecurity(options: {
234
+ readonly schema: string;
235
+ readonly table: string;
236
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
237
+ protected disableRowLevelSecurity(options: {
238
+ readonly schema: string;
239
+ readonly table: string;
240
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
241
+ protected createRlsPolicy(options: {
242
+ readonly schema: string;
243
+ readonly table: string;
244
+ readonly policy: RenderedRlsPolicyLiteral;
245
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
246
+ protected dropRlsPolicy(options: {
247
+ readonly schema: string;
248
+ readonly table: string;
249
+ readonly policy: string;
250
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
251
+ protected renameRlsPolicy(options: {
252
+ readonly schema: string;
253
+ readonly table: string;
254
+ readonly from: string;
255
+ readonly to: string;
256
+ }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>>;
257
+ }
258
+ //#endregion
259
+ export { PostgresMigration as t };
260
+ //# sourceMappingURL=postgres-migration-CDJj7CvD-Bsqs_fVo.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"postgres-migration-CDJj7CvD-Bsqs_fVo.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/postgres-migration-CDJj7CvD.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uBAwCuB,kBAAkB,cAAc,SAAS,cAAc,SAAS,aAAa,YAAY,SAAS,cAAc,SAAS,qBAAqB,UAAU,uCAAuC,OAAO;;WAElN;;;;;;;qBAOU,gBAAgB;EACnC,YAAY,QAAQ;;;;;;UAMZ;;;;;;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,0BAA0B;;;;;;YAM5B,aAAa;aACZ;aACA;MACP,QAAQ,0BAA0B;;;;;;;YAO5B,qBAAqB;aACpB;aACA;aACA;MACP,QAAQ,0BAA0B;;;;;YAK5B,mBAAmB;aAClB;aACA;MACP,QAAQ,0BAA0B;;;;;;;YAO5B,mBAAmB;aAClB;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,UAAU;aACT;aACA;aACA,QAAQ;MACf,QAAQ,0BAA0B;YAC5B,cAAc;aACb;aACA;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,UAAU;aACT;aACA;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,cAAc;aACb;aACA;aACA,YAAY;MACnB,QAAQ,0BAA0B;YAC5B,mBAAmB;aAClB;aACA;aACA;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,oBAAoB;aACnB;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,eAAe;aACd;aACA;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,UAAU;aACT;aACA;MACP,QAAQ,0BAA0B;YAC5B,WAAW;aACV;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,gBAAgB;aACf;aACA;aACA;aACA,SAAS;MAChB,QAAQ,0BAA0B;YAC5B,WAAW;aACV;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,YAAY;aACX;aACA;aACA;MACP,QAAQ,0BAA0B;YAC5B,WAAW;aACV;aACA;aACA;aACA;aACA;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"}