@prisma-next/target-postgres 0.13.0-dev.22 → 0.13.0-dev.23

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/contract-free.d.mts +17 -2
  2. package/dist/contract-free.d.mts.map +1 -1
  3. package/dist/contract-free.mjs +2 -2
  4. package/dist/control.mjs +1 -1
  5. package/dist/{ddl-77SyXgFt.mjs → ddl-DY2R_Yqz.mjs} +18 -3
  6. package/dist/ddl-DY2R_Yqz.mjs.map +1 -0
  7. package/dist/ddl.d.mts +2 -2
  8. package/dist/ddl.mjs +2 -2
  9. package/dist/{issue-planner-DsCMvGja.mjs → issue-planner-BcVsU7Hh.mjs} +19 -20
  10. package/dist/issue-planner-BcVsU7Hh.mjs.map +1 -0
  11. package/dist/issue-planner.d.mts +1 -1
  12. package/dist/issue-planner.d.mts.map +1 -1
  13. package/dist/issue-planner.mjs +1 -1
  14. package/dist/migration.d.mts +3 -4
  15. package/dist/migration.d.mts.map +1 -1
  16. package/dist/migration.mjs +3 -3
  17. package/dist/{nodes-DZk2JZG3.mjs → nodes-Bbhs2rwj.mjs} +31 -2
  18. package/dist/nodes-Bbhs2rwj.mjs.map +1 -0
  19. package/dist/{nodes-779hmCfL.d.mts → nodes-pLeLgdis.d.mts} +30 -3
  20. package/dist/nodes-pLeLgdis.d.mts.map +1 -0
  21. package/dist/{op-factory-call-BZ3xDgCY.mjs → op-factory-call-CQQwTUTj.mjs} +52 -33
  22. package/dist/op-factory-call-CQQwTUTj.mjs.map +1 -0
  23. package/dist/{op-factory-call-DEvD9sbB.d.mts → op-factory-call-DxjpXw-A.d.mts} +6 -5
  24. package/dist/op-factory-call-DxjpXw-A.d.mts.map +1 -0
  25. package/dist/op-factory-call.d.mts +1 -1
  26. package/dist/op-factory-call.mjs +1 -1
  27. package/dist/{planner-QWZaVIrn.mjs → planner-B_o3sWWt.mjs} +3 -3
  28. package/dist/{planner-QWZaVIrn.mjs.map → planner-B_o3sWWt.mjs.map} +1 -1
  29. package/dist/{planner-produced-postgres-migration-BHH6-2-1.mjs → planner-produced-postgres-migration-UBDGd5v_.mjs} +2 -2
  30. package/dist/{planner-produced-postgres-migration-BHH6-2-1.mjs.map → planner-produced-postgres-migration-UBDGd5v_.mjs.map} +1 -1
  31. package/dist/{planner-produced-postgres-migration-CIX9peJN.d.mts → planner-produced-postgres-migration-wLhnJMMA.d.mts} +2 -2
  32. package/dist/{planner-produced-postgres-migration-CIX9peJN.d.mts.map → planner-produced-postgres-migration-wLhnJMMA.d.mts.map} +1 -1
  33. package/dist/planner-produced-postgres-migration.d.mts +1 -1
  34. package/dist/planner-produced-postgres-migration.mjs +1 -1
  35. package/dist/planner.d.mts +1 -1
  36. package/dist/planner.mjs +1 -1
  37. package/dist/{postgres-migration-BN6TNJNf.mjs → postgres-migration-BQ62jZR_.mjs} +6 -2
  38. package/dist/postgres-migration-BQ62jZR_.mjs.map +1 -0
  39. package/dist/{postgres-migration-h_DA3LRq.d.mts → postgres-migration-DLXL0GBf.d.mts} +6 -1
  40. package/dist/postgres-migration-DLXL0GBf.d.mts.map +1 -0
  41. package/dist/{shared-DarONYBZ.d.mts → shared-jcsbXxiW.d.mts} +2 -20
  42. package/dist/shared-jcsbXxiW.d.mts.map +1 -0
  43. package/package.json +17 -17
  44. package/src/contract-free/ddl.ts +28 -1
  45. package/src/core/ddl/nodes.ts +59 -1
  46. package/src/core/migrations/issue-planner.ts +2 -16
  47. package/src/core/migrations/op-factory-call.ts +65 -9
  48. package/src/core/migrations/planner-strategies.ts +33 -15
  49. package/src/core/migrations/postgres-migration.ts +16 -1
  50. package/src/exports/contract-free.ts +1 -1
  51. package/src/exports/ddl.ts +4 -0
  52. package/src/exports/migration.ts +0 -1
  53. package/dist/ddl-77SyXgFt.mjs.map +0 -1
  54. package/dist/issue-planner-DsCMvGja.mjs.map +0 -1
  55. package/dist/nodes-779hmCfL.d.mts.map +0 -1
  56. package/dist/nodes-DZk2JZG3.mjs.map +0 -1
  57. package/dist/op-factory-call-BZ3xDgCY.mjs.map +0 -1
  58. package/dist/op-factory-call-DEvD9sbB.d.mts.map +0 -1
  59. package/dist/postgres-migration-BN6TNJNf.mjs.map +0 -1
  60. package/dist/postgres-migration-h_DA3LRq.d.mts.map +0 -1
  61. package/dist/shared-DarONYBZ.d.mts.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"op-factory-call-BZ3xDgCY.mjs","names":["exhaustive","contractFreeDdl.createTable","contractFreeDdl.createSchema"],"sources":["../src/core/migrations/operations/shared.ts","../src/core/migrations/operations/columns.ts","../src/core/migrations/operations/constraints.ts","../src/core/migrations/operations/dependencies.ts","../src/core/migrations/operations/enums.ts","../src/core/migrations/operations/indexes.ts","../src/core/migrations/operations/tables.ts","../src/core/migrations/op-factory-call.ts"],"sourcesContent":["import type { SqlMigrationPlanOperation } from '@prisma-next/family-sql/control';\nimport type { ReferentialAction } from '@prisma-next/sql-contract/types';\nimport { ifDefined } from '@prisma-next/utils/defined';\nimport { quoteIdentifier } from '../../sql-utils';\nimport type { OperationClass, PostgresPlanTargetDetails } from '../planner-target-details';\n\nexport type Op = SqlMigrationPlanOperation<PostgresPlanTargetDetails>;\n\n/**\n * Literal-args shape for a column definition consumed by `addColumn` and\n * similar operations. Fully materialized: codec expansion and default\n * rendering have already happened in the wrapper.\n *\n * - `typeSql` is the column's DDL type string (e.g. `\"integer\"`, `\"SERIAL\"`,\n * `\"varchar(100)\"`), already produced by `buildColumnTypeSql` in the\n * call-factory wrapper.\n * - `defaultSql` is the full `DEFAULT …` clause (e.g. `\"DEFAULT 42\"`) or an\n * empty string when the column has no default, matching\n * `buildColumnDefaultSql`'s output.\n */\nexport interface ColumnSpec {\n readonly name: string;\n readonly typeSql: string;\n readonly defaultSql: string;\n readonly nullable: boolean;\n}\n\n/**\n * Literal-args shape for a foreign key definition. `references.schema`\n * carries the target table's namespace (schema) coordinate so the rendered\n * DDL qualifies the REFERENCES clause correctly for cross-schema FKs.\n */\nexport interface ForeignKeySpec {\n readonly name: string;\n readonly columns: readonly string[];\n readonly references: {\n readonly schema: string;\n readonly table: string;\n readonly columns: readonly string[];\n };\n readonly onDelete?: ReferentialAction;\n readonly onUpdate?: ReferentialAction;\n}\n\nexport function step(description: string, sql: string) {\n return { description, sql };\n}\n\nexport function targetDetails(\n objectType: OperationClass,\n name: string,\n schema: string,\n table?: string,\n): { readonly id: 'postgres'; readonly details: PostgresPlanTargetDetails } {\n return {\n id: 'postgres',\n details: { schema, objectType, name, ...ifDefined('table', table) },\n };\n}\n\nexport function renderColumnDefinition(column: ColumnSpec): string {\n const parts = [\n quoteIdentifier(column.name),\n column.typeSql,\n column.defaultSql,\n column.nullable ? '' : 'NOT NULL',\n ].filter(Boolean);\n return parts.join(' ');\n}\n","import { quoteIdentifier } from '../../sql-utils';\nimport {\n columnDefaultExistsCheck,\n columnExistsCheck,\n columnNullabilityCheck,\n columnTypeCheck,\n qualifyTableName,\n} from '../planner-sql-checks';\nimport { type ColumnSpec, type Op, step, targetDetails } from './shared';\n\nexport function addColumn(schemaName: string, tableName: string, column: ColumnSpec): Op {\n const qualified = qualifyTableName(schemaName, tableName);\n const parts = [\n `ALTER TABLE ${qualified}`,\n `ADD COLUMN ${quoteIdentifier(column.name)} ${column.typeSql}`,\n column.defaultSql,\n column.nullable ? '' : 'NOT NULL',\n ].filter(Boolean);\n const addSql = parts.join(' ');\n\n return {\n id: `column.${tableName}.${column.name}`,\n label: `Add column \"${column.name}\" to \"${tableName}\"`,\n operationClass: 'additive',\n target: targetDetails('column', column.name, schemaName, tableName),\n precheck: [\n step(\n `ensure column \"${column.name}\" is missing`,\n columnExistsCheck({\n schema: schemaName,\n table: tableName,\n column: column.name,\n exists: false,\n }),\n ),\n ],\n execute: [step(`add column \"${column.name}\"`, addSql)],\n postcheck: [\n step(\n `verify column \"${column.name}\" exists`,\n columnExistsCheck({ schema: schemaName, table: tableName, column: column.name }),\n ),\n ],\n };\n}\n\nexport function dropColumn(schemaName: string, tableName: string, columnName: string): Op {\n const qualified = qualifyTableName(schemaName, tableName);\n return {\n id: `dropColumn.${tableName}.${columnName}`,\n label: `Drop column \"${columnName}\" from \"${tableName}\"`,\n operationClass: 'destructive',\n target: targetDetails('column', columnName, schemaName, tableName),\n precheck: [\n step(\n `ensure column \"${columnName}\" exists`,\n columnExistsCheck({ schema: schemaName, table: tableName, column: columnName }),\n ),\n ],\n execute: [\n step(\n `drop column \"${columnName}\"`,\n `ALTER TABLE ${qualified} DROP COLUMN ${quoteIdentifier(columnName)}`,\n ),\n ],\n postcheck: [\n step(\n `verify column \"${columnName}\" does not exist`,\n columnExistsCheck({\n schema: schemaName,\n table: tableName,\n column: columnName,\n exists: false,\n }),\n ),\n ],\n };\n}\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 */\nexport function alterColumnType(\n schemaName: string,\n tableName: string,\n columnName: string,\n options: {\n readonly qualifiedTargetType: string;\n readonly formatTypeExpected: string;\n readonly rawTargetTypeForLabel: string;\n readonly using?: string;\n },\n): Op {\n const qualified = qualifyTableName(schemaName, tableName);\n const usingClause = options.using\n ? ` USING ${options.using}`\n : ` USING ${quoteIdentifier(columnName)}::${options.qualifiedTargetType}`;\n return {\n id: `alterType.${tableName}.${columnName}`,\n label: `Alter type of \"${tableName}\".\"${columnName}\" to ${options.rawTargetTypeForLabel}`,\n operationClass: 'destructive',\n target: targetDetails('column', columnName, schemaName, tableName),\n precheck: [\n step(\n `ensure column \"${columnName}\" exists`,\n columnExistsCheck({ schema: schemaName, table: tableName, column: columnName }),\n ),\n ],\n execute: [\n step(\n `alter type of \"${columnName}\"`,\n `ALTER TABLE ${qualified} ALTER COLUMN ${quoteIdentifier(columnName)} TYPE ${options.qualifiedTargetType}${usingClause}`,\n ),\n ],\n postcheck: [\n step(\n `verify column \"${columnName}\" has type \"${options.formatTypeExpected}\"`,\n columnTypeCheck({\n schema: schemaName,\n table: tableName,\n column: columnName,\n expectedType: options.formatTypeExpected,\n }),\n ),\n ],\n meta: { warning: 'TABLE_REWRITE' },\n };\n}\n\nexport function setNotNull(schemaName: string, tableName: string, columnName: string): Op {\n const qualified = qualifyTableName(schemaName, tableName);\n return {\n id: `alterNullability.setNotNull.${tableName}.${columnName}`,\n label: `Set NOT NULL on \"${tableName}\".\"${columnName}\"`,\n operationClass: 'destructive',\n target: targetDetails('column', columnName, schemaName, tableName),\n precheck: [\n step(\n `ensure column \"${columnName}\" exists`,\n columnExistsCheck({ schema: schemaName, table: tableName, column: columnName }),\n ),\n step(\n `ensure no NULL values in \"${columnName}\"`,\n `SELECT NOT EXISTS (SELECT 1 FROM ${qualified} WHERE ${quoteIdentifier(columnName)} IS NULL)`,\n ),\n ],\n execute: [\n step(\n `set NOT NULL on \"${columnName}\"`,\n `ALTER TABLE ${qualified} ALTER COLUMN ${quoteIdentifier(columnName)} SET NOT NULL`,\n ),\n ],\n postcheck: [\n step(\n `verify column \"${columnName}\" is NOT NULL`,\n columnNullabilityCheck({\n schema: schemaName,\n table: tableName,\n column: columnName,\n nullable: false,\n }),\n ),\n ],\n };\n}\n\nexport function dropNotNull(schemaName: string, tableName: string, columnName: string): Op {\n const qualified = qualifyTableName(schemaName, tableName);\n return {\n id: `alterNullability.dropNotNull.${tableName}.${columnName}`,\n label: `Drop NOT NULL on \"${tableName}\".\"${columnName}\"`,\n operationClass: 'widening',\n target: targetDetails('column', columnName, schemaName, tableName),\n precheck: [\n step(\n `ensure column \"${columnName}\" exists`,\n columnExistsCheck({ schema: schemaName, table: tableName, column: columnName }),\n ),\n ],\n execute: [\n step(\n `drop NOT NULL on \"${columnName}\"`,\n `ALTER TABLE ${qualified} ALTER COLUMN ${quoteIdentifier(columnName)} DROP NOT NULL`,\n ),\n ],\n postcheck: [\n step(\n `verify column \"${columnName}\" is nullable`,\n columnNullabilityCheck({\n schema: schemaName,\n table: tableName,\n column: columnName,\n nullable: true,\n }),\n ),\n ],\n };\n}\n\n/**\n * `defaultSql` is the full `DEFAULT …` clause as produced by\n * `buildColumnDefaultSql` — e.g. `\"DEFAULT 42\"`,\n * `\"DEFAULT (CURRENT_TIMESTAMP)\"`, or `\"DEFAULT nextval('seq'::regclass)\"`.\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.\n */\nexport function setDefault(\n schemaName: string,\n tableName: string,\n columnName: string,\n defaultSql: string,\n operationClass: 'additive' | 'widening' = 'additive',\n): Op {\n const qualified = qualifyTableName(schemaName, tableName);\n return {\n id: `setDefault.${tableName}.${columnName}`,\n label: `Set default on \"${tableName}\".\"${columnName}\"`,\n operationClass,\n target: targetDetails('column', columnName, schemaName, tableName),\n precheck: [\n step(\n `ensure column \"${columnName}\" exists`,\n columnExistsCheck({ schema: schemaName, table: tableName, column: columnName }),\n ),\n ],\n execute: [\n step(\n `set default on \"${columnName}\"`,\n `ALTER TABLE ${qualified} ALTER COLUMN ${quoteIdentifier(columnName)} SET ${defaultSql}`,\n ),\n ],\n postcheck: [\n step(\n `verify column \"${columnName}\" has a default`,\n columnDefaultExistsCheck({\n schema: schemaName,\n table: tableName,\n column: columnName,\n exists: true,\n }),\n ),\n ],\n };\n}\n\nexport function dropDefault(schemaName: string, tableName: string, columnName: string): Op {\n const qualified = qualifyTableName(schemaName, tableName);\n return {\n id: `dropDefault.${tableName}.${columnName}`,\n label: `Drop default on \"${tableName}\".\"${columnName}\"`,\n operationClass: 'destructive',\n target: targetDetails('column', columnName, schemaName, tableName),\n precheck: [\n step(\n `ensure column \"${columnName}\" exists`,\n columnExistsCheck({ schema: schemaName, table: tableName, column: columnName }),\n ),\n ],\n execute: [\n step(\n `drop default on \"${columnName}\"`,\n `ALTER TABLE ${qualified} ALTER COLUMN ${quoteIdentifier(columnName)} DROP DEFAULT`,\n ),\n ],\n postcheck: [\n step(\n `verify column \"${columnName}\" has no default`,\n columnDefaultExistsCheck({\n schema: schemaName,\n table: tableName,\n column: columnName,\n exists: false,\n }),\n ),\n ],\n };\n}\n","import { REFERENTIAL_ACTION_SQL } from '@prisma-next/sql-contract/referential-action-sql';\nimport { escapeLiteral, quoteIdentifier } from '../../sql-utils';\nimport { constraintExistsCheck, qualifyTableName } from '../planner-sql-checks';\nimport { type ForeignKeySpec, type Op, step, targetDetails } from './shared';\n\nfunction renderForeignKeySql(schemaName: string, tableName: string, fk: ForeignKeySpec): string {\n let 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\n .map(quoteIdentifier)\n .join(', ')})`;\n\n if (fk.onDelete !== undefined) {\n const action = REFERENTIAL_ACTION_SQL[fk.onDelete];\n if (!action) {\n throw new Error(`Unknown referential action for onDelete: ${String(fk.onDelete)}`);\n }\n sql += `\\nON DELETE ${action}`;\n }\n if (fk.onUpdate !== undefined) {\n const action = REFERENTIAL_ACTION_SQL[fk.onUpdate];\n if (!action) {\n throw new Error(`Unknown referential action for onUpdate: ${String(fk.onUpdate)}`);\n }\n sql += `\\nON UPDATE ${action}`;\n }\n return sql;\n}\n\nexport function addPrimaryKey(\n schemaName: string,\n tableName: string,\n constraintName: string,\n columns: readonly string[],\n): Op {\n const qualified = qualifyTableName(schemaName, tableName);\n const columnList = columns.map(quoteIdentifier).join(', ');\n return {\n id: `primaryKey.${tableName}.${constraintName}`,\n label: `Add primary key on \"${tableName}\"`,\n operationClass: 'additive',\n target: targetDetails('primaryKey', constraintName, schemaName, tableName),\n precheck: [\n step(\n `ensure primary key \"${constraintName}\" does not exist`,\n constraintExistsCheck({\n constraintName,\n schema: schemaName,\n table: tableName,\n exists: false,\n }),\n ),\n ],\n execute: [\n step(\n `add primary key \"${constraintName}\"`,\n `ALTER TABLE ${qualified} ADD CONSTRAINT ${quoteIdentifier(constraintName)} PRIMARY KEY (${columnList})`,\n ),\n ],\n postcheck: [\n step(\n `verify primary key \"${constraintName}\" exists`,\n constraintExistsCheck({ constraintName, schema: schemaName, table: tableName }),\n ),\n ],\n };\n}\n\nexport function addUnique(\n schemaName: string,\n tableName: string,\n constraintName: string,\n columns: readonly string[],\n): Op {\n const qualified = qualifyTableName(schemaName, tableName);\n const columnList = columns.map(quoteIdentifier).join(', ');\n return {\n id: `unique.${tableName}.${constraintName}`,\n label: `Add unique constraint on \"${tableName}\" (${columns.join(', ')})`,\n operationClass: 'additive',\n target: targetDetails('unique', constraintName, schemaName, tableName),\n precheck: [\n step(\n `ensure constraint \"${constraintName}\" does not exist`,\n constraintExistsCheck({\n constraintName,\n schema: schemaName,\n table: tableName,\n exists: false,\n }),\n ),\n ],\n execute: [\n step(\n `add unique constraint \"${constraintName}\"`,\n `ALTER TABLE ${qualified} ADD CONSTRAINT ${quoteIdentifier(constraintName)} UNIQUE (${columnList})`,\n ),\n ],\n postcheck: [\n step(\n `verify constraint \"${constraintName}\" exists`,\n constraintExistsCheck({ constraintName, schema: schemaName, table: tableName }),\n ),\n ],\n };\n}\n\nexport function addForeignKey(schemaName: string, tableName: string, fk: ForeignKeySpec): Op {\n return {\n id: `foreignKey.${tableName}.${fk.name}`,\n label: `Add foreign key \"${fk.name}\" on \"${tableName}\"`,\n operationClass: 'additive',\n target: targetDetails('foreignKey', fk.name, schemaName, tableName),\n precheck: [\n step(\n `ensure FK \"${fk.name}\" does not exist`,\n constraintExistsCheck({\n constraintName: fk.name,\n schema: schemaName,\n table: tableName,\n exists: false,\n }),\n ),\n ],\n execute: [step(`add FK \"${fk.name}\"`, renderForeignKeySql(schemaName, tableName, fk))],\n postcheck: [\n step(\n `verify FK \"${fk.name}\" exists`,\n constraintExistsCheck({\n constraintName: fk.name,\n schema: schemaName,\n table: tableName,\n }),\n ),\n ],\n };\n}\n\nexport function addCheckConstraint(\n schemaName: string,\n tableName: string,\n constraintName: string,\n column: string,\n values: readonly string[],\n): Op {\n const qualified = qualifyTableName(schemaName, tableName);\n const valueList = values.map((v) => `'${escapeLiteral(v)}'`).join(', ');\n return {\n id: `checkConstraint.${tableName}.${constraintName}`,\n label: `Add check constraint \"${constraintName}\" on \"${tableName}\".\"${column}\"`,\n operationClass: 'additive',\n target: targetDetails('checkConstraint', constraintName, schemaName, tableName),\n precheck: [\n step(\n `ensure constraint \"${constraintName}\" does not exist`,\n constraintExistsCheck({\n constraintName,\n schema: schemaName,\n table: tableName,\n exists: false,\n }),\n ),\n ],\n execute: [\n step(\n `add check constraint \"${constraintName}\"`,\n `ALTER TABLE ${qualified} ADD CONSTRAINT ${quoteIdentifier(constraintName)} CHECK (${quoteIdentifier(column)} IN (${valueList}))`,\n ),\n ],\n postcheck: [\n step(\n `verify constraint \"${constraintName}\" exists`,\n constraintExistsCheck({ constraintName, schema: schemaName, table: tableName }),\n ),\n ],\n };\n}\n\nexport function dropCheckConstraint(\n schemaName: string,\n tableName: string,\n constraintName: string,\n): Op {\n const qualified = qualifyTableName(schemaName, tableName);\n return {\n id: `dropCheckConstraint.${tableName}.${constraintName}`,\n label: `Drop check constraint \"${constraintName}\" on \"${tableName}\"`,\n operationClass: 'destructive',\n target: targetDetails('checkConstraint', constraintName, schemaName, tableName),\n precheck: [\n step(\n `ensure constraint \"${constraintName}\" exists`,\n constraintExistsCheck({ constraintName, schema: schemaName, table: tableName }),\n ),\n ],\n execute: [\n step(\n `drop check constraint \"${constraintName}\"`,\n `ALTER TABLE ${qualified} DROP CONSTRAINT ${quoteIdentifier(constraintName)}`,\n ),\n ],\n postcheck: [\n step(\n `verify constraint \"${constraintName}\" does not exist`,\n constraintExistsCheck({\n constraintName,\n schema: schemaName,\n table: tableName,\n exists: false,\n }),\n ),\n ],\n };\n}\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 `SchemaIssue`\n * that produced the drop.\n */\nexport function dropConstraint(\n schemaName: string,\n tableName: string,\n constraintName: string,\n kind: 'foreignKey' | 'unique' | 'primaryKey' = 'unique',\n): Op {\n const qualified = qualifyTableName(schemaName, tableName);\n return {\n id: `dropConstraint.${tableName}.${constraintName}`,\n label: `Drop constraint \"${constraintName}\" on \"${tableName}\"`,\n operationClass: 'destructive',\n target: targetDetails(kind, constraintName, schemaName, tableName),\n precheck: [\n step(\n `ensure constraint \"${constraintName}\" exists`,\n constraintExistsCheck({ constraintName, schema: schemaName, table: tableName }),\n ),\n ],\n execute: [\n step(\n `drop constraint \"${constraintName}\"`,\n `ALTER TABLE ${qualified} DROP CONSTRAINT ${quoteIdentifier(constraintName)}`,\n ),\n ],\n postcheck: [\n step(\n `verify constraint \"${constraintName}\" does not exist`,\n constraintExistsCheck({\n constraintName,\n schema: schemaName,\n table: tableName,\n exists: false,\n }),\n ),\n ],\n };\n}\n","import { quoteIdentifier } from '../../sql-utils';\nimport { type Op, step } from './shared';\n\nexport function createExtension(extensionName: string): Op {\n return {\n id: `extension.${extensionName}`,\n label: `Create extension \"${extensionName}\"`,\n operationClass: 'additive',\n target: { id: 'postgres' },\n precheck: [],\n execute: [\n step(\n `Create extension \"${extensionName}\"`,\n `CREATE EXTENSION IF NOT EXISTS ${quoteIdentifier(extensionName)}`,\n ),\n ],\n postcheck: [],\n };\n}\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 */\nexport function installExtension(options: {\n readonly extensionName: string;\n readonly invariantId: string;\n readonly id: string;\n readonly label?: string;\n}): Op {\n const { extensionName, invariantId, id } = options;\n const label = options.label ?? `Enable extension \"${extensionName}\"`;\n return {\n id,\n label,\n operationClass: 'additive',\n invariantId,\n target: {\n id: 'postgres',\n details: { schema: 'public', objectType: 'dependency', name: extensionName },\n },\n precheck: [\n step(\n `verify extension \"${extensionName}\" is not already enabled`,\n `SELECT NOT EXISTS (SELECT 1 FROM pg_extension WHERE extname = '${extensionName}')`,\n ),\n ],\n execute: [\n step(\n `create extension \"${extensionName}\"`,\n `CREATE EXTENSION IF NOT EXISTS ${extensionName}`,\n ),\n ],\n postcheck: [\n step(\n `confirm extension \"${extensionName}\" is enabled`,\n `SELECT EXISTS (SELECT 1 FROM pg_extension WHERE extname = '${extensionName}')`,\n ),\n ],\n };\n}\n","import { escapeLiteral, qualifyName, quoteIdentifier } from '../../sql-utils';\nimport { type Op, step, targetDetails } from './shared';\n\nfunction enumTypeExistsCheck(schemaName: string, nativeType: string, exists = true): string {\n const clause = exists ? 'EXISTS' : 'NOT EXISTS';\n return `SELECT ${clause} (\n SELECT 1\n FROM pg_type t\n JOIN pg_namespace n ON t.typnamespace = n.oid\n WHERE n.nspname = '${escapeLiteral(schemaName)}'\n AND t.typname = '${escapeLiteral(nativeType)}'\n)`;\n}\n\nexport function createEnumType(\n schemaName: string,\n typeName: string,\n values: readonly string[],\n nativeType: string = typeName,\n): Op {\n const qualifiedType = qualifyName(schemaName, nativeType);\n const literalValues = values.map((v) => `'${escapeLiteral(v)}'`).join(', ');\n return {\n id: `type.${typeName}`,\n label: `Create enum type \"${typeName}\"`,\n operationClass: 'additive',\n target: targetDetails('type', typeName, schemaName),\n precheck: [\n step(\n `ensure type \"${nativeType}\" does not exist`,\n enumTypeExistsCheck(schemaName, nativeType, false),\n ),\n ],\n execute: [\n step(\n `create enum type \"${typeName}\"`,\n `CREATE TYPE ${qualifiedType} AS ENUM (${literalValues})`,\n ),\n ],\n postcheck: [\n step(`verify type \"${nativeType}\" exists`, enumTypeExistsCheck(schemaName, nativeType)),\n ],\n };\n}\n\n/**\n * `typeName` is the contract-facing type name (used for id/label).\n * `nativeType` is the Postgres type name to mutate (may differ for external types).\n */\nexport function addEnumValues(\n schemaName: string,\n typeName: string,\n nativeType: string,\n values: readonly string[],\n): Op {\n const qualifiedType = qualifyName(schemaName, nativeType);\n return {\n id: `type.${typeName}.addValues`,\n label: `Add values to enum type \"${typeName}\": ${values.join(', ')}`,\n operationClass: 'additive',\n target: targetDetails('type', typeName, schemaName),\n precheck: [\n step(`ensure type \"${nativeType}\" exists`, enumTypeExistsCheck(schemaName, nativeType)),\n ],\n execute: values.map((value) =>\n step(\n `add value '${value}' to enum \"${nativeType}\"`,\n `ALTER TYPE ${qualifiedType} ADD VALUE '${escapeLiteral(value)}'`,\n ),\n ),\n postcheck: [\n step(`verify type \"${nativeType}\" exists`, enumTypeExistsCheck(schemaName, nativeType)),\n ],\n };\n}\n\nexport function dropEnumType(schemaName: string, typeName: string): Op {\n const qualified = qualifyName(schemaName, typeName);\n return {\n id: `type.${typeName}.drop`,\n label: `Drop enum type \"${typeName}\"`,\n operationClass: 'destructive',\n target: targetDetails('type', typeName, schemaName),\n precheck: [step(`ensure type \"${typeName}\" exists`, enumTypeExistsCheck(schemaName, typeName))],\n execute: [step(`drop enum type \"${typeName}\"`, `DROP TYPE ${qualified}`)],\n postcheck: [\n step(`verify type \"${typeName}\" removed`, enumTypeExistsCheck(schemaName, typeName, false)),\n ],\n };\n}\n\nexport function renameType(schemaName: string, fromName: string, toName: string): Op {\n const qualifiedFrom = qualifyName(schemaName, fromName);\n return {\n id: `type.${fromName}.rename`,\n label: `Rename type \"${fromName}\" to \"${toName}\"`,\n operationClass: 'destructive',\n target: targetDetails('type', fromName, schemaName),\n precheck: [\n step(`ensure type \"${fromName}\" exists`, enumTypeExistsCheck(schemaName, fromName)),\n step(\n `ensure type \"${toName}\" does not already exist`,\n enumTypeExistsCheck(schemaName, toName, false),\n ),\n ],\n execute: [\n step(\n `rename type \"${fromName}\" to \"${toName}\"`,\n `ALTER TYPE ${qualifiedFrom} RENAME TO ${quoteIdentifier(toName)}`,\n ),\n ],\n postcheck: [step(`verify type \"${toName}\" exists`, enumTypeExistsCheck(schemaName, toName))],\n };\n}\n","import { escapeLiteral, quoteIdentifier } from '../../sql-utils';\nimport { qualifyTableName, toRegclassLiteral } from '../planner-sql-checks';\nimport { type Op, step, targetDetails } from './shared';\n\nexport interface CreateIndexExtras {\n readonly type?: string;\n readonly options?: Record<string, unknown>;\n}\n\nfunction renderIndexOptionValue(key: string, value: unknown): string {\n if (typeof value === 'string') return `'${escapeLiteral(value)}'`;\n if (typeof value === 'number' && Number.isFinite(value)) return String(value);\n if (typeof value === 'boolean') return value ? 'true' : 'false';\n throw new Error(\n `Index option \"${key}\" must be a string, finite number, or boolean; got ${typeof value}`,\n );\n}\n\nfunction renderIndexOptions(options: Record<string, unknown>): string {\n return Object.entries(options)\n .map(([key, value]) => `${quoteIdentifier(key)} = ${renderIndexOptionValue(key, value)}`)\n .join(', ');\n}\n\nexport function createIndex(\n schemaName: string,\n tableName: string,\n indexName: string,\n columns: readonly string[],\n extras?: CreateIndexExtras,\n): Op {\n const qualified = qualifyTableName(schemaName, tableName);\n const columnList = columns.map(quoteIdentifier).join(', ');\n const using = extras?.type ? ` USING ${quoteIdentifier(extras.type)}` : '';\n const options = extras?.options;\n const withClause =\n options && Object.keys(options).length > 0 ? ` WITH (${renderIndexOptions(options)})` : '';\n return {\n id: `index.${tableName}.${indexName}`,\n label: `Create index \"${indexName}\" on \"${tableName}\"`,\n operationClass: 'additive',\n target: targetDetails('index', indexName, schemaName, tableName),\n precheck: [\n step(\n `ensure index \"${indexName}\" does not exist`,\n `SELECT to_regclass(${toRegclassLiteral(schemaName, indexName)}) IS NULL`,\n ),\n ],\n execute: [\n step(\n `create index \"${indexName}\"`,\n `CREATE INDEX ${quoteIdentifier(indexName)} ON ${qualified}${using} (${columnList})${withClause}`,\n ),\n ],\n postcheck: [\n step(\n `verify index \"${indexName}\" exists`,\n `SELECT to_regclass(${toRegclassLiteral(schemaName, indexName)}) IS NOT NULL`,\n ),\n ],\n };\n}\n\nexport function dropIndex(schemaName: string, tableName: string, indexName: string): Op {\n return {\n id: `dropIndex.${tableName}.${indexName}`,\n label: `Drop index \"${indexName}\"`,\n operationClass: 'destructive',\n target: targetDetails('index', indexName, schemaName, tableName),\n precheck: [\n step(\n `ensure index \"${indexName}\" exists`,\n `SELECT to_regclass(${toRegclassLiteral(schemaName, indexName)}) IS NOT NULL`,\n ),\n ],\n execute: [\n step(`drop index \"${indexName}\"`, `DROP INDEX ${qualifyTableName(schemaName, indexName)}`),\n ],\n postcheck: [\n step(\n `verify index \"${indexName}\" does not exist`,\n `SELECT to_regclass(${toRegclassLiteral(schemaName, indexName)}) IS NULL`,\n ),\n ],\n };\n}\n","import { qualifyTableName, toRegclassLiteral } from '../planner-sql-checks';\nimport { type Op, step, targetDetails } from './shared';\n\nexport function dropTable(schemaName: string, tableName: string): Op {\n const qualified = qualifyTableName(schemaName, tableName);\n return {\n id: `dropTable.${tableName}`,\n label: `Drop table \"${tableName}\"`,\n operationClass: 'destructive',\n target: targetDetails('table', tableName, schemaName),\n precheck: [\n step(\n `ensure table \"${tableName}\" exists`,\n `SELECT to_regclass(${toRegclassLiteral(schemaName, tableName)}) IS NOT NULL`,\n ),\n ],\n execute: [step(`drop table \"${tableName}\"`, `DROP TABLE ${qualified}`)],\n postcheck: [\n step(\n `verify table \"${tableName}\" does not exist`,\n `SELECT to_regclass(${toRegclassLiteral(schemaName, tableName)}) IS NULL`,\n ),\n ],\n };\n}\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 * `PN-MIG-2001` 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 */\n\nimport { errorUnfilledPlaceholder } from '@prisma-next/errors/migration';\nimport type { SqlMigrationPlanOperation } from '@prisma-next/family-sql/control';\nimport type { ExecuteRequestLowerer, Lowerer } from '@prisma-next/family-sql/control-adapter';\nimport type {\n OpFactoryCall as FrameworkOpFactoryCall,\n MigrationOperationClass,\n} from '@prisma-next/framework-components/control';\nimport { UNBOUND_NAMESPACE_ID } from '@prisma-next/framework-components/ir';\nimport type {\n AnyDdlColumnDefault,\n DdlColumn,\n DdlTableConstraint,\n} from '@prisma-next/sql-relational-core/ast';\nimport { FunctionColumnDefault, LiteralColumnDefault } from '@prisma-next/sql-relational-core/ast';\nimport { type ImportRequirement, jsonToTsSource, TsExpression } from '@prisma-next/ts-render';\nimport { blindCast } from '@prisma-next/utils/casts';\nimport { ifDefined } from '@prisma-next/utils/defined';\nimport * as contractFreeDdl from '../../contract-free/ddl';\nimport { escapeLiteral, quoteIdentifier } from '../sql-utils';\nimport type { PostgresColumnDefault } from '../types';\nimport {\n addColumn,\n alterColumnType,\n dropColumn,\n dropDefault,\n dropNotNull,\n setDefault,\n setNotNull,\n} from './operations/columns';\nimport {\n addCheckConstraint,\n addForeignKey,\n addPrimaryKey,\n addUnique,\n dropCheckConstraint,\n dropConstraint,\n} from './operations/constraints';\nimport { createExtension } from './operations/dependencies';\nimport { addEnumValues, createEnumType, dropEnumType, renameType } from './operations/enums';\nimport { createIndex, dropIndex } from './operations/indexes';\nimport type { ColumnSpec, ForeignKeySpec } from './operations/shared';\nimport { step, targetDetails } from './operations/shared';\nimport { dropTable } from './operations/tables';\nimport { toRegclassLiteral } from './planner-sql-checks';\nimport type { PostgresPlanTargetDetails } from './planner-target-details';\n\ntype Op = SqlMigrationPlanOperation<PostgresPlanTargetDetails>;\n\n// Single module specifier emitted in user-edited `migration.ts` imports. The\n// Postgres migration facade re-exports both the `*Call` factory names\n// (createTable / addColumn / …) and the contract-free DDL builders\n// (col / lit / fn / primaryKey / foreignKey / unique) from\n// sql-relational-core/contract-free. We emit imports against the facade,\n// not against the underlying sql-relational-core subpath, because user\n// projects depend on `@prisma-next/postgres` (a runtime dep of every\n// init-scaffolded project) — they do not depend on the internal\n// `@prisma-next/sql-relational-core` package, so an emitted\n// `import … from '@prisma-next/sql-relational-core/contract-free'` fails\n// ESM resolution at runtime in user migrations even though pnpm has the\n// transitive package on disk.\nconst POSTGRES_MIGRATION_FACADE = '@prisma-next/postgres/migration';\n\nabstract class PostgresOpFactoryCallNode extends TsExpression implements FrameworkOpFactoryCall {\n abstract readonly factoryName: string;\n abstract readonly operationClass: MigrationOperationClass;\n abstract readonly label: string;\n abstract toOp(lowerer?: Lowerer): Op | Promise<Op>;\n\n importRequirements(): readonly ImportRequirement[] {\n return [{ moduleSpecifier: POSTGRES_MIGRATION_FACADE, symbol: this.factoryName }];\n }\n\n protected freeze(): void {\n Object.freeze(this);\n }\n}\n\n// ============================================================================\n// Table\n// ============================================================================\n\nexport function postgresDefaultToDdlColumnDefault(\n columnDefault: PostgresColumnDefault | undefined,\n): DdlColumn['default'] {\n if (!columnDefault) return undefined;\n switch (columnDefault.kind) {\n case 'literal':\n return new LiteralColumnDefault(columnDefault.value);\n case 'function':\n if (columnDefault.expression === 'autoincrement()') return undefined;\n return new FunctionColumnDefault(columnDefault.expression);\n case 'sequence':\n return new FunctionColumnDefault(\n `nextval('${escapeLiteral(quoteIdentifier(columnDefault.name))}'::regclass)`,\n );\n default: {\n const exhaustive: never = columnDefault;\n throw new Error(\n `postgresDefaultToDdlColumnDefault: unhandled kind \"${blindCast<{ kind: string }, 'exhaustiveness: surface the unhandled default kind'>(exhaustive).kind}\"`,\n );\n }\n }\n}\n\n// ---------------------------------------------------------------------------\n// TypeScript rendering helpers for DdlColumn / DdlTableConstraint\n// ---------------------------------------------------------------------------\n\nfunction renderDdlColumnDefault(def: AnyDdlColumnDefault | undefined): string {\n if (!def) return '';\n if (def.kind === 'literal') {\n return `lit(${jsonToTsSource(def.value)})`;\n }\n return `fn(${jsonToTsSource(def.expression)})`;\n}\n\nfunction renderDdlColumnAsTsCall(col: DdlColumn): string {\n const opts: string[] = [];\n if (col.notNull) opts.push('notNull: true');\n if (col.primaryKey) opts.push('primaryKey: true');\n if (col.default) opts.push(`default: ${renderDdlColumnDefault(col.default)}`);\n const optsStr = opts.length > 0 ? `, { ${opts.join(', ')} }` : '';\n return `col(${jsonToTsSource(col.name)}, ${jsonToTsSource(col.type)}${optsStr})`;\n}\n\nfunction renderDdlConstraintAsTsCall(constraint: DdlTableConstraint): string {\n switch (constraint.kind) {\n case 'primary-key': {\n const nameOpt = constraint.name ? `, { name: ${jsonToTsSource(constraint.name)} }` : '';\n return `primaryKey(${jsonToTsSource(constraint.columns)}${nameOpt})`;\n }\n case 'foreign-key': {\n const opts: string[] = [];\n if (constraint.name) opts.push(`name: ${jsonToTsSource(constraint.name)}`);\n if (constraint.onDelete) opts.push(`onDelete: ${jsonToTsSource(constraint.onDelete)}`);\n if (constraint.onUpdate) opts.push(`onUpdate: ${jsonToTsSource(constraint.onUpdate)}`);\n const optsStr = opts.length > 0 ? `, { ${opts.join(', ')} }` : '';\n return `foreignKey(${jsonToTsSource(constraint.columns)}, ${jsonToTsSource(constraint.refTable)}, ${jsonToTsSource(constraint.refColumns)}${optsStr})`;\n }\n case 'unique': {\n const nameOpt = constraint.name ? `, { name: ${jsonToTsSource(constraint.name)} }` : '';\n return `unique(${jsonToTsSource(constraint.columns)}${nameOpt})`;\n }\n }\n}\n\nfunction needsColOrConstraintImport(columns: readonly DdlColumn[]): boolean {\n return columns.length > 0;\n}\n\nfunction constraintImportSymbols(constraints: readonly DdlTableConstraint[] | undefined): string[] {\n if (!constraints || constraints.length === 0) return [];\n const symbols = new Set<string>();\n for (const c of constraints) {\n if (c.kind === 'primary-key') symbols.add('primaryKey');\n else if (c.kind === 'foreign-key') symbols.add('foreignKey');\n else if (c.kind === 'unique') symbols.add('unique');\n }\n return [...symbols];\n}\n\nfunction defaultImportSymbols(columns: readonly DdlColumn[]): string[] {\n const symbols = new Set<string>();\n for (const col of columns) {\n if (col.default?.kind === 'literal') symbols.add('lit');\n else if (col.default?.kind === 'function') symbols.add('fn');\n }\n return [...symbols];\n}\n\nexport class CreateTableCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'createTable' as const;\n readonly operationClass = 'additive' as const;\n readonly schemaName: string;\n readonly tableName: string;\n readonly columns: readonly DdlColumn[];\n readonly constraints: readonly DdlTableConstraint[] | undefined;\n readonly label: string;\n\n constructor(\n schemaName: string,\n tableName: string,\n columns: readonly DdlColumn[],\n constraints?: readonly DdlTableConstraint[],\n ) {\n super();\n this.schemaName = schemaName;\n this.tableName = tableName;\n this.columns = Object.freeze([...columns]);\n this.constraints = constraints ? Object.freeze([...constraints]) : undefined;\n this.label = `Create table \"${tableName}\"`;\n this.freeze();\n }\n\n async toOp(lowerer?: ExecuteRequestLowerer): Promise<Op> {\n if (lowerer === undefined) {\n throw new Error(\n `CreateTableCall.toOp: a DDL lowerer is required on the Postgres planner path (table \"${this.tableName}\"). Pass the control adapter to createPostgresMigrationPlanner.`,\n );\n }\n const ddlNode = contractFreeDdl.createTable({\n ...(this.schemaName !== UNBOUND_NAMESPACE_ID ? { schema: this.schemaName } : {}),\n table: this.tableName,\n columns: this.columns,\n ...ifDefined('constraints', this.constraints),\n });\n const statement = await lowerer.lowerToExecuteRequest(ddlNode);\n const schemaName = this.schemaName;\n const tableName = this.tableName;\n return {\n id: `table.${tableName}`,\n label: `Create table \"${tableName}\"`,\n summary: `Creates table \"${tableName}\"`,\n operationClass: 'additive',\n target: targetDetails('table', tableName, schemaName),\n precheck: [\n step(\n `ensure table \"${tableName}\" does not exist`,\n `SELECT to_regclass(${toRegclassLiteral(schemaName, tableName)}) IS NULL`,\n ),\n ],\n execute: [\n {\n description: `create table \"${tableName}\"`,\n sql: statement.sql,\n params: statement.params ?? [],\n },\n ],\n postcheck: [\n step(\n `verify table \"${tableName}\" exists`,\n `SELECT to_regclass(${toRegclassLiteral(schemaName, tableName)}) IS NOT NULL`,\n ),\n ],\n };\n }\n\n renderTypeScript(): string {\n const columnsList = this.columns.map(renderDdlColumnAsTsCall).join(', ');\n const constraintsList = this.constraints\n ? this.constraints.map(renderDdlConstraintAsTsCall).join(', ')\n : undefined;\n\n const opts: string[] = [];\n if (this.schemaName !== UNBOUND_NAMESPACE_ID) {\n opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);\n }\n opts.push(`table: ${jsonToTsSource(this.tableName)}`);\n opts.push(`columns: [${columnsList}]`);\n if (constraintsList) opts.push(`constraints: [${constraintsList}]`);\n\n return `this.createTable({ ${opts.join(', ')} })`;\n }\n\n override importRequirements(): readonly ImportRequirement[] {\n const req: ImportRequirement[] = [];\n if (needsColOrConstraintImport(this.columns)) {\n req.push({ moduleSpecifier: POSTGRES_MIGRATION_FACADE, symbol: 'col' });\n for (const sym of defaultImportSymbols(this.columns)) {\n req.push({ moduleSpecifier: POSTGRES_MIGRATION_FACADE, symbol: sym });\n }\n }\n for (const sym of constraintImportSymbols(this.constraints)) {\n req.push({ moduleSpecifier: POSTGRES_MIGRATION_FACADE, symbol: sym });\n }\n return req;\n }\n}\n\nexport class DropTableCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'dropTable' as const;\n readonly operationClass = 'destructive' as const;\n readonly schemaName: string;\n readonly tableName: string;\n readonly label: string;\n\n constructor(schemaName: string, tableName: string) {\n super();\n this.schemaName = schemaName;\n this.tableName = tableName;\n this.label = `Drop table \"${tableName}\"`;\n this.freeze();\n }\n\n toOp(): Op {\n return dropTable(this.schemaName, this.tableName);\n }\n\n renderTypeScript(): string {\n return `dropTable(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)})`;\n }\n}\n\n// ============================================================================\n// Column\n// ============================================================================\n\nexport class AddColumnCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'addColumn' as const;\n readonly operationClass = 'additive' as const;\n readonly schemaName: string;\n readonly tableName: string;\n readonly column: ColumnSpec;\n readonly label: string;\n\n constructor(schemaName: string, tableName: string, column: ColumnSpec) {\n super();\n this.schemaName = schemaName;\n this.tableName = tableName;\n this.column = column;\n this.label = `Add column \"${column.name}\" to \"${tableName}\"`;\n this.freeze();\n }\n\n toOp(): Op {\n return addColumn(this.schemaName, this.tableName, this.column);\n }\n\n renderTypeScript(): string {\n return `addColumn(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.column)})`;\n }\n}\n\nexport class DropColumnCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'dropColumn' as const;\n readonly operationClass = 'destructive' as const;\n readonly schemaName: string;\n readonly tableName: string;\n readonly columnName: string;\n readonly label: string;\n\n constructor(schemaName: string, tableName: string, columnName: string) {\n super();\n this.schemaName = schemaName;\n this.tableName = tableName;\n this.columnName = columnName;\n this.label = `Drop column \"${columnName}\" from \"${tableName}\"`;\n this.freeze();\n }\n\n toOp(): Op {\n return dropColumn(this.schemaName, this.tableName, this.columnName);\n }\n\n renderTypeScript(): string {\n return `dropColumn(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.columnName)})`;\n }\n}\n\nexport interface AlterColumnTypeOptions {\n readonly qualifiedTargetType: string;\n readonly formatTypeExpected: string;\n readonly rawTargetTypeForLabel: string;\n readonly using?: string;\n}\n\nexport class AlterColumnTypeCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'alterColumnType' as const;\n readonly operationClass = 'destructive' as const;\n readonly schemaName: string;\n readonly tableName: string;\n readonly columnName: string;\n readonly options: AlterColumnTypeOptions;\n readonly label: string;\n\n constructor(\n schemaName: string,\n tableName: string,\n columnName: string,\n options: AlterColumnTypeOptions,\n ) {\n super();\n this.schemaName = schemaName;\n this.tableName = tableName;\n this.columnName = columnName;\n this.options = options;\n this.label = `Alter type of \"${tableName}\".\"${columnName}\" to ${options.rawTargetTypeForLabel}`;\n this.freeze();\n }\n\n toOp(): Op {\n return alterColumnType(this.schemaName, this.tableName, this.columnName, this.options);\n }\n\n renderTypeScript(): string {\n return `alterColumnType(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.columnName)}, ${jsonToTsSource(this.options)})`;\n }\n}\n\nexport class SetNotNullCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'setNotNull' as const;\n readonly operationClass = 'destructive' as const;\n readonly schemaName: string;\n readonly tableName: string;\n readonly columnName: string;\n readonly label: string;\n\n constructor(schemaName: string, tableName: string, columnName: string) {\n super();\n this.schemaName = schemaName;\n this.tableName = tableName;\n this.columnName = columnName;\n this.label = `Set NOT NULL on \"${tableName}\".\"${columnName}\"`;\n this.freeze();\n }\n\n toOp(): Op {\n return setNotNull(this.schemaName, this.tableName, this.columnName);\n }\n\n renderTypeScript(): string {\n return `setNotNull(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.columnName)})`;\n }\n}\n\nexport class DropNotNullCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'dropNotNull' as const;\n readonly operationClass = 'widening' as const;\n readonly schemaName: string;\n readonly tableName: string;\n readonly columnName: string;\n readonly label: string;\n\n constructor(schemaName: string, tableName: string, columnName: string) {\n super();\n this.schemaName = schemaName;\n this.tableName = tableName;\n this.columnName = columnName;\n this.label = `Drop NOT NULL on \"${tableName}\".\"${columnName}\"`;\n this.freeze();\n }\n\n toOp(): Op {\n return dropNotNull(this.schemaName, this.tableName, this.columnName);\n }\n\n renderTypeScript(): string {\n return `dropNotNull(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.columnName)})`;\n }\n}\n\nexport class SetDefaultCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'setDefault' as const;\n readonly operationClass: 'additive' | 'widening';\n readonly schemaName: string;\n readonly tableName: string;\n readonly columnName: string;\n readonly defaultSql: string;\n readonly label: string;\n\n constructor(\n schemaName: string,\n tableName: string,\n columnName: string,\n defaultSql: string,\n operationClass: 'additive' | 'widening' = 'additive',\n ) {\n super();\n this.schemaName = schemaName;\n this.tableName = tableName;\n this.columnName = columnName;\n this.defaultSql = defaultSql;\n this.operationClass = operationClass;\n this.label = `Set default on \"${tableName}\".\"${columnName}\"`;\n this.freeze();\n }\n\n toOp(): Op {\n return setDefault(\n this.schemaName,\n this.tableName,\n this.columnName,\n this.defaultSql,\n this.operationClass,\n );\n }\n\n renderTypeScript(): string {\n const args = [\n jsonToTsSource(this.schemaName),\n jsonToTsSource(this.tableName),\n jsonToTsSource(this.columnName),\n jsonToTsSource(this.defaultSql),\n ];\n if (this.operationClass !== 'additive') {\n args.push(jsonToTsSource(this.operationClass));\n }\n return `setDefault(${args.join(', ')})`;\n }\n}\n\nexport class DropDefaultCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'dropDefault' as const;\n readonly operationClass = 'destructive' as const;\n readonly schemaName: string;\n readonly tableName: string;\n readonly columnName: string;\n readonly label: string;\n\n constructor(schemaName: string, tableName: string, columnName: string) {\n super();\n this.schemaName = schemaName;\n this.tableName = tableName;\n this.columnName = columnName;\n this.label = `Drop default on \"${tableName}\".\"${columnName}\"`;\n this.freeze();\n }\n\n toOp(): Op {\n return dropDefault(this.schemaName, this.tableName, this.columnName);\n }\n\n renderTypeScript(): string {\n return `dropDefault(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.columnName)})`;\n }\n}\n\n// ============================================================================\n// Constraints\n// ============================================================================\n\nexport class AddPrimaryKeyCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'addPrimaryKey' as const;\n readonly operationClass = 'additive' as const;\n readonly schemaName: string;\n readonly tableName: string;\n readonly constraintName: string;\n readonly columns: readonly string[];\n readonly label: string;\n\n constructor(\n schemaName: string,\n tableName: string,\n constraintName: string,\n columns: readonly string[],\n ) {\n super();\n this.schemaName = schemaName;\n this.tableName = tableName;\n this.constraintName = constraintName;\n this.columns = columns;\n this.label = `Add primary key on \"${tableName}\"`;\n this.freeze();\n }\n\n toOp(): Op {\n return addPrimaryKey(this.schemaName, this.tableName, this.constraintName, this.columns);\n }\n\n renderTypeScript(): string {\n return `addPrimaryKey(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.constraintName)}, ${jsonToTsSource(this.columns)})`;\n }\n}\n\nexport class AddUniqueCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'addUnique' as const;\n readonly operationClass = 'additive' as const;\n readonly schemaName: string;\n readonly tableName: string;\n readonly constraintName: string;\n readonly columns: readonly string[];\n readonly label: string;\n\n constructor(\n schemaName: string,\n tableName: string,\n constraintName: string,\n columns: readonly string[],\n ) {\n super();\n this.schemaName = schemaName;\n this.tableName = tableName;\n this.constraintName = constraintName;\n this.columns = columns;\n this.label = `Add unique constraint on \"${tableName}\" (${columns.join(', ')})`;\n this.freeze();\n }\n\n toOp(): Op {\n return addUnique(this.schemaName, this.tableName, this.constraintName, this.columns);\n }\n\n renderTypeScript(): string {\n return `addUnique(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.constraintName)}, ${jsonToTsSource(this.columns)})`;\n }\n}\n\nexport class AddForeignKeyCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'addForeignKey' as const;\n readonly operationClass = 'additive' as const;\n readonly schemaName: string;\n readonly tableName: string;\n readonly fk: ForeignKeySpec;\n readonly label: string;\n\n constructor(schemaName: string, tableName: string, fk: ForeignKeySpec) {\n super();\n this.schemaName = schemaName;\n this.tableName = tableName;\n this.fk = fk;\n this.label = `Add foreign key \"${fk.name}\" on \"${tableName}\"`;\n this.freeze();\n }\n\n toOp(): Op {\n return addForeignKey(this.schemaName, this.tableName, this.fk);\n }\n\n renderTypeScript(): string {\n return `addForeignKey(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.fk)})`;\n }\n}\n\nexport class DropConstraintCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'dropConstraint' as const;\n readonly operationClass = 'destructive' as const;\n readonly schemaName: string;\n readonly tableName: string;\n readonly constraintName: string;\n readonly kind: 'foreignKey' | 'unique' | 'primaryKey';\n readonly label: string;\n\n constructor(\n schemaName: string,\n tableName: string,\n constraintName: string,\n kind: 'foreignKey' | 'unique' | 'primaryKey' = 'unique',\n ) {\n super();\n this.schemaName = schemaName;\n this.tableName = tableName;\n this.constraintName = constraintName;\n this.kind = kind;\n this.label = `Drop constraint \"${constraintName}\" on \"${tableName}\"`;\n this.freeze();\n }\n\n toOp(): Op {\n return dropConstraint(this.schemaName, this.tableName, this.constraintName, this.kind);\n }\n\n renderTypeScript(): string {\n const args = [\n jsonToTsSource(this.schemaName),\n jsonToTsSource(this.tableName),\n jsonToTsSource(this.constraintName),\n ];\n if (this.kind !== 'unique') {\n args.push(jsonToTsSource(this.kind));\n }\n return `dropConstraint(${args.join(', ')})`;\n }\n}\n\nexport class AddCheckConstraintCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'addCheckConstraint' as const;\n readonly operationClass = 'additive' as const;\n readonly schemaName: string;\n readonly tableName: string;\n readonly constraintName: string;\n readonly column: string;\n readonly values: readonly string[];\n readonly label: string;\n\n constructor(\n schemaName: string,\n tableName: string,\n constraintName: string,\n column: string,\n values: readonly string[],\n ) {\n super();\n this.schemaName = schemaName;\n this.tableName = tableName;\n this.constraintName = constraintName;\n this.column = column;\n this.values = values;\n this.label = `Add check constraint \"${constraintName}\" on \"${tableName}\".\"${column}\"`;\n this.freeze();\n }\n\n toOp(): Op {\n return addCheckConstraint(\n this.schemaName,\n this.tableName,\n this.constraintName,\n this.column,\n this.values,\n );\n }\n\n renderTypeScript(): string {\n return `addCheckConstraint(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.constraintName)}, ${jsonToTsSource(this.column)}, ${jsonToTsSource(this.values)})`;\n }\n}\n\nexport class DropCheckConstraintCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'dropCheckConstraint' as const;\n readonly operationClass = 'destructive' as const;\n readonly schemaName: string;\n readonly tableName: string;\n readonly constraintName: string;\n readonly label: string;\n\n constructor(schemaName: string, tableName: string, constraintName: string) {\n super();\n this.schemaName = schemaName;\n this.tableName = tableName;\n this.constraintName = constraintName;\n this.label = `Drop check constraint \"${constraintName}\" on \"${tableName}\"`;\n this.freeze();\n }\n\n toOp(): Op {\n return dropCheckConstraint(this.schemaName, this.tableName, this.constraintName);\n }\n\n renderTypeScript(): string {\n return `dropCheckConstraint(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.constraintName)})`;\n }\n}\n\n// ============================================================================\n// Indexes\n// ============================================================================\n\nexport class CreateIndexCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'createIndex' as const;\n readonly operationClass = 'additive' as const;\n readonly schemaName: string;\n readonly tableName: string;\n readonly indexName: string;\n readonly columns: readonly string[];\n // Named indexType (not typeName) to avoid collision with CreateEnumTypeCall.typeName,\n // which identifies a CREATE TYPE target and is read by `locationForCall` in issue-planner.ts.\n readonly indexType: string | undefined;\n readonly options: Record<string, unknown> | undefined;\n readonly label: string;\n\n constructor(\n schemaName: string,\n tableName: string,\n indexName: string,\n columns: readonly string[],\n extras?: { readonly type?: string; readonly options?: Record<string, unknown> },\n ) {\n super();\n this.schemaName = schemaName;\n this.tableName = tableName;\n this.indexName = indexName;\n this.columns = columns;\n this.indexType = extras?.type;\n this.options = extras?.options;\n this.label = `Create index \"${indexName}\" on \"${tableName}\"`;\n this.freeze();\n }\n\n toOp(): Op {\n const extras: { type?: string; options?: Record<string, unknown> } = {};\n if (this.indexType !== undefined) extras.type = this.indexType;\n if (this.options !== undefined) extras.options = this.options;\n return createIndex(this.schemaName, this.tableName, this.indexName, this.columns, extras);\n }\n\n renderTypeScript(): string {\n const args = [\n jsonToTsSource(this.schemaName),\n jsonToTsSource(this.tableName),\n jsonToTsSource(this.indexName),\n jsonToTsSource(this.columns),\n ];\n if (this.indexType !== undefined || this.options !== undefined) {\n const extrasParts: string[] = [];\n if (this.indexType !== undefined) extrasParts.push(`type: ${jsonToTsSource(this.indexType)}`);\n if (this.options !== undefined) extrasParts.push(`options: ${jsonToTsSource(this.options)}`);\n args.push(`{ ${extrasParts.join(', ')} }`);\n }\n return `createIndex(${args.join(', ')})`;\n }\n}\n\nexport class DropIndexCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'dropIndex' as const;\n readonly operationClass = 'destructive' as const;\n readonly schemaName: string;\n readonly tableName: string;\n readonly indexName: string;\n readonly label: string;\n\n constructor(schemaName: string, tableName: string, indexName: string) {\n super();\n this.schemaName = schemaName;\n this.tableName = tableName;\n this.indexName = indexName;\n this.label = `Drop index \"${indexName}\"`;\n this.freeze();\n }\n\n toOp(): Op {\n return dropIndex(this.schemaName, this.tableName, this.indexName);\n }\n\n renderTypeScript(): string {\n return `dropIndex(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.tableName)}, ${jsonToTsSource(this.indexName)})`;\n }\n}\n\n// ============================================================================\n// Enum types\n// ============================================================================\n\nexport class CreateEnumTypeCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'createEnumType' as const;\n readonly operationClass = 'additive' as const;\n readonly schemaName: string;\n readonly typeName: string;\n readonly nativeType: string;\n readonly values: readonly string[];\n readonly label: string;\n\n constructor(\n schemaName: string,\n typeName: string,\n values: readonly string[],\n nativeType: string = typeName,\n ) {\n super();\n this.schemaName = schemaName;\n this.typeName = typeName;\n this.nativeType = nativeType;\n this.values = values;\n this.label = `Create enum type \"${typeName}\"`;\n this.freeze();\n }\n\n toOp(): Op {\n return createEnumType(this.schemaName, this.typeName, this.values, this.nativeType);\n }\n\n renderTypeScript(): string {\n const nativeArg =\n this.nativeType === this.typeName ? '' : `, ${jsonToTsSource(this.nativeType)}`;\n return `createEnumType(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.typeName)}, ${jsonToTsSource(this.values)}${nativeArg})`;\n }\n}\n\nexport class AddEnumValuesCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'addEnumValues' as const;\n readonly operationClass = 'additive' as const;\n readonly schemaName: string;\n readonly typeName: string;\n readonly nativeType: string;\n readonly values: readonly string[];\n readonly label: string;\n\n constructor(schemaName: string, typeName: string, nativeType: string, values: readonly string[]) {\n super();\n this.schemaName = schemaName;\n this.typeName = typeName;\n this.nativeType = nativeType;\n this.values = values;\n this.label = `Add values to enum type \"${typeName}\": ${values.join(', ')}`;\n this.freeze();\n }\n\n toOp(): Op {\n return addEnumValues(this.schemaName, this.typeName, this.nativeType, this.values);\n }\n\n renderTypeScript(): string {\n return `addEnumValues(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.typeName)}, ${jsonToTsSource(this.nativeType)}, ${jsonToTsSource(this.values)})`;\n }\n}\n\nexport class DropEnumTypeCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'dropEnumType' as const;\n readonly operationClass = 'destructive' as const;\n readonly schemaName: string;\n readonly typeName: string;\n readonly label: string;\n\n constructor(schemaName: string, typeName: string) {\n super();\n this.schemaName = schemaName;\n this.typeName = typeName;\n this.label = `Drop enum type \"${typeName}\"`;\n this.freeze();\n }\n\n toOp(): Op {\n return dropEnumType(this.schemaName, this.typeName);\n }\n\n renderTypeScript(): string {\n return `dropEnumType(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.typeName)})`;\n }\n}\n\nexport class RenameTypeCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'renameType' as const;\n readonly operationClass = 'destructive' as const;\n readonly schemaName: string;\n readonly fromName: string;\n readonly toName: string;\n readonly label: string;\n\n constructor(schemaName: string, fromName: string, toName: string) {\n super();\n this.schemaName = schemaName;\n this.fromName = fromName;\n this.toName = toName;\n this.label = `Rename type \"${fromName}\" to \"${toName}\"`;\n this.freeze();\n }\n\n toOp(): Op {\n return renameType(this.schemaName, this.fromName, this.toName);\n }\n\n renderTypeScript(): string {\n return `renameType(${jsonToTsSource(this.schemaName)}, ${jsonToTsSource(this.fromName)}, ${jsonToTsSource(this.toName)})`;\n }\n}\n\n// ============================================================================\n// Raw SQL\n// ============================================================================\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 */\nexport class RawSqlCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'rawSql' as const;\n readonly operationClass: MigrationOperationClass;\n readonly label: string;\n readonly op: Op;\n\n constructor(op: Op) {\n super();\n this.op = op;\n this.label = op.label;\n this.operationClass = op.operationClass;\n this.freeze();\n }\n\n toOp(): Op {\n return this.op;\n }\n\n renderTypeScript(): string {\n return `rawSql(${jsonToTsSource(this.op)})`;\n }\n}\n\n// ============================================================================\n// Database dependencies (structured DDL)\n// ============================================================================\n\nexport class CreateExtensionCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'createExtension' as const;\n readonly operationClass = 'additive' as const;\n readonly extensionName: string;\n readonly label: string;\n\n constructor(extensionName: string) {\n super();\n this.extensionName = extensionName;\n this.label = `Create extension \"${extensionName}\"`;\n this.freeze();\n }\n\n toOp(): Op {\n return createExtension(this.extensionName);\n }\n\n renderTypeScript(): string {\n return `createExtension(${jsonToTsSource(this.extensionName)})`;\n }\n}\n\nexport class CreateSchemaCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'createSchema' as const;\n readonly operationClass = 'additive' as const;\n readonly schemaName: string;\n readonly label: string;\n\n constructor(schemaName: string) {\n super();\n this.schemaName = schemaName;\n this.label = `Create schema \"${schemaName}\"`;\n this.freeze();\n }\n\n async toOp(lowerer?: ExecuteRequestLowerer): Promise<Op> {\n if (lowerer === undefined) {\n throw new Error(\n `CreateSchemaCall.toOp: a DDL lowerer is required on the Postgres planner path (schema \"${this.schemaName}\"). Pass the control adapter to createPostgresMigrationPlanner.`,\n );\n }\n const ddlNode = contractFreeDdl.createSchema({ schema: this.schemaName, ifNotExists: true });\n const statement = await lowerer.lowerToExecuteRequest(ddlNode);\n const schemaName = this.schemaName;\n return {\n id: `schema.${schemaName}`,\n label: `Create schema \"${schemaName}\"`,\n operationClass: 'additive',\n target: { id: 'postgres' },\n precheck: [],\n execute: [\n {\n description: `Create schema \"${schemaName}\"`,\n sql: statement.sql,\n params: statement.params ?? [],\n },\n ],\n postcheck: [],\n };\n }\n\n renderTypeScript(): string {\n return `this.createSchema({ schema: ${jsonToTsSource(this.schemaName)} })`;\n }\n\n override importRequirements(): readonly ImportRequirement[] {\n return [];\n }\n}\n\n// ============================================================================\n// Data transform\n// ============================================================================\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 * `PN-MIG-2001`: the planner cannot lower a stubbed transform to a runtime\n * op — the user must fill the rendered `migration.ts` and re-emit.\n */\nexport class DataTransformCall extends PostgresOpFactoryCallNode {\n readonly factoryName = 'dataTransform' as const;\n readonly operationClass: MigrationOperationClass;\n readonly label: string;\n readonly checkSlot: string;\n readonly runSlot: string;\n\n constructor(\n label: string,\n checkSlot: string,\n runSlot: string,\n operationClass: MigrationOperationClass = 'data',\n ) {\n super();\n this.label = label;\n this.checkSlot = checkSlot;\n this.runSlot = runSlot;\n this.operationClass = operationClass;\n this.freeze();\n }\n\n toOp(): Op {\n throw errorUnfilledPlaceholder(this.label);\n }\n\n renderTypeScript(): string {\n return [\n `this.dataTransform(endContract, ${jsonToTsSource(this.label)}, {`,\n ` check: () => placeholder(${jsonToTsSource(this.checkSlot)}),`,\n ` run: () => placeholder(${jsonToTsSource(this.runSlot)}),`,\n '})',\n ].join('\\n');\n }\n\n override importRequirements(): readonly ImportRequirement[] {\n return [\n { moduleSpecifier: POSTGRES_MIGRATION_FACADE, symbol: 'placeholder' },\n {\n moduleSpecifier: './end-contract.json',\n symbol: 'endContract',\n kind: 'default',\n attributes: { type: 'json' },\n },\n ];\n }\n}\n\nexport type PostgresOpFactoryCall =\n | CreateTableCall\n | DropTableCall\n | AddColumnCall\n | DropColumnCall\n | AlterColumnTypeCall\n | SetNotNullCall\n | DropNotNullCall\n | SetDefaultCall\n | DropDefaultCall\n | AddPrimaryKeyCall\n | AddForeignKeyCall\n | AddUniqueCall\n | AddCheckConstraintCall\n | DropCheckConstraintCall\n | CreateIndexCall\n | DropIndexCall\n | DropConstraintCall\n | CreateEnumTypeCall\n | AddEnumValuesCall\n | DropEnumTypeCall\n | RenameTypeCall\n | RawSqlCall\n | CreateExtensionCall\n | CreateSchemaCall\n | DataTransformCall;\n"],"mappings":";;;;;;;;;;;AA4CA,SAAgB,KAAK,aAAqB,KAAa;CACrD,OAAO;EAAE;EAAa;CAAI;AAC5B;AAEA,SAAgB,cACd,YACA,MACA,QACA,OAC0E;CAC1E,OAAO;EACL,IAAI;EACJ,SAAS;GAAE;GAAQ;GAAY;GAAM,GAAG,UAAU,SAAS,KAAK;EAAE;CACpE;AACF;;;AChDA,SAAgB,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AAC;GACX,SAAS,CACP;IACE,aAAa,kBAAkB,WAAW;IAC1C,KAAK,UAAU;IACf,QAAQ,UAAU,UAAU,CAAC;GAC/B,CACF;GACA,WAAW,CAAC;EACd;CACF;CAEA,mBAA2B;EACzB,OAAO,+BAA+B,eAAe,KAAK,UAAU,EAAE;CACxE;CAEA,qBAA4D;EAC1D,OAAO,CAAC;CACV;AACF;;;;;;;;AAaA,IAAa,oBAAb,cAAuC,0BAA0B;CAC/D,cAAuB;CACvB;CACA;CACA;CACA;CAEA,YACE,OACA,WACA,SACA,iBAA0C,QAC1C;EACA,MAAM;EACN,KAAK,QAAQ;EACb,KAAK,YAAY;EACjB,KAAK,UAAU;EACf,KAAK,iBAAiB;EACtB,KAAK,OAAO;CACd;CAEA,OAAW;EACT,MAAM,yBAAyB,KAAK,KAAK;CAC3C;CAEA,mBAA2B;EACzB,OAAO;GACL,mCAAmC,eAAe,KAAK,KAAK,EAAE;GAC9D,8BAA8B,eAAe,KAAK,SAAS,EAAE;GAC7D,4BAA4B,eAAe,KAAK,OAAO,EAAE;GACzD;EACF,CAAC,CAAC,KAAK,IAAI;CACb;CAEA,qBAA4D;EAC1D,OAAO,CACL;GAAE,iBAAiB;GAA2B,QAAQ;EAAc,GACpE;GACE,iBAAiB;GACjB,QAAQ;GACR,MAAM;GACN,YAAY,EAAE,MAAM,OAAO;EAC7B,CACF;CACF;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"op-factory-call-DEvD9sbB.d.mts","names":[],"sources":["../src/core/migrations/op-factory-call.ts"],"mappings":";;;;;;;;;KAoEK,EAAA,GAAK,yBAAyB,CAAC,yBAAA;AAAA,uBAgBrB,yBAAA,SAAkC,YAAA,YAAwB,aAAA;EAAA,kBACrD,WAAA;EAAA,kBACA,cAAA,EAAgB,uBAAA;EAAA,kBAChB,KAAA;EAAA,SACT,IAAA,CAAK,OAAA,GAAU,OAAA,GAAU,EAAA,GAAK,OAAA,CAAQ,EAAA;EAE/C,kBAAA,aAA+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AAAA;AAAA,KAa9B,qBAAA,GACR,eAAA,GACA,aAAA,GACA,aAAA,GACA,cAAA,GACA,mBAAA,GACA,cAAA,GACA,eAAA,GACA,cAAA,GACA,eAAA,GACA,iBAAA,GACA,iBAAA,GACA,aAAA,GACA,sBAAA,GACA,uBAAA,GACA,eAAA,GACA,aAAA,GACA,kBAAA,GACA,kBAAA,GACA,iBAAA,GACA,gBAAA,GACA,cAAA,GACA,UAAA,GACA,mBAAA,GACA,gBAAA,GACA,iBAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"postgres-migration-BN6TNJNf.mjs","names":["SqlMigration"],"sources":["../src/core/migrations/postgres-migration.ts"],"sourcesContent":["import type { Contract } from '@prisma-next/contract/types';\nimport type { SqlMigrationPlanOperation } from '@prisma-next/family-sql/control';\nimport type { SqlControlAdapter } from '@prisma-next/family-sql/control-adapter';\nimport { Migration as SqlMigration } from '@prisma-next/family-sql/migration';\nimport type { ControlStack } from '@prisma-next/framework-components/control';\nimport { UNBOUND_NAMESPACE_ID } from '@prisma-next/framework-components/ir';\nimport type { SqlStorage } from '@prisma-next/sql-contract/types';\nimport type { DdlColumn, DdlTableConstraint } from '@prisma-next/sql-relational-core/ast';\nimport { errorPostgresMigrationStackMissing } from '../errors';\nimport { CreateSchemaCall, CreateTableCall } from './op-factory-call';\nimport { type DataTransformOptions, dataTransform } from './operations/data-transform';\nimport type { PostgresPlanTargetDetails } from './planner-target-details';\n\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 `@prisma-next/family-mongo`: the renderer\n * emits `extends Migration` against a facade re-export of this class\n * from `@prisma-next/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 */\nexport abstract class PostgresMigration extends SqlMigration<\n PostgresPlanTargetDetails,\n 'postgres'\n> {\n readonly targetId = 'postgres' as const;\n\n /**\n * Materialized Postgres control adapter, created once per migration\n * instance from the injected stack. `undefined` only when the migration\n * was instantiated without a stack (test fixtures); `dataTransform`\n * throws in that case to surface the misuse.\n */\n protected readonly controlAdapter: SqlControlAdapter<'postgres'> | undefined;\n\n constructor(stack?: ControlStack<'sql', 'postgres'>) {\n super(stack);\n // The descriptor `create()` is typed as the wider `ControlAdapterInstance`;\n // the Postgres descriptor concretely returns a `SqlControlAdapter<'postgres'>`,\n // so the cast holds for any Postgres-target stack assembled at runtime.\n this.controlAdapter = stack?.adapter\n ? (stack.adapter.create(stack) as SqlControlAdapter<'postgres'>)\n : undefined;\n }\n\n /**\n * Instance-method wrapper around the free `dataTransform` factory that\n * supplies the stored control adapter. Authors call this from inside\n * `get operations()`; the adapter argument is hidden from the call site.\n */\n protected dataTransform<TContract extends Contract<SqlStorage>>(\n contract: TContract,\n name: string,\n options: DataTransformOptions,\n ): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>> {\n if (!this.controlAdapter) {\n throw errorPostgresMigrationStackMissing();\n }\n return dataTransform(contract, name, options, this.controlAdapter);\n }\n\n /**\n * Emit a `CREATE TABLE` migration operation. Builds a typed DDL node from\n * the supplied options and lowers it through the stored control adapter.\n * Throws if no adapter is present (i.e. migration instantiated without a stack).\n */\n protected createTable(options: {\n readonly schema?: string;\n readonly table: string;\n readonly ifNotExists?: boolean;\n readonly columns: readonly DdlColumn[];\n readonly constraints?: readonly DdlTableConstraint[];\n }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>> {\n if (!this.controlAdapter) {\n throw errorPostgresMigrationStackMissing();\n }\n return new CreateTableCall(\n options.schema ?? UNBOUND_NAMESPACE_ID,\n options.table,\n options.columns,\n options.constraints,\n ).toOp(this.controlAdapter);\n }\n\n /**\n * Emit a `CREATE SCHEMA` migration operation. Builds a typed DDL node from\n * the supplied options and lowers it through the stored control adapter.\n * Throws if no adapter is present (i.e. migration instantiated without a stack).\n */\n protected createSchema(options: {\n readonly schema: string;\n readonly ifNotExists?: boolean;\n }): Promise<SqlMigrationPlanOperation<PostgresPlanTargetDetails>> {\n if (!this.controlAdapter) {\n throw errorPostgresMigrationStackMissing();\n }\n return new CreateSchemaCall(options.schema).toOp(this.controlAdapter);\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAiCA,IAAsB,oBAAtB,cAAgDA,UAG9C;CACA,WAAoB;;;;;;;CAQpB;CAEA,YAAY,OAAyC;EACnD,MAAM,KAAK;EAIX,KAAK,iBAAiB,OAAO,UACxB,MAAM,QAAQ,OAAO,KAAK,IAC3B,KAAA;CACN;;;;;;CAOA,cACE,UACA,MACA,SAC+D;EAC/D,IAAI,CAAC,KAAK,gBACR,MAAM,mCAAmC;EAE3C,OAAO,cAAc,UAAU,MAAM,SAAS,KAAK,cAAc;CACnE;;;;;;CAOA,YAAsB,SAM4C;EAChE,IAAI,CAAC,KAAK,gBACR,MAAM,mCAAmC;EAE3C,OAAO,IAAI,gBACT,QAAQ,UAAU,sBAClB,QAAQ,OACR,QAAQ,SACR,QAAQ,WACV,CAAC,CAAC,KAAK,KAAK,cAAc;CAC5B;;;;;;CAOA,aAAuB,SAG2C;EAChE,IAAI,CAAC,KAAK,gBACR,MAAM,mCAAmC;EAE3C,OAAO,IAAI,iBAAiB,QAAQ,MAAM,CAAC,CAAC,KAAK,KAAK,cAAc;CACtE;AACF"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"postgres-migration-h_DA3LRq.d.mts","names":[],"sources":["../src/core/migrations/postgres-migration.ts"],"mappings":";;;;;;;;;;;;;AAiCA;;;;;;;;;;;;;;;;;;uBAAsB,iBAAA,SAA0B,SAAA,CAC9C,yBAAA;EAAA,SAGS,QAAA;EAmEL;;;;;;EAAA,mBA3De,cAAA,EAAgB,iBAAA;cAEvB,KAAA,GAAQ,YAAA;EAFe;;;;;EAAA,UAiBzB,aAAA,mBAAgC,QAAA,CAAS,UAAA,GACjD,QAAA,EAAU,SAAA,EACV,IAAA,UACA,OAAA,EAAS,oBAAA,GACR,OAAA,CAAQ,yBAAA,CAA0B,yBAAA;EAJK;;;;;EAAA,UAgBhC,WAAA,CAAY,OAAA;IAAA,SACX,MAAA;IAAA,SACA,KAAA;IAAA,SACA,WAAA;IAAA,SACA,OAAA,WAAkB,SAAA;IAAA,SAClB,WAAA,YAAuB,kBAAA;EAAA,IAC9B,OAAA,CAAQ,yBAAA,CAA0B,yBAAA;EAJ3B;;;;;EAAA,UAqBD,YAAA,CAAa,OAAA;IAAA,SACZ,MAAA;IAAA,SACA,WAAA;EAAA,IACP,OAAA,CAAQ,yBAAA,CAA0B,yBAAA;AAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"shared-DarONYBZ.d.mts","names":[],"sources":["../src/core/migrations/operations/shared.ts"],"mappings":";;;;;KAMY,EAAA,GAAK,yBAAyB,CAAC,yBAAA;;AAA3C;;;;AAAoE;AAcpE;;;;;;UAAiB,UAAA;EAAA,SACN,IAAA;EAAA,SACA,OAAA;EAAA,SACA,UAAA;EAAA,SACA,QAAA;AAAA;;;;;;UAQM,cAAA;EAAA,SACN,IAAA;EAAA,SACA,OAAA;EAAA,SACA,UAAA;IAAA,SACE,MAAA;IAAA,SACA,KAAA;IAAA,SACA,OAAA;EAAA;EAAA,SAEF,QAAA,GAAW,iBAAA;EAAA,SACX,QAAA,GAAW,iBAAiB;AAAA"}