@prisma/orm-target-postgres 8.0.0-rc.16-dev.4 → 8.0.0-rc.16-dev.5
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-RtS8vD8U-BvmL3EaF.mjs → adapter-RtS8vD8U-m4U_WTpQ.mjs} +5 -5
- package/dist/{adapter-RtS8vD8U-BvmL3EaF.mjs.map → adapter-RtS8vD8U-m4U_WTpQ.mjs.map} +1 -1
- package/dist/adapter.mjs +5 -5
- package/dist/adapter__adapter.mjs +2 -2
- package/dist/adapter__control.mjs +6 -6
- package/dist/adapter__runtime.mjs +4 -4
- package/dist/adapter__sql-renderer.mjs +1 -1
- package/dist/{authoring-CfPWv_-P-BHAGgGYI.mjs → authoring-vHbPLrW4-BsHR7gUE.mjs} +5 -5
- package/dist/{authoring-CfPWv_-P-BHAGgGYI.mjs.map → authoring-vHbPLrW4-BsHR7gUE.mjs.map} +1 -1
- package/dist/{check-expressions-BRuSxJ5d-CC5OFfR1.mjs → check-expressions-Dlt334zg-CV5Vkh3G.mjs} +3 -3
- package/dist/{check-expressions-BRuSxJ5d-CC5OFfR1.mjs.map → check-expressions-Dlt334zg-CV5Vkh3G.mjs.map} +1 -1
- package/dist/{codec-registry-CyhMngN6-BlKEiEni.mjs → codec-registry-nSGjxm-H-BeUu5zV2.mjs} +4 -4
- package/dist/{codec-registry-CyhMngN6-BlKEiEni.mjs.map → codec-registry-nSGjxm-H-BeUu5zV2.mjs.map} +1 -1
- package/dist/{codecs-hSJgX8qY-fZSDQFIE.mjs → codecs-DelwJv6h-CFbyTJIJ.mjs} +3 -3
- package/dist/{codecs-hSJgX8qY-fZSDQFIE.mjs.map → codecs-DelwJv6h-CFbyTJIJ.mjs.map} +1 -1
- package/dist/{contract-free-DlLLhKi4.d.mts → contract-free-DY8vDIxh.d.mts} +19 -2
- package/dist/contract-free-DY8vDIxh.d.mts.map +1 -0
- package/dist/{contract-free-DAGgx1J-.mjs → contract-free-DaK6wmmo.mjs} +3 -3
- package/dist/contract-free-DaK6wmmo.mjs.map +1 -0
- package/dist/{control-BVAy0J9w.mjs → control-YKrabf1Q.mjs} +11 -11
- package/dist/{control-BVAy0J9w.mjs.map → control-YKrabf1Q.mjs.map} +1 -1
- package/dist/{control-adapter-Co30P4lH-B8vk7fsI.mjs → control-adapter-Co30P4lH-B5euUoQ4.mjs} +6 -6
- package/dist/{control-adapter-Co30P4lH-B8vk7fsI.mjs.map → control-adapter-Co30P4lH-B5euUoQ4.mjs.map} +1 -1
- package/dist/{control-policy-C16wMazs-O_wlPuFC.mjs → control-policy-bwcdB78Y-DgRaWAzu.mjs} +16 -22
- package/dist/control-policy-bwcdB78Y-DgRaWAzu.mjs.map +1 -0
- package/dist/{data-type-entries-C2zpNOAQ-BJh8QNDa.mjs → data-type-entries-DgKLUrqt-TKDikzti.mjs} +3 -3
- package/dist/{data-type-entries-C2zpNOAQ-BJh8QNDa.mjs.map → data-type-entries-DgKLUrqt-TKDikzti.mjs.map} +1 -1
- package/dist/{data-types-BRBW3ouc-ZtyZE7nE.mjs → data-types-k3Ebk3kj-DWk3nh_k.mjs} +3 -3
- package/dist/{data-types-BRBW3ouc-ZtyZE7nE.mjs.map → data-types-k3Ebk3kj-DWk3nh_k.mjs.map} +1 -1
- package/dist/{ddl-BzsT_-qY-Cdzm0YIK.mjs → ddl-C_vTj7b5-vyGLBKLo.mjs} +50 -5
- package/dist/ddl-C_vTj7b5-vyGLBKLo.mjs.map +1 -0
- package/dist/default-constraint-names-CtcRXhV8-nz3ff6b8.mjs +18 -0
- package/dist/default-constraint-names-CtcRXhV8-nz3ff6b8.mjs.map +1 -0
- package/dist/{descriptor-meta-ARufwwWW-DUiQQsOX.mjs → descriptor-meta-ARufwwWW-DMQsPNAl.mjs} +3 -3
- package/dist/{descriptor-meta-ARufwwWW-DUiQQsOX.mjs.map → descriptor-meta-ARufwwWW-DMQsPNAl.mjs.map} +1 -1
- package/dist/{descriptor-meta-Dp8tWKKU-5RiFTCA_.mjs → descriptor-meta-BgOMP4hF-CfUJsgjc.mjs} +8 -8
- package/dist/{descriptor-meta-Dp8tWKKU-5RiFTCA_.mjs.map → descriptor-meta-BgOMP4hF-CfUJsgjc.mjs.map} +1 -1
- package/dist/{descriptor-meta-runtime-BycwK4wx-CuDo_Atu.mjs → descriptor-meta-runtime-CG2S236D-CUkzqeCr.mjs} +3 -3
- package/dist/{descriptor-meta-runtime-BycwK4wx-CuDo_Atu.mjs.map → descriptor-meta-runtime-CG2S236D-CUkzqeCr.mjs.map} +1 -1
- package/dist/{diff-database-schema-DRPIV4Ae-BSY-cBm0.mjs → diff-database-schema-zc7d2uxC-BVe8D7vG.mjs} +5 -5
- package/dist/{diff-database-schema-DRPIV4Ae-BSY-cBm0.mjs.map → diff-database-schema-zc7d2uxC-BVe8D7vG.mjs.map} +1 -1
- package/dist/{full-text-index-expression-2O1p7zJA--CcXJUdq.mjs → full-text-index-expression-BpUM2Td6-2Q7y7DnO.mjs} +4 -4
- package/dist/{full-text-index-expression-2O1p7zJA--CcXJUdq.mjs.map → full-text-index-expression-BpUM2Td6-2Q7y7DnO.mjs.map} +1 -1
- package/dist/{infer-psl-contract-shHWsRbe-C65aVFOB.mjs → infer-psl-contract-B5yExD61-Cmye68li.mjs} +6 -6
- package/dist/{infer-psl-contract-shHWsRbe-C65aVFOB.mjs.map → infer-psl-contract-B5yExD61-Cmye68li.mjs.map} +1 -1
- package/dist/migration-PTHAY9Cv.mjs.map +1 -1
- package/dist/{op-factory-call-B-4nf1jC-DkRw5e1q.mjs → op-factory-call-DdXVWQlV-DzfLhTkh.mjs} +70 -18
- package/dist/op-factory-call-DdXVWQlV-DzfLhTkh.mjs.map +1 -0
- package/dist/{planner-B5wkfdZ_-bckhSgt5.mjs → planner-ZmK0aNuY-Cak-8zwa.mjs} +16 -12
- package/dist/planner-ZmK0aNuY-Cak-8zwa.mjs.map +1 -0
- package/dist/{planner-ddl-builders-ClaAKDuZ-DpDBj2cs.mjs → planner-ddl-builders-DRProi99-D0K5ZiD0.mjs} +44 -14
- package/dist/planner-ddl-builders-DRProi99-D0K5ZiD0.mjs.map +1 -0
- package/dist/{planner-identity-values-BZpK0CdX-BJo672Ml.mjs → planner-identity-values-C1eV916m-D0p3EfYc.mjs} +3 -3
- package/dist/{planner-identity-values-BZpK0CdX-BJo672Ml.mjs.map → planner-identity-values-C1eV916m-D0p3EfYc.mjs.map} +1 -1
- package/dist/{planner-produced-postgres-migration-B3dM0fTf-XkTUm5wR.mjs → planner-produced-postgres-migration-BAWQ6iqr-C06XurYw.mjs} +3 -3
- package/dist/{planner-produced-postgres-migration-B3dM0fTf-XkTUm5wR.mjs.map → planner-produced-postgres-migration-BAWQ6iqr-C06XurYw.mjs.map} +1 -1
- package/dist/{planner-sql-checks-Bhp0Iq_X-DwwIxJHj.mjs → planner-sql-checks-rqOH8naU-B6xOE5lC.mjs} +4 -4
- package/dist/{planner-sql-checks-Bhp0Iq_X-DwwIxJHj.mjs.map → planner-sql-checks-rqOH8naU-B6xOE5lC.mjs.map} +1 -1
- package/dist/{postgres-contract-view-rT0ZLNqw-DThfALEV.mjs → postgres-contract-view-B0KloSYp-Cbbl_pIv.mjs} +6 -6
- package/dist/{postgres-contract-view-rT0ZLNqw-DThfALEV.mjs.map → postgres-contract-view-B0KloSYp-Cbbl_pIv.mjs.map} +1 -1
- package/dist/{postgres-migration-CmD95Eh_-DGLByWZD.mjs → postgres-migration-UVh2xeV0-DW8V_8aj.mjs} +84 -58
- package/dist/postgres-migration-UVh2xeV0-DW8V_8aj.mjs.map +1 -0
- package/dist/postgres-object-name-FPikIvOw-BNs44hTu.mjs +23 -0
- package/dist/postgres-object-name-FPikIvOw-BNs44hTu.mjs.map +1 -0
- package/dist/{postgres-schema-DXd0mebY-CExd_GcQ.mjs → postgres-schema-AlEVkXXS-ZfXWYddl.mjs} +3 -3
- package/dist/{postgres-schema-DXd0mebY-CExd_GcQ.mjs.map → postgres-schema-AlEVkXXS-ZfXWYddl.mjs.map} +1 -1
- package/dist/{prisma7-binding-DNckHEx8.d.mts → prisma7-binding-FvF1AZxQ.d.mts} +11 -1
- package/dist/prisma7-binding-FvF1AZxQ.d.mts.map +1 -0
- package/dist/{prisma7-binding-CArLf1qk.mjs → prisma7-binding-GebhdAGS.mjs} +11 -6
- package/dist/prisma7-binding-GebhdAGS.mjs.map +1 -0
- package/dist/{resolve-ddl-schema-CadTChyu-C7F31wpN.mjs → resolve-ddl-schema-BthOWVjF-DuZ9iUh-.mjs} +3 -3
- package/dist/{resolve-ddl-schema-CadTChyu-C7F31wpN.mjs.map → resolve-ddl-schema-BthOWVjF-DuZ9iUh-.mjs.map} +1 -1
- package/dist/{sql-renderer-DT4IEOVi-G0Q8NmyB.mjs → sql-renderer-DT4IEOVi-CE0YIu9V.mjs} +3 -3
- package/dist/{sql-renderer-DT4IEOVi-G0Q8NmyB.mjs.map → sql-renderer-DT4IEOVi-CE0YIu9V.mjs.map} +1 -1
- package/dist/{sql-utils-BMXJi06b-CAQOplfq.mjs → sql-utils-CVsvXiX4-C7xD0Bgv.mjs} +5 -9
- package/dist/sql-utils-CVsvXiX4-C7xD0Bgv.mjs.map +1 -0
- package/dist/target.d.mts +3 -3
- package/dist/target.mjs +25 -25
- package/dist/target__codecs.mjs +2 -2
- package/dist/target__contract-free.d.mts +2 -2
- package/dist/target__contract-free.mjs +4 -4
- package/dist/target__control.mjs +3 -3
- package/dist/target__data-types.mjs +2 -2
- package/dist/target__diff-database-schema.mjs +1 -1
- package/dist/target__issue-planner.mjs +1 -1
- package/dist/target__migration.mjs +2 -2
- package/dist/target__op-factory-call.mjs +1 -1
- package/dist/target__pack.mjs +1 -1
- package/dist/target__planner-ddl-builders.mjs +1 -1
- package/dist/target__planner-identity-values.mjs +1 -1
- package/dist/target__planner-produced-postgres-migration.mjs +1 -1
- package/dist/target__planner-sql-checks.mjs +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__runtime.mjs +3 -3
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/target__schema-ir-annotations.mjs +1 -1
- package/dist/target__sql-utils.mjs +2 -2
- package/dist/target__types.mjs +2 -2
- package/package.json +9 -9
- package/dist/contract-free-DAGgx1J-.mjs.map +0 -1
- package/dist/contract-free-DlLLhKi4.d.mts.map +0 -1
- package/dist/control-policy-C16wMazs-O_wlPuFC.mjs.map +0 -1
- package/dist/ddl-BzsT_-qY-Cdzm0YIK.mjs.map +0 -1
- package/dist/op-factory-call-B-4nf1jC-DkRw5e1q.mjs.map +0 -1
- package/dist/planner-B5wkfdZ_-bckhSgt5.mjs.map +0 -1
- package/dist/planner-ddl-builders-ClaAKDuZ-DpDBj2cs.mjs.map +0 -1
- package/dist/postgres-migration-CmD95Eh_-DGLByWZD.mjs.map +0 -1
- package/dist/prisma7-binding-CArLf1qk.mjs.map +0 -1
- package/dist/prisma7-binding-DNckHEx8.d.mts.map +0 -1
- package/dist/sql-utils-BMXJi06b-CAQOplfq.mjs.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"op-factory-call-B-4nf1jC-DkRw5e1q.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/op-factory-call-B-4nf1jC.mjs"],"sourcesContent":["import { s as postgresError } from \"./errors-DYyzTYzE.mjs\";\nimport { a as quoteQualifiedName, o as validateEnumValueLength, r as quoteIdentifier, t as escapeLiteral } from \"./sql-utils-BMXJi06b.mjs\";\nimport { t as DEFAULT_NAMESPACE_ID } from \"./namespace-ids-xtp_ZY86.mjs\";\nimport { C as nativeEnumValueExistsAst, D as tableExistsAst, E as rlsPolicyExistsAst, O as tableIsEmptyAst, S as nativeEnumTypeExistsAst, T as rlsEnabledAst, _ as columnNullabilityAst, a as createIndex$1, b as extensionExistsAst, c as createTable, d as dropDefaultAction, f as dropIndex$1, g as columnExistsAst, h as columnDefaultAst, i as alterTable, l as createType, m as dropType, n as alterIndexRename, o as createPolicy, p as dropPolicy, r as alterPolicyRename, s as createSchema, t as addColumnAction, u as disableRowLevelSecurity$1, v as columnTypeAst, w as noNullValuesAst, x as indexExistsAst, y as constraintExistsAst } from \"./ddl-BzsT_-qY.mjs\";\nimport { n as qualifyTableName } from \"./planner-sql-checks-Bhp0Iq_X.mjs\";\nimport { t as buildColumnTypeSql } from \"./planner-ddl-builders-ClaAKDuZ.mjs\";\nimport { DdlColumn, FunctionColumnDefault, LiteralColumnDefault, opaqueSql, renderOpaqueSql } from \"@internal/sql-relational-core/ast\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { namingOf } from \"@internal/sql-schema-ir/naming\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { col } from \"@internal/sql-relational-core/contract-free\";\nimport { InternalError, assertNever } from \"@internal/utils/internal-error\";\nimport { errorUnfilledPlaceholder } from \"@internal/errors/migration\";\nimport { TsExpression, jsonToTsSource, tsObjectSource, tsQuotedTextSource } from \"@internal/ts-render\";\nimport { REFERENTIAL_ACTION_SQL } from \"@internal/sql-contract/referential-action-sql\";\n//#region src/core/migrations/bound-schema.ts\n/**\n* Maps a planner schema name to the contract-free DDL builder's optional\n* `schema` field: the unbound sentinel becomes `undefined` (the builder omits\n* the schema qualifier), every other name passes through.\n*/\nfunction boundSchema(schemaName) {\n\treturn schemaName === UNBOUND_NAMESPACE_ID ? void 0 : schemaName;\n}\n//#endregion\n//#region src/core/migrations/operations/shared.ts\nfunction step(description, sql, params) {\n\treturn {\n\t\tdescription,\n\t\tsql,\n\t\t...ifDefined(\"params\", params)\n\t};\n}\nfunction targetDetails(objectType, name, schema, table) {\n\treturn {\n\t\tid: \"postgres\",\n\t\tdetails: {\n\t\t\tschema,\n\t\t\tobjectType,\n\t\t\tname,\n\t\t\t...ifDefined(\"table\", table)\n\t\t}\n\t};\n}\n//#endregion\n//#region src/core/migrations/operations/columns.ts\nasync function columnExistsSteps(lowerer, options) {\n\tconst checks = columnExistsAst(options);\n\treturn {\n\t\tpresent: await lowerer.lowerToExecuteRequest(checks.columnPresent()),\n\t\tabsent: await lowerer.lowerToExecuteRequest(checks.columnAbsent())\n\t};\n}\nasync function dropColumn(schemaName, tableName, columnName, lowerer) {\n\tconst qualified = qualifyTableName(schemaName, tableName);\n\tconst { present, absent } = await columnExistsSteps(lowerer, {\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tcolumn: columnName\n\t});\n\treturn {\n\t\tid: `dropColumn.${tableName}.${columnName}`,\n\t\tlabel: `Drop column \"${columnName}\" from \"${tableName}\"`,\n\t\toperationClass: \"destructive\",\n\t\ttarget: targetDetails(\"column\", columnName, schemaName, tableName),\n\t\tprecheck: [step(`ensure column \"${columnName}\" exists`, present.sql, present.params)],\n\t\texecute: [step(`drop column \"${columnName}\"`, `ALTER TABLE ${qualified} DROP COLUMN ${quoteIdentifier(columnName)}`)],\n\t\tpostcheck: [step(`verify column \"${columnName}\" does not exist`, absent.sql, absent.params)]\n\t};\n}\n/**\n* `qualifiedTargetType` is the new column type as it appears in the\n* `ALTER COLUMN TYPE` clause (schema-qualified for user-defined types, raw\n* native name for built-ins). `formatTypeExpected` is the unqualified\n* `format_type` form used in the postcheck. `rawTargetTypeForLabel` is the\n* string appearing in the human-readable label (typically `toType` when\n* explicit, else the column's native type).\n*/\nasync function alterColumnType(schemaName, tableName, columnName, options, lowerer) {\n\tconst qualified = qualifyTableName(schemaName, tableName);\n\tconst usingClause = options.using ? ` USING ${renderOpaqueSql(opaqueSql(options.using))}` : ` USING ${quoteIdentifier(columnName)}::${options.qualifiedTargetType}`;\n\tconst { present } = await columnExistsSteps(lowerer, {\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tcolumn: columnName\n\t});\n\tconst typeCheck = await lowerer.lowerToExecuteRequest(columnTypeAst({\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tcolumn: columnName,\n\t\texpectedType: options.formatTypeExpected\n\t}));\n\treturn {\n\t\tid: `alterType.${tableName}.${columnName}`,\n\t\tlabel: `Alter type of \"${tableName}\".\"${columnName}\" to ${options.rawTargetTypeForLabel}`,\n\t\toperationClass: \"destructive\",\n\t\ttarget: targetDetails(\"column\", columnName, schemaName, tableName),\n\t\tprecheck: [step(`ensure column \"${columnName}\" exists`, present.sql, present.params)],\n\t\texecute: [step(`alter type of \"${columnName}\"`, `ALTER TABLE ${qualified} ALTER COLUMN ${quoteIdentifier(columnName)} TYPE ${options.qualifiedTargetType}${usingClause}`)],\n\t\tpostcheck: [step(`verify column \"${columnName}\" has type \"${options.formatTypeExpected}\"`, typeCheck.sql, typeCheck.params)],\n\t\tmeta: { warning: \"TABLE_REWRITE\" }\n\t};\n}\nasync function setNotNull(schemaName, tableName, columnName, lowerer) {\n\tconst qualified = qualifyTableName(schemaName, tableName);\n\tconst { present } = await columnExistsSteps(lowerer, {\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tcolumn: columnName\n\t});\n\tconst noNulls = await lowerer.lowerToExecuteRequest(noNullValuesAst({\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tcolumn: columnName\n\t}));\n\tconst notNullable = await lowerer.lowerToExecuteRequest(columnNullabilityAst({\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tcolumn: columnName,\n\t\tnullable: false\n\t}));\n\treturn {\n\t\tid: `alterNullability.setNotNull.${tableName}.${columnName}`,\n\t\tlabel: `Set NOT NULL on \"${tableName}\".\"${columnName}\"`,\n\t\toperationClass: \"destructive\",\n\t\ttarget: targetDetails(\"column\", columnName, schemaName, tableName),\n\t\tprecheck: [step(`ensure column \"${columnName}\" exists`, present.sql, present.params), step(`ensure no NULL values in \"${columnName}\"`, noNulls.sql, noNulls.params)],\n\t\texecute: [step(`set NOT NULL on \"${columnName}\"`, `ALTER TABLE ${qualified} ALTER COLUMN ${quoteIdentifier(columnName)} SET NOT NULL`)],\n\t\tpostcheck: [step(`verify column \"${columnName}\" is NOT NULL`, notNullable.sql, notNullable.params)]\n\t};\n}\nasync function dropNotNull(schemaName, tableName, columnName, lowerer) {\n\tconst qualified = qualifyTableName(schemaName, tableName);\n\tconst { present } = await columnExistsSteps(lowerer, {\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tcolumn: columnName\n\t});\n\tconst nullable = await lowerer.lowerToExecuteRequest(columnNullabilityAst({\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tcolumn: columnName,\n\t\tnullable: true\n\t}));\n\treturn {\n\t\tid: `alterNullability.dropNotNull.${tableName}.${columnName}`,\n\t\tlabel: `Drop NOT NULL on \"${tableName}\".\"${columnName}\"`,\n\t\toperationClass: \"widening\",\n\t\ttarget: targetDetails(\"column\", columnName, schemaName, tableName),\n\t\tprecheck: [step(`ensure column \"${columnName}\" exists`, present.sql, present.params)],\n\t\texecute: [step(`drop NOT NULL on \"${columnName}\"`, `ALTER TABLE ${qualified} ALTER COLUMN ${quoteIdentifier(columnName)} DROP NOT NULL`)],\n\t\tpostcheck: [step(`verify column \"${columnName}\" is nullable`, nullable.sql, nullable.params)]\n\t};\n}\n/**\n* Sets `column`'s default. The adapter writes the `DEFAULT …` clause, reading a literal default with\n* the column's codec first, as every DDL statement that writes a default does.\n*\n* `operationClass` defaults to `'additive'` (setting a default on a column\n* that currently has none). The reconciliation planner passes `'widening'`\n* when the column already has a different default — policy enforcement\n* treats that as a widening change rather than an additive one. A widening\n* change has no postcheck: the old default would pass a check for a default,\n* and the runner skips an operation whose postcheck already passes. Setting a\n* default again is harmless.\n*/\nasync function setDefault(schemaName, tableName, column, lowerer, operationClass = \"additive\") {\n\trefuseUnwritableSetDefault(tableName, column);\n\tconst columnName = column.name;\n\tconst qualified = qualifyTableName(schemaName, tableName);\n\tconst clause = await lowerer.renderColumnDefault(column, tableName);\n\tconst { present } = await columnExistsSteps(lowerer, {\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tcolumn: columnName\n\t});\n\tconst hasDefault = operationClass === \"additive\" ? await lowerer.lowerToExecuteRequest(columnDefaultAst({\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tcolumn: columnName\n\t}).defaultPresent()) : void 0;\n\treturn {\n\t\tid: `setDefault.${tableName}.${columnName}`,\n\t\tlabel: `Set default on \"${tableName}\".\"${columnName}\"`,\n\t\toperationClass,\n\t\ttarget: targetDetails(\"column\", columnName, schemaName, tableName),\n\t\tprecheck: [step(`ensure column \"${columnName}\" exists`, present.sql, present.params)],\n\t\texecute: [step(`set default on \"${columnName}\"`, `ALTER TABLE ${qualified} ALTER COLUMN ${quoteIdentifier(columnName)} SET ${clause}`)],\n\t\tpostcheck: hasDefault === void 0 ? [] : [step(`verify column \"${columnName}\" has a default`, hasDefault.sql, hasDefault.params)]\n\t};\n}\nfunction refuseUnwritableSetDefault(tableName, column) {\n\tconst meta = {\n\t\ttable: tableName,\n\t\tcolumn: column.name\n\t};\n\tif (column.default === void 0) throw postgresError(\"CONTRACT.DEFAULT_INVALID\", `setDefault on column \"${column.name}\" of table \"${tableName}\" has no default. Pass the column with its default, as in col(name, type, { default: lit(value) }) or col(name, type, { default: fn(expression) }).`, { meta: {\n\t\t...meta,\n\t\treason: \"set-default-without-default\"\n\t} });\n\tif (column.default.kind === \"function\" && column.default.expression.text === \"autoincrement()\") throw postgresError(\"CONTRACT.DEFAULT_INVALID\", `setDefault cannot give the existing column \"${column.name}\" of table \"${tableName}\" an autoincrement() default, because autoincrement() is written as the column's SERIAL type when the column is created. Set a sequence default instead, as in fn(\"nextval('<sequence>'::regclass)\").`, { meta: {\n\t\t...meta,\n\t\treason: \"set-default-autoincrement\"\n\t} });\n}\nasync function dropDefault(schemaName, tableName, columnName, lowerer) {\n\tconst { present } = await columnExistsSteps(lowerer, {\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tcolumn: columnName\n\t});\n\tconst dropDefaultExec = await lowerer.lowerToExecuteRequest(alterTable({\n\t\t...ifDefined(\"schema\", boundSchema(schemaName)),\n\t\ttable: tableName,\n\t\tactions: [dropDefaultAction(columnName)]\n\t}));\n\tconst noDefault = await lowerer.lowerToExecuteRequest(columnDefaultAst({\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tcolumn: columnName\n\t}).defaultAbsent());\n\treturn {\n\t\tid: `dropDefault.${tableName}.${columnName}`,\n\t\tlabel: `Drop default on \"${tableName}\".\"${columnName}\"`,\n\t\toperationClass: \"destructive\",\n\t\ttarget: targetDetails(\"column\", columnName, schemaName, tableName),\n\t\tprecheck: [step(`ensure column \"${columnName}\" exists`, present.sql, present.params)],\n\t\texecute: [step(`drop default on \"${columnName}\"`, dropDefaultExec.sql)],\n\t\tpostcheck: [step(`verify column \"${columnName}\" has no default`, noDefault.sql, noDefault.params)]\n\t};\n}\n/**\n* Builds the op for adding a NOT NULL column (no contract default) to a\n* non-empty table. Prechecks assert the column is absent and the table is\n* empty; the execute step lowers the typed `AddColumn` DDL node through the\n* adapter; postchecks assert the column exists and is NOT NULL.\n*/\nasync function addNotNullColumnDirect(schemaName, tableName, column, lowerer) {\n\tconst columnName = column.name;\n\tconst addColumn = await lowerer.lowerToExecuteRequest(alterTable({\n\t\t...ifDefined(\"schema\", boundSchema(schemaName)),\n\t\ttable: tableName,\n\t\tactions: [addColumnAction(column)]\n\t}));\n\tconst absent = await lowerer.lowerToExecuteRequest(columnExistsAst({\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tcolumn: columnName\n\t}).columnAbsent());\n\tconst tableEmpty = await lowerer.lowerToExecuteRequest(tableIsEmptyAst(schemaName, tableName));\n\tconst present = await lowerer.lowerToExecuteRequest(columnExistsAst({\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tcolumn: columnName\n\t}).columnPresent());\n\tconst notNullable = await lowerer.lowerToExecuteRequest(columnNullabilityAst({\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tcolumn: columnName,\n\t\tnullable: false\n\t}));\n\treturn {\n\t\tid: `column.${tableName}.${columnName}`,\n\t\tlabel: `Add column ${columnName} to ${tableName}`,\n\t\tsummary: `Adds column ${columnName} to table ${tableName}`,\n\t\toperationClass: \"additive\",\n\t\ttarget: targetDetails(\"column\", columnName, schemaName, tableName),\n\t\tprecheck: [step(`ensure column \"${columnName}\" is missing`, absent.sql, absent.params), step(`ensure table \"${tableName}\" is empty before adding NOT NULL column without default`, tableEmpty.sql, tableEmpty.params)],\n\t\texecute: [step(`add column \"${columnName}\"`, addColumn.sql)],\n\t\tpostcheck: [step(`verify column \"${columnName}\" exists`, present.sql, present.params), step(`verify column \"${columnName}\" is NOT NULL`, notNullable.sql, notNullable.params)]\n\t};\n}\n//#endregion\n//#region src/core/migrations/operations/constraints.ts\nasync function constraintCheckSteps(lowerer, options) {\n\tconst checks = constraintExistsAst(options);\n\treturn {\n\t\tabsent: await lowerer.lowerToExecuteRequest(checks.constraintAbsent()),\n\t\tpresent: await lowerer.lowerToExecuteRequest(checks.constraintPresent())\n\t};\n}\nfunction renderForeignKeySql(schemaName, tableName, fk) {\n\tlet sql = `ALTER TABLE ${qualifyTableName(schemaName, tableName)}\nADD CONSTRAINT ${quoteIdentifier(fk.name)}\nFOREIGN KEY (${fk.columns.map(quoteIdentifier).join(\", \")})\nREFERENCES ${qualifyTableName(fk.references.schema, fk.references.table)} (${fk.references.columns.map(quoteIdentifier).join(\", \")})`;\n\tif (fk.onDelete !== void 0) {\n\t\tconst action = REFERENTIAL_ACTION_SQL[fk.onDelete];\n\t\tif (!action) throw new InternalError(`Unknown referential action for onDelete: ${String(fk.onDelete)}`);\n\t\tsql += `\\nON DELETE ${action}`;\n\t}\n\tif (fk.onUpdate !== void 0) {\n\t\tconst action = REFERENTIAL_ACTION_SQL[fk.onUpdate];\n\t\tif (!action) throw new InternalError(`Unknown referential action for onUpdate: ${String(fk.onUpdate)}`);\n\t\tsql += `\\nON UPDATE ${action}`;\n\t}\n\treturn sql;\n}\nasync function addPrimaryKey(schemaName, tableName, constraintName, columns, lowerer) {\n\tconst qualified = qualifyTableName(schemaName, tableName);\n\tconst columnList = columns.map(quoteIdentifier).join(\", \");\n\tconst { absent, present } = await constraintCheckSteps(lowerer, {\n\t\tconstraintName,\n\t\tschema: schemaName,\n\t\ttable: tableName\n\t});\n\treturn {\n\t\tid: `primaryKey.${tableName}.${constraintName}`,\n\t\tlabel: `Add primary key on \"${tableName}\"`,\n\t\toperationClass: \"additive\",\n\t\ttarget: targetDetails(\"primaryKey\", constraintName, schemaName, tableName),\n\t\tprecheck: [step(`ensure primary key \"${constraintName}\" does not exist`, absent.sql, absent.params)],\n\t\texecute: [step(`add primary key \"${constraintName}\"`, `ALTER TABLE ${qualified} ADD CONSTRAINT ${quoteIdentifier(constraintName)} PRIMARY KEY (${columnList})`)],\n\t\tpostcheck: [step(`verify primary key \"${constraintName}\" exists`, present.sql, present.params)]\n\t};\n}\nasync function addUnique(schemaName, tableName, constraintName, columns, lowerer) {\n\tconst qualified = qualifyTableName(schemaName, tableName);\n\tconst columnList = columns.map(quoteIdentifier).join(\", \");\n\tconst { absent, present } = await constraintCheckSteps(lowerer, {\n\t\tconstraintName,\n\t\tschema: schemaName,\n\t\ttable: tableName\n\t});\n\treturn {\n\t\tid: `unique.${tableName}.${constraintName}`,\n\t\tlabel: `Add unique constraint on \"${tableName}\" (${columns.join(\", \")})`,\n\t\toperationClass: \"additive\",\n\t\ttarget: targetDetails(\"unique\", constraintName, schemaName, tableName),\n\t\tprecheck: [step(`ensure constraint \"${constraintName}\" does not exist`, absent.sql, absent.params)],\n\t\texecute: [step(`add unique constraint \"${constraintName}\"`, `ALTER TABLE ${qualified} ADD CONSTRAINT ${quoteIdentifier(constraintName)} UNIQUE (${columnList})`)],\n\t\tpostcheck: [step(`verify constraint \"${constraintName}\" exists`, present.sql, present.params)]\n\t};\n}\nasync function addForeignKey(schemaName, tableName, fk, lowerer) {\n\tconst { absent, present } = await constraintCheckSteps(lowerer, {\n\t\tconstraintName: fk.name,\n\t\tschema: schemaName,\n\t\ttable: tableName\n\t});\n\treturn {\n\t\tid: `foreignKey.${tableName}.${fk.name}`,\n\t\tlabel: `Add foreign key \"${fk.name}\" on \"${tableName}\"`,\n\t\toperationClass: \"additive\",\n\t\ttarget: targetDetails(\"foreignKey\", fk.name, schemaName, tableName),\n\t\tprecheck: [step(`ensure FK \"${fk.name}\" does not exist`, absent.sql, absent.params)],\n\t\texecute: [step(`add FK \"${fk.name}\"`, renderForeignKeySql(schemaName, tableName, fk))],\n\t\tpostcheck: [step(`verify FK \"${fk.name}\" exists`, present.sql, present.params)]\n\t};\n}\nasync function addCheckConstraint(schemaName, tableName, constraintName, expression, lowerer) {\n\tconst qualified = qualifyTableName(schemaName, tableName);\n\tconst { absent, present } = await constraintCheckSteps(lowerer, {\n\t\tconstraintName,\n\t\tschema: schemaName,\n\t\ttable: tableName\n\t});\n\treturn {\n\t\tid: `checkConstraint.${tableName}.${constraintName}`,\n\t\tlabel: `Add check constraint \"${constraintName}\" on \"${tableName}\"`,\n\t\toperationClass: \"additive\",\n\t\ttarget: targetDetails(\"checkConstraint\", constraintName, schemaName, tableName),\n\t\tprecheck: [step(`ensure constraint \"${constraintName}\" does not exist`, absent.sql, absent.params)],\n\t\texecute: [step(`add check constraint \"${constraintName}\"`, `ALTER TABLE ${qualified} ADD CONSTRAINT ${quoteIdentifier(constraintName)} CHECK (${renderOpaqueSql(opaqueSql(expression))})`)],\n\t\tpostcheck: [step(`verify constraint \"${constraintName}\" exists`, present.sql, present.params)]\n\t};\n}\nconst CONSTRAINT_KIND_LABEL = {\n\tprimaryKey: \"primary key\",\n\tunique: \"unique constraint\",\n\tforeignKey: \"foreign key\",\n\tcheckConstraint: \"check constraint\"\n};\nfunction renameConstraintLabel(kind, fromName, toName, tableName) {\n\treturn `Rename ${CONSTRAINT_KIND_LABEL[kind]} \"${fromName}\" to \"${toName}\" on \"${tableName}\"`;\n}\nasync function renameConstraint(schemaName, tableName, kind, fromName, toName, lowerer) {\n\tconst qualified = qualifyTableName(schemaName, tableName);\n\tconst from = await constraintCheckSteps(lowerer, {\n\t\tconstraintName: fromName,\n\t\tschema: schemaName,\n\t\ttable: tableName\n\t});\n\tconst to = await constraintCheckSteps(lowerer, {\n\t\tconstraintName: toName,\n\t\tschema: schemaName,\n\t\ttable: tableName\n\t});\n\treturn {\n\t\tid: `${kind}.${schemaName}.${tableName}.${fromName}.rename`,\n\t\tlabel: renameConstraintLabel(kind, fromName, toName, tableName),\n\t\toperationClass: \"widening\",\n\t\ttarget: targetDetails(kind, toName, schemaName, tableName),\n\t\tprecheck: [step(`ensure constraint \"${fromName}\" exists`, from.present.sql, from.present.params), step(`ensure constraint \"${toName}\" does not exist`, to.absent.sql, to.absent.params)],\n\t\texecute: [step(`rename ${CONSTRAINT_KIND_LABEL[kind]} \"${fromName}\" to \"${toName}\"`, `ALTER TABLE ${qualified} RENAME CONSTRAINT ${quoteIdentifier(fromName)} TO ${quoteIdentifier(toName)}`)],\n\t\tpostcheck: [step(`verify constraint \"${toName}\" exists`, to.present.sql, to.present.params)]\n\t};\n}\nasync function dropCheckConstraint(schemaName, tableName, constraintName, lowerer) {\n\tconst qualified = qualifyTableName(schemaName, tableName);\n\tconst { absent, present } = await constraintCheckSteps(lowerer, {\n\t\tconstraintName,\n\t\tschema: schemaName,\n\t\ttable: tableName\n\t});\n\treturn {\n\t\tid: `dropCheckConstraint.${tableName}.${constraintName}`,\n\t\tlabel: `Drop check constraint \"${constraintName}\" on \"${tableName}\"`,\n\t\toperationClass: \"destructive\",\n\t\ttarget: targetDetails(\"checkConstraint\", constraintName, schemaName, tableName),\n\t\tprecheck: [step(`ensure constraint \"${constraintName}\" exists`, present.sql, present.params)],\n\t\texecute: [step(`drop check constraint \"${constraintName}\"`, `ALTER TABLE ${qualified} DROP CONSTRAINT ${quoteIdentifier(constraintName)}`)],\n\t\tpostcheck: [step(`verify constraint \"${constraintName}\" does not exist`, absent.sql, absent.params)]\n\t};\n}\n/**\n* `kind` feeds the operation's `target.details.objectType`. Descriptor-flow\n* does not carry kind information in its drop-constraint descriptor, so the\n* default is `'unique'`. The reconciliation planner passes the correct kind\n* (`'foreignKey'`, `'primaryKey'`, or `'unique'`) based on the diff issue\n* that produced the drop.\n*/\nasync function dropConstraint(schemaName, tableName, constraintName, lowerer, kind = \"unique\") {\n\tconst qualified = qualifyTableName(schemaName, tableName);\n\tconst { absent, present } = await constraintCheckSteps(lowerer, {\n\t\tconstraintName,\n\t\tschema: schemaName,\n\t\ttable: tableName\n\t});\n\treturn {\n\t\tid: `dropConstraint.${tableName}.${constraintName}`,\n\t\tlabel: `Drop constraint \"${constraintName}\" on \"${tableName}\"`,\n\t\toperationClass: \"destructive\",\n\t\ttarget: targetDetails(kind, constraintName, schemaName, tableName),\n\t\tprecheck: [step(`ensure constraint \"${constraintName}\" exists`, present.sql, present.params)],\n\t\texecute: [step(`drop constraint \"${constraintName}\"`, `ALTER TABLE ${qualified} DROP CONSTRAINT ${quoteIdentifier(constraintName)}`)],\n\t\tpostcheck: [step(`verify constraint \"${constraintName}\" does not exist`, absent.sql, absent.params)]\n\t};\n}\n//#endregion\n//#region src/core/migrations/operations/dependencies.ts\nfunction createExtension(extensionName) {\n\treturn {\n\t\tid: `extension.${extensionName}`,\n\t\tlabel: `Create extension \"${extensionName}\"`,\n\t\toperationClass: \"additive\",\n\t\ttarget: { id: \"postgres\" },\n\t\tprecheck: [],\n\t\texecute: [step(`Create extension \"${extensionName}\"`, `CREATE EXTENSION IF NOT EXISTS ${quoteIdentifier(extensionName)}`)],\n\t\tpostcheck: []\n\t};\n}\n/**\n* Install a Postgres extension as the baseline op for an extension-pack\n* contract space. Layered on top of {@link createExtension}: stamps an\n* `invariantId` (required so the per-space marker records the install),\n* scopes the op `id` under a caller-chosen namespace (e.g. `pgvector.`),\n* and emits pre- and postcheck SQL probing `pg_extension`. The richer\n* shape lets the runner's idempotency probe skip the install on re-run\n* (postcheck-pre-satisfied) without firing the precheck.\n*\n* Use this for hand-rolled baseline migrations in contract-space\n* extension packages (e.g. `extension-pgvector`, `extension-paradedb`);\n* use the bare {@link createExtension} for planner-emitted ops where the\n* caller already controls idempotency through the surrounding plan.\n*/\nasync function installExtension(options, lowerer) {\n\tconst { extensionName, invariantId, id } = options;\n\tconst label = options.label ?? `Enable extension \"${extensionName}\"`;\n\tconst checks = extensionExistsAst(extensionName);\n\tconst absent = await lowerer.lowerToExecuteRequest(checks.extensionAbsent());\n\tconst present = await lowerer.lowerToExecuteRequest(checks.extensionPresent());\n\treturn {\n\t\tid,\n\t\tlabel,\n\t\toperationClass: \"additive\",\n\t\tinvariantId,\n\t\ttarget: {\n\t\t\tid: \"postgres\",\n\t\t\tdetails: {\n\t\t\t\tschema: DEFAULT_NAMESPACE_ID,\n\t\t\t\tobjectType: \"dependency\",\n\t\t\t\tname: extensionName\n\t\t\t}\n\t\t},\n\t\tprecheck: [step(`verify extension \"${extensionName}\" is not already enabled`, absent.sql, absent.params)],\n\t\texecute: [step(`create extension \"${extensionName}\"`, `CREATE EXTENSION IF NOT EXISTS ${extensionName}`)],\n\t\tpostcheck: [step(`confirm extension \"${extensionName}\" is enabled`, present.sql, present.params)]\n\t};\n}\n//#endregion\n//#region src/core/migrations/operations/indexes.ts\nasync function indexExistsSteps(lowerer, schemaName, indexName) {\n\tconst checks = indexExistsAst(schemaName, indexName);\n\treturn {\n\t\tpresent: await lowerer.lowerToExecuteRequest(checks.indexPresent()),\n\t\tabsent: await lowerer.lowerToExecuteRequest(checks.indexAbsent())\n\t};\n}\n/** An unbound-namespace object renders unqualified: the DDL node takes no schema. */\nfunction ddlSchemaOf(schemaName) {\n\treturn schemaName === UNBOUND_NAMESPACE_ID ? void 0 : schemaName;\n}\nasync function createIndex(schemaName, tableName, indexName, elements, lowerer, extras) {\n\tconst ddlNode = createIndex$1({\n\t\tschema: ddlSchemaOf(schemaName),\n\t\ttable: tableName,\n\t\tname: indexName,\n\t\tunique: extras?.unique === true,\n\t\telements,\n\t\ttype: extras?.type,\n\t\toptions: extras?.options,\n\t\twhere: extras?.where\n\t});\n\tconst execute = await lowerer.lowerToExecuteRequest(ddlNode);\n\tconst { present, absent } = await indexExistsSteps(lowerer, schemaName, indexName);\n\treturn {\n\t\tid: `index.${tableName}.${indexName}`,\n\t\tlabel: `Create index \"${indexName}\" on \"${tableName}\"`,\n\t\toperationClass: \"additive\",\n\t\ttarget: targetDetails(\"index\", indexName, schemaName, tableName),\n\t\tprecheck: [step(`ensure index \"${indexName}\" does not exist`, absent.sql, absent.params)],\n\t\texecute: [step(`create index \"${indexName}\"`, execute.sql, execute.params)],\n\t\tpostcheck: [step(`verify index \"${indexName}\" exists`, present.sql, present.params)]\n\t};\n}\n/**\n* `ALTER INDEX … RENAME TO`. `widening` for the same typology reason as the\n* RLS policy rename: a rename is neither additive creation nor destructive,\n* and the class vocabulary has no neutral middle class — it is NOT that a\n* rename widens anything.\n*/\nasync function renameIndex(schemaName, tableName, fromName, toName, lowerer) {\n\tconst fromChecks = indexExistsAst(schemaName, fromName);\n\tconst toChecks = indexExistsAst(schemaName, toName);\n\tconst fromPresent = await lowerer.lowerToExecuteRequest(fromChecks.indexPresent());\n\tconst toAbsent = await lowerer.lowerToExecuteRequest(toChecks.indexAbsent());\n\tconst toPresent = await lowerer.lowerToExecuteRequest(toChecks.indexPresent());\n\tconst ddlNode = alterIndexRename({\n\t\tschema: ddlSchemaOf(schemaName),\n\t\tfrom: fromName,\n\t\tto: toName\n\t});\n\tconst execute = await lowerer.lowerToExecuteRequest(ddlNode);\n\treturn {\n\t\tid: `index.${schemaName}.${tableName}.${fromName}.rename`,\n\t\tlabel: `Rename index \"${fromName}\" to \"${toName}\" on \"${tableName}\"`,\n\t\toperationClass: \"widening\",\n\t\ttarget: targetDetails(\"index\", toName, schemaName, tableName),\n\t\tprecheck: [step(`ensure index \"${fromName}\" exists`, fromPresent.sql, fromPresent.params), step(`ensure index \"${toName}\" does not exist`, toAbsent.sql, toAbsent.params)],\n\t\texecute: [step(`rename index \"${fromName}\" to \"${toName}\"`, execute.sql, execute.params)],\n\t\tpostcheck: [step(`verify index \"${toName}\" exists`, toPresent.sql, toPresent.params)]\n\t};\n}\nasync function dropIndex(schemaName, tableName, indexName, lowerer) {\n\tconst ddlNode = dropIndex$1({\n\t\tschema: ddlSchemaOf(schemaName),\n\t\tname: indexName\n\t});\n\tconst execute = await lowerer.lowerToExecuteRequest(ddlNode);\n\tconst { present, absent } = await indexExistsSteps(lowerer, schemaName, indexName);\n\treturn {\n\t\tid: `dropIndex.${tableName}.${indexName}`,\n\t\tlabel: `Drop index \"${indexName}\"`,\n\t\toperationClass: \"destructive\",\n\t\ttarget: targetDetails(\"index\", indexName, schemaName, tableName),\n\t\tprecheck: [step(`ensure index \"${indexName}\" exists`, present.sql, present.params)],\n\t\texecute: [step(`drop index \"${indexName}\"`, execute.sql, execute.params)],\n\t\tpostcheck: [step(`verify index \"${indexName}\" does not exist`, absent.sql, absent.params)]\n\t};\n}\n//#endregion\n//#region src/core/migrations/operations/native-enum-types.ts\n/**\n* `CREATE TYPE <qualified> AS ENUM (…)` for a managed native enum, built as a\n* typed DDL node and lowered by the control adapter (the type name is quoted,\n* member values render as escaped string literals in declaration order —\n* Postgres enum sort order is semantic). `boundSchema` maps the unbound sentinel\n* to an absent schema so the type name renders unqualified and the connection's\n* `search_path` resolves the schema at runtime.\n*/\nasync function createNativeEnumType(schemaName, typeName, members, lowerer) {\n\tfor (const member of members) validateEnumValueLength(member, typeName);\n\tconst ddlNode = createType({\n\t\t...ifDefined(\"schema\", boundSchema(schemaName)),\n\t\tname: typeName,\n\t\tvalues: members\n\t});\n\tconst statement = await lowerer.lowerToExecuteRequest(ddlNode);\n\treturn {\n\t\tid: `createNativeEnumType.${typeName}`,\n\t\tlabel: `Create enum type \"${typeName}\"`,\n\t\toperationClass: \"additive\",\n\t\ttarget: targetDetails(\"type\", typeName, schemaName),\n\t\tprecheck: [],\n\t\texecute: [step(`create enum type \"${typeName}\"`, statement.sql, statement.params)],\n\t\tpostcheck: []\n\t};\n}\n/** `DROP TYPE <qualified>` for an unclaimed managed native enum, via typed DDL. */\nasync function dropNativeEnumType(schemaName, typeName, lowerer) {\n\tconst ddlNode = dropType({\n\t\t...ifDefined(\"schema\", boundSchema(schemaName)),\n\t\tname: typeName\n\t});\n\tconst statement = await lowerer.lowerToExecuteRequest(ddlNode);\n\treturn {\n\t\tid: `dropNativeEnumType.${typeName}`,\n\t\tlabel: `Drop enum type \"${typeName}\"`,\n\t\toperationClass: \"destructive\",\n\t\ttarget: targetDetails(\"type\", typeName, schemaName),\n\t\tprecheck: [],\n\t\texecute: [step(`drop enum type \"${typeName}\"`, statement.sql, statement.params)],\n\t\tpostcheck: []\n\t};\n}\n//#endregion\n//#region src/core/migrations/operations/rls.ts\nconst PLAIN_IDENTIFIER = /^[A-Za-z_][A-Za-z0-9_$]*$/;\nfunction validateRoleName(role) {\n\tif (!PLAIN_IDENTIFIER.test(role)) throw postgresError(\"CONTRACT.ROLE_INVALID\", `Invalid role name ${JSON.stringify(role)}: role names must be plain SQL identifiers matching ^[A-Za-z_][A-Za-z0-9_$]*$`, { meta: {\n\t\trole,\n\t\treason: \"not-a-plain-identifier\"\n\t} });\n\treturn role;\n}\nasync function createRlsPolicy(schemaName, tableName, policy, lowerer) {\n\tconst validatedRoles = policy.roles.map(validateRoleName);\n\tconst ddlNode = createPolicy({\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tname: policy.name,\n\t\tpermissive: policy.permissive,\n\t\toperation: policy.operation,\n\t\troles: validatedRoles,\n\t\t...ifDefined(\"using\", policy.using),\n\t\t...ifDefined(\"withCheck\", policy.withCheck)\n\t});\n\tconst checks = rlsPolicyExistsAst({\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tpolicyName: policy.name\n\t});\n\tconst absent = await lowerer.lowerToExecuteRequest(checks.policyAbsent());\n\tconst execute = await lowerer.lowerToExecuteRequest(ddlNode);\n\tconst present = await lowerer.lowerToExecuteRequest(checks.policyPresent());\n\treturn {\n\t\tid: `rlsPolicy.${schemaName}.${tableName}.${policy.name}`,\n\t\tlabel: `Create RLS policy \"${policy.name}\" on \"${tableName}\"`,\n\t\toperationClass: \"additive\",\n\t\ttarget: targetDetails(\"rlsPolicy\", policy.name, schemaName, tableName),\n\t\tprecheck: [step(`ensure RLS policy \"${policy.name}\" does not exist`, absent.sql, absent.params)],\n\t\texecute: [step(`create RLS policy \"${policy.name}\"`, execute.sql, execute.params)],\n\t\tpostcheck: [step(`verify RLS policy \"${policy.name}\" exists`, present.sql, present.params)]\n\t};\n}\nasync function dropRlsPolicy(schemaName, tableName, policyName, lowerer) {\n\tconst ddlNode = dropPolicy({\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tname: policyName\n\t});\n\tconst checks = rlsPolicyExistsAst({\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tpolicyName\n\t});\n\tconst present = await lowerer.lowerToExecuteRequest(checks.policyPresent());\n\tconst execute = await lowerer.lowerToExecuteRequest(ddlNode);\n\tconst absent = await lowerer.lowerToExecuteRequest(checks.policyAbsent());\n\treturn {\n\t\tid: `rlsPolicy.${schemaName}.${tableName}.${policyName}.drop`,\n\t\tlabel: `Drop RLS policy \"${policyName}\" on \"${tableName}\"`,\n\t\toperationClass: \"destructive\",\n\t\ttarget: targetDetails(\"rlsPolicy\", policyName, schemaName, tableName),\n\t\tprecheck: [step(`ensure RLS policy \"${policyName}\" exists`, present.sql, present.params)],\n\t\texecute: [step(`drop RLS policy \"${policyName}\"`, execute.sql, execute.params)],\n\t\tpostcheck: [step(`verify RLS policy \"${policyName}\" is absent`, absent.sql, absent.params)]\n\t};\n}\nasync function enableRowLevelSecurity(schemaName, tableName, lowerer) {\n\tconst checks = rlsEnabledAst(schemaName, tableName);\n\tconst disabled = await lowerer.lowerToExecuteRequest(checks.rlsDisabled());\n\tconst enabled = await lowerer.lowerToExecuteRequest(checks.rlsEnabled());\n\treturn {\n\t\tid: `rowLevelSecurity.${schemaName}.${tableName}`,\n\t\tlabel: `Enable row-level security on \"${tableName}\"`,\n\t\toperationClass: \"additive\",\n\t\ttarget: targetDetails(\"rowLevelSecurity\", tableName, schemaName),\n\t\tprecheck: [step(`check RLS is not already enabled on \"${tableName}\"`, disabled.sql, disabled.params)],\n\t\texecute: [step(`enable row-level security on \"${tableName}\"`, `ALTER TABLE ${qualifyTableName(schemaName, tableName)} ENABLE ROW LEVEL SECURITY`)],\n\t\tpostcheck: [step(`verify row-level security is enabled on \"${tableName}\"`, enabled.sql, enabled.params)]\n\t};\n}\nasync function disableRowLevelSecurity(schemaName, tableName, lowerer) {\n\tconst ddlNode = disableRowLevelSecurity$1({\n\t\tschema: schemaName,\n\t\ttable: tableName\n\t});\n\tconst checks = rlsEnabledAst(schemaName, tableName);\n\tconst enabled = await lowerer.lowerToExecuteRequest(checks.rlsEnabled());\n\tconst execute = await lowerer.lowerToExecuteRequest(ddlNode);\n\tconst disabled = await lowerer.lowerToExecuteRequest(checks.rlsDisabled());\n\treturn {\n\t\tid: `rowLevelSecurity.${schemaName}.${tableName}.disable`,\n\t\tlabel: `Disable row-level security on \"${tableName}\"`,\n\t\toperationClass: \"destructive\",\n\t\ttarget: targetDetails(\"rowLevelSecurity\", tableName, schemaName),\n\t\tprecheck: [step(`check RLS is currently enabled on \"${tableName}\"`, enabled.sql, enabled.params)],\n\t\texecute: [step(`disable row-level security on \"${tableName}\"`, execute.sql, execute.params)],\n\t\tpostcheck: [step(`verify row-level security is disabled on \"${tableName}\"`, disabled.sql, disabled.params)]\n\t};\n}\nasync function renameRlsPolicy(schemaName, tableName, oldPolicyName, newPolicyName, lowerer) {\n\tconst ddlNode = alterPolicyRename({\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tname: oldPolicyName,\n\t\tnewName: newPolicyName\n\t});\n\tconst oldChecks = rlsPolicyExistsAst({\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tpolicyName: oldPolicyName\n\t});\n\tconst newChecks = rlsPolicyExistsAst({\n\t\tschema: schemaName,\n\t\ttable: tableName,\n\t\tpolicyName: newPolicyName\n\t});\n\tconst oldPresent = await lowerer.lowerToExecuteRequest(oldChecks.policyPresent());\n\tconst execute = await lowerer.lowerToExecuteRequest(ddlNode);\n\tconst newPresent = await lowerer.lowerToExecuteRequest(newChecks.policyPresent());\n\treturn {\n\t\tid: `rlsPolicy.${schemaName}.${tableName}.${oldPolicyName}.rename`,\n\t\tlabel: `Rename RLS policy \"${oldPolicyName}\" to \"${newPolicyName}\" on \"${tableName}\"`,\n\t\toperationClass: \"widening\",\n\t\ttarget: targetDetails(\"rlsPolicy\", newPolicyName, schemaName, tableName),\n\t\tprecheck: [step(`ensure RLS policy \"${oldPolicyName}\" exists`, oldPresent.sql, oldPresent.params)],\n\t\texecute: [step(`rename RLS policy \"${oldPolicyName}\" to \"${newPolicyName}\"`, execute.sql, execute.params)],\n\t\tpostcheck: [step(`verify RLS policy \"${newPolicyName}\" exists`, newPresent.sql, newPresent.params)]\n\t};\n}\n//#endregion\n//#region src/core/migrations/operations/tables.ts\nasync function dropTable(schemaName, tableName, lowerer) {\n\tconst qualified = qualifyTableName(schemaName, tableName);\n\tconst checks = tableExistsAst(schemaName, tableName);\n\tconst present = await lowerer.lowerToExecuteRequest(checks.tablePresent());\n\tconst absent = await lowerer.lowerToExecuteRequest(checks.tableAbsent());\n\treturn {\n\t\tid: `dropTable.${tableName}`,\n\t\tlabel: `Drop table \"${tableName}\"`,\n\t\toperationClass: \"destructive\",\n\t\ttarget: targetDetails(\"table\", tableName, schemaName),\n\t\tprecheck: [step(`ensure table \"${tableName}\" exists`, present.sql, present.params)],\n\t\texecute: [step(`drop table \"${tableName}\"`, `DROP TABLE ${qualified}`)],\n\t\tpostcheck: [step(`verify table \"${tableName}\" does not exist`, absent.sql, absent.params)]\n\t};\n}\nfunction renameTableStatement(schemaName, fromName, toName) {\n\treturn `ALTER TABLE ${qualifyTableName(schemaName, fromName)} RENAME TO ${quoteIdentifier(toName)}`;\n}\nasync function renameTable(schemaName, fromName, toName, lowerer) {\n\tconst fromChecks = tableExistsAst(schemaName, fromName);\n\tconst toChecks = tableExistsAst(schemaName, toName);\n\tconst fromPresent = await lowerer.lowerToExecuteRequest(fromChecks.tablePresent());\n\tconst toAbsent = await lowerer.lowerToExecuteRequest(toChecks.tableAbsent());\n\tconst toPresent = await lowerer.lowerToExecuteRequest(toChecks.tablePresent());\n\tconst fromAbsent = await lowerer.lowerToExecuteRequest(fromChecks.tableAbsent());\n\treturn {\n\t\tid: `renameTable.${fromName}`,\n\t\tlabel: `Rename table \"${fromName}\" to \"${toName}\"`,\n\t\toperationClass: \"widening\",\n\t\ttarget: targetDetails(\"table\", toName, schemaName),\n\t\tprecheck: [step(`ensure table \"${fromName}\" exists`, fromPresent.sql, fromPresent.params), step(`ensure table \"${toName}\" does not exist`, toAbsent.sql, toAbsent.params)],\n\t\texecute: [step(`rename table \"${fromName}\" to \"${toName}\"`, renameTableStatement(schemaName, fromName, toName))],\n\t\tpostcheck: [step(`verify table \"${toName}\" exists`, toPresent.sql, toPresent.params), step(`verify table \"${fromName}\" no longer exists`, fromAbsent.sql, fromAbsent.params)]\n\t};\n}\n//#endregion\n//#region src/core/migrations/planner-target-details.ts\nfunction buildTargetDetails(objectType, name, schema, table) {\n\treturn {\n\t\tschema,\n\t\tobjectType,\n\t\tname,\n\t\t...ifDefined(\"table\", table)\n\t};\n}\n//#endregion\n//#region src/core/migrations/planner-recipes.ts\nfunction buildAddColumnOperationIdentity(schema, tableName, columnName) {\n\treturn {\n\t\tid: `column.${tableName}.${columnName}`,\n\t\tlabel: `Add column ${columnName} to ${tableName}`,\n\t\tsummary: `Adds column ${columnName} to table ${tableName}`,\n\t\ttarget: {\n\t\t\tid: \"postgres\",\n\t\t\tdetails: buildTargetDetails(\"table\", tableName, schema)\n\t\t}\n\t};\n}\nasync function buildAddNotNullColumnWithTemporaryDefaultOperation(options) {\n\tconst { schema, tableName, columnName, column, types, storageTypes, temporaryDefault, lowerer } = options;\n\tconst ddlColumn = col(columnName, buildColumnTypeSql(column, types, storageTypes), {\n\t\tnotNull: true,\n\t\tdefault: new FunctionColumnDefault(opaqueSql(temporaryDefault))\n\t});\n\tconst addColumn = await lowerer.lowerToExecuteRequest(alterTable({\n\t\t...ifDefined(\"schema\", boundSchema(schema)),\n\t\ttable: tableName,\n\t\tactions: [addColumnAction(ddlColumn)]\n\t}));\n\tconst dropTempDefault = await lowerer.lowerToExecuteRequest(alterTable({\n\t\t...ifDefined(\"schema\", boundSchema(schema)),\n\t\ttable: tableName,\n\t\tactions: [dropDefaultAction(columnName)]\n\t}));\n\tconst absent = await lowerer.lowerToExecuteRequest(columnExistsAst({\n\t\tschema,\n\t\ttable: tableName,\n\t\tcolumn: columnName\n\t}).columnAbsent());\n\tconst present = await lowerer.lowerToExecuteRequest(columnExistsAst({\n\t\tschema,\n\t\ttable: tableName,\n\t\tcolumn: columnName\n\t}).columnPresent());\n\tconst notNullable = await lowerer.lowerToExecuteRequest(columnNullabilityAst({\n\t\tschema,\n\t\ttable: tableName,\n\t\tcolumn: columnName,\n\t\tnullable: false\n\t}));\n\tconst noDefault = await lowerer.lowerToExecuteRequest(columnDefaultAst({\n\t\tschema,\n\t\ttable: tableName,\n\t\tcolumn: columnName\n\t}).noDefault());\n\treturn {\n\t\t...buildAddColumnOperationIdentity(schema, tableName, columnName),\n\t\toperationClass: \"additive\",\n\t\tprecheck: [step(`ensure column \"${columnName}\" is missing`, absent.sql, absent.params)],\n\t\texecute: [{\n\t\t\tdescription: `add column \"${columnName}\"`,\n\t\t\tsql: addColumn.sql\n\t\t}, {\n\t\t\tdescription: `drop temporary default from column \"${columnName}\"`,\n\t\t\tsql: dropTempDefault.sql\n\t\t}],\n\t\tpostcheck: [\n\t\t\tstep(`verify column \"${columnName}\" exists`, present.sql, present.params),\n\t\t\tstep(`verify column \"${columnName}\" is NOT NULL`, notNullable.sql, notNullable.params),\n\t\t\tstep(`verify column \"${columnName}\" has no default after temporary default removal`, noDefault.sql, noDefault.params)\n\t\t]\n\t};\n}\n//#endregion\n//#region src/core/migrations/op-factory-call.ts\n/**\n* Postgres migration IR: one concrete `*Call` class per pure factory under\n* `operations/`, plus a shared `PostgresOpFactoryCallNode` abstract base.\n*\n* Every call class carries the literal arguments its backing factory would\n* receive, computes a human-readable `label` in its constructor, and\n* implements two polymorphic hooks:\n*\n* - `toOp()` — converts the IR node to a runtime\n* `SqlMigrationPlanOperation` by delegating to the matching pure factory\n* under `operations/`. `DataTransformCall.toOp()` always throws\n* `MIGRATION.UNFILLED_PLACEHOLDER` because a planner-generated data transform is an\n* unfilled authoring stub by construction.\n* - `renderTypeScript()` / `importRequirements()` — inherited from\n* `TsExpression`. Used by `renderCallsToTypeScript` to emit the call as\n* a TypeScript expression inside the scaffolded `migration.ts`.\n*\n* The abstract base and all concrete classes are package-private. External\n* consumers see only the framework-level `OpFactoryCall` interface and the\n* `PostgresOpFactoryCall` union.\n*/\nconst POSTGRES_MIGRATION_FACADE = \"@internal/postgres/migration\";\nvar PostgresOpFactoryCallNode = class extends TsExpression {\n\timportRequirements() {\n\t\treturn [{\n\t\t\tmoduleSpecifier: POSTGRES_MIGRATION_FACADE,\n\t\t\tsymbol: this.factoryName\n\t\t}];\n\t}\n\tfreeze() {\n\t\tObject.freeze(this);\n\t}\n};\nfunction postgresDefaultToDdlColumnDefault(columnDefault) {\n\tif (!columnDefault) return void 0;\n\tswitch (columnDefault.kind) {\n\t\tcase \"literal\": return new LiteralColumnDefault(columnDefault.value);\n\t\tcase \"function\":\n\t\t\tif (columnDefault.expression === \"autoincrement()\") return void 0;\n\t\t\treturn new FunctionColumnDefault(opaqueSql(columnDefault.expression));\n\t\tcase \"sequence\": return new FunctionColumnDefault(opaqueSql(`nextval('${escapeLiteral(quoteIdentifier(columnDefault.name))}'::regclass)`));\n\t\tdefault: {\n\t\t\tconst exhaustive = columnDefault;\n\t\t\treturn assertNever(exhaustive, `postgresDefaultToDdlColumnDefault: unhandled kind \"${blindCast(exhaustive).kind}\"`);\n\t\t}\n\t}\n}\nfunction renderDdlColumnDefault(def) {\n\tif (!def) return \"\";\n\tif (def.kind === \"literal\") return `lit(${jsonToTsSource(def.value)})`;\n\treturn `fn(${tsQuotedTextSource(def.expression.text)})`;\n}\nfunction renderDdlColumnAsTsCall(col) {\n\tconst opts = [];\n\tif (col.notNull) opts.push(\"notNull: true\");\n\tif (col.primaryKey) opts.push(\"primaryKey: true\");\n\tif (col.default) opts.push(`default: ${renderDdlColumnDefault(col.default)}`);\n\tif (col.codecRef) opts.push(`codecRef: ${jsonToTsSource(col.codecRef)}`);\n\tconst optsStr = opts.length > 0 ? `, { ${opts.join(\", \")} }` : \"\";\n\treturn `col(${jsonToTsSource(col.name)}, ${jsonToTsSource(col.type)}${optsStr})`;\n}\nfunction renderDdlConstraintAsTsCall(constraint) {\n\tswitch (constraint.kind) {\n\t\tcase \"primary-key\": {\n\t\t\tconst nameOpt = constraint.name ? `, { name: ${jsonToTsSource(constraint.name)} }` : \"\";\n\t\t\treturn `primaryKey(${jsonToTsSource(constraint.columns)}${nameOpt})`;\n\t\t}\n\t\tcase \"foreign-key\": {\n\t\t\tconst opts = [];\n\t\t\tif (constraint.name) opts.push(`name: ${jsonToTsSource(constraint.name)}`);\n\t\t\tif (constraint.onDelete) opts.push(`onDelete: ${jsonToTsSource(constraint.onDelete)}`);\n\t\t\tif (constraint.onUpdate) opts.push(`onUpdate: ${jsonToTsSource(constraint.onUpdate)}`);\n\t\t\tconst optsStr = opts.length > 0 ? `, { ${opts.join(\", \")} }` : \"\";\n\t\t\treturn `foreignKey(${jsonToTsSource(constraint.columns)}, ${jsonToTsSource(constraint.refTable)}, ${jsonToTsSource(constraint.refColumns)}${optsStr})`;\n\t\t}\n\t\tcase \"unique\": {\n\t\t\tconst nameOpt = constraint.name ? `, { name: ${jsonToTsSource(constraint.name)} }` : \"\";\n\t\t\treturn `unique(${jsonToTsSource(constraint.columns)}${nameOpt})`;\n\t\t}\n\t\tcase \"check-expression\": return `checkExpression(${jsonToTsSource(constraint.name)}, ${tsQuotedTextSource(constraint.expression.text)})`;\n\t}\n}\nfunction needsColOrConstraintImport(columns) {\n\treturn columns.length > 0;\n}\nfunction constraintImportSymbols(constraints) {\n\tif (!constraints || constraints.length === 0) return [];\n\tconst symbols = /* @__PURE__ */ new Set();\n\tfor (const c of constraints) if (c.kind === \"primary-key\") symbols.add(\"primaryKey\");\n\telse if (c.kind === \"foreign-key\") symbols.add(\"foreignKey\");\n\telse if (c.kind === \"unique\") symbols.add(\"unique\");\n\telse if (c.kind === \"check-expression\") symbols.add(\"checkExpression\");\n\treturn [...symbols];\n}\nfunction defaultImportSymbols(columns) {\n\tconst symbols = /* @__PURE__ */ new Set();\n\tfor (const col of columns) if (col.default?.kind === \"literal\") symbols.add(\"lit\");\n\telse if (col.default?.kind === \"function\") symbols.add(\"fn\");\n\treturn [...symbols];\n}\nvar CreateTableCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"createTable\";\n\toperationClass = \"additive\";\n\tschemaName;\n\ttableName;\n\tcolumns;\n\tconstraints;\n\tlabel;\n\tconstructor(schemaName, tableName, columns, constraints) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.columns = Object.freeze([...columns]);\n\t\tthis.constraints = constraints ? Object.freeze([...constraints]) : void 0;\n\t\tthis.label = `Create table \"${tableName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `CreateTableCall.toOp: a DDL lowerer is required on the Postgres planner path (table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"CreateTableCall\" } });\n\t\tconst ddlNode = createTable({\n\t\t\t...ifDefined(\"schema\", boundSchema(this.schemaName)),\n\t\t\ttable: this.tableName,\n\t\t\tcolumns: this.columns,\n\t\t\t...ifDefined(\"constraints\", this.constraints)\n\t\t});\n\t\tconst statement = await lowerer.lowerToExecuteRequest(ddlNode);\n\t\tconst schemaName = this.schemaName;\n\t\tconst tableName = this.tableName;\n\t\tconst checks = tableExistsAst(schemaName, tableName);\n\t\tconst absent = await lowerer.lowerToExecuteRequest(checks.tableAbsent());\n\t\tconst present = await lowerer.lowerToExecuteRequest(checks.tablePresent());\n\t\treturn {\n\t\t\tid: `table.${tableName}`,\n\t\t\tlabel: `Create table \"${tableName}\"`,\n\t\t\tsummary: `Creates table \"${tableName}\"`,\n\t\t\toperationClass: \"additive\",\n\t\t\ttarget: targetDetails(\"table\", tableName, schemaName),\n\t\t\tprecheck: [step(`ensure table \"${tableName}\" does not exist`, absent.sql, absent.params)],\n\t\t\texecute: [{\n\t\t\t\tdescription: `create table \"${tableName}\"`,\n\t\t\t\tsql: statement.sql,\n\t\t\t\tparams: statement.params ?? []\n\t\t\t}],\n\t\t\tpostcheck: [step(`verify table \"${tableName}\" exists`, present.sql, present.params)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\tconst columnsList = this.columns.map(renderDdlColumnAsTsCall).join(\", \");\n\t\tconst constraintsList = this.constraints ? this.constraints.map(renderDdlConstraintAsTsCall).join(\", \") : void 0;\n\t\tconst opts = [];\n\t\tif (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);\n\t\topts.push(`table: ${jsonToTsSource(this.tableName)}`);\n\t\topts.push(`columns: [${columnsList}]`);\n\t\tif (constraintsList) opts.push(`constraints: [${constraintsList}]`);\n\t\treturn `this.createTable({ ${opts.join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\tconst req = [];\n\t\tif (needsColOrConstraintImport(this.columns)) {\n\t\t\treq.push({\n\t\t\t\tmoduleSpecifier: POSTGRES_MIGRATION_FACADE,\n\t\t\t\tsymbol: \"col\"\n\t\t\t});\n\t\t\tfor (const sym of defaultImportSymbols(this.columns)) req.push({\n\t\t\t\tmoduleSpecifier: POSTGRES_MIGRATION_FACADE,\n\t\t\t\tsymbol: sym\n\t\t\t});\n\t\t}\n\t\tfor (const sym of constraintImportSymbols(this.constraints)) req.push({\n\t\t\tmoduleSpecifier: POSTGRES_MIGRATION_FACADE,\n\t\t\tsymbol: sym\n\t\t});\n\t\treturn req;\n\t}\n};\nvar DropTableCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"dropTable\";\n\toperationClass = \"destructive\";\n\tschemaName;\n\ttableName;\n\tlabel;\n\tconstructor(schemaName, tableName) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.label = `Drop table \"${tableName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `DropTableCall.toOp: a lowerer is required on the Postgres planner path (table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"DropTableCall\" } });\n\t\treturn dropTable(this.schemaName, this.tableName, lowerer);\n\t}\n\trenderTypeScript() {\n\t\tconst opts = [];\n\t\tif (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);\n\t\topts.push(`table: ${jsonToTsSource(this.tableName)}`);\n\t\treturn `this.dropTable({ ${opts.join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar RenameTableCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"renameTable\";\n\toperationClass = \"widening\";\n\tschemaName;\n\toldTableName;\n\t/** The new name: the table's contract-side identity after the rename. */\n\ttableName;\n\tlabel;\n\tconstructor(schemaName, oldTableName, tableName) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.oldTableName = oldTableName;\n\t\tthis.tableName = tableName;\n\t\tthis.label = `Rename table \"${oldTableName}\" to \"${tableName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `RenameTableCall.toOp: a lowerer is required on the Postgres planner path (table \"${this.oldTableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"RenameTableCall\" } });\n\t\treturn renameTable(this.schemaName, this.oldTableName, this.tableName, lowerer);\n\t}\n\trenderTypeScript() {\n\t\tconst opts = [];\n\t\tif (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);\n\t\topts.push(`table: ${jsonToTsSource(this.oldTableName)}`);\n\t\topts.push(`to: ${jsonToTsSource(this.tableName)}`);\n\t\treturn `...this.renameTable({ ${opts.join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar AddColumnCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"addColumn\";\n\toperationClass = \"additive\";\n\tschemaName;\n\ttableName;\n\tcolumn;\n\tlabel;\n\tconstructor(schemaName, tableName, column) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.column = column;\n\t\tthis.label = `Add column \"${column.name}\" to \"${tableName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `AddColumnCall.toOp: a DDL lowerer is required on the Postgres planner path (column \"${this.column.name}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"AddColumnCall\" } });\n\t\tconst ddlNode = alterTable({\n\t\t\t...ifDefined(\"schema\", boundSchema(this.schemaName)),\n\t\t\ttable: this.tableName,\n\t\t\tactions: [addColumnAction(this.column)]\n\t\t});\n\t\tconst statement = await lowerer.lowerToExecuteRequest(ddlNode);\n\t\tconst schemaName = this.schemaName;\n\t\tconst tableName = this.tableName;\n\t\tconst columnName = this.column.name;\n\t\tconst colChecks = columnExistsAst({\n\t\t\tschema: schemaName,\n\t\t\ttable: tableName,\n\t\t\tcolumn: columnName\n\t\t});\n\t\tconst absent = await lowerer.lowerToExecuteRequest(colChecks.columnAbsent());\n\t\tconst present = await lowerer.lowerToExecuteRequest(colChecks.columnPresent());\n\t\treturn {\n\t\t\tid: `column.${schemaName}.${tableName}.${columnName}`,\n\t\t\tlabel: `Add column \"${columnName}\" to \"${tableName}\"`,\n\t\t\toperationClass: \"additive\",\n\t\t\ttarget: targetDetails(\"column\", columnName, schemaName, tableName),\n\t\t\tprecheck: [step(`ensure column \"${columnName}\" is missing`, absent.sql, absent.params)],\n\t\t\texecute: [step(`add column \"${columnName}\"`, statement.sql)],\n\t\t\tpostcheck: [step(`verify column \"${columnName}\" exists`, present.sql, present.params)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\tconst opts = [];\n\t\tif (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);\n\t\topts.push(`table: ${jsonToTsSource(this.tableName)}`);\n\t\topts.push(`column: ${renderDdlColumnAsTsCall(this.column)}`);\n\t\treturn `this.addColumn({ ${opts.join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\tconst req = [{\n\t\t\tmoduleSpecifier: POSTGRES_MIGRATION_FACADE,\n\t\t\tsymbol: \"col\"\n\t\t}];\n\t\tfor (const sym of defaultImportSymbols([this.column])) req.push({\n\t\t\tmoduleSpecifier: POSTGRES_MIGRATION_FACADE,\n\t\t\tsymbol: sym\n\t\t});\n\t\treturn req;\n\t}\n};\nvar DropColumnCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"dropColumn\";\n\toperationClass = \"destructive\";\n\tschemaName;\n\ttableName;\n\tcolumnName;\n\tlabel;\n\tconstructor(schemaName, tableName, columnName) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.columnName = columnName;\n\t\tthis.label = `Drop column \"${columnName}\" from \"${tableName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `DropColumnCall.toOp: a lowerer is required on the Postgres planner path (column \"${this.columnName}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"DropColumnCall\" } });\n\t\treturn dropColumn(this.schemaName, this.tableName, this.columnName, lowerer);\n\t}\n\trenderTypeScript() {\n\t\tconst opts = [];\n\t\tif (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);\n\t\topts.push(`table: ${jsonToTsSource(this.tableName)}`);\n\t\topts.push(`column: ${jsonToTsSource(this.columnName)}`);\n\t\treturn `this.dropColumn({ ${opts.join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar AlterColumnTypeCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"alterColumnType\";\n\toperationClass = \"destructive\";\n\tschemaName;\n\ttableName;\n\tcolumnName;\n\toptions;\n\tlabel;\n\tconstructor(schemaName, tableName, columnName, options) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.columnName = columnName;\n\t\tthis.options = options;\n\t\tthis.label = `Alter type of \"${tableName}\".\"${columnName}\" to ${options.rawTargetTypeForLabel}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `AlterColumnTypeCall.toOp: a lowerer is required on the Postgres planner path (column \"${this.columnName}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"AlterColumnTypeCall\" } });\n\t\treturn alterColumnType(this.schemaName, this.tableName, this.columnName, this.options, lowerer);\n\t}\n\trenderTypeScript() {\n\t\tconst opts = [];\n\t\tif (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);\n\t\topts.push(`table: ${jsonToTsSource(this.tableName)}`);\n\t\topts.push(`column: ${jsonToTsSource(this.columnName)}`);\n\t\topts.push(`options: ${jsonToTsSource(this.options)}`);\n\t\treturn `this.alterColumnType({ ${opts.join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar SetNotNullCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"setNotNull\";\n\toperationClass = \"destructive\";\n\tschemaName;\n\ttableName;\n\tcolumnName;\n\tlabel;\n\tconstructor(schemaName, tableName, columnName) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.columnName = columnName;\n\t\tthis.label = `Set NOT NULL on \"${tableName}\".\"${columnName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `SetNotNullCall.toOp: a lowerer is required on the Postgres planner path (column \"${this.columnName}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"SetNotNullCall\" } });\n\t\treturn setNotNull(this.schemaName, this.tableName, this.columnName, lowerer);\n\t}\n\trenderTypeScript() {\n\t\tconst opts = [];\n\t\tif (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);\n\t\topts.push(`table: ${jsonToTsSource(this.tableName)}`);\n\t\topts.push(`column: ${jsonToTsSource(this.columnName)}`);\n\t\treturn `this.setNotNull({ ${opts.join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar DropNotNullCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"dropNotNull\";\n\toperationClass = \"widening\";\n\tschemaName;\n\ttableName;\n\tcolumnName;\n\tlabel;\n\tconstructor(schemaName, tableName, columnName) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.columnName = columnName;\n\t\tthis.label = `Drop NOT NULL on \"${tableName}\".\"${columnName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `DropNotNullCall.toOp: a lowerer is required on the Postgres planner path (column \"${this.columnName}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"DropNotNullCall\" } });\n\t\treturn dropNotNull(this.schemaName, this.tableName, this.columnName, lowerer);\n\t}\n\trenderTypeScript() {\n\t\tconst opts = [];\n\t\tif (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);\n\t\topts.push(`table: ${jsonToTsSource(this.tableName)}`);\n\t\topts.push(`column: ${jsonToTsSource(this.columnName)}`);\n\t\treturn `this.dropNotNull({ ${opts.join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar SetDefaultCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"setDefault\";\n\toperationClass;\n\tschemaName;\n\ttableName;\n\t/** The column with the default to set, its type and its codec; the adapter writes the clause. */\n\tcolumn;\n\tlabel;\n\tconstructor(schemaName, tableName, column, operationClass = \"additive\") {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.column = column;\n\t\tthis.operationClass = operationClass;\n\t\tthis.label = `Set default on \"${tableName}\".\"${column.name}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `SetDefaultCall.toOp: a lowerer is required on the Postgres planner path (column \"${this.column.name}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"SetDefaultCall\" } });\n\t\treturn setDefault(this.schemaName, this.tableName, this.column, lowerer, this.operationClass);\n\t}\n\trenderTypeScript() {\n\t\tconst opts = [];\n\t\tif (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);\n\t\topts.push(`table: ${jsonToTsSource(this.tableName)}`);\n\t\topts.push(`column: ${renderDdlColumnAsTsCall(this.column)}`);\n\t\tif (this.operationClass !== \"additive\") opts.push(`operationClass: ${jsonToTsSource(this.operationClass)}`);\n\t\treturn `this.setDefault({ ${opts.join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\treturn [{\n\t\t\tmoduleSpecifier: POSTGRES_MIGRATION_FACADE,\n\t\t\tsymbol: \"col\"\n\t\t}, ...defaultImportSymbols([this.column]).map((symbol) => ({\n\t\t\tmoduleSpecifier: POSTGRES_MIGRATION_FACADE,\n\t\t\tsymbol\n\t\t}))];\n\t}\n};\nvar DropDefaultCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"dropDefault\";\n\toperationClass = \"destructive\";\n\tschemaName;\n\ttableName;\n\tcolumnName;\n\tlabel;\n\tconstructor(schemaName, tableName, columnName) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.columnName = columnName;\n\t\tthis.label = `Drop default on \"${tableName}\".\"${columnName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `DropDefaultCall.toOp: a lowerer is required on the Postgres planner path (column \"${this.columnName}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"DropDefaultCall\" } });\n\t\treturn dropDefault(this.schemaName, this.tableName, this.columnName, lowerer);\n\t}\n\trenderTypeScript() {\n\t\tconst opts = [];\n\t\tif (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);\n\t\topts.push(`table: ${jsonToTsSource(this.tableName)}`);\n\t\topts.push(`column: ${jsonToTsSource(this.columnName)}`);\n\t\treturn `this.dropDefault({ ${opts.join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\n/**\n* Planner-internal call for adding a NOT NULL column (no contract default) to\n* a table that must be empty at migration time. Carries the typed `DdlColumn`\n* and lowers it to an ADD COLUMN execute step via the adapter at `toOp` time.\n*\n* No authored `PostgresMigration` method: this call is only emitted by the\n* planner, never hand-written by migration authors.\n*/\nvar AddNotNullColumnDirectCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"rawSql\";\n\toperationClass = \"additive\";\n\tschemaName;\n\ttableName;\n\tcolumnName;\n\tcolumn;\n\tlabel;\n\tconstructor(schemaName, tableName, columnName, column) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.columnName = columnName;\n\t\tthis.column = column;\n\t\tthis.label = `Add column ${columnName} to ${tableName}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `AddNotNullColumnDirectCall.toOp: a lowerer is required on the Postgres planner path (column \"${this.columnName}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"AddNotNullColumnDirectCall\" } });\n\t\treturn addNotNullColumnDirect(this.schemaName, this.tableName, this.column, lowerer);\n\t}\n\trenderTypeScript() {\n\t\treturn `rawSql(${jsonToTsSource({\n\t\t\tid: `column.${this.tableName}.${this.columnName}`,\n\t\t\tlabel: this.label,\n\t\t\toperationClass: \"additive\"\n\t\t})})`;\n\t}\n};\n/**\n* Planner-internal call for adding a NOT NULL column (no contract default)\n* using a temporary default value for non-empty tables. Carries all parameters\n* needed for `buildAddNotNullColumnWithTemporaryDefaultOperation`; both the\n* typed ADD COLUMN execute step and the pre/postchecks are lowered via the\n* adapter at `toOp` time.\n*\n* No authored `PostgresMigration` method: this call is only emitted by the\n* planner, never hand-written by migration authors.\n*/\nvar AddNotNullColumnWithTempDefaultCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"rawSql\";\n\toperationClass = \"additive\";\n\tschemaName;\n\ttableName;\n\tcolumnName;\n\tcolumn;\n\ttypes;\n\tstorageTypes;\n\ttemporaryDefault;\n\tlabel;\n\tconstructor(options) {\n\t\tsuper();\n\t\tthis.schemaName = options.schemaName;\n\t\tthis.tableName = options.tableName;\n\t\tthis.columnName = options.columnName;\n\t\tthis.column = options.column;\n\t\tthis.types = options.types;\n\t\tthis.storageTypes = options.storageTypes;\n\t\tthis.temporaryDefault = options.temporaryDefault;\n\t\tthis.label = `Add column ${options.columnName} to ${options.tableName}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `AddNotNullColumnWithTempDefaultCall.toOp: a lowerer is required on the Postgres planner path (column \"${this.columnName}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"AddNotNullColumnWithTempDefaultCall\" } });\n\t\treturn buildAddNotNullColumnWithTemporaryDefaultOperation({\n\t\t\tschema: this.schemaName,\n\t\t\ttableName: this.tableName,\n\t\t\tcolumnName: this.columnName,\n\t\t\tcolumn: this.column,\n\t\t\ttypes: this.types,\n\t\t\tstorageTypes: this.storageTypes,\n\t\t\ttemporaryDefault: this.temporaryDefault,\n\t\t\tlowerer\n\t\t});\n\t}\n\trenderTypeScript() {\n\t\treturn `rawSql(${jsonToTsSource({\n\t\t\tid: `column.${this.tableName}.${this.columnName}`,\n\t\t\tlabel: this.label,\n\t\t\toperationClass: \"additive\"\n\t\t})})`;\n\t}\n};\nfunction constraintCallOptions(schemaName, tableName, constraintName) {\n\tconst opts = [];\n\tif (schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(schemaName)}`);\n\topts.push(`table: ${jsonToTsSource(tableName)}`);\n\topts.push(`constraint: ${jsonToTsSource(constraintName)}`);\n\treturn opts.join(\", \");\n}\nvar AddPrimaryKeyCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"addPrimaryKey\";\n\toperationClass = \"additive\";\n\tschemaName;\n\ttableName;\n\tconstraintName;\n\tcolumns;\n\tlabel;\n\tconstructor(schemaName, tableName, constraintName, columns) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.constraintName = constraintName;\n\t\tthis.columns = columns;\n\t\tthis.label = `Add primary key on \"${tableName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `AddPrimaryKeyCall.toOp: a lowerer is required on the Postgres planner path (constraint \"${this.constraintName}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"AddPrimaryKeyCall\" } });\n\t\treturn addPrimaryKey(this.schemaName, this.tableName, this.constraintName, this.columns, lowerer);\n\t}\n\trenderTypeScript() {\n\t\treturn `this.addPrimaryKey({ ${constraintCallOptions(this.schemaName, this.tableName, this.constraintName)}, columns: ${jsonToTsSource(this.columns)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar AddUniqueCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"addUnique\";\n\toperationClass = \"additive\";\n\tschemaName;\n\ttableName;\n\tconstraintName;\n\tcolumns;\n\tlabel;\n\tconstructor(schemaName, tableName, constraintName, columns) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.constraintName = constraintName;\n\t\tthis.columns = columns;\n\t\tthis.label = `Add unique constraint on \"${tableName}\" (${columns.join(\", \")})`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `AddUniqueCall.toOp: a lowerer is required on the Postgres planner path (constraint \"${this.constraintName}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"AddUniqueCall\" } });\n\t\treturn addUnique(this.schemaName, this.tableName, this.constraintName, this.columns, lowerer);\n\t}\n\trenderTypeScript() {\n\t\treturn `this.addUnique({ ${constraintCallOptions(this.schemaName, this.tableName, this.constraintName)}, columns: ${jsonToTsSource(this.columns)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar AddForeignKeyCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"addForeignKey\";\n\toperationClass = \"additive\";\n\tschemaName;\n\ttableName;\n\tfk;\n\tlabel;\n\tconstructor(schemaName, tableName, fk) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.fk = fk;\n\t\tthis.label = `Add foreign key \"${fk.name}\" on \"${tableName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `AddForeignKeyCall.toOp: a lowerer is required on the Postgres planner path (constraint \"${this.fk.name}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"AddForeignKeyCall\" } });\n\t\treturn addForeignKey(this.schemaName, this.tableName, this.fk, lowerer);\n\t}\n\trenderTypeScript() {\n\t\tconst opts = [];\n\t\tif (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);\n\t\topts.push(`table: ${jsonToTsSource(this.tableName)}`);\n\t\topts.push(`foreignKey: ${jsonToTsSource(this.fk)}`);\n\t\treturn `this.addForeignKey({ ${opts.join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar DropConstraintCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"dropConstraint\";\n\toperationClass = \"destructive\";\n\tschemaName;\n\ttableName;\n\tconstraintName;\n\tkind;\n\tlabel;\n\tconstructor(schemaName, tableName, constraintName, kind = \"unique\") {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.constraintName = constraintName;\n\t\tthis.kind = kind;\n\t\tthis.label = `Drop constraint \"${constraintName}\" on \"${tableName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `DropConstraintCall.toOp: a lowerer is required on the Postgres planner path (constraint \"${this.constraintName}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"DropConstraintCall\" } });\n\t\treturn dropConstraint(this.schemaName, this.tableName, this.constraintName, lowerer, this.kind);\n\t}\n\trenderTypeScript() {\n\t\tconst opts = [constraintCallOptions(this.schemaName, this.tableName, this.constraintName)];\n\t\tif (this.kind !== \"unique\") opts.push(`kind: ${jsonToTsSource(this.kind)}`);\n\t\treturn `this.dropConstraint({ ${opts.join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar RenameConstraintCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"renameConstraint\";\n\toperationClass = \"widening\";\n\tschemaName;\n\ttableName;\n\tkind;\n\toldConstraintName;\n\tnewConstraintName;\n\tlabel;\n\tconstructor(schemaName, tableName, kind, oldConstraintName, newConstraintName) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.kind = kind;\n\t\tthis.oldConstraintName = oldConstraintName;\n\t\tthis.newConstraintName = newConstraintName;\n\t\tthis.label = renameConstraintLabel(kind, oldConstraintName, newConstraintName, tableName);\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `RenameConstraintCall.toOp: a lowerer is required on the Postgres planner path (constraint \"${this.oldConstraintName}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"RenameConstraintCall\" } });\n\t\treturn renameConstraint(this.schemaName, this.tableName, this.kind, this.oldConstraintName, this.newConstraintName, lowerer);\n\t}\n\trenderTypeScript() {\n\t\tconst opts = [];\n\t\tif (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);\n\t\topts.push(`table: ${jsonToTsSource(this.tableName)}`);\n\t\topts.push(`kind: ${jsonToTsSource(this.kind)}`);\n\t\topts.push(`from: ${jsonToTsSource(this.oldConstraintName)}`);\n\t\topts.push(`to: ${jsonToTsSource(this.newConstraintName)}`);\n\t\treturn `this.renameConstraint({ ${opts.join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar AddCheckConstraintCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"addCheckConstraint\";\n\toperationClass = \"additive\";\n\tschemaName;\n\ttableName;\n\tconstraintName;\n\t/** Opaque SQL: the predicate body, rendered verbatim inside `CHECK (…)`. */\n\texpression;\n\tlabel;\n\tconstructor(schemaName, tableName, constraintName, expression) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.constraintName = constraintName;\n\t\tthis.expression = expression;\n\t\tthis.label = `Add check constraint \"${constraintName}\" on \"${tableName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `AddCheckConstraintCall.toOp: a lowerer is required on the Postgres planner path (constraint \"${this.constraintName}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"AddCheckConstraintCall\" } });\n\t\treturn addCheckConstraint(this.schemaName, this.tableName, this.constraintName, this.expression, lowerer);\n\t}\n\trenderTypeScript() {\n\t\treturn `this.addCheckConstraint({ ${constraintCallOptions(this.schemaName, this.tableName, this.constraintName)}, expression: ${tsQuotedTextSource(this.expression)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar DropCheckConstraintCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"dropCheckConstraint\";\n\toperationClass = \"destructive\";\n\tschemaName;\n\ttableName;\n\tconstraintName;\n\tlabel;\n\tconstructor(schemaName, tableName, constraintName) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.constraintName = constraintName;\n\t\tthis.label = `Drop check constraint \"${constraintName}\" on \"${tableName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `DropCheckConstraintCall.toOp: a lowerer is required on the Postgres planner path (constraint \"${this.constraintName}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"DropCheckConstraintCall\" } });\n\t\treturn dropCheckConstraint(this.schemaName, this.tableName, this.constraintName, lowerer);\n\t}\n\trenderTypeScript() {\n\t\treturn `this.dropCheckConstraint({ ${constraintCallOptions(this.schemaName, this.tableName, this.constraintName)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar CreateIndexCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"createIndex\";\n\toperationClass = \"additive\";\n\tschemaName;\n\ttableName;\n\tindexName;\n\t/** Column tuple when the index is column-based; absent for expression indexes. */\n\tcolumns;\n\t/** Opaque whole element list when the index is expression-based. */\n\texpression;\n\tindexType;\n\toptions;\n\twhere;\n\tunique;\n\tlabel;\n\tconstructor(schemaName, tableName, indexName, elements, extras) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.indexName = indexName;\n\t\tthis.columns = \"columns\" in elements ? elements.columns : void 0;\n\t\tthis.expression = \"expression\" in elements ? elements.expression : void 0;\n\t\tthis.indexType = extras?.type;\n\t\tthis.options = extras?.options;\n\t\tthis.where = extras?.where;\n\t\tthis.unique = extras?.unique === true;\n\t\tthis.label = `Create index \"${indexName}\" on \"${tableName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `CreateIndexCall.toOp: a lowerer is required on the Postgres planner path (index \"${this.indexName}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"CreateIndexCall\" } });\n\t\tconst extras = {};\n\t\tif (this.indexType !== void 0) extras.type = this.indexType;\n\t\tif (this.options !== void 0) extras.options = this.options;\n\t\tif (this.where !== void 0) extras.where = this.where;\n\t\tif (this.unique) extras.unique = true;\n\t\treturn createIndex(this.schemaName, this.tableName, this.indexName, this.columns !== void 0 ? { columns: this.columns } : { expression: this.expression ?? \"\" }, lowerer, extras);\n\t}\n\trenderTypeScript() {\n\t\tconst opts = [];\n\t\tif (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);\n\t\topts.push(`table: ${jsonToTsSource(this.tableName)}`);\n\t\topts.push(`index: ${jsonToTsSource(this.indexName)}`);\n\t\tif (this.columns !== void 0) opts.push(`columns: ${jsonToTsSource(this.columns)}`);\n\t\telse opts.push(`expression: ${tsQuotedTextSource(this.expression ?? \"\")}`);\n\t\tif (this.indexType !== void 0 || this.options !== void 0 || this.where !== void 0 || this.unique) {\n\t\t\tconst extrasParts = [];\n\t\t\tif (this.indexType !== void 0) extrasParts.push(`type: ${jsonToTsSource(this.indexType)}`);\n\t\t\tif (this.options !== void 0) extrasParts.push(`options: ${jsonToTsSource(this.options)}`);\n\t\t\tif (this.where !== void 0) extrasParts.push(`where: ${tsQuotedTextSource(this.where)}`);\n\t\t\tif (this.unique) extrasParts.push(\"unique: true\");\n\t\t\topts.push(`extras: { ${extrasParts.join(\", \")} }`);\n\t\t}\n\t\treturn `this.createIndex({ ${opts.join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar RenameIndexCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"renameIndex\";\n\toperationClass = \"widening\";\n\tschemaName;\n\ttableName;\n\toldIndexName;\n\tnewIndexName;\n\tlabel;\n\tconstructor(schemaName, tableName, oldIndexName, newIndexName) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.oldIndexName = oldIndexName;\n\t\tthis.newIndexName = newIndexName;\n\t\tthis.label = `Rename index \"${oldIndexName}\" to \"${newIndexName}\" on \"${tableName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `RenameIndexCall.toOp: a lowerer is required on the Postgres planner path (index \"${this.oldIndexName}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"RenameIndexCall\" } });\n\t\treturn renameIndex(this.schemaName, this.tableName, this.oldIndexName, this.newIndexName, lowerer);\n\t}\n\trenderTypeScript() {\n\t\tconst opts = [];\n\t\tif (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);\n\t\topts.push(`table: ${jsonToTsSource(this.tableName)}`);\n\t\topts.push(`from: ${jsonToTsSource(this.oldIndexName)}`);\n\t\topts.push(`to: ${jsonToTsSource(this.newIndexName)}`);\n\t\treturn `this.renameIndex({ ${opts.join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar DropIndexCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"dropIndex\";\n\toperationClass = \"destructive\";\n\tschemaName;\n\ttableName;\n\tindexName;\n\tlabel;\n\tconstructor(schemaName, tableName, indexName) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.indexName = indexName;\n\t\tthis.label = `Drop index \"${indexName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `DropIndexCall.toOp: a lowerer is required on the Postgres planner path (index \"${this.indexName}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"DropIndexCall\" } });\n\t\treturn dropIndex(this.schemaName, this.tableName, this.indexName, lowerer);\n\t}\n\trenderTypeScript() {\n\t\tconst opts = [];\n\t\tif (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);\n\t\topts.push(`table: ${jsonToTsSource(this.tableName)}`);\n\t\topts.push(`index: ${jsonToTsSource(this.indexName)}`);\n\t\treturn `this.dropIndex({ ${opts.join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\n/**\n* Laundered pre-built operation.\n*\n* Wraps an already-materialized `SqlMigrationPlanOperation` — typically one\n* produced by a SQL-family method or a codec control hook — so the planner\n* can carry it alongside IR nodes without reverse-engineering it into a\n* structured call class. Doubles as the user-facing escape hatch for raw\n* migrations: authors can pass a full op shape to `rawSql({...})`.\n*\n* `toOp()` returns the stored op unchanged. `renderTypeScript()` emits\n* `rawSql({...})` with the op serialized as a JSON literal — round-tripping\n* requires every field on the op to be JSON-serializable (no closures).\n*/\nvar RawSqlCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"rawSql\";\n\toperationClass;\n\tlabel;\n\top;\n\tconstructor(op) {\n\t\tsuper();\n\t\tthis.op = op;\n\t\tthis.label = op.label;\n\t\tthis.operationClass = op.operationClass;\n\t\tthis.freeze();\n\t}\n\ttoOp() {\n\t\treturn this.op;\n\t}\n\trenderTypeScript() {\n\t\treturn `rawSql(${jsonToTsSource(this.op)})`;\n\t}\n};\nvar CreateExtensionCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"createExtension\";\n\toperationClass = \"additive\";\n\textensionName;\n\tlabel;\n\tconstructor(extensionName) {\n\t\tsuper();\n\t\tthis.extensionName = extensionName;\n\t\tthis.label = `Create extension \"${extensionName}\"`;\n\t\tthis.freeze();\n\t}\n\ttoOp() {\n\t\treturn createExtension(this.extensionName);\n\t}\n\trenderTypeScript() {\n\t\treturn `createExtension(${jsonToTsSource(this.extensionName)})`;\n\t}\n};\nvar CreateSchemaCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"createSchema\";\n\toperationClass = \"additive\";\n\tschemaName;\n\tlabel;\n\tconstructor(schemaName) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.label = `Create schema \"${schemaName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `CreateSchemaCall.toOp: a DDL lowerer is required on the Postgres planner path (schema \"${this.schemaName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"CreateSchemaCall\" } });\n\t\tconst ddlNode = createSchema({\n\t\t\tschema: this.schemaName,\n\t\t\tifNotExists: true\n\t\t});\n\t\tconst statement = await lowerer.lowerToExecuteRequest(ddlNode);\n\t\tconst schemaName = this.schemaName;\n\t\treturn {\n\t\t\tid: `schema.${schemaName}`,\n\t\t\tlabel: `Create schema \"${schemaName}\"`,\n\t\t\toperationClass: \"additive\",\n\t\t\ttarget: { id: \"postgres\" },\n\t\t\tprecheck: [],\n\t\t\texecute: [{\n\t\t\t\tdescription: `Create schema \"${schemaName}\"`,\n\t\t\t\tsql: statement.sql,\n\t\t\t\tparams: statement.params ?? []\n\t\t\t}],\n\t\t\tpostcheck: []\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.createSchema({ schema: ${jsonToTsSource(this.schemaName)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar CreateNativeEnumTypeCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"createNativeEnumType\";\n\toperationClass = \"additive\";\n\tschemaName;\n\ttypeName;\n\tmembers;\n\tlabel;\n\tconstructor(schemaName, typeName, members) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.typeName = typeName;\n\t\tthis.members = Object.freeze([...members]);\n\t\tthis.label = `Create enum type \"${typeName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `CreateNativeEnumTypeCall.toOp: a DDL lowerer is required on the Postgres planner path (type \"${this.typeName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"CreateNativeEnumTypeCall\" } });\n\t\treturn createNativeEnumType(this.schemaName, this.typeName, this.members, lowerer);\n\t}\n\trenderTypeScript() {\n\t\treturn `this.createNativeEnumType({ ${[\n\t\t\t`schema: ${jsonToTsSource(this.schemaName)}`,\n\t\t\t`typeName: ${jsonToTsSource(this.typeName)}`,\n\t\t\t`members: ${jsonToTsSource(this.members)}`\n\t\t].join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar DropNativeEnumTypeCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"dropNativeEnumType\";\n\toperationClass = \"destructive\";\n\tschemaName;\n\ttypeName;\n\tlabel;\n\tconstructor(schemaName, typeName) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.typeName = typeName;\n\t\tthis.label = `Drop enum type \"${typeName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `DropNativeEnumTypeCall.toOp: a DDL lowerer is required on the Postgres planner path (type \"${this.typeName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"DropNativeEnumTypeCall\" } });\n\t\treturn dropNativeEnumType(this.schemaName, this.typeName, lowerer);\n\t}\n\trenderTypeScript() {\n\t\treturn `this.dropNativeEnumType({ ${[`schema: ${jsonToTsSource(this.schemaName)}`, `typeName: ${jsonToTsSource(this.typeName)}`].join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\n/** Schema-qualified, quoted enum type name — unqualified when `schemaName` is the unbound sentinel, matching `boundSchema`'s DDL-node convention. */\nfunction qualifiedNativeEnumTypeName(schemaName, typeName) {\n\tconst bound = boundSchema(schemaName);\n\treturn quoteQualifiedName(bound === void 0 ? typeName : `${bound}.${typeName}`);\n}\nconst ADD_VALUE_TRANSACTION_CAVEAT = \"A newly added enum value cannot be used until the transaction that adds it commits, so a migration that both appends a value and uses it in the same step will fail at apply.\";\n/**\n* `ALTER TYPE <qualified> ADD VALUE '<value>'` for a suffix-appended member on\n* a managed native enum. Built directly as SQL text (qualified via\n* `quoteQualifiedName`, the value escaped via `escapeLiteral`) rather than a\n* typed DDL node — mirrors how `enableRowLevelSecurity` renders its execute\n* step, since no DDL-AST node exists for this statement. Prechecks/postchecks\n* are still typed catalog queries lowered through the control adapter.\n* `validateEnumValueLength` runs at construction, so an over-length value\n* fails before planning produces a call.\n*/\nvar AddNativeEnumValueCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"addNativeEnumValue\";\n\toperationClass = \"additive\";\n\tschemaName;\n\ttypeName;\n\tvalue;\n\tlabel;\n\tsummary;\n\tconstructor(schemaName, typeName, value) {\n\t\tsuper();\n\t\tvalidateEnumValueLength(value, typeName);\n\t\tthis.schemaName = schemaName;\n\t\tthis.typeName = typeName;\n\t\tthis.value = value;\n\t\tthis.label = `Add value \"${value}\" to enum type \"${typeName}\"`;\n\t\tthis.summary = `Adds value \"${value}\" to enum type \"${typeName}\". ${ADD_VALUE_TRANSACTION_CAVEAT}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `AddNativeEnumValueCall.toOp: a lowerer is required on the Postgres planner path (type \"${this.typeName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"AddNativeEnumValueCall\" } });\n\t\tconst { schemaName, typeName, value } = this;\n\t\tconst typeChecks = nativeEnumTypeExistsAst(schemaName, typeName);\n\t\tconst valueChecks = nativeEnumValueExistsAst({\n\t\t\tschema: schemaName,\n\t\t\ttypeName,\n\t\t\tvalue\n\t\t});\n\t\tconst typePresent = await lowerer.lowerToExecuteRequest(typeChecks.typePresent());\n\t\tconst valueAbsent = await lowerer.lowerToExecuteRequest(valueChecks.valueAbsent());\n\t\tconst valuePresent = await lowerer.lowerToExecuteRequest(valueChecks.valuePresent());\n\t\tconst qualifiedType = qualifiedNativeEnumTypeName(schemaName, typeName);\n\t\treturn {\n\t\t\tid: `addNativeEnumValue.${typeName}.${value}`,\n\t\t\tlabel: this.label,\n\t\t\tsummary: this.summary,\n\t\t\toperationClass: \"additive\",\n\t\t\ttarget: targetDetails(\"type\", typeName, schemaName),\n\t\t\tprecheck: [step(`ensure enum type \"${typeName}\" exists`, typePresent.sql, typePresent.params), step(`ensure value \"${value}\" is absent from enum type \"${typeName}\"`, valueAbsent.sql, valueAbsent.params)],\n\t\t\texecute: [step(`add value \"${value}\" to enum type \"${typeName}\"`, `ALTER TYPE ${qualifiedType} ADD VALUE '${escapeLiteral(value)}'`)],\n\t\t\tpostcheck: [step(`verify value \"${value}\" exists on enum type \"${typeName}\"`, valuePresent.sql, valuePresent.params)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.addNativeEnumValue({ ${[\n\t\t\t`schema: ${jsonToTsSource(this.schemaName)}`,\n\t\t\t`typeName: ${jsonToTsSource(this.typeName)}`,\n\t\t\t`value: ${jsonToTsSource(this.value)}`\n\t\t].join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\n/**\n* A planner-generated data-transform stub. `checkSlot` and `runSlot` name\n* the unfilled authoring slots that the rendered `migration.ts` will expose\n* to the user via `placeholder(\"…\")` calls. `toOp()` always throws\n* `MIGRATION.UNFILLED_PLACEHOLDER`: the planner cannot lower a stubbed transform to a runtime\n* op — the user must fill the rendered `migration.ts` and re-emit.\n*/\nvar DataTransformCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"dataTransform\";\n\toperationClass;\n\tlabel;\n\tcheckSlot;\n\trunSlot;\n\tconstructor(label, checkSlot, runSlot, operationClass = \"data\") {\n\t\tsuper();\n\t\tthis.label = label;\n\t\tthis.checkSlot = checkSlot;\n\t\tthis.runSlot = runSlot;\n\t\tthis.operationClass = operationClass;\n\t\tthis.freeze();\n\t}\n\ttoOp() {\n\t\tthrow errorUnfilledPlaceholder(this.label);\n\t}\n\trenderTypeScript() {\n\t\treturn [\n\t\t\t`this.dataTransform(endContract, ${jsonToTsSource(this.label)}, {`,\n\t\t\t` check: () => placeholder(${jsonToTsSource(this.checkSlot)}),`,\n\t\t\t` run: () => placeholder(${jsonToTsSource(this.runSlot)}),`,\n\t\t\t\"})\"\n\t\t].join(\"\\n\");\n\t}\n\timportRequirements() {\n\t\treturn [{\n\t\t\tmoduleSpecifier: POSTGRES_MIGRATION_FACADE,\n\t\t\tsymbol: \"placeholder\"\n\t\t}];\n\t}\n};\nvar CreatePostgresRlsPolicyCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"createRlsPolicy\";\n\toperationClass = \"additive\";\n\tschemaName;\n\ttableName;\n\tpolicy;\n\tlabel;\n\tconstructor(schemaName, tableName, policy) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.policy = policy;\n\t\tthis.label = `Create RLS policy \"${policy.name}\" on \"${tableName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `CreatePostgresRlsPolicyCall.toOp: a lowerer is required on the Postgres planner path (policy \"${this.policy.name}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"CreatePostgresRlsPolicyCall\" } });\n\t\treturn createRlsPolicy(this.schemaName, this.tableName, this.policy, lowerer);\n\t}\n\trenderTypeScript() {\n\t\tconst p = this.policy;\n\t\tconst input = {\n\t\t\tnaming: namingOf(p.name, p.prefix),\n\t\t\ttableName: p.tableName,\n\t\t\tnamespaceId: p.namespaceId,\n\t\t\toperation: p.operation,\n\t\t\troles: p.roles,\n\t\t\t...ifDefined(\"using\", p.using),\n\t\t\t...ifDefined(\"withCheck\", p.withCheck),\n\t\t\tpermissive: p.permissive\n\t\t};\n\t\tconst sources = {\n\t\t\tnaming: jsonToTsSource(input.naming),\n\t\t\ttableName: jsonToTsSource(input.tableName),\n\t\t\tnamespaceId: jsonToTsSource(input.namespaceId),\n\t\t\toperation: jsonToTsSource(input.operation),\n\t\t\troles: jsonToTsSource(input.roles),\n\t\t\tusing: input.using === void 0 ? void 0 : tsQuotedTextSource(input.using),\n\t\t\twithCheck: input.withCheck === void 0 ? void 0 : tsQuotedTextSource(input.withCheck),\n\t\t\tpermissive: jsonToTsSource(input.permissive)\n\t\t};\n\t\tconst policy = tsObjectSource(Object.entries(sources).flatMap(([key, source]) => source === void 0 ? [] : [[key, source]]));\n\t\treturn `this.createRlsPolicy({ schema: ${jsonToTsSource(this.schemaName)}, table: ${jsonToTsSource(this.tableName)}, policy: ${policy} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar DropPostgresRlsPolicyCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"dropRlsPolicy\";\n\toperationClass = \"destructive\";\n\tschemaName;\n\ttableName;\n\tpolicyName;\n\tlabel;\n\tconstructor(schemaName, tableName, policyName) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.policyName = policyName;\n\t\tthis.label = `Drop RLS policy \"${policyName}\" on \"${tableName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `DropPostgresRlsPolicyCall.toOp: a lowerer is required on the Postgres planner path (policy \"${this.policyName}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"DropPostgresRlsPolicyCall\" } });\n\t\treturn dropRlsPolicy(this.schemaName, this.tableName, this.policyName, lowerer);\n\t}\n\trenderTypeScript() {\n\t\treturn `this.dropRlsPolicy({ schema: ${jsonToTsSource(this.schemaName)}, table: ${jsonToTsSource(this.tableName)}, policy: ${jsonToTsSource(this.policyName)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar EnableRowLevelSecurityCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"enableRowLevelSecurity\";\n\toperationClass = \"additive\";\n\tschemaName;\n\ttableName;\n\tlabel;\n\tconstructor(schemaName, tableName) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.label = `Enable row-level security on \"${tableName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `EnableRowLevelSecurityCall.toOp: a lowerer is required on the Postgres planner path (table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"EnableRowLevelSecurityCall\" } });\n\t\treturn enableRowLevelSecurity(this.schemaName, this.tableName, lowerer);\n\t}\n\trenderTypeScript() {\n\t\treturn `this.enableRowLevelSecurity({ schema: ${jsonToTsSource(this.schemaName)}, table: ${jsonToTsSource(this.tableName)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar DisableRowLevelSecurityCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"disableRowLevelSecurity\";\n\toperationClass = \"destructive\";\n\tschemaName;\n\ttableName;\n\tlabel;\n\tconstructor(schemaName, tableName) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.label = `Disable row-level security on \"${tableName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `DisableRowLevelSecurityCall.toOp: a lowerer is required on the Postgres planner path (table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"DisableRowLevelSecurityCall\" } });\n\t\treturn disableRowLevelSecurity(this.schemaName, this.tableName, lowerer);\n\t}\n\trenderTypeScript() {\n\t\treturn `this.disableRowLevelSecurity({ schema: ${jsonToTsSource(this.schemaName)}, table: ${jsonToTsSource(this.tableName)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar RenamePostgresRlsPolicyCall = class extends PostgresOpFactoryCallNode {\n\tfactoryName = \"renameRlsPolicy\";\n\toperationClass = \"widening\";\n\tschemaName;\n\ttableName;\n\toldPolicyName;\n\tnewPolicyName;\n\tlabel;\n\tconstructor(schemaName, tableName, oldPolicyName, newPolicyName) {\n\t\tsuper();\n\t\tthis.schemaName = schemaName;\n\t\tthis.tableName = tableName;\n\t\tthis.oldPolicyName = oldPolicyName;\n\t\tthis.newPolicyName = newPolicyName;\n\t\tthis.label = `Rename RLS policy \"${oldPolicyName}\" to \"${newPolicyName}\" on \"${tableName}\"`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw postgresError(\"MIGRATION.POSTGRES_CONTROL_STACK_MISSING\", `RenamePostgresRlsPolicyCall.toOp: a lowerer is required on the Postgres planner path (policy \"${this.oldPolicyName}\" on table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`, { meta: { factory: \"RenamePostgresRlsPolicyCall\" } });\n\t\treturn renameRlsPolicy(this.schemaName, this.tableName, this.oldPolicyName, this.newPolicyName, lowerer);\n\t}\n\trenderTypeScript() {\n\t\treturn `this.renameRlsPolicy({ schema: ${jsonToTsSource(this.schemaName)}, table: ${jsonToTsSource(this.tableName)}, from: ${jsonToTsSource(this.oldPolicyName)}, to: ${jsonToTsSource(this.newPolicyName)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\n/** The name of the column a call acts on: its `columnName`, or the name of the column it carries. */\nfunction columnNameOfCall(call) {\n\tif (\"columnName\" in call) return call.columnName;\n\tif (\"column\" in call && call.column instanceof DdlColumn) return call.column.name;\n}\n//#endregion\nexport { RenameIndexCall as A, installExtension as B, DropNativeEnumTypeCall as C, EnableRowLevelSecurityCall as D, DropTableCall as E, columnNameOfCall as F, postgresDefaultToDdlColumnDefault as I, buildTargetDetails as L, RenameTableCall as M, SetDefaultCall as N, RawSqlCall as O, SetNotNullCall as P, renameTableStatement as R, DropIndexCall as S, DropPostgresRlsPolicyCall as T, DisableRowLevelSecurityCall as _, AddNotNullColumnDirectCall as a, DropConstraintCall as b, AddUniqueCall as c, CreateIndexCall as d, CreateNativeEnumTypeCall as f, DataTransformCall as g, CreateTableCall as h, AddNativeEnumValueCall as i, RenamePostgresRlsPolicyCall as j, RenameConstraintCall as k, AlterColumnTypeCall as l, CreateSchemaCall as m, AddColumnCall as n, AddNotNullColumnWithTempDefaultCall as o, CreatePostgresRlsPolicyCall as p, AddForeignKeyCall as r, AddPrimaryKeyCall as s, AddCheckConstraintCall as t, CreateExtensionCall as u, DropCheckConstraintCall as v, DropNotNullCall as w, DropDefaultCall as x, DropColumnCall as y, createExtension as z };\n\n//# sourceMappingURL=op-factory-call-B-4nf1jC.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAsBA,SAAS,YAAY,YAAY;CAChC,OAAO,eAAe,uBAAuB,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-B5wkfdZ_.mjs"],"sourcesContent":["import { t as DEFAULT_NAMESPACE_ID } from \"./namespace-ids-xtp_ZY86.mjs\";\nimport { _ as PostgresRlsPolicy, r as isPostgresSchema } from \"./postgres-schema-DXd0mebY.mjs\";\nimport { t as PostgresTableSchemaNode } from \"./postgres-table-schema-node-BBkitBQh.mjs\";\nimport { i as PostgresDatabaseSchemaNode, n as PostgresPolicySchemaNode, r as PostgresNamespaceSchemaNode } from \"./postgres-role-schema-node-B8Z5i5D-.mjs\";\nimport { t as resolveDdlSchemaForNamespaceStorage } from \"./resolve-ddl-schema-CadTChyu.mjs\";\nimport { t as buildPostgresPlanDiff } from \"./diff-database-schema-DRPIV4Ae.mjs\";\nimport { a as resolvePostgresNodeIssueCreationFactoryName, c as issueNode, d as postgresPlannerStrategies, h as postgresNodeStorageCoordinate, i as resolvePostgresNodeIssueControlPolicySubject, l as issueSchemaName, n as resolveNamespaceIdForDdlSchema, o as coalesceSubtreeIssues, r as resolvePostgresCallControlPolicySubject, s as conflictForDisallowedCall, t as renderPostgresSuppression, u as planIssues } from \"./control-policy-C16wMazs.mjs\";\nimport { C as DropNativeEnumTypeCall, E as DropTableCall, M as RenameTableCall, O as RawSqlCall, R as renameTableStatement, T as DropPostgresRlsPolicyCall, j as RenamePostgresRlsPolicyCall, l as AlterColumnTypeCall, p as CreatePostgresRlsPolicyCall, y as DropColumnCall } from \"./op-factory-call-B-4nf1jC.mjs\";\nimport { a as pairCheckRenames, n as emissionSchemaForNamespace, o as pairIndexRenames } from \"./postgres-migration-CmD95Eh_.mjs\";\nimport { t as TypeScriptRenderablePostgresMigration } from \"./planner-produced-postgres-migration-B3dM0fTf.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { issueOutcome } from \"@internal/framework-components/control\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { controlPolicyForCall, detectTableNameCaseChanges, extractCodecControlHooks, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventOperations, plannerFailure, sqlTypeLookupsOf } from \"@internal/family-sql/control\";\nimport { namingOf, parseWireName } from \"@internal/sql-schema-ir/naming\";\nimport { ifDefined } from \"@internal/utils/defined\";\n//#region src/core/migrations/verify-postgres-namespaces.ts\n/**\n* Resolves the live-database schema name for a given namespace\n* coordinate. Mirrors `resolveDdlSchemaForNamespace` in\n* `planner-strategies.ts` so the verifier's projection and the\n* planner's projection always agree — Postgres-aware namespaces (the\n* production path) dispatch to `ddlSchemaName(storage)`, and bare\n* object payloads (used by some tests) fall back to the coordinate\n* itself.\n*/\nfunction resolveDdlSchemaName(storage, namespaceId) {\n\tconst namespace = storage.namespaces[namespaceId];\n\tif (isPostgresSchema(namespace)) return namespace.ddlSchemaName(storage);\n\treturn namespaceId;\n}\n/**\n* Reads the introspected list of schema names from the database-root schema\n* node. `existingSchemas` is database-level, so it lives on the\n* `PostgresDatabaseSchemaNode` root — not on the per-schema namespace nodes.\n*\n* Defaults to the always-present `public` schema when the node is not the\n* database root — a fresh Postgres database always carries `public` (unless an\n* operator dropped it manually), so any verifier path that runs without an\n* enriched introspection still suppresses the redundant `CREATE SCHEMA\n* \"public\"`.\n*\n* Production introspection (`PostgresControlAdapter.introspect`) is the\n* authoritative source: it queries `pg_namespace` and sets `existingSchemas`\n* on the returned root. Tests that want to assert against a richer initial\n* state construct a `PostgresDatabaseSchemaNode` explicitly.\n*/\nfunction existingSchemasFromSchema(schema) {\n\tif (PostgresDatabaseSchemaNode.is(schema)) return schema.existingSchemas;\n\treturn [DEFAULT_NAMESPACE_ID];\n}\n/**\n* Emits a `postgres-namespace` `not-found` diff issue for every\n* contract-declared Postgres namespace whose live container does not yet\n* exist. The planner prepends these (node-typed, synthesized) to the\n* relational diff issues so a multi-schema plan emits `CREATE SCHEMA`\n* before the tables that need it — a planner-only concern (verify already\n* rejects via the `not-found` table issues a missing schema already\n* produces), so this is not part of the shared diff.\n*\n* A namespace's live container is the schema returned by its\n* polymorphic `ddlSchemaName(storage)` method — named schemas resolve\n* to their own id; the unbound singleton returns `UNBOUND_NAMESPACE_ID`\n* and is skipped explicitly (late-bound namespaces have no fixed DDL\n* schema). Issues are emitted only when the resolved name is a real,\n* creatable schema (not the unbound sentinel) and is missing from the\n* introspected list. `public` is suppressed implicitly because the\n* introspection (or its sensible default) always carries it.\n*\n* Each emitted issue's path is `['database', ddlName]` — an ancestor of\n* every table path under that schema, so it must never be run through\n* `coalesceSubtreeIssues` alongside the table diff (it would swallow the\n* table-level `not-found` issues that drive `CREATE TABLE`); the planner\n* adds these AFTER coalescing the relational issues, and they are not\n* subject to sibling-space ownership scoping (mirrors the retired\n* coordinate walk, which prepended namespace issues after that filter).\n*/\nfunction verifyPostgresNamespacePresence(input) {\n\tconst { contract, schema } = input;\n\tconst existing = new Set(existingSchemasFromSchema(schema));\n\tconst issues = [];\n\tconst namespaceIds = Object.keys(contract.storage.namespaces).sort();\n\tfor (const namespaceId of namespaceIds) {\n\t\tif (namespaceId === UNBOUND_NAMESPACE_ID) continue;\n\t\tconst ddlName = resolveDdlSchemaName(contract.storage, namespaceId);\n\t\tif (ddlName === UNBOUND_NAMESPACE_ID) continue;\n\t\tif (existing.has(ddlName)) continue;\n\t\tconst namespace = new PostgresNamespaceSchemaNode({\n\t\t\tschemaName: ddlName,\n\t\t\ttables: {}\n\t\t});\n\t\tissues.push({\n\t\t\tpath: [\"database\", ddlName],\n\t\t\texpected: namespace\n\t\t});\n\t}\n\treturn issues;\n}\n//#endregion\n//#region src/core/migrations/planner.ts\nfunction partitionPostgresCallsByControlPolicy(calls, contract) {\n\treturn partitionCallsByControlPolicy({\n\t\tcalls,\n\t\tcontract,\n\t\tresolveControlPolicySubject: (call) => resolvePostgresCallControlPolicySubject(call, contract),\n\t\tresolveFactoryName: (call) => call.factoryName\n\t});\n}\nfunction createPostgresMigrationPlanner(lowerer) {\n\treturn new PostgresMigrationPlanner(lowerer);\n}\n/**\n* Postgres migration planner — a thin wrapper over `planIssues`.\n*\n* `plan()` diffs the target contract against the live schema via the one\n* differ (`buildPostgresPlanDiff`, producing node-typed `SchemaDiffIssue[]`)\n* and delegates to `planIssues` with the unified `postgresPlannerStrategies`\n* list: NOT-NULL backfill, type-change, nullable-tightening, codec-hook\n* storage types, component-declared dependency installs, and\n* shared-temp-default / empty-table-guarded NOT-NULL add-column. The same\n* strategy list runs for `migration plan`, `db update`, and `db init`;\n* behavior diverges purely on `policy.allowedOperationClasses` (the\n* data-safe strategies short-circuit when `'data'` is excluded). The issue\n* planner applies operation-class policy gates and emits a single\n* `PostgresOpFactoryCall[]` that drives both the runtime-ops view (via\n* `renderOps`) and the `renderTypeScript()` authoring surface. RLS policy\n* drift (the structural half of the same one-differ tree) is handled\n* separately via `planPostgresSchemaDiff`.\n*/\nvar PostgresMigrationPlanner = class {\n\t#lowerer;\n\tconstructor(lowerer) {\n\t\tthis.#lowerer = lowerer;\n\t}\n\tplan(options) {\n\t\treturn this.planSql(blindCast(options));\n\t}\n\temptyMigration(context, spaceId) {\n\t\treturn new TypeScriptRenderablePostgresMigration([], {\n\t\t\tfrom: context.fromHash,\n\t\t\tto: context.toHash\n\t\t}, spaceId, context.snapshotsImportPath, this.#lowerer);\n\t}\n\tplanSql(options) {\n\t\tconst schemaName = options.schemaName ?? Object.keys(options.contract.storage.namespaces).find((id) => id !== UNBOUND_NAMESPACE_ID) ?? UNBOUND_NAMESPACE_ID;\n\t\tconst policyResult = this.ensureAdditivePolicy(options.policy);\n\t\tif (policyResult) return policyResult;\n\t\tPostgresDatabaseSchemaNode.assert(options.schema);\n\t\tconst { issues: rawIssues } = buildPostgresPlanDiff({\n\t\t\tcontract: options.contract,\n\t\t\tactualSchema: options.schema,\n\t\t\tframeworkComponents: options.frameworkComponents\n\t\t});\n\t\tconst policyDiffIssues = rawIssues.filter((issue) => isPolicyDiffIssue(issue));\n\t\tconst relationalDiffIssues = rawIssues.filter((issue) => !isPolicyDiffIssue(issue));\n\t\tconst strict = options.policy.allowedOperationClasses.includes(\"widening\") || options.policy.allowedOperationClasses.includes(\"destructive\");\n\t\tconst owned = retainUnownedExtras(coalesceSubtreeIssues(relationalDiffIssues), options.ownership, options.contract);\n\t\tconst gated = strict ? owned : owned.filter((issue) => issueOutcome(issue) !== \"not-expected\");\n\t\tconst schemaIssues = [...verifyPostgresNamespacePresence({\n\t\t\tcontract: options.contract,\n\t\t\tschema: options.schema\n\t\t}), ...gated];\n\t\tconst indexRenames = pairIndexRenames(options, schemaIssues);\n\t\tconst checkRenames = pairCheckRenames(options, schemaIssues);\n\t\tconst renameConsumed = /* @__PURE__ */ new Set([...indexRenames.consumed, ...checkRenames.consumed]);\n\t\tconst plannableIssues = renameConsumed.size === 0 ? schemaIssues : schemaIssues.filter((issue) => !renameConsumed.has(issue));\n\t\tconst codecHooks = extractCodecControlHooks(options.frameworkComponents);\n\t\tconst types = sqlTypeLookupsOf(options.frameworkComponents);\n\t\tconst storageTypes = options.contract.storage.types ?? {};\n\t\tconst relationalSchema = relationalNamespaceNode(options.schema, schemaName);\n\t\tconst issuePartition = partitionIssuesByControlPolicy({\n\t\t\tissues: plannableIssues,\n\t\t\tcontract: options.contract,\n\t\t\tresolveControlPolicySubject: (issue) => resolvePostgresNodeIssueControlPolicySubject(issue, options.contract),\n\t\t\tresolveCreationFactoryName: resolvePostgresNodeIssueCreationFactoryName\n\t\t});\n\t\tconst caseChangeConflicts = detectTableNameCaseChanges({\n\t\t\tissues: issuePartition.plannable,\n\t\t\ttableOf: (issue) => {\n\t\t\t\tconst node = issueNode(issue);\n\t\t\t\treturn node !== void 0 && PostgresTableSchemaNode.is(node) ? node : void 0;\n\t\t\t},\n\t\t\tnamespaceIdOf: (issue) => resolveNamespaceIdForDdlSchema(options.contract, issueSchemaName(issue) ?? schemaName),\n\t\t\trenameByHandStatements: (rename) => [renameTableStatement(emissionSchemaForNamespace(options.contract, rename.namespaceId), rename.from, rename.to)],\n\t\t\trenameTableCall: (rename) => new RenameTableCall(rename.namespaceId ?? UNBOUND_NAMESPACE_ID, rename.from, rename.to).renderTypeScript(),\n\t\t\tcontract: options.contract,\n\t\t\tdefaultNamespaceId: DEFAULT_NAMESPACE_ID\n\t\t});\n\t\tif (caseChangeConflicts.length > 0) return plannerFailure(caseChangeConflicts);\n\t\tconst result = planIssues({\n\t\t\tissues: issuePartition.plannable,\n\t\t\ttoContract: options.contract,\n\t\t\tfromContract: options.fromContract,\n\t\t\tschemaName,\n\t\t\tcodecHooks,\n\t\t\ttypes,\n\t\t\tstorageTypes,\n\t\t\t...ifDefined(\"schema\", relationalSchema),\n\t\t\tpolicy: options.policy,\n\t\t\tframeworkComponents: options.frameworkComponents,\n\t\t\tstrategies: postgresPlannerStrategies\n\t\t});\n\t\tconst schemaDiff = this.planPostgresSchemaDiff(options, policyDiffIssues);\n\t\tif (!result.ok || schemaDiff.conflicts.length > 0) return plannerFailure([...result.ok ? [] : result.failure, ...schemaDiff.conflicts]);\n\t\tconst indexRenamePartition = partitionPostgresCallsByControlPolicy([...indexRenames.calls, ...checkRenames.calls], options.contract);\n\t\tconst schemaDiffPartition = partitionPostgresCallsByControlPolicy(schemaDiff.calls, options.contract);\n\t\tconst fieldEventPartition = partitionPostgresCallsByControlPolicy(blindCast(planFieldEventOperations({\n\t\t\tpriorContract: options.fromContract,\n\t\t\tnewContract: options.contract,\n\t\t\tcodecHooks\n\t\t})), options.contract);\n\t\tconst ordered = movePolicyDropsBeforeBlockedDdl(result.value.calls, schemaDiffPartition.kept);\n\t\tconst calls = [\n\t\t\t...ordered.structural,\n\t\t\t...indexRenamePartition.kept,\n\t\t\t...ordered.policyCalls,\n\t\t\t...fieldEventPartition.kept\n\t\t];\n\t\tconst seenWarnings = /* @__PURE__ */ new Set();\n\t\tconst warnings = [\n\t\t\t...issuePartition.suppressions,\n\t\t\t...indexRenamePartition.suppressions,\n\t\t\t...schemaDiff.suppressions,\n\t\t\t...schemaDiffPartition.suppressions,\n\t\t\t...fieldEventPartition.suppressions\n\t\t].map((record) => renderPostgresSuppression(record, options.contract)).filter((warning) => {\n\t\t\tconst key = JSON.stringify(warning);\n\t\t\tif (seenWarnings.has(key)) return false;\n\t\t\tseenWarnings.add(key);\n\t\t\treturn true;\n\t\t});\n\t\treturn Object.freeze({\n\t\t\tkind: \"success\",\n\t\t\tplan: new TypeScriptRenderablePostgresMigration(calls, {\n\t\t\t\tfrom: options.fromContract?.storage.storageHash ?? null,\n\t\t\t\tto: options.contract.storage.storageHash\n\t\t\t}, options.spaceId, options.snapshotsImportPath, this.#lowerer),\n\t\t\t...warnings.length > 0 ? { warnings: Object.freeze(warnings) } : {}\n\t\t});\n\t}\n\t/**\n\t* Maps the RLS policy findings of the one combined tree diff\n\t* (`buildPostgresPlanDiff`, already ownership-filtered) into\n\t* `CREATE POLICY` / `DROP POLICY` / `ALTER POLICY … RENAME TO` ops — a\n\t* `not-equal` finding (an exact-named policy whose content drifted)\n\t* becomes drop + create, or a disallowed-call conflict when the policy\n\t* forbids the destructive drop. It\n\t* does not re-diff — it consumes exactly the policy-node subset of the\n\t* shared diff's issues. Enablement is NOT decided here: `ENABLE`/`DISABLE\n\t* ROW LEVEL SECURITY` derive from the table's marker-driven `rlsEnabled`\n\t* attribute diff on the relational side.\n\t*\n\t* Rename post-pass (the index pass's structure): hash pairing pairs a\n\t* `not-found` and a `not-expected` policy on the SAME table whose\n\t* wire-name content hashes match but prefixes differ (prefix-only rename);\n\t* content pairing then pairs remaining wire-named-missing policies against remaining\n\t* extras of any name shape by verbatim content (the node-owned `contentEquals` —\n\t* exact→wire adoption). Multi-candidate groups pair deterministically\n\t* by sorted name; leftovers proceed as create/drop; an exact-named\n\t* missing policy never content-pairs.\n\t*\n\t* The pairing runs only when the policy allows `widening` (rename's\n\t* class). Without it (db-init's additive-only set), pairing degrades\n\t* deliberately to the additive half: the new name is CREATEd and the old\n\t* policy survives live until a widening/destructive-allowed plan runs —\n\t* emitting an ungated widening rename would only fail at the runner's\n\t* class re-enforcement.\n\t*/\n\tplanPostgresSchemaDiff(options, filteredDiffIssues) {\n\t\tconst allowsDestructive = options.policy.allowedOperationClasses.includes(\"destructive\");\n\t\tconst allowsWidening = options.policy.allowedOperationClasses.includes(\"widening\");\n\t\tconst missing = [];\n\t\tconst extra = [];\n\t\tconst changed = [];\n\t\tfor (const issue of filteredDiffIssues) if (issueOutcome(issue) === \"not-equal\") {\n\t\t\tconst expected = issue.expected;\n\t\t\tPostgresPolicySchemaNode.assert(expected);\n\t\t\tchanged.push({\n\t\t\t\tnode: expected,\n\t\t\t\tschemaForTable: resolveDdlSchemaForNamespaceStorage(options.contract.storage, expected.namespaceId)\n\t\t\t});\n\t\t} else if (issueOutcome(issue) === \"not-found\") {\n\t\t\tconst expected = issue.expected;\n\t\t\tPostgresPolicySchemaNode.assert(expected);\n\t\t\tmissing.push({\n\t\t\t\tnode: expected,\n\t\t\t\tschemaForTable: resolveDdlSchemaForNamespaceStorage(options.contract.storage, expected.namespaceId)\n\t\t\t});\n\t\t} else if (issueOutcome(issue) === \"not-expected\") {\n\t\t\tconst actual = issue.actual;\n\t\t\tPostgresPolicySchemaNode.assert(actual);\n\t\t\textra.push({\n\t\t\t\tnode: actual,\n\t\t\t\tschemaForTable: resolveDdlSchemaForNamespaceStorage(options.contract.storage, actual.namespaceId)\n\t\t\t});\n\t\t}\n\t\tconst calls = [];\n\t\tconst conflicts = [];\n\t\tconst suppressions = [];\n\t\tconst renamedExtras = /* @__PURE__ */ new Set();\n\t\tconst renamedMissing = /* @__PURE__ */ new Set();\n\t\tconst pairingKey = (finding, hash) => JSON.stringify([\n\t\t\tfinding.schemaForTable,\n\t\t\tfinding.node.tableName,\n\t\t\thash\n\t\t]);\n\t\tif (allowsWidening) {\n\t\t\tconst extrasByGroup = /* @__PURE__ */ new Map();\n\t\t\tfor (const finding of extra) {\n\t\t\t\tconst parsed = parseWireName(finding.node.name);\n\t\t\t\tif (parsed === void 0) continue;\n\t\t\t\tconst key = pairingKey(finding, parsed.hash);\n\t\t\t\tconst group = extrasByGroup.get(key) ?? [];\n\t\t\t\tgroup.push(finding);\n\t\t\t\textrasByGroup.set(key, group);\n\t\t\t}\n\t\t\tfor (const group of extrasByGroup.values()) group.sort((a, b) => a.node.name < b.node.name ? -1 : a.node.name > b.node.name ? 1 : 0);\n\t\t\tconst sortedMissing = [...missing].sort((a, b) => a.node.name < b.node.name ? -1 : a.node.name > b.node.name ? 1 : 0);\n\t\t\tfor (const missingFinding of sortedMissing) {\n\t\t\t\tconst parsed = parseWireName(missingFinding.node.name);\n\t\t\t\tif (parsed === void 0) continue;\n\t\t\t\tconst candidate = extrasByGroup.get(pairingKey(missingFinding, parsed.hash))?.shift();\n\t\t\t\tif (candidate === void 0) continue;\n\t\t\t\trenamedExtras.add(candidate);\n\t\t\t\trenamedMissing.add(missingFinding);\n\t\t\t\tcalls.push(new RenamePostgresRlsPolicyCall(missingFinding.schemaForTable, missingFinding.node.tableName, candidate.node.name, missingFinding.node.name));\n\t\t\t}\n\t\t\tconst sortedExtras = [...extra].sort((a, b) => a.node.name < b.node.name ? -1 : a.node.name > b.node.name ? 1 : 0);\n\t\t\tfor (const missingFinding of sortedMissing) {\n\t\t\t\tif (renamedMissing.has(missingFinding)) continue;\n\t\t\t\tif (missingFinding.node.prefix === void 0) continue;\n\t\t\t\tconst candidate = sortedExtras.find((extraFinding) => !renamedExtras.has(extraFinding) && extraFinding.schemaForTable === missingFinding.schemaForTable && extraFinding.node.tableName === missingFinding.node.tableName && missingFinding.node.contentEquals(extraFinding.node));\n\t\t\t\tif (candidate === void 0) continue;\n\t\t\t\trenamedExtras.add(candidate);\n\t\t\t\trenamedMissing.add(missingFinding);\n\t\t\t\tcalls.push(new RenamePostgresRlsPolicyCall(missingFinding.schemaForTable, missingFinding.node.tableName, candidate.node.name, missingFinding.node.name));\n\t\t\t}\n\t\t}\n\t\tfor (const finding of changed) {\n\t\t\tconst replacement = {\n\t\t\t\tdrop: new DropPostgresRlsPolicyCall(finding.schemaForTable, finding.node.tableName, finding.node.name),\n\t\t\t\tcreate: new CreatePostgresRlsPolicyCall(finding.schemaForTable, finding.node.tableName, policyNodeToContractPolicy(finding.node))\n\t\t\t};\n\t\t\tconst graded = gradePolicyReplacement(replacement, options.contract, options.policy.allowedOperationClasses);\n\t\t\tif (graded.disposition === \"suppress\") {\n\t\t\t\tsuppressions.push(graded.record);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (graded.disposition === \"conflict\") {\n\t\t\t\tconflicts.push(graded.conflict);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tcalls.push(replacement.drop);\n\t\t\tcalls.push(replacement.create);\n\t\t}\n\t\tfor (const finding of missing) {\n\t\t\tif (renamedMissing.has(finding)) continue;\n\t\t\tcalls.push(new CreatePostgresRlsPolicyCall(finding.schemaForTable, finding.node.tableName, policyNodeToContractPolicy(finding.node)));\n\t\t}\n\t\tif (allowsDestructive) for (const finding of extra) {\n\t\t\tif (renamedExtras.has(finding)) continue;\n\t\t\tcalls.push(new DropPostgresRlsPolicyCall(finding.schemaForTable, finding.node.tableName, finding.node.name));\n\t\t}\n\t\treturn {\n\t\t\tcalls,\n\t\t\tconflicts,\n\t\t\tsuppressions\n\t\t};\n\t}\n\tensureAdditivePolicy(policy) {\n\t\tif (!policy.allowedOperationClasses.includes(\"additive\")) return plannerFailure([{\n\t\t\tkind: \"unsupportedOperation\",\n\t\t\tsummary: \"Migration planner requires additive operations be allowed\",\n\t\t\twhy: \"The planner requires the \\\"additive\\\" operation class to be allowed in the policy.\"\n\t\t}]);\n\t\treturn null;\n\t}\n};\n/**\n* A diff issue whose node is an RLS policy — the structural half of the one\n* combined tree diff, routed to `planPostgresSchemaDiff` instead of\n* `planIssues`.\n*/\nfunction isPolicyDiffIssue(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\treturn node !== void 0 && PostgresPolicySchemaNode.is(node);\n}\n/**\n* Postgres refuses these statements while a policy uses the object they touch:\n* - dropping a column (2BP01) or changing its type (0A000);\n* - dropping a table that a policy on another table uses (2BP01); a table's own policies go with it;\n* - dropping a native enum type (2BP01);\n* - a destructive codec type operation (a `RawSqlCall` on a type), such as dropping or rebuilding\n* the type (2BP01) or changing a composite type's attribute type (0A000). Additive and widening\n* type operations, such as adding an enum value or renaming the type, go through.\n*\n* So every policy drop moves to just before the first structural call that a policy can block.\n* Without such a call, the policy calls keep their place after the structural calls.\n*/\nfunction movePolicyDropsBeforeBlockedDdl(structural, policyCalls) {\n\tconst firstBlockable = structural.findIndex(policyCanBlock);\n\tif (firstBlockable === -1) return {\n\t\tstructural,\n\t\tpolicyCalls\n\t};\n\tconst isPolicyDrop = (call) => call instanceof DropPostgresRlsPolicyCall;\n\treturn {\n\t\tstructural: [\n\t\t\t...structural.slice(0, firstBlockable),\n\t\t\t...policyCalls.filter(isPolicyDrop),\n\t\t\t...structural.slice(firstBlockable)\n\t\t],\n\t\tpolicyCalls: policyCalls.filter((call) => !isPolicyDrop(call))\n\t};\n}\nfunction policyCanBlock(call) {\n\tif (call instanceof RawSqlCall) return call.operationClass === \"destructive\" && call.op.target.details?.objectType === \"type\";\n\treturn call instanceof DropColumnCall || call instanceof AlterColumnTypeCall || call instanceof DropTableCall || call instanceof DropNativeEnumTypeCall;\n}\n/**\n* Drops a `not-expected` issue when it is a whole extra storage entity (a table\n* or a native enum) that some space in the composition owns. Each such node\n* yields its own storage coordinate (see {@link postgresNodeStorageCoordinate}),\n* so `declaresEntity` answers over the whole composition on one uniform\n* coordinate: a positive answer means a sibling owns this entity here — leave\n* it; a negative answer means a genuine orphan — drop it. A node with no storage\n* coordinate (a namespace, or a deeper column/constraint drift on an owned\n* table) is this space's own and is always kept. No oracle ⇒ keep everything.\n*/\nfunction retainUnownedExtras(issues, ownership, contract) {\n\tif (ownership === void 0) return issues;\n\treturn issues.filter((issue) => {\n\t\tif (issueOutcome(issue) !== \"not-expected\") return true;\n\t\tconst node = issueNode(issue);\n\t\tif (node === void 0) return true;\n\t\tconst coordinate = postgresNodeStorageCoordinate(node);\n\t\tif (coordinate === void 0) return true;\n\t\tconst ddlSchemaName = issueSchemaName(issue);\n\t\tif (ddlSchemaName === void 0) return true;\n\t\tconst namespaceId = resolveNamespaceIdForDdlSchema(contract, ddlSchemaName);\n\t\treturn !ownership.declaresEntity({\n\t\t\tnamespaceId,\n\t\t\t...coordinate\n\t\t});\n\t});\n}\n/**\n* Returns the one namespace node the relational strategy layer probes for\n* live-table existence and reads codec-hook context off — the namespace\n* matching the planner's resolved schema name, or the first namespace when\n* none matches. `undefined` when the tree has no namespaces, so the strategy\n* context uses its empty-schema default.\n*\n* The relational strategies key tables by bare name, so they can only probe one\n* namespace at a time; probing across every namespace at once is future work.\n*\n* Returns the real `PostgresNamespaceSchemaNode` reference rather than a\n* projection: `storageTypePlanCallStrategy` hands this same value to codec\n* `planTypeOperations` hooks as `schema`, and hooks read the Postgres-specific\n* `nativeEnums` field off it (via `PostgresNamespaceSchemaNode.is`) to decide\n* whether a native enum type already exists — a projection that only copies\n* `tables` would silently drop that signal. `StrategyContext.schema`'s\n* declared type (`SqlSchemaIR`, shared with SQLite's flat shape) doesn't\n* capture this, so the return is `blindCast` the same way `namespaceSchemaNodes`\n* in the family's relational walk already treats a namespace node as a\n* structurally-`SqlSchemaIR`-shaped value.\n*/\nfunction relationalNamespaceNode(schema, schemaName) {\n\tconst namespaceNodes = Object.values(schema.namespaces);\n\tconst namespaceNode = namespaceNodes.find((node) => node.schemaName === schemaName) ?? namespaceNodes[0];\n\tif (namespaceNode === void 0) return void 0;\n\treturn blindCast(namespaceNode);\n}\n/**\n* Grades a {@link PolicyReplacement} as one unit against the table's\n* control policy, BEFORE the pair becomes calls or a conflict. This runs\n* ahead of `partitionCallsByControlPolicy`, which later re-grades the\n* surviving calls per-call — a no-op here, since only managed units\n* survive this grading.\n*\n* A replacement is deliberately STRICTER than the shared\n* `callAllowedUnderControlPolicy` rule: `tolerated` permits whole-object\n* creation, but a replacement's create is the second half of a repair of\n* an existing object, not a new object — so ANY non-managed control\n* (external, observed, tolerated) suppresses the whole unit. Drift on an\n* object the plan does not manage is reported, never repaired; the\n* suppression subject names the drifted policy (`rlsPolicy`) so the\n* report says which policy drifted, matching the conflict path's\n* `location.rlsPolicy`.\n*/\nfunction gradePolicyReplacement(replacement, contract, allowedOperationClasses) {\n\tconst subject = resolvePostgresCallControlPolicySubject(replacement.drop, contract);\n\tconst controlPolicy = controlPolicyForCall(subject, contract.defaultControlPolicy);\n\tif (controlPolicy !== \"managed\") return {\n\t\tdisposition: \"suppress\",\n\t\trecord: {\n\t\t\tsubject: subject === void 0 ? void 0 : {\n\t\t\t\t...subject,\n\t\t\t\trlsPolicy: replacement.drop.policyName\n\t\t\t},\n\t\t\tpolicy: controlPolicy,\n\t\t\tfactoryName: void 0,\n\t\t\tcreatesNewObject: false\n\t\t}\n\t};\n\tif (!allowedOperationClasses.includes(\"destructive\")) return {\n\t\tdisposition: \"conflict\",\n\t\tconflict: conflictForDisallowedCall(replacement.drop, allowedOperationClasses)\n\t};\n\treturn { disposition: \"plan\" };\n}\n/**\n* Rebuilds the `PostgresRlsPolicy` contract entity `CreatePostgresRlsPolicyCall`\n* carries (its `renderTypeScript`/`createRlsPolicy` paths serialize the whole\n* entity, `namespaceId` included). This reconstructs rather than looking the\n* original up in the contract on purpose: the diff node's `namespaceId` is the\n* *resolved DDL schema* (set when the expected tree was built), which is the\n* value the emitted op must carry; the contract-stored entity holds the raw,\n* pre-resolution coordinate, so a lookup would change the migration output.\n*/\nfunction policyNodeToContractPolicy(node) {\n\treturn new PostgresRlsPolicy({\n\t\tnaming: namingOf(node.name, node.prefix),\n\t\ttableName: node.tableName,\n\t\tnamespaceId: node.namespaceId,\n\t\toperation: node.operation,\n\t\troles: [...node.roles],\n\t\tusing: node.using,\n\t\twithCheck: node.withCheck,\n\t\tpermissive: node.permissive\n\t});\n}\n//#endregion\nexport { createPostgresMigrationPlanner as t };\n\n//# sourceMappingURL=planner-B5wkfdZ_.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,SAAS,qBAAqB,SAAS,aAAa;CACnD,MAAM,Y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Ae;CACtG,IAAI,kBAAkB,KAAK,GAAG,OAAO,KAAK;CAC1C,OAAO,UAAU,aAAa;AAC/B;;;;;;;;;;;;;;;;;;AAkBA,SAAS,uBAAuB,aAAa,UAAU,yBAAyB;CAC/E,MAAM,UAAU,wCAAwC,YAAY,MAAM,QAAQ;CAClF,MAAM,gBAAgB,qBAAqB,SAAS,SAAS,oBAAoB;CACjF,IAAI,kBAAkB,WAAW,OAAO;EACvC,aAAa;EACb,QAAQ;GACP,SAAS,YAAY,KAAK,IAAI,KAAK,IAAI;IACtC,GAAG;IACH,WAAW,YAAY,KAAK;GAC7B;GACA,QAAQ;GACR,aAAa,KAAK;GAClB,kBAAkB;EACnB;CACD;CACA,IAAI,CAAC,wBAAwB,SAAS,aAAa,GAAG,OAAO;EAC5D,aAAa;EACb,UAAU,0BAA0B,YAAY,MAAM,uBAAuB;CAC9E;CACA,OAAO,EAAE,aAAa,OAAO;AAC9B;;;;;;;;;;AAUA,SAAS,2BAA2B,MAAM;CACzC,OAAO,IAAI,kBAAkB;EAC5B,QAAQ,SAAS,KAAK,MAAM,KAAK,MAAM;EACvC,WAAW,KAAK;EAChB,aAAa,KAAK;EAClB,WAAW,KAAK;EAChB,OAAO,CAAC,GAAG,KAAK,KAAK;EACrB,OAAO,KAAK;EACZ,WAAW,KAAK;EAChB,YAAY,KAAK;CAClB,CAAC;AACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"planner-ddl-builders-ClaAKDuZ-DpDBj2cs.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/planner-ddl-builders-ClaAKDuZ.mjs"],"sourcesContent":["import { t as escapeLiteral } from \"./sql-utils-BMXJi06b.mjs\";\nimport { A as pgTimestamptz, E as pgTime, M as pgTimetz, O as pgTimestamp, _ as pgInt8, b as pgJsonb, c as pgDate, g as pgInt4, h as pgInt2, v as pgInterval, y as pgJson } from \"./data-types-BRBW3ouc.mjs\";\nimport { dataTypeParams, renderSqlTypeName, sqlDataTypeOfCodec } from \"@internal/sql-contract/data-type\";\n//#region src/core/date-time-ddl-text.ts\nconst DATE_TIME_TYPES = /* @__PURE__ */ new Set([\n\tpgDate.id,\n\tpgTime.id,\n\tpgTimetz.id,\n\tpgTimestamp.id,\n\tpgTimestamptz.id,\n\tpgInterval.id\n]);\nconst TYPES_WITH_A_YEAR = /* @__PURE__ */ new Set([\n\tpgDate.id,\n\tpgTimestamp.id,\n\tpgTimestamptz.id\n]);\n/** Whether a data type is one of this target's date and time types, whose defaults DDL writes as text. */\nfunction isPostgresDateTimeDataType(dataTypeId) {\n\treturn dataTypeId !== void 0 && DATE_TIME_TYPES.has(dataTypeId);\n}\n/**\n* The text DDL writes for a default of a date or time type, from its canonical form (ADR 254). A\n* year from 1 to 9999 stays as it is. PostgreSQL has no year 0 and reads no signed year, so a later\n* year loses its sign and leading zeros (`10000-01-01`) and a year at or before 0 is written as the\n* year before Christ (`0044-03-15 BC`). Every Postgres DDL path writes a date or time default\n* through this function.\n*/\nfunction postgresDateTimeDdlText(canonical, dataTypeId) {\n\tif (dataTypeId === void 0 || !TYPES_WITH_A_YEAR.has(dataTypeId)) return canonical;\n\tconst match = /^([+-]\\d{6}|\\d{4})(-.*)$/.exec(canonical);\n\tif (match === null) return canonical;\n\tconst [, yearDigits = \"\", rest = \"\"] = match;\n\tconst year = Number(yearDigits);\n\tif (year >= 1 && year <= 9999) return canonical;\n\tif (year > 9999) return `${year}${rest}`;\n\treturn `${String(1 - year).padStart(4, \"0\")}${rest} BC`;\n}\n//#endregion\n//#region src/core/migrations/planner-ddl-builders.ts\nconst SERIAL_TYPES = /* @__PURE__ */ new Map([\n\t[pgInt4.id, \"SERIAL\"],\n\t[pgInt8.id, \"BIGSERIAL\"],\n\t[pgInt2.id, \"SMALLSERIAL\"]\n]);\nconst JSON_DATA_TYPES = /* @__PURE__ */ new Set([pgJson.id, pgJsonb.id]);\n/**\n* Renders the SQL type for a column in DDL context: the name its codec's data type is written\n* with, and its parameters. A `typeRef` column is written as a column of the referenced type.\n*\n* @param allowPseudoTypes - When true (default), autoincrement integer columns\n* produce SERIAL/BIGSERIAL/SMALLSERIAL pseudo-types. Set to false for contexts\n* like ALTER COLUMN TYPE where pseudo-types are invalid.\n*/\nfunction buildColumnTypeSql(column, types, storageTypes = {}, allowPseudoTypes = true) {\n\tconst resolved = (column.typeRef === void 0 ? void 0 : storageTypes[column.typeRef]) ?? column;\n\tconst dataType = sqlDataTypeOfCodec(resolved.codecId, types);\n\tif (allowPseudoTypes) {\n\t\tconst columnDefault = column.default;\n\t\tconst serial = SERIAL_TYPES.get(dataType.id);\n\t\tif (serial !== void 0 && columnDefault?.kind === \"function\" && columnDefault.expression === \"autoincrement()\") return serial;\n\t}\n\tconst typeSql = renderSqlTypeName(dataType, dataTypeParams(dataType, resolved.typeParams));\n\treturn column.many ? `${typeSql}[]` : typeSql;\n}\nfunction renderDefaultLiteral(value, column) {\n\tif (column?.many && Array.isArray(value)) return renderArrayLiteralDefault(value, column.baseTypeName, column.dataType);\n\tif (column !== void 0 && JSON_DATA_TYPES.has(column.dataType) && typeof value === \"object\" && value !== null && !(value instanceof Date)) return `'${escapeLiteral(JSON.stringify(value))}'::${column.baseTypeName}`;\n\treturn renderScalarLiteral(value, column?.dataType);\n}\n/** A date or time value is written through the one function every DDL path uses for it. */\nfunction renderScalarLiteral(value, dataType) {\n\tif (value instanceof Date) return `'${escapeLiteral(value.toISOString())}'`;\n\tif (typeof value === \"string\") return `'${escapeLiteral(postgresDateTimeDdlText(value, dataType))}'`;\n\tif (typeof value === \"number\" || typeof value === \"boolean\") return String(value);\n\tif (value === null) return \"NULL\";\n\treturn `'${escapeLiteral(JSON.stringify(value))}'`;\n}\n/**\n* An `ARRAY[...]` of quoted elements has type `text[]`, which Postgres does not assign to a list of\n* numbers, decimals, timestamps or enums, so the constructor is cast to the list type. Each element\n* is the text Postgres reads for its type: an `int8` or `numeric` value as decimal text, a date or\n* time value in its type's canonical form. The cast is `baseTypeName` with `[]` appended unless it\n* already ends in `[]`; the name is not quoted here.\n*/\nfunction renderArrayLiteralDefault(elements, baseTypeName, dataType) {\n\tif (elements.length === 0) return \"'{}'\";\n\tconst rendered = `ARRAY[${elements.map((el) => renderScalarLiteral(el, dataType)).join(\", \")}]`;\n\tif (baseTypeName === \"\") return rendered;\n\treturn `${rendered}::${baseTypeName.endsWith(\"[]\") ? baseTypeName : `${baseTypeName}[]`}`;\n}\n//#endregion\nexport { postgresDateTimeDdlText as i, renderDefaultLiteral as n, isPostgresDateTimeDataType as r, buildColumnTypeSql as t };\n\n//# sourceMappingURL=planner-ddl-builders-ClaAKDuZ.mjs.map"],"mappings":";;;;AAIA,MAAM,kCAAkC,IAAI,IAAI;CAC/C,OAAO;CACP,OAAO;CACP,SAAS;CACT,YAAY;CACZ,cAAc;CACd,WAAW;AACZ,CAAC;AACD,MAAM,oCAAoC,IAAI,IAAI;CACjD,OAAO;CACP,YAAY;CACZ,cAAc;AACf,CAAC;;AAED,SAAS,2BAA2B,YAAY;CAC/C,OAAO,eAAe,KAAK,KAAK,gBAAgB,IAAI,UAAU;AAC/D;;;;;;;;AAQA,SAAS,wBAAwB,WAAW,YAAY;CACvD,IAAI,eAAe,KAAK,KAAK,CAAC,kBAAkB,IAAI,UAAU,GAAG,OAAO;CACxE,MAAM,QAAQ,2BAA2B,KAAK,SAAS;CACvD,IAAI,UAAU,MAAM,OAAO;CAC3B,MAAM,GAAG,aAAa,IAAI,OAAO,MAAM;CACvC,MAAM,OAAO,OAAO,UAAU;CAC9B,IAAI,QAAQ,KAAK,QAAQ,MAAM,OAAO;CACtC,IAAI,OAAO,MAAM,OAAO,GAAG,OAAO;CAClC,OAAO,GAAG,OAAO,IAAI,IAAI,CAAC,CAAC,SAAS,GAAG,GAAG,IAAI,KAAK;AACpD;AAGA,MAAM,+BAA+B,IAAI,IAAI;CAC5C,CAAC,OAAO,IAAI,QAAQ;CACpB,CAAC,OAAO,IAAI,WAAW;CACvB,CAAC,OAAO,IAAI,aAAa;A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AK,CAAC,EAAE;AACjD;;;;;;;;AAQA,SAAS,0BAA0B,UAAU,cAAc,UAAU;CACpE,IAAI,SAAS,WAAW,GAAG,OAAO;CAClC,MAAM,WAAW,SAAS,SAAS,KAAK,OAAO,oBAAoB,IAAI,QAAQ,CAAC,CAAC,CAAC,KAAK,IAAI,EAAE;CAC7F,IAAI,iBAAiB,IAAI,OAAO;CAChC,OAAO,GAAG,SAAS,IAAI,aAAa,SAAS,IAAI,IAAI,eAAe,GAAG,aAAa;AACrF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"postgres-migration-CmD95Eh_-DGLByWZD.mjs","names":["#endView","#startView"],"sources":["../../../../3-targets/3-targets/postgres/dist/postgres-migration-CmD95Eh_.mjs"],"sourcesContent":["import { t as errorPostgresMigrationStackMissing } from \"./errors-DYyzTYzE.mjs\";\nimport { _ as PostgresRlsPolicy, v as PostgresRlsEnablement } from \"./postgres-schema-DXd0mebY.mjs\";\nimport { n as postgresResolveDefault } from \"./default-normalizer-CrMBHF0W.mjs\";\nimport { t as resolveDdlSchemaForNamespaceStorage } from \"./resolve-ddl-schema-CadTChyu.mjs\";\nimport { r as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from \"./diff-database-schema-DRPIV4Ae.mjs\";\nimport { c as issueNode, f as defaultForeignKeyName, m as defaultUniqueName, n as resolveNamespaceIdForDdlSchema, p as defaultPrimaryKeyName } from \"./control-policy-C16wMazs.mjs\";\nimport { A as RenameIndexCall, B as installExtension, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, M as RenameTableCall, N as SetDefaultCall, P as SetNotNullCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ as DisableRowLevelSecurityCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, h as CreateTableCall, i as AddNativeEnumValueCall, j as RenamePostgresRlsPolicyCall, k as RenameConstraintCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, p as CreatePostgresRlsPolicyCall, r as AddForeignKeyCall, s as AddPrimaryKeyCall, t as AddCheckConstraintCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from \"./op-factory-call-B-4nf1jC.mjs\";\nimport { n as renderDefaultLiteral } from \"./planner-ddl-builders-ClaAKDuZ.mjs\";\nimport { t as PostgresContractView } from \"./postgres-contract-view-rT0ZLNqw.mjs\";\nimport { t as dataTransform } from \"./data-transform-Bo32KRbq.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { issueOutcome } from \"@internal/framework-components/control\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { applyTableRename, sqlTypeLookupsOf } from \"@internal/family-sql/control\";\nimport { namingOf, parseWireName } from \"@internal/sql-schema-ir/naming\";\nimport { assertDefined } from \"@internal/utils/assertions\";\nimport { SqlCheckConstraintIR, SqlIndexIR } from \"@internal/sql-schema-ir/types\";\nimport { errorMigrationOperationOptionRemoved } from \"@internal/errors/migration\";\nimport { Migration } from \"@internal/family-sql/migration\";\nimport { MigrationContractViews } from \"@internal/migration-tools/migration\";\n//#region src/core/migrations/index-and-check-renames.ts\n/**\n* Rename post-pass for indexes, per `(schema, table)`, widening-only,\n* deterministic by sorted names — the same structure as the policy pass\n* below (which stays untouched: policies pair by hash only).\n*\n* Hash pairing (prefix-only renames): extras whose live names parse as\n* wire names, grouped by `(schema, table, hash)`; missing nodes iterated\n* in sorted-name order consume the sorted-name-first candidate.\n*\n* Content pairing (exact→wire convergence), after hash pairing has\n* consumed its matches: the remaining wire-named-missing nodes\n* (`prefix` defined) against the remaining extras of any name shape,\n* paired iff content-equal (columns ordered-strict both-defined-or-\n* both-undefined, `unique`/`type` strict, `options` loose, bodies\n* byte-equal).\n*\n* Leftovers proceed as create/drop exactly as before; without the\n* widening allowance the pass is skipped and pairing degrades to the\n* additive half, like the policy pass.\n*/\nfunction pairIndexRenames(options, issues) {\n\tconst consumed = /* @__PURE__ */ new Set();\n\tconst calls = [];\n\tif (!options.policy.allowedOperationClasses.includes(\"widening\")) return {\n\t\tcalls,\n\t\tconsumed\n\t};\n\tconst missing = [];\n\tconst extra = [];\n\tfor (const issue of issues) {\n\t\tconst node = issueNode(issue);\n\t\tif (node === void 0 || !SqlIndexIR.is(node)) continue;\n\t\tconst ddlSchema = issue.path[1];\n\t\tconst tableName = issue.path[2];\n\t\tif (ddlSchema === void 0 || tableName === void 0) continue;\n\t\tif (issueOutcome(issue) === \"not-found\") missing.push({\n\t\t\tissue,\n\t\t\tnode,\n\t\t\tddlSchema,\n\t\t\ttableName\n\t\t});\n\t\telse if (issueOutcome(issue) === \"not-expected\") extra.push({\n\t\t\tissue,\n\t\t\tnode,\n\t\t\tddlSchema,\n\t\t\ttableName\n\t\t});\n\t}\n\tif (missing.length === 0 || extra.length === 0) return {\n\t\tcalls,\n\t\tconsumed\n\t};\n\tconst byName = (a, b) => a.node.name < b.node.name ? -1 : a.node.name > b.node.name ? 1 : 0;\n\tconst emissionSchema = (ddlSchema) => resolveNamespaceIdForDdlSchema(options.contract, ddlSchema) === UNBOUND_NAMESPACE_ID ? UNBOUND_NAMESPACE_ID : ddlSchema;\n\tconst pairingKey = (finding, hash) => JSON.stringify([\n\t\tfinding.ddlSchema,\n\t\tfinding.tableName,\n\t\thash\n\t]);\n\tconst rename = (missingFinding, candidate) => {\n\t\tconsumed.add(missingFinding.issue);\n\t\tconsumed.add(candidate.issue);\n\t\tcalls.push(new RenameIndexCall(emissionSchema(missingFinding.ddlSchema), missingFinding.tableName, candidate.node.name, missingFinding.node.name));\n\t};\n\tconst sortedMissing = [...missing].sort(byName);\n\tconst extrasByHash = /* @__PURE__ */ new Map();\n\tfor (const finding of extra) {\n\t\tconst parsed = parseWireName(finding.node.name);\n\t\tif (parsed === void 0) continue;\n\t\tconst key = pairingKey(finding, parsed.hash);\n\t\tconst group = extrasByHash.get(key) ?? [];\n\t\tgroup.push(finding);\n\t\textrasByHash.set(key, group);\n\t}\n\tfor (const group of extrasByHash.values()) group.sort(byName);\n\tfor (const missingFinding of sortedMissing) {\n\t\tconst parsed = parseWireName(missingFinding.node.name);\n\t\tif (parsed === void 0) continue;\n\t\tconst candidate = extrasByHash.get(pairingKey(missingFinding, parsed.hash))?.shift();\n\t\tif (candidate === void 0) continue;\n\t\trename(missingFinding, candidate);\n\t}\n\tconst sortedExtras = [...extra].sort(byName);\n\tfor (const missingFinding of sortedMissing) {\n\t\tif (consumed.has(missingFinding.issue)) continue;\n\t\tif (missingFinding.node.prefix === void 0) continue;\n\t\tconst candidate = sortedExtras.find((extraFinding) => !consumed.has(extraFinding.issue) && extraFinding.ddlSchema === missingFinding.ddlSchema && extraFinding.tableName === missingFinding.tableName && missingFinding.node.contentEquals(extraFinding.node, {\n\t\t\tcolumnPresence: \"matching\",\n\t\t\tbodies: \"verbatim\"\n\t\t}));\n\t\tif (candidate === void 0) continue;\n\t\trename(missingFinding, candidate);\n\t}\n\treturn {\n\t\tcalls,\n\t\tconsumed\n\t};\n}\n/**\n* Check-constraint rename post-pass: a `not-found` and a `not-expected`\n* check on the same table whose wire-name content hashes match but whose\n* prefixes differ is a prefix-only rename, and collapses into one\n* `ALTER TABLE … RENAME CONSTRAINT`.\n*\n* This is the index pass's hash-pairing phase and nothing else. There is\n* deliberately no content-pairing phase: a live check body is whatever\n* Postgres reprinted, so it never byte-matches the authored text, and\n* pairing an exact-named live check by content would bless whatever\n* predicate is actually live. Adoption of an old exact-named check stays\n* drop + add.\n*\n* Runs only when the policy allows `widening` (rename's class). Without it\n* the pass no-ops and the pair degrades to the slice-1 behavior: an add,\n* plus a drop when `destructive` is allowed too.\n*/\nfunction pairCheckRenames(options, issues) {\n\tconst consumed = /* @__PURE__ */ new Set();\n\tconst calls = [];\n\tif (!options.policy.allowedOperationClasses.includes(\"widening\")) return {\n\t\tcalls,\n\t\tconsumed\n\t};\n\tconst missing = [];\n\tconst extra = [];\n\tfor (const issue of issues) {\n\t\tconst node = issueNode(issue);\n\t\tif (node === void 0 || !SqlCheckConstraintIR.is(node)) continue;\n\t\tconst ddlSchema = issue.path[1];\n\t\tconst tableName = issue.path[2];\n\t\tif (ddlSchema === void 0 || tableName === void 0) continue;\n\t\tif (issueOutcome(issue) === \"not-found\") missing.push({\n\t\t\tissue,\n\t\t\tnode,\n\t\t\tddlSchema,\n\t\t\ttableName\n\t\t});\n\t\telse if (issueOutcome(issue) === \"not-expected\") extra.push({\n\t\t\tissue,\n\t\t\tnode,\n\t\t\tddlSchema,\n\t\t\ttableName\n\t\t});\n\t}\n\tif (missing.length === 0 || extra.length === 0) return {\n\t\tcalls,\n\t\tconsumed\n\t};\n\tconst byName = (a, b) => a.node.name < b.node.name ? -1 : a.node.name > b.node.name ? 1 : 0;\n\tconst emissionSchema = (ddlSchema) => resolveNamespaceIdForDdlSchema(options.contract, ddlSchema) === UNBOUND_NAMESPACE_ID ? UNBOUND_NAMESPACE_ID : ddlSchema;\n\tconst pairingKey = (finding, hash) => JSON.stringify([\n\t\tfinding.ddlSchema,\n\t\tfinding.tableName,\n\t\thash\n\t]);\n\tconst sortedMissing = [...missing].sort(byName);\n\tconst extrasByHash = /* @__PURE__ */ new Map();\n\tfor (const finding of extra) {\n\t\tconst parsed = parseWireName(finding.node.name);\n\t\tif (parsed === void 0) continue;\n\t\tconst key = pairingKey(finding, parsed.hash);\n\t\tconst group = extrasByHash.get(key) ?? [];\n\t\tgroup.push(finding);\n\t\textrasByHash.set(key, group);\n\t}\n\tfor (const group of extrasByHash.values()) group.sort(byName);\n\tfor (const missingFinding of sortedMissing) {\n\t\tconst parsed = parseWireName(missingFinding.node.name);\n\t\tif (parsed === void 0) continue;\n\t\tconst candidate = extrasByHash.get(pairingKey(missingFinding, parsed.hash))?.shift();\n\t\tif (candidate === void 0) continue;\n\t\tconsumed.add(missingFinding.issue);\n\t\tconsumed.add(candidate.issue);\n\t\tcalls.push(new RenameConstraintCall(emissionSchema(missingFinding.ddlSchema), missingFinding.tableName, \"checkConstraint\", candidate.node.name, missingFinding.node.name));\n\t}\n\treturn {\n\t\tcalls,\n\t\tconsumed\n\t};\n}\n//#endregion\n//#region src/core/migrations/postgres-contract-to-schema.ts\nfunction postgresRenderDefault(def, column, type) {\n\tif (def.kind === \"function\") return def.expression;\n\treturn renderDefaultLiteral(def.value, {\n\t\tmany: column.many,\n\t\t...type\n\t});\n}\n/**\n* The Postgres schema tree a contract describes, as the planner's \"from\" side:\n* the target descriptor's `migrations.contractToSchema` hook and the trees\n* `renameTable` compares to find its companion renames both go through here,\n* so they are built with the same type lookups, default renderer and default resolver.\n*/\nfunction postgresContractToSchema(contract, frameworkComponents) {\n\tconst types = sqlTypeLookupsOf(frameworkComponents);\n\treturn contractToPostgresDatabaseSchemaNode(blindCast(contract), {\n\t\tannotationNamespace: \"pg\",\n\t\tdataTypeLookup: types.dataTypeLookup,\n\t\tcodecLookup: types.codecLookup,\n\t\trenderDefault: postgresRenderDefault,\n\t\tresolveDefault: postgresResolveDefault\n\t});\n}\n//#endregion\n//#region src/core/migrations/rename-rls-references.ts\nfunction renamedMarker(marker, rename) {\n\tif (!(marker instanceof PostgresRlsEnablement) || marker.tableName !== rename.from) return marker;\n\treturn new PostgresRlsEnablement({\n\t\ttableName: rename.to,\n\t\tnamespaceId: marker.namespaceId\n\t});\n}\nfunction renamedPolicy(policy, rename) {\n\tif (!(policy instanceof PostgresRlsPolicy) || policy.tableName !== rename.from) return policy;\n\treturn new PostgresRlsPolicy({\n\t\tnaming: namingOf(policy.name, policy.prefix),\n\t\ttableName: rename.to,\n\t\tnamespaceId: policy.namespaceId,\n\t\toperation: policy.operation,\n\t\troles: policy.roles,\n\t\tusing: policy.using,\n\t\twithCheck: policy.withCheck,\n\t\tpermissive: policy.permissive\n\t});\n}\n/**\n* Moves the RLS marker and the policies of a renamed table onto its new name. The marker is keyed by table name; policies are keyed by their own name and only their `tableName` changes. Policy names do not derive from the table name, so none is renamed.\n*/\nfunction renameRlsReferences(entries, rename) {\n\tconst markers = entries[\"rls\"];\n\tconst policies = entries[\"policy\"];\n\treturn {\n\t\t...entries,\n\t\t...markers === void 0 ? {} : { rls: Object.fromEntries(Object.entries(markers).map(([tableName, marker]) => [tableName === rename.from ? rename.to : tableName, renamedMarker(marker, rename)])) },\n\t\t...policies === void 0 ? {} : { policy: Object.fromEntries(Object.entries(policies).map(([name, policy]) => [name, renamedPolicy(policy, rename)])) }\n\t};\n}\n//#endregion\n//#region src/core/migrations/table-rename-constraint-renames.ts\n/** The constraint of the next table the diff pairs with `node` and finds unchanged, as the diff compares them. */\nfunction unchangedIn(node, nextNodes) {\n\treturn nextNodes.find((next) => next.id === node.id && next.isEqualTo(node));\n}\n/**\n* The constraint renames that follow a table rename. A primary key, unique constraint or foreign key the start contract left unnamed carries a name derived from the old table name. When the end contract keeps the same constraint unchanged, it is renamed to the name the end contract gives it explicitly, or otherwise to the name derived from the new table name. A constraint the end contract changes is not renamed, so it keeps its name in the database. A constraint the start contract named keeps its name. Indexes and checks are not handled here: their wire names pair by content hash in the index and check rename passes.\n*/\nfunction constraintRenamesForTableRename(input) {\n\tconst { schemaName, from, to, previous, next } = input;\n\tconst rename = (kind, oldName, unchanged, derivedName) => {\n\t\tif (unchanged === void 0) return [];\n\t\tconst newName = unchanged.name ?? derivedName;\n\t\treturn oldName === newName ? [] : [new RenameConstraintCall(schemaName, to, kind, oldName, newName)];\n\t};\n\tconst primaryKey = previous.primaryKey !== void 0 && previous.primaryKey.name === void 0 ? rename(\"primaryKey\", defaultPrimaryKeyName(from), unchangedIn(previous.primaryKey, next.primaryKey === void 0 ? [] : [next.primaryKey]), defaultPrimaryKeyName(to)) : [];\n\tconst uniques = previous.uniques.filter((unique) => unique.name === void 0).flatMap((unique) => rename(\"unique\", defaultUniqueName(from, unique.columns), unchangedIn(unique, next.uniques), defaultUniqueName(to, unique.columns)));\n\tconst foreignKeys = previous.foreignKeys.filter((fk) => fk.name === void 0).flatMap((fk) => rename(\"foreignKey\", defaultForeignKeyName(from, fk.columns), unchangedIn(fk, next.foreignKeys), defaultForeignKeyName(to, fk.columns)));\n\treturn [\n\t\t...primaryKey,\n\t\t...uniques,\n\t\t...foreignKeys\n\t];\n}\n//#endregion\n//#region src/core/migrations/table-rename-calls.ts\nconst RENAME_POLICY = { allowedOperationClasses: [\"widening\"] };\nfunction emissionSchemaForNamespace(contract, namespaceId) {\n\treturn namespaceId === UNBOUND_NAMESPACE_ID ? UNBOUND_NAMESPACE_ID : resolveDdlSchemaForNamespaceStorage(contract.storage, namespaceId);\n}\nfunction renamedTableNode(schema, contract, rename) {\n\tconst ddlSchema = resolveDdlSchemaForNamespaceStorage(contract.storage, rename.namespaceId);\n\tconst table = Object.values(schema.namespaces).find((namespace) => namespace.schemaName === ddlSchema)?.tables[rename.to];\n\tassertDefined(table, `a resolved rename names table \"${rename.to}\" in schema \"${ddlSchema}\"`);\n\treturn table;\n}\n/**\n* The calls a migration's `renameTable` emits: the table rename, then a rename of each primary key, unique constraint and foreign key the start contract left unnamed, and of each wire-named index and check whose prefix derives from the table name. Only objects the end contract leaves otherwise unchanged are renamed; an unchanged constraint takes the end contract's explicit name if it has one. Throws `MIGRATION.TABLE_RENAME_UNMATCHED` when the start contract lacks the table or the end contract lacks the new name.\n*/\nfunction postgresTableRenameCalls(input) {\n\tconst applied = applyTableRename({\n\t\tstartContract: input.startContract,\n\t\tendContract: input.endContract,\n\t\trename: input.rename,\n\t\trenameTableReferences: renameRlsReferences\n\t});\n\tif (!applied.ok) throw applied.failure;\n\tconst { rename } = applied.value;\n\tconst contract = input.endContract;\n\tconst schemaName = emissionSchemaForNamespace(contract, rename.namespaceId);\n\tconst previousSchema = postgresContractToSchema(applied.value.contract, input.frameworkComponents);\n\tconst nextSchema = postgresContractToSchema(contract, input.frameworkComponents);\n\tconst { issues } = buildPostgresPlanDiff({\n\t\tcontract,\n\t\tactualSchema: previousSchema,\n\t\tframeworkComponents: input.frameworkComponents\n\t});\n\tconst onRenamedTable = (call) => call.schemaName === schemaName && call.tableName === rename.to;\n\tconst pairing = {\n\t\tcontract,\n\t\tpolicy: RENAME_POLICY\n\t};\n\treturn [\n\t\tnew RenameTableCall(schemaName, rename.from, rename.to),\n\t\t...constraintRenamesForTableRename({\n\t\t\tschemaName,\n\t\t\tfrom: rename.from,\n\t\t\tto: rename.to,\n\t\t\tprevious: renamedTableNode(previousSchema, contract, rename),\n\t\t\tnext: renamedTableNode(nextSchema, contract, rename)\n\t\t}),\n\t\t...pairIndexRenames(pairing, issues).calls.filter(onRenamedTable),\n\t\t...pairCheckRenames(pairing, issues).calls.filter(onRenamedTable)\n\t];\n}\n//#endregion\n//#region src/core/migrations/postgres-migration.ts\n/**\n* Target-owned base class for Postgres migrations.\n*\n* Fixes the `SqlMigration` generic to `PostgresPlanTargetDetails` and the\n* abstract `targetId` to the Postgres target-id string literal, so both\n* user-authored migrations and renderer-generated scaffolds (the output of\n* `renderCallsToTypeScript`) can extend `PostgresMigration` directly without\n* redeclaring target-local identity.\n*\n* Mirrors `MongoMigration` in `@internal/family-mongo`: the renderer\n* emits `extends Migration` against a facade re-export of this class\n* from `@internal/postgres/migration`, keeping the authoring surface\n* target-scoped rather than family-scoped.\n*\n* The constructor materializes a single Postgres `SqlControlAdapter` from\n* `stack.adapter.create(stack)` and stores it; the protected `dataTransform`\n* instance method forwards to the free `dataTransform` factory with that\n* stored adapter, so user migrations can write `this.dataTransform(...)`\n* without threading the adapter through every call.\n*\n* Every method requires an explicit `schema`. Postgres migrations name their\n* schema deliberately — there is no default and no `search_path`-relative\n* option. A migration that left the schema unspecified would resolve against\n* whatever `search_path` the connection happened to carry, and that ambiguity\n* is an antipattern in a migration. (The unbound/unspecified namespace concept\n* remains for SQLite, which has no schemas, and for Mongo's connection `db`.)\n*/\nvar PostgresMigration = class extends Migration {\n\ttargetId = \"postgres\";\n\t/**\n\t* Materialized Postgres control adapter, created once per migration\n\t* instance from the injected stack. `undefined` only when the migration\n\t* was instantiated without a stack (test fixtures); `controlAdapterFor`\n\t* throws a MIGRATION.POSTGRES_CONTROL_STACK_MISSING in that case to surface the misuse.\n\t*/\n\tcontrolAdapter;\n\t#endView = new MigrationContractViews(this, \"PostgresMigration\", (json) => PostgresContractView.fromJson(json));\n\t#startView = new MigrationContractViews(this, \"PostgresMigration\", (json) => PostgresContractView.fromJson(json));\n\tconstructor(stack) {\n\t\tsuper(stack);\n\t\tthis.controlAdapter = stack?.adapter ? blindCast(stack.adapter.create(stack)) : void 0;\n\t}\n\tframeworkComponents() {\n\t\tconst stack = this.stack;\n\t\tif (stack === void 0) return [];\n\t\treturn [\n\t\t\tstack.target,\n\t\t\t...stack.adapter === void 0 ? [] : [stack.adapter],\n\t\t\t...stack.extensions\n\t\t];\n\t}\n\t/**\n\t* Returns the materialized control adapter, or throws a MIGRATION.POSTGRES_CONTROL_STACK_MISSING naming\n\t* `operation` when the migration was constructed without a `ControlStack`.\n\t* Single home for the null-check that every DDL/DML method shares.\n\t*/\n\tcontrolAdapterFor(operation) {\n\t\tif (!this.controlAdapter) throw errorPostgresMigrationStackMissing(operation);\n\t\treturn this.controlAdapter;\n\t}\n\t/**\n\t* The typed, schema-qualified Postgres view over this migration's end-state\n\t* contract — `this.endContract.namespace.<schema>.table.<name>`, etc. Throws\n\t* if no `endContractJson` was provided.\n\t*/\n\tget endContract() {\n\t\treturn this.#endView.endContract;\n\t}\n\t/**\n\t* The typed Postgres view over this migration's start-state contract, or\n\t* `null` for a baseline migration (no `startContractJson`).\n\t*/\n\tget startContract() {\n\t\treturn this.#startView.startContract;\n\t}\n\t/**\n\t* Instance-method wrapper around the free `dataTransform` factory that\n\t* supplies the stored control adapter. Authors call this from inside\n\t* `get operations()`; the adapter argument is hidden from the call site.\n\t*/\n\tdataTransform(contract, name, options) {\n\t\treturn dataTransform(contract, name, options, this.controlAdapterFor(\"dataTransform\"));\n\t}\n\t/**\n\t* Emit a `CREATE TABLE` migration operation. Builds a typed DDL node from\n\t* the supplied options and lowers it through the stored control adapter.\n\t* Throws if no adapter is present (i.e. migration instantiated without a stack).\n\t*/\n\tcreateTable(options) {\n\t\treturn new CreateTableCall(options.schema, options.table, options.columns, options.constraints).toOp(this.controlAdapterFor(\"createTable\"));\n\t}\n\t/**\n\t* Emit a `CREATE SCHEMA` migration operation. Builds a typed DDL node from\n\t* the supplied options and lowers it through the stored control adapter.\n\t* Throws if no adapter is present (i.e. migration instantiated without a stack).\n\t*/\n\tcreateSchema(options) {\n\t\treturn new CreateSchemaCall(options.schema).toOp(this.controlAdapterFor(\"createSchema\"));\n\t}\n\t/**\n\t* Emit a `CREATE TYPE ... AS ENUM (...)` migration operation for a managed\n\t* native enum. Builds a typed DDL node and lowers it through the stored\n\t* control adapter (members render in declaration order). Throws if no adapter\n\t* is present.\n\t*/\n\tcreateNativeEnumType(options) {\n\t\treturn new CreateNativeEnumTypeCall(options.schema, options.typeName, options.members).toOp(this.controlAdapterFor(\"createNativeEnumType\"));\n\t}\n\t/**\n\t* Emit a `DROP TYPE` migration operation for a managed native enum, lowered\n\t* through the stored control adapter. Throws if no adapter is present.\n\t*/\n\tdropNativeEnumType(options) {\n\t\treturn new DropNativeEnumTypeCall(options.schema, options.typeName).toOp(this.controlAdapterFor(\"dropNativeEnumType\"));\n\t}\n\t/**\n\t* Emit an `ALTER TYPE ... ADD VALUE` migration operation appending one\n\t* member to a managed native enum, lowered through the stored control\n\t* adapter. Throws if no adapter is present. Every appended value is its\n\t* own operation — call this once per value to append more than one.\n\t*/\n\taddNativeEnumValue(options) {\n\t\treturn new AddNativeEnumValueCall(options.schema, options.typeName, options.value).toOp(this.controlAdapterFor(\"addNativeEnumValue\"));\n\t}\n\taddColumn(options) {\n\t\treturn new AddColumnCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor(\"addColumn\"));\n\t}\n\taddPrimaryKey(options) {\n\t\treturn new AddPrimaryKeyCall(options.schema, options.table, options.constraint, options.columns).toOp(this.controlAdapterFor(\"addPrimaryKey\"));\n\t}\n\taddUnique(options) {\n\t\treturn new AddUniqueCall(options.schema, options.table, options.constraint, options.columns).toOp(this.controlAdapterFor(\"addUnique\"));\n\t}\n\taddForeignKey(options) {\n\t\treturn new AddForeignKeyCall(options.schema, options.table, options.foreignKey).toOp(this.controlAdapterFor(\"addForeignKey\"));\n\t}\n\taddCheckConstraint(options) {\n\t\treturn new AddCheckConstraintCall(options.schema, options.table, options.constraint, options.expression).toOp(this.controlAdapterFor(\"addCheckConstraint\"));\n\t}\n\trenameCheckConstraint(options) {\n\t\treturn this.renameConstraint({\n\t\t\t...options,\n\t\t\tkind: \"checkConstraint\"\n\t\t});\n\t}\n\trenameConstraint(options) {\n\t\treturn new RenameConstraintCall(options.schema ?? UNBOUND_NAMESPACE_ID, options.table, options.kind, options.from, options.to).toOp(this.controlAdapterFor(\"renameConstraint\"));\n\t}\n\tdropCheckConstraint(options) {\n\t\treturn new DropCheckConstraintCall(options.schema, options.table, options.constraint).toOp(this.controlAdapterFor(\"dropCheckConstraint\"));\n\t}\n\tdropConstraint(options) {\n\t\treturn new DropConstraintCall(options.schema, options.table, options.constraint, options.kind ?? \"unique\").toOp(this.controlAdapterFor(\"dropConstraint\"));\n\t}\n\t/**\n\t* Emit the operations that rename a table: the table rename, then a rename of each primary key, unique constraint, foreign key, index and check whose name was derived from the old table name, read from this migration's start and end contracts. Spread the result into `operations`: `...this.renameTable({ table: 'userProfile', to: 'UserProfile' })`. `schema` names the table's namespace when more than one declares the table. Throws `MIGRATION.TABLE_RENAME_UNMATCHED` when the start contract lacks the table or the end contract lacks the new name.\n\t*/\n\trenameTable(options) {\n\t\tconst adapter = this.controlAdapterFor(\"renameTable\");\n\t\treturn postgresTableRenameCalls({\n\t\t\tstartContract: this.startContract,\n\t\t\tendContract: this.endContract,\n\t\t\trename: {\n\t\t\t\tnamespaceId: options.schema,\n\t\t\t\tfrom: options.table,\n\t\t\t\tto: options.to\n\t\t\t},\n\t\t\tframeworkComponents: this.frameworkComponents()\n\t\t}).map(async (call) => call.toOp(adapter));\n\t}\n\tdropTable(options) {\n\t\treturn new DropTableCall(options.schema, options.table).toOp(this.controlAdapterFor(\"dropTable\"));\n\t}\n\tdropColumn(options) {\n\t\treturn new DropColumnCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor(\"dropColumn\"));\n\t}\n\talterColumnType(options) {\n\t\treturn new AlterColumnTypeCall(options.schema, options.table, options.column, options.options).toOp(this.controlAdapterFor(\"alterColumnType\"));\n\t}\n\tsetNotNull(options) {\n\t\treturn new SetNotNullCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor(\"setNotNull\"));\n\t}\n\tdropNotNull(options) {\n\t\treturn new DropNotNullCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor(\"dropNotNull\"));\n\t}\n\tsetDefault(options) {\n\t\trefuseEarlierSetDefaultOptions(options);\n\t\treturn new SetDefaultCall(options.schema, options.table, options.column, options.operationClass).toOp(this.controlAdapterFor(\"setDefault\"));\n\t}\n\tdropDefault(options) {\n\t\treturn new DropDefaultCall(options.schema, options.table, options.column).toOp(this.controlAdapterFor(\"dropDefault\"));\n\t}\n\tcreateIndex(options) {\n\t\treturn new CreateIndexCall(options.schema, options.table, options.index, options.columns !== void 0 ? { columns: options.columns } : { expression: options.expression }, options.extras).toOp(this.controlAdapterFor(\"createIndex\"));\n\t}\n\trenameIndex(options) {\n\t\treturn new RenameIndexCall(options.schema, options.table, options.from, options.to).toOp(this.controlAdapterFor(\"renameIndex\"));\n\t}\n\tdropIndex(options) {\n\t\treturn new DropIndexCall(options.schema, options.table, options.index).toOp(this.controlAdapterFor(\"dropIndex\"));\n\t}\n\tinstallExtension(options) {\n\t\treturn installExtension(options, this.controlAdapterFor(\"installExtension\"));\n\t}\n\tenableRowLevelSecurity(options) {\n\t\treturn new EnableRowLevelSecurityCall(options.schema, options.table).toOp(this.controlAdapterFor(\"enableRowLevelSecurity\"));\n\t}\n\tdisableRowLevelSecurity(options) {\n\t\treturn new DisableRowLevelSecurityCall(options.schema, options.table).toOp(this.controlAdapterFor(\"disableRowLevelSecurity\"));\n\t}\n\tcreateRlsPolicy(options) {\n\t\treturn new CreatePostgresRlsPolicyCall(options.schema, options.table, new PostgresRlsPolicy({\n\t\t\t...options.policy,\n\t\t\tusing: options.policy.using,\n\t\t\twithCheck: options.policy.withCheck\n\t\t})).toOp(this.controlAdapterFor(\"createRlsPolicy\"));\n\t}\n\tdropRlsPolicy(options) {\n\t\treturn new DropPostgresRlsPolicyCall(options.schema, options.table, options.policy).toOp(this.controlAdapterFor(\"dropRlsPolicy\"));\n\t}\n\trenameRlsPolicy(options) {\n\t\treturn new RenamePostgresRlsPolicyCall(options.schema, options.table, options.from, options.to).toOp(this.controlAdapterFor(\"renameRlsPolicy\"));\n\t}\n};\n/**\n* `setDefault` options an earlier version wrote carry the column's name in `column` and its default as SQL text in `defaultSql`.\n*/\nfunction refuseEarlierSetDefaultOptions(options) {\n\tconst column = options.column;\n\tconst columnIsName = typeof column === \"string\";\n\tif (!columnIsName && !Object.hasOwn(options, \"defaultSql\")) return;\n\tthrow errorMigrationOperationOptionRemoved({\n\t\toperation: \"setDefault\",\n\t\toption: \"defaultSql\",\n\t\tsubject: `column ${JSON.stringify(columnIsName ? column : options.column.name)} of table ${JSON.stringify(options.table)}`,\n\t\trewrite: \"Pass the column as `col(name, type, { default, codecRef })`, with its default written as `lit(value)` or `fn(expression)`, in place of its name and `defaultSql`.\",\n\t\tupgradeEntry: \"migration-ts-column-defaults\"\n\t});\n}\n//#endregion\nexport { pairCheckRenames as a, postgresRenderDefault as i, emissionSchemaForNamespace as n, pairIndexRenames as o, postgresContractToSchema as r, PostgresMigration as t };\n\n//# sourceMappingURL=postgres-migration-CmD95Eh_.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAyCA,SAAS,iBAAiB,SAAS,QAAQ;CAC1C,MAAM,2BAA2B,IAAI,IAAI;CACzC,MAAM,QAAQ,CAAC;CACf,IAAI,CAAC,QAAQ,OAAO,wBAAwB,SAAS,UAAU,GAAG,OAAO;EAC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