@prisma-next/target-postgres 0.16.0-dev.25 → 0.16.0-dev.26

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 (99) hide show
  1. package/dist/{authoring-BCzcFRay.mjs → authoring-DnO1B0N9.mjs} +7 -14
  2. package/dist/authoring-DnO1B0N9.mjs.map +1 -0
  3. package/dist/canonicalize-C7zKHw8m.mjs +59 -0
  4. package/dist/canonicalize-C7zKHw8m.mjs.map +1 -0
  5. package/dist/{canonicalize-D1F4vUnP.d.mts → canonicalize-CQlxSR4D.d.mts} +3 -18
  6. package/dist/canonicalize-CQlxSR4D.d.mts.map +1 -0
  7. package/dist/contract-free.d.mts +1 -1
  8. package/dist/contract-free.d.mts.map +1 -1
  9. package/dist/contract-free.mjs +1 -1
  10. package/dist/{control-policy-B-_34g05.mjs → control-policy-DEwdS3oK.mjs} +23 -24
  11. package/dist/control-policy-DEwdS3oK.mjs.map +1 -0
  12. package/dist/control.mjs +10 -7
  13. package/dist/control.mjs.map +1 -1
  14. package/dist/{ddl-DYEob9xQ.mjs → ddl-BQC6u-L9.mjs} +27 -3
  15. package/dist/{ddl-DYEob9xQ.mjs.map → ddl-BQC6u-L9.mjs.map} +1 -1
  16. package/dist/ddl.d.mts +3 -3
  17. package/dist/ddl.mjs +2 -2
  18. package/dist/{descriptor-meta-D_0ZKcj-.mjs → descriptor-meta-DGlJurgA.mjs} +2 -2
  19. package/dist/{descriptor-meta-D_0ZKcj-.mjs.map → descriptor-meta-DGlJurgA.mjs.map} +1 -1
  20. package/dist/{diff-database-schema-C9H09OD3.mjs → diff-database-schema-qRPwuYBH.mjs} +22 -12
  21. package/dist/diff-database-schema-qRPwuYBH.mjs.map +1 -0
  22. package/dist/diff-database-schema.mjs +1 -1
  23. package/dist/errors.d.mts +4 -2
  24. package/dist/errors.d.mts.map +1 -1
  25. package/dist/errors.mjs +2 -2
  26. package/dist/issue-planner.d.mts +2 -2
  27. package/dist/issue-planner.d.mts.map +1 -1
  28. package/dist/issue-planner.mjs +1 -1
  29. package/dist/migration.d.mts +2 -2
  30. package/dist/migration.mjs +2 -2
  31. package/dist/{nodes-DJC5B8Id.mjs → nodes-04EILM-z.mjs} +65 -2
  32. package/dist/nodes-04EILM-z.mjs.map +1 -0
  33. package/dist/{nodes-CQzM2hR0.d.mts → nodes-DjCsN-uv.d.mts} +69 -4
  34. package/dist/nodes-DjCsN-uv.d.mts.map +1 -0
  35. package/dist/{op-factory-call-DT7kdjVP.d.mts → op-factory-call-0TB5XNij.d.mts} +46 -8
  36. package/dist/op-factory-call-0TB5XNij.d.mts.map +1 -0
  37. package/dist/{op-factory-call-BVYLIojV.mjs → op-factory-call-CIaPDDUc.mjs} +104 -27
  38. package/dist/op-factory-call-CIaPDDUc.mjs.map +1 -0
  39. package/dist/op-factory-call.d.mts +2 -2
  40. package/dist/op-factory-call.mjs +2 -2
  41. package/dist/pack.d.mts.map +1 -1
  42. package/dist/pack.mjs +1 -1
  43. package/dist/{planner-4sj5cJCY.mjs → planner-BhnkIJX-.mjs} +117 -9
  44. package/dist/planner-BhnkIJX-.mjs.map +1 -0
  45. package/dist/{planner-produced-postgres-migration-CcQPDWmX.mjs → planner-produced-postgres-migration-BE3EJIRK.mjs} +2 -2
  46. package/dist/{planner-produced-postgres-migration-CcQPDWmX.mjs.map → planner-produced-postgres-migration-BE3EJIRK.mjs.map} +1 -1
  47. package/dist/{planner-produced-postgres-migration-8QP8eMph.d.mts → planner-produced-postgres-migration-CRAHl6ak.d.mts} +2 -2
  48. package/dist/planner-produced-postgres-migration-CRAHl6ak.d.mts.map +1 -0
  49. package/dist/planner-produced-postgres-migration.d.mts +1 -1
  50. package/dist/planner-produced-postgres-migration.mjs +1 -1
  51. package/dist/{planner-schema-lookup-CiVaAQP-.mjs → planner-schema-lookup-D3Y_OL-C.mjs} +3 -3
  52. package/dist/planner-schema-lookup-D3Y_OL-C.mjs.map +1 -0
  53. package/dist/planner-schema-lookup.mjs +1 -1
  54. package/dist/planner.d.mts +21 -1
  55. package/dist/planner.d.mts.map +1 -1
  56. package/dist/planner.mjs +2 -2
  57. package/dist/{postgres-contract-view-B8yXVWYe.mjs → postgres-contract-view-BeIEyZfD.mjs} +2 -2
  58. package/dist/{postgres-contract-view-B8yXVWYe.mjs.map → postgres-contract-view-BeIEyZfD.mjs.map} +1 -1
  59. package/dist/{postgres-migration-GIOABsAa.mjs → postgres-migration--BzvpA92.mjs} +7 -4
  60. package/dist/postgres-migration--BzvpA92.mjs.map +1 -0
  61. package/dist/{postgres-migration-DLIvzHjX.d.mts → postgres-migration-BXelnqHO.d.mts} +15 -10
  62. package/dist/postgres-migration-BXelnqHO.d.mts.map +1 -0
  63. package/dist/rls-canonicalize.d.mts +2 -26
  64. package/dist/rls-canonicalize.mjs +2 -2
  65. package/dist/runtime.mjs +1 -1
  66. package/package.json +20 -20
  67. package/src/contract-free/ddl.ts +47 -0
  68. package/src/core/authoring.ts +10 -22
  69. package/src/core/ddl/nodes.ts +104 -0
  70. package/src/core/migrations/contract-to-postgres-database-schema-node.ts +24 -13
  71. package/src/core/migrations/issue-planner.ts +40 -13
  72. package/src/core/migrations/op-factory-call.ts +100 -9
  73. package/src/core/migrations/operations/indexes.ts +80 -35
  74. package/src/core/migrations/planner-schema-lookup.ts +2 -2
  75. package/src/core/migrations/planner.ts +155 -5
  76. package/src/core/migrations/postgres-migration.ts +26 -8
  77. package/src/core/psl-infer/infer-psl-contract.ts +8 -1
  78. package/src/core/rls/canonicalize.ts +4 -21
  79. package/src/exports/ddl.ts +4 -0
  80. package/src/exports/errors.ts +1 -1
  81. package/src/exports/op-factory-call.ts +1 -0
  82. package/src/exports/rls-canonicalize.ts +0 -6
  83. package/dist/authoring-BCzcFRay.mjs.map +0 -1
  84. package/dist/canonicalize-D1F4vUnP.d.mts.map +0 -1
  85. package/dist/control-policy-B-_34g05.mjs.map +0 -1
  86. package/dist/diff-database-schema-C9H09OD3.mjs.map +0 -1
  87. package/dist/nodes-CQzM2hR0.d.mts.map +0 -1
  88. package/dist/nodes-DJC5B8Id.mjs.map +0 -1
  89. package/dist/op-factory-call-BVYLIojV.mjs.map +0 -1
  90. package/dist/op-factory-call-DT7kdjVP.d.mts.map +0 -1
  91. package/dist/planner-4sj5cJCY.mjs.map +0 -1
  92. package/dist/planner-produced-postgres-migration-8QP8eMph.d.mts.map +0 -1
  93. package/dist/planner-schema-lookup-CiVaAQP-.mjs.map +0 -1
  94. package/dist/postgres-migration-DLIvzHjX.d.mts.map +0 -1
  95. package/dist/postgres-migration-GIOABsAa.mjs.map +0 -1
  96. package/dist/rls-canonicalize.d.mts.map +0 -1
  97. package/dist/wire-name-DbQ9-2RC.mjs +0 -104
  98. package/dist/wire-name-DbQ9-2RC.mjs.map +0 -1
  99. package/src/core/rls/wire-name.ts +0 -33
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodes-04EILM-z.mjs","names":[],"sources":["../src/core/ddl/nodes.ts"],"sourcesContent":["import {\n type DdlColumn,\n DdlNode,\n type DdlTableConstraint,\n} from '@prisma-next/sql-relational-core/ast';\nimport type { RlsPolicyOperation } from '../rls/canonicalize';\n\n// ---------------------------------------------------------------------------\n// AlterTableAction — nested polymorphic hierarchy\n// ---------------------------------------------------------------------------\n\nexport interface AlterTableActionVisitor<R> {\n addColumn(action: AddColumnAction): R;\n dropDefault(action: DropDefaultAction): R;\n}\n\nexport abstract class AlterTableAction {\n abstract readonly kind: string;\n abstract accept<R>(visitor: AlterTableActionVisitor<R>): R;\n}\n\nexport class AddColumnAction extends AlterTableAction {\n readonly kind = 'add-column' as const;\n readonly column: DdlColumn;\n\n constructor(column: DdlColumn) {\n super();\n this.column = column;\n Object.freeze(this);\n }\n\n override accept<R>(visitor: AlterTableActionVisitor<R>): R {\n return visitor.addColumn(this);\n }\n}\n\nexport class DropDefaultAction extends AlterTableAction {\n readonly kind = 'drop-default' as const;\n readonly columnName: string;\n\n constructor(columnName: string) {\n super();\n this.columnName = columnName;\n Object.freeze(this);\n }\n\n override accept<R>(visitor: AlterTableActionVisitor<R>): R {\n return visitor.dropDefault(this);\n }\n}\n\n/**\n * The set of ALTER TABLE subactions currently expressible as typed DDL.\n *\n * The remaining actions — SetDefault, SetNotNull, DropNotNull,\n * AlterColumnType — are still emitted as raw SQL by `operations/columns.ts`\n * and join this union as they are converted to typed DDL. Until then it is\n * intentionally partial: only the ALTER subactions used by the\n * already-converted ops (AddColumn, DropDefault) appear here.\n */\nexport type AnyAlterTableAction = AddColumnAction | DropDefaultAction;\n\n// ---------------------------------------------------------------------------\n// Top-level DDL visitor\n// ---------------------------------------------------------------------------\n\nexport interface PostgresDdlVisitor<R> {\n createTable(node: PostgresCreateTable): R;\n createSchema(node: PostgresCreateSchema): R;\n createType(node: PostgresCreateType): R;\n dropType(node: PostgresDropType): R;\n alterTable(node: PostgresAlterTable): R;\n createPolicy(node: PostgresCreatePolicy): R;\n dropPolicy(node: PostgresDropPolicy): R;\n alterPolicyRename(node: PostgresAlterPolicyRename): R;\n createIndex(node: PostgresCreateIndex): R;\n dropIndex(node: PostgresDropIndex): R;\n alterIndexRename(node: PostgresAlterIndexRename): R;\n disableRowLevelSecurity(node: PostgresDisableRowLevelSecurity): R;\n}\n\nexport abstract class PostgresDdlNode extends DdlNode {\n abstract accept<R>(visitor: PostgresDdlVisitor<R>): R;\n}\n\nfunction freezeDdlColumns(columns: readonly DdlColumn[]): ReadonlyArray<DdlColumn> {\n return Object.freeze([...columns]);\n}\n\nfunction freezeConstraints(\n constraints: readonly DdlTableConstraint[] | undefined,\n): ReadonlyArray<DdlTableConstraint> | undefined {\n return constraints ? Object.freeze([...constraints]) : undefined;\n}\n\nexport class PostgresCreateTable extends PostgresDdlNode {\n readonly kind = 'create-table' as const;\n readonly table: string;\n readonly schema: string | undefined;\n readonly ifNotExists: boolean | undefined;\n readonly columns: ReadonlyArray<DdlColumn>;\n readonly constraints: ReadonlyArray<DdlTableConstraint> | undefined;\n\n constructor(options: {\n readonly table: string;\n readonly schema?: string;\n readonly ifNotExists?: boolean;\n readonly columns: readonly DdlColumn[];\n readonly constraints?: readonly DdlTableConstraint[];\n }) {\n super();\n this.table = options.table;\n this.schema = options.schema;\n this.ifNotExists = options.ifNotExists;\n this.columns = freezeDdlColumns(options.columns);\n this.constraints = freezeConstraints(options.constraints);\n this.freeze();\n }\n\n override accept<R>(visitor: PostgresDdlVisitor<R>): R {\n return visitor.createTable(this);\n }\n}\n\nexport class PostgresCreateSchema extends PostgresDdlNode {\n readonly kind = 'create-schema' as const;\n readonly schema: string;\n readonly ifNotExists: boolean | undefined;\n\n constructor(options: { readonly schema: string; readonly ifNotExists?: boolean }) {\n super();\n this.schema = options.schema;\n this.ifNotExists = options.ifNotExists;\n this.freeze();\n }\n\n override accept<R>(visitor: PostgresDdlVisitor<R>): R {\n return visitor.createSchema(this);\n }\n}\n\nexport class PostgresCreateType extends PostgresDdlNode {\n readonly kind = 'create-type' as const;\n readonly schema: string | undefined;\n readonly name: string;\n readonly values: ReadonlyArray<string>;\n\n constructor(options: {\n readonly schema?: string;\n readonly name: string;\n readonly values: readonly string[];\n }) {\n super();\n this.schema = options.schema;\n this.name = options.name;\n this.values = Object.freeze([...options.values]);\n this.freeze();\n }\n\n override accept<R>(visitor: PostgresDdlVisitor<R>): R {\n return visitor.createType(this);\n }\n}\n\nexport class PostgresDropType extends PostgresDdlNode {\n readonly kind = 'drop-type' as const;\n readonly schema: string | undefined;\n readonly name: string;\n\n constructor(options: { readonly schema?: string; readonly name: string }) {\n super();\n this.schema = options.schema;\n this.name = options.name;\n this.freeze();\n }\n\n override accept<R>(visitor: PostgresDdlVisitor<R>): R {\n return visitor.dropType(this);\n }\n}\n\nexport class PostgresAlterTable extends PostgresDdlNode {\n readonly kind = 'alter-table' as const;\n readonly table: string;\n readonly schema: string | undefined;\n readonly actions: ReadonlyArray<AnyAlterTableAction>;\n\n constructor(options: {\n readonly table: string;\n readonly schema?: string;\n readonly actions: readonly AnyAlterTableAction[];\n }) {\n super();\n this.table = options.table;\n this.schema = options.schema;\n this.actions = Object.freeze([...options.actions]);\n this.freeze();\n }\n\n override accept<R>(visitor: PostgresDdlVisitor<R>): R {\n return visitor.alterTable(this);\n }\n}\n\nexport type { RlsPolicyOperation };\n\nexport class PostgresCreatePolicy extends PostgresDdlNode {\n readonly kind = 'create-policy' as const;\n readonly schema: string;\n readonly table: string;\n readonly name: string;\n readonly permissive: boolean;\n readonly operation: RlsPolicyOperation;\n readonly roles: ReadonlyArray<string>;\n readonly using: string | undefined;\n readonly withCheck: string | undefined;\n\n constructor(options: {\n readonly schema: string;\n readonly table: string;\n readonly name: string;\n readonly permissive: boolean;\n readonly operation: RlsPolicyOperation;\n readonly roles: readonly string[];\n readonly using?: string;\n readonly withCheck?: string;\n }) {\n super();\n this.schema = options.schema;\n this.table = options.table;\n this.name = options.name;\n this.permissive = options.permissive;\n this.operation = options.operation;\n this.roles = Object.freeze([...options.roles]);\n this.using = options.using;\n this.withCheck = options.withCheck;\n this.freeze();\n }\n\n override accept<R>(visitor: PostgresDdlVisitor<R>): R {\n return visitor.createPolicy(this);\n }\n}\n\nexport class PostgresDropPolicy extends PostgresDdlNode {\n readonly kind = 'drop-policy' as const;\n readonly schema: string;\n readonly table: string;\n readonly name: string;\n\n constructor(options: { readonly schema: string; readonly table: string; readonly name: string }) {\n super();\n this.schema = options.schema;\n this.table = options.table;\n this.name = options.name;\n this.freeze();\n }\n\n override accept<R>(visitor: PostgresDdlVisitor<R>): R {\n return visitor.dropPolicy(this);\n }\n}\n\nexport class PostgresAlterPolicyRename extends PostgresDdlNode {\n readonly kind = 'alter-policy-rename' as const;\n readonly schema: string;\n readonly table: string;\n readonly name: string;\n readonly newName: string;\n\n constructor(options: {\n readonly schema: string;\n readonly table: string;\n readonly name: string;\n readonly newName: string;\n }) {\n super();\n this.schema = options.schema;\n this.table = options.table;\n this.name = options.name;\n this.newName = options.newName;\n this.freeze();\n }\n\n override accept<R>(visitor: PostgresDdlVisitor<R>): R {\n return visitor.alterPolicyRename(this);\n }\n}\n\n/**\n * The element list between the parens of CREATE INDEX: either a column\n * tuple (each identifier quoted by the renderer) or one opaque expression\n * string covering the entire list, inserted verbatim — the same opaque-SQL\n * stance as RLS policy predicates (ADR 234).\n */\nexport type DdlIndexElements =\n | { readonly columns: readonly string[] }\n | { readonly expression: string };\n\nexport class PostgresCreateIndex extends PostgresDdlNode {\n readonly kind = 'create-index' as const;\n /** Absent ⇔ unqualified (the unbound namespace — `search_path` decides). */\n readonly schema: string | undefined;\n readonly table: string;\n readonly name: string;\n readonly unique: boolean;\n readonly elements: DdlIndexElements;\n readonly type: string | undefined;\n readonly options: Record<string, unknown> | undefined;\n /**\n * Partial-index predicate (WHERE body, without the keyword). Inserted\n * verbatim, never quoted or escaped.\n */\n readonly where: string | undefined;\n\n constructor(options: {\n readonly schema: string | undefined;\n readonly table: string;\n readonly name: string;\n readonly unique: boolean;\n readonly elements: DdlIndexElements;\n readonly type: string | undefined;\n readonly options: Record<string, unknown> | undefined;\n readonly where: string | undefined;\n }) {\n super();\n this.schema = options.schema;\n this.table = options.table;\n this.name = options.name;\n this.unique = options.unique;\n this.elements =\n 'columns' in options.elements\n ? { columns: Object.freeze([...options.elements.columns]) }\n : { expression: options.elements.expression };\n this.type = options.type;\n this.options = options.options;\n this.where = options.where;\n this.freeze();\n }\n\n override accept<R>(visitor: PostgresDdlVisitor<R>): R {\n return visitor.createIndex(this);\n }\n}\n\nexport class PostgresDropIndex extends PostgresDdlNode {\n readonly kind = 'drop-index' as const;\n /** Absent ⇔ unqualified (the unbound namespace). */\n readonly schema: string | undefined;\n readonly name: string;\n\n constructor(options: { readonly schema: string | undefined; readonly name: string }) {\n super();\n this.schema = options.schema;\n this.name = options.name;\n this.freeze();\n }\n\n override accept<R>(visitor: PostgresDdlVisitor<R>): R {\n return visitor.dropIndex(this);\n }\n}\n\nexport class PostgresAlterIndexRename extends PostgresDdlNode {\n readonly kind = 'alter-index-rename' as const;\n /** Absent ⇔ unqualified (the unbound namespace). */\n readonly schema: string | undefined;\n readonly from: string;\n readonly to: string;\n\n constructor(options: {\n readonly schema: string | undefined;\n readonly from: string;\n readonly to: string;\n }) {\n super();\n this.schema = options.schema;\n this.from = options.from;\n this.to = options.to;\n this.freeze();\n }\n\n override accept<R>(visitor: PostgresDdlVisitor<R>): R {\n return visitor.alterIndexRename(this);\n }\n}\n\nexport class PostgresDisableRowLevelSecurity extends PostgresDdlNode {\n readonly kind = 'disable-row-level-security' as const;\n readonly schema: string;\n readonly table: string;\n\n constructor(options: { readonly schema: string; readonly table: string }) {\n super();\n this.schema = options.schema;\n this.table = options.table;\n this.freeze();\n }\n\n override accept<R>(visitor: PostgresDdlVisitor<R>): R {\n return visitor.disableRowLevelSecurity(this);\n }\n}\n\nexport type AnyPostgresDdlNode =\n | PostgresCreateTable\n | PostgresCreateSchema\n | PostgresCreateType\n | PostgresDropType\n | PostgresAlterTable\n | PostgresCreatePolicy\n | PostgresDropPolicy\n | PostgresAlterPolicyRename\n | PostgresCreateIndex\n | PostgresDropIndex\n | PostgresAlterIndexRename\n | PostgresDisableRowLevelSecurity;\n"],"mappings":";;AAgBA,IAAsB,mBAAtB,MAAuC,CAGvC;AAEA,IAAa,kBAAb,cAAqC,iBAAiB;CACpD,OAAgB;CAChB;CAEA,YAAY,QAAmB;EAC7B,MAAM;EACN,KAAK,SAAS;EACd,OAAO,OAAO,IAAI;CACpB;CAEA,OAAmB,SAAwC;EACzD,OAAO,QAAQ,UAAU,IAAI;CAC/B;AACF;AAEA,IAAa,oBAAb,cAAuC,iBAAiB;CACtD,OAAgB;CAChB;CAEA,YAAY,YAAoB;EAC9B,MAAM;EACN,KAAK,aAAa;EAClB,OAAO,OAAO,IAAI;CACpB;CAEA,OAAmB,SAAwC;EACzD,OAAO,QAAQ,YAAY,IAAI;CACjC;AACF;AAgCA,IAAsB,kBAAtB,cAA8C,QAAQ,CAEtD;AAEA,SAAS,iBAAiB,SAAyD;CACjF,OAAO,OAAO,OAAO,CAAC,GAAG,OAAO,CAAC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wB,IAAI;CAC7C;AACF"}
@@ -1,4 +1,4 @@
1
- import { r as RlsPolicyOperation } from "./canonicalize-D1F4vUnP.mjs";
1
+ import { r as RlsPolicyOperation } from "./canonicalize-CQlxSR4D.mjs";
2
2
  import { DdlColumn, DdlNode, DdlTableConstraint } from "@prisma-next/sql-relational-core/ast";
3
3
  //#region src/core/ddl/nodes.d.ts
4
4
  interface AlterTableActionVisitor<R> {
@@ -40,6 +40,9 @@ interface PostgresDdlVisitor<R> {
40
40
  createPolicy(node: PostgresCreatePolicy): R;
41
41
  dropPolicy(node: PostgresDropPolicy): R;
42
42
  alterPolicyRename(node: PostgresAlterPolicyRename): R;
43
+ createIndex(node: PostgresCreateIndex): R;
44
+ dropIndex(node: PostgresDropIndex): R;
45
+ alterIndexRename(node: PostgresAlterIndexRename): R;
43
46
  disableRowLevelSecurity(node: PostgresDisableRowLevelSecurity): R;
44
47
  }
45
48
  declare abstract class PostgresDdlNode extends DdlNode {
@@ -153,6 +156,68 @@ declare class PostgresAlterPolicyRename extends PostgresDdlNode {
153
156
  });
154
157
  accept<R>(visitor: PostgresDdlVisitor<R>): R;
155
158
  }
159
+ /**
160
+ * The element list between the parens of CREATE INDEX: either a column
161
+ * tuple (each identifier quoted by the renderer) or one opaque expression
162
+ * string covering the entire list, inserted verbatim — the same opaque-SQL
163
+ * stance as RLS policy predicates (ADR 234).
164
+ */
165
+ type DdlIndexElements = {
166
+ readonly columns: readonly string[];
167
+ } | {
168
+ readonly expression: string;
169
+ };
170
+ declare class PostgresCreateIndex extends PostgresDdlNode {
171
+ readonly kind: "create-index";
172
+ /** Absent ⇔ unqualified (the unbound namespace — `search_path` decides). */
173
+ readonly schema: string | undefined;
174
+ readonly table: string;
175
+ readonly name: string;
176
+ readonly unique: boolean;
177
+ readonly elements: DdlIndexElements;
178
+ readonly type: string | undefined;
179
+ readonly options: Record<string, unknown> | undefined;
180
+ /**
181
+ * Partial-index predicate (WHERE body, without the keyword). Inserted
182
+ * verbatim, never quoted or escaped.
183
+ */
184
+ readonly where: string | undefined;
185
+ constructor(options: {
186
+ readonly schema: string | undefined;
187
+ readonly table: string;
188
+ readonly name: string;
189
+ readonly unique: boolean;
190
+ readonly elements: DdlIndexElements;
191
+ readonly type: string | undefined;
192
+ readonly options: Record<string, unknown> | undefined;
193
+ readonly where: string | undefined;
194
+ });
195
+ accept<R>(visitor: PostgresDdlVisitor<R>): R;
196
+ }
197
+ declare class PostgresDropIndex extends PostgresDdlNode {
198
+ readonly kind: "drop-index";
199
+ /** Absent ⇔ unqualified (the unbound namespace). */
200
+ readonly schema: string | undefined;
201
+ readonly name: string;
202
+ constructor(options: {
203
+ readonly schema: string | undefined;
204
+ readonly name: string;
205
+ });
206
+ accept<R>(visitor: PostgresDdlVisitor<R>): R;
207
+ }
208
+ declare class PostgresAlterIndexRename extends PostgresDdlNode {
209
+ readonly kind: "alter-index-rename";
210
+ /** Absent ⇔ unqualified (the unbound namespace). */
211
+ readonly schema: string | undefined;
212
+ readonly from: string;
213
+ readonly to: string;
214
+ constructor(options: {
215
+ readonly schema: string | undefined;
216
+ readonly from: string;
217
+ readonly to: string;
218
+ });
219
+ accept<R>(visitor: PostgresDdlVisitor<R>): R;
220
+ }
156
221
  declare class PostgresDisableRowLevelSecurity extends PostgresDdlNode {
157
222
  readonly kind: "disable-row-level-security";
158
223
  readonly schema: string;
@@ -163,7 +228,7 @@ declare class PostgresDisableRowLevelSecurity extends PostgresDdlNode {
163
228
  });
164
229
  accept<R>(visitor: PostgresDdlVisitor<R>): R;
165
230
  }
166
- type AnyPostgresDdlNode = PostgresCreateTable | PostgresCreateSchema | PostgresCreateType | PostgresDropType | PostgresAlterTable | PostgresCreatePolicy | PostgresDropPolicy | PostgresAlterPolicyRename | PostgresDisableRowLevelSecurity;
231
+ type AnyPostgresDdlNode = PostgresCreateTable | PostgresCreateSchema | PostgresCreateType | PostgresDropType | PostgresAlterTable | PostgresCreatePolicy | PostgresDropPolicy | PostgresAlterPolicyRename | PostgresCreateIndex | PostgresDropIndex | PostgresAlterIndexRename | PostgresDisableRowLevelSecurity;
167
232
  //#endregion
168
- export { DropDefaultAction as a, PostgresCreatePolicy as c, PostgresCreateType as d, PostgresDdlNode as f, PostgresDropType as g, PostgresDropPolicy as h, AnyPostgresDdlNode as i, PostgresCreateSchema as l, PostgresDisableRowLevelSecurity as m, AlterTableActionVisitor as n, PostgresAlterPolicyRename as o, PostgresDdlVisitor as p, AnyAlterTableAction as r, PostgresAlterTable as s, AddColumnAction as t, PostgresCreateTable as u };
169
- //# sourceMappingURL=nodes-CQzM2hR0.d.mts.map
233
+ export { PostgresDisableRowLevelSecurity as _, DdlIndexElements as a, PostgresDropType as b, PostgresAlterPolicyRename as c, PostgresCreatePolicy as d, PostgresCreateSchema as f, PostgresDdlVisitor as g, PostgresDdlNode as h, AnyPostgresDdlNode as i, PostgresAlterTable as l, PostgresCreateType as m, AlterTableActionVisitor as n, DropDefaultAction as o, PostgresCreateTable as p, AnyAlterTableAction as r, PostgresAlterIndexRename as s, AddColumnAction as t, PostgresCreateIndex as u, PostgresDropIndex as v, PostgresDropPolicy as y };
234
+ //# sourceMappingURL=nodes-DjCsN-uv.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nodes-DjCsN-uv.d.mts","names":[],"sources":["../src/core/ddl/nodes.ts"],"mappings":";;;UAWiB,wBAAwB;EACvC,UAAU,QAAQ,kBAAkB;EACpC,YAAY,QAAQ,oBAAoB;;uBAGpB;oBACF;WACT,OAAO,GAAG,SAAS,wBAAwB,KAAK;;cAG9C,wBAAwB;WAC1B;WACA,QAAQ;cAEL,QAAQ;EAMX,OAAO,GAAG,SAAS,wBAAwB,KAAK;;cAK9C,0BAA0B;WAC5B;WACA;cAEG;EAMH,OAAO,GAAG,SAAS,wBAAwB,KAAK;;;;;;;;;;;KAc/C,sBAAsB,kBAAkB;UAMnC,mBAAmB;EAClC,YAAY,MAAM,sBAAsB;EACxC,aAAa,MAAM,uBAAuB;EAC1C,WAAW,MAAM,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F,OAAO,GAAG,SAAS,mBAAmB,KAAK;;;;;;;;KAW1C;WACG;;WACA;;cAEF,4BAA4B;WAC9B;;WAEA;WACA;WACA;WACA;WACA,UAAU;WACV;WACA,SAAS;;;;;WAKT;cAEG;aACD;aACA;aACA;aACA;aACA,UAAU;aACV;aACA,SAAS;aACT;;EAiBF,OAAO,GAAG,SAAS,mBAAmB,KAAK;;cAKzC,0BAA0B;WAC5B;;WAEA;WACA;cAEG;aAAoB;aAAqC;;EAO5D,OAAO,GAAG,SAAS,mBAAmB,KAAK;;cAKzC,iCAAiC;WACnC;;WAEA;WACA;WACA;cAEG;aACD;aACA;aACA;;EASF,OAAO,GAAG,SAAS,mBAAmB,KAAK;;cAKzC,wCAAwC;WAC1C;WACA;WACA;cAEG;aAAoB;aAAyB;;EAOhD,OAAO,GAAG,SAAS,mBAAmB,KAAK;;KAK1C,qBACR,sBACA,uBACA,qBACA,mBACA,qBACA,uBACA,qBACA,4BACA,sBACA,oBACA,2BACA"}
@@ -26,6 +26,29 @@ interface ForeignKeySpec {
26
26
  readonly onUpdate?: ReferentialAction;
27
27
  }
28
28
  //#endregion
29
+ //#region src/core/migrations/operations/indexes.d.ts
30
+ interface CreateIndexExtras {
31
+ readonly type?: string;
32
+ readonly options?: Record<string, unknown>;
33
+ /**
34
+ * Partial-index predicate (WHERE body, without the keyword). Inserted
35
+ * verbatim, never quoted or escaped — the same opaque-SQL stance as RLS
36
+ * policy predicates.
37
+ */
38
+ readonly where?: string;
39
+ readonly unique?: boolean;
40
+ }
41
+ /**
42
+ * The element list between the parens of CREATE INDEX: either a column
43
+ * tuple (each identifier quoted) or one opaque expression string covering
44
+ * the entire list, inserted verbatim.
45
+ */
46
+ type CreateIndexElements = {
47
+ readonly columns: readonly string[];
48
+ } | {
49
+ readonly expression: string;
50
+ };
51
+ //#endregion
29
52
  //#region src/core/migrations/op-factory-call.d.ts
30
53
  type Op = SqlMigrationPlanOperation<PostgresPlanTargetDetails>;
31
54
  declare abstract class PostgresOpFactoryCallNode extends TsExpression implements OpFactoryCall {
@@ -288,14 +311,29 @@ declare class CreateIndexCall extends PostgresOpFactoryCallNode {
288
311
  readonly schemaName: string;
289
312
  readonly tableName: string;
290
313
  readonly indexName: string;
291
- readonly columns: readonly string[];
314
+ /** Column tuple when the index is column-based; absent for expression indexes. */
315
+ readonly columns: readonly string[] | undefined;
316
+ /** Opaque whole element list when the index is expression-based. */
317
+ readonly expression: string | undefined;
292
318
  readonly indexType: string | undefined;
293
319
  readonly options: Record<string, unknown> | undefined;
320
+ readonly where: string | undefined;
321
+ readonly unique: boolean;
294
322
  readonly label: string;
295
- constructor(schemaName: string, tableName: string, indexName: string, columns: readonly string[], extras?: {
296
- readonly type?: string;
297
- readonly options?: Record<string, unknown>;
298
- });
323
+ constructor(schemaName: string, tableName: string, indexName: string, elements: CreateIndexElements, extras?: CreateIndexExtras);
324
+ toOp(lowerer?: ExecuteRequestLowerer): Promise<Op>;
325
+ renderTypeScript(): string;
326
+ importRequirements(): readonly ImportRequirement[];
327
+ }
328
+ declare class RenameIndexCall extends PostgresOpFactoryCallNode {
329
+ readonly factoryName: "renameIndex";
330
+ readonly operationClass: "widening";
331
+ readonly schemaName: string;
332
+ readonly tableName: string;
333
+ readonly oldIndexName: string;
334
+ readonly newIndexName: string;
335
+ readonly label: string;
336
+ constructor(schemaName: string, tableName: string, oldIndexName: string, newIndexName: string);
299
337
  toOp(lowerer?: ExecuteRequestLowerer): Promise<Op>;
300
338
  renderTypeScript(): string;
301
339
  importRequirements(): readonly ImportRequirement[];
@@ -476,7 +514,7 @@ declare class RenamePostgresRlsPolicyCall extends PostgresOpFactoryCallNode {
476
514
  renderTypeScript(): string;
477
515
  importRequirements(): readonly ImportRequirement[];
478
516
  }
479
- type PostgresOpFactoryCall = CreateTableCall | DropTableCall | AddColumnCall | DropColumnCall | AlterColumnTypeCall | SetNotNullCall | DropNotNullCall | SetDefaultCall | DropDefaultCall | AddNotNullColumnDirectCall | AddNotNullColumnWithTempDefaultCall | AddPrimaryKeyCall | AddForeignKeyCall | AddUniqueCall | AddCheckConstraintCall | DropCheckConstraintCall | CreateIndexCall | DropIndexCall | DropConstraintCall | RawSqlCall | CreateExtensionCall | CreateSchemaCall | CreateNativeEnumTypeCall | DropNativeEnumTypeCall | AddNativeEnumValueCall | CreatePostgresRlsPolicyCall | DropPostgresRlsPolicyCall | EnableRowLevelSecurityCall | DisableRowLevelSecurityCall | RenamePostgresRlsPolicyCall | DataTransformCall;
517
+ type PostgresOpFactoryCall = CreateTableCall | DropTableCall | AddColumnCall | DropColumnCall | AlterColumnTypeCall | SetNotNullCall | DropNotNullCall | SetDefaultCall | DropDefaultCall | AddNotNullColumnDirectCall | AddNotNullColumnWithTempDefaultCall | AddPrimaryKeyCall | AddForeignKeyCall | AddUniqueCall | AddCheckConstraintCall | DropCheckConstraintCall | CreateIndexCall | RenameIndexCall | DropIndexCall | DropConstraintCall | RawSqlCall | CreateExtensionCall | CreateSchemaCall | CreateNativeEnumTypeCall | DropNativeEnumTypeCall | AddNativeEnumValueCall | CreatePostgresRlsPolicyCall | DropPostgresRlsPolicyCall | EnableRowLevelSecurityCall | DisableRowLevelSecurityCall | RenamePostgresRlsPolicyCall | DataTransformCall;
480
518
  //#endregion
481
- export { RenamePostgresRlsPolicyCall as A, DropNativeEnumTypeCall as C, EnableRowLevelSecurityCall as D, DropTableCall as E, SetNotNullCall as M, ForeignKeySpec as N, PostgresOpFactoryCall as O, Op$1 as P, DropIndexCall as S, DropPostgresRlsPolicyCall as T, DisableRowLevelSecurityCall as _, AddNotNullColumnWithTempDefaultCall as a, DropConstraintCall as b, AlterColumnTypeCall as c, CreateIndexCall as d, CreateNativeEnumTypeCall as f, DataTransformCall as g, CreateTableCall as h, AddNativeEnumValueCall as i, SetDefaultCall as j, RawSqlCall as k, AlterColumnTypeOptions as l, CreateSchemaCall as m, AddColumnCall as n, AddPrimaryKeyCall as o, CreatePostgresRlsPolicyCall as p, AddForeignKeyCall as r, AddUniqueCall as s, AddCheckConstraintCall as t, CreateExtensionCall as u, DropCheckConstraintCall as v, DropNotNullCall as w, DropDefaultCall as x, DropColumnCall as y };
482
- //# sourceMappingURL=op-factory-call-DT7kdjVP.d.mts.map
519
+ export { RenameIndexCall as A, DropNativeEnumTypeCall as C, EnableRowLevelSecurityCall as D, DropTableCall as E, ForeignKeySpec as F, Op$1 as I, SetDefaultCall as M, SetNotNullCall as N, PostgresOpFactoryCall as O, CreateIndexExtras as P, DropIndexCall as S, DropPostgresRlsPolicyCall as T, DisableRowLevelSecurityCall as _, AddNotNullColumnWithTempDefaultCall as a, DropConstraintCall as b, AlterColumnTypeCall as c, CreateIndexCall as d, CreateNativeEnumTypeCall as f, DataTransformCall as g, CreateTableCall as h, AddNativeEnumValueCall as i, RenamePostgresRlsPolicyCall as j, RawSqlCall as k, AlterColumnTypeOptions as l, CreateSchemaCall as m, AddColumnCall as n, AddPrimaryKeyCall as o, CreatePostgresRlsPolicyCall as p, AddForeignKeyCall as r, AddUniqueCall as s, AddCheckConstraintCall as t, CreateExtensionCall as u, DropCheckConstraintCall as v, DropNotNullCall as w, DropDefaultCall as x, DropColumnCall as y };
520
+ //# sourceMappingURL=op-factory-call-0TB5XNij.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"op-factory-call-0TB5XNij.d.mts","names":[],"sources":["../src/core/migrations/operations/shared.ts","../src/core/migrations/operations/indexes.ts","../src/core/migrations/op-factory-call.ts"],"mappings":";;;;;;;;;;KAKY,OAAK,0BAA0B;;;;;;UAO1B;WACN;WACA;WACA;aACE;aACA;aACA;;WAEF,WAAW;WACX,WAAW;;;;UCOL;WACN;WACA,UAAU;;;;;;WAMV;WACA;;;;;;;KAQC;WACG;;WACA;;;;KCkDV,KAAK,0BAA0B;uBAgBrB,kCAAkC,wBAAwB;oBACrD;oBACA,gBAAgB;oBAChB;WACT,KAAK,UAAU,UAAU,KAAK,QAAQ;EAE/C,+BAA+B;YAIrB;;cAuGC,wBAAwB;WAC1B;WACA;WACA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AoB,mBAAmB,QAAQ;EASrD,KAAK,UAAU,wBAAwB,QAAQ;EAWrD;EAgBS,+BAA+B;;cAK7B,kCAAkC;WACpC;WACA;WACA;WACA;WACA;WACA;cAEG,oBAAoB,mBAAmB;EAS7C,KAAK,UAAU,wBAAwB,QAAQ;EAWrD;EAIS,+BAA+B;;cAK7B,mCAAmC;WACrC;WACA;WACA;WACA;WACA;cAEG,oBAAoB;EAQ1B,KAAK,UAAU,wBAAwB,QAAQ;EAWrD;EAIS,+BAA+B;;cAK7B,oCAAoC;WACtC;WACA;WACA;WACA;WACA;cAEG,oBAAoB;EAQ1B,KAAK,UAAU,wBAAwB,QAAQ;EAWrD;EAIS,+BAA+B;;cAK7B,oCAAoC;WACtC;WAKA;WACA;WACA;WACA;WACA;WACA;cAEG,oBAAoB,mBAAmB,uBAAuB;EAUpE,KAAK,UAAU,wBAAwB,QAAQ;EAiBrD;EAIS,+BAA+B;;KAK9B,wBACR,kBACA,gBACA,gBACA,iBACA,sBACA,iBACA,kBACA,iBACA,kBACA,6BACA,sCACA,oBACA,oBACA,gBACA,yBACA,0BACA,kBACA,kBACA,gBACA,qBACA,aACA,sBACA,mBACA,2BACA,yBACA,yBACA,8BACA,4BACA,6BACA,8BACA,8BACA"}
@@ -1,7 +1,7 @@
1
1
  import { n as postgresError } from "./errors-DBSNx7EJ.mjs";
2
2
  import { t as DEFAULT_NAMESPACE_ID } from "./namespace-ids-xtp_ZY86.mjs";
3
3
  import { a as validateEnumValueLength, i as quoteQualifiedName, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-B2lzkKfP.mjs";
4
- import { C as rlsPolicyExistsAst, S as rlsEnabledAst, T as tableIsEmptyAst, _ as extensionExistsAst, a as createSchema, b as nativeEnumValueExistsAst, c as disableRowLevelSecurity$1, d as dropType, f as columnDefaultAst, g as constraintExistsAst, h as columnTypeAst, i as createPolicy, l as dropDefaultAction, m as columnNullabilityAst, n as alterPolicyRename, o as createTable, p as columnExistsAst, r as alterTable, s as createType, t as addColumnAction, u as dropPolicy, v as indexExistsAst, w as tableExistsAst, x as noNullValuesAst, y as nativeEnumTypeExistsAst } from "./ddl-DYEob9xQ.mjs";
4
+ import { 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-BQC6u-L9.mjs";
5
5
  import { n as qualifyTableName } from "./planner-sql-checks-CmiQ6Nei.mjs";
6
6
  import { n as buildColumnTypeSql } from "./planner-ddl-builders-CVo3L7Nd.mjs";
7
7
  import { FunctionColumnDefault, LiteralColumnDefault } from "@prisma-next/sql-relational-core/ast";
@@ -448,24 +448,22 @@ async function indexExistsSteps(lowerer, schemaName, indexName) {
448
448
  absent: await lowerer.lowerToExecuteRequest(checks.indexAbsent())
449
449
  };
450
450
  }
451
- function renderIndexOptionValue(key, value) {
452
- if (typeof value === "string") return `'${escapeLiteral(value)}'`;
453
- if (typeof value === "number" && Number.isFinite(value)) return String(value);
454
- if (typeof value === "boolean") return value ? "true" : "false";
455
- throw postgresError("CONTRACT.INDEX_INVALID", `Index option "${key}" must be a string, finite number, or boolean; got ${typeof value}`, { meta: {
456
- key,
457
- valueType: typeof value
458
- } });
459
- }
460
- function renderIndexOptions(options) {
461
- return Object.entries(options).map(([key, value]) => `${quoteIdentifier(key)} = ${renderIndexOptionValue(key, value)}`).join(", ");
451
+ /** An unbound-namespace object renders unqualified: the DDL node takes no schema. */
452
+ function ddlSchemaOf(schemaName) {
453
+ return schemaName === UNBOUND_NAMESPACE_ID ? void 0 : schemaName;
462
454
  }
463
- async function createIndex(schemaName, tableName, indexName, columns, lowerer, extras) {
464
- const qualified = qualifyTableName(schemaName, tableName);
465
- const columnList = columns.map(quoteIdentifier).join(", ");
466
- const using = extras?.type ? ` USING ${quoteIdentifier(extras.type)}` : "";
467
- const options = extras?.options;
468
- const withClause = options && Object.keys(options).length > 0 ? ` WITH (${renderIndexOptions(options)})` : "";
455
+ async function createIndex(schemaName, tableName, indexName, elements, lowerer, extras) {
456
+ const ddlNode = createIndex$1({
457
+ schema: ddlSchemaOf(schemaName),
458
+ table: tableName,
459
+ name: indexName,
460
+ unique: extras?.unique === true,
461
+ elements,
462
+ type: extras?.type,
463
+ options: extras?.options,
464
+ where: extras?.where
465
+ });
466
+ const execute = await lowerer.lowerToExecuteRequest(ddlNode);
469
467
  const { present, absent } = await indexExistsSteps(lowerer, schemaName, indexName);
470
468
  return {
471
469
  id: `index.${tableName}.${indexName}`,
@@ -473,11 +471,44 @@ async function createIndex(schemaName, tableName, indexName, columns, lowerer, e
473
471
  operationClass: "additive",
474
472
  target: targetDetails("index", indexName, schemaName, tableName),
475
473
  precheck: [step(`ensure index "${indexName}" does not exist`, absent.sql, absent.params)],
476
- execute: [step(`create index "${indexName}"`, `CREATE INDEX ${quoteIdentifier(indexName)} ON ${qualified}${using} (${columnList})${withClause}`)],
474
+ execute: [step(`create index "${indexName}"`, execute.sql, execute.params)],
477
475
  postcheck: [step(`verify index "${indexName}" exists`, present.sql, present.params)]
478
476
  };
479
477
  }
478
+ /**
479
+ * `ALTER INDEX … RENAME TO`. `widening` for the same typology reason as the
480
+ * RLS policy rename: a rename is neither additive creation nor destructive,
481
+ * and the class vocabulary has no neutral middle class — it is NOT that a
482
+ * rename widens anything.
483
+ */
484
+ async function renameIndex(schemaName, tableName, fromName, toName, lowerer) {
485
+ const fromChecks = indexExistsAst(schemaName, fromName);
486
+ const toChecks = indexExistsAst(schemaName, toName);
487
+ const fromPresent = await lowerer.lowerToExecuteRequest(fromChecks.indexPresent());
488
+ const toAbsent = await lowerer.lowerToExecuteRequest(toChecks.indexAbsent());
489
+ const toPresent = await lowerer.lowerToExecuteRequest(toChecks.indexPresent());
490
+ const ddlNode = alterIndexRename({
491
+ schema: ddlSchemaOf(schemaName),
492
+ from: fromName,
493
+ to: toName
494
+ });
495
+ const execute = await lowerer.lowerToExecuteRequest(ddlNode);
496
+ return {
497
+ id: `index.${schemaName}.${tableName}.${fromName}.rename`,
498
+ label: `Rename index "${fromName}" to "${toName}" on "${tableName}"`,
499
+ operationClass: "widening",
500
+ target: targetDetails("index", toName, schemaName, tableName),
501
+ precheck: [step(`ensure index "${fromName}" exists`, fromPresent.sql, fromPresent.params), step(`ensure index "${toName}" does not exist`, toAbsent.sql, toAbsent.params)],
502
+ execute: [step(`rename index "${fromName}" to "${toName}"`, execute.sql, execute.params)],
503
+ postcheck: [step(`verify index "${toName}" exists`, toPresent.sql, toPresent.params)]
504
+ };
505
+ }
480
506
  async function dropIndex(schemaName, tableName, indexName, lowerer) {
507
+ const ddlNode = dropIndex$1({
508
+ schema: ddlSchemaOf(schemaName),
509
+ name: indexName
510
+ });
511
+ const execute = await lowerer.lowerToExecuteRequest(ddlNode);
481
512
  const { present, absent } = await indexExistsSteps(lowerer, schemaName, indexName);
482
513
  return {
483
514
  id: `dropIndex.${tableName}.${indexName}`,
@@ -485,7 +516,7 @@ async function dropIndex(schemaName, tableName, indexName, lowerer) {
485
516
  operationClass: "destructive",
486
517
  target: targetDetails("index", indexName, schemaName, tableName),
487
518
  precheck: [step(`ensure index "${indexName}" exists`, present.sql, present.params)],
488
- execute: [step(`drop index "${indexName}"`, `DROP INDEX ${qualifyTableName(schemaName, indexName)}`)],
519
+ execute: [step(`drop index "${indexName}"`, execute.sql, execute.params)],
489
520
  postcheck: [step(`verify index "${indexName}" does not exist`, absent.sql, absent.params)]
490
521
  };
491
522
  }
@@ -1486,18 +1517,26 @@ var CreateIndexCall = class extends PostgresOpFactoryCallNode {
1486
1517
  schemaName;
1487
1518
  tableName;
1488
1519
  indexName;
1520
+ /** Column tuple when the index is column-based; absent for expression indexes. */
1489
1521
  columns;
1522
+ /** Opaque whole element list when the index is expression-based. */
1523
+ expression;
1490
1524
  indexType;
1491
1525
  options;
1526
+ where;
1527
+ unique;
1492
1528
  label;
1493
- constructor(schemaName, tableName, indexName, columns, extras) {
1529
+ constructor(schemaName, tableName, indexName, elements, extras) {
1494
1530
  super();
1495
1531
  this.schemaName = schemaName;
1496
1532
  this.tableName = tableName;
1497
1533
  this.indexName = indexName;
1498
- this.columns = columns;
1534
+ this.columns = "columns" in elements ? elements.columns : void 0;
1535
+ this.expression = "expression" in elements ? elements.expression : void 0;
1499
1536
  this.indexType = extras?.type;
1500
1537
  this.options = extras?.options;
1538
+ this.where = extras?.where;
1539
+ this.unique = extras?.unique === true;
1501
1540
  this.label = `Create index "${indexName}" on "${tableName}"`;
1502
1541
  this.freeze();
1503
1542
  }
@@ -1506,18 +1545,23 @@ var CreateIndexCall = class extends PostgresOpFactoryCallNode {
1506
1545
  const extras = {};
1507
1546
  if (this.indexType !== void 0) extras.type = this.indexType;
1508
1547
  if (this.options !== void 0) extras.options = this.options;
1509
- return createIndex(this.schemaName, this.tableName, this.indexName, this.columns, lowerer, extras);
1548
+ if (this.where !== void 0) extras.where = this.where;
1549
+ if (this.unique) extras.unique = true;
1550
+ return createIndex(this.schemaName, this.tableName, this.indexName, this.columns !== void 0 ? { columns: this.columns } : { expression: this.expression ?? "" }, lowerer, extras);
1510
1551
  }
1511
1552
  renderTypeScript() {
1512
1553
  const opts = [];
1513
1554
  if (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);
1514
1555
  opts.push(`table: ${jsonToTsSource(this.tableName)}`);
1515
1556
  opts.push(`index: ${jsonToTsSource(this.indexName)}`);
1516
- opts.push(`columns: ${jsonToTsSource(this.columns)}`);
1517
- if (this.indexType !== void 0 || this.options !== void 0) {
1557
+ if (this.columns !== void 0) opts.push(`columns: ${jsonToTsSource(this.columns)}`);
1558
+ else opts.push(`expression: ${jsonToTsSource(this.expression ?? "")}`);
1559
+ if (this.indexType !== void 0 || this.options !== void 0 || this.where !== void 0 || this.unique) {
1518
1560
  const extrasParts = [];
1519
1561
  if (this.indexType !== void 0) extrasParts.push(`type: ${jsonToTsSource(this.indexType)}`);
1520
1562
  if (this.options !== void 0) extrasParts.push(`options: ${jsonToTsSource(this.options)}`);
1563
+ if (this.where !== void 0) extrasParts.push(`where: ${jsonToTsSource(this.where)}`);
1564
+ if (this.unique) extrasParts.push("unique: true");
1521
1565
  opts.push(`extras: { ${extrasParts.join(", ")} }`);
1522
1566
  }
1523
1567
  return `this.createIndex({ ${opts.join(", ")} })`;
@@ -1526,6 +1570,39 @@ var CreateIndexCall = class extends PostgresOpFactoryCallNode {
1526
1570
  return [];
1527
1571
  }
1528
1572
  };
1573
+ var RenameIndexCall = class extends PostgresOpFactoryCallNode {
1574
+ factoryName = "renameIndex";
1575
+ operationClass = "widening";
1576
+ schemaName;
1577
+ tableName;
1578
+ oldIndexName;
1579
+ newIndexName;
1580
+ label;
1581
+ constructor(schemaName, tableName, oldIndexName, newIndexName) {
1582
+ super();
1583
+ this.schemaName = schemaName;
1584
+ this.tableName = tableName;
1585
+ this.oldIndexName = oldIndexName;
1586
+ this.newIndexName = newIndexName;
1587
+ this.label = `Rename index "${oldIndexName}" to "${newIndexName}" on "${tableName}"`;
1588
+ this.freeze();
1589
+ }
1590
+ async toOp(lowerer) {
1591
+ if (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" } });
1592
+ return renameIndex(this.schemaName, this.tableName, this.oldIndexName, this.newIndexName, lowerer);
1593
+ }
1594
+ renderTypeScript() {
1595
+ const opts = [];
1596
+ if (this.schemaName !== UNBOUND_NAMESPACE_ID) opts.push(`schema: ${jsonToTsSource(this.schemaName)}`);
1597
+ opts.push(`table: ${jsonToTsSource(this.tableName)}`);
1598
+ opts.push(`from: ${jsonToTsSource(this.oldIndexName)}`);
1599
+ opts.push(`to: ${jsonToTsSource(this.newIndexName)}`);
1600
+ return `this.renameIndex({ ${opts.join(", ")} })`;
1601
+ }
1602
+ importRequirements() {
1603
+ return [];
1604
+ }
1605
+ };
1529
1606
  var DropIndexCall = class extends PostgresOpFactoryCallNode {
1530
1607
  factoryName = "dropIndex";
1531
1608
  operationClass = "destructive";
@@ -1949,6 +2026,6 @@ var RenamePostgresRlsPolicyCall = class extends PostgresOpFactoryCallNode {
1949
2026
  }
1950
2027
  };
1951
2028
  //#endregion
1952
- export { SetDefaultCall as A, DropNativeEnumTypeCall as C, EnableRowLevelSecurityCall as D, DropTableCall as E, installExtension as F, postgresDefaultToDdlColumnDefault as M, buildTargetDetails as N, RawSqlCall as O, createExtension as P, 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, SetNotNullCall as j, RenamePostgresRlsPolicyCall 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 };
2029
+ export { RenamePostgresRlsPolicyCall as A, DropNativeEnumTypeCall as C, EnableRowLevelSecurityCall as D, DropTableCall as E, createExtension as F, installExtension as I, SetNotNullCall as M, postgresDefaultToDdlColumnDefault as N, RawSqlCall as O, buildTargetDetails as P, 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, SetDefaultCall as j, RenameIndexCall 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 };
1953
2030
 
1954
- //# sourceMappingURL=op-factory-call-BVYLIojV.mjs.map
2031
+ //# sourceMappingURL=op-factory-call-CIaPDDUc.mjs.map