@prisma/orm-target-postgres 8.0.0-rc.24-dev.27 → 8.0.0-rc.24-dev.29
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.
- package/README.md +2 -0
- package/dist/{adapter-BQExUKg6.d.mts → adapter-3sYdoTej.d.mts} +2 -2
- package/dist/{adapter-BQExUKg6.d.mts.map → adapter-3sYdoTej.d.mts.map} +1 -1
- package/dist/{adapter-B2zr93n1-DA67Xn-f.mjs → adapter-VDAs5CMq-OezO60C5.mjs} +6 -6
- package/dist/{adapter-B2zr93n1-DA67Xn-f.mjs.map → adapter-VDAs5CMq-OezO60C5.mjs.map} +1 -1
- package/dist/adapter.d.mts +5 -5
- package/dist/adapter.mjs +5 -5
- package/dist/adapter__adapter.d.mts +1 -1
- package/dist/adapter__adapter.mjs +2 -2
- package/dist/adapter__control.d.mts +3 -3
- package/dist/adapter__control.mjs +4 -4
- package/dist/adapter__control.mjs.map +1 -1
- package/dist/adapter__runtime.mjs +5 -5
- package/dist/adapter__runtime.mjs.map +1 -1
- package/dist/adapter__sql-renderer.mjs +1 -1
- package/dist/adapter__types.d.mts +2 -2
- package/dist/{authoring-DPwc7x9U-BZkXpPSH.mjs → authoring-4dCWsSXg-DeIEoQWg.mjs} +7 -7
- package/dist/authoring-4dCWsSXg-DeIEoQWg.mjs.map +1 -0
- package/dist/{autoincrement-widths-PwZcc5Co-1O2WEMYq.mjs → autoincrement-widths-BZUr8bLa-Dqtjwcf-.mjs} +3 -3
- package/dist/{autoincrement-widths-PwZcc5Co-1O2WEMYq.mjs.map → autoincrement-widths-BZUr8bLa-Dqtjwcf-.mjs.map} +1 -1
- package/dist/{check-expressions-Ch-A_NJN-BscDa8xT.mjs → check-expressions-cvFP1EFS-CPLt6x-O.mjs} +3 -3
- package/dist/{check-expressions-Ch-A_NJN-BscDa8xT.mjs.map → check-expressions-cvFP1EFS-CPLt6x-O.mjs.map} +1 -1
- package/dist/{codec-registry-B0LsFn7Z-ej9yKwTq.mjs → codec-registry-FvoD6sJj-ClHgHbyf.mjs} +4 -4
- package/dist/{codec-registry-B0LsFn7Z-ej9yKwTq.mjs.map → codec-registry-FvoD6sJj-ClHgHbyf.mjs.map} +1 -1
- package/dist/{codec-type-map-C_5OBkHw-DZ0UDSJr.d.mts → codec-type-map-CE_EveiY-S4IH6WPx.d.mts} +3 -3
- package/dist/{codec-type-map-C_5OBkHw-DZ0UDSJr.d.mts.map → codec-type-map-CE_EveiY-S4IH6WPx.d.mts.map} +1 -1
- package/dist/{codec-types-xyW4TiJD-CRDK7QcS.d.mts → codec-types-B-OBDw_P-CBflZnmD.d.mts} +4 -4
- package/dist/{codec-types-xyW4TiJD-CRDK7QcS.d.mts.map → codec-types-B-OBDw_P-CBflZnmD.d.mts.map} +1 -1
- package/dist/codec-types-V7HlwAkU.d.mts +2 -0
- package/dist/{codecs-Bzj3M0Q3-C2oFSIGs.mjs → codecs-B2C2j2Un-Dc-aGN1s.mjs} +12 -11
- package/dist/codecs-B2C2j2Un-Dc-aGN1s.mjs.map +1 -0
- package/dist/{codecs-BZ74mlUI.d.mts → codecs-B6fSK4Rr.d.mts} +2 -2
- package/dist/{codecs-BZ74mlUI.d.mts.map → codecs-B6fSK4Rr.d.mts.map} +1 -1
- package/dist/{codecs-3AVVZDao-C0sUjmuO.d.mts → codecs-BttOxm7v-Bg7ybHIE.d.mts} +3 -3
- package/dist/{codecs-3AVVZDao-C0sUjmuO.d.mts.map → codecs-BttOxm7v-Bg7ybHIE.d.mts.map} +1 -1
- package/dist/{contract-contributions-Bc0_64Gr-KE0qggZv.mjs → contract-contributions-DG0aJRRu-31YCQkp-.mjs} +54 -39
- package/dist/contract-contributions-DG0aJRRu-31YCQkp-.mjs.map +1 -0
- package/dist/{contract-free-DiRem1nw.mjs → contract-free-dQ4A6kPg.mjs} +3 -3
- package/dist/{contract-free-DiRem1nw.mjs.map → contract-free-dQ4A6kPg.mjs.map} +1 -1
- package/dist/{control-B-0_CuJt.d.mts → control-Bbb6l2oc.d.mts} +3 -3
- package/dist/{control-B-0_CuJt.d.mts.map → control-Bbb6l2oc.d.mts.map} +1 -1
- package/dist/{control-j5GEV5-D.d.mts → control-BhtDvy9Z.d.mts} +2 -2
- package/dist/{control-j5GEV5-D.d.mts.map → control-BhtDvy9Z.d.mts.map} +1 -1
- package/dist/{control-policy-DKnVhEWD-xuJIvCy9.mjs → control-policy-Crcjg7Vz-39_fO8yR.mjs} +11 -11
- package/dist/{control-policy-DKnVhEWD-xuJIvCy9.mjs.map → control-policy-Crcjg7Vz-39_fO8yR.mjs.map} +1 -1
- package/dist/{data-transform-2o0tpMs8-DADYIvEZ.d.mts → data-transform-BZ6kzJY4-DZBRydhx.d.mts} +3 -3
- package/dist/{data-transform-2o0tpMs8-DADYIvEZ.d.mts.map → data-transform-BZ6kzJY4-DZBRydhx.d.mts.map} +1 -1
- package/dist/data-transform-Cg3syfOe.d.mts +1 -0
- package/dist/{data-type-entries-CVxsfjF3-Bd0cSfuG.mjs → data-type-entries-CKHtbfmn-DBNF36FF.mjs} +3 -3
- package/dist/{data-type-entries-CVxsfjF3-Bd0cSfuG.mjs.map → data-type-entries-CKHtbfmn-DBNF36FF.mjs.map} +1 -1
- package/dist/{data-types-DWfwErIu-DF85cgmu.mjs → data-types-DgYRia-g-B_BFlAC3.mjs} +8 -9
- package/dist/data-types-DgYRia-g-B_BFlAC3.mjs.map +1 -0
- package/dist/{date-time-now-generators-BORO1_nc-BdCe3ppq.mjs → date-time-now-generators-DylEKfQR-CYbXE0y0.mjs} +5 -8
- package/dist/date-time-now-generators-DylEKfQR-CYbXE0y0.mjs.map +1 -0
- package/dist/{ddl-DCQLfg18-BgWGYC7L.mjs → ddl-Cy_8QS23-D9EVihrI.mjs} +3 -3
- package/dist/{ddl-DCQLfg18-BgWGYC7L.mjs.map → ddl-Cy_8QS23-D9EVihrI.mjs.map} +1 -1
- package/dist/{descriptor-meta-46EhsECb-C5EGe36u.mjs → descriptor-meta-CakMYWwZ-DSQNCwWB.mjs} +13 -12
- package/dist/descriptor-meta-CakMYWwZ-DSQNCwWB.mjs.map +1 -0
- package/dist/{descriptor-meta-DUDk-DLN-B_WUfFf7.mjs → descriptor-meta-DwXEu6Ap-qDhyaRK4.mjs} +8 -7
- package/dist/descriptor-meta-DwXEu6Ap-qDhyaRK4.mjs.map +1 -0
- package/dist/{diff-database-schema-BJKAfPAG-LCJmdiQq.mjs → diff-database-schema-CVmwyjFf-DSWPpd4M.mjs} +10 -10
- package/dist/{diff-database-schema-BJKAfPAG-LCJmdiQq.mjs.map → diff-database-schema-CVmwyjFf-DSWPpd4M.mjs.map} +1 -1
- package/dist/{diff-database-schema-rhLkiByE.d.mts → diff-database-schema-NiGuGt9b.d.mts} +2 -2
- package/dist/{diff-database-schema-rhLkiByE.d.mts.map → diff-database-schema-NiGuGt9b.d.mts.map} +1 -1
- package/dist/driver.mjs +1 -1
- package/dist/driver__runtime.mjs +1 -1
- package/dist/{errors-C4-Dp3gI-B5jY5eJj.mjs → errors-DxWL0CMX-BQe7Wfvt.mjs} +8 -7
- package/dist/{errors-C4-Dp3gI-B5jY5eJj.mjs.map → errors-DxWL0CMX-BQe7Wfvt.mjs.map} +1 -1
- package/dist/{full-text-oDBhUHI5.mjs → full-text-Bu_qI2ue.mjs} +3 -3
- package/dist/{full-text-oDBhUHI5.mjs.map → full-text-Bu_qI2ue.mjs.map} +1 -1
- package/dist/{full-text-collection-method-CtUV9NT0-CQuFZ4aH.d.mts → full-text-collection-method-Dc6I12lP-BFkF4drB.d.mts} +4 -4
- package/dist/full-text-collection-method-Dc6I12lP-BFkF4drB.d.mts.map +1 -0
- package/dist/{full-text-index-definition-DzRCaPjb-0USKN1ZI.mjs → full-text-index-definition-MMcQF3_0-wRCz2FDP.mjs} +3 -3
- package/dist/{full-text-index-definition-DzRCaPjb-0USKN1ZI.mjs.map → full-text-index-definition-MMcQF3_0-wRCz2FDP.mjs.map} +1 -1
- package/dist/{full-text-DGueFVx9.d.mts → full-text-pZNF76pS.d.mts} +3 -3
- package/dist/{full-text-DGueFVx9.d.mts.map → full-text-pZNF76pS.d.mts.map} +1 -1
- package/dist/{full-text-parsers-BZV74MUg-TfQ8rvPW.mjs → full-text-parsers-m8GS0pst-C6RPRehL.mjs} +4 -4
- package/dist/{full-text-parsers-BZV74MUg-TfQ8rvPW.mjs.map → full-text-parsers-m8GS0pst-C6RPRehL.mjs.map} +1 -1
- package/dist/{full-text-search-document-BqqvjJoC-HaoeMaM5.mjs → full-text-search-document-B5VCeQFz-D4hKtj-M.mjs} +5 -5
- package/dist/{full-text-search-document-BqqvjJoC-HaoeMaM5.mjs.map → full-text-search-document-B5VCeQFz-D4hKtj-M.mjs.map} +1 -1
- package/dist/{index-types-DGrgbAd4-DuGWdvol.mjs → index-types-CiM75RsF-DhmXdi38.mjs} +3 -3
- package/dist/{index-types-DGrgbAd4-DuGWdvol.mjs.map → index-types-CiM75RsF-DhmXdi38.mjs.map} +1 -1
- package/dist/{indexes-ooG0J-V8-CTm1QvmZ.d.mts → indexes-pfYKpulO-BWj-l1W3.d.mts} +8 -4
- package/dist/indexes-pfYKpulO-BWj-l1W3.d.mts.map +1 -0
- package/dist/{infer-psl-contract-DqtogWJ8-CUXUG-wF.mjs → infer-psl-contract-DgQutzGt-C1wN72ZC.mjs} +9 -9
- package/dist/{infer-psl-contract-DqtogWJ8-CUXUG-wF.mjs.map → infer-psl-contract-DgQutzGt-C1wN72ZC.mjs.map} +1 -1
- package/dist/{issue-planner-BlN8mK4E.d.mts → issue-planner-GkMubzHu.d.mts} +7 -6
- package/dist/issue-planner-GkMubzHu.d.mts.map +1 -0
- package/dist/{migration-CovfYOjm.d.mts → migration-BRcETuO-.d.mts} +4 -4
- package/dist/migration-BRcETuO-.d.mts.map +1 -0
- package/dist/migration-Be_iuIpn.mjs.map +1 -1
- package/dist/{native-type-normalizer-PGvExTgu.mjs → native-type-normalizer-DY__fyaa.mjs} +2 -2
- package/dist/{native-type-normalizer-PGvExTgu.mjs.map → native-type-normalizer-DY__fyaa.mjs.map} +1 -1
- package/dist/{op-factory-call-CG80t74g-D9tjd13N.d.mts → op-factory-call-Bz6ft8sk-JjpSUMTb.d.mts} +22 -6
- package/dist/op-factory-call-Bz6ft8sk-JjpSUMTb.d.mts.map +1 -0
- package/dist/op-factory-call-COB28WBr.d.mts +1 -0
- package/dist/{op-factory-call-THEIwT0J-DQM3Y94S.mjs → op-factory-call-DvezqqJx-KBDyNT08.mjs} +239 -182
- package/dist/op-factory-call-DvezqqJx-KBDyNT08.mjs.map +1 -0
- package/dist/operation-types-CaLyyiOR.d.mts +1 -0
- package/dist/{operation-types-Cnw0XvnJ-BZax8w1C.d.mts → operation-types-Da5h_iSt-Dqe_QrW_.d.mts} +3 -3
- package/dist/{operation-types-Cnw0XvnJ-BZax8w1C.d.mts.map → operation-types-Da5h_iSt-Dqe_QrW_.d.mts.map} +1 -1
- package/dist/{pack-ReYuY9t5.d.mts → pack-Cg6Jolu1.d.mts} +5 -6
- package/dist/{pack-ReYuY9t5.d.mts.map → pack-Cg6Jolu1.d.mts.map} +1 -1
- package/dist/{planner-Bw0tlQWK.d.mts → planner-CTwe5ozf.d.mts} +6 -5
- package/dist/{planner-Bw0tlQWK.d.mts.map → planner-CTwe5ozf.d.mts.map} +1 -1
- package/dist/{planner-BHH46ndt-Q6-LPhnL.mjs → planner-D2T46plG-BChGUTOA.mjs} +189 -54
- package/dist/planner-D2T46plG-BChGUTOA.mjs.map +1 -0
- package/dist/{planner-ddl-builders-Ds3Xcsg7-5-bR7xgo.mjs → planner-ddl-builders-Blf3qKKf-BopCSwrT.mjs} +3 -3
- package/dist/{planner-ddl-builders-Ds3Xcsg7-5-bR7xgo.mjs.map → planner-ddl-builders-Blf3qKKf-BopCSwrT.mjs.map} +1 -1
- package/dist/{planner-identity-values-CQZbvcx0-BpAvjtip.mjs → planner-identity-values-CX3J2pLA-CjCpOnue.mjs} +3 -3
- package/dist/{planner-identity-values-CQZbvcx0-BpAvjtip.mjs.map → planner-identity-values-CX3J2pLA-CjCpOnue.mjs.map} +1 -1
- package/dist/{planner-produced-postgres-migration-FtUIqqVg-ouPTcZ8X.mjs → planner-produced-postgres-migration-BLKk9Vaz-CsUhcKp1.mjs} +7 -7
- package/dist/planner-produced-postgres-migration-BLKk9Vaz-CsUhcKp1.mjs.map +1 -0
- package/dist/planner-produced-postgres-migration-CDE9JowN.d.mts +1 -0
- package/dist/{planner-produced-postgres-migration-exqzWlvW-DGLu2dQ7.d.mts → planner-produced-postgres-migration-Jizp3q0s-D_Sq7rld.d.mts} +5 -6
- package/dist/planner-produced-postgres-migration-Jizp3q0s-D_Sq7rld.d.mts.map +1 -0
- package/dist/{planner-sql-checks-BOdYkh9L-hXxekxJX.mjs → planner-sql-checks-CzxowQml-moHPNh20.mjs} +5 -5
- package/dist/{planner-sql-checks-BOdYkh9L-hXxekxJX.mjs.map → planner-sql-checks-CzxowQml-moHPNh20.mjs.map} +1 -1
- package/dist/{planner-target-details-boDXR2s7-CExrk6rf.d.mts → planner-target-details-DywkQKS4-lZEm-EiF.d.mts} +3 -3
- package/dist/planner-target-details-DywkQKS4-lZEm-EiF.d.mts.map +1 -0
- package/dist/{postgres-codec-traits-D9YEvK6F-BsKaAhCA.mjs → postgres-codec-traits-YxSb5di3-9F5ofwnG.mjs} +3 -3
- package/dist/{postgres-codec-traits-D9YEvK6F-BsKaAhCA.mjs.map → postgres-codec-traits-YxSb5di3-9F5ofwnG.mjs.map} +1 -1
- package/dist/{postgres-contract-view-DtsmkyFX-Bas8oQiN.mjs → postgres-contract-view-DhDzWNCN-BA5OpwhY.mjs} +10 -10
- package/dist/postgres-contract-view-DhDzWNCN-BA5OpwhY.mjs.map +1 -0
- package/dist/{postgres-migration-DEkPcs8x-CLxAKfHm.d.mts → postgres-migration-6nN7HQlZ-Ca0thLBy.d.mts} +5 -5
- package/dist/{postgres-migration-DEkPcs8x-CLxAKfHm.d.mts.map → postgres-migration-6nN7HQlZ-Ca0thLBy.d.mts.map} +1 -1
- package/dist/{postgres-migration-D5lRerLT-DyYh8UPS.mjs → postgres-migration-DEa-g6j1-CoG3QOV3.mjs} +18 -16
- package/dist/postgres-migration-DEa-g6j1-CoG3QOV3.mjs.map +1 -0
- package/dist/{postgres-schema-zd_p5Lg2-BdJlG7Cg.mjs → postgres-schema-CIfq1AjC-CGiMjtSX.mjs} +4 -4
- package/dist/{postgres-schema-zd_p5Lg2-BdJlG7Cg.mjs.map → postgres-schema-CIfq1AjC-CGiMjtSX.mjs.map} +1 -1
- package/dist/{prisma7-binding-BGEW0R_9.mjs → prisma7-binding-BRPindAK.mjs} +7 -7
- package/dist/{prisma7-binding-BGEW0R_9.mjs.map → prisma7-binding-BRPindAK.mjs.map} +1 -1
- package/dist/{prisma7-binding-DSQpvEBe.d.mts → prisma7-binding-D9BabHMI.d.mts} +5 -6
- package/dist/{prisma7-binding-DSQpvEBe.d.mts.map → prisma7-binding-D9BabHMI.d.mts.map} +1 -1
- package/dist/{registry-D4AyYsXr-CgiiMuFS.mjs → registry-CWgvB0Fj-Czwmfmzd.mjs} +3 -3
- package/dist/{registry-D4AyYsXr-CgiiMuFS.mjs.map → registry-CWgvB0Fj-Czwmfmzd.mjs.map} +1 -1
- package/dist/{render-ops-B5Mh0MpJ-Dc_dH1Sk.mjs → render-ops-Bl1R5cz0-CFshOROt.mjs} +4 -4
- package/dist/{render-ops-B5Mh0MpJ-Dc_dH1Sk.mjs.map → render-ops-Bl1R5cz0-CFshOROt.mjs.map} +1 -1
- package/dist/{render-ops-CEwI8Iyf.d.mts → render-ops-oYwF1MRN.d.mts} +2 -2
- package/dist/{render-ops-CEwI8Iyf.d.mts.map → render-ops-oYwF1MRN.d.mts.map} +1 -1
- package/dist/{render-typescript-Dqp1Spgn-B4mJhuVr.mjs → render-typescript-B-Igkk6D-CQ-WlBmb.mjs} +9 -24
- package/dist/render-typescript-B-Igkk6D-CQ-WlBmb.mjs.map +1 -0
- package/dist/{render-typescript-BysdXYpH.d.mts → render-typescript-dgxcyEaj.d.mts} +2 -9
- package/dist/render-typescript-dgxcyEaj.d.mts.map +1 -0
- package/dist/{resolve-ddl-schema-BwKuzGm--BVgPhp86.mjs → resolve-ddl-schema-C2KTxEX3-D8Jd9Rx1.mjs} +3 -3
- package/dist/{resolve-ddl-schema-BwKuzGm--BVgPhp86.mjs.map → resolve-ddl-schema-C2KTxEX3-D8Jd9Rx1.mjs.map} +1 -1
- package/dist/{runtime-DPhbi9_3.mjs → runtime-BArZXVRj.mjs} +7 -7
- package/dist/{runtime-DPhbi9_3.mjs.map → runtime-BArZXVRj.mjs.map} +1 -1
- package/dist/{runtime-BMG3ddkQ.d.mts → runtime-DhK5uy8-.d.mts} +2 -2
- package/dist/{runtime-BMG3ddkQ.d.mts.map → runtime-DhK5uy8-.d.mts.map} +1 -1
- package/dist/{runtime-Cnam1N0o.mjs → runtime-IkvlhDl7.mjs} +2 -2
- package/dist/{runtime-Cnam1N0o.mjs.map → runtime-IkvlhDl7.mjs.map} +1 -1
- package/dist/{sql-renderer-Bj41PrUl-Jbs8Ojfr.mjs → sql-renderer-Bj41PrUl-BDN4jKm9.mjs} +3 -3
- package/dist/{sql-renderer-Bj41PrUl-Jbs8Ojfr.mjs.map → sql-renderer-Bj41PrUl-BDN4jKm9.mjs.map} +1 -1
- package/dist/{sql-utils-Bq4nuPvy.d.mts → sql-utils-CHtt-prW.d.mts} +6 -2
- package/dist/{sql-utils-Bq4nuPvy.d.mts.map → sql-utils-CHtt-prW.d.mts.map} +1 -1
- package/dist/{sql-utils-CRPhDLp1-wbgQW5TM.mjs → sql-utils-ClKAaUlZ-BdjnkJvV.mjs} +8 -4
- package/dist/{sql-utils-CRPhDLp1-wbgQW5TM.mjs.map → sql-utils-ClKAaUlZ-BdjnkJvV.mjs.map} +1 -1
- package/dist/target.d.mts +28 -28
- package/dist/target.mjs +35 -35
- package/dist/target__codec-types.d.mts +3 -3
- package/dist/target__codecs.d.mts +2 -2
- package/dist/target__codecs.mjs +3 -3
- package/dist/target__contract-free.mjs +3 -3
- package/dist/target__control.d.mts +1 -1
- package/dist/target__control.mjs +24 -16
- package/dist/target__control.mjs.map +1 -1
- package/dist/target__data-transform.d.mts +2 -2
- package/dist/target__data-types.mjs +2 -2
- package/dist/target__diff-database-schema.d.mts +1 -1
- package/dist/target__diff-database-schema.mjs +1 -1
- package/dist/target__errors.mjs +1 -1
- package/dist/target__full-text-index-authoring.mjs +2 -2
- package/dist/target__full-text.d.mts +3 -3
- package/dist/target__full-text.mjs +2 -2
- package/dist/target__issue-planner.d.mts +1 -1
- package/dist/target__issue-planner.mjs +1 -1
- package/dist/target__migration.d.mts +3 -3
- package/dist/target__migration.mjs +1 -1
- package/dist/target__native-type-normalizer.mjs +1 -1
- package/dist/target__op-factory-call.d.mts +3 -3
- package/dist/target__op-factory-call.mjs +2 -2
- package/dist/target__operation-types.d.mts +2 -2
- package/dist/target__pack.d.mts +2 -2
- package/dist/target__pack.mjs +1 -1
- package/dist/target__planner-ddl-builders.mjs +1 -1
- package/dist/target__planner-identity-values.mjs +1 -1
- package/dist/target__planner-produced-postgres-migration.d.mts +2 -2
- package/dist/target__planner-produced-postgres-migration.mjs +1 -1
- package/dist/target__planner-sql-checks.mjs +1 -1
- package/dist/target__planner-target-details.d.mts +1 -1
- package/dist/target__planner.d.mts +1 -1
- package/dist/target__planner.mjs +2 -2
- package/dist/target__prisma7-binding.d.mts +1 -1
- package/dist/target__prisma7-binding.mjs +1 -1
- package/dist/target__render-ops.d.mts +1 -1
- package/dist/target__render-ops.mjs +1 -1
- package/dist/target__render-typescript.d.mts +1 -1
- package/dist/target__render-typescript.mjs +1 -1
- package/dist/target__runtime.d.mts +2 -2
- package/dist/target__runtime.mjs +4 -4
- package/dist/target__schema-ir-annotations.mjs +1 -1
- package/dist/target__sql-utils.d.mts +2 -2
- package/dist/target__sql-utils.mjs +4 -4
- package/dist/target__types.mjs +2 -2
- package/dist/{types-B_HaL8V4.d.mts → types-BxgDP3d4.d.mts} +1 -1
- package/package.json +12 -12
- package/dist/authoring-DPwc7x9U-BZkXpPSH.mjs.map +0 -1
- package/dist/codec-types-FPJG3oQH.d.mts +0 -2
- package/dist/codecs-Bzj3M0Q3-C2oFSIGs.mjs.map +0 -1
- package/dist/contract-contributions-Bc0_64Gr-KE0qggZv.mjs.map +0 -1
- package/dist/data-transform-DX9I716A.d.mts +0 -1
- package/dist/data-types-DWfwErIu-DF85cgmu.mjs.map +0 -1
- package/dist/date-time-now-generators-BORO1_nc-BdCe3ppq.mjs.map +0 -1
- package/dist/descriptor-meta-46EhsECb-C5EGe36u.mjs.map +0 -1
- package/dist/descriptor-meta-DUDk-DLN-B_WUfFf7.mjs.map +0 -1
- package/dist/full-text-collection-method-CtUV9NT0-CQuFZ4aH.d.mts.map +0 -1
- package/dist/indexes-ooG0J-V8-CTm1QvmZ.d.mts.map +0 -1
- package/dist/issue-planner-BlN8mK4E.d.mts.map +0 -1
- package/dist/migration-CovfYOjm.d.mts.map +0 -1
- package/dist/op-factory-call-CG80t74g-D9tjd13N.d.mts.map +0 -1
- package/dist/op-factory-call-DRapuFEI.d.mts +0 -1
- package/dist/op-factory-call-THEIwT0J-DQM3Y94S.mjs.map +0 -1
- package/dist/operation-types-D1F7DwdI.d.mts +0 -1
- package/dist/planner-BHH46ndt-Q6-LPhnL.mjs.map +0 -1
- package/dist/planner-produced-postgres-migration-CulnCxu2.d.mts +0 -1
- package/dist/planner-produced-postgres-migration-FtUIqqVg-ouPTcZ8X.mjs.map +0 -1
- package/dist/planner-produced-postgres-migration-exqzWlvW-DGLu2dQ7.d.mts.map +0 -1
- package/dist/planner-target-details-boDXR2s7-CExrk6rf.d.mts.map +0 -1
- package/dist/postgres-contract-view-DtsmkyFX-Bas8oQiN.mjs.map +0 -1
- package/dist/postgres-migration-D5lRerLT-DyYh8UPS.mjs.map +0 -1
- package/dist/render-typescript-BysdXYpH.d.mts.map +0 -1
- package/dist/render-typescript-Dqp1Spgn-B4mJhuVr.mjs.map +0 -1
package/dist/{op-factory-call-THEIwT0J-DQM3Y94S.mjs → op-factory-call-DvezqqJx-KBDyNT08.mjs}
RENAMED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { u as postgresError } from "./errors-
|
|
2
|
-
import {
|
|
1
|
+
import { u as postgresError } from "./errors-DxWL0CMX-BQe7Wfvt.mjs";
|
|
2
|
+
import { c as validateEnumValueLength, n as POSTGRES_QUOTING, o as quoteIdentifier, r as escapeLiteral, s as quoteQualifiedName } from "./sql-utils-ClKAaUlZ-BdjnkJvV.mjs";
|
|
3
3
|
import { t as DEFAULT_NAMESPACE_ID } from "./namespace-ids-xtp_ZY86-Cxc0dBbO.mjs";
|
|
4
|
-
import { v as postgresCreateNamespace } from "./postgres-schema-
|
|
5
|
-
import { A as extensionInSchemaAst, B as schemaExistsAst, C as disableRowLevelSecurity$1, D as dropSchema$1, E as dropPolicy, F as noNullValuesAst, G as tableIsEmptyAst, H as sequenceNameAvailableAst, I as relationKindAst, J as unboundTableMovedAst, L as rlsEnabledAst, M as indexExistsAst, N as nativeEnumTypeExistsAst, O as dropType, P as nativeEnumValueExistsAst, R as rlsPolicyDefinitionAst, S as createType, T as dropIndex$1, U as sequenceValuesFitAst, V as schemaHoldsNoObjectsAst, W as tableExistsAst, _ as constraintExistsAst, a as alterPolicyRename, b as createSchema, c as alterTableSetSchema, d as columnExistsAst, f as columnNullabilityAst, g as constraintDefinitionAst, h as columnTypeOidAst, i as alterIndexRename, j as indexDefinitionAst, k as extensionExistsAst, l as columnDefaultAst, m as columnTypeAst, n as addConstraintAction, o as alterSchemaRename, p as columnOwnsSequenceAst, r as alterColumnTypeAction, s as alterTable, t as addColumnAction, u as columnDefaultSequenceAst, v as createIndex$1, w as dropDefaultAction, x as createTable, y as createPolicy, z as rlsPolicyExistsAst } from "./ddl-
|
|
4
|
+
import { v as postgresCreateNamespace } from "./postgres-schema-CIfq1AjC-CGiMjtSX.mjs";
|
|
5
|
+
import { A as extensionInSchemaAst, B as schemaExistsAst, C as disableRowLevelSecurity$1, D as dropSchema$1, E as dropPolicy, F as noNullValuesAst, G as tableIsEmptyAst, H as sequenceNameAvailableAst, I as relationKindAst, J as unboundTableMovedAst, L as rlsEnabledAst, M as indexExistsAst, N as nativeEnumTypeExistsAst, O as dropType, P as nativeEnumValueExistsAst, R as rlsPolicyDefinitionAst, S as createType, T as dropIndex$1, U as sequenceValuesFitAst, V as schemaHoldsNoObjectsAst, W as tableExistsAst, _ as constraintExistsAst, a as alterPolicyRename, b as createSchema, c as alterTableSetSchema, d as columnExistsAst, f as columnNullabilityAst, g as constraintDefinitionAst, h as columnTypeOidAst, i as alterIndexRename, j as indexDefinitionAst, k as extensionExistsAst, l as columnDefaultAst, m as columnTypeAst, n as addConstraintAction, o as alterSchemaRename, p as columnOwnsSequenceAst, r as alterColumnTypeAction, s as alterTable, t as addColumnAction, u as columnDefaultSequenceAst, v as createIndex$1, w as dropDefaultAction, x as createTable, y as createPolicy, z as rlsPolicyExistsAst } from "./ddl-Cy_8QS23-D9EVihrI.mjs";
|
|
6
6
|
import { i as policyRoleList, t as POLICY_COMMAND_SQL } from "./canonicalize-RdxoUHao-FTTkizfe.mjs";
|
|
7
|
+
import { r as autoincrementWidthOfPseudoType, t as autoincrementWidth } from "./autoincrement-widths-BZUr8bLa-Dqtjwcf-.mjs";
|
|
8
|
+
import { i as qualifyTableName, n as columnTypeCheckIfReadable, r as columnTypeCheckText, t as alterTypeCheck } from "./planner-sql-checks-CzxowQml-moHPNh20.mjs";
|
|
7
9
|
import { t as postgresObjectName } from "./postgres-object-name-FPikIvOw-B8FfJI7z.mjs";
|
|
8
|
-
import { r as autoincrementWidthOfPseudoType, t as autoincrementWidth } from "./autoincrement-widths-PwZcc5Co-1O2WEMYq.mjs";
|
|
9
|
-
import { i as qualifyTableName, n as columnTypeCheckIfReadable, r as columnTypeCheckText, t as alterTypeCheck } from "./planner-sql-checks-BOdYkh9L-hXxekxJX.mjs";
|
|
10
10
|
import { t as buildTargetDetails } from "./planner-target-details-CUEF0s90-6g-mOgTI.mjs";
|
|
11
11
|
import { DdlColumn, FunctionColumnDefault, LiteralColumnDefault, opaqueSql } from "@prisma/orm-family-sql/relational-core/ast";
|
|
12
12
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
@@ -22,21 +22,7 @@ import { UnfilledValue, checkSqlDefaultText, checkSqlExpressionText, convertedCo
|
|
|
22
22
|
import { errorUnfilledPlaceholder, unfilledPlaceholderOperation } from "@prisma/orm-framework/errors/migration";
|
|
23
23
|
import { TsExpression, jsonToTsSource, tsObjectSource } from "@prisma/orm-framework/ts-render";
|
|
24
24
|
import { REFERENTIAL_ACTION_SQL } from "@prisma/orm-family-sql/contract/referential-action-sql";
|
|
25
|
-
//#region ../../../3-targets/postgres/1-target/dist/op-factory-call-
|
|
26
|
-
/**
|
|
27
|
-
* Maps a planner schema name to the contract-free DDL builder's optional
|
|
28
|
-
* `schema` field: the unbound sentinel becomes `undefined` (the builder omits
|
|
29
|
-
* the schema qualifier), every other name passes through.
|
|
30
|
-
*/
|
|
31
|
-
function boundSchema(schemaName) {
|
|
32
|
-
return schemaName === UNBOUND_NAMESPACE_ID ? void 0 : schemaName;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* The name Postgres gives the sequence of a `SERIAL` column: `{table}_{column}_seq`, cut to fit 63 bytes as Postgres cuts it.
|
|
36
|
-
*/
|
|
37
|
-
function defaultSequenceName(tableName, columnName) {
|
|
38
|
-
return postgresObjectName(tableName, columnName, "seq");
|
|
39
|
-
}
|
|
25
|
+
//#region ../../../3-targets/postgres/1-target/dist/op-factory-call-DvezqqJx.mjs
|
|
40
26
|
function step(description, sql, params, expectation) {
|
|
41
27
|
return {
|
|
42
28
|
description,
|
|
@@ -66,6 +52,199 @@ function searchPathExtensionTarget(name) {
|
|
|
66
52
|
}
|
|
67
53
|
};
|
|
68
54
|
}
|
|
55
|
+
const PLAIN_IDENTIFIER = /^[A-Za-z_][A-Za-z0-9_$]*$/;
|
|
56
|
+
function validateRoleName(role) {
|
|
57
|
+
if (!PLAIN_IDENTIFIER.test(role)) throw postgresError("CONTRACT.ROLE_INVALID", `Invalid role name ${JSON.stringify(role)}: role names must be plain SQL identifiers matching ^[A-Za-z_][A-Za-z0-9_$]*$`, { meta: {
|
|
58
|
+
role,
|
|
59
|
+
reason: "not-a-plain-identifier"
|
|
60
|
+
} });
|
|
61
|
+
return role;
|
|
62
|
+
}
|
|
63
|
+
/** The roles `pg_policies.roles` lists for a policy created for `roles`: the roles the `TO` clause names, which fold to lower case unquoted. Postgres ignores every other role when the clause names `public`. */
|
|
64
|
+
function catalogPolicyRoles(roles) {
|
|
65
|
+
const named = [...new Set(policyRoleList(roles).map((role) => role.toLowerCase()))];
|
|
66
|
+
return named.includes("public") ? ["public"] : named;
|
|
67
|
+
}
|
|
68
|
+
function createRlsPolicyIdentity(schemaName, tableName, policyName) {
|
|
69
|
+
return {
|
|
70
|
+
id: `rlsPolicy.${schemaName}.${tableName}.${policyName}`,
|
|
71
|
+
operationClass: "additive",
|
|
72
|
+
target: targetDetails("rlsPolicy", policyName, schemaName, tableName)
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
function dropRlsPolicyIdentity(schemaName, tableName, policyName) {
|
|
76
|
+
return {
|
|
77
|
+
id: `rlsPolicy.${schemaName}.${tableName}.${policyName}.drop`,
|
|
78
|
+
operationClass: "widening",
|
|
79
|
+
target: targetDetails("rlsPolicy", policyName, schemaName, tableName)
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
function renameRlsPolicyIdentity(schemaName, tableName, oldPolicyName, newPolicyName) {
|
|
83
|
+
return {
|
|
84
|
+
id: `rlsPolicy.${schemaName}.${tableName}.${oldPolicyName}.rename`,
|
|
85
|
+
operationClass: "widening",
|
|
86
|
+
target: targetDetails("rlsPolicy", newPolicyName, schemaName, tableName)
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
function enableRowLevelSecurityIdentity(schemaName, tableName) {
|
|
90
|
+
return {
|
|
91
|
+
id: `rowLevelSecurity.${schemaName}.${tableName}`,
|
|
92
|
+
operationClass: "additive",
|
|
93
|
+
target: targetDetails("rowLevelSecurity", tableName, schemaName)
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
function disableRowLevelSecurityIdentity(schemaName, tableName) {
|
|
97
|
+
return {
|
|
98
|
+
id: `rowLevelSecurity.${schemaName}.${tableName}.disable`,
|
|
99
|
+
operationClass: "widening",
|
|
100
|
+
target: targetDetails("rowLevelSecurity", tableName, schemaName)
|
|
101
|
+
};
|
|
102
|
+
}
|
|
103
|
+
async function createRlsPolicy(schemaName, tableName, policy, lowerer) {
|
|
104
|
+
const validatedRoles = policy.roles.map(validateRoleName);
|
|
105
|
+
const ddlNode = createPolicy({
|
|
106
|
+
schema: schemaName,
|
|
107
|
+
table: tableName,
|
|
108
|
+
name: policy.name,
|
|
109
|
+
permissive: policy.permissive,
|
|
110
|
+
operation: policy.operation,
|
|
111
|
+
roles: validatedRoles,
|
|
112
|
+
...ifDefined("using", policy.using),
|
|
113
|
+
...ifDefined("withCheck", policy.withCheck)
|
|
114
|
+
});
|
|
115
|
+
const checks = rlsPolicyExistsAst({
|
|
116
|
+
schema: schemaName,
|
|
117
|
+
table: tableName,
|
|
118
|
+
policyName: policy.name
|
|
119
|
+
});
|
|
120
|
+
const absent = await lowerer.lowerToExecuteRequest(checks.policyAbsent());
|
|
121
|
+
const execute = await lowerer.lowerToExecuteRequest(ddlNode);
|
|
122
|
+
const defined = await lowerer.lowerToExecuteRequest(rlsPolicyDefinitionAst({
|
|
123
|
+
schema: schemaName,
|
|
124
|
+
table: tableName,
|
|
125
|
+
policyName: policy.name,
|
|
126
|
+
command: POLICY_COMMAND_SQL[policy.operation],
|
|
127
|
+
permissive: policy.permissive,
|
|
128
|
+
roles: catalogPolicyRoles(validatedRoles)
|
|
129
|
+
}));
|
|
130
|
+
const { id, operationClass, target } = createRlsPolicyIdentity(schemaName, tableName, policy.name);
|
|
131
|
+
return {
|
|
132
|
+
id,
|
|
133
|
+
label: `Create RLS policy "${policy.name}" on "${tableName}"`,
|
|
134
|
+
operationClass,
|
|
135
|
+
target,
|
|
136
|
+
precheck: [step(`ensure RLS policy "${policy.name}" does not exist`, absent.sql, absent.params, expectAbsent(`RLS policy "${policy.name}" on "${tableName}"`))],
|
|
137
|
+
execute: [step(`create RLS policy "${policy.name}"`, execute.sql, execute.params)],
|
|
138
|
+
postcheck: [step(`verify RLS policy "${policy.name}" exists with the planned command, roles and permissiveness`, defined.sql, defined.params)]
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
async function dropRlsPolicy(schemaName, tableName, policyName, lowerer) {
|
|
142
|
+
const ddlNode = dropPolicy({
|
|
143
|
+
schema: schemaName,
|
|
144
|
+
table: tableName,
|
|
145
|
+
name: policyName
|
|
146
|
+
});
|
|
147
|
+
const checks = rlsPolicyExistsAst({
|
|
148
|
+
schema: schemaName,
|
|
149
|
+
table: tableName,
|
|
150
|
+
policyName
|
|
151
|
+
});
|
|
152
|
+
const present = await lowerer.lowerToExecuteRequest(checks.policyPresent());
|
|
153
|
+
const execute = await lowerer.lowerToExecuteRequest(ddlNode);
|
|
154
|
+
const absent = await lowerer.lowerToExecuteRequest(checks.policyAbsent());
|
|
155
|
+
const { id, operationClass, target } = dropRlsPolicyIdentity(schemaName, tableName, policyName);
|
|
156
|
+
return {
|
|
157
|
+
id,
|
|
158
|
+
label: `Drop RLS policy "${policyName}" on "${tableName}"`,
|
|
159
|
+
operationClass,
|
|
160
|
+
target,
|
|
161
|
+
precheck: [step(`ensure RLS policy "${policyName}" exists`, present.sql, present.params, expectPresent(`RLS policy "${policyName}" on "${tableName}"`))],
|
|
162
|
+
execute: [step(`drop RLS policy "${policyName}"`, execute.sql, execute.params)],
|
|
163
|
+
postcheck: [step(`verify RLS policy "${policyName}" is absent`, absent.sql, absent.params, expectAbsent(`RLS policy "${policyName}" on "${tableName}"`))]
|
|
164
|
+
};
|
|
165
|
+
}
|
|
166
|
+
async function enableRowLevelSecurity(schemaName, tableName, lowerer) {
|
|
167
|
+
const checks = rlsEnabledAst(schemaName, tableName);
|
|
168
|
+
const disabled = await lowerer.lowerToExecuteRequest(checks.rlsDisabled());
|
|
169
|
+
const enabled = await lowerer.lowerToExecuteRequest(checks.rlsEnabled());
|
|
170
|
+
const { id, operationClass, target } = enableRowLevelSecurityIdentity(schemaName, tableName);
|
|
171
|
+
return {
|
|
172
|
+
id,
|
|
173
|
+
label: `Enable row-level security on "${tableName}"`,
|
|
174
|
+
operationClass,
|
|
175
|
+
target,
|
|
176
|
+
precheck: [step(`check RLS is not already enabled on "${tableName}"`, disabled.sql, disabled.params)],
|
|
177
|
+
execute: [step(`enable row-level security on "${tableName}"`, `ALTER TABLE ${qualifyTableName(schemaName, tableName)} ENABLE ROW LEVEL SECURITY`)],
|
|
178
|
+
postcheck: [step(`verify row-level security is enabled on "${tableName}"`, enabled.sql, enabled.params)]
|
|
179
|
+
};
|
|
180
|
+
}
|
|
181
|
+
async function disableRowLevelSecurity(schemaName, tableName, lowerer) {
|
|
182
|
+
const ddlNode = disableRowLevelSecurity$1({
|
|
183
|
+
schema: schemaName,
|
|
184
|
+
table: tableName
|
|
185
|
+
});
|
|
186
|
+
const checks = rlsEnabledAst(schemaName, tableName);
|
|
187
|
+
const enabled = await lowerer.lowerToExecuteRequest(checks.rlsEnabled());
|
|
188
|
+
const execute = await lowerer.lowerToExecuteRequest(ddlNode);
|
|
189
|
+
const disabled = await lowerer.lowerToExecuteRequest(checks.rlsDisabled());
|
|
190
|
+
const { id, operationClass, target } = disableRowLevelSecurityIdentity(schemaName, tableName);
|
|
191
|
+
return {
|
|
192
|
+
id,
|
|
193
|
+
label: `Disable row-level security on "${tableName}"`,
|
|
194
|
+
operationClass,
|
|
195
|
+
target,
|
|
196
|
+
precheck: [step(`check RLS is currently enabled on "${tableName}"`, enabled.sql, enabled.params)],
|
|
197
|
+
execute: [step(`disable row-level security on "${tableName}"`, execute.sql, execute.params)],
|
|
198
|
+
postcheck: [step(`verify row-level security is disabled on "${tableName}"`, disabled.sql, disabled.params)]
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
async function renameRlsPolicy(schemaName, tableName, oldPolicyName, newPolicyName, lowerer) {
|
|
202
|
+
const ddlNode = alterPolicyRename({
|
|
203
|
+
schema: schemaName,
|
|
204
|
+
table: tableName,
|
|
205
|
+
name: oldPolicyName,
|
|
206
|
+
newName: newPolicyName
|
|
207
|
+
});
|
|
208
|
+
const oldChecks = rlsPolicyExistsAst({
|
|
209
|
+
schema: schemaName,
|
|
210
|
+
table: tableName,
|
|
211
|
+
policyName: oldPolicyName
|
|
212
|
+
});
|
|
213
|
+
const newChecks = rlsPolicyExistsAst({
|
|
214
|
+
schema: schemaName,
|
|
215
|
+
table: tableName,
|
|
216
|
+
policyName: newPolicyName
|
|
217
|
+
});
|
|
218
|
+
const oldPresent = await lowerer.lowerToExecuteRequest(oldChecks.policyPresent());
|
|
219
|
+
const execute = await lowerer.lowerToExecuteRequest(ddlNode);
|
|
220
|
+
const newPresent = await lowerer.lowerToExecuteRequest(newChecks.policyPresent());
|
|
221
|
+
const newAbsent = await lowerer.lowerToExecuteRequest(newChecks.policyAbsent());
|
|
222
|
+
const oldAbsent = await lowerer.lowerToExecuteRequest(oldChecks.policyAbsent());
|
|
223
|
+
const { id, operationClass, target } = renameRlsPolicyIdentity(schemaName, tableName, oldPolicyName, newPolicyName);
|
|
224
|
+
return {
|
|
225
|
+
id,
|
|
226
|
+
label: `Rename RLS policy "${oldPolicyName}" to "${newPolicyName}" on "${tableName}"`,
|
|
227
|
+
operationClass,
|
|
228
|
+
target,
|
|
229
|
+
precheck: [step(`ensure RLS policy "${oldPolicyName}" exists`, oldPresent.sql, oldPresent.params, expectPresent(`RLS policy "${oldPolicyName}" on "${tableName}"`)), step(`ensure RLS policy "${newPolicyName}" does not exist`, newAbsent.sql, newAbsent.params, expectAbsent(`RLS policy "${newPolicyName}" on "${tableName}"`))],
|
|
230
|
+
execute: [step(`rename RLS policy "${oldPolicyName}" to "${newPolicyName}"`, execute.sql, execute.params)],
|
|
231
|
+
postcheck: [step(`verify RLS policy "${newPolicyName}" exists`, newPresent.sql, newPresent.params, expectPresent(`RLS policy "${newPolicyName}" on "${tableName}"`)), step(`verify RLS policy "${oldPolicyName}" no longer exists`, oldAbsent.sql, oldAbsent.params, expectAbsent(`RLS policy "${oldPolicyName}" on "${tableName}"`))]
|
|
232
|
+
};
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Maps a planner schema name to the contract-free DDL builder's optional
|
|
236
|
+
* `schema` field: the unbound sentinel becomes `undefined` (the builder omits
|
|
237
|
+
* the schema qualifier), every other name passes through.
|
|
238
|
+
*/
|
|
239
|
+
function boundSchema(schemaName) {
|
|
240
|
+
return schemaName === UNBOUND_NAMESPACE_ID ? void 0 : schemaName;
|
|
241
|
+
}
|
|
242
|
+
/**
|
|
243
|
+
* The name Postgres gives the sequence of a `SERIAL` column: `{table}_{column}_seq`, cut to fit 63 bytes as Postgres cuts it.
|
|
244
|
+
*/
|
|
245
|
+
function defaultSequenceName(tableName, columnName) {
|
|
246
|
+
return postgresObjectName(tableName, columnName, "seq");
|
|
247
|
+
}
|
|
69
248
|
async function columnExistsSteps(lowerer, options) {
|
|
70
249
|
const checks = columnExistsAst(options);
|
|
71
250
|
return {
|
|
@@ -882,145 +1061,6 @@ async function dropNativeEnumType(schemaName, typeName, lowerer) {
|
|
|
882
1061
|
postcheck: []
|
|
883
1062
|
};
|
|
884
1063
|
}
|
|
885
|
-
const PLAIN_IDENTIFIER = /^[A-Za-z_][A-Za-z0-9_$]*$/;
|
|
886
|
-
function validateRoleName(role) {
|
|
887
|
-
if (!PLAIN_IDENTIFIER.test(role)) throw postgresError("CONTRACT.ROLE_INVALID", `Invalid role name ${JSON.stringify(role)}: role names must be plain SQL identifiers matching ^[A-Za-z_][A-Za-z0-9_$]*$`, { meta: {
|
|
888
|
-
role,
|
|
889
|
-
reason: "not-a-plain-identifier"
|
|
890
|
-
} });
|
|
891
|
-
return role;
|
|
892
|
-
}
|
|
893
|
-
/** The roles `pg_policies.roles` lists for a policy created for `roles`: the roles the `TO` clause names, which fold to lower case unquoted. Postgres ignores every other role when the clause names `public`. */
|
|
894
|
-
function catalogPolicyRoles(roles) {
|
|
895
|
-
const named = [...new Set(policyRoleList(roles).map((role) => role.toLowerCase()))];
|
|
896
|
-
return named.includes("public") ? ["public"] : named;
|
|
897
|
-
}
|
|
898
|
-
async function createRlsPolicy(schemaName, tableName, policy, lowerer) {
|
|
899
|
-
const validatedRoles = policy.roles.map(validateRoleName);
|
|
900
|
-
const ddlNode = createPolicy({
|
|
901
|
-
schema: schemaName,
|
|
902
|
-
table: tableName,
|
|
903
|
-
name: policy.name,
|
|
904
|
-
permissive: policy.permissive,
|
|
905
|
-
operation: policy.operation,
|
|
906
|
-
roles: validatedRoles,
|
|
907
|
-
...ifDefined("using", policy.using),
|
|
908
|
-
...ifDefined("withCheck", policy.withCheck)
|
|
909
|
-
});
|
|
910
|
-
const checks = rlsPolicyExistsAst({
|
|
911
|
-
schema: schemaName,
|
|
912
|
-
table: tableName,
|
|
913
|
-
policyName: policy.name
|
|
914
|
-
});
|
|
915
|
-
const absent = await lowerer.lowerToExecuteRequest(checks.policyAbsent());
|
|
916
|
-
const execute = await lowerer.lowerToExecuteRequest(ddlNode);
|
|
917
|
-
const defined = await lowerer.lowerToExecuteRequest(rlsPolicyDefinitionAst({
|
|
918
|
-
schema: schemaName,
|
|
919
|
-
table: tableName,
|
|
920
|
-
policyName: policy.name,
|
|
921
|
-
command: POLICY_COMMAND_SQL[policy.operation],
|
|
922
|
-
permissive: policy.permissive,
|
|
923
|
-
roles: catalogPolicyRoles(validatedRoles)
|
|
924
|
-
}));
|
|
925
|
-
return {
|
|
926
|
-
id: `rlsPolicy.${schemaName}.${tableName}.${policy.name}`,
|
|
927
|
-
label: `Create RLS policy "${policy.name}" on "${tableName}"`,
|
|
928
|
-
operationClass: "additive",
|
|
929
|
-
target: targetDetails("rlsPolicy", policy.name, schemaName, tableName),
|
|
930
|
-
precheck: [step(`ensure RLS policy "${policy.name}" does not exist`, absent.sql, absent.params, expectAbsent(`RLS policy "${policy.name}" on "${tableName}"`))],
|
|
931
|
-
execute: [step(`create RLS policy "${policy.name}"`, execute.sql, execute.params)],
|
|
932
|
-
postcheck: [step(`verify RLS policy "${policy.name}" exists with the planned command, roles and permissiveness`, defined.sql, defined.params)]
|
|
933
|
-
};
|
|
934
|
-
}
|
|
935
|
-
async function dropRlsPolicy(schemaName, tableName, policyName, lowerer) {
|
|
936
|
-
const ddlNode = dropPolicy({
|
|
937
|
-
schema: schemaName,
|
|
938
|
-
table: tableName,
|
|
939
|
-
name: policyName
|
|
940
|
-
});
|
|
941
|
-
const checks = rlsPolicyExistsAst({
|
|
942
|
-
schema: schemaName,
|
|
943
|
-
table: tableName,
|
|
944
|
-
policyName
|
|
945
|
-
});
|
|
946
|
-
const present = await lowerer.lowerToExecuteRequest(checks.policyPresent());
|
|
947
|
-
const execute = await lowerer.lowerToExecuteRequest(ddlNode);
|
|
948
|
-
const absent = await lowerer.lowerToExecuteRequest(checks.policyAbsent());
|
|
949
|
-
return {
|
|
950
|
-
id: `rlsPolicy.${schemaName}.${tableName}.${policyName}.drop`,
|
|
951
|
-
label: `Drop RLS policy "${policyName}" on "${tableName}"`,
|
|
952
|
-
operationClass: "widening",
|
|
953
|
-
target: targetDetails("rlsPolicy", policyName, schemaName, tableName),
|
|
954
|
-
precheck: [step(`ensure RLS policy "${policyName}" exists`, present.sql, present.params, expectPresent(`RLS policy "${policyName}" on "${tableName}"`))],
|
|
955
|
-
execute: [step(`drop RLS policy "${policyName}"`, execute.sql, execute.params)],
|
|
956
|
-
postcheck: [step(`verify RLS policy "${policyName}" is absent`, absent.sql, absent.params, expectAbsent(`RLS policy "${policyName}" on "${tableName}"`))]
|
|
957
|
-
};
|
|
958
|
-
}
|
|
959
|
-
async function enableRowLevelSecurity(schemaName, tableName, lowerer) {
|
|
960
|
-
const checks = rlsEnabledAst(schemaName, tableName);
|
|
961
|
-
const disabled = await lowerer.lowerToExecuteRequest(checks.rlsDisabled());
|
|
962
|
-
const enabled = await lowerer.lowerToExecuteRequest(checks.rlsEnabled());
|
|
963
|
-
return {
|
|
964
|
-
id: `rowLevelSecurity.${schemaName}.${tableName}`,
|
|
965
|
-
label: `Enable row-level security on "${tableName}"`,
|
|
966
|
-
operationClass: "additive",
|
|
967
|
-
target: targetDetails("rowLevelSecurity", tableName, schemaName),
|
|
968
|
-
precheck: [step(`check RLS is not already enabled on "${tableName}"`, disabled.sql, disabled.params)],
|
|
969
|
-
execute: [step(`enable row-level security on "${tableName}"`, `ALTER TABLE ${qualifyTableName(schemaName, tableName)} ENABLE ROW LEVEL SECURITY`)],
|
|
970
|
-
postcheck: [step(`verify row-level security is enabled on "${tableName}"`, enabled.sql, enabled.params)]
|
|
971
|
-
};
|
|
972
|
-
}
|
|
973
|
-
async function disableRowLevelSecurity(schemaName, tableName, lowerer) {
|
|
974
|
-
const ddlNode = disableRowLevelSecurity$1({
|
|
975
|
-
schema: schemaName,
|
|
976
|
-
table: tableName
|
|
977
|
-
});
|
|
978
|
-
const checks = rlsEnabledAst(schemaName, tableName);
|
|
979
|
-
const enabled = await lowerer.lowerToExecuteRequest(checks.rlsEnabled());
|
|
980
|
-
const execute = await lowerer.lowerToExecuteRequest(ddlNode);
|
|
981
|
-
const disabled = await lowerer.lowerToExecuteRequest(checks.rlsDisabled());
|
|
982
|
-
return {
|
|
983
|
-
id: `rowLevelSecurity.${schemaName}.${tableName}.disable`,
|
|
984
|
-
label: `Disable row-level security on "${tableName}"`,
|
|
985
|
-
operationClass: "widening",
|
|
986
|
-
target: targetDetails("rowLevelSecurity", tableName, schemaName),
|
|
987
|
-
precheck: [step(`check RLS is currently enabled on "${tableName}"`, enabled.sql, enabled.params)],
|
|
988
|
-
execute: [step(`disable row-level security on "${tableName}"`, execute.sql, execute.params)],
|
|
989
|
-
postcheck: [step(`verify row-level security is disabled on "${tableName}"`, disabled.sql, disabled.params)]
|
|
990
|
-
};
|
|
991
|
-
}
|
|
992
|
-
async function renameRlsPolicy(schemaName, tableName, oldPolicyName, newPolicyName, lowerer) {
|
|
993
|
-
const ddlNode = alterPolicyRename({
|
|
994
|
-
schema: schemaName,
|
|
995
|
-
table: tableName,
|
|
996
|
-
name: oldPolicyName,
|
|
997
|
-
newName: newPolicyName
|
|
998
|
-
});
|
|
999
|
-
const oldChecks = rlsPolicyExistsAst({
|
|
1000
|
-
schema: schemaName,
|
|
1001
|
-
table: tableName,
|
|
1002
|
-
policyName: oldPolicyName
|
|
1003
|
-
});
|
|
1004
|
-
const newChecks = rlsPolicyExistsAst({
|
|
1005
|
-
schema: schemaName,
|
|
1006
|
-
table: tableName,
|
|
1007
|
-
policyName: newPolicyName
|
|
1008
|
-
});
|
|
1009
|
-
const oldPresent = await lowerer.lowerToExecuteRequest(oldChecks.policyPresent());
|
|
1010
|
-
const execute = await lowerer.lowerToExecuteRequest(ddlNode);
|
|
1011
|
-
const newPresent = await lowerer.lowerToExecuteRequest(newChecks.policyPresent());
|
|
1012
|
-
const newAbsent = await lowerer.lowerToExecuteRequest(newChecks.policyAbsent());
|
|
1013
|
-
const oldAbsent = await lowerer.lowerToExecuteRequest(oldChecks.policyAbsent());
|
|
1014
|
-
return {
|
|
1015
|
-
id: `rlsPolicy.${schemaName}.${tableName}.${oldPolicyName}.rename`,
|
|
1016
|
-
label: `Rename RLS policy "${oldPolicyName}" to "${newPolicyName}" on "${tableName}"`,
|
|
1017
|
-
operationClass: "widening",
|
|
1018
|
-
target: targetDetails("rlsPolicy", newPolicyName, schemaName, tableName),
|
|
1019
|
-
precheck: [step(`ensure RLS policy "${oldPolicyName}" exists`, oldPresent.sql, oldPresent.params, expectPresent(`RLS policy "${oldPolicyName}" on "${tableName}"`)), step(`ensure RLS policy "${newPolicyName}" does not exist`, newAbsent.sql, newAbsent.params, expectAbsent(`RLS policy "${newPolicyName}" on "${tableName}"`))],
|
|
1020
|
-
execute: [step(`rename RLS policy "${oldPolicyName}" to "${newPolicyName}"`, execute.sql, execute.params)],
|
|
1021
|
-
postcheck: [step(`verify RLS policy "${newPolicyName}" exists`, newPresent.sql, newPresent.params, expectPresent(`RLS policy "${newPolicyName}" on "${tableName}"`)), step(`verify RLS policy "${oldPolicyName}" no longer exists`, oldAbsent.sql, oldAbsent.params, expectAbsent(`RLS policy "${oldPolicyName}" on "${tableName}"`))]
|
|
1022
|
-
};
|
|
1023
|
-
}
|
|
1024
1064
|
const SchemaContentsMeta = type({ schemaContents: { schema: "string" } });
|
|
1025
1065
|
/** The meta of a step that fails while a schema still holds objects; the runner then names them. */
|
|
1026
1066
|
function schemaContentsMeta(schema) {
|
|
@@ -1536,7 +1576,7 @@ async function buildAddNotNullColumnWithTemporaryDefaultOperation(options) {
|
|
|
1536
1576
|
]
|
|
1537
1577
|
};
|
|
1538
1578
|
}
|
|
1539
|
-
const
|
|
1579
|
+
const MIGRATION_MODULE = "<migrations.module>";
|
|
1540
1580
|
var PostgresOpFactoryCallNode = class extends TsExpression {
|
|
1541
1581
|
/** The operations this call lowers to, in order: one, unless the call carries companions. */
|
|
1542
1582
|
toOps(lowerer) {
|
|
@@ -1544,10 +1584,12 @@ var PostgresOpFactoryCallNode = class extends TsExpression {
|
|
|
1544
1584
|
}
|
|
1545
1585
|
importRequirements() {
|
|
1546
1586
|
return [{
|
|
1547
|
-
moduleSpecifier:
|
|
1587
|
+
moduleSpecifier: MIGRATION_MODULE,
|
|
1548
1588
|
symbol: this.factoryName
|
|
1549
1589
|
}];
|
|
1550
1590
|
}
|
|
1591
|
+
/** The id, class and target of a row-level-security operation this call lowers to; `undefined` for any other call. */
|
|
1592
|
+
rlsIdentity() {}
|
|
1551
1593
|
freeze() {
|
|
1552
1594
|
Object.freeze(this);
|
|
1553
1595
|
}
|
|
@@ -1678,7 +1720,7 @@ var CreateTableCall = class extends PostgresOpFactoryCallNode {
|
|
|
1678
1720
|
return this.#written().source;
|
|
1679
1721
|
}
|
|
1680
1722
|
#written() {
|
|
1681
|
-
const sql = createSqlTextSources(
|
|
1723
|
+
const sql = createSqlTextSources(MIGRATION_MODULE);
|
|
1682
1724
|
const columnsList = this.columns.map((column) => renderDdlColumnAsTsCall(column, sql)).join(", ");
|
|
1683
1725
|
const constraintsList = this.constraints ? this.constraints.map((constraint) => renderDdlConstraintAsTsCall(constraint, sql)).join(", ") : void 0;
|
|
1684
1726
|
const opts = [];
|
|
@@ -1695,16 +1737,16 @@ var CreateTableCall = class extends PostgresOpFactoryCallNode {
|
|
|
1695
1737
|
const req = [];
|
|
1696
1738
|
if (needsColOrConstraintImport(this.columns)) {
|
|
1697
1739
|
req.push({
|
|
1698
|
-
moduleSpecifier:
|
|
1740
|
+
moduleSpecifier: MIGRATION_MODULE,
|
|
1699
1741
|
symbol: "col"
|
|
1700
1742
|
});
|
|
1701
1743
|
for (const sym of defaultImportSymbols(this.columns)) req.push({
|
|
1702
|
-
moduleSpecifier:
|
|
1744
|
+
moduleSpecifier: MIGRATION_MODULE,
|
|
1703
1745
|
symbol: sym
|
|
1704
1746
|
});
|
|
1705
1747
|
}
|
|
1706
1748
|
for (const sym of constraintImportSymbols(this.constraints)) req.push({
|
|
1707
|
-
moduleSpecifier:
|
|
1749
|
+
moduleSpecifier: MIGRATION_MODULE,
|
|
1708
1750
|
symbol: sym
|
|
1709
1751
|
});
|
|
1710
1752
|
req.push(...this.#written().imports);
|
|
@@ -1840,7 +1882,7 @@ var AddColumnCall = class extends PostgresOpFactoryCallNode {
|
|
|
1840
1882
|
return this.#written().source;
|
|
1841
1883
|
}
|
|
1842
1884
|
#written() {
|
|
1843
|
-
const sql = createSqlTextSources(
|
|
1885
|
+
const sql = createSqlTextSources(MIGRATION_MODULE);
|
|
1844
1886
|
const opts = [];
|
|
1845
1887
|
if (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);
|
|
1846
1888
|
opts.push(`table: ${jsonToTsSource(this.tableName)}`);
|
|
@@ -1852,11 +1894,11 @@ var AddColumnCall = class extends PostgresOpFactoryCallNode {
|
|
|
1852
1894
|
}
|
|
1853
1895
|
importRequirements() {
|
|
1854
1896
|
const req = [{
|
|
1855
|
-
moduleSpecifier:
|
|
1897
|
+
moduleSpecifier: MIGRATION_MODULE,
|
|
1856
1898
|
symbol: "col"
|
|
1857
1899
|
}];
|
|
1858
1900
|
for (const sym of defaultImportSymbols([this.column])) req.push({
|
|
1859
|
-
moduleSpecifier:
|
|
1901
|
+
moduleSpecifier: MIGRATION_MODULE,
|
|
1860
1902
|
symbol: sym
|
|
1861
1903
|
});
|
|
1862
1904
|
req.push(...this.#written().imports);
|
|
@@ -2008,12 +2050,12 @@ var AlterColumnTypeCall = class extends PostgresOpFactoryCallNode {
|
|
|
2008
2050
|
}
|
|
2009
2051
|
importRequirements() {
|
|
2010
2052
|
return [...isUnfilledSlot(this.using) ? [{
|
|
2011
|
-
moduleSpecifier:
|
|
2053
|
+
moduleSpecifier: MIGRATION_MODULE,
|
|
2012
2054
|
symbol: "placeholder"
|
|
2013
2055
|
}] : [], ...this.#written().imports];
|
|
2014
2056
|
}
|
|
2015
2057
|
#written() {
|
|
2016
|
-
const sql = createSqlTextSources(
|
|
2058
|
+
const sql = createSqlTextSources(MIGRATION_MODULE);
|
|
2017
2059
|
const using = this.using === void 0 ? [] : [`using: ${slotSource(this.using, sql)}`];
|
|
2018
2060
|
return {
|
|
2019
2061
|
source: `this.alterColumnType({ ${[
|
|
@@ -2112,7 +2154,7 @@ var SetDefaultCall = class extends PostgresOpFactoryCallNode {
|
|
|
2112
2154
|
return this.#written().source;
|
|
2113
2155
|
}
|
|
2114
2156
|
#written() {
|
|
2115
|
-
const sql = createSqlTextSources(
|
|
2157
|
+
const sql = createSqlTextSources(MIGRATION_MODULE);
|
|
2116
2158
|
const opts = [];
|
|
2117
2159
|
if (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);
|
|
2118
2160
|
opts.push(`table: ${jsonToTsSource(this.tableName)}`);
|
|
@@ -2125,11 +2167,11 @@ var SetDefaultCall = class extends PostgresOpFactoryCallNode {
|
|
|
2125
2167
|
importRequirements() {
|
|
2126
2168
|
return [
|
|
2127
2169
|
{
|
|
2128
|
-
moduleSpecifier:
|
|
2170
|
+
moduleSpecifier: MIGRATION_MODULE,
|
|
2129
2171
|
symbol: "col"
|
|
2130
2172
|
},
|
|
2131
2173
|
...defaultImportSymbols([this.column]).map((symbol) => ({
|
|
2132
|
-
moduleSpecifier:
|
|
2174
|
+
moduleSpecifier: MIGRATION_MODULE,
|
|
2133
2175
|
symbol
|
|
2134
2176
|
})),
|
|
2135
2177
|
...this.#written().imports
|
|
@@ -2268,7 +2310,7 @@ var AddColumnWithTemporaryDefaultCall = class extends PostgresOpFactoryCallNode
|
|
|
2268
2310
|
return this.#written().imports;
|
|
2269
2311
|
}
|
|
2270
2312
|
#written() {
|
|
2271
|
-
const sql = createSqlTextSources(
|
|
2313
|
+
const sql = createSqlTextSources(MIGRATION_MODULE);
|
|
2272
2314
|
return {
|
|
2273
2315
|
source: `this.addColumnWithTemporaryDefault({ ${[
|
|
2274
2316
|
...columnCallLocation(this.schemaName, this.tableName, this.columnName),
|
|
@@ -2467,7 +2509,7 @@ var AddCheckConstraintCall = class extends PostgresOpFactoryCallNode {
|
|
|
2467
2509
|
return this.#written().imports;
|
|
2468
2510
|
}
|
|
2469
2511
|
#written() {
|
|
2470
|
-
const sql = createSqlTextSources(
|
|
2512
|
+
const sql = createSqlTextSources(MIGRATION_MODULE);
|
|
2471
2513
|
return {
|
|
2472
2514
|
source: `this.addCheckConstraint({ ${constraintCallOptions(this.schemaName, this.tableName, this.constraintName)}, expression: ${sql.source(this.expression)} })`,
|
|
2473
2515
|
imports: sql.imports()
|
|
@@ -2545,7 +2587,7 @@ var CreateIndexCall = class extends PostgresOpFactoryCallNode {
|
|
|
2545
2587
|
return this.#written().imports;
|
|
2546
2588
|
}
|
|
2547
2589
|
#written() {
|
|
2548
|
-
const sql = createSqlTextSources(
|
|
2590
|
+
const sql = createSqlTextSources(MIGRATION_MODULE);
|
|
2549
2591
|
const opts = [];
|
|
2550
2592
|
if (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);
|
|
2551
2593
|
opts.push(`table: ${jsonToTsSource(this.tableName)}`);
|
|
@@ -3306,7 +3348,7 @@ var FillStoredKeyCall = class extends PostgresOpFactoryCallNode {
|
|
|
3306
3348
|
}
|
|
3307
3349
|
importRequirements() {
|
|
3308
3350
|
return this.value instanceof UnfilledValue ? [{
|
|
3309
|
-
moduleSpecifier:
|
|
3351
|
+
moduleSpecifier: MIGRATION_MODULE,
|
|
3310
3352
|
symbol: "placeholder"
|
|
3311
3353
|
}] : [];
|
|
3312
3354
|
}
|
|
@@ -3348,7 +3390,7 @@ var DataTransformCall = class extends PostgresOpFactoryCallNode {
|
|
|
3348
3390
|
}
|
|
3349
3391
|
importRequirements() {
|
|
3350
3392
|
return [{
|
|
3351
|
-
moduleSpecifier:
|
|
3393
|
+
moduleSpecifier: MIGRATION_MODULE,
|
|
3352
3394
|
symbol: "placeholder"
|
|
3353
3395
|
}];
|
|
3354
3396
|
}
|
|
@@ -3372,6 +3414,9 @@ var CreatePostgresRlsPolicyCall = class extends PostgresOpFactoryCallNode {
|
|
|
3372
3414
|
if (lowerer === void 0) throw postgresError("MIGRATION.POSTGRES_CONTROL_STACK_MISSING", `CreatePostgresRlsPolicyCall.toOp: a lowerer is required on the Postgres planner path (policy "${this.policy.name}" on table "${this.tableName}"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: "CreatePostgresRlsPolicyCall" } });
|
|
3373
3415
|
return createRlsPolicy(this.schemaName, this.tableName, this.policy, lowerer);
|
|
3374
3416
|
}
|
|
3417
|
+
rlsIdentity() {
|
|
3418
|
+
return createRlsPolicyIdentity(this.schemaName, this.tableName, this.policy.name);
|
|
3419
|
+
}
|
|
3375
3420
|
renderTypeScript() {
|
|
3376
3421
|
return this.#written().source;
|
|
3377
3422
|
}
|
|
@@ -3379,7 +3424,7 @@ var CreatePostgresRlsPolicyCall = class extends PostgresOpFactoryCallNode {
|
|
|
3379
3424
|
return this.#written().imports;
|
|
3380
3425
|
}
|
|
3381
3426
|
#written() {
|
|
3382
|
-
const sql = createSqlTextSources(
|
|
3427
|
+
const sql = createSqlTextSources(MIGRATION_MODULE);
|
|
3383
3428
|
const p = this.policy;
|
|
3384
3429
|
const input = {
|
|
3385
3430
|
naming: namingOf(p.name, p.prefix),
|
|
@@ -3427,6 +3472,9 @@ var DropPostgresRlsPolicyCall = class extends PostgresOpFactoryCallNode {
|
|
|
3427
3472
|
if (lowerer === void 0) throw postgresError("MIGRATION.POSTGRES_CONTROL_STACK_MISSING", `DropPostgresRlsPolicyCall.toOp: a lowerer is required on the Postgres planner path (policy "${this.policyName}" on table "${this.tableName}"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: "DropPostgresRlsPolicyCall" } });
|
|
3428
3473
|
return dropRlsPolicy(this.schemaName, this.tableName, this.policyName, lowerer);
|
|
3429
3474
|
}
|
|
3475
|
+
rlsIdentity() {
|
|
3476
|
+
return dropRlsPolicyIdentity(this.schemaName, this.tableName, this.policyName);
|
|
3477
|
+
}
|
|
3430
3478
|
renderTypeScript() {
|
|
3431
3479
|
return `this.dropRlsPolicy({ schema: ${jsonToTsSource(this.schemaName)}, table: ${jsonToTsSource(this.tableName)}, policy: ${jsonToTsSource(this.policyName)} })`;
|
|
3432
3480
|
}
|
|
@@ -3451,6 +3499,9 @@ var EnableRowLevelSecurityCall = class extends PostgresOpFactoryCallNode {
|
|
|
3451
3499
|
if (lowerer === void 0) throw postgresError("MIGRATION.POSTGRES_CONTROL_STACK_MISSING", `EnableRowLevelSecurityCall.toOp: a lowerer is required on the Postgres planner path (table "${this.tableName}"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: "EnableRowLevelSecurityCall" } });
|
|
3452
3500
|
return enableRowLevelSecurity(this.schemaName, this.tableName, lowerer);
|
|
3453
3501
|
}
|
|
3502
|
+
rlsIdentity() {
|
|
3503
|
+
return enableRowLevelSecurityIdentity(this.schemaName, this.tableName);
|
|
3504
|
+
}
|
|
3454
3505
|
renderTypeScript() {
|
|
3455
3506
|
return `this.enableRowLevelSecurity({ schema: ${jsonToTsSource(this.schemaName)}, table: ${jsonToTsSource(this.tableName)} })`;
|
|
3456
3507
|
}
|
|
@@ -3475,6 +3526,9 @@ var DisableRowLevelSecurityCall = class extends PostgresOpFactoryCallNode {
|
|
|
3475
3526
|
if (lowerer === void 0) throw postgresError("MIGRATION.POSTGRES_CONTROL_STACK_MISSING", `DisableRowLevelSecurityCall.toOp: a lowerer is required on the Postgres planner path (table "${this.tableName}"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: "DisableRowLevelSecurityCall" } });
|
|
3476
3527
|
return disableRowLevelSecurity(this.schemaName, this.tableName, lowerer);
|
|
3477
3528
|
}
|
|
3529
|
+
rlsIdentity() {
|
|
3530
|
+
return disableRowLevelSecurityIdentity(this.schemaName, this.tableName);
|
|
3531
|
+
}
|
|
3478
3532
|
renderTypeScript() {
|
|
3479
3533
|
return `this.disableRowLevelSecurity({ schema: ${jsonToTsSource(this.schemaName)}, table: ${jsonToTsSource(this.tableName)} })`;
|
|
3480
3534
|
}
|
|
@@ -3503,6 +3557,9 @@ var RenamePostgresRlsPolicyCall = class extends PostgresOpFactoryCallNode {
|
|
|
3503
3557
|
if (lowerer === void 0) throw postgresError("MIGRATION.POSTGRES_CONTROL_STACK_MISSING", `RenamePostgresRlsPolicyCall.toOp: a lowerer is required on the Postgres planner path (policy "${this.oldPolicyName}" on table "${this.tableName}"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: "RenamePostgresRlsPolicyCall" } });
|
|
3504
3558
|
return renameRlsPolicy(this.schemaName, this.tableName, this.oldPolicyName, this.newPolicyName, lowerer);
|
|
3505
3559
|
}
|
|
3560
|
+
rlsIdentity() {
|
|
3561
|
+
return renameRlsPolicyIdentity(this.schemaName, this.tableName, this.oldPolicyName, this.newPolicyName);
|
|
3562
|
+
}
|
|
3506
3563
|
renderTypeScript() {
|
|
3507
3564
|
return `this.renameRlsPolicy({ schema: ${jsonToTsSource(this.schemaName)}, table: ${jsonToTsSource(this.tableName)}, from: ${jsonToTsSource(this.oldPolicyName)}, to: ${jsonToTsSource(this.newPolicyName)} })`;
|
|
3508
3565
|
}
|
|
@@ -3516,6 +3573,6 @@ function columnNameOfCall(call) {
|
|
|
3516
3573
|
if ("column" in call && call.column instanceof DdlColumn) return call.column.name;
|
|
3517
3574
|
}
|
|
3518
3575
|
//#endregion
|
|
3519
|
-
export {
|
|
3576
|
+
export { dropCheckConstraintId as $, EnableRowLevelSecurityCall as A, RenameSchemaCall as B, DropExtensionCall as C, DropPostgresRlsPolicyCall as D, DropNotNullCall as E, RemoveStoredValueCall as F, SetDefaultCall as G, RenameTableCall as H, RenameColumnCall as I, SetTableSchemaCall as J, SetExtensionSchemaCall as K, RenameConstraintCall as L, MIGRATION_MODULE as M, RawSqlCall as N, DropSchemaCall as O, RemoveStoredKeyCall as P, disableRowLevelSecurityIdentity as Q, RenameIndexCall as R, DropDefaultCall as S, DropNativeEnumTypeCall as T, ReplaceStoredValueCall as U, RenameStoredKeyCall as V, SCHEMA_OBJECTS_SQL as W, columnNameOfCall as X, alterColumnTypeCallText as Y, createRlsPolicyIdentity as Z, DeleteRowsCall as _, AddNativeEnumValueCall as a, renameRlsPolicyIdentity as at, DropColumnCall as b, AddUniqueCall as c, schemaContentsOf as ct, CreateIndexCall as d, dropRlsPolicyIdentity as et, CreateNativeEnumTypeCall as f, DataTransformCall as g, CreateTableCall as h, AddForeignKeyCall as i, postgresDefaultToDdlColumnDefault as it, FillStoredKeyCall as j, DropTableCall as k, AlterColumnTypeCall as l, schemaObjectsSummary as lt, CreateSchemaCall as m, AddColumnCall as n, installExtension as nt, AddPrimaryKeyCall as o, renameTableStatement as ot, CreatePostgresRlsPolicyCall as p, SetNotNullCall as q, AddColumnWithTemporaryDefaultCall as r, isPostgresOpFactoryCall as rt, AddRequiredColumnToEmptyTableCall as s, schemaBlockingObjects as st, AddCheckConstraintCall as t, holdingStoredValue as tt, CreateExtensionCall as u, DisableRowLevelSecurityCall as v, DropIndexCall as w, DropConstraintCall as x, DropCheckConstraintCall as y, RenamePostgresRlsPolicyCall as z };
|
|
3520
3577
|
|
|
3521
|
-
//# sourceMappingURL=op-factory-call-
|
|
3578
|
+
//# sourceMappingURL=op-factory-call-DvezqqJx-KBDyNT08.mjs.map
|