@prisma/orm-target-postgres 8.0.0-rc.21-dev.12 → 8.0.0-rc.21-dev.14
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/dist/{adapter-t3IEEEbY-BKJyNGtz.mjs → adapter-DJoHcCZV-CWdrs4yI.mjs} +3 -3
- package/dist/{adapter-t3IEEEbY-BKJyNGtz.mjs.map → adapter-DJoHcCZV-CWdrs4yI.mjs.map} +1 -1
- package/dist/{adapter-BdL6nOY0.d.mts → adapter-Dz86ldS1.d.mts} +14 -14
- package/dist/{adapter-BdL6nOY0.d.mts.map → adapter-Dz86ldS1.d.mts.map} +1 -1
- package/dist/adapter.d.mts +7 -7
- package/dist/adapter.mjs +2 -2
- package/dist/adapter__adapter.d.mts +1 -1
- package/dist/adapter__adapter.mjs +2 -2
- package/dist/adapter__control.d.mts +1 -1
- package/dist/adapter__control.mjs +2 -2
- package/dist/adapter__control.mjs.map +1 -1
- package/dist/adapter__runtime.d.mts +1 -1
- package/dist/adapter__runtime.mjs +2 -2
- package/dist/adapter__runtime.mjs.map +1 -1
- package/dist/adapter__sql-renderer.d.mts +1 -1
- package/dist/adapter__types.d.mts +3 -3
- package/dist/{aggregates-CCEULCRK.d.mts → aggregates-CJGvlOCM.d.mts} +12 -12
- package/dist/{aggregates-CCEULCRK.d.mts.map → aggregates-CJGvlOCM.d.mts.map} +1 -1
- package/dist/{authoring-D7EAP1iG-DlpkOeVt.mjs → authoring-BFb5LVsK-CkHmM-aP.mjs} +50 -3
- package/dist/authoring-BFb5LVsK-CkHmM-aP.mjs.map +1 -0
- package/dist/{authoring-DWd5pnnV-BBX7P1wT.d.mts → authoring-BRqyCnBa-CAzlQNHw.d.mts} +5 -4
- package/dist/{authoring-DWd5pnnV-BBX7P1wT.d.mts.map → authoring-BRqyCnBa-CAzlQNHw.d.mts.map} +1 -1
- package/dist/{contract-contributions-CbLCF8jV-BOZHg83r.mjs → contract-contributions-DS1YZqxl-CipEzWQj.mjs} +17 -5
- package/dist/contract-contributions-DS1YZqxl-CipEzWQj.mjs.map +1 -0
- package/dist/{contract-free-B6-wuc6M.d.mts → contract-free-DcaYH2c5.d.mts} +6 -2
- package/dist/contract-free-DcaYH2c5.d.mts.map +1 -0
- package/dist/{contract-free-DtJ1gJxN.mjs → contract-free-DmNEp1_Y.mjs} +3 -3
- package/dist/contract-free-DmNEp1_Y.mjs.map +1 -0
- package/dist/{control-DKpIWFg_.d.mts → control-2DHRXqEz.d.mts} +5 -3
- package/dist/{control-DKpIWFg_.d.mts.map → control-2DHRXqEz.d.mts.map} +1 -1
- package/dist/{control-policy-DZzwyc3L-_Bf4iEaW.mjs → control-policy-DYDR6FhY-CPBeYqu5.mjs} +45 -10
- package/dist/control-policy-DYDR6FhY-CPBeYqu5.mjs.map +1 -0
- package/dist/{ddl-URS0VlHr--s2jpN6c.mjs → ddl-qu-IzeH4-CFpSpY0X.mjs} +11 -4
- package/dist/ddl-qu-IzeH4-CFpSpY0X.mjs.map +1 -0
- package/dist/{descriptor-meta-BPjw5dIw-DSlWgzbV.mjs → descriptor-meta-5gncreHF-BD1kpxJu.mjs} +3 -3
- package/dist/{descriptor-meta-BPjw5dIw-DSlWgzbV.mjs.map → descriptor-meta-5gncreHF-BD1kpxJu.mjs.map} +1 -1
- package/dist/{descriptor-meta-DokyxrzY-D2S-BLI0.mjs → descriptor-meta-CszCf4Hs-DVGeuxNv.mjs} +4 -4
- package/dist/{descriptor-meta-DokyxrzY-D2S-BLI0.mjs.map → descriptor-meta-CszCf4Hs-DVGeuxNv.mjs.map} +1 -1
- package/dist/{diff-database-schema-BxzhZaVN.d.mts → diff-database-schema-COp7SqEI.d.mts} +5 -3
- package/dist/{diff-database-schema-BxzhZaVN.d.mts.map → diff-database-schema-COp7SqEI.d.mts.map} +1 -1
- package/dist/{diff-database-schema-DrOE5ahI-BfrNtMDu.mjs → diff-database-schema-DyoCp8VS-BKtXp-eB.mjs} +30 -8
- package/dist/diff-database-schema-DyoCp8VS-BKtXp-eB.mjs.map +1 -0
- package/dist/{infer-psl-contract-Du026CJo-sRmqBsId.mjs → infer-psl-contract-BP2DgxTx-BqV8gUu4.mjs} +45 -6
- package/dist/infer-psl-contract-BP2DgxTx-BqV8gUu4.mjs.map +1 -0
- package/dist/{issue-planner-BLiMn8iP.d.mts → issue-planner-BUo9S9Ge.d.mts} +3 -3
- package/dist/{issue-planner-BLiMn8iP.d.mts.map → issue-planner-BUo9S9Ge.d.mts.map} +1 -1
- package/dist/migration-Be_iuIpn.mjs.map +1 -1
- package/dist/{migration-cnT6b-9x.d.mts → migration-Drs_EeiM.d.mts} +10 -3
- package/dist/migration-Drs_EeiM.d.mts.map +1 -0
- package/dist/op-factory-call-D2HXLJQJ.d.mts +1 -0
- package/dist/{op-factory-call-DsQATX-o-BHcqPXrs.mjs → op-factory-call-DyQO1ZdB-CnbOJIf8.mjs} +115 -20
- package/dist/op-factory-call-DyQO1ZdB-CnbOJIf8.mjs.map +1 -0
- package/dist/{op-factory-call-DeaoFqMW-XAP00c7U.d.mts → op-factory-call-L1gqYhhk-DMnspvjf.d.mts} +30 -6
- package/dist/{op-factory-call-DeaoFqMW-XAP00c7U.d.mts.map → op-factory-call-L1gqYhhk-DMnspvjf.d.mts.map} +1 -1
- package/dist/{pack-CjVhjxir.d.mts → pack-CLpRLkRQ.d.mts} +27 -4
- package/dist/{pack-CjVhjxir.d.mts.map → pack-CLpRLkRQ.d.mts.map} +1 -1
- package/dist/{planner-RW8za3Vm.d.mts → planner-Bl3kIyMG.d.mts} +4 -4
- package/dist/{planner-RW8za3Vm.d.mts.map → planner-Bl3kIyMG.d.mts.map} +1 -1
- package/dist/{planner-CNoNH9bo-3g7WX476.mjs → planner-D1mzh6Cb-B1Z2YTiQ.mjs} +19 -13
- package/dist/planner-D1mzh6Cb-B1Z2YTiQ.mjs.map +1 -0
- package/dist/{planner-produced-postgres-migration-DnAk6KxF-Vj31eyEf.mjs → planner-produced-postgres-migration-Cw8gbwED-tyj9TLlB.mjs} +4 -4
- package/dist/{planner-produced-postgres-migration-DnAk6KxF-Vj31eyEf.mjs.map → planner-produced-postgres-migration-Cw8gbwED-tyj9TLlB.mjs.map} +1 -1
- package/dist/{planner-produced-postgres-migration-DtjZyo7p-CQxcHWwC.d.mts → planner-produced-postgres-migration-Cx9bERx3-DRNnR16E.d.mts} +3 -3
- package/dist/planner-produced-postgres-migration-Cx9bERx3-DRNnR16E.d.mts.map +1 -0
- package/dist/planner-produced-postgres-migration-DRPVY4iL.d.mts +1 -0
- package/dist/{planner-sql-checks-CvI80tt0-B5bKCucD.mjs → planner-sql-checks-FU4T7wgu-C-tIJOH-.mjs} +3 -3
- package/dist/{planner-sql-checks-CvI80tt0-B5bKCucD.mjs.map → planner-sql-checks-FU4T7wgu-C-tIJOH-.mjs.map} +1 -1
- package/dist/{postgres-contract-view-CRy_3BMc-60fosJRZ.mjs → postgres-contract-view-iwNgaXQw-QzVSakJT.mjs} +30 -4
- package/dist/postgres-contract-view-iwNgaXQw-QzVSakJT.mjs.map +1 -0
- package/dist/{postgres-database-schema-node-Cv8usVNX-BmvGozi4.d.mts → postgres-database-schema-node-BjmJ6_Cs-LyZ0n9oj.d.mts} +33 -5
- package/dist/postgres-database-schema-node-BjmJ6_Cs-LyZ0n9oj.d.mts.map +1 -0
- package/dist/{postgres-migration-CSU_fUlQ-C5TNpgq4.mjs → postgres-migration-BhijSOgq-CP_oflub.mjs} +29 -11
- package/dist/postgres-migration-BhijSOgq-CP_oflub.mjs.map +1 -0
- package/dist/{postgres-migration-CDPlleMc-B4JQjDcN.d.mts → postgres-migration-DNnmFBsR-BJU9865a.d.mts} +19 -2
- package/dist/{postgres-migration-CDPlleMc-B4JQjDcN.d.mts.map → postgres-migration-DNnmFBsR-BJU9865a.d.mts.map} +1 -1
- package/dist/{postgres-role-schema-node-B8Z5i5D--BzOKm4N1.mjs → postgres-role-schema-node-DuljIQWp-D6Q5JyEs.mjs} +12 -5
- package/dist/postgres-role-schema-node-DuljIQWp-D6Q5JyEs.mjs.map +1 -0
- package/dist/{postgres-schema-osNZNX0D-BpKJDg4M.mjs → postgres-schema-BBWgs4fX-DWdYxNi8.mjs} +35 -4
- package/dist/postgres-schema-BBWgs4fX-DWdYxNi8.mjs.map +1 -0
- package/dist/{postgres-schema-Xsjt3RKO-bis-SVSB.d.mts → postgres-schema-CJvUnBU9-Bvn7zbr1.d.mts} +21 -3
- package/dist/postgres-schema-CJvUnBU9-Bvn7zbr1.d.mts.map +1 -0
- package/dist/{postgres-table-schema-node-BBkitBQh-Dll8iaZT.mjs → postgres-table-schema-node-nY6II-Uv-Bj-lgmSi.mjs} +50 -6
- package/dist/postgres-table-schema-node-nY6II-Uv-Bj-lgmSi.mjs.map +1 -0
- package/dist/{prisma7-binding-DiHnmsNq.d.mts → prisma7-binding-BFypqPE0.d.mts} +48 -4
- package/dist/{prisma7-binding-DiHnmsNq.d.mts.map → prisma7-binding-BFypqPE0.d.mts.map} +1 -1
- package/dist/{prisma7-binding-CPcA6N3v.mjs → prisma7-binding-DWW3L3C4.mjs} +26 -5
- package/dist/{prisma7-binding-CPcA6N3v.mjs.map → prisma7-binding-DWW3L3C4.mjs.map} +1 -1
- package/dist/{render-ops-Cj7mog0v-DPzODjA0.mjs → render-ops-5VMQY7FM-Cdil7oOP.mjs} +3 -3
- package/dist/{render-ops-Cj7mog0v-DPzODjA0.mjs.map → render-ops-5VMQY7FM-Cdil7oOP.mjs.map} +1 -1
- package/dist/{resolve-ddl-schema-uDXEVepU-COWNfVPC.mjs → resolve-ddl-schema-BZzteXH1-C57Iavtu.mjs} +3 -3
- package/dist/{resolve-ddl-schema-uDXEVepU-COWNfVPC.mjs.map → resolve-ddl-schema-BZzteXH1-C57Iavtu.mjs.map} +1 -1
- package/dist/{runtime-DMle_B4T.d.mts → runtime-BJetnmVm.d.mts} +2 -1
- package/dist/runtime-BJetnmVm.d.mts.map +1 -0
- package/dist/{runtime-R_BCXCp_.d.mts → runtime-K2strEv6.d.mts} +3 -3
- package/dist/{runtime-R_BCXCp_.d.mts.map → runtime-K2strEv6.d.mts.map} +1 -1
- package/dist/{schema-node-kinds-C52Bb1ve-DmxQRPPS.d.mts → schema-node-kinds-Baf4tcly-CI3SyVG4.d.mts} +3 -2
- package/dist/schema-node-kinds-Baf4tcly-CI3SyVG4.d.mts.map +1 -0
- package/dist/{sql-renderer-BnO2fkSf.d.mts → sql-renderer-PT6pQ66O.d.mts} +3 -3
- package/dist/{sql-renderer-BnO2fkSf.d.mts.map → sql-renderer-PT6pQ66O.d.mts.map} +1 -1
- package/dist/target.d.mts +19 -19
- package/dist/target.mjs +18 -18
- package/dist/target__aggregates.d.mts +1 -1
- package/dist/target__contract-free.d.mts +2 -2
- package/dist/target__contract-free.mjs +4 -4
- package/dist/target__control.mjs +44 -18
- package/dist/target__control.mjs.map +1 -1
- package/dist/target__diff-database-schema.d.mts +1 -1
- package/dist/target__diff-database-schema.mjs +1 -1
- package/dist/target__issue-planner.d.mts +1 -1
- package/dist/target__issue-planner.mjs +1 -1
- package/dist/target__migration.d.mts +2 -2
- package/dist/target__migration.mjs +2 -2
- package/dist/target__op-factory-call.d.mts +3 -3
- package/dist/target__op-factory-call.mjs +2 -2
- package/dist/target__pack.d.mts +1 -1
- package/dist/target__pack.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.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.mjs +1 -1
- package/dist/target__runtime.d.mts +1 -1
- package/dist/target__runtime.mjs +1 -1
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/target__schema-ir-annotations.mjs +1 -1
- package/dist/target__types.d.mts +5 -5
- package/dist/target__types.mjs +4 -4
- package/dist/{types-D6lgKhE5-BrgAgVCq.d.mts → types-D6lgKhE5-DVHMZPbP.d.mts} +2 -2
- package/dist/{types-D6lgKhE5-BrgAgVCq.d.mts.map → types-D6lgKhE5-DVHMZPbP.d.mts.map} +1 -1
- package/dist/{types-D-U10Lyo.d.mts → types-D6p1198n.d.mts} +4 -4
- package/dist/{types-D-U10Lyo.d.mts.map → types-D6p1198n.d.mts.map} +1 -1
- package/dist/types-oaZIR8i0.d.mts +2 -0
- package/package.json +9 -9
- package/dist/authoring-D7EAP1iG-DlpkOeVt.mjs.map +0 -1
- package/dist/contract-contributions-CbLCF8jV-BOZHg83r.mjs.map +0 -1
- package/dist/contract-free-B6-wuc6M.d.mts.map +0 -1
- package/dist/contract-free-DtJ1gJxN.mjs.map +0 -1
- package/dist/control-policy-DZzwyc3L-_Bf4iEaW.mjs.map +0 -1
- package/dist/ddl-URS0VlHr--s2jpN6c.mjs.map +0 -1
- package/dist/diff-database-schema-DrOE5ahI-BfrNtMDu.mjs.map +0 -1
- package/dist/infer-psl-contract-Du026CJo-sRmqBsId.mjs.map +0 -1
- package/dist/migration-cnT6b-9x.d.mts.map +0 -1
- package/dist/op-factory-call-D9O6cXRE.d.mts +0 -1
- package/dist/op-factory-call-DsQATX-o-BHcqPXrs.mjs.map +0 -1
- package/dist/planner-CNoNH9bo-3g7WX476.mjs.map +0 -1
- package/dist/planner-produced-postgres-migration-DtjZyo7p-CQxcHWwC.d.mts.map +0 -1
- package/dist/planner-produced-postgres-migration-JI4uclWQ.d.mts +0 -1
- package/dist/postgres-contract-view-CRy_3BMc-60fosJRZ.mjs.map +0 -1
- package/dist/postgres-database-schema-node-Cv8usVNX-BmvGozi4.d.mts.map +0 -1
- package/dist/postgres-migration-CSU_fUlQ-C5TNpgq4.mjs.map +0 -1
- package/dist/postgres-role-schema-node-B8Z5i5D--BzOKm4N1.mjs.map +0 -1
- package/dist/postgres-schema-Xsjt3RKO-bis-SVSB.d.mts.map +0 -1
- package/dist/postgres-schema-osNZNX0D-BpKJDg4M.mjs.map +0 -1
- package/dist/postgres-table-schema-node-BBkitBQh-Dll8iaZT.mjs.map +0 -1
- package/dist/runtime-DMle_B4T.d.mts.map +0 -1
- package/dist/schema-node-kinds-C52Bb1ve-DmxQRPPS.d.mts.map +0 -1
- package/dist/types-DNbQLBpx.d.mts +0 -2
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contract-contributions-CbLCF8jV-BOZHg83r.mjs","names":[],"sources":["../../../../3-targets/postgres/2-adapter/dist/contract-contributions-CbLCF8jV.mjs"],"sourcesContent":["import { n as adapterError, t as renderLoweredSql } from \"./sql-renderer-DrSed-6w.mjs\";\nimport { codecForRef } from \"@internal/framework-components/codec\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { RawExpr, encodeListLiteralDefault, encodeLiteralDefault, isDdlNode, renderOpaqueSql } from \"@internal/sql-relational-core/ast\";\nimport { parsePostgresListText, postgresCodecRegistry } from \"@internal/target-postgres/codecs\";\nimport { errorMarkerRowCorrupt, rethrowMarkerReadError, withMarkerReadErrorHandling } from \"@internal/errors/execution\";\nimport { checkSqlDefaultText, contractColumns, readColumnDefault } from \"@internal/family-sql/control\";\nimport { resolveIntrospectedColumnType } from \"@internal/family-sql/control-adapter\";\nimport { parseContractMarkerRow } from \"@internal/family-sql/verify\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { REFERENTIAL_ACTION_SQL } from \"@internal/sql-contract/referential-action-sql\";\nimport { namingOfLiveName } from \"@internal/sql-schema-ir/naming\";\nimport { RelationalSchemaNodeKind } from \"@internal/sql-schema-ir/types\";\nimport { buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, int4, int8, jsonb, pgTable, text, textArray, timestamptz } from \"@internal/target-postgres/contract-free\";\nimport { readPostgresDefault } from \"@internal/target-postgres/default-normalizer\";\nimport { postgresError } from \"@internal/target-postgres/errors\";\nimport { MARKER_LOCK_KEY, MARKER_LOCK_SQL } from \"@internal/target-postgres/marker-lock\";\nimport { introspectedTypeText } from \"@internal/target-postgres/native-type-normalizer\";\nimport { POLICY_COMMAND_SQL, policyRoleList } from \"@internal/target-postgres/rls-canonicalize\";\nimport { escapeLiteral, inlineLiteral, quoteIdentifier } from \"@internal/target-postgres/sql-utils\";\nimport { PostgresDatabaseSchemaNode, PostgresNamespaceSchemaNode, PostgresNativeEnumSchemaNode, PostgresPolicySchemaNode, PostgresRoleSchemaNode, PostgresSchemaNodeKind, PostgresTableSchemaNode } from \"@internal/target-postgres/types\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { createAstCodecRegistry, deriveParamMetadata, encodeParamsWithMetadata } from \"@internal/sql-runtime\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { PG_TIMESTAMPTZ_STRING_CODEC_ID } from \"@internal/target-postgres/codec-ids\";\nimport { postgresAggregateDescriptors } from \"@internal/target-postgres/aggregates\";\n//#region src/core/capabilities.ts\nconst postgresAdapterCapabilities = Object.freeze({\n\tpostgres: {\n\t\torderBy: true,\n\t\tlimit: true,\n\t\tlateral: true,\n\t\tjsonAgg: true,\n\t\treturning: true,\n\t\tdistinctOn: true,\n\t\tforNoKeyUpdate: true,\n\t\tforKeyShare: true\n\t},\n\tsql: {\n\t\tenums: true,\n\t\treturning: true,\n\t\tdefaultInInsert: true,\n\t\tlateral: true,\n\t\tscalarList: true,\n\t\tcheckConstraint: true,\n\t\tinsertOnConflictSkip: true,\n\t\tinsertOnConflictWithoutTarget: true,\n\t\tforUpdate: true,\n\t\tforShare: true,\n\t\tlockOf: true,\n\t\tlockNowait: true,\n\t\tlockSkipLocked: true\n\t}\n});\n//#endregion\n//#region ../../../1-framework/3-tooling/migration/dist/exports/ledger-origin.mjs\nfunction ledgerOriginFromStored(originCoreHash) {\n\tif (originCoreHash === null || originCoreHash === \"\" || originCoreHash === \"empty\") return null;\n\treturn originCoreHash;\n}\n//#endregion\n//#region src/core/control-codecs.ts\nconst CONTROL_CODECS = createAstCodecRegistry(postgresCodecRegistry);\nasync function encodeControlQueryParams(lowered, ast, codecs = CONTROL_CODECS) {\n\treturn encodeParamsWithMetadata(lowered.params.map((slot) => {\n\t\tif (slot.kind === \"literal\") return slot.value;\n\t\tthrow new InternalError(`control query lowered to a bind slot '${slot.name}', which is unsupported`);\n\t}), deriveParamMetadata(ast), {}, codecs);\n}\n//#endregion\n//#region src/core/marker-ledger.ts\nconst marker = pgTable({\n\tname: \"marker\",\n\tschema: \"prisma_contract\"\n}, {\n\tspace: text(),\n\tcore_hash: text(),\n\tprofile_hash: text(),\n\tcontract_json: jsonb({ nullable: true }),\n\tcanonical_version: int4({ nullable: true }),\n\tupdated_at: timestamptz(),\n\tapp_tag: text({ nullable: true }),\n\tmeta: jsonb({ nullable: true }),\n\tinvariants: textArray()\n});\n/**\n* Writeable subset of the `prisma_contract.ledger` table. Omits the\n* DB-generated `id` (bigserial) and `created_at` (default `now()`) so the\n* insert path doesn't have to pass them.\n*/\nconst ledger = pgTable({\n\tname: \"ledger\",\n\tschema: \"prisma_contract\"\n}, {\n\tspace: text(),\n\tmigration_name: text(),\n\tmigration_hash: text(),\n\torigin_core_hash: text({ nullable: true }),\n\tdestination_core_hash: text(),\n\toperations: jsonb()\n});\n/**\n* Content-addressed contract store: one row per distinct contract, keyed\n* by its storage hash. The ledger's `origin_core_hash` /\n* `destination_core_hash` resolve here by hash equality, so both\n* endpoints of every edge are direct lookups and a contract revisited by\n* a rollback cycle is stored exactly once (upsert DO NOTHING).\n*/\nconst ledgerContract = pgTable({\n\tname: \"contract\",\n\tschema: \"prisma_contract\"\n}, {\n\tcore_hash: text(),\n\tcontract_json: jsonb()\n});\n/**\n* Read-side handle covering every column of `prisma_contract.ledger`,\n* including the DB-generated `id` (for ORDER BY) and `created_at`.\n*/\nconst ledgerReadShape = pgTable({\n\tname: \"ledger\",\n\tschema: \"prisma_contract\"\n}, {\n\tid: int8(),\n\tspace: text(),\n\tmigration_name: text(),\n\tmigration_hash: text(),\n\torigin_core_hash: text({ nullable: true }),\n\tdestination_core_hash: text(),\n\toperations: jsonb(),\n\tcreated_at: timestamptz()\n});\nconst infoSchemaTables = pgTable({\n\tname: \"tables\",\n\tschema: \"information_schema\"\n}, {\n\ttable_schema: text(),\n\ttable_name: text()\n});\nconst NOW = new RawExpr({\n\tparts: [\"now()\"],\n\treturns: {\n\t\tcodecId: PG_TIMESTAMPTZ_STRING_CODEC_ID,\n\t\tnullable: false\n\t}\n});\nfunction mergeInvariants(current, incoming) {\n\treturn [.../* @__PURE__ */ new Set([...current, ...incoming])].sort();\n}\nasync function execute(lower, driver, query) {\n\tconst lowered = lower(query);\n\tconst encoded = await encodeControlQueryParams(lowered, query);\n\treturn (await driver.query(lowered.sql, encoded)).rows;\n}\n//#endregion\n//#region src/core/reported-sql-type.ts\nconst KIND_OF_TYPTYPE = {\n\te: \"enum\",\n\td: \"domain\",\n\tc: \"composite\",\n\tr: \"range\",\n\tm: \"multirange\"\n};\nfunction quotedIdentifier(name) {\n\treturn `\"${name.replaceAll(\"\\\"\", \"\\\"\\\"\")}\"`;\n}\nfunction withoutSchemaPrefix(text, schema) {\n\tfor (const prefix of [`${schema}.`, `${quotedIdentifier(schema)}.`]) if (text.startsWith(prefix)) return text.slice(prefix.length);\n\treturn text;\n}\n/**\n* The column's element type as Postgres reports it. A base type outside `pg_catalog` loses the\n* schema `format_type` prints when that schema is off the search path, so a type an extension\n* installs in another schema, as Supabase installs `vector`, reads as it does in `public`.\n*/\nfunction reportedSqlType(element) {\n\tconst kind = KIND_OF_TYPTYPE[element.typtype];\n\treturn {\n\t\ttext: kind === void 0 && element.schema !== \"pg_catalog\" ? withoutSchemaPrefix(element.text, element.schema) : element.text,\n\t\tkind,\n\t\tschema: element.schema,\n\t\tname: element.name\n\t};\n}\n//#endregion\n//#region src/core/control-adapter.ts\nconst POSTGRES_MARKER_TABLE = \"prisma_contract.marker\";\nconst POSTGRES_LEDGER_TABLE = \"prisma_contract.ledger\";\n/**\n* Tables another migration tool, not Prisma 8, keeps in an application schema: Prisma 7's ledger. `introspect` leaves them out unless the contract declares a table of that name in the same namespace.\n*/\nconst OTHER_TOOL_MIGRATION_TABLES = /* @__PURE__ */ new Set([\"_prisma_migrations\"]);\nfunction markerRowDecodeWhy(detail) {\n\treturn `Invalid contract marker row: ${detail}`;\n}\nfunction decodeMarkerInteger(value) {\n\tif (!/^-?\\d+$/.test(value)) throw new TypeError(`expected integer text, got ${JSON.stringify(value)}`);\n\treturn Number(value);\n}\nfunction decodePostgresMarkerRow(row, space) {\n\tif (typeof row !== \"object\" || row === null) {\n\t\tconst cause = /* @__PURE__ */ new TypeError(`expected object marker row, got ${typeof row}`);\n\t\tthrow errorMarkerRowCorrupt({\n\t\t\twhy: markerRowDecodeWhy(cause.message),\n\t\t\tspace,\n\t\t\tmarkerLocation: POSTGRES_MARKER_TABLE,\n\t\t\tcause\n\t\t});\n\t}\n\tconst record = blindCast(row);\n\ttry {\n\t\treturn {\n\t\t\t...record,\n\t\t\t...typeof record.canonical_version === \"string\" ? { canonical_version: decodeMarkerInteger(record.canonical_version) } : {},\n\t\t\tinvariants: parsePostgresListText(record.invariants)\n\t\t};\n\t} catch (error) {\n\t\tthrow errorMarkerRowCorrupt({\n\t\t\twhy: markerRowDecodeWhy(error instanceof Error ? error.message : String(error)),\n\t\t\tspace,\n\t\t\tmarkerLocation: POSTGRES_MARKER_TABLE,\n\t\t\tcause: error\n\t\t});\n\t}\n}\n/**\n* Postgres control plane adapter for control-plane operations like introspection.\n* Provides target-specific implementations for control-plane domain actions.\n*/\nvar PostgresControlAdapter = class {\n\tcodecRegistry;\n\tdataTypeLookup;\n\tdeclaredDataTypes;\n\tfamilyId = \"sql\";\n\ttargetId = \"postgres\";\n\tmarkerLocation = POSTGRES_MARKER_TABLE;\n\t/** `declaredDataTypes` are the stack's data types in assembly order, which introspection resolves each column's reported type over. */\n\tconstructor(codecRegistry, dataTypeLookup, declaredDataTypes) {\n\t\tthis.codecRegistry = codecRegistry;\n\t\tthis.dataTypeLookup = dataTypeLookup;\n\t\tthis.declaredDataTypes = declaredDataTypes;\n\t}\n\tbootstrapControlTableQueries() {\n\t\treturn buildControlTableBootstrapQueries();\n\t}\n\tbootstrapSignMarkerQueries() {\n\t\treturn buildSignMarkerBootstrapQueries();\n\t}\n\t/**\n\t* Lower a SQL query AST into a Postgres-flavored `{ sql, params }` payload.\n\t*\n\t* Delegates to the shared `renderLoweredSql` renderer so the control adapter\n\t* emits byte-identical SQL to `PostgresAdapterImpl.lower()` for the same AST\n\t* and contract. Used at migration plan/emit time (e.g. by `dataTransform`)\n\t* without instantiating the runtime adapter.\n\t*/\n\tlower(ast, context) {\n\t\tif (isDdlNode(ast)) throw adapterError(\"RUNTIME.DDL_UNSUPPORTED\", \"lower() cannot lower DDL: DDL default literals require inline codec encoding, which is async. Use lowerToExecuteRequest().\", { meta: { surface: \"control-adapter\" } });\n\t\treturn renderLoweredSql(ast, blindCast(context.contract), this.codecRegistry, this.dataTypeLookup, postgresAdapterCapabilities);\n\t}\n\tasync renderColumnDefault(column, table) {\n\t\tif (column.default === void 0) return \"\";\n\t\treturn pgRenderDdlColumnDefault(column.default, column.type, this.codecRegistry, column.codecRef, {\n\t\t\ttable,\n\t\t\tcolumn: column.name\n\t\t});\n\t}\n\t/**\n\t* Lower an AST all the way to a driver-ready statement. For DDL nodes,\n\t* literal column defaults are formatted as inline SQL with proper quoting and\n\t* a `::` cast to the column's type. For query ASTs, params are kept as `$N`\n\t* placeholders; wire values go in `params`. Does NOT call `this.lower()` —\n\t* independent implementation.\n\t*/\n\tasync lowerToExecuteRequest(ast, context) {\n\t\tif (isDdlNode(ast)) return pgRenderDdlExecuteRequest(blindCast(ast), this.codecRegistry);\n\t\tconst lowered = renderLoweredSql(ast, blindCast(context?.contract), this.codecRegistry, this.dataTypeLookup, postgresAdapterCapabilities);\n\t\tconst params = await encodeControlQueryParams(lowered, ast, blindCast(this.codecRegistry));\n\t\treturn {\n\t\t\tsql: lowered.sql,\n\t\t\tparams\n\t\t};\n\t}\n\t/**\n\t* Reads the contract marker from `prisma_contract.marker`. Probes\n\t* `information_schema.tables` first so a fresh database (where the\n\t* `prisma_contract` schema doesn't yet exist) returns `null` instead of a\n\t* \"relation does not exist\" error — some Postgres wire-protocol clients\n\t* (e.g. PGlite's TCP proxy) don't fully recover from extended-protocol\n\t* parse errors, so we probe before reading.\n\t*/\n\tasync readMarker(driver, space) {\n\t\tconst result = await this.readMarkerDiscriminated(driver, space);\n\t\treturn result.kind === \"present\" ? result.record : null;\n\t}\n\tasync readMarkerDiscriminated(driver, space) {\n\t\treturn withMarkerReadErrorHandling(() => this.readMarkerResult(driver, space), {\n\t\t\tspace,\n\t\t\tmarkerLocation: POSTGRES_MARKER_TABLE\n\t\t});\n\t}\n\t/**\n\t* Reads every row from `prisma_contract.marker` and returns them keyed\n\t* by `space`. Mirrors the existence probe in {@link readMarker}: a\n\t* fresh database without the `prisma_contract` schema returns an empty\n\t* map rather than raising \"relation does not exist\".\n\t*/\n\tasync readAllMarkers(driver) {\n\t\treturn withMarkerReadErrorHandling(() => this.readAllMarkersResult(driver), {\n\t\t\tspace: APP_SPACE_ID,\n\t\t\tmarkerLocation: POSTGRES_MARKER_TABLE\n\t\t});\n\t}\n\tasync readAllMarkersResult(driver) {\n\t\tconst lower = (query) => this.lower(query, { contract: void 0 });\n\t\tif ((await execute(lower, driver, infoSchemaTables.select(infoSchemaTables.table_schema).where(infoSchemaTables.table_schema.eq(\"prisma_contract\").and(infoSchemaTables.table_name.eq(\"marker\"))).build())).length === 0) return /* @__PURE__ */ new Map();\n\t\tconst rows = blindCast(await execute(lower, driver, marker.select(marker.space, marker.core_hash, marker.profile_hash, marker.contract_json, marker.canonical_version, marker.updated_at, marker.app_tag, marker.meta, marker.invariants).build()));\n\t\tconst out = /* @__PURE__ */ new Map();\n\t\tfor (const row of rows) try {\n\t\t\tconst decodedRow = decodePostgresMarkerRow(row, row.space);\n\t\t\tout.set(row.space, parseContractMarkerRow(decodedRow));\n\t\t} catch (error) {\n\t\t\trethrowMarkerReadError(error, {\n\t\t\t\tspace: row.space,\n\t\t\t\tmarkerLocation: POSTGRES_MARKER_TABLE\n\t\t\t});\n\t\t}\n\t\treturn out;\n\t}\n\t/**\n\t* Reads per-migration ledger rows from `prisma_contract.ledger` in apply\n\t* order. Probes `information_schema.tables` first so a fresh database\n\t* without the ledger table returns `[]` instead of raising \"relation does\n\t* not exist\".\n\t*/\n\tasync readLedger(driver, space) {\n\t\treturn withMarkerReadErrorHandling(() => this.readLedgerResult(driver, space), {\n\t\t\tspace: space ?? \"*\",\n\t\t\tmarkerLocation: POSTGRES_LEDGER_TABLE\n\t\t});\n\t}\n\tasync readLedgerResult(driver, space) {\n\t\tconst lower = (query) => this.lower(query, { contract: void 0 });\n\t\tif ((await execute(lower, driver, infoSchemaTables.select(infoSchemaTables.table_schema).where(infoSchemaTables.table_schema.eq(\"prisma_contract\").and(infoSchemaTables.table_name.eq(\"ledger\"))).build())).length === 0) return [];\n\t\tconst base = ledgerReadShape.select(ledgerReadShape.space, ledgerReadShape.migration_name, ledgerReadShape.migration_hash, ledgerReadShape.origin_core_hash, ledgerReadShape.destination_core_hash, ledgerReadShape.operations, ledgerReadShape.created_at);\n\t\treturn blindCast(await execute(lower, driver, (space !== void 0 ? base.where(ledgerReadShape.space.eq(space)) : base).orderBy(ledgerReadShape.id).build())).map((row) => {\n\t\t\tconst appliedAt = row.created_at instanceof Date ? row.created_at : new Date(row.created_at);\n\t\t\treturn {\n\t\t\t\tspace: row.space,\n\t\t\t\tmigrationName: row.migration_name,\n\t\t\t\tmigrationHash: row.migration_hash,\n\t\t\t\tfrom: ledgerOriginFromStored(row.origin_core_hash),\n\t\t\t\tto: row.destination_core_hash,\n\t\t\t\tappliedAt,\n\t\t\t\toperationCount: Array.isArray(row.operations) ? row.operations.length : 0\n\t\t\t};\n\t\t});\n\t}\n\t/**\n\t* Stamps the initial marker row for `space` via the shared contract-free DML\n\t* builder, lowered through {@link lower} and executed on the driver. See the\n\t* `SqlControlAdapter.initMarker` contract.\n\t*/\n\tasync insertMarker(driver, space, destination) {\n\t\tawait execute((query) => this.lower(query, { contract: void 0 }), driver, marker.insert({\n\t\t\tspace,\n\t\t\tcore_hash: destination.storageHash,\n\t\t\tprofile_hash: destination.profileHash,\n\t\t\tcontract_json: null,\n\t\t\tcanonical_version: null,\n\t\t\tupdated_at: NOW,\n\t\t\tapp_tag: null,\n\t\t\tmeta: {},\n\t\t\tinvariants: destination.invariants ?? []\n\t\t}).build());\n\t}\n\tasync initMarker(driver, space, destination) {\n\t\tawait execute((query) => this.lower(query, { contract: void 0 }), driver, marker.upsert({\n\t\t\tspace,\n\t\t\tcore_hash: destination.storageHash,\n\t\t\tprofile_hash: destination.profileHash,\n\t\t\tcontract_json: null,\n\t\t\tcanonical_version: null,\n\t\t\tupdated_at: NOW,\n\t\t\tapp_tag: null,\n\t\t\tmeta: {},\n\t\t\tinvariants: destination.invariants ?? []\n\t\t}).onConflict(marker.space).doUpdate((excluded) => ({\n\t\t\tcore_hash: excluded.core_hash,\n\t\t\tprofile_hash: excluded.profile_hash,\n\t\t\tcontract_json: excluded.contract_json,\n\t\t\tcanonical_version: excluded.canonical_version,\n\t\t\tupdated_at: NOW,\n\t\t\tapp_tag: excluded.app_tag,\n\t\t\tmeta: excluded.meta,\n\t\t\tinvariants: excluded.invariants\n\t\t})).build());\n\t}\n\t/**\n\t* Compare-and-swap advance of the marker row for `space`. See the\n\t* `SqlControlAdapter.updateMarker` contract.\n\t*/\n\tasync updateMarker(driver, space, expectedFrom, destination) {\n\t\tconst currentInvariants = destination.invariants === void 0 ? [] : (await this.readMarker(driver, space))?.invariants ?? [];\n\t\tconst mergedInvariants = destination.invariants === void 0 ? void 0 : mergeInvariants(currentInvariants, destination.invariants);\n\t\treturn (await execute((q) => this.lower(q, { contract: void 0 }), driver, marker.update().set({\n\t\t\tcore_hash: destination.storageHash,\n\t\t\tprofile_hash: destination.profileHash,\n\t\t\tupdated_at: NOW,\n\t\t\t...mergedInvariants !== void 0 ? { invariants: mergedInvariants } : {}\n\t\t}).where(marker.space.eq(space).and(marker.core_hash.eq(expectedFrom))).returning(marker.space).build())).length > 0;\n\t}\n\tasync withTransaction(driver, fn) {\n\t\tawait driver.query(\"BEGIN\");\n\t\tlet result;\n\t\ttry {\n\t\t\tresult = await fn();\n\t\t} catch (error) {\n\t\t\ttry {\n\t\t\t\tawait driver.query(\"ROLLBACK\");\n\t\t\t} catch (rollbackError) {\n\t\t\t\tif (error instanceof Error && error.cause === void 0) error.cause = rollbackError;\n\t\t\t}\n\t\t\tthrow error;\n\t\t}\n\t\tawait driver.query(\"COMMIT\");\n\t\treturn result;\n\t}\n\tasync lockMarker(driver) {\n\t\tawait driver.query(MARKER_LOCK_SQL, [MARKER_LOCK_KEY]);\n\t}\n\t/**\n\t* Appends a ledger entry for `space`. When the edge carries a destination contract snapshot, the content-addressed `prisma_contract.contract` store is populated first (keyed by the destination hash, DO NOTHING on revisit) so a reader never sees a ledger row whose stored destination contract is missing. See the `SqlControlAdapter.writeLedgerEntry` contract.\n\t*/\n\tasync writeLedgerEntry(driver, space, entry) {\n\t\tconst lower = (query) => this.lower(query, { contract: void 0 });\n\t\tif (entry.destinationContractJson !== void 0) await execute(lower, driver, ledgerContract.upsert({\n\t\t\tcore_hash: entry.to,\n\t\t\tcontract_json: entry.destinationContractJson\n\t\t}).onConflict(ledgerContract.core_hash).doNothing().build());\n\t\tawait execute(lower, driver, ledger.insert({\n\t\t\tspace,\n\t\t\tmigration_name: entry.migrationName,\n\t\t\tmigration_hash: entry.migrationHash,\n\t\t\torigin_core_hash: entry.from,\n\t\t\tdestination_core_hash: entry.to,\n\t\t\toperations: entry.operations\n\t\t}).build());\n\t}\n\tasync readMarkerResult(driver, space) {\n\t\tconst lower = (query) => this.lower(query, { contract: void 0 });\n\t\tif ((await execute(lower, driver, infoSchemaTables.select(infoSchemaTables.table_schema).where(infoSchemaTables.table_schema.eq(\"prisma_contract\").and(infoSchemaTables.table_name.eq(\"marker\"))).build())).length === 0) return { kind: \"no-table\" };\n\t\tconst row = (await execute(lower, driver, marker.select(marker.core_hash, marker.profile_hash, marker.contract_json, marker.canonical_version, marker.updated_at, marker.app_tag, marker.meta, marker.invariants).where(marker.space.eq(space)).build()))[0];\n\t\tif (!row) return { kind: \"absent\" };\n\t\ttry {\n\t\t\treturn {\n\t\t\t\tkind: \"present\",\n\t\t\t\trecord: parseContractMarkerRow(decodePostgresMarkerRow(row, space))\n\t\t\t};\n\t\t} catch (error) {\n\t\t\trethrowMarkerReadError(error, {\n\t\t\t\tspace,\n\t\t\t\tmarkerLocation: POSTGRES_MARKER_TABLE\n\t\t\t});\n\t\t}\n\t}\n\t/**\n\t* Introspects a Postgres database schema and returns a raw SqlSchemaIR.\n\t*\n\t* This is a pure schema discovery operation that queries the Postgres catalog\n\t* and returns the schema structure without type mapping or contract enrichment.\n\t* Type mapping and enrichment are handled separately by enrichment helpers.\n\t*\n\t* When `contract` is provided and its storage declares more than one\n\t* namespace (or any explicit bound namespace), the adapter walks every\n\t* declared namespace and merges the per-schema introspection results\n\t* into a single `SqlSchemaIR`. `UNBOUND_NAMESPACE_ID` resolves to the\n\t* connection's `current_schema()` so late-bound tables follow the\n\t* runtime `search_path`. When no contract is passed, the adapter falls\n\t* back to introspecting the single `schema` argument (defaulting to\n\t* `'public'`).\n\t*\n\t* Uses batched queries to minimize database round trips (6 queries per\n\t* schema walked).\n\t*\n\t* @param driver - SqlControlDriverInstance<'postgres'> instance for executing queries\n\t* @param contract - Optional contract for contract-guided introspection (multi-namespace walk, filtering)\n\t* @param schema - Schema name to introspect when no contract is provided (defaults to 'public')\n\t* @returns Promise resolving to SqlSchemaIR representing the live database schema\n\t*/\n\tasync introspect(driver, contract, schema = \"public\") {\n\t\treturn readWithDefaultOutputSettings(driver, async () => {\n\t\t\tconst declaredTables = extractContractTableNames(contract);\n\t\t\tconst declaredTablesBySchema = declaredTables.size > 0 ? await this.resolveNamespaceSchemas(driver, declaredTables) : /* @__PURE__ */ new Map([[schema, {\n\t\t\t\ttables: /* @__PURE__ */ new Set(),\n\t\t\t\tnamespaceIds: []\n\t\t\t}]]);\n\t\t\tconst contractColumnsOf = contractColumns(contract);\n\t\t\tconst namespaces = {};\n\t\t\tlet pgVersion = \"unknown\";\n\t\t\tfor (const [resolved, declaredHere] of declaredTablesBySchema) {\n\t\t\t\tconst { namespace, pgVersion: version } = await this.introspectSchema(driver, resolved, declaredHere.tables, (table, column) => contractColumnsOf.columnOf(declaredHere.namespaceIds, table, column));\n\t\t\t\tnamespaces[resolved] = namespace;\n\t\t\t\tpgVersion = version;\n\t\t\t}\n\t\t\treturn new PostgresDatabaseSchemaNode({\n\t\t\t\tnamespaces,\n\t\t\t\troles: await this.introspectRoles(driver),\n\t\t\t\texistingSchemas: await this.listExistingSchemas(driver),\n\t\t\t\tpgVersion\n\t\t\t});\n\t\t});\n\t}\n\t/**\n\t* Reads cluster-scoped database roles. Roles are not schema-qualified, so\n\t* this is queried once for the whole database rather than per namespace.\n\t*/\n\tasync introspectRoles(driver) {\n\t\treturn (await driver.query(`SELECT rolname\n FROM pg_catalog.pg_roles\n WHERE rolname NOT LIKE 'pg_%'\n AND rolname != 'postgres'\n ORDER BY rolname`)).rows.map((row) => new PostgresRoleSchemaNode({\n\t\t\tname: row.rolname,\n\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID\n\t\t}));\n\t}\n\t/**\n\t* Lists every non-system schema present in the connected database.\n\t* The introspection consumer (`verifyPostgresNamespacePresence`)\n\t* treats the result as the authoritative ground truth — declared\n\t* namespaces whose `ddlSchemaName` is missing from this list become\n\t* `missing_schema` issues, and the planner emits the matching\n\t* `CREATE SCHEMA` before table DDL.\n\t*/\n\tasync listExistingSchemas(driver) {\n\t\treturn (await driver.query(`SELECT nspname\n FROM pg_catalog.pg_namespace\n WHERE nspname NOT IN ('pg_catalog', 'information_schema', 'pg_toast')\n AND nspname NOT LIKE 'pg_temp_%'\n AND nspname NOT LIKE 'pg_toast_temp_%'\n ORDER BY nspname`)).rows.map((row) => row.nspname);\n\t}\n\t/**\n\t* Reads a column's reported default: a function or SQL NULL as itself, and a literal with the column's codec, when the contract declares the column. A literal of a column the contract does not declare keeps only its raw text. When the contract's default is an expression that writes a literal, the codec reads that literal too, for the diff to compare the two values.\n\t*/\n\tasync readReportedDefault(rawDefault, many, column) {\n\t\tconst reported = readPostgresDefault(rawDefault, many);\n\t\tif (reported.kind === \"function\") return { resolvedDefault: reported };\n\t\tif (reported.kind === \"null\") return { resolvedDefault: {\n\t\t\tkind: \"literal\",\n\t\t\tvalue: null\n\t\t} };\n\t\tconst codec = column === void 0 ? void 0 : codecForRef(this.codecRegistry, column.codecRef);\n\t\tif (codec === void 0) return {};\n\t\tconst expression = column?.defaultExpression;\n\t\tconst written = expression === void 0 ? void 0 : readPostgresDefault(expression, many);\n\t\treturn readColumnDefault(codec, {\n\t\t\tliteral: reported.literal,\n\t\t\traw: rawDefault\n\t\t}, expression !== void 0 && written?.kind === \"literal\" ? {\n\t\t\tliteral: written.literal,\n\t\t\texpression\n\t\t} : void 0);\n\t}\n\tasync resolveNamespaceSchemas(driver, declaredTables) {\n\t\tconst bySchema = /* @__PURE__ */ new Map();\n\t\tfor (const [id, tableNames] of declaredTables) {\n\t\t\tconst resolved = id === UNBOUND_NAMESPACE_ID ? await this.currentSchema(driver) : id;\n\t\t\tconst declared = bySchema.get(resolved) ?? {\n\t\t\t\ttables: /* @__PURE__ */ new Set(),\n\t\t\t\tnamespaceIds: []\n\t\t\t};\n\t\t\tfor (const name of tableNames) declared.tables.add(name);\n\t\t\tdeclared.namespaceIds.push(id);\n\t\t\tbySchema.set(resolved, declared);\n\t\t}\n\t\treturn bySchema;\n\t}\n\tasync currentSchema(driver) {\n\t\tconst { rows } = await driver.query(\"SELECT current_schema() AS current_schema\");\n\t\treturn rows[0]?.current_schema ?? \"public\";\n\t}\n\t/**\n\t* Introspects a single Postgres schema and returns the namespace node for\n\t* that schema (its tables, their policies, and its native enum type names),\n\t* alongside the cluster-scoped Postgres version. Used by `introspect` as\n\t* the per-namespace walk.\n\t*/\n\tasync introspectSchema(driver, schema, declaredTables, contractColumnOf) {\n\t\tconst tablesResult = await driver.query(`SELECT table_name\n FROM information_schema.tables\n WHERE table_schema = $1\n AND table_type = 'BASE TABLE'\n ORDER BY table_name`, [schema]);\n\t\tconst columnsResult = await driver.query(`SELECT\n c.table_name,\n column_name,\n data_type,\n udt_name,\n is_nullable,\n character_maximum_length,\n numeric_precision,\n numeric_scale,\n column_default,\n format_type(a.atttypid, a.atttypmod) AS formatted_type,\n a.attidentity,\n format_type(COALESCE(et.oid, t.oid), a.atttypmod) AS reported_text,\n COALESCE(et.typtype, t.typtype) AS reported_typtype,\n tns.nspname AS reported_type_schema,\n COALESCE(et.typname, t.typname) AS reported_type_name\n FROM information_schema.columns c\n JOIN pg_catalog.pg_class cl\n ON cl.relname = c.table_name\n JOIN pg_catalog.pg_namespace ns\n ON ns.nspname = c.table_schema\n AND ns.oid = cl.relnamespace\n JOIN pg_catalog.pg_attribute a\n ON a.attrelid = cl.oid\n AND a.attname = c.column_name\n AND a.attnum > 0\n AND NOT a.attisdropped\n JOIN pg_catalog.pg_type t\n ON t.oid = a.atttypid\n LEFT JOIN pg_catalog.pg_type et\n ON et.typarray = t.oid\n JOIN pg_catalog.pg_namespace tns\n ON tns.oid = COALESCE(et.typnamespace, t.typnamespace)\n WHERE c.table_schema = $1\n ORDER BY c.table_name, c.ordinal_position`, [schema]);\n\t\tconst pkResult = await driver.query(`SELECT\n cl.relname AS table_name,\n con.conname AS constraint_name,\n a.attname AS column_name,\n k.ord AS ordinal_position\n FROM pg_catalog.pg_constraint con\n JOIN pg_catalog.pg_class cl ON cl.oid = con.conrelid\n JOIN pg_catalog.pg_namespace ns ON ns.oid = cl.relnamespace\n JOIN LATERAL unnest(con.conkey) WITH ORDINALITY AS k(attnum, ord) ON true\n JOIN pg_catalog.pg_attribute a\n ON a.attrelid = con.conrelid\n AND a.attnum = k.attnum\n WHERE ns.nspname = $1\n AND con.contype = 'p'\n ORDER BY cl.relname, k.ord`, [schema]);\n\t\tconst fkResult = await driver.query(`SELECT\n cl.relname AS table_name,\n con.conname AS constraint_name,\n a.attname AS column_name,\n k.ord AS ordinal_position,\n ref_ns.nspname AS referenced_table_schema,\n ref_cl.relname AS referenced_table_name,\n ref_att.attname AS referenced_column_name,\n CASE con.confdeltype\n WHEN 'a' THEN 'NO ACTION'\n WHEN 'r' THEN 'RESTRICT'\n WHEN 'c' THEN 'CASCADE'\n WHEN 'n' THEN 'SET NULL'\n WHEN 'd' THEN 'SET DEFAULT'\n END AS delete_rule,\n CASE con.confupdtype\n WHEN 'a' THEN 'NO ACTION'\n WHEN 'r' THEN 'RESTRICT'\n WHEN 'c' THEN 'CASCADE'\n WHEN 'n' THEN 'SET NULL'\n WHEN 'd' THEN 'SET DEFAULT'\n END AS update_rule\n FROM pg_catalog.pg_constraint con\n JOIN pg_catalog.pg_class cl ON cl.oid = con.conrelid\n JOIN pg_catalog.pg_namespace ns ON ns.oid = cl.relnamespace\n JOIN LATERAL unnest(con.conkey) WITH ORDINALITY AS k(attnum, ord) ON true\n JOIN pg_catalog.pg_attribute a\n ON a.attrelid = con.conrelid\n AND a.attnum = k.attnum\n JOIN pg_catalog.pg_class ref_cl\n ON ref_cl.oid = con.confrelid\n JOIN pg_catalog.pg_namespace ref_ns\n ON ref_ns.oid = ref_cl.relnamespace\n JOIN pg_catalog.pg_attribute ref_att\n ON ref_att.attrelid = con.confrelid\n AND ref_att.attnum = con.confkey[k.ord]\n WHERE ns.nspname = $1\n AND con.contype = 'f'\n ORDER BY cl.relname, con.conname, k.ord`, [schema]);\n\t\tconst uniqueResult = await driver.query(`SELECT\n cl.relname AS table_name,\n con.conname AS constraint_name,\n a.attname AS column_name,\n k.ord AS ordinal_position\n FROM pg_catalog.pg_constraint con\n JOIN pg_catalog.pg_class cl ON cl.oid = con.conrelid\n JOIN pg_catalog.pg_namespace ns ON ns.oid = cl.relnamespace\n JOIN LATERAL unnest(con.conkey) WITH ORDINALITY AS k(attnum, ord) ON true\n JOIN pg_catalog.pg_attribute a\n ON a.attrelid = con.conrelid\n AND a.attnum = k.attnum\n WHERE ns.nspname = $1\n AND con.contype = 'u'\n ORDER BY cl.relname, con.conname, k.ord`, [schema]);\n\t\tconst indexResult = await driver.query(`SELECT\n i.tablename,\n i.indexname,\n ix.indisunique,\n pg_get_expr(ix.indpred, ix.indrelid) AS where_predicate,\n a.attname,\n CASE WHEN 0 = ANY(ix.indkey::int[]) THEN pg_get_indexdef(ix.indexrelid, k.ord::int, true) END AS element_def,\n k.ord AS index_position,\n am.amname,\n ic.reloptions\n FROM pg_indexes i\n JOIN pg_class ic ON ic.relname = i.indexname\n JOIN pg_namespace ins ON ins.oid = ic.relnamespace AND ins.nspname = $1\n JOIN pg_index ix ON ix.indexrelid = ic.oid\n JOIN pg_am am ON am.oid = ic.relam\n JOIN pg_class t ON t.oid = ix.indrelid\n JOIN pg_namespace tn ON tn.oid = t.relnamespace AND tn.nspname = $1\n JOIN LATERAL unnest(ix.indkey::int[]) WITH ORDINALITY AS k(attnum, ord) ON true\n LEFT JOIN pg_attribute a ON a.attrelid = t.oid AND a.attnum = k.attnum AND a.attnum > 0\n WHERE i.schemaname = $1\n AND NOT EXISTS (\n SELECT 1\n FROM pg_catalog.pg_constraint con\n WHERE con.conindid = ic.oid\n AND con.contype IN ('p', 'u', 'x')\n )\n ORDER BY i.tablename, i.indexname, k.ord`, [schema]);\n\t\tconst checkResult = await driver.query(`SELECT\n cl.relname AS table_name,\n c.conname AS constraint_name,\n pg_get_expr(c.conbin, c.conrelid) AS check_expression\n FROM pg_catalog.pg_constraint c\n JOIN pg_catalog.pg_class cl ON cl.oid = c.conrelid\n JOIN pg_catalog.pg_namespace ns ON ns.oid = cl.relnamespace\n WHERE ns.nspname = $1\n AND c.contype = 'c'\n AND c.conislocal\n AND c.conrelid <> 0\n ORDER BY cl.relname, c.conname`, [schema]);\n\t\tconst columnsByTable = groupBy(columnsResult.rows, \"table_name\");\n\t\tconst pksByTable = groupBy(pkResult.rows, \"table_name\");\n\t\tconst fksByTable = groupBy(fkResult.rows, \"table_name\");\n\t\tconst uniquesByTable = groupBy(uniqueResult.rows, \"table_name\");\n\t\tconst indexesByTable = groupBy(indexResult.rows, \"tablename\");\n\t\tconst checksByTable = groupBy(checkResult.rows, \"table_name\");\n\t\tconst pkConstraintsByTable = /* @__PURE__ */ new Map();\n\t\tfor (const row of pkResult.rows) {\n\t\t\tlet constraints = pkConstraintsByTable.get(row.table_name);\n\t\t\tif (!constraints) {\n\t\t\t\tconstraints = /* @__PURE__ */ new Set();\n\t\t\t\tpkConstraintsByTable.set(row.table_name, constraints);\n\t\t\t}\n\t\t\tconstraints.add(row.constraint_name);\n\t\t}\n\t\tconst tableInputs = {};\n\t\tfor (const tableRow of tablesResult.rows) {\n\t\t\tconst tableName = tableRow.table_name;\n\t\t\tconst columns = {};\n\t\t\tfor (const colRow of columnsByTable.get(tableName) ?? []) {\n\t\t\t\tconst reportedType = colRow.reported_text ? reportedSqlType({\n\t\t\t\t\ttext: colRow.reported_text,\n\t\t\t\t\ttyptype: colRow.reported_typtype,\n\t\t\t\t\tschema: colRow.reported_type_schema,\n\t\t\t\t\tname: colRow.reported_type_name\n\t\t\t\t}) : void 0;\n\t\t\t\tconst { typeText, many } = introspectedTypeText({\n\t\t\t\t\tformattedType: colRow.formatted_type,\n\t\t\t\t\tinformationSchemaType: colRow.data_type,\n\t\t\t\t\tudtName: colRow.udt_name,\n\t\t\t\t\tcharacterMaximumLength: colRow.character_maximum_length,\n\t\t\t\t\tnumericPrecision: colRow.numeric_precision,\n\t\t\t\t\tnumericScale: colRow.numeric_scale,\n\t\t\t\t\t...reportedType?.kind === \"enum\" ? { enumType: {\n\t\t\t\t\t\tschema: colRow.reported_type_schema,\n\t\t\t\t\t\tname: colRow.reported_type_name\n\t\t\t\t\t} } : {}\n\t\t\t\t});\n\t\t\t\tconst rawDefault = colRow.column_default ?? void 0;\n\t\t\t\tconst readDefault = colRow.attidentity === \"a\" || colRow.attidentity === \"d\" ? { resolvedDefault: {\n\t\t\t\t\tkind: \"function\",\n\t\t\t\t\texpression: \"autoincrement()\"\n\t\t\t\t} } : rawDefault !== void 0 ? await this.readReportedDefault(rawDefault, many === true, contractColumnOf(tableName, colRow.column_name)) : {};\n\t\t\t\tcolumns[colRow.column_name] = {\n\t\t\t\t\tname: colRow.column_name,\n\t\t\t\t\ttypeText,\n\t\t\t\t\tnullable: colRow.is_nullable === \"YES\",\n\t\t\t\t\t...ifDefined(\"default\", rawDefault),\n\t\t\t\t\t...ifDefined(\"many\", many),\n\t\t\t\t\t...readDefault,\n\t\t\t\t\t...ifDefined(\"reportedType\", reportedType),\n\t\t\t\t\t...reportedType === void 0 ? {} : resolveIntrospectedColumnType(reportedType, this.declaredDataTypes)\n\t\t\t\t};\n\t\t\t}\n\t\t\tconst pkRows = [...pksByTable.get(tableName) ?? []];\n\t\t\tconst primaryKeyColumns = pkRows.sort((a, b) => a.ordinal_position - b.ordinal_position).map((row) => row.column_name);\n\t\t\tconst primaryKey = primaryKeyColumns.length > 0 ? {\n\t\t\t\tcolumns: primaryKeyColumns,\n\t\t\t\t...pkRows[0]?.constraint_name ? { name: pkRows[0].constraint_name } : {},\n\t\t\t\tdependsOn: postgresColumnDependsOn(schema, tableName, primaryKeyColumns)\n\t\t\t} : void 0;\n\t\t\tconst foreignKeysMap = /* @__PURE__ */ new Map();\n\t\t\tfor (const fkRow of fksByTable.get(tableName) ?? []) {\n\t\t\t\tconst existing = foreignKeysMap.get(fkRow.constraint_name);\n\t\t\t\tif (existing) {\n\t\t\t\t\texisting.columns.push(fkRow.column_name);\n\t\t\t\t\texisting.referencedColumns.push(fkRow.referenced_column_name);\n\t\t\t\t} else foreignKeysMap.set(fkRow.constraint_name, {\n\t\t\t\t\tcolumns: [fkRow.column_name],\n\t\t\t\t\treferencedTable: fkRow.referenced_table_name,\n\t\t\t\t\treferencedSchema: fkRow.referenced_table_schema,\n\t\t\t\t\treferencedColumns: [fkRow.referenced_column_name],\n\t\t\t\t\tname: fkRow.constraint_name,\n\t\t\t\t\tdeleteRule: fkRow.delete_rule,\n\t\t\t\t\tupdateRule: fkRow.update_rule\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst foreignKeys = Array.from(foreignKeysMap.values()).map((fk) => ({\n\t\t\t\tcolumns: freezeStringArray(fk.columns),\n\t\t\t\treferencedTable: fk.referencedTable,\n\t\t\t\treferencedSchema: fk.referencedSchema,\n\t\t\t\treferencedColumns: freezeStringArray(fk.referencedColumns),\n\t\t\t\tname: fk.name,\n\t\t\t\t...ifDefined(\"onDelete\", mapReferentialAction(fk.deleteRule)),\n\t\t\t\t...ifDefined(\"onUpdate\", mapReferentialAction(fk.updateRule)),\n\t\t\t\tdependsOn: [postgresTableDependsOn(fk.referencedSchema, fk.referencedTable), ...postgresColumnDependsOn(schema, tableName, fk.columns)]\n\t\t\t}));\n\t\t\tconst pkConstraints = pkConstraintsByTable.get(tableName) ?? /* @__PURE__ */ new Set();\n\t\t\tconst uniquesMap = /* @__PURE__ */ new Map();\n\t\t\tfor (const uniqueRow of uniquesByTable.get(tableName) ?? []) {\n\t\t\t\tif (pkConstraints.has(uniqueRow.constraint_name)) continue;\n\t\t\t\tconst existing = uniquesMap.get(uniqueRow.constraint_name);\n\t\t\t\tif (existing) existing.columns.push(uniqueRow.column_name);\n\t\t\t\telse uniquesMap.set(uniqueRow.constraint_name, {\n\t\t\t\t\tcolumns: [uniqueRow.column_name],\n\t\t\t\t\tname: uniqueRow.constraint_name\n\t\t\t\t});\n\t\t\t}\n\t\t\tconst uniques = Array.from(uniquesMap.values()).map((uq) => ({\n\t\t\t\tcolumns: freezeStringArray(uq.columns),\n\t\t\t\tname: uq.name,\n\t\t\t\tdependsOn: postgresColumnDependsOn(schema, tableName, uq.columns)\n\t\t\t}));\n\t\t\tconst indexesMap = /* @__PURE__ */ new Map();\n\t\t\tfor (const idxRow of indexesByTable.get(tableName) ?? []) {\n\t\t\t\tconst existing = indexesMap.get(idxRow.indexname);\n\t\t\t\tif (existing) existing.elements.push({\n\t\t\t\t\tattname: idxRow.attname,\n\t\t\t\t\telementDef: idxRow.element_def\n\t\t\t\t});\n\t\t\t\telse {\n\t\t\t\t\tconst indexType = idxRow.amname ?? void 0;\n\t\t\t\t\tconst indexOptions = parsePgReloptions(idxRow.reloptions, idxRow.indexname);\n\t\t\t\t\tindexesMap.set(idxRow.indexname, {\n\t\t\t\t\t\tname: idxRow.indexname,\n\t\t\t\t\t\telements: [{\n\t\t\t\t\t\t\tattname: idxRow.attname,\n\t\t\t\t\t\t\telementDef: idxRow.element_def\n\t\t\t\t\t\t}],\n\t\t\t\t\t\tunique: idxRow.indisunique,\n\t\t\t\t\t\twhere: idxRow.where_predicate,\n\t\t\t\t\t\ttype: indexType,\n\t\t\t\t\t\toptions: indexOptions\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t\tconst indexes = Array.from(indexesMap.values()).map((idx) => {\n\t\t\t\tconst isExpression = idx.elements.some((el) => el.attname === null);\n\t\t\t\tconst columnNames = idx.elements.flatMap((el) => el.attname !== null ? [el.attname] : []);\n\t\t\t\tconst base = {\n\t\t\t\t\tnaming: namingOfLiveName(idx.name),\n\t\t\t\t\twhere: idx.where ?? void 0,\n\t\t\t\t\tunique: idx.unique,\n\t\t\t\t\tpartial: idx.where !== null,\n\t\t\t\t\ttype: idx.type,\n\t\t\t\t\toptions: idx.options,\n\t\t\t\t\tannotations: void 0,\n\t\t\t\t\tdependsOn: postgresColumnDependsOn(schema, tableName, isExpression ? Object.keys(columns) : columnNames)\n\t\t\t\t};\n\t\t\t\treturn isExpression ? {\n\t\t\t\t\t...base,\n\t\t\t\t\texpression: idx.elements.map((el) => el.elementDef ?? \"\").join(\", \")\n\t\t\t\t} : {\n\t\t\t\t\t...base,\n\t\t\t\t\tcolumns: Object.freeze([...columnNames])\n\t\t\t\t};\n\t\t\t});\n\t\t\tconst checksForTable = (checksByTable.get(tableName) ?? []).map((checkRow) => ({\n\t\t\t\tnaming: namingOfLiveName(checkRow.constraint_name),\n\t\t\t\texpression: checkRow.check_expression,\n\t\t\t\tdependsOn: postgresColumnDependsOn(schema, tableName, Object.keys(columns))\n\t\t\t}));\n\t\t\ttableInputs[tableName] = {\n\t\t\t\tname: tableName,\n\t\t\t\tcolumns,\n\t\t\t\t...ifDefined(\"primaryKey\", primaryKey),\n\t\t\t\tforeignKeys,\n\t\t\t\tuniques,\n\t\t\t\tindexes,\n\t\t\t\t...ifDefined(\"checks\", checksForTable.length > 0 ? checksForTable : void 0)\n\t\t\t};\n\t\t}\n\t\tconst enums = (await driver.query(`SELECT t.typname, array_agg(e.enumlabel ORDER BY e.enumsortorder) AS enumvalues\n FROM pg_catalog.pg_type t\n JOIN pg_catalog.pg_namespace n ON n.oid = t.typnamespace\n JOIN pg_catalog.pg_enum e ON e.enumtypid = t.oid\n WHERE t.typtype = 'e'\n AND n.nspname = $1\n GROUP BY t.typname\n ORDER BY t.typname`, [schema])).rows.map((r) => new PostgresNativeEnumSchemaNode({\n\t\t\ttypeName: r.typname,\n\t\t\tnamespaceId: schema,\n\t\t\tmembers: parsePgNameArray(r.enumvalues)\n\t\t}));\n\t\tconst policiesResult = await driver.query(`SELECT schemaname, tablename, policyname, cmd, roles, qual, with_check, permissive\n FROM pg_catalog.pg_policies\n WHERE schemaname = $1\n ORDER BY tablename, policyname`, [schema]);\n\t\tconst policiesByTable = /* @__PURE__ */ new Map();\n\t\tfor (const row of policiesResult.rows) {\n\t\t\tconst operation = mapPgCmd(row.cmd);\n\t\t\tconst policyRoles = [...new Set(parsePgNameArray(row.roles).map((r) => r.toLowerCase()))].sort();\n\t\t\tconst permissive = row.permissive.toUpperCase() === \"PERMISSIVE\";\n\t\t\tconst policy = new PostgresPolicySchemaNode({\n\t\t\t\tnaming: namingOfLiveName(row.policyname),\n\t\t\t\ttableName: row.tablename,\n\t\t\t\tnamespaceId: row.schemaname,\n\t\t\t\toperation,\n\t\t\t\troles: policyRoles,\n\t\t\t\tusing: row.qual ?? void 0,\n\t\t\t\twithCheck: row.with_check ?? void 0,\n\t\t\t\tpermissive,\n\t\t\t\tdependsOn: [postgresTableDependsOn(row.schemaname, row.tablename), ...policyRoles.map(postgresRoleDependsOn)]\n\t\t\t});\n\t\t\tconst list = policiesByTable.get(row.tablename) ?? [];\n\t\t\tlist.push(policy);\n\t\t\tpoliciesByTable.set(row.tablename, list);\n\t\t}\n\t\tconst rlsEnabledResult = await driver.query(`SELECT c.relname AS tablename, c.relrowsecurity AS rls_enabled\n FROM pg_catalog.pg_class c\n JOIN pg_catalog.pg_namespace n ON n.oid = c.relnamespace\n WHERE n.nspname = $1\n AND c.relkind IN ('r', 'p')\n ORDER BY c.relname`, [schema]);\n\t\tconst rlsEnabledByTable = new Map(rlsEnabledResult.rows.map((row) => [row.tablename, row.rls_enabled]));\n\t\tconst tables = {};\n\t\tfor (const [tableName, input] of Object.entries(tableInputs)) {\n\t\t\tif (OTHER_TOOL_MIGRATION_TABLES.has(tableName) && !declaredTables.has(tableName)) continue;\n\t\t\ttables[tableName] = new PostgresTableSchemaNode({\n\t\t\t\t...input,\n\t\t\t\tpolicies: policiesByTable.get(tableName) ?? [],\n\t\t\t\trlsEnabled: rlsEnabledByTable.get(tableName) ?? false\n\t\t\t});\n\t\t}\n\t\treturn {\n\t\t\tnamespace: new PostgresNamespaceSchemaNode({\n\t\t\t\tschemaName: schema,\n\t\t\t\ttables,\n\t\t\t\tnativeEnums: enums\n\t\t\t}),\n\t\t\tpgVersion: await this.getPostgresVersion(driver)\n\t\t};\n\t}\n\t/**\n\t* Gets the Postgres version from the database.\n\t*/\n\tasync getPostgresVersion(driver) {\n\t\treturn ((await driver.query(\"SELECT version() AS version\", [])).rows[0]?.version ?? \"\").match(/PostgreSQL (\\d+\\.\\d+)/)?.[1] ?? \"unknown\";\n\t}\n};\n/**\n* Normalises a `name[]` column value from Postgres catalog views such as\n* `pg_policies.roles` and aggregate queries over `pg_enum.enumlabel`.\n*\n* Control-plane queries use the Postgres driver's raw-text parser policy for\n* array OIDs, so this helper accepts raw Postgres array literals only. A native\n* JS array at this boundary means the caller bypassed target-owned framing and\n* is rejected rather than normalized as a second representation.\n*\n* The parser honors Postgres array-literal quoting: an element\n* containing a comma, quote, backslash, brace, or significant whitespace is\n* emitted double-quoted with `\\\"` / `\\\\` escapes, and unquoted elements are\n* whitespace-trimmed — so a label like `in progress` or `say \"hi\"` parses to\n* its true value instead of being split or kept escaped.\n*/\nfunction parsePgNameArray(value) {\n\tif (Array.isArray(value)) throw new TypeError(`expected raw text for a Postgres array, got ${typeof value}`);\n\tif (typeof value !== \"string\") return [];\n\treturn parsePostgresListText(value).map((entry) => String(entry));\n}\n/**\n* Maps `pg_policies.cmd` text values to the `RlsPolicyOperation` union.\n* The `pg_policies` view renders the internal command code as an uppercase\n* English keyword; this function lowercases to match the IR type.\n*/\nfunction mapPgCmd(cmd) {\n\tswitch (cmd.toUpperCase()) {\n\t\tcase \"SELECT\": return \"select\";\n\t\tcase \"INSERT\": return \"insert\";\n\t\tcase \"UPDATE\": return \"update\";\n\t\tcase \"DELETE\": return \"delete\";\n\t\tdefault: return \"all\";\n\t}\n}\nfunction isRecord(value) {\n\treturn typeof value === \"object\" && value !== null;\n}\nfunction freezeStringArray(values) {\n\treturn Object.freeze([...values]);\n}\n/**\n* The table names a contract's storage declares, keyed by namespace id. Empty when no contract (or no storage / namespaces) is present, which makes `PostgresControlAdapter.introspect` fall back to the single-schema walk.\n*/\nfunction extractContractTableNames(contract) {\n\tif (!isRecord(contract)) return /* @__PURE__ */ new Map();\n\tconst storage = contract[\"storage\"];\n\tif (!isRecord(storage)) return /* @__PURE__ */ new Map();\n\tconst namespaces = storage[\"namespaces\"];\n\tif (!isRecord(namespaces)) return /* @__PURE__ */ new Map();\n\treturn new Map(Object.entries(namespaces).map(([id, namespace]) => [id, declaredTableNames(namespace)]));\n}\nfunction declaredTableNames(namespace) {\n\tif (!isRecord(namespace)) return [];\n\tconst entries = namespace[\"entries\"];\n\tif (!isRecord(entries)) return [];\n\tconst tables = entries[\"table\"];\n\treturn isRecord(tables) ? Object.keys(tables) : [];\n}\nconst PG_REFERENTIAL_ACTION_MAP = {\n\t\"NO ACTION\": \"noAction\",\n\tRESTRICT: \"restrict\",\n\tCASCADE: \"cascade\",\n\t\"SET NULL\": \"setNull\",\n\t\"SET DEFAULT\": \"setDefault\"\n};\n/**\n* Maps a Postgres referential action rule to the canonical SqlReferentialAction.\n* Returns undefined for 'NO ACTION' (the database default) to keep the IR sparse.\n* Throws for unrecognized rules to prevent silent data loss.\n*/\nfunction isPgReferentialActionRule(rule) {\n\treturn Object.hasOwn(PG_REFERENTIAL_ACTION_MAP, rule);\n}\nfunction mapReferentialAction(rule) {\n\tif (!isPgReferentialActionRule(rule)) throw adapterError(\"CONTRACT.INTROSPECTION_UNSUPPORTED\", `Unknown PostgreSQL referential action rule: \"${rule}\". Expected one of: NO ACTION, RESTRICT, CASCADE, SET NULL, SET DEFAULT.`, { meta: { rule } });\n\tconst mapped = PG_REFERENTIAL_ACTION_MAP[rule];\n\tif (mapped === \"noAction\") return void 0;\n\treturn mapped;\n}\n/**\n* A FK/policy dependency chain, mirroring the shape the expected-side\n* derivation stamps (`contractToPostgresDatabaseSchemaNode`): the database\n* root's fixed sentinel id, then the namespace, then the table.\n*/\nfunction postgresTableDependsOn(namespaceId, tableName) {\n\treturn [\n\t\t{\n\t\t\tnodeKind: PostgresSchemaNodeKind.database,\n\t\t\tid: \"database\"\n\t\t},\n\t\t{\n\t\t\tnodeKind: PostgresSchemaNodeKind.namespace,\n\t\t\tid: namespaceId\n\t\t},\n\t\t{\n\t\t\tnodeKind: PostgresSchemaNodeKind.table,\n\t\t\tid: tableName\n\t\t}\n\t];\n}\n/** A policy's dependency chain onto one of the roles it grants to. */\nfunction postgresRoleDependsOn(role) {\n\treturn [{\n\t\tnodeKind: PostgresSchemaNodeKind.database,\n\t\tid: \"database\"\n\t}, {\n\t\tnodeKind: PostgresSchemaNodeKind.role,\n\t\tid: role\n\t}];\n}\n/**\n* The chains from a table-child object (foreign key, index, unique, primary\n* key) to each of the own columns it is built on — the introspection-side\n* mirror of `contractToPostgresDatabaseSchemaNode`'s `columnDependsOn`. An\n* object is dropped before the columns it covers.\n*/\nfunction postgresColumnDependsOn(namespaceId, tableName, columns) {\n\treturn columns.map((column) => [...postgresTableDependsOn(namespaceId, tableName), {\n\t\tnodeKind: RelationalSchemaNodeKind.column,\n\t\tid: `column:${column}`\n\t}]);\n}\n/**\n* Groups an array of objects by a specified key.\n* Returns a Map for O(1) lookup by group key.\n*/\n/**\n* Parses a `pg_class.reloptions` array into a `Record<string, string>`.\n*\n* Postgres returns reloptions as a `text[]` whose entries are `key=value`\n* strings; the value side is always a string regardless of the underlying\n* scalar type. The verifier compares contract options to introspected\n* options after coercing both sides to strings, so keeping the raw text\n* here is correct.\n*\n* Returns `undefined` when the input is null/empty (no WITH clause).\n*/\nfunction parsePgReloptions(reloptions, indexName) {\n\tif (Array.isArray(reloptions)) throw new TypeError(`expected raw text for a Postgres array, got ${typeof reloptions}`);\n\tif (reloptions === null || reloptions === void 0) return;\n\tif (typeof reloptions !== \"string\") return;\n\tconst entries = parsePostgresListText(reloptions).map((entry) => String(entry));\n\tif (entries.length === 0) return;\n\tconst result = {};\n\tfor (const entry of entries) {\n\t\tconst eq = entry.indexOf(\"=\");\n\t\tif (eq === -1) throw adapterError(\"CONTRACT.INTROSPECTION_UNSUPPORTED\", `Postgres introspection: malformed reloption entry \"${entry}\" on index \"${indexName}\" (expected \"key=value\")`, { meta: {\n\t\t\tentry,\n\t\t\tindexName\n\t\t} });\n\t\tconst key = entry.slice(0, eq);\n\t\tresult[key] = entry.slice(eq + 1);\n\t}\n\treturn Object.keys(result).length > 0 ? result : void 0;\n}\nfunction groupBy(items, key) {\n\tconst map = /* @__PURE__ */ new Map();\n\tfor (const item of items) {\n\t\tconst groupKey = item[key];\n\t\tlet group = map.get(groupKey);\n\t\tif (!group) {\n\t\t\tgroup = [];\n\t\t\tmap.set(groupKey, group);\n\t\t}\n\t\tgroup.push(item);\n\t}\n\treturn map;\n}\nconst INTROSPECTION_OUTPUT_SETTINGS = {\n\ttimeZone: \"UTC\",\n\tdateStyle: \"ISO, MDY\",\n\tintervalStyle: \"postgres\",\n\tbyteaOutput: \"hex\"\n};\nasync function readOutputSettings(driver) {\n\tconst { rows } = await driver.query(`SELECT current_setting('TimeZone') AS \"timeZone\",\n current_setting('DateStyle') AS \"dateStyle\",\n current_setting('IntervalStyle') AS \"intervalStyle\",\n current_setting('bytea_output') AS \"byteaOutput\"`);\n\treturn rows[0];\n}\nasync function applyOutputSettings(driver, settings, local) {\n\tawait driver.query(`SELECT set_config('TimeZone', $1, $5),\n set_config('DateStyle', $2, $5),\n set_config('IntervalStyle', $3, $5),\n set_config('bytea_output', $4, $5)`, [\n\t\tsettings.timeZone,\n\t\tsettings.dateStyle,\n\t\tsettings.intervalStyle,\n\t\tsettings.byteaOutput,\n\t\tlocal\n\t]);\n}\nfunction sameOutputSettings(a, b) {\n\treturn a?.timeZone === b.timeZone && a.dateStyle === b.dateStyle && a.intervalStyle === b.intervalStyle && a.byteaOutput === b.byteaOutput;\n}\n/**\n* Runs `read` with the settings that shape printed values pinned to Postgres's defaults, then\n* restores the caller's. Postgres prints a `timestamptz` default in the session time zone, and\n* dates, intervals and bytea in the session styles, so pinning them gives the same text whatever\n* the server, the role, or the caller set.\n*\n* The settings are first set locally. A local setting outlives its own statement only inside a\n* transaction, so reading them back tells the two cases apart. Inside the caller's transaction they\n* are set and restored locally, so the caller's session values return when it commits; outside\n* one they are set and restored for the session. When `read` fails, its error is the one thrown;\n* inside a transaction the failure aborts it, and the caller's rollback restores the settings.\n*/\nasync function readWithDefaultOutputSettings(driver, read) {\n\tconst callerSettings = await readOutputSettings(driver);\n\tif (callerSettings === void 0) return read();\n\tawait applyOutputSettings(driver, INTROSPECTION_OUTPUT_SETTINGS, true);\n\tconst local = sameOutputSettings(await readOutputSettings(driver), INTROSPECTION_OUTPUT_SETTINGS);\n\tif (!local) await applyOutputSettings(driver, INTROSPECTION_OUTPUT_SETTINGS, false);\n\tconst restore = () => applyOutputSettings(driver, callerSettings, local);\n\tlet result;\n\ttry {\n\t\tresult = await read();\n\t} catch (error) {\n\t\tawait restore().catch(() => void 0);\n\t\tthrow error;\n\t}\n\tawait restore();\n\treturn result;\n}\n/** A value as DDL writes it, with a `Date` written as its ISO 8601 text, which an invalid `Date` has none of. */\nfunction pgInlineLiteral(wire, typeText, where) {\n\tconst dateAsText = (value) => {\n\t\tif (!(value instanceof Date)) return value;\n\t\tif (Number.isNaN(value.getTime())) throw adapterError(\"CONTRACT.DEFAULT_INVALID\", `Column \"${where.table}\".\"${where.column}\" has an invalid Date default`, { meta: {\n\t\t\ttable: where.table,\n\t\t\tcolumn: where.column,\n\t\t\treason: \"invalid-date-default\"\n\t\t} });\n\t\treturn value.toISOString();\n\t};\n\treturn inlineLiteral(Array.isArray(wire) && typeText.endsWith(\"[]\") ? wire.map(dateAsText) : dateAsText(wire), typeText);\n}\nconst SERIAL_FAMILY_TYPES = /* @__PURE__ */ new Set([\n\t\"serial\",\n\t\"serial4\",\n\t\"bigserial\",\n\t\"serial8\",\n\t\"smallserial\",\n\t\"serial2\"\n]);\nasync function pgRenderDdlColumnDefault(def, typeText, codecLookup, codecRef, where) {\n\tif (def.kind === \"function\") {\n\t\tif (def.expression.text === \"autoincrement()\") {\n\t\t\tif (!SERIAL_FAMILY_TYPES.has(typeText.toLowerCase())) throw postgresError(\"CONTRACT.DEFAULT_INVALID\", `Column type \"${typeText}\" has an autoincrement() default but is not a SERIAL-family pseudo-type. Autoincrement columns must declare their type as SERIAL (or SERIAL4), BIGSERIAL (or SERIAL8), or SMALLSERIAL (or SERIAL2) — e.g. col(name, \"SERIAL\", { default: fn(\"autoincrement()\") }).`, { meta: { typeText } });\n\t\t\treturn \"\";\n\t\t}\n\t\tif (checkSqlDefaultText(def.expression.text) !== void 0) throw postgresError(\"CONTRACT.DEFAULT_INVALID\", `Unsafe default expression in contract: \"${def.expression.text}\". Default expressions must not contain semicolons, SQL comment tokens, dollar-quoting, or subqueries.`, { meta: { expression: def.expression.text } });\n\t\treturn `DEFAULT (${renderOpaqueSql(def.expression)})`;\n\t}\n\treturn `DEFAULT ${pgInlineLiteral(await pgWrittenDefault(def.value, typeText, codecLookup, codecRef, where), typeText, where)}`;\n}\n/**\n* The value DDL writes for a literal default, and for each element of a list default: a value the codec reads as SQL NULL as `null`, and anything else as the codec's wire value (`fromDataTypeValue`, then `toWire`). Without a codec, the value as written.\n*/\nasync function pgWrittenDefault(value, typeText, codecLookup, codecRef, where) {\n\tif (value === null && typeText.endsWith(\"[]\")) return null;\n\tif (Array.isArray(value) && typeText.endsWith(\"[]\")) {\n\t\tconst encoded = codecRef === void 0 ? void 0 : await encodeListLiteralDefault(codecLookup, codecRef, value, where);\n\t\treturn value.map((element, index) => pgWrittenValue(element, encoded?.[index]));\n\t}\n\treturn pgWrittenValue(value, codecRef === void 0 ? void 0 : await encodeLiteralDefault(codecLookup, codecRef, value, where));\n}\nfunction pgWrittenValue(value, encoded) {\n\tif (encoded === void 0) return value;\n\treturn encoded.kind === \"sql-null\" ? null : encoded.wire;\n}\nasync function pgRenderDdlColumn(column, codecLookup, table) {\n\tconst parts = [quoteIdentifier(column.name), column.type];\n\tif (column.default) {\n\t\tconst clause = await pgRenderDdlColumnDefault(column.default, column.type, codecLookup, column.codecRef, {\n\t\t\ttable,\n\t\t\tcolumn: column.name\n\t\t});\n\t\tif (clause.length > 0) parts.push(clause);\n\t}\n\tif (column.notNull) parts.push(\"NOT NULL\");\n\tif (column.primaryKey) parts.push(\"PRIMARY KEY\");\n\treturn parts.join(\" \");\n}\nfunction pgRenderDdlConstraint(constraint) {\n\tif (constraint.kind === \"primary-key\") {\n\t\tconst cols = constraint.columns.map(quoteIdentifier).join(\", \");\n\t\tif (constraint.name !== void 0) return `CONSTRAINT ${quoteIdentifier(constraint.name)} PRIMARY KEY (${cols})`;\n\t\treturn `PRIMARY KEY (${cols})`;\n\t}\n\tif (constraint.kind === \"foreign-key\") {\n\t\tlet sql = `FOREIGN KEY (${constraint.columns.map(quoteIdentifier).join(\", \")}) REFERENCES ${constraint.refTable.split(\".\").map(quoteIdentifier).join(\".\")} (${constraint.refColumns.map(quoteIdentifier).join(\", \")})`;\n\t\tif (constraint.onDelete !== void 0) sql += ` ON DELETE ${REFERENTIAL_ACTION_SQL[constraint.onDelete]}`;\n\t\tif (constraint.onUpdate !== void 0) sql += ` ON UPDATE ${REFERENTIAL_ACTION_SQL[constraint.onUpdate]}`;\n\t\tif (constraint.name !== void 0) sql = `CONSTRAINT ${quoteIdentifier(constraint.name)} ${sql}`;\n\t\treturn sql;\n\t}\n\tif (constraint.kind === \"check-expression\") return `CONSTRAINT ${quoteIdentifier(constraint.name)} CHECK (${renderOpaqueSql(constraint.expression)})`;\n\tconst cols = constraint.columns.map(quoteIdentifier).join(\", \");\n\tif (constraint.name !== void 0) return `CONSTRAINT ${quoteIdentifier(constraint.name)} UNIQUE (${cols})`;\n\treturn `UNIQUE (${cols})`;\n}\nasync function pgRenderCreateTable(node, codecLookup) {\n\tconst ifNotExists = node.ifNotExists ? \"IF NOT EXISTS \" : \"\";\n\tconst tableRef = pgQualify(node.schema, node.table);\n\tconst columnDefs = await Promise.all(node.columns.map((col) => pgRenderDdlColumn(col, codecLookup, node.table)));\n\tconst constraintDefs = node.constraints !== void 0 ? node.constraints.map(pgRenderDdlConstraint) : [];\n\treturn {\n\t\tsql: `CREATE TABLE ${ifNotExists}${tableRef} (\\n ${[...columnDefs, ...constraintDefs].join(\",\\n \")}\\n)`,\n\t\tparams: []\n\t};\n}\nfunction pgRenderCreateSchema(node) {\n\treturn {\n\t\tsql: `CREATE SCHEMA ${node.ifNotExists ? \"IF NOT EXISTS \" : \"\"}${quoteIdentifier(node.schema)}`,\n\t\tparams: []\n\t};\n}\nfunction pgRenderCreateType(node) {\n\treturn {\n\t\tsql: `CREATE TYPE ${pgQualify(node.schema, node.name)} AS ENUM (${node.values.map((value) => `'${escapeLiteral(value)}'`).join(\", \")})`,\n\t\tparams: []\n\t};\n}\nfunction pgRenderDropType(node) {\n\treturn {\n\t\tsql: `DROP TYPE ${pgQualify(node.schema, node.name)}`,\n\t\tparams: []\n\t};\n}\nasync function pgRenderAlterTable(node, codecLookup) {\n\tconst tableRef = pgQualify(node.schema, node.table);\n\tconst actionVisitor = {\n\t\tasync addColumn(action) {\n\t\t\treturn `ADD COLUMN ${await pgRenderDdlColumn(action.column, codecLookup, node.table)}`;\n\t\t},\n\t\tdropDefault(action) {\n\t\t\treturn Promise.resolve(`ALTER COLUMN ${quoteIdentifier(action.columnName)} DROP DEFAULT`);\n\t\t},\n\t\taddConstraint(action) {\n\t\t\treturn Promise.resolve(`ADD ${pgRenderDdlConstraint(action.constraint)}`);\n\t\t},\n\t\talterColumnType(action) {\n\t\t\tconst column = quoteIdentifier(action.columnName);\n\t\t\tconst using = action.using === void 0 ? `${column}::${action.type}` : renderOpaqueSql(action.using);\n\t\t\treturn Promise.resolve(`ALTER COLUMN ${column} TYPE ${action.type} USING ${using}`);\n\t\t}\n\t};\n\treturn {\n\t\tsql: `ALTER TABLE ${tableRef} ${(await Promise.all(node.actions.map((action) => action.accept(actionVisitor)))).join(\", \")}`,\n\t\tparams: []\n\t};\n}\nfunction pgRenderCreatePolicy(node) {\n\tconst tableRef = `${quoteIdentifier(node.schema)}.${quoteIdentifier(node.table)}`;\n\tconst permissiveness = node.permissive ? \"PERMISSIVE\" : \"RESTRICTIVE\";\n\tconst command = POLICY_COMMAND_SQL[node.operation];\n\tconst roles = policyRoleList(node.roles).join(\", \");\n\tlet sql = `CREATE POLICY ${quoteIdentifier(node.name)} ON ${tableRef} AS ${permissiveness} FOR ${command} TO ${roles}`;\n\tif (node.using !== void 0) sql += ` USING (${renderOpaqueSql(node.using)})`;\n\tif (node.withCheck !== void 0) sql += ` WITH CHECK (${renderOpaqueSql(node.withCheck)})`;\n\treturn {\n\t\tsql,\n\t\tparams: []\n\t};\n}\nfunction pgRenderDropPolicy(node) {\n\tconst tableRef = `${quoteIdentifier(node.schema)}.${quoteIdentifier(node.table)}`;\n\treturn {\n\t\tsql: `DROP POLICY ${quoteIdentifier(node.name)} ON ${tableRef}`,\n\t\tparams: []\n\t};\n}\nfunction pgRenderAlterPolicyRename(node) {\n\tconst tableRef = `${quoteIdentifier(node.schema)}.${quoteIdentifier(node.table)}`;\n\treturn {\n\t\tsql: `ALTER POLICY ${quoteIdentifier(node.name)} ON ${tableRef} RENAME TO ${quoteIdentifier(node.newName)}`,\n\t\tparams: []\n\t};\n}\n/**\n* Renders one index reloption value: strings single-quote-escaped, finite\n* numbers verbatim, booleans in the `on`/`off` catalog spelling (the\n* canonical form the wire hash and the option equality commit to).\n*/\nfunction pgRenderIndexOptionValue(key, value) {\n\tif (typeof value === \"string\") return `'${escapeLiteral(value)}'`;\n\tif (typeof value === \"number\" && Number.isFinite(value)) return String(value);\n\tif (typeof value === \"boolean\") return value ? \"on\" : \"off\";\n\tthrow postgresError(\"CONTRACT.INDEX_INVALID\", `Index option \"${key}\" must be a string, finite number, or boolean; got ${typeof value}`, { meta: {\n\t\tkey,\n\t\tvalueType: typeof value\n\t} });\n}\n/** Qualifies an object name; an absent schema renders it unqualified (unbound namespace). */\nfunction pgQualify(schema, name) {\n\treturn schema === void 0 ? quoteIdentifier(name) : `${quoteIdentifier(schema)}.${quoteIdentifier(name)}`;\n}\nfunction pgRenderCreateIndex(node) {\n\tconst elementList = \"columns\" in node.elements ? node.elements.columns.map(quoteIdentifier).join(\", \") : renderOpaqueSql(node.elements.expression);\n\tconst unique = node.unique ? \"UNIQUE \" : \"\";\n\tconst using = node.type !== void 0 ? ` USING ${quoteIdentifier(node.type)}` : \"\";\n\tconst withClause = node.options !== void 0 && Object.keys(node.options).length > 0 ? ` WITH (${Object.entries(node.options).map(([key, value]) => `${quoteIdentifier(key)} = ${pgRenderIndexOptionValue(key, value)}`).join(\", \")})` : \"\";\n\tconst whereClause = node.where !== void 0 ? ` WHERE (${renderOpaqueSql(node.where)})` : \"\";\n\treturn {\n\t\tsql: `CREATE ${unique}INDEX ${quoteIdentifier(node.name)} ON ${pgQualify(node.schema, node.table)}${using} (${elementList})${withClause}${whereClause}`,\n\t\tparams: []\n\t};\n}\nfunction pgRenderDropIndex(node) {\n\treturn {\n\t\tsql: `DROP INDEX ${pgQualify(node.schema, node.name)}`,\n\t\tparams: []\n\t};\n}\nfunction pgRenderAlterIndexRename(node) {\n\treturn {\n\t\tsql: `ALTER INDEX ${pgQualify(node.schema, node.from)} RENAME TO ${quoteIdentifier(node.to)}`,\n\t\tparams: []\n\t};\n}\nfunction pgRenderDisableRowLevelSecurity(node) {\n\treturn {\n\t\tsql: `ALTER TABLE ${`${quoteIdentifier(node.schema)}.${quoteIdentifier(node.table)}`} DISABLE ROW LEVEL SECURITY`,\n\t\tparams: []\n\t};\n}\nfunction pgRenderAlterTableSetSchema(node) {\n\treturn {\n\t\tsql: `ALTER TABLE ${pgQualify(node.schema, node.table)} SET SCHEMA ${quoteIdentifier(node.to)}`,\n\t\tparams: []\n\t};\n}\nfunction pgRenderAlterSchemaRename(node) {\n\treturn {\n\t\tsql: `ALTER SCHEMA ${quoteIdentifier(node.schema)} RENAME TO ${quoteIdentifier(node.to)}`,\n\t\tparams: []\n\t};\n}\nfunction pgRenderDropSchema(node) {\n\treturn {\n\t\tsql: `DROP SCHEMA ${quoteIdentifier(node.schema)}`,\n\t\tparams: []\n\t};\n}\nasync function pgRenderDdlExecuteRequest(ast, codecLookup) {\n\treturn ast.accept({\n\t\tcreateTable: (node) => pgRenderCreateTable(node, codecLookup),\n\t\tcreateSchema: (node) => Promise.resolve(pgRenderCreateSchema(node)),\n\t\tcreateType: (node) => Promise.resolve(pgRenderCreateType(node)),\n\t\tdropType: (node) => Promise.resolve(pgRenderDropType(node)),\n\t\talterTable: (node) => pgRenderAlterTable(node, codecLookup),\n\t\tcreatePolicy: (node) => Promise.resolve(pgRenderCreatePolicy(node)),\n\t\tdropPolicy: (node) => Promise.resolve(pgRenderDropPolicy(node)),\n\t\talterPolicyRename: (node) => Promise.resolve(pgRenderAlterPolicyRename(node)),\n\t\tcreateIndex: (node) => Promise.resolve(pgRenderCreateIndex(node)),\n\t\tdropIndex: (node) => Promise.resolve(pgRenderDropIndex(node)),\n\t\talterIndexRename: (node) => Promise.resolve(pgRenderAlterIndexRename(node)),\n\t\tdisableRowLevelSecurity: (node) => Promise.resolve(pgRenderDisableRowLevelSecurity(node)),\n\t\talterTableSetSchema: (node) => Promise.resolve(pgRenderAlterTableSetSchema(node)),\n\t\talterSchemaRename: (node) => Promise.resolve(pgRenderAlterSchemaRename(node)),\n\t\tdropSchema: (node) => Promise.resolve(pgRenderDropSchema(node))\n\t});\n}\n//#endregion\n//#region src/core/contract-contributions.ts\n/**\n* What this adapter adds to every contract it runs: its capabilities and the aggregate overloads it lists. `prisma contract emit` reads them through the adapter's descriptor, and the TypeScript `defineContract` passes them to the contract build.\n*/\nconst postgresAdapterContractContributions = {\n\tcapabilities: postgresAdapterCapabilities,\n\ttypes: { aggregateDescriptors: postgresAggregateDescriptors }\n};\n//#endregion\nexport { PostgresControlAdapter as n, postgresAdapterCapabilities as r, postgresAdapterContractContributions as t };\n\n//# sourceMappingURL=contract-contributions-CbLCF8jV.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA4BA,MAAM,8BAA8B,OAAO,OAAO;CACjD,UAAU;EACT,SAAS;EACT,OAAO;EACP,SAAS;EACT,SAAS;EACT,WAAW;EACX,YAAY;EACZ,gBAAgB;EAChB,aAAa;CACd;CACA,KAAK;EACJ,OAAO;EACP,WAAW;EACX,iBAAiB;EACjB,SAAS;EACT,YAAY;EACZ,iBAAiB;EACjB,sBAAsB;EACtB,+BAA+B;EAC/B,WAAW;EACX,UAAU;EACV,QAAQ;EACR,YAAY;EACZ,gBAAgB;CACjB;AACD,CAAC;AAGD,SAAS,uBA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CAC/D,CAAC;AACF;;;;AAMA,MAAM,uCAAuC;CAC5C,cAAc;CACd,OAAO,EAAE,sBAAsB,6BAA6B;AAC7D"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contract-free-B6-wuc6M.d.mts","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/contract-free.d.mts"],"mappings":";;;;;;;;;;;iBAUiB,WAAW,wBAAwB;UAC1C;EACR,eAAe;EACf,gBAAgB;;;;;;;;;;;iBAWD,eAAe,gBAAgB,gBAAgB;UACtD;EACR,qBAAqB;EACrB,oBAAoB;;;;;;;;;;;;;;;;iBAgBL,oBAAoB;WAC1B;WACA;WACA;IACP;UACM;EACR,iBAAiB;EACjB,gBAAgB;;;;;;;iBAOD,gBAAgB;WACtB;WACA;WACA;IACP;;;;;iBAKa,qBAAqB;WAC3B;WACA;WACA;WACA;IACP;UACM;EACR,kBAAkB;EAClB,iBAAiB;EACjB,aAAa;;;;;;;;iBAQE,iBAAiB;WACvB;WACA;WACA;IACP;;;;iBAIa,yBAAyB;WAC/B;WACA;WACA;IACP;;;;iBAIa,yBAAyB;WAC/B;WACA;WACA;WACA;IACP;;;;;;iBAMa,cAAc;WACpB;WACA;WACA;WACA;IACP;UACM;EACR,aAAa;EACb,YAAY;;;;;;;iBAOG,mBAAmB;WACzB;WACA;WACA;IACP;;;;;;iBAMa,gBAAgB,gBAAgB,gBAAgB;;;;;iBAKhD,gBAAgB;WACtB;WACA;WACA;IACP;UACM;EACR,oBAAoB;EACpB,mBAAmB;;;;;;iBAMJ,mBAAmB,wBAAwB;UAClD;EACR,iBAAiB;EACjB,gBAAgB;;;;;;;;iBAQD,mBAAmB;WACzB;WACA;WACA;IACP;UACM;EACR,cAAc;EACd,eAAe;;;;;;;iBAOA,cAAc,gBAAgB,gBAAgB;UACrD;EACR,gBAAgB;EAChB,eAAe;;;;;;iBAMA,eAAe,gBAAgB,oBAAoB;;;KAG/D;WACM;;cAEG,OAAO,OAAO,YAAY;cAC1B,OAAO,OAAO,YAAY;cAC1B,OAAO,OAAO,YAAY;cAC1B,QAAQ,OAAO,YAAY;cAC3B,YAAY,OAAO,YAAY;cAC/B,cAAc,OAAO,YAAY;cACjC,oBAAoB,OAAO,YAAY;;;;;;;;;;;;;iBAapC,QAAQ,eAAe,cAAc;WAC3C;WACA;WACA;GACR,SAAS,SAAS,YAAY;;;iBAGhB,4CAA4C;iBAC5C,8CAA8C;;;;;;;;;;;;;;;;;iBAiB9C,YAAY;WAClB;WACA;WACA;WACA,kBAAkB;WAClB,uBAAuB;IAC9B;;;;;iBAKa,aAAa;WACnB;WACA;IACP;;;;;;iBAMa,gBAAgB,QAAQ,YAAY;;;;;iBAKpC,kBAAkB,qBAAqB;;;;iBAIvC,oBAAoB,YAAY,qBAAqB;;;;iBAIrD,sBAAsB;WAC5B;WACA;WACA;IACP;;;;;iBAKa,WAAW;WACjB;WACA;WACA,kBAAkB;IACzB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contract-free-DtJ1gJxN.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/contract-free.mjs"],"sourcesContent":["import { D as PG_TIMESTAMPTZ_STRING_CODEC_ID, E as PG_TIMESTAMPTZ_DATE_CODEC_ID, T as PG_TEXT_CODEC_ID, m as PG_INT8_CODEC_ID, p as PG_INT4_CODEC_ID, y as PG_JSONB_CODEC_ID } from \"./codec-ids-2htdtS66.mjs\";\nimport { u as PostgresTableSource } from \"./postgres-schema-osNZNX0D.mjs\";\nimport { C as columnNullabilityAst, G as tablePrimaryKeyAst, I as rlsEnabledAst, K as toRegclass, O as constraintExistsAst, P as noNullValuesAst, R as rlsPolicyExistsAst, S as columnExistsAst, T as columnTypeAst, U as tableExistsAst, V as sequenceNameAvailableAst, W as tableIsEmptyAst, b as columnDefaultAst, d as createSchema, f as createTable, h as dropDefaultAction, j as indexExistsAst, k as extensionExistsAst, n as addConstraintAction, r as alterColumnTypeAction, s as alterTable, t as addColumnAction, x as columnDefaultSequenceAst } from \"./ddl-URS0VlHr.mjs\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { col, fn, lit, table } from \"@internal/sql-relational-core/contract-free\";\n//#region src/contract-free/columns.ts\nconst desc = (codecId, opts) => ({\n\tcodecId,\n\tnullable: opts?.nullable ?? false\n});\nconst text = (opts) => desc(PG_TEXT_CODEC_ID, opts);\nconst int4 = (opts) => desc(PG_INT4_CODEC_ID, opts);\nconst int8 = (opts) => desc(PG_INT8_CODEC_ID, opts);\nconst jsonb = (opts) => desc(PG_JSONB_CODEC_ID, opts);\nconst textArray = (opts) => ({\n\t...desc(PG_TEXT_CODEC_ID, opts),\n\tmany: true\n});\nconst timestamptz = (opts) => desc(PG_TIMESTAMPTZ_STRING_CODEC_ID, opts);\nconst timestamptzJsDate = (opts) => desc(PG_TIMESTAMPTZ_DATE_CODEC_ID, opts);\n/**\n* Declare a PostgreSQL control-plane table with a typed column schema. Wraps\n* the generic `table()` factory with a `PostgresTableSource` so the renderer\n* qualifies the table name with the optional schema prefix.\n*\n* ```ts\n* const marker = pgTable(\n* { name: 'marker', schema: 'prisma_contract' },\n* { space: text(), core_hash: text(), updated_at: timestamptz() },\n* );\n* ```\n*/\nfunction pgTable(source, columns) {\n\treturn table(new PostgresTableSource(source), columns);\n}\n//#endregion\n//#region src/contract-free/control-bootstrap.ts\nconst markerColumns = [\n\tcol(\"space\", \"text\", {\n\t\tnotNull: true,\n\t\tprimaryKey: true,\n\t\tdefault: lit(APP_SPACE_ID)\n\t}),\n\tcol(\"core_hash\", \"text\", { notNull: true }),\n\tcol(\"profile_hash\", \"text\", { notNull: true }),\n\tcol(\"contract_json\", \"jsonb\"),\n\tcol(\"canonical_version\", \"int\"),\n\tcol(\"updated_at\", \"timestamptz\", {\n\t\tnotNull: true,\n\t\tdefault: fn(\"now()\")\n\t}),\n\tcol(\"app_tag\", \"text\"),\n\tcol(\"meta\", \"jsonb\", {\n\t\tnotNull: true,\n\t\tdefault: lit(\"{}\")\n\t}),\n\tcol(\"invariants\", \"text[]\", {\n\t\tnotNull: true,\n\t\tdefault: lit(\"{}\")\n\t})\n];\nconst ledgerColumns = [\n\tcol(\"id\", \"bigserial\", { primaryKey: true }),\n\tcol(\"created_at\", \"timestamptz\", {\n\t\tnotNull: true,\n\t\tdefault: fn(\"now()\")\n\t}),\n\tcol(\"space\", \"text\", { notNull: true }),\n\tcol(\"migration_name\", \"text\", { notNull: true }),\n\tcol(\"migration_hash\", \"text\", { notNull: true }),\n\tcol(\"origin_core_hash\", \"text\"),\n\tcol(\"origin_profile_hash\", \"text\"),\n\tcol(\"destination_core_hash\", \"text\", { notNull: true }),\n\tcol(\"destination_profile_hash\", \"text\"),\n\tcol(\"operations\", \"jsonb\", { notNull: true })\n];\nconst contractColumns = [\n\tcol(\"core_hash\", \"text\", {\n\t\tnotNull: true,\n\t\tprimaryKey: true\n\t}),\n\tcol(\"created_at\", \"timestamptz\", {\n\t\tnotNull: true,\n\t\tdefault: fn(\"now()\")\n\t}),\n\tcol(\"contract_json\", \"jsonb\", { notNull: true })\n];\nconst markerTable = createTable({\n\tschema: \"prisma_contract\",\n\ttable: \"marker\",\n\tifNotExists: true,\n\tcolumns: markerColumns\n});\nconst ledgerTable = createTable({\n\tschema: \"prisma_contract\",\n\ttable: \"ledger\",\n\tifNotExists: true,\n\tcolumns: ledgerColumns\n});\nconst contractTable = createTable({\n\tschema: \"prisma_contract\",\n\ttable: \"contract\",\n\tifNotExists: true,\n\tcolumns: contractColumns\n});\nconst controlSchema = createSchema({\n\tschema: \"prisma_contract\",\n\tifNotExists: true\n});\nfunction buildSignMarkerBootstrapQueries() {\n\treturn [controlSchema, markerTable];\n}\nfunction buildControlTableBootstrapQueries() {\n\treturn [\n\t\tcontrolSchema,\n\t\tmarkerTable,\n\t\tledgerTable,\n\t\tcontractTable\n\t];\n}\n//#endregion\nexport { PostgresTableSource, addColumnAction, addConstraintAction, alterColumnTypeAction, alterTable, buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, columnDefaultAst, columnDefaultSequenceAst, columnExistsAst, columnNullabilityAst, columnTypeAst, constraintExistsAst, createSchema, createTable, dropDefaultAction, extensionExistsAst, indexExistsAst, int4, int8, jsonb, noNullValuesAst, pgTable, rlsEnabledAst, rlsPolicyExistsAst, sequenceNameAvailableAst, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass };\n\n//# sourceMappingURL=contract-free.mjs.map"],"mappings":";;;;;;AAMA,MAAM,QAAQ,SAAS,UAAU;CAChC;CACA,UAAU,MAAM,YAAY;AAC7B;AACA,MAAM,QAAQ,SAAS,KAAK,kBAAkB,IAAI;AAClD,MAAM,QAAQ,SAAS,KAAK,kBAAkB,IAAI;AAClD,MAAM,QAAQ,SAAS,KAAK,kBAAkB,IAAI;AAClD,MAAM,SAAS,SAAS,KAAK,mBAAmB,IAAI;AACpD,MAAM,aAAa,UAAU;CAC5B,GAAG,KAAK,kBAAkB,IAAI;CAC9B,MAAM;AACP;AACA,MAAM,eAAe,SAAS,KAAK,gCAAgC,IAAI;AACvE,MAAM,qBAAqB,SAAS,KAAK,8BAA8B,IAAI;;;;;;;;;;;;;AAa3E,SAAS,QAAQ,QAAQ,SAAS;CACjC,OAAO,MAAM,IAAI,oBAAoB,MAAM,GAAG,OAAO;AACtD;AAGA,MAAM,gBAAgB;CACrB,IAAI,SAAS,QAAQ;EACpB,SAAS;EACT,YAAY;EACZ,SAAS,IAAI,YAAY;CAC1B,CAAC;CACD,IAAI,aAAa,QAAQ,EAAE,SAAS,KAAK,CAAC;CAC1C,IAAI,gBAAgB,QAAQ,EAAE,SAAS,KAAK,CAAC;CAC7C,IAAI,iBAAiB,OAAO;CAC5B,IAAI,qBAAqB,KAAK;CAC9B,IAAI,cAAc,eAAe;EAChC,SAAS;EACT,SAAS,GAAG,OAAO;CACpB,CAAC;CACD,IAAI,WAAW,MAAM;CACrB,IAAI,QAAQ,SAAS;EACpB,SAAS;E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,0 @@
|
|
|
1
|
-
{"version":3,"file":"control-policy-DZzwyc3L-_Bf4iEaW.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/control-policy-DZzwyc3L.mjs"],"sourcesContent":["import { A as pgText, E as pgNumeric, H as pgVarbit, I as pgTimestamptz, M as pgTime, P as pgTimestamp, R as pgTimetz, U as pgVarchar, _ as pgInt2, h as pgFloat8, m as pgFloat4, v as pgInt4, y as pgInt8 } from \"./data-types-DHpMs3mz.mjs\";\nimport \"./namespace-ids-xtp_ZY86.mjs\";\nimport { r as isPostgresSchema } from \"./postgres-schema-osNZNX0D.mjs\";\nimport { n as PostgresNativeEnumSchemaNode, o as postgresNodeEntityKind, r as PostgresSchemaNodeKind, t as PostgresTableSchemaNode } from \"./postgres-table-schema-node-BBkitBQh.mjs\";\nimport { n as defaultPrimaryKeyName, r as defaultUniqueName, t as defaultForeignKeyName } from \"./default-constraint-names-Cz9Yoeim.mjs\";\nimport { i as hasAutoincrementDefault, n as autoincrementWidthOfDataType } from \"./autoincrement-widths-Cy5o21bQ.mjs\";\nimport { C as DropNativeEnumTypeCall, D as DropTableCall, H as columnNameOfCall, O as EnableRowLevelSecurityCall, R as SetDefaultCall, S as DropIndexCall, W as postgresDefaultToDdlColumnDefault, _ as DisableRowLevelSecurityCall, a as AddNativeEnumValueCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddForeignKeyCall, k as RawSqlCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddPrimaryKeyCall, r as AddColumnWithTemporaryDefaultCall, s as AddRequiredColumnToEmptyTableCall, t as AddCheckConstraintCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall, z as SetNotNullCall } from \"./op-factory-call-DsQATX-o.mjs\";\nimport { a as stackDataTypes } from \"./planner-sql-checks-CvI80tt0.mjs\";\nimport { t as buildTargetDetails } from \"./planner-target-details-CUEF0s90.mjs\";\nimport { t as buildColumnTypeSql } from \"./planner-ddl-builders-C_7XNgLd.mjs\";\nimport { n as resolveIdentityValue } from \"./planner-identity-values-CfyHM25P.mjs\";\nimport { dataTypeParams } from \"@internal/framework-components/codec\";\nimport { isSqlDataType, renderSqlTypeName } from \"@internal/sql-contract/data-type\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { issueOutcome, orderIssuesByDependencies } from \"@internal/framework-components/control\";\nimport { UNBOUND_NAMESPACE_ID, entityAt } from \"@internal/framework-components/ir\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport * as contractFree from \"@internal/sql-relational-core/contract-free\";\nimport { columnTakesTemporaryValue } from \"@internal/family-sql/control\";\nimport { RelationalSchemaNodeKind, SqlSchemaIR, sqlColumnTypesEqual } from \"@internal/sql-schema-ir/types\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/core/schema-ir/node-storage-coordinate.ts\n/**\n* The storage-`entries` coordinate `(entityKind, entityName)` a Postgres diff\n* node addresses — a table by its name, a native enum by its physical type\n* name. `undefined` for a node that is not a whole storage entity (a namespace,\n* a column, a policy). Lets ownership/subject resolution treat every entity kind\n* uniformly, the node self-describing its storage identity.\n*/\nfunction postgresNodeStorageCoordinate(node) {\n\tif (PostgresTableSchemaNode.is(node)) {\n\t\tconst entityKind = postgresNodeEntityKind(node.nodeKind);\n\t\treturn entityKind === void 0 ? void 0 : {\n\t\t\tentityKind,\n\t\t\tentityName: node.name\n\t\t};\n\t}\n\tif (PostgresNativeEnumSchemaNode.is(node)) {\n\t\tconst entityKind = postgresNodeEntityKind(node.nodeKind);\n\t\treturn entityKind === void 0 ? void 0 : {\n\t\t\tentityKind,\n\t\t\tentityName: node.typeName\n\t\t};\n\t}\n}\n//#endregion\n//#region src/core/migrations/column-ddl-rendering.ts\nconst AUTOINCREMENT = \"autoincrement()\";\n/**\n* Reconstructs the `StorageColumn`-shaped fields the DDL builder functions\n* (`buildColumnTypeSql`, `resolveIdentityValue`)\n* expect, from a column node's own stamped codec identity (`codecRef`,\n* Decision 5) — never the contract.\n*/\nfunction columnLike(column) {\n\treturn {\n\t\t...columnTypeLike(`column \"${column.name}\"`, column),\n\t\tnullable: column.nullable,\n\t\t...ifDefined(\"default\", column.authoredDefault ?? column.resolvedDefault)\n\t};\n}\nfunction columnTypeLike(owner, identity) {\n\tif (identity.codecRef === void 0) throw new InternalError(`columnTypeLike: expected ${owner} carries no codec identity — the expected tree must be derived via contractToSchemaIR for planning`);\n\treturn {\n\t\tcodecId: identity.codecRef.codecId,\n\t\tmany: identity.many ?? identity.codecRef.many ? { elementNullable: false } : false,\n\t\t...ifDefined(\"typeParams\", identity.codecRef.typeParams !== void 0 ? blindCast(identity.codecRef.typeParams) : void 0)\n\t};\n}\n/**\n* The type DDL writes for a column node: the name of the type it is stored as, with the parameters as the contract writes them, `[]` for a list, and for an `autoincrement()` column of an integer type the serial pseudo-type when `allowPseudoTypes`.\n*/\nfunction columnTypeSql(column, allowPseudoTypes) {\n\tconst type = column.storedType;\n\tif (type === void 0 || !isSqlDataType(type)) throw new InternalError(`column \"${column.name}\" has no data type; the expected tree must be derived via contractToSchemaIR for planning`);\n\tconst columnDefault = column.authoredDefault ?? column.resolvedDefault;\n\tif (allowPseudoTypes && columnDefault?.kind === \"function\" && columnDefault.expression === AUTOINCREMENT) {\n\t\tconst width = autoincrementWidthOfDataType(type.id);\n\t\tif (width !== void 0) return width.serialType;\n\t}\n\tconst typeSql = renderSqlTypeName(type, dataTypeParams(type, column.codecRef?.typeParams));\n\treturn column.many ?? column.codecRef?.many ? `${typeSql}[]` : typeSql;\n}\n/**\n* Builds the `CREATE TABLE` / `ADD COLUMN` DDL column for an expected column\n* node, writing its type from the type the column is stored as.\n*/\nfunction renderColumnDdl(name, column) {\n\tconst typeSql = columnTypeSql(column, true);\n\tconst ddlDefault = postgresDefaultToDdlColumnDefault(column.authoredDefault ?? column.resolvedDefault);\n\treturn contractFree.col(name, typeSql, {\n\t\t...!column.nullable ? { notNull: true } : {},\n\t\t...ifDefined(\"default\", ddlDefault),\n\t\t...ifDefined(\"codecRef\", column.codecRef)\n\t});\n}\n/**\n* Builds the `ALTER COLUMN … TYPE` operands for an expected column node.\n*/\nfunction renderColumnAlterType(column) {\n\treturn columnTypeSql(column, false);\n}\n/**\n* Resolves the identity value (monoid neutral element) SQL literal used as\n* the temporary default when adding a NOT-NULL column with no contract\n* default (`notNullAddColumnCallStrategy`'s shared-temp-default backfill).\n* `null` when the column's type has no built-in/codec-provided identity\n* value.\n*/\nfunction resolveColumnTemporaryDefault(column, codecHooks, types) {\n\treturn resolveIdentityValue(columnLike(column), codecHooks, types);\n}\n/**\n* The column whose `SET DEFAULT` a column-default diff node asks for, carrying its authored default, or its resolved one when nothing was authored, and its type and codec, from which the adapter writes the clause. An `autoincrement()` default is carried as itself, for `setDefault` to attach a sequence, or to refuse when the column is not a smallint, integer or bigint. `undefined` when the node carries no default, or one DDL does not write.\n*/\nfunction buildSetDefaultColumn(columnName, defaultNode, types) {\n\tconst authored = defaultNode.authored ?? defaultNode.resolved;\n\tif (authored === void 0) return void 0;\n\tconst typeLike = columnTypeLike(\"column default\", defaultNode);\n\tif (authored.kind === \"function\" && authored.expression === AUTOINCREMENT) return contractFree.col(columnName, buildColumnTypeSql(typeLike, types, false), {\n\t\tdefault: contractFree.fn(AUTOINCREMENT),\n\t\t...ifDefined(\"codecRef\", defaultNode.codecRef)\n\t});\n\tconst ddlDefault = postgresDefaultToDdlColumnDefault(authored);\n\tif (ddlDefault === void 0) return void 0;\n\treturn contractFree.col(columnName, buildColumnTypeSql(typeLike, types, false), {\n\t\tdefault: ddlDefault,\n\t\t...ifDefined(\"codecRef\", defaultNode.codecRef)\n\t});\n}\n//#endregion\n//#region src/core/migrations/primary-key-change.ts\nfunction keyChangeOf(issue) {\n\tconst ddlSchemaName = issueSchemaName(issue);\n\tconst tableName = issueTableName(issue);\n\tif (issueNode(issue)?.nodeKind !== RelationalSchemaNodeKind.primaryKey || issueOutcome(issue) === \"not-found\" || ddlSchemaName === void 0 || tableName === void 0) return;\n\treturn {\n\t\tissue,\n\t\tddlSchemaName,\n\t\ttableName,\n\t\toldKey: blindCast(issue.actual)\n\t};\n}\nfunction sameColumnSet(left, right) {\n\treturn left.length === right.length && left.every((column) => right.includes(column));\n}\nfunction foreignKeysOf(tree) {\n\treturn Object.values(tree.namespaces).flatMap((namespace) => Object.values(namespace.tables).flatMap((table) => table.foreignKeys.map((foreignKey) => ({\n\t\tddlSchemaName: namespace.schemaName,\n\t\ttableName: table.name,\n\t\tforeignKey\n\t}))));\n}\nfunction referencesKey(at, change) {\n\treturn (at.foreignKey.resolvedReferencedNamespace ?? at.ddlSchemaName) === change.ddlSchemaName && at.foreignKey.referencedTable === change.tableName && sameColumnSet(at.foreignKey.referencedColumns, change.oldKey.columns);\n}\nfunction isTableIssueOf(issue, at) {\n\treturn issueSchemaName(issue) === at.ddlSchemaName && issueTableName(issue) === at.tableName;\n}\nfunction hasOwnIssue(at, issues) {\n\treturn issues.some((issue) => issueNode(issue)?.nodeKind === RelationalSchemaNodeKind.foreignKey && isTableIssueOf(issue, at) && issue.actual?.id === at.foreignKey.id);\n}\nfunction dropsTable(at, issues) {\n\treturn issues.some((issue) => issueNode(issue)?.nodeKind === PostgresSchemaNodeKind.table && issueOutcome(issue) === \"not-expected\" && isTableIssueOf(issue, at));\n}\nfunction endForeignKey(endTree, at) {\n\treturn Object.values(endTree.namespaces).find((candidate) => candidate.schemaName === at.ddlSchemaName)?.tables[at.tableName]?.foreignKeys.find((foreignKey) => foreignKey.id === at.foreignKey.id);\n}\nfunction foreignKeyName(at) {\n\treturn at.foreignKey.name ?? defaultForeignKeyName(at.tableName, at.foreignKey.columns);\n}\nconst migrationNewAdvice = \"write the change as its own migration with prisma migration new, dropping that foreign key before the key change and adding it back after it.\";\nfunction quotedTable(at) {\n\treturn `\"${at.ddlSchemaName}\".\"${at.tableName}\"`;\n}\nfunction blockedKeyChange(change, at, reason, why) {\n\tconst keyName = change.oldKey.name ?? defaultPrimaryKeyName(change.tableName);\n\tconst name = foreignKeyName(at);\n\treturn {\n\t\tkind: \"foreignKeyConflict\",\n\t\tsummary: `Primary key \"${keyName}\" on \"${change.ddlSchemaName}\".\"${change.tableName}\" cannot change while foreign key \"${name}\" on ${quotedTable(at)} references it, and ${reason}.`,\n\t\twhy,\n\t\tlocation: {\n\t\t\tentityKind: \"table\",\n\t\t\tentityName: at.tableName,\n\t\t\tconstraint: name\n\t\t}\n\t};\n}\nfunction controlPolicyRefusal(change, at, declared) {\n\tconst table = quotedTable(at);\n\tconst dbUpdateAdvice = declared ? \"With db update, drop that foreign key yourself and leave it out of the contract, run db update, then add the foreign key back to both if you still want it and run db update again.\" : \"With db update, drop that foreign key yourself, run db update, then add the foreign key back if you still want it.\";\n\treturn blockedKeyChange(change, at, `the control policy does not let this plan change ${table}`, `With migration plan, give ${table} a control policy that lets this plan change it and plan again, or ${migrationNewAdvice} ${dbUpdateAdvice}`);\n}\nfunction otherSpaceRefusal(change, at) {\n\tconst table = quotedTable(at);\n\treturn blockedKeyChange(change, at, `another contract space owns ${table}`, `Change that foreign key through the contract space that owns ${table}, or ${migrationNewAdvice}`);\n}\nfunction undeclaredTableRefusal(change, at) {\n\tconst table = quotedTable(at);\n\treturn blockedKeyChange(change, at, `the contract does not declare ${table}`, `This plan allows only additive changes, as db init does, so it cannot change a primary key. Run db update instead, which drops ${table} together with its foreign key; add ${table} to the contract first if you want to keep it.`);\n}\nfunction removedForeignKeyRefusal(change, at) {\n\treturn blockedKeyChange(change, at, `the contract leaves that foreign key out of ${quotedTable(at)}`, \"This plan allows only additive changes, as db init does, so it can neither drop that foreign key nor change a primary key. Run db update instead, which drops that foreign key before the key change.\");\n}\nfunction undeclaredSchemaRefusal(change, at) {\n\tconst table = quotedTable(at);\n\treturn blockedKeyChange(change, at, `the contract does not declare schema \"${at.ddlSchemaName}\", whose tables a plan never drops`, `With migration plan, declare ${table} in the contract and plan again, or ${migrationNewAdvice} With db update, drop that foreign key yourself, run db update, then add the foreign key back if you still want it.`);\n}\nfunction allowsOnlyAdditive(ctx) {\n\tconst allowed = ctx.policy.allowedOperationClasses;\n\treturn !allowed.includes(\"widening\") && !allowed.includes(\"destructive\");\n}\nfunction tableInEndTree(endTree, at) {\n\treturn Object.values(endTree.namespaces).some((namespace) => namespace.schemaName === at.ddlSchemaName && namespace.tables[at.tableName] !== void 0);\n}\nfunction keyCalls(change, ctx) {\n\tconst schemaName = emissionSchemaName(ctx, change.ddlSchemaName);\n\tconst drop = new DropConstraintCall(schemaName, change.tableName, change.oldKey.name ?? defaultPrimaryKeyName(change.tableName), \"primaryKey\");\n\tif (issueOutcome(change.issue) === \"not-expected\") return [drop];\n\tconst newKey = blindCast(change.issue.expected);\n\treturn [drop, new AddPrimaryKeyCall(schemaName, change.tableName, newKey.name ?? defaultPrimaryKeyName(change.tableName), [...newKey.columns])];\n}\n/**\n* Plans a primary key whose columns change, or that is removed: a drop of the old key, then an add of the new one. Postgres refuses to drop a key while a foreign key depends on its index, so every foreign key of the start tree that references the old key's columns is dropped first, unless its own issue already drops it, and added back from the end tree. The plan refuses the change instead when such a foreign key is on a table the control policy keeps it away from or another contract space owns, or when the end tree leaves the foreign key out and the plan does not drop it or its table: under a policy that allows additive changes alone, as `db init` does, or because the table is in a schema the end contract does not declare.\n*/\nfunction primaryKeyChangeStrategy(issues, ctx) {\n\tconst changes = issues.flatMap((issue) => keyChangeOf(issue) ?? []);\n\tif (changes.length === 0) return { kind: \"no_match\" };\n\tconst startForeignKeys = foreignKeysOf(ctx.startTree);\n\tconst calls = [];\n\tconst conflicts = [];\n\tfor (const change of changes) {\n\t\tconst changeCalls = [];\n\t\tconst changeConflicts = [];\n\t\tfor (const at of startForeignKeys) {\n\t\t\tif (!referencesKey(at, change) || hasOwnIssue(at, ctx.allIssues)) continue;\n\t\t\tconst drop = new DropConstraintCall(emissionSchemaName(ctx, at.ddlSchemaName), at.tableName, foreignKeyName(at), \"foreignKey\");\n\t\t\tconst kept = endForeignKey(ctx.endTree, at);\n\t\t\tconst authority = ctx.foreignKeyDropAuthority(at.ddlSchemaName, at.tableName, at.foreignKey);\n\t\t\tif (authority !== \"allowed\") {\n\t\t\t\tchangeConflicts.push(authority === \"otherSpace\" ? otherSpaceRefusal(change, at) : controlPolicyRefusal(change, at, kept !== void 0));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (kept !== void 0) changeCalls.push(drop, new AddForeignKeyCall(drop.schemaName, at.tableName, fkSpecFromNode(kept, at.tableName)));\n\t\t\telse if (dropsTable(at, ctx.allIssues)) changeCalls.push(drop);\n\t\t\telse changeConflicts.push(tableInEndTree(ctx.endTree, at) ? removedForeignKeyRefusal(change, at) : allowsOnlyAdditive(ctx) ? undeclaredTableRefusal(change, at) : undeclaredSchemaRefusal(change, at));\n\t\t}\n\t\tif (changeConflicts.length > 0) conflicts.push(...changeConflicts);\n\t\telse calls.push(...changeCalls, ...keyCalls(change, ctx));\n\t}\n\tconst consumed = new Set(changes.map((change) => change.issue));\n\treturn {\n\t\tkind: \"match\",\n\t\tissues: issues.filter((issue) => !consumed.has(issue)),\n\t\tcalls,\n\t\tconflicts\n\t};\n}\n//#endregion\n//#region src/core/migrations/safe-widenings.ts\n/** The changes between data types that keep every value: each pair is `from→to` by data type id. */\nconst SAFE_WIDENINGS = /* @__PURE__ */ new Set([\n\t`${pgInt2.id}→${pgInt4.id}`,\n\t`${pgInt2.id}→${pgInt8.id}`,\n\t`${pgInt4.id}→${pgInt8.id}`,\n\t`${pgInt2.id}→${pgFloat4.id}`,\n\t`${pgInt2.id}→${pgFloat8.id}`,\n\t`${pgInt4.id}→${pgFloat8.id}`,\n\t`${pgFloat4.id}→${pgFloat8.id}`,\n\t`${pgVarchar.id}→${pgText.id}`,\n\t`${pgInt2.id}→${pgText.id}`,\n\t`${pgInt4.id}→${pgText.id}`,\n\t`${pgInt8.id}→${pgText.id}`,\n\t`${pgNumeric.id}→${pgText.id}`,\n\t`${pgFloat4.id}→${pgText.id}`,\n\t`${pgFloat8.id}→${pgText.id}`\n]);\n/** Types whose `length` caps their values; a larger cap, or none, keeps every value. */\nconst LENGTH_CAPPED = /* @__PURE__ */ new Set([pgVarchar.id, pgVarbit.id]);\n/** Types whose `precision` rounds their fractional seconds; more, or none, keeps every value. */\nconst PRECISION_ROUNDED = /* @__PURE__ */ new Set([\n\tpgTime.id,\n\tpgTimetz.id,\n\tpgTimestamp.id,\n\tpgTimestamptz.id\n]);\nfunction numberParam(params, key) {\n\tconst value = params[key];\n\treturn typeof value === \"number\" ? value : void 0;\n}\n/** Whether a cap, where `undefined` means none, is at least as large as before. */\nfunction capGrows(from, to) {\n\treturn to === void 0 || from !== void 0 && to >= from;\n}\n/**\n* A `numeric` keeps every value when it allows at least as many digits before the point and after\n* it; an unconstrained `numeric` holds any value.\n*/\nfunction numericGrows(from, to) {\n\tconst toPrecision = numberParam(to, \"precision\");\n\tif (toPrecision === void 0) return true;\n\tconst fromPrecision = numberParam(from, \"precision\");\n\tif (fromPrecision === void 0) return false;\n\tconst fromScale = numberParam(from, \"scale\") ?? 0;\n\tconst toScale = numberParam(to, \"scale\") ?? 0;\n\treturn toScale >= fromScale && toPrecision - toScale >= fromPrecision - fromScale;\n}\n/** Whether changing a column from one type to another keeps every value: both have a stored type, and the pair is a safe widening by stored type id and parameters in normal form. */\nfunction isSafeTypeWidening(from, to) {\n\tif (from.storedType === void 0 || to.storedType === void 0) return false;\n\tconst fromId = from.storedType.id;\n\tconst toId = to.storedType.id;\n\tconst fromParams = from.storedTypeParams ?? {};\n\tconst toParams = to.storedTypeParams ?? {};\n\tif (SAFE_WIDENINGS.has(`${fromId}→${toId}`)) return true;\n\tif (fromId !== toId) return false;\n\tif (LENGTH_CAPPED.has(fromId)) return capGrows(numberParam(fromParams, \"length\"), numberParam(toParams, \"length\"));\n\tif (PRECISION_ROUNDED.has(fromId)) return capGrows(numberParam(fromParams, \"precision\"), numberParam(toParams, \"precision\"));\n\tif (fromId === pgNumeric.id) return numericGrows(fromParams, toParams);\n\treturn false;\n}\n/** Whether changing a live column to the contract's column keeps every value. A list column never widens safely. */\nfunction liveColumnWidensSafely(expected, actual) {\n\tif (expected.many === true || actual.many === true) return false;\n\treturn isSafeTypeWidening(actual, expected);\n}\n//#endregion\n//#region src/core/migrations/planner-strategies.ts\n/**\n* Look up a storage table by its explicit namespace coordinate. Returns\n* `undefined` when the namespace has no table by that name (or no such\n* namespace exists). Callers that get `undefined` MUST treat it as an\n* explicit conflict — never silently fall back to a global default\n* schema or a name-only walk, because that footgun would resolve a\n* stale or duplicate table name to whichever namespace the iteration\n* order surfaced first (a real data-loss hazard in multi-namespace\n* contracts where two namespaces can carry the same table name).\n*/\nfunction tableAt(storage, namespaceId, tableName) {\n\tconst ns = storage.namespaces[namespaceId];\n\tif (ns === void 0) return void 0;\n\treturn ns.entries.table?.[tableName];\n}\n/**\n* Recovers the contract namespace id for a DDL schema name embedded in a\n* diff-issue path (`path[1]`). The strategies need the CONTRACT column/table\n* (for codec-hook reads and eligibility probes the retained subsystems still\n* run) even though the issue itself only carries the resolved DDL schema —\n* this is the reverse of `resolveDdlSchemaForNamespace`.\n*/\nfunction namespaceIdForDdlSchema(ctx, ddlSchemaName) {\n\treturn resolveNamespaceIdForDdlSchema(ctx.toContract, ddlSchemaName);\n}\n/** A `not-equal` column issue whose node pair is narrowed to `SqlColumnIR`. */\nfunction columnNodePair(issue) {\n\tconst node = issueNode(issue);\n\tif (node === void 0 || node.nodeKind !== RelationalSchemaNodeKind.column) return void 0;\n\tif (issue.expected === void 0 || issue.actual === void 0) return void 0;\n\treturn {\n\t\texpected: blindCast(issue.expected),\n\t\tactual: blindCast(issue.actual)\n\t};\n}\n/** The `--backfill` statement's column an issue is about, if a statement names it. */\nfunction backfilled(ctx, ddlSchemaName, tableName, columnName) {\n\tconst namespaceId = namespaceIdForDdlSchema(ctx, ddlSchemaName);\n\treturn ctx.statementColumns.backfill.find((column) => column.namespaceId === namespaceId && column.table === tableName && column.column === columnName);\n}\n/**\n* Handles a required column with no default added to an existing table, for a field a\n* `--backfill` statement names: a nullable add, a data transform whose slots the user fills, then\n* `SET NOT NULL`. Every other such column is left to `notNullAddColumnCallStrategy`.\n*/\nconst notNullBackfillCallStrategy = (issues, ctx) => {\n\tif (!ctx.policy.allowedOperationClasses.includes(\"data\")) return { kind: \"no_match\" };\n\tconst matched = [];\n\tconst calls = [];\n\tfor (const issue of issues) {\n\t\tif (issueOutcome(issue) !== \"not-found\") continue;\n\t\tconst node = issueNode(issue);\n\t\tif (node === void 0 || node.nodeKind !== RelationalSchemaNodeKind.column) continue;\n\t\tconst expected = blindCast(issue.expected);\n\t\tif (expected.nullable !== false || expected.resolvedDefault !== void 0) continue;\n\t\tconst ddlSchemaName = issueSchemaName(issue);\n\t\tconst tableName = issueTableName(issue);\n\t\tif (ddlSchemaName === void 0 || tableName === void 0) continue;\n\t\tconst named = backfilled(ctx, ddlSchemaName, tableName, expected.name);\n\t\tif (named === void 0) continue;\n\t\tconst schemaName = emissionSchemaName(ctx, ddlSchemaName);\n\t\tconst slot = named.text;\n\t\tmatched.push(issue);\n\t\tconst ddl = renderColumnDdl(expected.name, expected);\n\t\tconst nullableSpec = contractFree.col(ddl.name, ddl.type, { ...ddl.codecRef !== void 0 ? { codecRef: ddl.codecRef } : {} });\n\t\tcalls.push(new AddColumnCall(schemaName, tableName, nullableSpec, ctx.dataTypes), new DataTransformCall(`backfill-${tableName}-${expected.name}`, `${slot}:check`, `${slot}:run`, \"data\", {\n\t\t\tschema: schemaName,\n\t\t\ttable: tableName,\n\t\t\tcolumn: expected.name\n\t\t}), new SetNotNullCall(schemaName, tableName, expected.name));\n\t}\n\tif (matched.length === 0) return { kind: \"no_match\" };\n\treturn {\n\t\tkind: \"match\",\n\t\tissues: issues.filter((i) => !matched.includes(i)),\n\t\tcalls,\n\t\trecipe: true\n\t};\n};\n/**\n* Handles a `not-equal` column issue whose type differs, for a field a `--convert` statement names,\n* in a plan that may include `data` operations: `migration plan`. The alter is classed `data` and\n* its USING clause is a slot the user fills with the conversion. A known-safe widening needs no\n* conversion and is left to `mapNodeIssueToCall`, as is every type change no statement names: a\n* direct alter, `widening` or `destructive`, which the plan asks about.\n*\n* One node issue can carry both type and nullability drift, so the strategy also emits the\n* nullability change: `SET NOT NULL` after the alter, whose conversion can map NULL to a value.\n*/\n/** A field as a statement names it: with its namespace only when the contract has several. */\nconst typeChangeCallStrategy = (issues, ctx) => {\n\tif (ctx.fromContract === null || !ctx.policy.allowedOperationClasses.includes(\"data\")) return { kind: \"no_match\" };\n\tconst matched = [];\n\tconst calls = [];\n\tfor (const issue of issues) {\n\t\tif (issueOutcome(issue) !== \"not-equal\") continue;\n\t\tconst pair = columnNodePair(issue);\n\t\tif (pair === void 0) continue;\n\t\tconst { expected, actual } = pair;\n\t\tif (sqlColumnTypesEqual(expected, actual)) continue;\n\t\tconst ddlSchemaName = issueSchemaName(issue);\n\t\tconst tableName = issueTableName(issue);\n\t\tif (ddlSchemaName === void 0 || tableName === void 0) continue;\n\t\tconst namespaceId = namespaceIdForDdlSchema(ctx, ddlSchemaName);\n\t\tconst converted = ctx.statementColumns.convert.find((column) => column.namespaceId === namespaceId && column.table === tableName && column.column === expected.name);\n\t\tif (converted === void 0) continue;\n\t\tif (isSafeTypeWidening(actual, expected)) continue;\n\t\tconst schemaName = emissionSchemaName(ctx, ddlSchemaName);\n\t\tmatched.push(issue);\n\t\tcalls.push(new AlterColumnTypeCall({\n\t\t\tschemaName,\n\t\t\ttableName,\n\t\t\tcolumnName: expected.name,\n\t\t\ttype: renderColumnAlterType(expected),\n\t\t\tusing: {\n\t\t\t\tkind: \"placeholder\",\n\t\t\t\tslot: `${converted.text}:convert`\n\t\t\t},\n\t\t\t...expected.catalogText !== void 0 ? { raw: true } : {},\n\t\t\tdataTypes: ctx.dataTypes,\n\t\t\townsAutoincrementSequence: hasAutoincrementDefault(actual)\n\t\t}));\n\t\tif (expected.nullable !== actual.nullable) calls.push(expected.nullable ? new DropNotNullCall(schemaName, tableName, expected.name) : new SetNotNullCall(schemaName, tableName, expected.name));\n\t}\n\tif (matched.length === 0) return { kind: \"no_match\" };\n\treturn {\n\t\tkind: \"match\",\n\t\tissues: issues.filter((i) => !matched.includes(i)),\n\t\tcalls,\n\t\trecipe: true\n\t};\n};\n/**\n* Handles a `not-equal` column issue whose type did not change but which becomes required, for a\n* field a `--backfill` statement names: a data transform whose slots the user fills with values for\n* the NULLs, then `SET NOT NULL`. Every other such column gets the direct `SET NOT NULL` of\n* `mapNodeIssueToCall`. A type-changed issue's nullability is handled by `typeChangeCallStrategy`\n* or the direct alter.\n*/\nconst nullableTighteningCallStrategy = (issues, ctx) => {\n\tif (!ctx.policy.allowedOperationClasses.includes(\"data\")) return { kind: \"no_match\" };\n\tconst matched = [];\n\tconst calls = [];\n\tfor (const issue of issues) {\n\t\tif (issueOutcome(issue) !== \"not-equal\") continue;\n\t\tconst pair = columnNodePair(issue);\n\t\tif (pair === void 0) continue;\n\t\tconst { expected, actual } = pair;\n\t\tif (!sqlColumnTypesEqual(expected, actual)) continue;\n\t\tif (expected.nullable !== false || actual.nullable !== true) continue;\n\t\tconst ddlSchemaName = issueSchemaName(issue);\n\t\tconst tableName = issueTableName(issue);\n\t\tif (ddlSchemaName === void 0 || tableName === void 0) continue;\n\t\tconst named = backfilled(ctx, ddlSchemaName, tableName, expected.name);\n\t\tif (named === void 0) continue;\n\t\tconst schemaName = emissionSchemaName(ctx, ddlSchemaName);\n\t\tconst slot = named.text;\n\t\tmatched.push(issue);\n\t\tcalls.push(new DataTransformCall(`handle-nulls-${tableName}-${expected.name}`, `${slot}:check`, `${slot}:run`, \"data\", {\n\t\t\tschema: schemaName,\n\t\t\ttable: tableName,\n\t\t\tcolumn: expected.name\n\t\t}), new SetNotNullCall(schemaName, tableName, expected.name));\n\t}\n\tif (matched.length === 0) return { kind: \"no_match\" };\n\treturn {\n\t\tkind: \"match\",\n\t\tissues: issues.filter((i) => !matched.includes(i)),\n\t\tcalls,\n\t\trecipe: true\n\t};\n};\n/**\n* Dispatches codec-typed storage types through their codec's\n* `planTypeOperations` hook (the authoritative source for codec-driven DDL\n* such as custom type creation). Codec extension/type ops are not modeled as\n* diff nodes — this strategy drives entirely off `ctx.toContract.storage.types`\n* + codec hooks, consuming nothing from the node issue list (there is no\n* node-vocabulary equivalent of `type_missing` / `enum_values_changed`).\n*/\nconst storageTypePlanCallStrategy = (issues, ctx) => {\n\tconst storageTypes = ctx.toContract.storage.types ?? {};\n\tif (Object.keys(storageTypes).length === 0) return { kind: \"no_match\" };\n\tconst calls = [];\n\tfor (const [typeName, typeInstance] of Object.entries(storageTypes).sort(([a], [b]) => a.localeCompare(b))) {\n\t\tconst codecInstance = blindCast(typeInstance);\n\t\tconst hook = ctx.codecHooks.get(codecInstance.codecId);\n\t\tif (!hook?.planTypeOperations) continue;\n\t\tconst planResult = hook.planTypeOperations({\n\t\t\ttypeName,\n\t\t\ttypeInstance: codecInstance,\n\t\t\tcontract: ctx.toContract,\n\t\t\tschema: ctx.schema,\n\t\t\tschemaName: ctx.schemaName,\n\t\t\tpolicy: ctx.policy\n\t\t});\n\t\tif (!planResult) continue;\n\t\tfor (const op of planResult.operations) calls.push(new RawSqlCall(blindCast({\n\t\t\t...op,\n\t\t\ttarget: {\n\t\t\t\tid: op.target.id,\n\t\t\t\tdetails: buildTargetDetails(\"type\", typeName, ctx.schemaName)\n\t\t\t}\n\t\t})));\n\t}\n\tif (calls.length === 0) return { kind: \"no_match\" };\n\treturn {\n\t\tkind: \"match\",\n\t\tissues,\n\t\tcalls\n\t};\n};\n/**\n* Handles `not-found` column issues for NOT NULL columns without a contract\n* default. Replaces the legacy `buildAddColumnItem` non-default branches.\n*\n* Two shapes:\n* - Shared-temp-default safe: emit a single atomic composite op (add\n* nullable → backfill identity value → `SET NOT NULL` → `DROP DEFAULT`).\n* The temp-default value is resolved from the column node's `codecRef`\n* (`resolveColumnTemporaryDefault`, wrapping `resolveIdentityValue`).\n* - Empty-table guarded, for a column in a key, or whose values come from a value set, which\n* no one value stands in for: emit a hand-built op with a `tableIsEmptyCheck`\n* precheck so the failure message is \"table is not empty\" rather than the\n* raw PG NOT NULL violation.\n*\n* \"Normal\" not-found column cases (nullable or has a contract default) are\n* left for `mapNodeIssueToCall`'s default `AddColumnCall` emission.\n*/\nconst notNullAddColumnCallStrategy = (issues, ctx) => {\n\tconst matched = [];\n\tconst calls = [];\n\tfor (const issue of issues) {\n\t\tif (issueOutcome(issue) !== \"not-found\") continue;\n\t\tconst node = issueNode(issue);\n\t\tif (node === void 0 || node.nodeKind !== RelationalSchemaNodeKind.column) continue;\n\t\tconst expected = blindCast(issue.expected);\n\t\tif (expected.nullable !== false || expected.resolvedDefault !== void 0) continue;\n\t\tconst ddlSchemaName = issueSchemaName(issue);\n\t\tconst tableName = issueTableName(issue);\n\t\tif (ddlSchemaName === void 0 || tableName === void 0) continue;\n\t\tconst namespaceId = namespaceIdForDdlSchema(ctx, ddlSchemaName);\n\t\tconst schemaName = namespaceId === UNBOUND_NAMESPACE_ID ? UNBOUND_NAMESPACE_ID : ddlSchemaName;\n\t\tconst contractTable = tableAt(ctx.toContract.storage, namespaceId, tableName);\n\t\tconst column = contractTable?.columns[expected.name];\n\t\tif (!contractTable || !column) continue;\n\t\tif (ctx.schema.tables[tableName] === void 0) continue;\n\t\tconst temporaryDefault = resolveColumnTemporaryDefault(expected, ctx.codecHooks, ctx.types);\n\t\tconst canUseSharedTempDefault = temporaryDefault !== null && columnTakesTemporaryValue(contractTable, expected.name);\n\t\tmatched.push(issue);\n\t\tconst ddl = renderColumnDdl(expected.name, expected);\n\t\tcalls.push(canUseSharedTempDefault && temporaryDefault !== null ? new AddColumnWithTemporaryDefaultCall(schemaName, tableName, ddl.name, ddl.type, temporaryDefault, ctx.dataTypes) : new AddRequiredColumnToEmptyTableCall(schemaName, tableName, ddl.name, ddl.type, ctx.dataTypes));\n\t}\n\tif (matched.length === 0) return { kind: \"no_match\" };\n\treturn {\n\t\tkind: \"match\",\n\t\tissues: issues.filter((i) => !matched.includes(i)),\n\t\tcalls\n\t};\n};\n/**\n* Ordered list of Postgres planner strategies, shared by `migration plan`\n* and `db update` / `db init`. The issue planner runs each strategy in\n* order, letting it consume any issues it handles, and routes whatever's\n* left through `mapNodeIssueToCall`.\n*\n* The strategies that write a placeholder (`notNullBackfillCallStrategy`,\n* `typeChangeCallStrategy`, `nullableTighteningCallStrategy`) act only on a\n* field a `--backfill` or `--convert` statement names, and only when the\n* policy allows `data` (`migration plan`). Every other required field added to\n* an existing table gets the temporary default of\n* `notNullAddColumnCallStrategy`, and every other change the direct DDL of\n* `mapNodeIssueToCall`, under either command.\n*\n* Codec-typed storage type entries are dispatched through\n* `storageTypePlanCallStrategy`.\n*/\nconst postgresPlannerStrategies = [\n\tnotNullBackfillCallStrategy,\n\ttypeChangeCallStrategy,\n\tnullableTighteningCallStrategy,\n\tstorageTypePlanCallStrategy,\n\tnotNullAddColumnCallStrategy,\n\tprimaryKeyChangeStrategy\n];\n//#endregion\n//#region src/core/migrations/issue-planner.ts\nfunction issueConflict(kind, summary, location) {\n\treturn {\n\t\tkind,\n\t\tsummary,\n\t\twhy: \"Use `migration new` to author a custom migration for this change.\",\n\t\t...location ? { location } : {}\n\t};\n}\n/**\n* Classifies calls into DDL sequencing buckets. The order matches the\n* legacy walk-schema planner's emission order so `db init` and `db update`\n* produce byte-identical plans for the shared shape (deps → drops → tables\n* → columns → alters → PKs → uniques → indexes → FKs).\n*\n* `dropType` (DROP TYPE for a managed native enum) is its own bucket, ordered\n* after the general drop bucket: a type can only be dropped once every table\n* whose column uses it is gone. A column→enum edge would make this precise,\n* but `coalesceSubtreeIssues` removes the column issue under a whole-table\n* drop, so the edge never reaches the graph; the coarse bucket stands in until\n* that edge lands (the coordinate work is a later slice).\n*/\nfunction classifyCall(call) {\n\tswitch (call.factoryName) {\n\t\tcase \"createExtension\":\n\t\tcase \"createSchema\":\n\t\tcase \"createNativeEnumType\":\n\t\tcase \"addNativeEnumValue\": return \"dep\";\n\t\tcase \"dropNativeEnumType\": return \"dropType\";\n\t\tcase \"dropTable\":\n\t\tcase \"dropColumn\":\n\t\tcase \"dropConstraint\":\n\t\tcase \"dropCheckConstraint\":\n\t\tcase \"dropIndex\":\n\t\tcase \"dropDefault\": return \"drop\";\n\t\tcase \"addCheckConstraint\":\n\t\tcase \"renameConstraint\": return \"unique\";\n\t\tcase \"createTable\":\n\t\tcase \"renameTable\":\n\t\tcase \"setTableSchema\":\n\t\tcase \"renameSchema\": return \"table\";\n\t\tcase \"dropSchema\": return \"dropSchema\";\n\t\tcase \"enableRowLevelSecurity\":\n\t\tcase \"disableRowLevelSecurity\": return \"rlsEnable\";\n\t\tcase \"createRlsPolicy\": return \"rlsPolicy\";\n\t\tcase \"dropRlsPolicy\": return \"drop\";\n\t\tcase \"addColumn\":\n\t\tcase \"renameColumn\": return \"column\";\n\t\tcase \"replaceStoredValue\":\n\t\tcase \"removeStoredValue\":\n\t\tcase \"alterColumnType\":\n\t\tcase \"setNotNull\":\n\t\tcase \"dropNotNull\":\n\t\tcase \"setDefault\": return \"alter\";\n\t\tcase \"addPrimaryKey\": return \"primaryKey\";\n\t\tcase \"addUnique\": return \"unique\";\n\t\tcase \"createIndex\":\n\t\tcase \"renameIndex\": return \"index\";\n\t\tcase \"addForeignKey\": return \"foreignKey\";\n\t\tcase \"rawSql\":\n\t\t\tif (blindCast(call).op?.target?.details?.objectType === \"type\") return \"dep\";\n\t\t\treturn \"alter\";\n\t\tdefault: return \"alter\";\n\t}\n}\nconst DEFAULT_POLICY = { allowedOperationClasses: [\n\t\"additive\",\n\t\"widening\",\n\t\"destructive\",\n\t\"data\"\n] };\nfunction emptySchemaIR() {\n\treturn new SqlSchemaIR({ tables: {} });\n}\n/**\n* Foreign key drops run first, then primary key and unique constraint drops, then the rest. A constraint never needs another object dropped before it, and a column or table drop takes its constraints with it, so this order is always valid.\n*/\nfunction dropRank(call) {\n\tif (call.factoryName !== \"dropConstraint\") return 2;\n\treturn call.kind === \"foreignKey\" ? 0 : 1;\n}\nfunction conflictKindForCall(call) {\n\tswitch (call.factoryName) {\n\t\tcase \"alterColumnType\": return \"typeMismatch\";\n\t\tcase \"setNotNull\":\n\t\tcase \"dropNotNull\": return \"nullabilityConflict\";\n\t\tcase \"addForeignKey\":\n\t\tcase \"dropConstraint\": return \"foreignKeyConflict\";\n\t\tcase \"createIndex\":\n\t\tcase \"renameIndex\":\n\t\tcase \"dropIndex\": return \"indexIncompatible\";\n\t\tcase \"createRlsPolicy\":\n\t\tcase \"dropRlsPolicy\":\n\t\tcase \"renameRlsPolicy\": return \"rlsPolicyIncompatible\";\n\t\tdefault: return \"missingButNonAdditive\";\n\t}\n}\nfunction locationForCall(call) {\n\tconst anyCall = blindCast(call);\n\tconst location = {};\n\tif (anyCall.tableName) {\n\t\tlocation.entityKind = \"table\";\n\t\tlocation.entityName = anyCall.tableName;\n\t} else if (anyCall.typeName) {\n\t\tlocation.entityKind = \"native_enum\";\n\t\tlocation.entityName = anyCall.typeName;\n\t}\n\tconst columnName = columnNameOfCall(call);\n\tif (columnName) location.column = columnName;\n\tif (anyCall.indexName) location.index = anyCall.indexName;\n\telse if (anyCall.newIndexName) location.index = anyCall.newIndexName;\n\tif (anyCall.constraintName) location.constraint = anyCall.constraintName;\n\telse if (anyCall.newConstraintName) location.constraint = anyCall.newConstraintName;\n\tif (anyCall.policyName) location.rlsPolicy = anyCall.policyName;\n\telse if (anyCall.policy?.name) location.rlsPolicy = anyCall.policy.name;\n\telse if (anyCall.newPolicyName) location.rlsPolicy = anyCall.newPolicyName;\n\treturn Object.keys(location).length > 0 ? blindCast(location) : void 0;\n}\nfunction conflictForDisallowedCall(call, allowed) {\n\tconst summary = `Operation \"${call.label}\" requires class \"${call.operationClass}\", but policy allows only: ${allowed.join(\", \")}`;\n\tconst location = locationForCall(call);\n\treturn {\n\t\tkind: conflictKindForCall(call),\n\t\tsummary,\n\t\twhy: \"Use `migration new` to author a custom migration for this change.\",\n\t\trefusedOperationClass: call.operationClass,\n\t\t...location ? { location } : {}\n\t};\n}\n/** The diff node an issue concerns — expected when present, else the actual (extra) node. */\nfunction issueNode(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\treturn blindCast(node);\n}\n/** DDL schema segment of a table-or-descendant issue path: `[database, ddlSchema, table, …]`. */\nfunction issueSchemaName(issue) {\n\treturn issue.path[1];\n}\n/** Table segment of a table-or-descendant issue path: `[database, ddlSchema, table, …]`. */\nfunction issueTableName(issue) {\n\treturn issue.path[2];\n}\n/** Column name embedded in a column/default issue path segment (`column:<name>`). */\nfunction issueColumnName(issue) {\n\tconst segment = issue.path[3];\n\tif (segment === void 0 || !segment.startsWith(\"column:\")) return void 0;\n\treturn segment.slice(7);\n}\n/**\n* The DDL schema name to use when EMITTING an op against `ddlSchemaName` (the\n* diff tree's resolved physical schema, `issueSchemaName(issue)`). The\n* unbound namespace's diff-tree identity resolves to `public` (a concrete\n* physical default the differ needs in order to compare its tree against\n* introspection — `resolveDdlSchemaForNamespaceStorage`), but DDL EMISSION\n* must stay unqualified so the live connection's `search_path` resolves it\n* at runtime (`boundSchema`). Recovers the logical namespace id via the\n* contract and substitutes the unbound sentinel back in when it resolves\n* there; every other namespace's `ddlSchemaName` already agrees between the\n* two resolution paths, so it passes through unchanged. A schema the contract\n* does not declare, such as one the origin contract had, stays qualified.\n*/\nfunction emissionSchemaName(ctx, ddlSchemaName) {\n\treturn resolveNamespaceIdForDdlSchema(ctx.toContract, ddlSchemaName) === UNBOUND_NAMESPACE_ID && ddlSchemaName === \"public\" && Object.hasOwn(ctx.toContract.storage.namespaces, UNBOUND_NAMESPACE_ID) ? UNBOUND_NAMESPACE_ID : ddlSchemaName;\n}\n/**\n* The generic differ is total: a missing/extra table (or column) emits an\n* issue for itself AND for every node in its subtree. `CreateTable`/`DropTable`\n* and `AddColumn`/`DropColumn` already account for the whole subtree, so the\n* nested issues are redundant — coalescing drops any issue whose path is a\n* strict descendant of a `not-found`/`not-expected` issue's path. Run over the\n* relational subset ONLY (policy issues and synthesized namespace issues are\n* handled on their own paths, never coalesced against tables).\n*/\nfunction coalesceSubtreeIssues(issues) {\n\tconst collapsingPaths = issues.filter((issue) => issueOutcome(issue) !== \"not-equal\").map((issue) => issue.path);\n\tif (collapsingPaths.length === 0) return issues;\n\tconst isCollapsed = (issue) => collapsingPaths.some((ancestor) => isStrictDescendantPath(issue.path, ancestor));\n\tconst collapsed = issues.filter(isCollapsed);\n\tconst kept = issues.filter((issue) => !isCollapsed(issue));\n\tconst inherited = new Map(kept.map((issue) => [issue, subtreeDependencies(issue, collapsed)]));\n\tconst dependsOnTarget = (from, to) => (inherited.get(from) ?? []).some((path) => samePath(path, to.path));\n\treturn kept.map((issue) => {\n\t\tconst extra = (inherited.get(issue) ?? []).filter((path) => !kept.some((other) => samePath(other.path, path) && dependsOnTarget(other, issue)));\n\t\treturn extra.length === 0 ? issue : {\n\t\t\t...issue,\n\t\t\tdependsOn: [...issue.dependsOn ?? [], ...extra]\n\t\t};\n\t});\n}\n/**\n* The dependencies a dropped issue's collapsed subtree has outside the subtree, such as the tables\n* its foreign keys name, so a whole-table drop runs before the drop of a table it references. Two\n* dropped tables that reference each other keep neither edge.\n*/\nfunction subtreeDependencies(issue, collapsed) {\n\tif (issueOutcome(issue) !== \"not-expected\") return [];\n\treturn collapsed.filter((descendant) => isStrictDescendantPath(descendant.path, issue.path)).flatMap((descendant) => descendant.dependsOn ?? []).filter((path) => !isStrictDescendantPath(path, issue.path) && !samePath(path, issue.path));\n}\nfunction samePath(left, right) {\n\treturn left.length === right.length && left.every((segment, index) => segment === right[index]);\n}\nfunction isStrictDescendantPath(path, ancestor) {\n\tif (path.length <= ancestor.length) return false;\n\tfor (let i = 0; i < ancestor.length; i += 1) if (path[i] !== ancestor[i]) return false;\n\treturn true;\n}\nfunction fkSpecFromNode(fk, tableName) {\n\treturn {\n\t\tname: fk.name ?? defaultForeignKeyName(tableName, fk.columns),\n\t\tcolumns: [...fk.columns],\n\t\treferences: {\n\t\t\tschema: fk.referencedSchema ?? \"\",\n\t\t\ttable: fk.referencedTable,\n\t\t\tcolumns: [...fk.referencedColumns]\n\t\t},\n\t\t...ifDefined(\"onDelete\", fk.onDelete),\n\t\t...ifDefined(\"onUpdate\", fk.onUpdate)\n\t};\n}\n/**\n* Builds the `CreateTable` + child `CreateIndex` / `AddForeignKey` / `AddUnique`\n* calls for a newly-expected table, reading only the table node's children. The\n* PK and every declared CHECK go inline as table constraints; indexes\n* (declared + FK-backing, already merged and ordered at derivation) and the\n* FK / unique constraints are separate calls (re-bucketed downstream). Every\n* column's DDL is resolved from its `codecRef` via `renderColumnDdl`.\n*/\nfunction buildCreateTableCallsFromNode(schemaName, ddlSchemaName, table) {\n\tconst ddlColumns = Object.values(table.columns).map((c) => renderColumnDdl(c.name, c));\n\tconst primaryKeyConstraints = table.primaryKey ? [contractFree.primaryKey([...table.primaryKey.columns], { ...ifDefined(\"name\", table.primaryKey.name) })] : [];\n\tconst declaredChecks = (table.checks ?? []).map((c) => contractFree.checkExpression(c.name, c.expression));\n\tconst allTableConstraints = [...primaryKeyConstraints, ...declaredChecks];\n\tconst calls = [new CreateTableCall(schemaName, table.name, ddlColumns, allTableConstraints.length > 0 ? allTableConstraints : void 0)];\n\tfor (const index of table.indexes) calls.push(createIndexCallFromNode(index, schemaName, table.name));\n\tfor (const fk of table.foreignKeys) calls.push(new AddForeignKeyCall(schemaName, table.name, fkSpecFromNode(fk, table.name)));\n\tfor (const unique of table.uniques) {\n\t\tconst constraintName = unique.name ?? defaultUniqueName(table.name, unique.columns);\n\t\tcalls.push(new AddUniqueCall(schemaName, table.name, constraintName, [...unique.columns]));\n\t}\n\tif (table.rlsEnabled) calls.push(new EnableRowLevelSecurityCall(ddlSchemaName, table.name));\n\treturn calls;\n}\nfunction nodeConflict(kind, message) {\n\treturn issueConflict(kind, message);\n}\n/**\n* True when `actualMembers` (the live database's ordered members) is a\n* strict, order-preserving prefix of `expectedMembers` (the contract's) —\n* the database already carries every contract member, in declaration\n* order, and the contract declares at least one member the database still\n* lacks. Any other relationship — a renamed value, a removed value, a\n* reordering, or the database holding members the contract lacks — is not\n* a suffix append.\n*/\nfunction isNativeEnumSuffixAppend(actualMembers, expectedMembers) {\n\tif (actualMembers.length >= expectedMembers.length) return false;\n\treturn actualMembers.every((member, index) => member === expectedMembers[index]);\n}\n/** Operator-worded refusal for a native-enum member change beyond a suffix append (design ruling — tests match this verbatim). */\nfunction nativeEnumMemberChangeRefusal(options) {\n\treturn `Native enum type \"${options.ddlSchemaName}\".\"${options.typeName}\" changed beyond appending new values (contract declares [${options.expectedMembers.join(\", \")}], database has [${options.actualMembers.join(\", \")}]). Prisma 8 does not modify a native enum's existing values (rename, removal, reorder) — see https://pris.ly/d/postgres-native-enums. Author the change manually with \\`migration new\\`.`;\n}\n/**\n* Managed native-enum issue -> op lowering. A missing declared type creates\n* it; an unclaimed live type drops it (ownership-scoped upstream by\n* `retainUnownedExtras`, and the `widening` drop gated by the operation-class\n* policy); a paired member-value mismatch lowers to one `ALTER TYPE ... ADD\n* VALUE` per appended member when the database's members are a strict,\n* order-preserving prefix of the contract's — any other change (rename,\n* removal, reorder, or the database holding members the contract lacks) is\n* refused with a NAMED diagnostic, never a silent no-op and never a\n* drop-and-recreate.\n*/\nfunction mapNativeEnumNodeIssue(issue, ctx) {\n\tconst ddlSchemaName = issueSchemaName(issue);\n\tif (ddlSchemaName === void 0) return notOk(nodeConflict(\"unsupportedOperation\", `Enum issue has no schema in its path: ${issue.path.join(\"/\")}`));\n\tconst schemaName = emissionSchemaName(ctx, ddlSchemaName);\n\tif (issueOutcome(issue) === \"not-found\") {\n\t\tconst expected = blindCast(issue.expected);\n\t\treturn ok([new CreateNativeEnumTypeCall(schemaName, expected.typeName, expected.members)]);\n\t}\n\tif (issueOutcome(issue) === \"not-expected\") return ok([new DropNativeEnumTypeCall(schemaName, blindCast(issue.actual).typeName)]);\n\tconst expected = blindCast(issue.expected);\n\tconst actual = blindCast(issue.actual);\n\tif (isNativeEnumSuffixAppend(actual.members, expected.members)) return ok(expected.members.slice(actual.members.length).map((value) => new AddNativeEnumValueCall(schemaName, expected.typeName, value)));\n\treturn notOk(nodeConflict(\"unsupportedOperation\", nativeEnumMemberChangeRefusal({\n\t\tddlSchemaName,\n\t\ttypeName: expected.typeName,\n\t\texpectedMembers: expected.members,\n\t\tactualMembers: actual.members\n\t})));\n}\nfunction mapTableNodeIssue(issue, schemaName, ddlSchemaName) {\n\tif (issueOutcome(issue) === \"not-found\") return ok(buildCreateTableCallsFromNode(schemaName, ddlSchemaName, blindCast(issue.expected)));\n\tif (issueOutcome(issue) === \"not-expected\") return ok([new DropTableCall(schemaName, blindCast(issue.actual).name)]);\n\tconst expected = blindCast(issue.expected);\n\tconst actual = blindCast(issue.actual);\n\tif (expected.rlsEnabled && !actual.rlsEnabled) return ok([new EnableRowLevelSecurityCall(ddlSchemaName, expected.name)]);\n\tif (!expected.rlsEnabled && actual.rlsEnabled) return ok([new DisableRowLevelSecurityCall(ddlSchemaName, expected.name)]);\n\treturn notOk(nodeConflict(\"unsupportedOperation\", `unhandled table-attribute drift on \"${expected.name}\": table not-equal with no rlsEnabled delta (a second table attribute drifted)`));\n}\nfunction mapColumnNodeIssue(issue, schemaName, tableName, dataTypes) {\n\tif (issueOutcome(issue) === \"not-found\") {\n\t\tconst column = blindCast(issue.expected);\n\t\treturn ok([new AddColumnCall(schemaName, tableName, renderColumnDdl(column.name, column), dataTypes)]);\n\t}\n\tif (issueOutcome(issue) === \"not-expected\") return ok([new DropColumnCall(schemaName, tableName, blindCast(issue.actual).name)]);\n\tconst expected = blindCast(issue.expected);\n\tconst actual = blindCast(issue.actual);\n\tconst calls = [];\n\tif (!sqlColumnTypesEqual(expected, actual)) calls.push(new AlterColumnTypeCall({\n\t\tschemaName,\n\t\ttableName,\n\t\tcolumnName: expected.name,\n\t\ttype: renderColumnAlterType(expected),\n\t\t...expected.catalogText !== void 0 ? { raw: true } : {},\n\t\tdataTypes,\n\t\townsAutoincrementSequence: hasAutoincrementDefault(actual),\n\t\toperationClass: liveColumnWidensSafely(expected, actual) ? \"widening\" : \"destructive\"\n\t}));\n\tif (expected.nullable !== actual.nullable) calls.push(expected.nullable ? new DropNotNullCall(schemaName, tableName, expected.name) : new SetNotNullCall(schemaName, tableName, expected.name));\n\treturn ok(calls);\n}\nfunction mapColumnDefaultNodeIssue(issue, schemaName, tableName, columnName, types) {\n\tif (issueOutcome(issue) === \"not-expected\") return ok([new DropDefaultCall(schemaName, tableName, columnName)]);\n\tif (issue.expected === void 0) return ok([]);\n\tconst column = buildSetDefaultColumn(columnName, blindCast(issue.expected), types);\n\tif (column === void 0) return ok([]);\n\treturn ok([new SetDefaultCall(schemaName, tableName, column, issueOutcome(issue) === \"not-equal\" ? \"widening\" : \"additive\")]);\n}\n/** A missing primary key is added. A changed or removed key is planned only by `primaryKeyChangeStrategy`, which also handles the foreign keys that depend on it; one that reaches this mapper is refused. */\nfunction mapPrimaryKeyNodeIssue(issue, schemaName, tableName) {\n\tif (issueOutcome(issue) !== \"not-found\") return notOk(nodeConflict(\"indexIncompatible\", issue.path.join(\"/\")));\n\tconst pk = blindCast(issue.expected);\n\treturn ok([new AddPrimaryKeyCall(schemaName, tableName, pk.name ?? defaultPrimaryKeyName(tableName), [...pk.columns])]);\n}\nfunction mapForeignKeyNodeIssue(issue, schemaName, tableName) {\n\tif (issueOutcome(issue) === \"not-found\") return ok([new AddForeignKeyCall(schemaName, tableName, fkSpecFromNode(blindCast(issue.expected), tableName))]);\n\tif (issueOutcome(issue) === \"not-expected\") {\n\t\tconst fk = blindCast(issue.actual);\n\t\treturn ok([new DropConstraintCall(schemaName, tableName, fk.name ?? defaultForeignKeyName(tableName, fk.columns), \"foreignKey\")]);\n\t}\n\tconst expected = blindCast(issue.expected);\n\tconst actual = blindCast(issue.actual);\n\treturn ok([new DropConstraintCall(schemaName, tableName, actual.name ?? defaultForeignKeyName(tableName, actual.columns), \"foreignKey\"), new AddForeignKeyCall(schemaName, tableName, fkSpecFromNode(expected, tableName))]);\n}\nfunction mapUniqueNodeIssue(issue, schemaName, tableName) {\n\tif (issueOutcome(issue) === \"not-found\") {\n\t\tconst unique = blindCast(issue.expected);\n\t\treturn ok([new AddUniqueCall(schemaName, tableName, unique.name ?? defaultUniqueName(tableName, unique.columns), [...unique.columns])]);\n\t}\n\tif (issueOutcome(issue) === \"not-expected\") {\n\t\tconst unique = blindCast(issue.actual);\n\t\treturn ok([new DropConstraintCall(schemaName, tableName, unique.name ?? defaultUniqueName(tableName, unique.columns), \"unique\")]);\n\t}\n\treturn notOk(nodeConflict(\"indexIncompatible\", issue.path.join(\"/\")));\n}\n/**\n* The CreateIndexCall for a name-identified index node: the node's own name\n* verbatim, its element list (column tuple or opaque expression), and the\n* unique/type/options/where attributes carried through.\n*/\nfunction createIndexCallFromNode(index, schemaName, tableName) {\n\tconst extras = {};\n\tif (index.type !== void 0) extras.type = index.type;\n\tif (index.options !== void 0) extras.options = index.options;\n\tif (index.where !== void 0) extras.where = index.where;\n\tif (index.unique) extras.unique = true;\n\treturn new CreateIndexCall(schemaName, tableName, index.name, index.columns !== void 0 ? { columns: [...index.columns] } : { expression: index.expression ?? \"\" }, extras);\n}\nfunction mapIndexNodeIssue(issue, schemaName, tableName) {\n\tif (issueOutcome(issue) === \"not-found\") return ok([createIndexCallFromNode(blindCast(issue.expected), schemaName, tableName)]);\n\tif (issueOutcome(issue) === \"not-expected\") return ok([new DropIndexCall(schemaName, tableName, blindCast(issue.actual).name)]);\n\treturn notOk(nodeConflict(\"indexIncompatible\", issue.path.join(\"/\")));\n}\n/**\n* The index treatment: a missing check is added, an undeclared live check is\n* dropped, and a paired divergence is a conflict. `not-equal` is reachable only\n* for an exact-named expected check — a wire-named one compares by name, so a\n* changed predicate re-suffixes the name and arrives as missing + extra\n* instead.\n*/\nfunction mapCheckNodeIssue(issue, schemaName, tableName) {\n\tif (issueOutcome(issue) === \"not-found\") {\n\t\tconst check = blindCast(issue.expected);\n\t\treturn ok([new AddCheckConstraintCall(schemaName, tableName, check.name, check.expression)]);\n\t}\n\tif (issueOutcome(issue) === \"not-expected\") return ok([new DropCheckConstraintCall(schemaName, tableName, blindCast(issue.actual).name)]);\n\treturn notOk(nodeConflict(\"unsupportedOperation\", issue.path.join(\"/\")));\n}\n/**\n* Maps one node-typed diff issue to its migration call(s), dispatching on the\n* node's `nodeKind` and the issue's presence-derived `issueOutcome`, reading\n* nodes and resolving column DDL from `codecRef` via `column-ddl-rendering.ts`.\n*/\nfunction mapNodeIssueToCall(issue, ctx) {\n\tconst node = issueNode(issue);\n\tif (node === void 0) return notOk(nodeConflict(\"unsupportedOperation\", `Issue carries neither an expected nor an actual node: ${issue.path.join(\"/\")}`));\n\tif (node.nodeKind === PostgresSchemaNodeKind.namespace) {\n\t\tif (issueOutcome(issue) !== \"not-found\") return notOk(nodeConflict(\"unsupportedOperation\", `Unexpected namespace drift: ${issue.path.join(\"/\")}`));\n\t\treturn ok([new CreateSchemaCall(blindCast(issue.expected).schemaName)]);\n\t}\n\tif (node.nodeKind === PostgresSchemaNodeKind.nativeEnum) return mapNativeEnumNodeIssue(issue, ctx);\n\tconst ddlSchemaName = issueSchemaName(issue);\n\tconst tableName = issueTableName(issue);\n\tif (ddlSchemaName === void 0 || tableName === void 0) return notOk(nodeConflict(\"unsupportedOperation\", `Issue has no schema/table in its path: ${issue.path.join(\"/\")}`));\n\tconst schemaName = emissionSchemaName(ctx, ddlSchemaName);\n\tswitch (node.nodeKind) {\n\t\tcase PostgresSchemaNodeKind.table: return mapTableNodeIssue(issue, schemaName, ddlSchemaName);\n\t\tcase RelationalSchemaNodeKind.column: return mapColumnNodeIssue(issue, schemaName, tableName, ctx.dataTypes);\n\t\tcase RelationalSchemaNodeKind.columnDefault: {\n\t\t\tconst columnName = issueColumnName(issue);\n\t\t\tif (columnName === void 0) return notOk(nodeConflict(\"unsupportedOperation\", `Default issue has no column in its path: ${issue.path.join(\"/\")}`));\n\t\t\treturn mapColumnDefaultNodeIssue(issue, schemaName, tableName, columnName, ctx.types);\n\t\t}\n\t\tcase RelationalSchemaNodeKind.primaryKey: return mapPrimaryKeyNodeIssue(issue, schemaName, tableName);\n\t\tcase RelationalSchemaNodeKind.foreignKey: return mapForeignKeyNodeIssue(issue, schemaName, tableName);\n\t\tcase RelationalSchemaNodeKind.unique: return mapUniqueNodeIssue(issue, schemaName, tableName);\n\t\tcase RelationalSchemaNodeKind.index: return mapIndexNodeIssue(issue, schemaName, tableName);\n\t\tcase RelationalSchemaNodeKind.check: return mapCheckNodeIssue(issue, schemaName, tableName);\n\t\tdefault: return notOk(nodeConflict(\"unsupportedOperation\", `Unhandled node kind: ${node.nodeKind}`));\n\t}\n}\n/**\n* Runs the ordered strategy list over the node-typed diff issues, maps\n* leftover issues via {@link mapNodeIssueToCall}, applies operation-class\n* policy gating, and buckets calls into the fixed DDL emission order (dep →\n* drop → table → column → recipe → alter → primaryKey → unique → index →\n* foreignKey).\n*/\nfunction planIssues(options) {\n\tconst policyProvided = options.policy !== void 0;\n\tconst policy = options.policy ?? DEFAULT_POLICY;\n\tconst schema = options.schema ?? emptySchemaIR();\n\tconst frameworkComponents = options.frameworkComponents ?? [];\n\tconst context = {\n\t\ttoContract: options.toContract,\n\t\tfromContract: options.fromContract,\n\t\tschemaName: options.schemaName,\n\t\tcodecHooks: options.codecHooks,\n\t\ttypes: options.types,\n\t\tschema,\n\t\tstartTree: options.startTree,\n\t\tendTree: options.endTree,\n\t\tallIssues: options.issues,\n\t\tforeignKeyDropAuthority: options.foreignKeyDropAuthority,\n\t\tpolicy,\n\t\tframeworkComponents,\n\t\tstatementColumns: options.statementColumns ?? {\n\t\t\tconvert: [],\n\t\t\tbackfill: []\n\t\t},\n\t\tdataTypes: stackDataTypes(frameworkComponents)\n\t};\n\tconst strategies = options.strategies ?? postgresPlannerStrategies;\n\tlet remaining = options.issues;\n\tconst recipeCalls = [];\n\tconst bucketablePatternCalls = [];\n\tconst conflicts = [];\n\tfor (const strategy of strategies) {\n\t\tconst result = strategy(remaining, context);\n\t\tif (result.kind === \"match\") {\n\t\t\tremaining = result.issues;\n\t\t\tconflicts.push(...result.conflicts ?? []);\n\t\t\tif (result.recipe) recipeCalls.push(...result.calls);\n\t\t\telse bucketablePatternCalls.push(...result.calls);\n\t\t}\n\t}\n\tconst sorted = orderIssuesByDependencies(remaining);\n\tconst defaultCalls = [];\n\tfor (const issue of sorted) {\n\t\tconst result = mapNodeIssueToCall(issue, context);\n\t\tif (result.ok) defaultCalls.push(...result.value);\n\t\telse conflicts.push(result.failure);\n\t}\n\tconst allowed = policy.allowedOperationClasses;\n\tlet gatedDefault = defaultCalls;\n\tlet gatedRecipe = recipeCalls;\n\tlet gatedBucketable = bucketablePatternCalls;\n\tif (policyProvided) {\n\t\tconst keepIfAllowed = (bucket) => (call) => {\n\t\t\tif (allowed.includes(call.operationClass)) {\n\t\t\t\tbucket.push(call);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconflicts.push(conflictForDisallowedCall(call, allowed));\n\t\t};\n\t\tconst gatedDefaultBucket = [];\n\t\tconst gatedRecipeBucket = [];\n\t\tconst gatedBucketableBucket = [];\n\t\tdefaultCalls.forEach(keepIfAllowed(gatedDefaultBucket));\n\t\trecipeCalls.forEach(keepIfAllowed(gatedRecipeBucket));\n\t\tbucketablePatternCalls.forEach(keepIfAllowed(gatedBucketableBucket));\n\t\tgatedDefault = gatedDefaultBucket;\n\t\tgatedRecipe = gatedRecipeBucket;\n\t\tgatedBucketable = gatedBucketableBucket;\n\t}\n\tif (conflicts.length > 0) return notOk(conflicts);\n\tconst combinedBucketable = [...gatedDefault, ...gatedBucketable];\n\tconst byCategory = (cat) => combinedBucketable.filter((c) => classifyCall(c) === cat);\n\treturn ok({ calls: [\n\t\t...byCategory(\"dep\"),\n\t\t...byCategory(\"drop\").sort((a, b) => dropRank(a) - dropRank(b)),\n\t\t...byCategory(\"dropType\"),\n\t\t...byCategory(\"table\"),\n\t\t...byCategory(\"dropSchema\"),\n\t\t...byCategory(\"column\"),\n\t\t...gatedRecipe,\n\t\t...byCategory(\"alter\"),\n\t\t...byCategory(\"primaryKey\"),\n\t\t...byCategory(\"unique\"),\n\t\t...byCategory(\"index\"),\n\t\t...byCategory(\"foreignKey\"),\n\t\t...byCategory(\"rlsEnable\")\n\t] });\n}\n//#endregion\n//#region src/core/migrations/control-policy.ts\n/**\n* Factory calls that create a whole, previously-absent top-level storage\n* object. Used to decide whether `tolerated` permits a call (it only allows\n* creating absent objects, never modifying existing ones).\n*\n* Deliberately an explicit, closed set rather than a `factoryName`\n* create/alter/drop classification: it answers exactly one yes/no question\n* and is fail-closed. Any call not listed here — including future or\n* extension-contributed factories — is treated as NOT object-creation, so it\n* is suppressed under `tolerated` rather than permissively emitted.\n*\n* Lists the creation factories that actually reach the call-side resolver\n* (`resolvePostgresCallControlPolicySubject`) — today only RLS policy\n* creation, from `planPostgresSchemaDiff`. Every other whole-object create\n* (table, schema, native enum, and RLS enablement) is constructed inside\n* `planIssues` and graded on the node side by\n* `resolvePostgresNodeIssueCreationFactoryName`, so none of them are listed\n* here.\n*/\nconst OBJECT_CREATION_FACTORIES = /* @__PURE__ */ new Set([\"createRlsPolicy\"]);\nfunction createsNewTopLevelObject(call) {\n\treturn OBJECT_CREATION_FACTORIES.has(call.factoryName);\n}\nfunction ddlSchemaNameForNamespace(contract, namespaceId) {\n\tconst namespace = contract.storage.namespaces[namespaceId];\n\treturn isPostgresSchema(namespace) ? namespace.ddlSchemaName(contract.storage) : namespaceId;\n}\n/**\n* Resolve the namespace a declared storage entity lives in by walking every\n* namespace for one whose `entries` map actually contains the coordinate —\n* a table by its name, a native enum by its physical type name (see\n* {@link postgresNodeStorageCoordinate}). When `ddlSchemaName` is given, the\n* match must also land in that DDL schema (disambiguates same-named entities\n* declared under different namespaces); when omitted, the first namespace\n* that declares the entity wins. Falls back to {@link UNBOUND_NAMESPACE_ID}\n* when no namespace declares it — e.g. an extra/dropped entity the contract\n* doesn't claim at all.\n*/\nfunction resolveNamespaceIdForEntity(contract, coordinate, ddlSchemaName) {\n\tfor (const namespaceId of Object.keys(contract.storage.namespaces)) {\n\t\tif (!entityAt(contract.storage, {\n\t\t\tnamespaceId,\n\t\t\t...coordinate\n\t\t})) continue;\n\t\tif (ddlSchemaName === void 0 || ddlSchemaNameForNamespace(contract, namespaceId) === ddlSchemaName) return namespaceId;\n\t}\n\treturn UNBOUND_NAMESPACE_ID;\n}\nfunction resolveNamespaceIdForTable(contract, tableName, ddlSchemaName) {\n\treturn resolveNamespaceIdForEntity(contract, {\n\t\tentityKind: \"table\",\n\t\tentityName: tableName\n\t}, ddlSchemaName);\n}\nfunction resolveNamespaceIdForDdlSchema(contract, ddlSchemaName) {\n\tfor (const namespaceId of Object.keys(contract.storage.namespaces)) {\n\t\tconst ns = contract.storage.namespaces[namespaceId];\n\t\tif (isPostgresSchema(ns) && ns.ddlSchemaName(contract.storage) === ddlSchemaName) return namespaceId;\n\t\tif (namespaceId === ddlSchemaName) return namespaceId;\n\t}\n\treturn UNBOUND_NAMESPACE_ID;\n}\nfunction postgresCallFields(call) {\n\treturn {\n\t\t...ifDefined(\"schemaName\", \"schemaName\" in call ? call.schemaName : void 0),\n\t\t...ifDefined(\"tableName\", \"tableName\" in call ? call.tableName : void 0),\n\t\t...ifDefined(\"columnName\", columnNameOfCall(call))\n\t};\n}\nfunction formatSuppressionSubjectLabel(subject, contract) {\n\tif (subject === void 0) return \"unknown\";\n\tconst ddlSchema = ddlSchemaNameForNamespace(contract, subject.namespaceId);\n\tif (subject.entityKind !== void 0 && subject.entityName !== void 0) {\n\t\tconst entityLabel = `${subject.entityKind} \"${ddlSchema}.${subject.entityName}\"`;\n\t\treturn subject.rlsPolicy !== void 0 ? `RLS policy \"${subject.rlsPolicy}\" on ${entityLabel}` : entityLabel;\n\t}\n\treturn `namespace \"${ddlSchema}\"`;\n}\nfunction postgresSuppressionSummary(subjectLabel, subject, policy) {\n\tconst namespace = subject?.namespaceId ?? \"unknown\";\n\tconst declared = subject?.explicitNodeControlPolicy;\n\tif (policy === \"external\" && declared === \"managed\") return `control policy suppressed: ${subjectLabel} — namespace '${namespace}' has effective control 'external' but declared 'managed'`;\n\treturn `control policy suppressed: ${subjectLabel} — namespace '${namespace}' has effective control '${policy}'${declared ? ` but declared '${declared}'` : \"\"}`;\n}\n/**\n* Render one family {@link SuppressionRecord} into a target `SqlPlannerConflict`.\n* The family decides *that* a subject is suppressed and hands over the raw\n* coordinate + policy; the label, message, and location are rendered here,\n* driven entirely by the subject's own `(entityKind, entityName)` coordinate\n* — no target-owned table-vs-enum vocabulary.\n*/\nfunction renderPostgresSuppression(record, contract) {\n\tconst subject = record.subject;\n\treturn {\n\t\tkind: \"controlPolicySuppressedCall\",\n\t\tsummary: postgresSuppressionSummary(formatSuppressionSubjectLabel(subject, contract), subject, record.policy),\n\t\tlocation: {\n\t\t\t...ifDefined(\"namespaceId\", subject?.namespaceId),\n\t\t\t...ifDefined(\"entityKind\", subject?.entityKind),\n\t\t\t...ifDefined(\"entityName\", subject?.entityName),\n\t\t\t...ifDefined(\"column\", subject?.column),\n\t\t\t...ifDefined(\"rlsPolicy\", subject?.rlsPolicy)\n\t\t},\n\t\tmeta: {\n\t\t\tcontrolPolicy: record.policy,\n\t\t\t...ifDefined(\"factoryName\", record.factoryName),\n\t\t\t...ifDefined(\"rlsPolicy\", subject?.rlsPolicy),\n\t\t\t...ifDefined(\"declaredControlPolicy\", subject?.explicitNodeControlPolicy)\n\t\t}\n\t};\n}\nfunction resolvePostgresCallControlPolicySubject(call, contract) {\n\tconst callFields = postgresCallFields(call);\n\tconst createsNewObject = createsNewTopLevelObject(call);\n\tif (call.factoryName === \"createSchema\" && callFields.schemaName) return {\n\t\tnamespaceId: resolveNamespaceIdForDdlSchema(contract, callFields.schemaName),\n\t\tcreatesNewObject\n\t};\n\tif (callFields.tableName) {\n\t\tconst namespaceId = resolveNamespaceIdForTable(contract, callFields.tableName, callFields.schemaName);\n\t\tconst tableControlPolicy = entityAt(contract.storage, {\n\t\t\tnamespaceId,\n\t\t\tentityKind: \"table\",\n\t\t\tentityName: callFields.tableName\n\t\t})?.control;\n\t\treturn {\n\t\t\tnamespaceId,\n\t\t\tentityKind: \"table\",\n\t\t\tentityName: callFields.tableName,\n\t\t\t...ifDefined(\"column\", callFields.columnName),\n\t\t\t...ifDefined(\"explicitNodeControlPolicy\", tableControlPolicy),\n\t\t\tcreatesNewObject\n\t\t};\n\t}\n\tif (callFields.schemaName) return {\n\t\tnamespaceId: resolveNamespaceIdForDdlSchema(contract, callFields.schemaName),\n\t\tcreatesNewObject\n\t};\n}\n/**\n* Node kinds whose *absence* is the creation of a whole, top-level Postgres\n* object: a namespace, a table, or a native enum. Used by\n* {@link resolvePostgresNodeIssueCreationFactoryName} to decide whether a\n* `tolerated` subject permits the issue to flow into the planner\n* (create-if-absent) and to seed the suppressed-subject warning's\n* `factoryName` when the planner is skipped. RLS policy creation is not\n* listed here — policy issues never reach this issue-based partition (they\n* are routed to `planPostgresSchemaDiff` and gated via the call-based\n* {@link resolvePostgresCallControlPolicySubject} instead).\n*/\nconst POSTGRES_NODE_CREATION_FACTORY = Object.freeze({\n\t[PostgresSchemaNodeKind.namespace]: \"createSchema\",\n\t[PostgresSchemaNodeKind.table]: \"createTable\",\n\t[PostgresSchemaNodeKind.nativeEnum]: \"createNativeEnumType\"\n});\n/**\n* A table `not-equal` issue whose `rlsEnabled` flips OFF→ON (expected on,\n* actual off) is enablement toward `ENABLE ROW LEVEL SECURITY`. It is\n* creation-class on the node side because `isEnablementCreationIssue` and\n* {@link resolvePostgresNodeIssueCreationFactoryName} treat this OFF→ON delta\n* as a creation: enabling RLS establishes the fail-closed guard the declared\n* policy set attaches to, the same grant `tolerated` extends to creating the\n* policies themselves. The opposite direction (`DISABLE`) is a modification\n* and stays managed-only. Keying on the actual delta (not just the expected\n* bit) keeps this correct if a second table attribute ever joins\n* `isEqualTo`: a not-equal with no `rlsEnabled` delta is not enablement, so\n* it is not admitted as creation-class here.\n*/\nfunction isEnablementCreationIssue(issue) {\n\tif (issueOutcome(issue) !== \"not-equal\") return false;\n\tconst { expected, actual } = issue;\n\treturn expected !== void 0 && actual !== void 0 && PostgresTableSchemaNode.is(expected) && PostgresTableSchemaNode.is(actual) && expected.rlsEnabled === true && actual.rlsEnabled === false;\n}\nfunction resolvePostgresNodeIssueCreationFactoryName(issue) {\n\tif (isEnablementCreationIssue(issue)) return \"enableRowLevelSecurity\";\n\tif (issueOutcome(issue) !== \"not-found\") return void 0;\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\treturn POSTGRES_NODE_CREATION_FACTORY[node.nodeKind];\n}\n/**\n* Resolves the control-policy subject for a node-typed {@link SchemaDiffIssue}\n* (the issue-side mirror of `resolvePostgresCallControlPolicySubject`).\n* Storage entities resolve off their node coordinate; a sub-entity issue\n* resolves off the enclosing table read from the issue path; an unclaimed\n* extra falls back to the unbound coordinate. A role always resolves\n* `'external'` — roles are referenced, never owned.\n*/\nfunction resolvePostgresNodeIssueControlPolicySubject(issue, contract) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\tif (node.nodeKind === PostgresSchemaNodeKind.namespace) return {\n\t\tnamespaceId: resolveNamespaceIdForDdlSchema(contract, blindCast(node).schemaName),\n\t\tcreatesNewObject: issueOutcome(issue) === \"not-found\"\n\t};\n\tif (node.nodeKind === PostgresSchemaNodeKind.role) {\n\t\tconst roleName = issue.path[1];\n\t\treturn {\n\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\t\texplicitNodeControlPolicy: (roleName === void 0 ? void 0 : entityAt(contract.storage, {\n\t\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\t\t\tentityKind: \"role\",\n\t\t\t\tentityName: roleName\n\t\t\t}))?.control ?? \"external\",\n\t\t\tcreatesNewObject: false\n\t\t};\n\t}\n\tconst coordinate = postgresNodeStorageCoordinate(node);\n\tif (coordinate !== void 0) {\n\t\tconst namespaceId = resolveNamespaceIdForEntity(contract, coordinate, issue.path[1]);\n\t\tconst entityControl = entityAt(contract.storage, {\n\t\t\tnamespaceId,\n\t\t\t...coordinate\n\t\t})?.control;\n\t\treturn {\n\t\t\tnamespaceId,\n\t\t\t...coordinate,\n\t\t\t...ifDefined(\"column\", issueColumnName(issue)),\n\t\t\t...ifDefined(\"explicitNodeControlPolicy\", entityControl),\n\t\t\tcreatesNewObject: resolvePostgresNodeIssueCreationFactoryName(issue) !== void 0\n\t\t};\n\t}\n\tconst tableName = issue.path[2];\n\tif (tableName === void 0) return void 0;\n\tconst ddlSchemaName = issue.path[1];\n\tconst namespaceId = resolveNamespaceIdForTable(contract, tableName, ddlSchemaName);\n\tconst table = entityAt(contract.storage, {\n\t\tnamespaceId,\n\t\tentityKind: \"table\",\n\t\tentityName: tableName\n\t});\n\treturn {\n\t\tnamespaceId,\n\t\tentityKind: \"table\",\n\t\tentityName: tableName,\n\t\t...ifDefined(\"column\", issueColumnName(issue)),\n\t\t...ifDefined(\"explicitNodeControlPolicy\", table?.control),\n\t\tcreatesNewObject: resolvePostgresNodeIssueCreationFactoryName(issue) !== void 0\n\t};\n}\n//#endregion\nexport { resolvePostgresNodeIssueCreationFactoryName as a, issueNode as c, postgresPlannerStrategies as d, tableAt as f, resolvePostgresNodeIssueControlPolicySubject as i, issueSchemaName as l, resolveNamespaceIdForDdlSchema as n, coalesceSubtreeIssues as o, postgresNodeStorageCoordinate as p, resolvePostgresCallControlPolicySubject as r, conflictForDisallowedCall as s, renderPostgresSuppression as t, planIssues as u };\n\n//# sourceMappingURL=control-policy-DZzwyc3L.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8BA,SAAS,8BAA8B,MAAM;CAC5C,IAAI,wBAAwB,GAAG,IAAI,GAAG;EACrC,MAAM,aAAa,uBAAuB,KAAK,QAAQ;EACvD,OAAO,eAAe,KAAK,IAAI,KAAK,IAAI;GACvC;GACA,YAAY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