@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.
- package/LICENSE +201 -0
- package/README.md +23 -0
- package/dist/adapter-CWvVo0PV.d.mts +22 -0
- package/dist/adapter-CWvVo0PV.d.mts.map +1 -0
- package/dist/adapter-DhqcO3YO-jzwDVcCv.mjs +70 -0
- package/dist/adapter-DhqcO3YO-jzwDVcCv.mjs.map +1 -0
- package/dist/adapter.d.mts +12 -0
- package/dist/adapter.mjs +7 -0
- package/dist/adapter__adapter.d.mts +2 -0
- package/dist/adapter__adapter.mjs +2 -0
- package/dist/adapter__column-types.d.mts +2 -0
- package/dist/adapter__column-types.mjs +2 -0
- package/dist/adapter__control.d.mts +5 -0
- package/dist/adapter__control.mjs +441 -0
- package/dist/adapter__control.mjs.map +1 -0
- package/dist/adapter__operation-types.d.mts +2 -0
- package/dist/adapter__operation-types.mjs +1 -0
- package/dist/adapter__runtime.d.mts +2 -0
- package/dist/adapter__runtime.mjs +38 -0
- package/dist/adapter__runtime.mjs.map +1 -0
- package/dist/adapter__types.d.mts +4 -0
- package/dist/adapter__types.mjs +1 -0
- package/dist/authoring-03FwIL2k-kPjZAp3s.mjs +757 -0
- package/dist/authoring-03FwIL2k-kPjZAp3s.mjs.map +1 -0
- package/dist/canonicalize-CQlxSR4D-MnrT5gtW.d.mts +34 -0
- package/dist/canonicalize-CQlxSR4D-MnrT5gtW.d.mts.map +1 -0
- package/dist/canonicalize-CrN3u_xM-D4MrOqcB.mjs +59 -0
- package/dist/canonicalize-CrN3u_xM-D4MrOqcB.mjs.map +1 -0
- package/dist/codec-descriptor-Bec_zukr-BfvtUqhm.d.mts +37 -0
- package/dist/codec-descriptor-Bec_zukr-BfvtUqhm.d.mts.map +1 -0
- package/dist/codec-descriptor-Bg-_412t.d.mts +1 -0
- package/dist/codec-descriptor-CB6x0xEu-C-Zn2IEz.mjs +135 -0
- package/dist/codec-descriptor-CB6x0xEu-C-Zn2IEz.mjs.map +1 -0
- package/dist/codec-ids-CsOU3xDv-mPI0INiF.d.mts +33 -0
- package/dist/codec-ids-CsOU3xDv-mPI0INiF.d.mts.map +1 -0
- package/dist/codec-ids-fgafMLR7.d.mts +1 -0
- package/dist/codec-ids-tX7Svtz--BuOfRaVU.mjs +33 -0
- package/dist/codec-ids-tX7Svtz--BuOfRaVU.mjs.map +1 -0
- package/dist/codec-types-BHwY9Ff-.d.mts +2 -0
- package/dist/codec-types-mWhnDEAf-CAQzGFnF.d.mts +82 -0
- package/dist/codec-types-mWhnDEAf-CAQzGFnF.d.mts.map +1 -0
- package/dist/codecs-CBl0nD44-CaWPc1bd.mjs +1486 -0
- package/dist/codecs-CBl0nD44-CaWPc1bd.mjs.map +1 -0
- package/dist/codecs-CHIVTNZs.mjs +15 -0
- package/dist/codecs-CHIVTNZs.mjs.map +1 -0
- package/dist/codecs-Cvqvb9pV-Cdc51FKY.d.mts +589 -0
- package/dist/codecs-Cvqvb9pV-Cdc51FKY.d.mts.map +1 -0
- package/dist/codecs-DBn-uIv-.d.mts +15 -0
- package/dist/codecs-DBn-uIv-.d.mts.map +1 -0
- package/dist/column-types-BH-MU6uU.d.mts +108 -0
- package/dist/column-types-BH-MU6uU.d.mts.map +1 -0
- package/dist/column-types-CwAyCgp2.mjs +126 -0
- package/dist/column-types-CwAyCgp2.mjs.map +1 -0
- package/dist/contract-free-BZUS18FU.mjs +118 -0
- package/dist/contract-free-BZUS18FU.mjs.map +1 -0
- package/dist/contract-free-DzpGxLfb.d.mts +258 -0
- package/dist/contract-free-DzpGxLfb.d.mts.map +1 -0
- package/dist/control-2F195jJk.d.mts +11 -0
- package/dist/control-2F195jJk.d.mts.map +1 -0
- package/dist/control-6WFTtLAM.mjs +60 -0
- package/dist/control-6WFTtLAM.mjs.map +1 -0
- package/dist/control-B-FTbEnE.d.mts +22 -0
- package/dist/control-B-FTbEnE.d.mts.map +1 -0
- package/dist/control-D85zv_aY.d.mts +199 -0
- package/dist/control-D85zv_aY.d.mts.map +1 -0
- package/dist/control-DRMWptiJ.mjs +1355 -0
- package/dist/control-DRMWptiJ.mjs.map +1 -0
- package/dist/control-adapter-B9t0g7Pf-HrCxlM65.mjs +1901 -0
- package/dist/control-adapter-B9t0g7Pf-HrCxlM65.mjs.map +1 -0
- package/dist/control-policy-Cl3RRSPg-CT3QGpR3.mjs +1257 -0
- package/dist/control-policy-Cl3RRSPg-CT3QGpR3.mjs.map +1 -0
- package/dist/data-transform-BSM7TQpE.d.mts +1 -0
- package/dist/data-transform-ChZzy2dP-CxVCat_8.mjs +53 -0
- package/dist/data-transform-ChZzy2dP-CxVCat_8.mjs.map +1 -0
- package/dist/data-transform-Ck5FbyNO-BNE7QlAo.d.mts +38 -0
- package/dist/data-transform-Ck5FbyNO-BNE7QlAo.d.mts.map +1 -0
- package/dist/ddl-B4Rh8ntj.d.mts +1 -0
- package/dist/ddl-BdP4q3KY-Duef4uHw.mjs +395 -0
- package/dist/ddl-BdP4q3KY-Duef4uHw.mjs.map +1 -0
- package/dist/default-normalizer-B36TOul4.d.mts +31 -0
- package/dist/default-normalizer-B36TOul4.d.mts.map +1 -0
- package/dist/default-normalizer-Ba5ZebHM-isV86rjy.mjs +253 -0
- package/dist/default-normalizer-Ba5ZebHM-isV86rjy.mjs.map +1 -0
- package/dist/descriptor-meta-2IlVC6_d-DnV00Qd_.mjs +351 -0
- package/dist/descriptor-meta-2IlVC6_d-DnV00Qd_.mjs.map +1 -0
- package/dist/descriptor-meta-DnHabAS3-C53XXPQw.mjs +28 -0
- package/dist/descriptor-meta-DnHabAS3-C53XXPQw.mjs.map +1 -0
- package/dist/descriptor-meta-runtime-UwYdV8fD-B_m_Ha8r.mjs +13 -0
- package/dist/descriptor-meta-runtime-UwYdV8fD-B_m_Ha8r.mjs.map +1 -0
- package/dist/diff-database-schema-BfRs2vrG-D2o4KII0.mjs +390 -0
- package/dist/diff-database-schema-BfRs2vrG-D2o4KII0.mjs.map +1 -0
- package/dist/diff-database-schema-DsoNznGC.d.mts +38 -0
- package/dist/diff-database-schema-DsoNznGC.d.mts.map +1 -0
- package/dist/driver.d.mts +3 -0
- package/dist/driver.mjs +2 -0
- package/dist/driver__control.d.mts +2 -0
- package/dist/driver__control.mjs +2 -0
- package/dist/driver__runtime.d.mts +2 -0
- package/dist/driver__runtime.mjs +597 -0
- package/dist/driver__runtime.mjs.map +1 -0
- package/dist/errors-DCcVX4j1.d.mts +32 -0
- package/dist/errors-DCcVX4j1.d.mts.map +1 -0
- package/dist/errors-kYxOQjdD-D4T3rbVp.mjs +39 -0
- package/dist/errors-kYxOQjdD-D4T3rbVp.mjs.map +1 -0
- package/dist/issue-planner-jkY6p-Ca.d.mts +105 -0
- package/dist/issue-planner-jkY6p-Ca.d.mts.map +1 -0
- package/dist/migration-CBSAPE8S.d.mts +25 -0
- package/dist/migration-CBSAPE8S.d.mts.map +1 -0
- package/dist/migration-PTHAY9Cv.mjs +21 -0
- package/dist/migration-PTHAY9Cv.mjs.map +1 -0
- package/dist/namespace-ids-xtp_ZY86-Cpp8PTxD.mjs +7 -0
- package/dist/namespace-ids-xtp_ZY86-Cpp8PTxD.mjs.map +1 -0
- package/dist/native-type-normalizer-DqJlOTeX.d.mts +19 -0
- package/dist/native-type-normalizer-DqJlOTeX.d.mts.map +1 -0
- package/dist/native-type-normalizer-yvd3tqv-.mjs +38 -0
- package/dist/native-type-normalizer-yvd3tqv-.mjs.map +1 -0
- package/dist/nodes-BU-V-aZA-RqwPH68u.d.mts +235 -0
- package/dist/nodes-BU-V-aZA-RqwPH68u.d.mts.map +1 -0
- package/dist/nodes-DAvDJLvJ-BBdvFXNa.mjs +255 -0
- package/dist/nodes-DAvDJLvJ-BBdvFXNa.mjs.map +1 -0
- package/dist/normalize-error-CNjgVO71-CLlZ3CuJ.mjs +121 -0
- package/dist/normalize-error-CNjgVO71-CLlZ3CuJ.mjs.map +1 -0
- package/dist/op-factory-call-DifL68KT-Bo6pxs-R.mjs +2009 -0
- package/dist/op-factory-call-DifL68KT-Bo6pxs-R.mjs.map +1 -0
- package/dist/op-factory-call-FEA5mnWH.d.mts +1 -0
- package/dist/op-factory-call-jd4cgfjA-CyNT4YVn.d.mts +521 -0
- package/dist/op-factory-call-jd4cgfjA-CyNT4YVn.d.mts.map +1 -0
- package/dist/operation-types-BfRocNI8.d.mts +22 -0
- package/dist/operation-types-BfRocNI8.d.mts.map +1 -0
- package/dist/pack-DFM4tmob.d.mts +610 -0
- package/dist/pack-DFM4tmob.d.mts.map +1 -0
- package/dist/planner-Bmje9ii8-B99fEsNM.mjs +588 -0
- package/dist/planner-Bmje9ii8-B99fEsNM.mjs.map +1 -0
- package/dist/planner-DL4Bh5Nk.d.mts +163 -0
- package/dist/planner-DL4Bh5Nk.d.mts.map +1 -0
- package/dist/planner-ddl-builders-CbfICQfm-CxYiLrhX.mjs +102 -0
- package/dist/planner-ddl-builders-CbfICQfm-CxYiLrhX.mjs.map +1 -0
- package/dist/planner-ddl-builders-ijp60-JO.d.mts +19 -0
- package/dist/planner-ddl-builders-ijp60-JO.d.mts.map +1 -0
- package/dist/planner-identity-values-BmHn5C6U-BYBbUAyR.mjs +90 -0
- package/dist/planner-identity-values-BmHn5C6U-BYBbUAyR.mjs.map +1 -0
- package/dist/planner-identity-values-TfEhnoWa.d.mts +25 -0
- package/dist/planner-identity-values-TfEhnoWa.d.mts.map +1 -0
- package/dist/planner-produced-postgres-migration-B0PQLLUb-qsS6cQqX.d.mts +25 -0
- package/dist/planner-produced-postgres-migration-B0PQLLUb-qsS6cQqX.d.mts.map +1 -0
- package/dist/planner-produced-postgres-migration-C3GPZWeC.d.mts +1 -0
- package/dist/planner-produced-postgres-migration-Cicg2sXg-Ck9iDxGI.mjs +47 -0
- package/dist/planner-produced-postgres-migration-Cicg2sXg-Ck9iDxGI.mjs.map +1 -0
- package/dist/planner-schema-lookup-C4DHAddq.d.mts +21 -0
- package/dist/planner-schema-lookup-C4DHAddq.d.mts.map +1 -0
- package/dist/planner-schema-lookup-kMIVP2y--CdO4VlnF.mjs +57 -0
- package/dist/planner-schema-lookup-kMIVP2y--CdO4VlnF.mjs.map +1 -0
- package/dist/planner-sql-checks-CFgbRTJw.d.mts +20 -0
- package/dist/planner-sql-checks-CFgbRTJw.d.mts.map +1 -0
- package/dist/planner-sql-checks-DRc_78n8-C9nHOrvU.mjs +152 -0
- package/dist/planner-sql-checks-DRc_78n8-C9nHOrvU.mjs.map +1 -0
- package/dist/planner-target-details-HkP4RrRO-_xPQVPF0.d.mts +12 -0
- package/dist/planner-target-details-HkP4RrRO-_xPQVPF0.d.mts.map +1 -0
- package/dist/planner-type-resolution-Bt2f_q-F-C4T6YTae.mjs +15 -0
- package/dist/planner-type-resolution-Bt2f_q-F-C4T6YTae.mjs.map +1 -0
- package/dist/postgres-contract-view-2OP5JnXl-D2fpy4-8.d.mts +36 -0
- package/dist/postgres-contract-view-2OP5JnXl-D2fpy4-8.d.mts.map +1 -0
- package/dist/postgres-contract-view-FdLX7dV9-Cat1VKV9.mjs +144 -0
- package/dist/postgres-contract-view-FdLX7dV9-Cat1VKV9.mjs.map +1 -0
- package/dist/postgres-database-schema-node-CyfpHXDr-BqyozkQE.d.mts +285 -0
- package/dist/postgres-database-schema-node-CyfpHXDr-BqyozkQE.d.mts.map +1 -0
- package/dist/postgres-migration-CDJj7CvD-Bsqs_fVo.d.mts +260 -0
- package/dist/postgres-migration-CDJj7CvD-Bsqs_fVo.d.mts.map +1 -0
- package/dist/postgres-migration-CJshdIZn-DYYjgdD0.mjs +201 -0
- package/dist/postgres-migration-CJshdIZn-DYYjgdD0.mjs.map +1 -0
- package/dist/postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs +45 -0
- package/dist/postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs.map +1 -0
- package/dist/postgres-rls-policy-CnDxf3z9-C3LIHAIG.d.mts +61 -0
- package/dist/postgres-rls-policy-CnDxf3z9-C3LIHAIG.d.mts.map +1 -0
- package/dist/postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs +204 -0
- package/dist/postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs.map +1 -0
- package/dist/postgres-schema-KSzLDONj-CsXGoY8b.mjs +421 -0
- package/dist/postgres-schema-KSzLDONj-CsXGoY8b.mjs.map +1 -0
- package/dist/postgres-schema-Xsjt3RKO-Buv2X8ai.d.mts +269 -0
- package/dist/postgres-schema-Xsjt3RKO-Buv2X8ai.d.mts.map +1 -0
- package/dist/postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs +212 -0
- package/dist/postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs.map +1 -0
- package/dist/render-ops-DPwhZt2W.d.mts +11 -0
- package/dist/render-ops-DPwhZt2W.d.mts.map +1 -0
- package/dist/render-ops-DxzTxSsv-Bz85uUHk.mjs +34 -0
- package/dist/render-ops-DxzTxSsv-Bz85uUHk.mjs.map +1 -0
- package/dist/render-typescript-6sCFvMBh.d.mts +21 -0
- package/dist/render-typescript-6sCFvMBh.d.mts.map +1 -0
- package/dist/render-typescript-Cw3lFO28-Cx0lXWmv.mjs +117 -0
- package/dist/render-typescript-Cw3lFO28-Cx0lXWmv.mjs.map +1 -0
- package/dist/resolve-ddl-schema-CxqlLW47-0GiHRziS.mjs +22 -0
- package/dist/resolve-ddl-schema-CxqlLW47-0GiHRziS.mjs.map +1 -0
- package/dist/runtime-BbSRVwdd.d.mts +12 -0
- package/dist/runtime-BbSRVwdd.d.mts.map +1 -0
- package/dist/runtime-CDewySU9.d.mts +55 -0
- package/dist/runtime-CDewySU9.d.mts.map +1 -0
- package/dist/runtime-_TfO66h5.d.mts +32 -0
- package/dist/runtime-_TfO66h5.d.mts.map +1 -0
- package/dist/schema-ir-annotations-DuuYh0gl.d.mts +15 -0
- package/dist/schema-ir-annotations-DuuYh0gl.d.mts.map +1 -0
- package/dist/schema-node-kinds-qlnURWJy-Bo30pwTM.d.mts +30 -0
- package/dist/schema-node-kinds-qlnURWJy-Bo30pwTM.d.mts.map +1 -0
- package/dist/sql-utils-BnBlQxyh-DaX9Nb7Z.mjs +90 -0
- package/dist/sql-utils-BnBlQxyh-DaX9Nb7Z.mjs.map +1 -0
- package/dist/sql-utils-DW6fkczF.d.mts +62 -0
- package/dist/sql-utils-DW6fkczF.d.mts.map +1 -0
- package/dist/table-source-ikHOZmhD-DriY1Lcr.d.mts +15 -0
- package/dist/table-source-ikHOZmhD-DriY1Lcr.d.mts.map +1 -0
- package/dist/target.d.mts +47 -0
- package/dist/target.mjs +34 -0
- package/dist/target__codec-descriptor.d.mts +3 -0
- package/dist/target__codec-descriptor.mjs +2 -0
- package/dist/target__codec-ids.d.mts +3 -0
- package/dist/target__codec-ids.mjs +2 -0
- package/dist/target__codec-types.d.mts +4 -0
- package/dist/target__codec-types.mjs +1 -0
- package/dist/target__codecs.d.mts +3 -0
- package/dist/target__codecs.mjs +3 -0
- package/dist/target__contract-free.d.mts +3 -0
- package/dist/target__contract-free.mjs +4 -0
- package/dist/target__control.d.mts +2 -0
- package/dist/target__control.mjs +2 -0
- package/dist/target__data-transform.d.mts +3 -0
- package/dist/target__data-transform.mjs +2 -0
- package/dist/target__ddl.d.mts +4 -0
- package/dist/target__ddl.mjs +2 -0
- package/dist/target__default-normalizer.d.mts +2 -0
- package/dist/target__default-normalizer.mjs +2 -0
- package/dist/target__diff-database-schema.d.mts +2 -0
- package/dist/target__diff-database-schema.mjs +2 -0
- package/dist/target__errors.d.mts +2 -0
- package/dist/target__errors.mjs +2 -0
- package/dist/target__issue-planner.d.mts +2 -0
- package/dist/target__issue-planner.mjs +2 -0
- package/dist/target__migration.d.mts +4 -0
- package/dist/target__migration.mjs +5 -0
- package/dist/target__native-type-normalizer.d.mts +2 -0
- package/dist/target__native-type-normalizer.mjs +2 -0
- package/dist/target__op-factory-call.d.mts +3 -0
- package/dist/target__op-factory-call.mjs +2 -0
- package/dist/target__pack.d.mts +2 -0
- package/dist/target__pack.mjs +2 -0
- package/dist/target__planner-ddl-builders.d.mts +2 -0
- package/dist/target__planner-ddl-builders.mjs +2 -0
- package/dist/target__planner-identity-values.d.mts +2 -0
- package/dist/target__planner-identity-values.mjs +2 -0
- package/dist/target__planner-produced-postgres-migration.d.mts +3 -0
- package/dist/target__planner-produced-postgres-migration.mjs +2 -0
- package/dist/target__planner-schema-lookup.d.mts +2 -0
- package/dist/target__planner-schema-lookup.mjs +2 -0
- package/dist/target__planner-sql-checks.d.mts +2 -0
- package/dist/target__planner-sql-checks.mjs +2 -0
- package/dist/target__planner-target-details.d.mts +2 -0
- package/dist/target__planner-target-details.mjs +1 -0
- package/dist/target__planner.d.mts +2 -0
- package/dist/target__planner.mjs +3 -0
- package/dist/target__render-ops.d.mts +2 -0
- package/dist/target__render-ops.mjs +2 -0
- package/dist/target__render-typescript.d.mts +2 -0
- package/dist/target__render-typescript.mjs +2 -0
- package/dist/target__rls-canonicalize.d.mts +2 -0
- package/dist/target__rls-canonicalize.mjs +2 -0
- package/dist/target__runtime.d.mts +3 -0
- package/dist/target__runtime.mjs +23 -0
- package/dist/target__runtime.mjs.map +1 -0
- package/dist/target__schema-ir-annotations.d.mts +2 -0
- package/dist/target__schema-ir-annotations.mjs +2 -0
- package/dist/target__sql-utils.d.mts +2 -0
- package/dist/target__sql-utils.mjs +2 -0
- package/dist/target__types.d.mts +7 -0
- package/dist/target__types.mjs +5 -0
- package/dist/types-CkryN1AS-6MNZLjLY.d.mts +27 -0
- package/dist/types-CkryN1AS-6MNZLjLY.d.mts.map +1 -0
- package/dist/types-Cp_Jf2tk.d.mts +1 -0
- package/dist/types-ue6jkJyF-BQJzjx1P.d.mts +10 -0
- package/dist/types-ue6jkJyF-BQJzjx1P.d.mts.map +1 -0
- package/dist/types-xa86TkcV.d.mts +32 -0
- package/dist/types-xa86TkcV.d.mts.map +1 -0
- package/package.json +95 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
import { t as errorPostgresMigrationStackMissing } from "./errors-kYxOQjdD-D4T3rbVp.mjs";
|
|
2
|
+
import { i as PostgresRlsPolicy } from "./postgres-schema-KSzLDONj-CsXGoY8b.mjs";
|
|
3
|
+
import { A as RenamePostgresRlsPolicyCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, F as installExtension, M as SetNotNullCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, h as CreateTableCall, i as AddNativeEnumValueCall, j as SetDefaultCall, k as RenameIndexCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, p as CreatePostgresRlsPolicyCall, r as AddForeignKeyCall, s as AddPrimaryKeyCall, t as AddCheckConstraintCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-DifL68KT-Bo6pxs-R.mjs";
|
|
4
|
+
import { n as PostgresContractView } from "./postgres-contract-view-FdLX7dV9-Cat1VKV9.mjs";
|
|
5
|
+
import { t as dataTransform } from "./data-transform-ChZzy2dP-CxVCat_8.mjs";
|
|
6
|
+
import { Migration } from "@prisma/orm-family-sql/family/migration";
|
|
7
|
+
import { MigrationContractViews } from "@prisma/orm-toolchain/migration-tools/migration";
|
|
8
|
+
//#region ../../../3-targets/3-targets/postgres/dist/postgres-migration-CJshdIZn.mjs
|
|
9
|
+
/**
|
|
10
|
+
* Target-owned base class for Postgres migrations.
|
|
11
|
+
*
|
|
12
|
+
* Fixes the `SqlMigration` generic to `PostgresPlanTargetDetails` and the
|
|
13
|
+
* abstract `targetId` to the Postgres target-id string literal, so both
|
|
14
|
+
* user-authored migrations and renderer-generated scaffolds (the output of
|
|
15
|
+
* `renderCallsToTypeScript`) can extend `PostgresMigration` directly without
|
|
16
|
+
* redeclaring target-local identity.
|
|
17
|
+
*
|
|
18
|
+
* Mirrors `MongoMigration` in `@internal/family-mongo`: the renderer
|
|
19
|
+
* emits `extends Migration` against a facade re-export of this class
|
|
20
|
+
* from `@internal/postgres/migration`, keeping the authoring surface
|
|
21
|
+
* target-scoped rather than family-scoped.
|
|
22
|
+
*
|
|
23
|
+
* The constructor materializes a single Postgres `SqlControlAdapter` from
|
|
24
|
+
* `stack.adapter.create(stack)` and stores it; the protected `dataTransform`
|
|
25
|
+
* instance method forwards to the free `dataTransform` factory with that
|
|
26
|
+
* stored adapter, so user migrations can write `this.dataTransform(...)`
|
|
27
|
+
* without threading the adapter through every call.
|
|
28
|
+
*
|
|
29
|
+
* Every method requires an explicit `schema`. Postgres migrations name their
|
|
30
|
+
* schema deliberately — there is no default and no `search_path`-relative
|
|
31
|
+
* option. A migration that left the schema unspecified would resolve against
|
|
32
|
+
* whatever `search_path` the connection happened to carry, and that ambiguity
|
|
33
|
+
* is an antipattern in a migration. (The unbound/unspecified namespace concept
|
|
34
|
+
* remains for SQLite, which has no schemas, and for Mongo's connection `db`.)
|
|
35
|
+
*/
|
|
36
|
+
var PostgresMigration = class extends Migration {
|
|
37
|
+
targetId = "postgres";
|
|
38
|
+
/**
|
|
39
|
+
* Materialized Postgres control adapter, created once per migration
|
|
40
|
+
* instance from the injected stack. `undefined` only when the migration
|
|
41
|
+
* was instantiated without a stack (test fixtures); `controlAdapterFor`
|
|
42
|
+
* throws a MIGRATION.POSTGRES_CONTROL_STACK_MISSING in that case to surface the misuse.
|
|
43
|
+
*/
|
|
44
|
+
controlAdapter;
|
|
45
|
+
#endView = new MigrationContractViews(this, "PostgresMigration", (json) => PostgresContractView.fromJson(json));
|
|
46
|
+
#startView = new MigrationContractViews(this, "PostgresMigration", (json) => PostgresContractView.fromJson(json));
|
|
47
|
+
constructor(stack) {
|
|
48
|
+
super(stack);
|
|
49
|
+
this.controlAdapter = stack?.adapter ? stack.adapter.create(stack) : void 0;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Returns the materialized control adapter, or throws a MIGRATION.POSTGRES_CONTROL_STACK_MISSING naming
|
|
53
|
+
* `operation` when the migration was constructed without a `ControlStack`.
|
|
54
|
+
* Single home for the null-check that every DDL/DML method shares.
|
|
55
|
+
*/
|
|
56
|
+
controlAdapterFor(operation) {
|
|
57
|
+
if (!this.controlAdapter) throw errorPostgresMigrationStackMissing(operation);
|
|
58
|
+
return this.controlAdapter;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* The typed, schema-qualified Postgres view over this migration's end-state
|
|
62
|
+
* contract — `this.endContract.namespace.<schema>.table.<name>`, etc. Throws
|
|
63
|
+
* if no `endContractJson` was provided.
|
|
64
|
+
*/
|
|
65
|
+
get endContract() {
|
|
66
|
+
return this.#endView.endContract;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* The typed Postgres view over this migration's start-state contract, or
|
|
70
|
+
* `null` for a baseline migration (no `startContractJson`).
|
|
71
|
+
*/
|
|
72
|
+
get startContract() {
|
|
73
|
+
return this.#startView.startContract;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* Instance-method wrapper around the free `dataTransform` factory that
|
|
77
|
+
* supplies the stored control adapter. Authors call this from inside
|
|
78
|
+
* `get operations()`; the adapter argument is hidden from the call site.
|
|
79
|
+
*/
|
|
80
|
+
dataTransform(contract, name, options) {
|
|
81
|
+
return dataTransform(contract, name, options, this.controlAdapterFor("dataTransform"));
|
|
82
|
+
}
|
|
83
|
+
/**
|
|
84
|
+
* Emit a `CREATE TABLE` migration operation. Builds a typed DDL node from
|
|
85
|
+
* the supplied options and lowers it through the stored control adapter.
|
|
86
|
+
* Throws if no adapter is present (i.e. migration instantiated without a stack).
|
|
87
|
+
*/
|
|
88
|
+
createTable(options) {
|
|
89
|
+
return new CreateTableCall(options.schema, options.table, options.columns, options.constraints).toOp(this.controlAdapterFor("createTable"));
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Emit a `CREATE SCHEMA` migration operation. Builds a typed DDL node from
|
|
93
|
+
* the supplied options and lowers it through the stored control adapter.
|
|
94
|
+
* Throws if no adapter is present (i.e. migration instantiated without a stack).
|
|
95
|
+
*/
|
|
96
|
+
createSchema(options) {
|
|
97
|
+
return new CreateSchemaCall(options.schema).toOp(this.controlAdapterFor("createSchema"));
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Emit a `CREATE TYPE ... AS ENUM (...)` migration operation for a managed
|
|
101
|
+
* native enum. Builds a typed DDL node and lowers it through the stored
|
|
102
|
+
* control adapter (members render in declaration order). Throws if no adapter
|
|
103
|
+
* is present.
|
|
104
|
+
*/
|
|
105
|
+
createNativeEnumType(options) {
|
|
106
|
+
return new CreateNativeEnumTypeCall(options.schema, options.typeName, options.members).toOp(this.controlAdapterFor("createNativeEnumType"));
|
|
107
|
+
}
|
|
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
|
+
dropNativeEnumType(options) {
|
|
113
|
+
return new DropNativeEnumTypeCall(options.schema, options.typeName).toOp(this.controlAdapterFor("dropNativeEnumType"));
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Emit an `ALTER TYPE ... ADD VALUE` migration operation appending one
|
|
117
|
+
* member to a managed native enum, lowered through the stored control
|
|
118
|
+
* adapter. Throws if no adapter is present. Every appended value is its
|
|
119
|
+
* own operation — call this once per value to append more than one.
|
|
120
|
+
*/
|
|
121
|
+
addNativeEnumValue(options) {
|
|
122
|
+
return new AddNativeEnumValueCall(options.schema, options.typeName, options.value).toOp(this.controlAdapterFor("addNativeEnumValue"));
|
|
123
|
+
}
|
|
124
|
+
addColumn(options) {
|
|
125
|
+
return new AddColumnCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor("addColumn"));
|
|
126
|
+
}
|
|
127
|
+
addPrimaryKey(options) {
|
|
128
|
+
return new AddPrimaryKeyCall(options.schema, options.table, options.constraint, options.columns).toOp(this.controlAdapterFor("addPrimaryKey"));
|
|
129
|
+
}
|
|
130
|
+
addUnique(options) {
|
|
131
|
+
return new AddUniqueCall(options.schema, options.table, options.constraint, options.columns).toOp(this.controlAdapterFor("addUnique"));
|
|
132
|
+
}
|
|
133
|
+
addForeignKey(options) {
|
|
134
|
+
return new AddForeignKeyCall(options.schema, options.table, options.foreignKey).toOp(this.controlAdapterFor("addForeignKey"));
|
|
135
|
+
}
|
|
136
|
+
addCheckConstraint(options) {
|
|
137
|
+
return new AddCheckConstraintCall(options.schema, options.table, options.constraint, options.column, options.values).toOp(this.controlAdapterFor("addCheckConstraint"));
|
|
138
|
+
}
|
|
139
|
+
dropCheckConstraint(options) {
|
|
140
|
+
return new DropCheckConstraintCall(options.schema, options.table, options.constraint).toOp(this.controlAdapterFor("dropCheckConstraint"));
|
|
141
|
+
}
|
|
142
|
+
dropConstraint(options) {
|
|
143
|
+
return new DropConstraintCall(options.schema, options.table, options.constraint, options.kind ?? "unique").toOp(this.controlAdapterFor("dropConstraint"));
|
|
144
|
+
}
|
|
145
|
+
dropTable(options) {
|
|
146
|
+
return new DropTableCall(options.schema, options.table).toOp(this.controlAdapterFor("dropTable"));
|
|
147
|
+
}
|
|
148
|
+
dropColumn(options) {
|
|
149
|
+
return new DropColumnCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor("dropColumn"));
|
|
150
|
+
}
|
|
151
|
+
alterColumnType(options) {
|
|
152
|
+
return new AlterColumnTypeCall(options.schema, options.table, options.column, options.options).toOp(this.controlAdapterFor("alterColumnType"));
|
|
153
|
+
}
|
|
154
|
+
setNotNull(options) {
|
|
155
|
+
return new SetNotNullCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor("setNotNull"));
|
|
156
|
+
}
|
|
157
|
+
dropNotNull(options) {
|
|
158
|
+
return new DropNotNullCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor("dropNotNull"));
|
|
159
|
+
}
|
|
160
|
+
setDefault(options) {
|
|
161
|
+
return new SetDefaultCall(options.schema, options.table, options.column, options.defaultSql, options.operationClass).toOp(this.controlAdapterFor("setDefault"));
|
|
162
|
+
}
|
|
163
|
+
dropDefault(options) {
|
|
164
|
+
return new DropDefaultCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor("dropDefault"));
|
|
165
|
+
}
|
|
166
|
+
createIndex(options) {
|
|
167
|
+
return new CreateIndexCall(options.schema, options.table, options.index, options.columns !== void 0 ? { columns: options.columns } : { expression: options.expression }, options.extras).toOp(this.controlAdapterFor("createIndex"));
|
|
168
|
+
}
|
|
169
|
+
renameIndex(options) {
|
|
170
|
+
return new RenameIndexCall(options.schema, options.table, options.from, options.to).toOp(this.controlAdapterFor("renameIndex"));
|
|
171
|
+
}
|
|
172
|
+
dropIndex(options) {
|
|
173
|
+
return new DropIndexCall(options.schema, options.table, options.index).toOp(this.controlAdapterFor("dropIndex"));
|
|
174
|
+
}
|
|
175
|
+
installExtension(options) {
|
|
176
|
+
return installExtension(options, this.controlAdapterFor("installExtension"));
|
|
177
|
+
}
|
|
178
|
+
enableRowLevelSecurity(options) {
|
|
179
|
+
return new EnableRowLevelSecurityCall(options.schema, options.table).toOp(this.controlAdapterFor("enableRowLevelSecurity"));
|
|
180
|
+
}
|
|
181
|
+
disableRowLevelSecurity(options) {
|
|
182
|
+
return new DisableRowLevelSecurityCall(options.schema, options.table).toOp(this.controlAdapterFor("disableRowLevelSecurity"));
|
|
183
|
+
}
|
|
184
|
+
createRlsPolicy(options) {
|
|
185
|
+
return new CreatePostgresRlsPolicyCall(options.schema, options.table, new PostgresRlsPolicy({
|
|
186
|
+
...options.policy,
|
|
187
|
+
using: options.policy.using,
|
|
188
|
+
withCheck: options.policy.withCheck
|
|
189
|
+
})).toOp(this.controlAdapterFor("createRlsPolicy"));
|
|
190
|
+
}
|
|
191
|
+
dropRlsPolicy(options) {
|
|
192
|
+
return new DropPostgresRlsPolicyCall(options.schema, options.table, options.policy).toOp(this.controlAdapterFor("dropRlsPolicy"));
|
|
193
|
+
}
|
|
194
|
+
renameRlsPolicy(options) {
|
|
195
|
+
return new RenamePostgresRlsPolicyCall(options.schema, options.table, options.from, options.to).toOp(this.controlAdapterFor("renameRlsPolicy"));
|
|
196
|
+
}
|
|
197
|
+
};
|
|
198
|
+
//#endregion
|
|
199
|
+
export { PostgresMigration as t };
|
|
200
|
+
|
|
201
|
+
//# sourceMappingURL=postgres-migration-CJshdIZn-DYYjgdD0.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres-migration-CJshdIZn-DYYjgdD0.mjs","names":["#endView","#startView"],"sources":["../../../../3-targets/3-targets/postgres/dist/postgres-migration-CJshdIZn.mjs"],"sourcesContent":["import { t as errorPostgresMigrationStackMissing } from \"./errors-kYxOQjdD.mjs\";\nimport { _ as PostgresRlsPolicy } from \"./postgres-schema-KSzLDONj.mjs\";\nimport { A as RenamePostgresRlsPolicyCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, I as installExtension, M as SetNotNullCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, h as CreateTableCall, i as AddNativeEnumValueCall, j as SetDefaultCall, k as RenameIndexCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, p as CreatePostgresRlsPolicyCall, r as AddForeignKeyCall, s as AddPrimaryKeyCall, t as AddCheckConstraintCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from \"./op-factory-call-DifL68KT.mjs\";\nimport { t as PostgresContractView } from \"./postgres-contract-view-FdLX7dV9.mjs\";\nimport { t as dataTransform } from \"./data-transform-ChZzy2dP.mjs\";\nimport { Migration } from \"@internal/family-sql/migration\";\nimport { MigrationContractViews } from \"@internal/migration-tools/migration\";\n//#region src/core/migrations/postgres-migration.ts\n/**\n* Target-owned base class for Postgres migrations.\n*\n* Fixes the `SqlMigration` generic to `PostgresPlanTargetDetails` and the\n* abstract `targetId` to the Postgres target-id string literal, so both\n* user-authored migrations and renderer-generated scaffolds (the output of\n* `renderCallsToTypeScript`) can extend `PostgresMigration` directly without\n* redeclaring target-local identity.\n*\n* Mirrors `MongoMigration` in `@internal/family-mongo`: the renderer\n* emits `extends Migration` against a facade re-export of this class\n* from `@internal/postgres/migration`, keeping the authoring surface\n* target-scoped rather than family-scoped.\n*\n* The constructor materializes a single Postgres `SqlControlAdapter` from\n* `stack.adapter.create(stack)` and stores it; the protected `dataTransform`\n* instance method forwards to the free `dataTransform` factory with that\n* stored adapter, so user migrations can write `this.dataTransform(...)`\n* without threading the adapter through every call.\n*\n* Every method requires an explicit `schema`. Postgres migrations name their\n* schema deliberately — there is no default and no `search_path`-relative\n* option. A migration that left the schema unspecified would resolve against\n* whatever `search_path` the connection happened to carry, and that ambiguity\n* is an antipattern in a migration. (The unbound/unspecified namespace concept\n* remains for SQLite, which has no schemas, and for Mongo's connection `db`.)\n*/\nvar PostgresMigration = class extends Migration {\n\ttargetId = \"postgres\";\n\t/**\n\t* Materialized Postgres control adapter, created once per migration\n\t* instance from the injected stack. `undefined` only when the migration\n\t* was instantiated without a stack (test fixtures); `controlAdapterFor`\n\t* throws a MIGRATION.POSTGRES_CONTROL_STACK_MISSING in that case to surface the misuse.\n\t*/\n\tcontrolAdapter;\n\t#endView = new MigrationContractViews(this, \"PostgresMigration\", (json) => PostgresContractView.fromJson(json));\n\t#startView = new MigrationContractViews(this, \"PostgresMigration\", (json) => PostgresContractView.fromJson(json));\n\tconstructor(stack) {\n\t\tsuper(stack);\n\t\tthis.controlAdapter = stack?.adapter ? stack.adapter.create(stack) : void 0;\n\t}\n\t/**\n\t* Returns the materialized control adapter, or throws a MIGRATION.POSTGRES_CONTROL_STACK_MISSING naming\n\t* `operation` when the migration was constructed without a `ControlStack`.\n\t* Single home for the null-check that every DDL/DML method shares.\n\t*/\n\tcontrolAdapterFor(operation) {\n\t\tif (!this.controlAdapter) throw errorPostgresMigrationStackMissing(operation);\n\t\treturn this.controlAdapter;\n\t}\n\t/**\n\t* The typed, schema-qualified Postgres view over this migration's end-state\n\t* contract — `this.endContract.namespace.<schema>.table.<name>`, etc. Throws\n\t* if no `endContractJson` was provided.\n\t*/\n\tget endContract() {\n\t\treturn this.#endView.endContract;\n\t}\n\t/**\n\t* The typed Postgres view over this migration's start-state contract, or\n\t* `null` for a baseline migration (no `startContractJson`).\n\t*/\n\tget startContract() {\n\t\treturn this.#startView.startContract;\n\t}\n\t/**\n\t* Instance-method wrapper around the free `dataTransform` factory that\n\t* supplies the stored control adapter. Authors call this from inside\n\t* `get operations()`; the adapter argument is hidden from the call site.\n\t*/\n\tdataTransform(contract, name, options) {\n\t\treturn dataTransform(contract, name, options, this.controlAdapterFor(\"dataTransform\"));\n\t}\n\t/**\n\t* Emit a `CREATE TABLE` migration operation. Builds a typed DDL node from\n\t* the supplied options and lowers it through the stored control adapter.\n\t* Throws if no adapter is present (i.e. migration instantiated without a stack).\n\t*/\n\tcreateTable(options) {\n\t\treturn new CreateTableCall(options.schema, options.table, options.columns, options.constraints).toOp(this.controlAdapterFor(\"createTable\"));\n\t}\n\t/**\n\t* Emit a `CREATE SCHEMA` migration operation. Builds a typed DDL node from\n\t* the supplied options and lowers it through the stored control adapter.\n\t* Throws if no adapter is present (i.e. migration instantiated without a stack).\n\t*/\n\tcreateSchema(options) {\n\t\treturn new CreateSchemaCall(options.schema).toOp(this.controlAdapterFor(\"createSchema\"));\n\t}\n\t/**\n\t* Emit a `CREATE TYPE ... AS ENUM (...)` migration operation for a managed\n\t* native enum. Builds a typed DDL node and lowers it through the stored\n\t* control adapter (members render in declaration order). Throws if no adapter\n\t* is present.\n\t*/\n\tcreateNativeEnumType(options) {\n\t\treturn new CreateNativeEnumTypeCall(options.schema, options.typeName, options.members).toOp(this.controlAdapterFor(\"createNativeEnumType\"));\n\t}\n\t/**\n\t* Emit a `DROP TYPE` migration operation for a managed native enum, lowered\n\t* through the stored control adapter. Throws if no adapter is present.\n\t*/\n\tdropNativeEnumType(options) {\n\t\treturn new DropNativeEnumTypeCall(options.schema, options.typeName).toOp(this.controlAdapterFor(\"dropNativeEnumType\"));\n\t}\n\t/**\n\t* Emit an `ALTER TYPE ... ADD VALUE` migration operation appending one\n\t* member to a managed native enum, lowered through the stored control\n\t* adapter. Throws if no adapter is present. Every appended value is its\n\t* own operation — call this once per value to append more than one.\n\t*/\n\taddNativeEnumValue(options) {\n\t\treturn new AddNativeEnumValueCall(options.schema, options.typeName, options.value).toOp(this.controlAdapterFor(\"addNativeEnumValue\"));\n\t}\n\taddColumn(options) {\n\t\treturn new AddColumnCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor(\"addColumn\"));\n\t}\n\taddPrimaryKey(options) {\n\t\treturn new AddPrimaryKeyCall(options.schema, options.table, options.constraint, options.columns).toOp(this.controlAdapterFor(\"addPrimaryKey\"));\n\t}\n\taddUnique(options) {\n\t\treturn new AddUniqueCall(options.schema, options.table, options.constraint, options.columns).toOp(this.controlAdapterFor(\"addUnique\"));\n\t}\n\taddForeignKey(options) {\n\t\treturn new AddForeignKeyCall(options.schema, options.table, options.foreignKey).toOp(this.controlAdapterFor(\"addForeignKey\"));\n\t}\n\taddCheckConstraint(options) {\n\t\treturn new AddCheckConstraintCall(options.schema, options.table, options.constraint, options.column, options.values).toOp(this.controlAdapterFor(\"addCheckConstraint\"));\n\t}\n\tdropCheckConstraint(options) {\n\t\treturn new DropCheckConstraintCall(options.schema, options.table, options.constraint).toOp(this.controlAdapterFor(\"dropCheckConstraint\"));\n\t}\n\tdropConstraint(options) {\n\t\treturn new DropConstraintCall(options.schema, options.table, options.constraint, options.kind ?? \"unique\").toOp(this.controlAdapterFor(\"dropConstraint\"));\n\t}\n\tdropTable(options) {\n\t\treturn new DropTableCall(options.schema, options.table).toOp(this.controlAdapterFor(\"dropTable\"));\n\t}\n\tdropColumn(options) {\n\t\treturn new DropColumnCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor(\"dropColumn\"));\n\t}\n\talterColumnType(options) {\n\t\treturn new AlterColumnTypeCall(options.schema, options.table, options.column, options.options).toOp(this.controlAdapterFor(\"alterColumnType\"));\n\t}\n\tsetNotNull(options) {\n\t\treturn new SetNotNullCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor(\"setNotNull\"));\n\t}\n\tdropNotNull(options) {\n\t\treturn new DropNotNullCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor(\"dropNotNull\"));\n\t}\n\tsetDefault(options) {\n\t\treturn new SetDefaultCall(options.schema, options.table, options.column, options.defaultSql, options.operationClass).toOp(this.controlAdapterFor(\"setDefault\"));\n\t}\n\tdropDefault(options) {\n\t\treturn new DropDefaultCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor(\"dropDefault\"));\n\t}\n\tcreateIndex(options) {\n\t\treturn new CreateIndexCall(options.schema, options.table, options.index, options.columns !== void 0 ? { columns: options.columns } : { expression: options.expression }, options.extras).toOp(this.controlAdapterFor(\"createIndex\"));\n\t}\n\trenameIndex(options) {\n\t\treturn new RenameIndexCall(options.schema, options.table, options.from, options.to).toOp(this.controlAdapterFor(\"renameIndex\"));\n\t}\n\tdropIndex(options) {\n\t\treturn new DropIndexCall(options.schema, options.table, options.index).toOp(this.controlAdapterFor(\"dropIndex\"));\n\t}\n\tinstallExtension(options) {\n\t\treturn installExtension(options, this.controlAdapterFor(\"installExtension\"));\n\t}\n\tenableRowLevelSecurity(options) {\n\t\treturn new EnableRowLevelSecurityCall(options.schema, options.table).toOp(this.controlAdapterFor(\"enableRowLevelSecurity\"));\n\t}\n\tdisableRowLevelSecurity(options) {\n\t\treturn new DisableRowLevelSecurityCall(options.schema, options.table).toOp(this.controlAdapterFor(\"disableRowLevelSecurity\"));\n\t}\n\tcreateRlsPolicy(options) {\n\t\treturn new CreatePostgresRlsPolicyCall(options.schema, options.table, new PostgresRlsPolicy({\n\t\t\t...options.policy,\n\t\t\tusing: options.policy.using,\n\t\t\twithCheck: options.policy.withCheck\n\t\t})).toOp(this.controlAdapterFor(\"createRlsPolicy\"));\n\t}\n\tdropRlsPolicy(options) {\n\t\treturn new DropPostgresRlsPolicyCall(options.schema, options.table, options.policy).toOp(this.controlAdapterFor(\"dropRlsPolicy\"));\n\t}\n\trenameRlsPolicy(options) {\n\t\treturn new RenamePostgresRlsPolicyCall(options.schema, options.table, options.from, options.to).toOp(this.controlAdapterFor(\"renameRlsPolicy\"));\n\t}\n};\n//#endregion\nexport { PostgresMigration as t };\n\n//# sourceMappingURL=postgres-migration-CJshdIZn.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmCA,IAAI,oBAAoB,cAAc,UAAU;CAC/C,WAAW;;;;;;;CAOX;CACA,WAAW,IAAI,uBAAuB,MAAM,sBAAsB,SAAS,qBAAqB,SAAS,IAAI,CAAC;CAC9G,aAAa,IAAI,uBAAuB,MAAM,sBAAsB,SAAS,qBAAqB,SAAS,IAAI,CAAC;CAChH,YAAY,OAAO;EAClB,MAAM,KAAK;EACX,KAAK,iBAAiB,OAAO,UAAU,MAAM,QAAQ,OAAO,KAAK,IAAI,KAAK;CAC3E;;;;;;CAMA,kBAAkB,WAAW;EAC5B,IAAI,CAAC,KAAK,gBAAgB,MAAM,mCAAmC,SAAS;EAC5E,OAAO,KAAK;CACb;;;;;;CAMA,IAAI,cAAc;EACjB,OAAO,KAAKA,SAAS;CACtB;;;;;CAKA,IAAI,gBAAgB;EACnB,OAAO,KAAKC,WAAW;CACxB;;;;;;CAMA,cAAc,UAAU,MAAM,SAAS;EACtC,OAAO,cAAc,UAAU,MAAM,SAAS,KAAK,kBAAkB,eAAe,CAAC;CACtF;;;;;;CAMA,YAAY,SAAS;EACpB,OAAO,IAAI,gBAAgB,QAAQ,QAAQ,QAAQ,OAAO,QAAQ,SAAS,QAAQ,WAAW,CAAC,CAAC,KAAK,KAAK,kBAAkB,aAAa,CAAC;CAC3I;;;;;;CAMA,aAAa,SAAS;EACrB,OAAO,IAAI,iBAAiB,QAAQ,MAAM,CAAC,CAAC,KAAK,KAAK,kBAA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S;EACxB,OAAO,IAAI,4BAA4B,QAAQ,QAAQ,QAAQ,OAAO,QAAQ,MAAM,QAAQ,EAAE,CAAC,CAAC,KAAK,KAAK,kBAAkB,iBAAiB,CAAC;CAC/I;AACD"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
2
|
+
import { freezeNode } from "@prisma/orm-framework/components/ir";
|
|
3
|
+
import { SqlNode } from "@prisma/orm-family-sql/contract/types";
|
|
4
|
+
//#region ../../../3-targets/3-targets/postgres/dist/postgres-native-enum-CdP3b_-R.mjs
|
|
5
|
+
function freezeMembers(members) {
|
|
6
|
+
return blindCast(Object.freeze([...members]));
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Postgres contract-IR class for a native enum type (`CREATE TYPE … AS ENUM (…)`).
|
|
10
|
+
*
|
|
11
|
+
* This is an authored, serialized Contract-IR entity — it is registered as an entity
|
|
12
|
+
* kind, extends `SqlNode`, and is stored in `contract.json`. It is NOT a DiffableNode;
|
|
13
|
+
* the schema-diff tree will use `PostgresNativeEnumSchemaNode` when the managed phase
|
|
14
|
+
* builds it.
|
|
15
|
+
*
|
|
16
|
+
* A member is a value, not a name→value pair — matching `CREATE TYPE … AS ENUM
|
|
17
|
+
* ('a', 'b')`, which has no separate member name.
|
|
18
|
+
*
|
|
19
|
+
* Target-only concept — no SQL-family abstract. Extends `SqlNode` directly,
|
|
20
|
+
* frozen at construction via `freezeNode(this)`. The `kind: 'postgres-enum'`
|
|
21
|
+
* discriminant is enumerable so it survives JSON. Lives at
|
|
22
|
+
* `storage.namespaces[ns].entries.native_enum[HandleName]`; the entries key
|
|
23
|
+
* (`native_enum`) is the entity-kind descriptor's `kind`, decoupled from this
|
|
24
|
+
* node's own `kind` literal — the same shape as `table`/`StorageTable` and
|
|
25
|
+
* `valueSet`/`StorageValueSet`.
|
|
26
|
+
*/
|
|
27
|
+
var PostgresNativeEnum = class extends SqlNode {
|
|
28
|
+
static is(node) {
|
|
29
|
+
return typeof node === "object" && node !== null && "kind" in node && node.kind === "postgres-enum";
|
|
30
|
+
}
|
|
31
|
+
kind = "postgres-enum";
|
|
32
|
+
typeName;
|
|
33
|
+
members;
|
|
34
|
+
constructor(input) {
|
|
35
|
+
super();
|
|
36
|
+
this.typeName = input.typeName;
|
|
37
|
+
this.members = freezeMembers(input.members);
|
|
38
|
+
if (input.control !== void 0) this.control = input.control;
|
|
39
|
+
freezeNode(this);
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
//#endregion
|
|
43
|
+
export { PostgresNativeEnum as t };
|
|
44
|
+
|
|
45
|
+
//# sourceMappingURL=postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres-native-enum-CdP3b_-R-Cgz9KEKx.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/postgres-native-enum-CdP3b_-R.mjs"],"sourcesContent":["import { blindCast } from \"@internal/utils/casts\";\nimport { freezeNode } from \"@internal/framework-components/ir\";\nimport { SqlNode } from \"@internal/sql-contract/types\";\n//#region src/core/postgres-native-enum.ts\nfunction freezeMembers(members) {\n\treturn blindCast(Object.freeze([...members]));\n}\n/**\n* Postgres contract-IR class for a native enum type (`CREATE TYPE … AS ENUM (…)`).\n*\n* This is an authored, serialized Contract-IR entity — it is registered as an entity\n* kind, extends `SqlNode`, and is stored in `contract.json`. It is NOT a DiffableNode;\n* the schema-diff tree will use `PostgresNativeEnumSchemaNode` when the managed phase\n* builds it.\n*\n* A member is a value, not a name→value pair — matching `CREATE TYPE … AS ENUM\n* ('a', 'b')`, which has no separate member name.\n*\n* Target-only concept — no SQL-family abstract. Extends `SqlNode` directly,\n* frozen at construction via `freezeNode(this)`. The `kind: 'postgres-enum'`\n* discriminant is enumerable so it survives JSON. Lives at\n* `storage.namespaces[ns].entries.native_enum[HandleName]`; the entries key\n* (`native_enum`) is the entity-kind descriptor's `kind`, decoupled from this\n* node's own `kind` literal — the same shape as `table`/`StorageTable` and\n* `valueSet`/`StorageValueSet`.\n*/\nvar PostgresNativeEnum = class extends SqlNode {\n\tstatic is(node) {\n\t\treturn typeof node === \"object\" && node !== null && \"kind\" in node && node.kind === \"postgres-enum\";\n\t}\n\tkind = \"postgres-enum\";\n\ttypeName;\n\tmembers;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.typeName = input.typeName;\n\t\tthis.members = freezeMembers(input.members);\n\t\tif (input.control !== void 0) this.control = input.control;\n\t\tfreezeNode(this);\n\t}\n};\n//#endregion\nexport { PostgresNativeEnum as t };\n\n//# sourceMappingURL=postgres-native-enum-CdP3b_-R.mjs.map"],"mappings":";;;;AAIA,SAAS,cAAc,SAAS;CAC/B,OAAO,UAAU,OAAO,OAAO,CAAC,GAAG,OAAO,CAAC,CAAC;AAC7C;;;;;;;;;;;;;;;;;;;;AAoBA,IAAI,qBAAqB,cAAc,QAAQ;CAC9C,OAAO,GAAG,MAAM;EACf,OAAO,OAAO,SAAS,YAAY,SAAS,QAAQ,UAAU,QAAQ,KAAK,SAAS;CACrF;CACA,OAAO;CACP;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,WAAW,MAAM;EACtB,KAAK,UAAU,cAAc,MAAM,OAAO;EAC1C,IAAI,MAAM,YAAY,KAAK,GAAG,KAAK,UAAU,MAAM;EACnD,WAAW,IAAI;CAChB;AACD"}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { SqlNode } from "@prisma/orm-family-sql/contract/types";
|
|
2
|
+
import { SqlObjectNaming } from "@prisma/orm-family-sql/schema-ir/naming";
|
|
3
|
+
//#region ../../../3-targets/3-targets/postgres/dist/postgres-rls-policy-CnDxf3z9.d.mts
|
|
4
|
+
//#region src/core/postgres-rls-policy.d.ts
|
|
5
|
+
type RlsPolicyOperation = 'select' | 'insert' | 'update' | 'delete' | 'all';
|
|
6
|
+
interface PostgresRlsPolicyInput {
|
|
7
|
+
/** The policy's identity. Read back off a built entity with `namingOf`. */
|
|
8
|
+
readonly naming: SqlObjectNaming;
|
|
9
|
+
/** Name of the table this policy attaches to, by name within the same schema. */
|
|
10
|
+
readonly tableName: string;
|
|
11
|
+
/** Namespace coordinate (schema name). Policies are schema-scoped. */
|
|
12
|
+
readonly namespaceId: string;
|
|
13
|
+
readonly operation: RlsPolicyOperation;
|
|
14
|
+
/** Sorted role names rendered in `TO <roles>`. Plain strings for now. */
|
|
15
|
+
readonly roles: readonly string[];
|
|
16
|
+
/** USING predicate SQL string, if present. */
|
|
17
|
+
readonly using: string | undefined;
|
|
18
|
+
/** WITH CHECK predicate SQL string, if present. */
|
|
19
|
+
readonly withCheck: string | undefined;
|
|
20
|
+
/** `true` = `AS PERMISSIVE`, `false` = `AS RESTRICTIVE`. */
|
|
21
|
+
readonly permissive: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** Keys whose value may be absent become omittable. */
|
|
24
|
+
type AbsentKeysOmittable<T> = { [K in keyof T as undefined extends T[K] ? never : K]: T[K]; } & { [K in keyof T as undefined extends T[K] ? K : never]?: T[K]; };
|
|
25
|
+
/**
|
|
26
|
+
* The policy literal a generated migration file carries, and the parameter
|
|
27
|
+
* `Migration#createRlsPolicy` accepts. Same shape as
|
|
28
|
+
* {@link PostgresRlsPolicyInput} — naming union included — except that absent
|
|
29
|
+
* values are spelled by omitting the key, which is how a machine-rendered
|
|
30
|
+
* literal writes them. Deriving it keeps the field list in one place.
|
|
31
|
+
*/
|
|
32
|
+
type RenderedRlsPolicyLiteral = AbsentKeysOmittable<PostgresRlsPolicyInput>;
|
|
33
|
+
/**
|
|
34
|
+
* Postgres contract-IR class for a row-level security policy (`CREATE POLICY … ON …`).
|
|
35
|
+
*
|
|
36
|
+
* This is an authored, serialized Contract-IR entity — it is registered as an entity
|
|
37
|
+
* kind, extends `SqlNode`, and is stored in `contract.json`. It is NOT a DiffableNode;
|
|
38
|
+
* the schema-diff tree uses `PostgresPolicySchemaNode` for that role.
|
|
39
|
+
*
|
|
40
|
+
* Target-only concept — no SQL-family abstract. Extends `SqlNode` directly.
|
|
41
|
+
* Frozen at construction via `freezeNode(this)`. The `kind: 'policy'`
|
|
42
|
+
* discriminant is enumerable (overrides SqlNode's non-enumerable `'sql'`) so it
|
|
43
|
+
* survives JSON serialization and enables dispatch. The literal matches the
|
|
44
|
+
* entries key (one-string rule: node.kind === entries key === entity kind).
|
|
45
|
+
*/
|
|
46
|
+
declare class PostgresRlsPolicy extends SqlNode {
|
|
47
|
+
readonly kind: "policy";
|
|
48
|
+
readonly name: string;
|
|
49
|
+
readonly prefix?: string;
|
|
50
|
+
readonly tableName: string;
|
|
51
|
+
readonly namespaceId: string;
|
|
52
|
+
readonly operation: RlsPolicyOperation;
|
|
53
|
+
readonly roles: readonly string[];
|
|
54
|
+
readonly using?: string;
|
|
55
|
+
readonly withCheck?: string;
|
|
56
|
+
readonly permissive: boolean;
|
|
57
|
+
constructor(input: PostgresRlsPolicyInput);
|
|
58
|
+
}
|
|
59
|
+
//#endregion
|
|
60
|
+
export { RlsPolicyOperation as i, PostgresRlsPolicyInput as n, RenderedRlsPolicyLiteral as r, PostgresRlsPolicy as t };
|
|
61
|
+
//# sourceMappingURL=postgres-rls-policy-CnDxf3z9-C3LIHAIG.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres-rls-policy-CnDxf3z9-C3LIHAIG.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/postgres-rls-policy-CnDxf3z9.d.mts"],"mappings":";;;;KAGK;UACK;;WAEC,QAAQ;;WAER;;WAEA;WACA,WAAW;;WAEX;;WAEA;;WAEA;;WAEA;;;KAGN,oBAAoB,QAAQ,WAAW,uBAAuB,EAAE,aAAa,IAAI,EAAE,WAAW,WAAW,uBAAuB,EAAE,KAAK,aAAa,EAAE;;;;;;;;KAQtJ,2BAA2B,oBAAoB;;;;;;;;;;;;;;cActC,0BAA0B;WAC7B;WACA;WACA;WACA;WACA;WACA,WAAW;WACX;WACA;WACA;WACA;EACT,YAAY,OAAO"}
|
|
@@ -0,0 +1,204 @@
|
|
|
1
|
+
import { n as PostgresSchemaNodeKind } from "./postgres-table-schema-node-BBkitBQh-DT1T5VWU.mjs";
|
|
2
|
+
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
3
|
+
import { freezeNode } from "@prisma/orm-framework/components/ir";
|
|
4
|
+
import { nameOf } from "@prisma/orm-family-sql/schema-ir/naming";
|
|
5
|
+
import { SqlSchemaIRNode, assertNode, defineNonEnumerable } from "@prisma/orm-family-sql/schema-ir/types";
|
|
6
|
+
import { isArrayEqual } from "@prisma/orm-framework/utils/array-equal";
|
|
7
|
+
//#region ../../../3-targets/3-targets/postgres/dist/postgres-role-schema-node-B8Z5i5D-.mjs
|
|
8
|
+
/**
|
|
9
|
+
* The root of the Postgres schema-diff tree: one node per database.
|
|
10
|
+
*
|
|
11
|
+
* `id` is the fixed sentinel `'database'` — the root has no siblings and
|
|
12
|
+
* the value is never emitted into migration paths. `isEqualTo` is identity
|
|
13
|
+
* (roots always share the `'database'` id). `children()` yields the namespace
|
|
14
|
+
* nodes followed by the role nodes — both are root-level diff subjects. The
|
|
15
|
+
* differ pairs siblings by `(nodeKind, id)`, so a role and a namespace may
|
|
16
|
+
* share a name without colliding.
|
|
17
|
+
*/
|
|
18
|
+
var PostgresDatabaseSchemaNode = class PostgresDatabaseSchemaNode extends SqlSchemaIRNode {
|
|
19
|
+
nodeKind = PostgresSchemaNodeKind.database;
|
|
20
|
+
namespaces;
|
|
21
|
+
roles;
|
|
22
|
+
existingSchemas;
|
|
23
|
+
pgVersion;
|
|
24
|
+
constructor(input) {
|
|
25
|
+
super();
|
|
26
|
+
this.namespaces = Object.freeze({ ...input.namespaces });
|
|
27
|
+
this.roles = Object.freeze([...input.roles]);
|
|
28
|
+
this.existingSchemas = Object.freeze([...input.existingSchemas]);
|
|
29
|
+
this.pgVersion = input.pgVersion;
|
|
30
|
+
freezeNode(this);
|
|
31
|
+
}
|
|
32
|
+
get id() {
|
|
33
|
+
return "database";
|
|
34
|
+
}
|
|
35
|
+
isEqualTo(other) {
|
|
36
|
+
return this.id === other.id;
|
|
37
|
+
}
|
|
38
|
+
children() {
|
|
39
|
+
return [...Object.values(this.namespaces), ...this.roles];
|
|
40
|
+
}
|
|
41
|
+
static is(node) {
|
|
42
|
+
return node.nodeKind === PostgresSchemaNodeKind.database;
|
|
43
|
+
}
|
|
44
|
+
static assert(node) {
|
|
45
|
+
assertNode(node, "PostgresDatabaseSchemaNode", PostgresDatabaseSchemaNode.is);
|
|
46
|
+
}
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* One-per-Postgres-schema diff-tree node. Groups the tables belonging to a
|
|
50
|
+
* single namespace. Per-schema consumers (the relational planner,
|
|
51
|
+
* toSchemaView) read this node's `tables` field structurally via
|
|
52
|
+
* `blindCast`/`SqlSchemaIRNode` — not through a static `SqlSchemaIR`
|
|
53
|
+
* assignment — because `nodeKind` carries this node's own literal
|
|
54
|
+
* (`postgres-namespace`), distinct from `SqlSchemaIR`'s own (`sql-schema`).
|
|
55
|
+
*
|
|
56
|
+
* `id` is the schema name; `isEqualTo` is identity on it; `children()` returns
|
|
57
|
+
* the table nodes plus `nativeEnums`.
|
|
58
|
+
*
|
|
59
|
+
* `nativeEnums` is the diff-tree representation of native enum types the
|
|
60
|
+
* differ pairs — the sole enum carrier, built directly by both sides: the
|
|
61
|
+
* expected (contract-projected) side and introspection alike hand in
|
|
62
|
+
* `PostgresNativeEnumSchemaNode`s.
|
|
63
|
+
*/
|
|
64
|
+
var PostgresNamespaceSchemaNode = class PostgresNamespaceSchemaNode extends SqlSchemaIRNode {
|
|
65
|
+
nodeKind = PostgresSchemaNodeKind.namespace;
|
|
66
|
+
schemaName;
|
|
67
|
+
tables;
|
|
68
|
+
nativeEnums;
|
|
69
|
+
constructor(input) {
|
|
70
|
+
super();
|
|
71
|
+
this.schemaName = input.schemaName;
|
|
72
|
+
this.tables = Object.freeze({ ...input.tables });
|
|
73
|
+
this.nativeEnums = Object.freeze([...input.nativeEnums ?? []]);
|
|
74
|
+
freezeNode(this);
|
|
75
|
+
}
|
|
76
|
+
get id() {
|
|
77
|
+
return this.schemaName;
|
|
78
|
+
}
|
|
79
|
+
isEqualTo(other) {
|
|
80
|
+
return this.id === other.id;
|
|
81
|
+
}
|
|
82
|
+
children() {
|
|
83
|
+
return [...Object.values(this.tables), ...this.nativeEnums];
|
|
84
|
+
}
|
|
85
|
+
static is(node) {
|
|
86
|
+
return node.nodeKind === PostgresSchemaNodeKind.namespace;
|
|
87
|
+
}
|
|
88
|
+
static assert(node) {
|
|
89
|
+
assertNode(node, "PostgresNamespaceSchemaNode", PostgresNamespaceSchemaNode.is);
|
|
90
|
+
}
|
|
91
|
+
};
|
|
92
|
+
/**
|
|
93
|
+
* Schema-diff leaf node for a Postgres row-level security policy.
|
|
94
|
+
*
|
|
95
|
+
* This is a derived, transient node walked by the differ — it is NEVER serialized.
|
|
96
|
+
* Built by project-from-contract and project-from-database from their respective
|
|
97
|
+
* `PostgresRlsPolicy` contract entities / introspected rows.
|
|
98
|
+
*
|
|
99
|
+
* `id` is the full physical name. `isEqualTo` is mode-selected by the
|
|
100
|
+
* receiver's `prefix`: a wire-named receiver (`prefix` present) compares ids
|
|
101
|
+
* only — the wire name encodes a body hash, so name-equality is
|
|
102
|
+
* body-equality and predicate bodies are never byte-compared (Postgres
|
|
103
|
+
* reprints them). An exact receiver (`prefix` absent) compares content:
|
|
104
|
+
* `operation`/`permissive` strict, `roles` sorted, and `using ?? ''` /
|
|
105
|
+
* `withCheck ?? ''` verbatim byte-for-byte — reliable precisely when the
|
|
106
|
+
* body text was captured from a Postgres reprint (contract infer).
|
|
107
|
+
*/
|
|
108
|
+
var PostgresPolicySchemaNode = class PostgresPolicySchemaNode extends SqlSchemaIRNode {
|
|
109
|
+
nodeKind = PostgresSchemaNodeKind.policy;
|
|
110
|
+
name;
|
|
111
|
+
tableName;
|
|
112
|
+
namespaceId;
|
|
113
|
+
operation;
|
|
114
|
+
roles;
|
|
115
|
+
permissive;
|
|
116
|
+
constructor(input) {
|
|
117
|
+
super();
|
|
118
|
+
this.name = nameOf(input.naming);
|
|
119
|
+
if (input.naming.kind === "wire") this.prefix = input.naming.prefix;
|
|
120
|
+
this.tableName = input.tableName;
|
|
121
|
+
this.namespaceId = input.namespaceId;
|
|
122
|
+
this.operation = input.operation;
|
|
123
|
+
this.roles = Object.freeze([...input.roles]);
|
|
124
|
+
if (input.using !== void 0) this.using = input.using;
|
|
125
|
+
if (input.withCheck !== void 0) this.withCheck = input.withCheck;
|
|
126
|
+
this.permissive = input.permissive;
|
|
127
|
+
defineNonEnumerable(this, "dependsOn", input.dependsOn);
|
|
128
|
+
freezeNode(this);
|
|
129
|
+
}
|
|
130
|
+
get id() {
|
|
131
|
+
return this.name;
|
|
132
|
+
}
|
|
133
|
+
children() {
|
|
134
|
+
return [];
|
|
135
|
+
}
|
|
136
|
+
isEqualTo(other) {
|
|
137
|
+
const node = blindCast(other);
|
|
138
|
+
PostgresPolicySchemaNode.assert(node);
|
|
139
|
+
if (this.prefix !== void 0) return this.id === node.id;
|
|
140
|
+
return this.contentEquals(node);
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* The single policy content-equality relation — the exact-mode
|
|
144
|
+
* {@link isEqualTo} and the planner's rename content-pairing both call
|
|
145
|
+
* this rather than growing a parallel relation: `operation` and
|
|
146
|
+
* `permissive` strict, `roles` compared deduplicated-and-sorted (the same
|
|
147
|
+
* set semantics as the wire-hash tuple, so the two never disagree),
|
|
148
|
+
* `using`/`withCheck` VERBATIM byte-for-byte with absent ≡ empty —
|
|
149
|
+
* deliberately NOT the normalized wire-hash bodies.
|
|
150
|
+
*/
|
|
151
|
+
contentEquals(other) {
|
|
152
|
+
return this.operation === other.operation && this.permissive === other.permissive && isArrayEqual([...new Set(this.roles)].sort(), [...new Set(other.roles)].sort()) && (this.using ?? "") === (other.using ?? "") && (this.withCheck ?? "") === (other.withCheck ?? "");
|
|
153
|
+
}
|
|
154
|
+
static is(node) {
|
|
155
|
+
return node.nodeKind === PostgresSchemaNodeKind.policy;
|
|
156
|
+
}
|
|
157
|
+
static assert(node) {
|
|
158
|
+
assertNode(node, "PostgresPolicySchemaNode", PostgresPolicySchemaNode.is);
|
|
159
|
+
}
|
|
160
|
+
};
|
|
161
|
+
/**
|
|
162
|
+
* Schema-diff leaf node for a Postgres database role.
|
|
163
|
+
*
|
|
164
|
+
* This is a derived, transient node walked by the differ — it is NEVER serialized.
|
|
165
|
+
* Built by project-from-contract and project-from-database from their respective
|
|
166
|
+
* `PostgresRole` contract entities / introspected rows.
|
|
167
|
+
*
|
|
168
|
+
* Roles are cluster-scoped, so `id` is the bare role name. The differ pairs
|
|
169
|
+
* siblings by `(nodeKind, id)`, so a role and a namespace may share a name
|
|
170
|
+
* (role `public`, schema `public`) without colliding. `isEqualTo` compares
|
|
171
|
+
* ids — name-equality is role-equality for cluster-scoped objects.
|
|
172
|
+
*/
|
|
173
|
+
var PostgresRoleSchemaNode = class PostgresRoleSchemaNode extends SqlSchemaIRNode {
|
|
174
|
+
nodeKind = PostgresSchemaNodeKind.role;
|
|
175
|
+
name;
|
|
176
|
+
namespaceId;
|
|
177
|
+
constructor(input) {
|
|
178
|
+
super();
|
|
179
|
+
this.name = input.name;
|
|
180
|
+
this.namespaceId = input.namespaceId;
|
|
181
|
+
freezeNode(this);
|
|
182
|
+
}
|
|
183
|
+
get id() {
|
|
184
|
+
return this.name;
|
|
185
|
+
}
|
|
186
|
+
children() {
|
|
187
|
+
return [];
|
|
188
|
+
}
|
|
189
|
+
isEqualTo(other) {
|
|
190
|
+
const node = blindCast(other);
|
|
191
|
+
PostgresRoleSchemaNode.assert(node);
|
|
192
|
+
return this.id === node.id;
|
|
193
|
+
}
|
|
194
|
+
static is(node) {
|
|
195
|
+
return node.nodeKind === PostgresSchemaNodeKind.role;
|
|
196
|
+
}
|
|
197
|
+
static assert(node) {
|
|
198
|
+
assertNode(node, "PostgresRoleSchemaNode", PostgresRoleSchemaNode.is);
|
|
199
|
+
}
|
|
200
|
+
};
|
|
201
|
+
//#endregion
|
|
202
|
+
export { PostgresRoleSchemaNode as i, PostgresNamespaceSchemaNode as n, PostgresPolicySchemaNode as r, PostgresDatabaseSchemaNode as t };
|
|
203
|
+
|
|
204
|
+
//# sourceMappingURL=postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"postgres-role-schema-node-B8Z5i5D--PObwlU2Z.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/postgres-role-schema-node-B8Z5i5D-.mjs"],"sourcesContent":["import { r as PostgresSchemaNodeKind } from \"./postgres-table-schema-node-BBkitBQh.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { freezeNode } from \"@internal/framework-components/ir\";\nimport { nameOf } from \"@internal/sql-schema-ir/naming\";\nimport { SqlSchemaIRNode, assertNode, defineNonEnumerable } from \"@internal/sql-schema-ir/types\";\nimport { isArrayEqual } from \"@internal/utils/array-equal\";\n//#region src/core/schema-ir/postgres-database-schema-node.ts\n/**\n* The root of the Postgres schema-diff tree: one node per database.\n*\n* `id` is the fixed sentinel `'database'` — the root has no siblings and\n* the value is never emitted into migration paths. `isEqualTo` is identity\n* (roots always share the `'database'` id). `children()` yields the namespace\n* nodes followed by the role nodes — both are root-level diff subjects. The\n* differ pairs siblings by `(nodeKind, id)`, so a role and a namespace may\n* share a name without colliding.\n*/\nvar PostgresDatabaseSchemaNode = class PostgresDatabaseSchemaNode extends SqlSchemaIRNode {\n\tnodeKind = PostgresSchemaNodeKind.database;\n\tnamespaces;\n\troles;\n\texistingSchemas;\n\tpgVersion;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.namespaces = Object.freeze({ ...input.namespaces });\n\t\tthis.roles = Object.freeze([...input.roles]);\n\t\tthis.existingSchemas = Object.freeze([...input.existingSchemas]);\n\t\tthis.pgVersion = input.pgVersion;\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn \"database\";\n\t}\n\tisEqualTo(other) {\n\t\treturn this.id === other.id;\n\t}\n\tchildren() {\n\t\treturn [...Object.values(this.namespaces), ...this.roles];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === PostgresSchemaNodeKind.database;\n\t}\n\tstatic assert(node) {\n\t\tassertNode(node, \"PostgresDatabaseSchemaNode\", PostgresDatabaseSchemaNode.is);\n\t}\n};\n//#endregion\n//#region src/core/schema-ir/postgres-namespace-schema-node.ts\n/**\n* One-per-Postgres-schema diff-tree node. Groups the tables belonging to a\n* single namespace. Per-schema consumers (the relational planner,\n* toSchemaView) read this node's `tables` field structurally via\n* `blindCast`/`SqlSchemaIRNode` — not through a static `SqlSchemaIR`\n* assignment — because `nodeKind` carries this node's own literal\n* (`postgres-namespace`), distinct from `SqlSchemaIR`'s own (`sql-schema`).\n*\n* `id` is the schema name; `isEqualTo` is identity on it; `children()` returns\n* the table nodes plus `nativeEnums`.\n*\n* `nativeEnums` is the diff-tree representation of native enum types the\n* differ pairs — the sole enum carrier, built directly by both sides: the\n* expected (contract-projected) side and introspection alike hand in\n* `PostgresNativeEnumSchemaNode`s.\n*/\nvar PostgresNamespaceSchemaNode = class PostgresNamespaceSchemaNode extends SqlSchemaIRNode {\n\tnodeKind = PostgresSchemaNodeKind.namespace;\n\tschemaName;\n\ttables;\n\tnativeEnums;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.schemaName = input.schemaName;\n\t\tthis.tables = Object.freeze({ ...input.tables });\n\t\tthis.nativeEnums = Object.freeze([...input.nativeEnums ?? []]);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn this.schemaName;\n\t}\n\tisEqualTo(other) {\n\t\treturn this.id === other.id;\n\t}\n\tchildren() {\n\t\treturn [...Object.values(this.tables), ...this.nativeEnums];\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === PostgresSchemaNodeKind.namespace;\n\t}\n\tstatic assert(node) {\n\t\tassertNode(node, \"PostgresNamespaceSchemaNode\", PostgresNamespaceSchemaNode.is);\n\t}\n};\n//#endregion\n//#region src/core/schema-ir/postgres-policy-schema-node.ts\n/**\n* Schema-diff leaf node for a Postgres row-level security policy.\n*\n* This is a derived, transient node walked by the differ — it is NEVER serialized.\n* Built by project-from-contract and project-from-database from their respective\n* `PostgresRlsPolicy` contract entities / introspected rows.\n*\n* `id` is the full physical name. `isEqualTo` is mode-selected by the\n* receiver's `prefix`: a wire-named receiver (`prefix` present) compares ids\n* only — the wire name encodes a body hash, so name-equality is\n* body-equality and predicate bodies are never byte-compared (Postgres\n* reprints them). An exact receiver (`prefix` absent) compares content:\n* `operation`/`permissive` strict, `roles` sorted, and `using ?? ''` /\n* `withCheck ?? ''` verbatim byte-for-byte — reliable precisely when the\n* body text was captured from a Postgres reprint (contract infer).\n*/\nvar PostgresPolicySchemaNode = class PostgresPolicySchemaNode extends SqlSchemaIRNode {\n\tnodeKind = PostgresSchemaNodeKind.policy;\n\tname;\n\ttableName;\n\tnamespaceId;\n\toperation;\n\troles;\n\tpermissive;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = nameOf(input.naming);\n\t\tif (input.naming.kind === \"wire\") this.prefix = input.naming.prefix;\n\t\tthis.tableName = input.tableName;\n\t\tthis.namespaceId = input.namespaceId;\n\t\tthis.operation = input.operation;\n\t\tthis.roles = Object.freeze([...input.roles]);\n\t\tif (input.using !== void 0) this.using = input.using;\n\t\tif (input.withCheck !== void 0) this.withCheck = input.withCheck;\n\t\tthis.permissive = input.permissive;\n\t\tdefineNonEnumerable(this, \"dependsOn\", input.dependsOn);\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn this.name;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tPostgresPolicySchemaNode.assert(node);\n\t\tif (this.prefix !== void 0) return this.id === node.id;\n\t\treturn this.contentEquals(node);\n\t}\n\t/**\n\t* The single policy content-equality relation — the exact-mode\n\t* {@link isEqualTo} and the planner's rename content-pairing both call\n\t* this rather than growing a parallel relation: `operation` and\n\t* `permissive` strict, `roles` compared deduplicated-and-sorted (the same\n\t* set semantics as the wire-hash tuple, so the two never disagree),\n\t* `using`/`withCheck` VERBATIM byte-for-byte with absent ≡ empty —\n\t* deliberately NOT the normalized wire-hash bodies.\n\t*/\n\tcontentEquals(other) {\n\t\treturn this.operation === other.operation && this.permissive === other.permissive && isArrayEqual([...new Set(this.roles)].sort(), [...new Set(other.roles)].sort()) && (this.using ?? \"\") === (other.using ?? \"\") && (this.withCheck ?? \"\") === (other.withCheck ?? \"\");\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === PostgresSchemaNodeKind.policy;\n\t}\n\tstatic assert(node) {\n\t\tassertNode(node, \"PostgresPolicySchemaNode\", PostgresPolicySchemaNode.is);\n\t}\n};\n//#endregion\n//#region src/core/schema-ir/postgres-role-schema-node.ts\n/**\n* Schema-diff leaf node for a Postgres database role.\n*\n* This is a derived, transient node walked by the differ — it is NEVER serialized.\n* Built by project-from-contract and project-from-database from their respective\n* `PostgresRole` contract entities / introspected rows.\n*\n* Roles are cluster-scoped, so `id` is the bare role name. The differ pairs\n* siblings by `(nodeKind, id)`, so a role and a namespace may share a name\n* (role `public`, schema `public`) without colliding. `isEqualTo` compares\n* ids — name-equality is role-equality for cluster-scoped objects.\n*/\nvar PostgresRoleSchemaNode = class PostgresRoleSchemaNode extends SqlSchemaIRNode {\n\tnodeKind = PostgresSchemaNodeKind.role;\n\tname;\n\tnamespaceId;\n\tconstructor(input) {\n\t\tsuper();\n\t\tthis.name = input.name;\n\t\tthis.namespaceId = input.namespaceId;\n\t\tfreezeNode(this);\n\t}\n\tget id() {\n\t\treturn this.name;\n\t}\n\tchildren() {\n\t\treturn [];\n\t}\n\tisEqualTo(other) {\n\t\tconst node = blindCast(other);\n\t\tPostgresRoleSchemaNode.assert(node);\n\t\treturn this.id === node.id;\n\t}\n\tstatic is(node) {\n\t\treturn node.nodeKind === PostgresSchemaNodeKind.role;\n\t}\n\tstatic assert(node) {\n\t\tassertNode(node, \"PostgresRoleSchemaNode\", PostgresRoleSchemaNode.is);\n\t}\n};\n//#endregion\nexport { PostgresDatabaseSchemaNode as i, PostgresPolicySchemaNode as n, PostgresNamespaceSchemaNode as r, PostgresRoleSchemaNode as t };\n\n//# sourceMappingURL=postgres-role-schema-node-B8Z5i5D-.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,IAAI,6BAA6B,MAAM,mCAAmC,gBAAgB;CACzF,WAAW,uBAAuB;CAClC;CACA;CACA;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,aAAa,OAAO,OAAO,EAAE,GAAG,MAAM,WAAW,CAAC;EACvD,KAAK,QAAQ,OAAO,OAAO,CAAC,GAAG,MAAM,KAAK,CAAC;EAC3C,KAAK,kBAAkB,OAAO,OAAO,CAAC,GAAG,MAAM,eAAe,CAAC;EAC/D,KAAK,YAAY,MAAM;EACvB,WAAW,IAAI;CAChB;CACA,IAAI,KAAK;EACR,OAAO;CACR;CACA,UAAU,OAAO;EAChB,OAAO,KAAK,OAAO,MAAM;CAC1B;CACA,WAAW;EACV,OAAO,CAAC,GAAG,OAAO,OAAO,KAAK,UAAU,GAAG,GAAG,KAAK,KAAK;CACzD;CACA,OAAO,GAAG,MAAM;EACf,OAAO,KAAK,aAAa,uBAAuB;CACjD;CACA,OAAO,OAAO,MAAM;EACnB,WAAW,MAAM,8BAA8B,2BAA2B,EAAE;CAC7E;AACD;;;;;;;;;;;;;;;;;AAmBA,IAAI,8BAA8B,MAAM,oCAAoC,gBAAgB;CAC3F,WAAW,uBAAuB;CAClC;CACA;CACA;CACA,YAAY,OAAO;EAClB,MAAM;EACN,KAAK,aAAa,MAAM;EACxB,KAAK,SAAS,OAAO,OAAO,EAAE,GAAG,MAAM,OAAO,CAAC;EAC/C,KAAK,cAAc,OAA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