@prisma/orm-target-postgres 8.0.0-rc.22-dev.8 → 8.0.0-rc.22-dev.10

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 (68) hide show
  1. package/dist/{adapter-Bp0horgW.d.mts → adapter-B52C9G6y.d.mts} +11 -11
  2. package/dist/{adapter-Bp0horgW.d.mts.map → adapter-B52C9G6y.d.mts.map} +1 -1
  3. package/dist/adapter.d.mts +1 -1
  4. package/dist/adapter__adapter.d.mts +1 -1
  5. package/dist/{aggregates-0EfVySBb.d.mts → aggregates-CCEULCRK.d.mts} +11 -11
  6. package/dist/{aggregates-0EfVySBb.d.mts.map → aggregates-CCEULCRK.d.mts.map} +1 -1
  7. package/dist/{control-policy-RIiGtzLL-dMGUsj7L.mjs → control-policy-K52VpMX0-CateWffI.mjs} +7 -3
  8. package/dist/control-policy-K52VpMX0-CateWffI.mjs.map +1 -0
  9. package/dist/{diff-database-schema-CvA43-eB-BVodpxgx.mjs → diff-database-schema-D_vOsC7_-CtLt0OwZ.mjs} +3 -3
  10. package/dist/{diff-database-schema-CvA43-eB-BVodpxgx.mjs.map → diff-database-schema-D_vOsC7_-CtLt0OwZ.mjs.map} +1 -1
  11. package/dist/{issue-planner-BUo9S9Ge.d.mts → issue-planner-CbixMGS1.d.mts} +2 -2
  12. package/dist/{issue-planner-BUo9S9Ge.d.mts.map → issue-planner-CbixMGS1.d.mts.map} +1 -1
  13. package/dist/migration-Be_iuIpn.mjs.map +1 -1
  14. package/dist/{migration-Drs_EeiM.d.mts → migration-XqRvlRWn.d.mts} +2 -2
  15. package/dist/{migration-Drs_EeiM.d.mts.map → migration-XqRvlRWn.d.mts.map} +1 -1
  16. package/dist/op-factory-call-DO-2Ul_8.d.mts +1 -0
  17. package/dist/{op-factory-call-Ek2u4dEh-CIUcdOdr.mjs → op-factory-call-DQW9c0ec-C3qv_STE.mjs} +478 -38
  18. package/dist/op-factory-call-DQW9c0ec-C3qv_STE.mjs.map +1 -0
  19. package/dist/{op-factory-call-L1gqYhhk-DMnspvjf.d.mts → op-factory-call-fPC4Yzy6-B6JHyh7J.d.mts} +80 -9
  20. package/dist/op-factory-call-fPC4Yzy6-B6JHyh7J.d.mts.map +1 -0
  21. package/dist/{pack-vCp-QG0L.d.mts → pack-ClOo5FU_.d.mts} +2 -2
  22. package/dist/{pack-vCp-QG0L.d.mts.map → pack-ClOo5FU_.d.mts.map} +1 -1
  23. package/dist/{planner-CXGxEHRs-DnblCRvf.mjs → planner-BsSEbzfm-BrBEb_M1.mjs} +87 -68
  24. package/dist/planner-BsSEbzfm-BrBEb_M1.mjs.map +1 -0
  25. package/dist/{planner-Bl3kIyMG.d.mts → planner-Cw5KV0_B.d.mts} +2 -2
  26. package/dist/{planner-Bl3kIyMG.d.mts.map → planner-Cw5KV0_B.d.mts.map} +1 -1
  27. package/dist/planner-produced-postgres-migration-CoX6OBqo.d.mts +1 -0
  28. package/dist/{planner-produced-postgres-migration-Cx9bERx3-DRNnR16E.d.mts → planner-produced-postgres-migration-DgUtdqVh-DEhVIDmO.d.mts} +3 -3
  29. package/dist/planner-produced-postgres-migration-DgUtdqVh-DEhVIDmO.d.mts.map +1 -0
  30. package/dist/{planner-produced-postgres-migration-rvb49AcU-Cg2CikBV.mjs → planner-produced-postgres-migration-bn60skNP-CKjpb3S_.mjs} +4 -4
  31. package/dist/{planner-produced-postgres-migration-rvb49AcU-Cg2CikBV.mjs.map → planner-produced-postgres-migration-bn60skNP-CKjpb3S_.mjs.map} +1 -1
  32. package/dist/{postgres-migration-D0tEWVZ9-tr0Nt3a2.mjs → postgres-migration-CVWCygKt-DEXT0FE_.mjs} +48 -8
  33. package/dist/postgres-migration-CVWCygKt-DEXT0FE_.mjs.map +1 -0
  34. package/dist/{postgres-migration-DNnmFBsR-BJU9865a.d.mts → postgres-migration-MVAsm-Co-CcN0UJd7.d.mts} +53 -3
  35. package/dist/postgres-migration-MVAsm-Co-CcN0UJd7.d.mts.map +1 -0
  36. package/dist/{prisma7-binding-bhu33wEo.d.mts → prisma7-binding-Bb8yzr_1.d.mts} +2 -2
  37. package/dist/{prisma7-binding-bhu33wEo.d.mts.map → prisma7-binding-Bb8yzr_1.d.mts.map} +1 -1
  38. package/dist/{render-ops-B0eNPFAw-BgUftmhY.mjs → render-ops-BKDfKgOJ-DmoHztdY.mjs} +3 -3
  39. package/dist/{render-ops-B0eNPFAw-BgUftmhY.mjs.map → render-ops-BKDfKgOJ-DmoHztdY.mjs.map} +1 -1
  40. package/dist/target.d.mts +12 -12
  41. package/dist/target.mjs +8 -8
  42. package/dist/target__aggregates.d.mts +1 -1
  43. package/dist/target__control.mjs +30 -32
  44. package/dist/target__control.mjs.map +1 -1
  45. package/dist/target__diff-database-schema.mjs +1 -1
  46. package/dist/target__issue-planner.d.mts +1 -1
  47. package/dist/target__issue-planner.mjs +1 -1
  48. package/dist/target__migration.d.mts +2 -2
  49. package/dist/target__migration.mjs +2 -2
  50. package/dist/target__op-factory-call.d.mts +3 -3
  51. package/dist/target__op-factory-call.mjs +2 -2
  52. package/dist/target__pack.d.mts +1 -1
  53. package/dist/target__planner-produced-postgres-migration.d.mts +2 -2
  54. package/dist/target__planner-produced-postgres-migration.mjs +1 -1
  55. package/dist/target__planner.d.mts +1 -1
  56. package/dist/target__planner.mjs +2 -2
  57. package/dist/target__prisma7-binding.d.mts +1 -1
  58. package/dist/target__render-ops.mjs +1 -1
  59. package/package.json +10 -10
  60. package/dist/control-policy-RIiGtzLL-dMGUsj7L.mjs.map +0 -1
  61. package/dist/op-factory-call-D2HXLJQJ.d.mts +0 -1
  62. package/dist/op-factory-call-Ek2u4dEh-CIUcdOdr.mjs.map +0 -1
  63. package/dist/op-factory-call-L1gqYhhk-DMnspvjf.d.mts.map +0 -1
  64. package/dist/planner-CXGxEHRs-DnblCRvf.mjs.map +0 -1
  65. package/dist/planner-produced-postgres-migration-Cx9bERx3-DRNnR16E.d.mts.map +0 -1
  66. package/dist/planner-produced-postgres-migration-DRPVY4iL.d.mts +0 -1
  67. package/dist/postgres-migration-D0tEWVZ9-tr0Nt3a2.mjs.map +0 -1
  68. package/dist/postgres-migration-DNnmFBsR-BJU9865a.d.mts.map +0 -1
@@ -114,7 +114,7 @@ declare const postgresAdapterContractContributions: {
114
114
  readonly operation: "sum";
115
115
  readonly input: {
116
116
  readonly kind: "codec";
117
- readonly codecId: "pg/int@1" | "pg/int2@1" | "pg/int4@1" | "pg/int8@1" | "pg/int8number@1" | "sql/int@1";
117
+ readonly codecId: "pg/int2@1" | "pg/int4@1" | "pg/int8@1" | "pg/int8number@1" | "sql/int@1" | "pg/int@1";
118
118
  };
119
119
  readonly output: {
120
120
  readonly kind: "codec";
@@ -126,7 +126,7 @@ declare const postgresAdapterContractContributions: {
126
126
  readonly operation: "sumBigInt";
127
127
  readonly input: {
128
128
  readonly kind: "codec";
129
- readonly codecId: "pg/int@1" | "pg/int2@1" | "pg/int4@1" | "sql/int@1";
129
+ readonly codecId: "pg/int2@1" | "pg/int4@1" | "sql/int@1" | "pg/int@1";
130
130
  };
131
131
  readonly output: {
132
132
  readonly kind: "codec";
@@ -172,7 +172,7 @@ declare const postgresAdapterContractContributions: {
172
172
  readonly operation: "sum";
173
173
  readonly input: {
174
174
  readonly kind: "codec";
175
- readonly codecId: "pg/float@1" | "pg/float8@1" | "sql/float@1";
175
+ readonly codecId: "pg/float8@1" | "sql/float@1" | "pg/float@1";
176
176
  };
177
177
  readonly output: {
178
178
  readonly kind: "codec";
@@ -261,7 +261,7 @@ declare const postgresAdapterContractContributions: {
261
261
  readonly operation: "avg";
262
262
  readonly input: {
263
263
  readonly kind: "codec";
264
- readonly codecId: "pg/int@1" | "pg/int2@1" | "pg/int4@1" | "pg/int8@1" | "pg/int8number@1" | "pg/unboundedint@1" | "sql/int@1";
264
+ readonly codecId: "pg/int2@1" | "pg/int4@1" | "pg/int8@1" | "pg/int8number@1" | "pg/unboundedint@1" | "sql/int@1" | "pg/int@1";
265
265
  };
266
266
  readonly output: {
267
267
  readonly kind: "codec";
@@ -273,7 +273,7 @@ declare const postgresAdapterContractContributions: {
273
273
  readonly operation: "avgDecimal";
274
274
  readonly input: {
275
275
  readonly kind: "codec";
276
- readonly codecId: "pg/int@1" | "pg/int2@1" | "pg/int4@1" | "pg/int8@1" | "pg/int8number@1" | "pg/numeric@1" | "pg/unboundedint@1" | "sql/int@1";
276
+ readonly codecId: "pg/numeric@1" | "pg/int2@1" | "pg/int4@1" | "pg/int8@1" | "pg/int8number@1" | "pg/unboundedint@1" | "sql/int@1" | "pg/int@1";
277
277
  };
278
278
  readonly output: {
279
279
  readonly kind: "codec";
@@ -284,7 +284,7 @@ declare const postgresAdapterContractContributions: {
284
284
  readonly operation: "avg";
285
285
  readonly input: {
286
286
  readonly kind: "codec";
287
- readonly codecId: "pg/float@1" | "pg/float4@1" | "pg/float8@1" | "sql/float@1";
287
+ readonly codecId: "pg/float4@1" | "pg/float8@1" | "sql/float@1" | "pg/float@1";
288
288
  };
289
289
  readonly output: {
290
290
  readonly kind: "codec";
@@ -370,7 +370,7 @@ declare const postgresAdapterContractContributions: {
370
370
  readonly operation: "min";
371
371
  readonly input: {
372
372
  readonly kind: "codec";
373
- readonly codecId: "pg/varchar@1" | "sql/varchar@1";
373
+ readonly codecId: "sql/varchar@1" | "pg/varchar@1";
374
374
  };
375
375
  readonly output: {
376
376
  readonly kind: "codec";
@@ -381,7 +381,7 @@ declare const postgresAdapterContractContributions: {
381
381
  readonly operation: "min";
382
382
  readonly input: {
383
383
  readonly kind: "codec";
384
- readonly codecId: "pg/text-array@1" | "pg/enum@1" | "pg/date-temporal@1" | "pg/timestamp-temporal@1" | "pg/timestamptz-temporal@1" | "pg/time-temporal@1" | "pg/date-string@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/timestamptz-date@1" | "pg/timestamp-date@1" | "pg/timestamp-instant@1" | "pg/time-string@1" | "pg/timetz@1" | "pg/interval@1" | "pg/interval-string@1" | "pg/inet@1" | "pg/oid@1" | "pg/money@1";
384
+ readonly codecId: "pg/timestamp-temporal@1" | "pg/timestamptz-temporal@1" | "pg/time-temporal@1" | "pg/timetz@1" | "pg/inet@1" | "pg/date-temporal@1" | "pg/date-string@1" | "pg/timestamp-string@1" | "pg/timestamptz-date@1" | "pg/timestamp-date@1" | "pg/timestamp-instant@1" | "pg/timestamptz-string@1" | "pg/time-string@1" | "pg/oid@1" | "pg/money@1" | "pg/interval@1" | "pg/interval-string@1" | "pg/enum@1" | "pg/text-array@1";
385
385
  };
386
386
  readonly output: {
387
387
  readonly kind: "self";
@@ -411,7 +411,7 @@ declare const postgresAdapterContractContributions: {
411
411
  readonly operation: "max";
412
412
  readonly input: {
413
413
  readonly kind: "codec";
414
- readonly codecId: "pg/varchar@1" | "sql/varchar@1";
414
+ readonly codecId: "sql/varchar@1" | "pg/varchar@1";
415
415
  };
416
416
  readonly output: {
417
417
  readonly kind: "codec";
@@ -422,7 +422,7 @@ declare const postgresAdapterContractContributions: {
422
422
  readonly operation: "max";
423
423
  readonly input: {
424
424
  readonly kind: "codec";
425
- readonly codecId: "pg/text-array@1" | "pg/enum@1" | "pg/date-temporal@1" | "pg/timestamp-temporal@1" | "pg/timestamptz-temporal@1" | "pg/time-temporal@1" | "pg/date-string@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/timestamptz-date@1" | "pg/timestamp-date@1" | "pg/timestamp-instant@1" | "pg/time-string@1" | "pg/timetz@1" | "pg/interval@1" | "pg/interval-string@1" | "pg/inet@1" | "pg/oid@1" | "pg/money@1";
425
+ readonly codecId: "pg/timestamp-temporal@1" | "pg/timestamptz-temporal@1" | "pg/time-temporal@1" | "pg/timetz@1" | "pg/inet@1" | "pg/date-temporal@1" | "pg/date-string@1" | "pg/timestamp-string@1" | "pg/timestamptz-date@1" | "pg/timestamp-date@1" | "pg/timestamp-instant@1" | "pg/timestamptz-string@1" | "pg/time-string@1" | "pg/oid@1" | "pg/money@1" | "pg/interval@1" | "pg/interval-string@1" | "pg/enum@1" | "pg/text-array@1";
426
426
  };
427
427
  readonly output: {
428
428
  readonly kind: "self";
@@ -433,4 +433,4 @@ declare const postgresAdapterContractContributions: {
433
433
  };
434
434
  //#endregion
435
435
  export { postgresRawCodecInferer as i, postgresAdapterCapabilities as n, postgresAdapterContractContributions as r, createPostgresAdapter as t };
436
- //# sourceMappingURL=adapter-Bp0horgW.d.mts.map
436
+ //# sourceMappingURL=adapter-B52C9G6y.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"adapter-Bp0horgW.d.mts","names":[],"sources":["../../../../3-targets/postgres/2-adapter/dist/adapter.d.mts"],"mappings":";;;;;;;;;;cAOc,+BAA+B,QAAQ,aAAa,kBAAkB;WACzE;WACA;WACA,SAAS;mBACD;mBACA;EACjB,YAAY,eAAe,uBAAuB,gBAAgB,gBAAgB,4BAA4B,YAAY;EAC1H,MAAM,KAAK,cAAc,iBAAiB,SAAS,eAAe,oBAAoB;;;;;;;cAO1E,yBAAyB;iBACtB,sBAAsB,UAAU,yBAAyB,SAAS;;;cAGrE,6BAA6B;WAChC;aACE;aACA;aACA;aACA;aACA;aACA;aACA;aACA;;WAEF;aACE;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;;;;;;;;cAQC;WACH,cAAc;aACZ;eACE;eACA;eACA;eACA;eACA;eACA;eACA;eACA;;aAEF;eACE;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;;;WAGJ;aACE;eACE;eACA;iBACE;;eAEF;iBACE;iBACA;;eAEF;eACA;;eAEA;eACA;iBACE;;eAEF;iBACE;iBACA;;eAEF;eACA;eACA,6EAA6E;;eAE7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF"}
1
+ {"version":3,"file":"adapter-B52C9G6y.d.mts","names":[],"sources":["../../../../3-targets/postgres/2-adapter/dist/adapter.d.mts"],"mappings":";;;;;;;;;;cAOc,+BAA+B,QAAQ,aAAa,kBAAkB;WACzE;WACA;WACA,SAAS;mBACD;mBACA;EACjB,YAAY,eAAe,uBAAuB,gBAAgB,gBAAgB,4BAA4B,YAAY;EAC1H,MAAM,KAAK,cAAc,iBAAiB,SAAS,eAAe,oBAAoB;;;;;;;cAO1E,yBAAyB;iBACtB,sBAAsB,UAAU,yBAAyB,SAAS;;;cAGrE,6BAA6B;WAChC;aACE;aACA;aACA;aACA;aACA;aACA;aACA;aACA;;WAEF;aACE;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;aACA;;;;;;;;cAQC;WACH,cAAc;aACZ;eACE;eACA;eACA;eACA;eACA;eACA;eACA;eACA;;aAEF;eACE;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;eACA;;;WAGJ;aACE;eACE;eACA;iBACE;;eAEF;iBACE;iBACA;;eAEF;eACA;;eAEA;eACA;iBACE;;eAEF;iBACE;iBACA;;eAEF;eACA;eACA,6EAA6E;;eAE7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA,6EAA6E;eAC7E;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;iBACA;;eAEF;;eAEA;eACA;iBACE;iBACA;;eAEF;iBACE;;eAEF"}
@@ -1,7 +1,7 @@
1
1
  import { t as PostgresContract } from "./postgres-schema-CJvUnBU9-Bvn7zbr1.mjs";
2
2
  import { a as OrderClause, c as PostgresLoweredStatement, d as StorageTable, i as Expr, l as SelectAst, n as ColumnRef, o as ParamRef, r as Direction, s as PostgresAdapterOptions, t as BinaryExpr, u as StorageColumn } from "./types-D6lgKhE5-DVHMZPbP.mjs";
3
3
  import { a as createPostgresCodecRegistryWithBuiltins, i as createPostgresBuiltinCodecLookup, t as PostgresCodecRegistry } from "./codecs-BZ74mlUI.mjs";
4
- import { i as postgresRawCodecInferer, n as postgresAdapterCapabilities, r as postgresAdapterContractContributions, t as createPostgresAdapter } from "./adapter-Bp0horgW.mjs";
4
+ import { i as postgresRawCodecInferer, n as postgresAdapterCapabilities, r as postgresAdapterContractContributions, t as createPostgresAdapter } from "./adapter-B52C9G6y.mjs";
5
5
  import { A as varcharColumn, C as timestampStringColumn, D as timestamptzTemporalColumn, E as timestamptzStringColumn, O as timetzColumn, S as timestampJsDateColumn, T as timestamptzJsDateColumn, _ as rawColumn, a as dateStringColumn, b as timeTemporalColumn, c as float8Column, d as int8Column, f as intervalPartsColumn, g as numericColumn, h as jsonbColumn, i as charColumn, k as varbitColumn, l as int2Column, m as jsonColumn, n as boolColumn, o as dateTemporalColumn, p as intervalStringColumn, r as byteaColumn, s as float4Column, t as bitColumn, u as int4Column, v as textColumn, w as timestampTemporalColumn, x as timestampInstantColumn, y as timeStringColumn } from "./column-types-0CjA9Eri.mjs";
6
6
  import { i as quoteIdentifier, r as qualifyName, t as escapeLiteral } from "./sql-utils-Bq4nuPvy.mjs";
7
7
  import { t as PostgresControlAdapter } from "./control-2DHRXqEz.mjs";
@@ -1,2 +1,2 @@
1
- import { i as postgresRawCodecInferer, n as postgresAdapterCapabilities, r as postgresAdapterContractContributions, t as createPostgresAdapter } from "./adapter-Bp0horgW.mjs";
1
+ import { i as postgresRawCodecInferer, n as postgresAdapterCapabilities, r as postgresAdapterContractContributions, t as createPostgresAdapter } from "./adapter-B52C9G6y.mjs";
2
2
  export { createPostgresAdapter, postgresAdapterCapabilities, postgresAdapterContractContributions, postgresRawCodecInferer };
@@ -31,7 +31,7 @@ declare const postgresAggregateDescriptors: readonly [{
31
31
  readonly operation: "sum";
32
32
  readonly input: {
33
33
  readonly kind: "codec";
34
- readonly codecId: "pg/int@1" | "pg/int2@1" | "pg/int4@1" | "pg/int8@1" | "pg/int8number@1" | "sql/int@1";
34
+ readonly codecId: "pg/int2@1" | "pg/int4@1" | "pg/int8@1" | "pg/int8number@1" | "sql/int@1" | "pg/int@1";
35
35
  };
36
36
  readonly output: {
37
37
  readonly kind: "codec";
@@ -43,7 +43,7 @@ declare const postgresAggregateDescriptors: readonly [{
43
43
  readonly operation: "sumBigInt";
44
44
  readonly input: {
45
45
  readonly kind: "codec";
46
- readonly codecId: "pg/int@1" | "pg/int2@1" | "pg/int4@1" | "sql/int@1";
46
+ readonly codecId: "pg/int2@1" | "pg/int4@1" | "sql/int@1" | "pg/int@1";
47
47
  };
48
48
  readonly output: {
49
49
  readonly kind: "codec";
@@ -89,7 +89,7 @@ declare const postgresAggregateDescriptors: readonly [{
89
89
  readonly operation: "sum";
90
90
  readonly input: {
91
91
  readonly kind: "codec";
92
- readonly codecId: "pg/float@1" | "pg/float8@1" | "sql/float@1";
92
+ readonly codecId: "pg/float8@1" | "sql/float@1" | "pg/float@1";
93
93
  };
94
94
  readonly output: {
95
95
  readonly kind: "codec";
@@ -178,7 +178,7 @@ declare const postgresAggregateDescriptors: readonly [{
178
178
  readonly operation: "avg";
179
179
  readonly input: {
180
180
  readonly kind: "codec";
181
- readonly codecId: "pg/int@1" | "pg/int2@1" | "pg/int4@1" | "pg/int8@1" | "pg/int8number@1" | "pg/unboundedint@1" | "sql/int@1";
181
+ readonly codecId: "pg/int2@1" | "pg/int4@1" | "pg/int8@1" | "pg/int8number@1" | "pg/unboundedint@1" | "sql/int@1" | "pg/int@1";
182
182
  };
183
183
  readonly output: {
184
184
  readonly kind: "codec";
@@ -190,7 +190,7 @@ declare const postgresAggregateDescriptors: readonly [{
190
190
  readonly operation: "avgDecimal";
191
191
  readonly input: {
192
192
  readonly kind: "codec";
193
- readonly codecId: "pg/int@1" | "pg/int2@1" | "pg/int4@1" | "pg/int8@1" | "pg/int8number@1" | "pg/numeric@1" | "pg/unboundedint@1" | "sql/int@1";
193
+ readonly codecId: "pg/numeric@1" | "pg/int2@1" | "pg/int4@1" | "pg/int8@1" | "pg/int8number@1" | "pg/unboundedint@1" | "sql/int@1" | "pg/int@1";
194
194
  };
195
195
  readonly output: {
196
196
  readonly kind: "codec";
@@ -201,7 +201,7 @@ declare const postgresAggregateDescriptors: readonly [{
201
201
  readonly operation: "avg";
202
202
  readonly input: {
203
203
  readonly kind: "codec";
204
- readonly codecId: "pg/float@1" | "pg/float4@1" | "pg/float8@1" | "sql/float@1";
204
+ readonly codecId: "pg/float4@1" | "pg/float8@1" | "sql/float@1" | "pg/float@1";
205
205
  };
206
206
  readonly output: {
207
207
  readonly kind: "codec";
@@ -287,7 +287,7 @@ declare const postgresAggregateDescriptors: readonly [{
287
287
  readonly operation: "min";
288
288
  readonly input: {
289
289
  readonly kind: "codec";
290
- readonly codecId: "pg/varchar@1" | "sql/varchar@1";
290
+ readonly codecId: "sql/varchar@1" | "pg/varchar@1";
291
291
  };
292
292
  readonly output: {
293
293
  readonly kind: "codec";
@@ -298,7 +298,7 @@ declare const postgresAggregateDescriptors: readonly [{
298
298
  readonly operation: "min";
299
299
  readonly input: {
300
300
  readonly kind: "codec";
301
- readonly codecId: "pg/text-array@1" | "pg/enum@1" | "pg/date-temporal@1" | "pg/timestamp-temporal@1" | "pg/timestamptz-temporal@1" | "pg/time-temporal@1" | "pg/date-string@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/timestamptz-date@1" | "pg/timestamp-date@1" | "pg/timestamp-instant@1" | "pg/time-string@1" | "pg/timetz@1" | "pg/interval@1" | "pg/interval-string@1" | "pg/inet@1" | "pg/oid@1" | "pg/money@1";
301
+ readonly codecId: "pg/timestamp-temporal@1" | "pg/timestamptz-temporal@1" | "pg/time-temporal@1" | "pg/timetz@1" | "pg/inet@1" | "pg/date-temporal@1" | "pg/date-string@1" | "pg/timestamp-string@1" | "pg/timestamptz-date@1" | "pg/timestamp-date@1" | "pg/timestamp-instant@1" | "pg/timestamptz-string@1" | "pg/time-string@1" | "pg/oid@1" | "pg/money@1" | "pg/interval@1" | "pg/interval-string@1" | "pg/enum@1" | "pg/text-array@1";
302
302
  };
303
303
  readonly output: {
304
304
  readonly kind: "self";
@@ -328,7 +328,7 @@ declare const postgresAggregateDescriptors: readonly [{
328
328
  readonly operation: "max";
329
329
  readonly input: {
330
330
  readonly kind: "codec";
331
- readonly codecId: "pg/varchar@1" | "sql/varchar@1";
331
+ readonly codecId: "sql/varchar@1" | "pg/varchar@1";
332
332
  };
333
333
  readonly output: {
334
334
  readonly kind: "codec";
@@ -339,7 +339,7 @@ declare const postgresAggregateDescriptors: readonly [{
339
339
  readonly operation: "max";
340
340
  readonly input: {
341
341
  readonly kind: "codec";
342
- readonly codecId: "pg/text-array@1" | "pg/enum@1" | "pg/date-temporal@1" | "pg/timestamp-temporal@1" | "pg/timestamptz-temporal@1" | "pg/time-temporal@1" | "pg/date-string@1" | "pg/timestamp-string@1" | "pg/timestamptz-string@1" | "pg/timestamptz-date@1" | "pg/timestamp-date@1" | "pg/timestamp-instant@1" | "pg/time-string@1" | "pg/timetz@1" | "pg/interval@1" | "pg/interval-string@1" | "pg/inet@1" | "pg/oid@1" | "pg/money@1";
342
+ readonly codecId: "pg/timestamp-temporal@1" | "pg/timestamptz-temporal@1" | "pg/time-temporal@1" | "pg/timetz@1" | "pg/inet@1" | "pg/date-temporal@1" | "pg/date-string@1" | "pg/timestamp-string@1" | "pg/timestamptz-date@1" | "pg/timestamp-date@1" | "pg/timestamp-instant@1" | "pg/timestamptz-string@1" | "pg/time-string@1" | "pg/oid@1" | "pg/money@1" | "pg/interval@1" | "pg/interval-string@1" | "pg/enum@1" | "pg/text-array@1";
343
343
  };
344
344
  readonly output: {
345
345
  readonly kind: "self";
@@ -348,4 +348,4 @@ declare const postgresAggregateDescriptors: readonly [{
348
348
  })[]];
349
349
  //#endregion
350
350
  export { postgresAggregateDescriptors as t };
351
- //# sourceMappingURL=aggregates-0EfVySBb.d.mts.map
351
+ //# sourceMappingURL=aggregates-CCEULCRK.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"aggregates-0EfVySBb.d.mts","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/aggregates.d.mts"],"mappings":";;;;;;cAKc;WACH;WACA;aACE;;WAEF;aACE;aACA;;WAEF;WACA;;WAEA;WACA;aACE;;WAEF;aACE;aACA;;WAEF;WACA;WACA,OAAO;;WAEP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF"}
1
+ {"version":3,"file":"aggregates-CCEULCRK.d.mts","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/aggregates.d.mts"],"mappings":";;;;;;cAKc;WACH;WACA;aACE;;WAEF;aACE;aACA;;WAEF;WACA;;WAEA;WACA;aACE;;WAEF;aACE;aACA;;WAEF;WACA;WACA,OAAO;;WAEP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA,OAAO;WACP;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;aACA;;WAEF;;WAEA;WACA;aACE;aACA;;WAEF;aACE;;WAEF"}
@@ -5,7 +5,7 @@ import { n as defaultPrimaryKeyName, r as defaultUniqueName, t as defaultForeign
5
5
  import { i as hasAutoincrementDefault, n as autoincrementWidthOfDataType } from "./autoincrement-widths-B_JzBc-a-R7zoqIc3.mjs";
6
6
  import { a as stackDataTypes } from "./planner-sql-checks-RKQqd_b5-CesTHuGH.mjs";
7
7
  import { t as buildTargetDetails } from "./planner-target-details-CUEF0s90-6g-mOgTI.mjs";
8
- import { A as RawSqlCall, B as SetDefaultCall, C as DropIndexCall, G as columnNameOfCall, H as SetNotNullCall, O as DropTableCall, S as DropExtensionCall, T as DropNotNullCall, V as SetExtensionSchemaCall, X as postgresDefaultToDdlColumnDefault, _ as DisableRowLevelSecurityCall, a as AddNativeEnumValueCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddForeignKeyCall, k as EnableRowLevelSecurityCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddPrimaryKeyCall, r as AddColumnWithTemporaryDefaultCall, s as AddRequiredColumnToEmptyTableCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNativeEnumTypeCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-Ek2u4dEh-CIUcdOdr.mjs";
8
+ import { A as EnableRowLevelSecurityCall, C as DropExtensionCall, E as DropNotNullCall, G as SetExtensionSchemaCall, K as SetNotNullCall, M as RawSqlCall, S as DropDefaultCall, T as DropNativeEnumTypeCall, W as SetDefaultCall, Y as columnNameOfCall, a as AddNativeEnumValueCall, b as DropColumnCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddForeignKeyCall, k as DropTableCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddPrimaryKeyCall, r as AddColumnWithTemporaryDefaultCall, s as AddRequiredColumnToEmptyTableCall, t as AddCheckConstraintCall, tt as postgresDefaultToDdlColumnDefault, u as CreateExtensionCall, v as DisableRowLevelSecurityCall, w as DropIndexCall, x as DropConstraintCall, y as DropCheckConstraintCall } from "./op-factory-call-DQW9c0ec-C3qv_STE.mjs";
9
9
  import { t as buildColumnTypeSql } from "./planner-ddl-builders-B1gra_GO-gl5gnaqr.mjs";
10
10
  import { n as resolveIdentityValue } from "./planner-identity-values-CAnifzzT-D1ncWy3d.mjs";
11
11
  import { dataTypeParams } from "@prisma/orm-framework/components/codec";
@@ -20,7 +20,7 @@ import * as contractFree from "@prisma/orm-family-sql/relational-core/contract-f
20
20
  import { RelationalSchemaNodeKind, SqlSchemaIR, sqlColumnTypesEqual } from "@prisma/orm-family-sql/schema-ir/types";
21
21
  import { columnTakesTemporaryValue } from "@prisma/orm-family-sql/family/control";
22
22
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
23
- //#region ../../../3-targets/postgres/1-target/dist/control-policy-RIiGtzLL.mjs
23
+ //#region ../../../3-targets/postgres/1-target/dist/control-policy-K52VpMX0.mjs
24
24
  /**
25
25
  * The storage-`entries` coordinate `(entityKind, entityName)` a Postgres diff
26
26
  * node addresses — a table by its name, a native enum by its physical type
@@ -663,6 +663,10 @@ function classifyCall(call) {
663
663
  case "renameColumn": return "column";
664
664
  case "replaceStoredValue":
665
665
  case "removeStoredValue":
666
+ case "renameStoredKey":
667
+ case "removeStoredKey":
668
+ case "fillStoredKey":
669
+ case "deleteRows":
666
670
  case "alterColumnType":
667
671
  case "setNotNull":
668
672
  case "dropNotNull":
@@ -1398,4 +1402,4 @@ function resolvePostgresNodeIssueControlPolicySubject(issue, contract) {
1398
1402
  //#endregion
1399
1403
  export { planIssues as a, renderPostgresSuppression as c, resolvePostgresNodeIssueControlPolicySubject as d, resolvePostgresNodeIssueCreationFactoryName as f, issueSchemaName as i, resolveNamespaceIdForDdlSchema as l, conflictForDisallowedCall as n, postgresNodeStorageCoordinate as o, tableAt as p, issueNode as r, postgresPlannerStrategies as s, coalesceSubtreeIssues as t, resolvePostgresCallControlPolicySubject as u };
1400
1404
 
1401
- //# sourceMappingURL=control-policy-RIiGtzLL-dMGUsj7L.mjs.map
1405
+ //# sourceMappingURL=control-policy-K52VpMX0-CateWffI.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"control-policy-K52VpMX0-CateWffI.mjs","names":[],"sources":["../../../../3-targets/postgres/1-target/dist/control-policy-K52VpMX0.mjs"],"sourcesContent":["import { A as pgText, E as pgNumeric, H as pgVarbit, I as pgTimestamptz, M as pgTime, P as pgTimestamp, R as pgTimetz, U as pgVarchar, _ as pgInt2, h as pgFloat8, m as pgFloat4, v as pgInt4, y as pgInt8 } from \"./data-types-B47LbZ3z.mjs\";\nimport \"./namespace-ids-xtp_ZY86.mjs\";\nimport { r as isPostgresSchema } from \"./postgres-schema-BBWgs4fX.mjs\";\nimport { i as PostgresSchemaNodeKind, n as PostgresNativeEnumSchemaNode, r as PostgresExtensionSchemaNode, s as postgresNodeEntityKind, t as PostgresTableSchemaNode } from \"./postgres-table-schema-node-nY6II-Uv.mjs\";\nimport { n as defaultPrimaryKeyName, r as defaultUniqueName, t as defaultForeignKeyName } from \"./default-constraint-names-Cz9Yoeim.mjs\";\nimport { i as hasAutoincrementDefault, n as autoincrementWidthOfDataType } from \"./autoincrement-widths-B_JzBc-a.mjs\";\nimport { A as EnableRowLevelSecurityCall, C as DropExtensionCall, E as DropNotNullCall, G as SetNotNullCall, J as columnNameOfCall, M as RawSqlCall, S as DropDefaultCall, T as DropNativeEnumTypeCall, U as SetDefaultCall, W as SetExtensionSchemaCall, X as postgresDefaultToDdlColumnDefault, a as AddNativeEnumValueCall, b as DropColumnCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddForeignKeyCall, k as DropTableCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddPrimaryKeyCall, r as AddColumnWithTemporaryDefaultCall, s as AddRequiredColumnToEmptyTableCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DisableRowLevelSecurityCall, w as DropIndexCall, x as DropConstraintCall, y as DropCheckConstraintCall } from \"./op-factory-call-DQW9c0ec.mjs\";\nimport { a as stackDataTypes } from \"./planner-sql-checks-RKQqd_b5.mjs\";\nimport { t as buildTargetDetails } from \"./planner-target-details-CUEF0s90.mjs\";\nimport { t as buildColumnTypeSql } from \"./planner-ddl-builders-B1gra_GO.mjs\";\nimport { n as resolveIdentityValue } from \"./planner-identity-values-CAnifzzT.mjs\";\nimport { dataTypeParams } from \"@internal/framework-components/codec\";\nimport { isSqlDataType, renderSqlTypeName } from \"@internal/sql-contract/data-type\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { issueOutcome, orderIssuesByDependencies } from \"@internal/framework-components/control\";\nimport { UNBOUND_NAMESPACE_ID, entityAt } from \"@internal/framework-components/ir\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { invariant } from \"@internal/utils/assertions\";\nimport * as contractFree from \"@internal/sql-relational-core/contract-free\";\nimport { columnTakesTemporaryValue } from \"@internal/family-sql/control\";\nimport { RelationalSchemaNodeKind, SqlSchemaIR, sqlColumnTypesEqual } from \"@internal/sql-schema-ir/types\";\nimport { notOk, ok } from \"@internal/utils/result\";\n//#region src/core/schema-ir/node-storage-coordinate.ts\n/**\n* The storage-`entries` coordinate `(entityKind, entityName)` a Postgres diff\n* node addresses — a table by its name, a native enum by its physical type\n* name. `undefined` for a node that is not a whole storage entity (a namespace,\n* a column, a policy). Lets ownership/subject resolution treat every entity kind\n* uniformly, the node self-describing its storage identity.\n*/\nfunction postgresNodeStorageCoordinate(node) {\n\tif (PostgresTableSchemaNode.is(node)) {\n\t\tconst entityKind = postgresNodeEntityKind(node.nodeKind);\n\t\treturn entityKind === void 0 ? void 0 : {\n\t\t\tentityKind,\n\t\t\tentityName: node.name\n\t\t};\n\t}\n\tif (PostgresNativeEnumSchemaNode.is(node)) {\n\t\tconst entityKind = postgresNodeEntityKind(node.nodeKind);\n\t\treturn entityKind === void 0 ? void 0 : {\n\t\t\tentityKind,\n\t\t\tentityName: node.typeName\n\t\t};\n\t}\n\tif (PostgresExtensionSchemaNode.is(node)) {\n\t\tconst entityKind = postgresNodeEntityKind(node.nodeKind);\n\t\treturn entityKind === void 0 ? void 0 : {\n\t\t\tentityKind,\n\t\t\tentityName: node.name\n\t\t};\n\t}\n}\n//#endregion\n//#region src/core/migrations/column-ddl-rendering.ts\nconst AUTOINCREMENT = \"autoincrement()\";\n/**\n* Reconstructs the `StorageColumn`-shaped fields the DDL builder functions\n* (`buildColumnTypeSql`, `resolveIdentityValue`)\n* expect, from a column node's own stamped codec identity (`codecRef`,\n* Decision 5) — never the contract.\n*/\nfunction columnLike(column) {\n\treturn {\n\t\t...columnTypeLike(`column \"${column.name}\"`, column),\n\t\tnullable: column.nullable,\n\t\t...ifDefined(\"default\", column.authoredDefault ?? column.resolvedDefault)\n\t};\n}\nfunction columnTypeLike(owner, identity) {\n\tif (identity.codecRef === void 0) throw new InternalError(`columnTypeLike: expected ${owner} carries no codec identity — the expected tree must be derived via contractToSchemaIR for planning`);\n\treturn {\n\t\tcodecId: identity.codecRef.codecId,\n\t\tmany: identity.many ?? identity.codecRef.many ? { elementNullable: false } : false,\n\t\t...ifDefined(\"typeParams\", identity.codecRef.typeParams !== void 0 ? blindCast(identity.codecRef.typeParams) : void 0)\n\t};\n}\n/**\n* The type DDL writes for a column node: the name of the type it is stored as, with the parameters as the contract writes them, `[]` for a list, and for an `autoincrement()` column of an integer type the serial pseudo-type when `allowPseudoTypes`.\n*/\nfunction columnTypeSql(column, allowPseudoTypes) {\n\tconst type = column.storedType;\n\tif (type === void 0 || !isSqlDataType(type)) throw new InternalError(`column \"${column.name}\" has no data type; the expected tree must be derived via contractToSchemaIR for planning`);\n\tconst columnDefault = column.authoredDefault ?? column.resolvedDefault;\n\tif (allowPseudoTypes && columnDefault?.kind === \"function\" && columnDefault.expression === AUTOINCREMENT) {\n\t\tconst width = autoincrementWidthOfDataType(type.id);\n\t\tif (width !== void 0) return width.serialType;\n\t}\n\tconst typeSql = renderSqlTypeName(type, dataTypeParams(type, column.codecRef?.typeParams));\n\treturn column.many ?? column.codecRef?.many ? `${typeSql}[]` : typeSql;\n}\n/**\n* Builds the `CREATE TABLE` / `ADD COLUMN` DDL column for an expected column\n* node, writing its type from the type the column is stored as.\n*/\nfunction renderColumnDdl(name, column) {\n\tconst typeSql = columnTypeSql(column, true);\n\tconst ddlDefault = postgresDefaultToDdlColumnDefault(column.authoredDefault ?? column.resolvedDefault);\n\treturn contractFree.col(name, typeSql, {\n\t\t...!column.nullable ? { notNull: true } : {},\n\t\t...ifDefined(\"default\", ddlDefault),\n\t\t...ifDefined(\"codecRef\", column.codecRef)\n\t});\n}\n/**\n* Builds the `ALTER COLUMN … TYPE` operands for an expected column node.\n*/\nfunction renderColumnAlterType(column) {\n\treturn columnTypeSql(column, false);\n}\n/**\n* Resolves the identity value (monoid neutral element) SQL literal used as\n* the temporary default when adding a NOT-NULL column with no contract\n* default (`notNullAddColumnCallStrategy`'s shared-temp-default backfill).\n* `null` when the column's type has no built-in/codec-provided identity\n* value.\n*/\nfunction resolveColumnTemporaryDefault(column, codecHooks, types) {\n\treturn resolveIdentityValue(columnLike(column), codecHooks, types);\n}\n/**\n* The column whose `SET DEFAULT` a column-default diff node asks for, carrying its authored default, or its resolved one when nothing was authored, and its type and codec, from which the adapter writes the clause. An `autoincrement()` default is carried as itself, for `setDefault` to attach a sequence, or to refuse when the column is not a smallint, integer or bigint. `undefined` when the node carries no default, or one DDL does not write.\n*/\nfunction buildSetDefaultColumn(columnName, defaultNode, types) {\n\tconst authored = defaultNode.authored ?? defaultNode.resolved;\n\tif (authored === void 0) return void 0;\n\tconst typeLike = columnTypeLike(\"column default\", defaultNode);\n\tif (authored.kind === \"function\" && authored.expression === AUTOINCREMENT) return contractFree.col(columnName, buildColumnTypeSql(typeLike, types, false), {\n\t\tdefault: contractFree.fn(AUTOINCREMENT),\n\t\t...ifDefined(\"codecRef\", defaultNode.codecRef)\n\t});\n\tconst ddlDefault = postgresDefaultToDdlColumnDefault(authored);\n\tif (ddlDefault === void 0) return void 0;\n\treturn contractFree.col(columnName, buildColumnTypeSql(typeLike, types, false), {\n\t\tdefault: ddlDefault,\n\t\t...ifDefined(\"codecRef\", defaultNode.codecRef)\n\t});\n}\n//#endregion\n//#region src/core/migrations/primary-key-change.ts\nfunction keyChangeOf(issue) {\n\tconst ddlSchemaName = issueSchemaName(issue);\n\tconst tableName = issueTableName(issue);\n\tif (issueNode(issue)?.nodeKind !== RelationalSchemaNodeKind.primaryKey || issueOutcome(issue) === \"not-found\" || ddlSchemaName === void 0 || tableName === void 0) return;\n\treturn {\n\t\tissue,\n\t\tddlSchemaName,\n\t\ttableName,\n\t\toldKey: blindCast(issue.actual)\n\t};\n}\nfunction sameColumnSet(left, right) {\n\treturn left.length === right.length && left.every((column) => right.includes(column));\n}\nfunction foreignKeysOf(tree) {\n\treturn Object.values(tree.namespaces).flatMap((namespace) => Object.values(namespace.tables).flatMap((table) => table.foreignKeys.map((foreignKey) => ({\n\t\tddlSchemaName: namespace.schemaName,\n\t\ttableName: table.name,\n\t\tforeignKey\n\t}))));\n}\nfunction referencesKey(at, change) {\n\treturn (at.foreignKey.resolvedReferencedNamespace ?? at.ddlSchemaName) === change.ddlSchemaName && at.foreignKey.referencedTable === change.tableName && sameColumnSet(at.foreignKey.referencedColumns, change.oldKey.columns);\n}\nfunction isTableIssueOf(issue, at) {\n\treturn issueSchemaName(issue) === at.ddlSchemaName && issueTableName(issue) === at.tableName;\n}\nfunction hasOwnIssue(at, issues) {\n\treturn issues.some((issue) => issueNode(issue)?.nodeKind === RelationalSchemaNodeKind.foreignKey && isTableIssueOf(issue, at) && issue.actual?.id === at.foreignKey.id);\n}\nfunction dropsTable(at, issues) {\n\treturn issues.some((issue) => issueNode(issue)?.nodeKind === PostgresSchemaNodeKind.table && issueOutcome(issue) === \"not-expected\" && isTableIssueOf(issue, at));\n}\nfunction endForeignKey(endTree, at) {\n\treturn Object.values(endTree.namespaces).find((candidate) => candidate.schemaName === at.ddlSchemaName)?.tables[at.tableName]?.foreignKeys.find((foreignKey) => foreignKey.id === at.foreignKey.id);\n}\nfunction foreignKeyName(at) {\n\treturn at.foreignKey.name ?? defaultForeignKeyName(at.tableName, at.foreignKey.columns);\n}\nconst migrationNewAdvice = \"write the change as its own migration with prisma migration new, dropping that foreign key before the key change and adding it back after it.\";\nfunction quotedTable(at) {\n\treturn `\"${at.ddlSchemaName}\".\"${at.tableName}\"`;\n}\nfunction blockedKeyChange(change, at, reason, why) {\n\tconst keyName = change.oldKey.name ?? defaultPrimaryKeyName(change.tableName);\n\tconst name = foreignKeyName(at);\n\treturn {\n\t\tkind: \"foreignKeyConflict\",\n\t\tsummary: `Primary key \"${keyName}\" on \"${change.ddlSchemaName}\".\"${change.tableName}\" cannot change while foreign key \"${name}\" on ${quotedTable(at)} references it, and ${reason}.`,\n\t\twhy,\n\t\tlocation: {\n\t\t\tentityKind: \"table\",\n\t\t\tentityName: at.tableName,\n\t\t\tconstraint: name\n\t\t}\n\t};\n}\nfunction controlPolicyRefusal(change, at, declared) {\n\tconst table = quotedTable(at);\n\tconst dbUpdateAdvice = declared ? \"With db update, drop that foreign key yourself and leave it out of the contract, run db update, then add the foreign key back to both if you still want it and run db update again.\" : \"With db update, drop that foreign key yourself, run db update, then add the foreign key back if you still want it.\";\n\treturn blockedKeyChange(change, at, `the control policy does not let this plan change ${table}`, `With migration plan, give ${table} a control policy that lets this plan change it and plan again, or ${migrationNewAdvice} ${dbUpdateAdvice}`);\n}\nfunction otherSpaceRefusal(change, at) {\n\tconst table = quotedTable(at);\n\treturn blockedKeyChange(change, at, `another contract space owns ${table}`, `Change that foreign key through the contract space that owns ${table}, or ${migrationNewAdvice}`);\n}\nfunction undeclaredTableRefusal(change, at) {\n\tconst table = quotedTable(at);\n\treturn blockedKeyChange(change, at, `the contract does not declare ${table}`, `This plan allows only additive changes, as db init does, so it cannot change a primary key. Run db update instead, which drops ${table} together with its foreign key; add ${table} to the contract first if you want to keep it.`);\n}\nfunction removedForeignKeyRefusal(change, at) {\n\treturn blockedKeyChange(change, at, `the contract leaves that foreign key out of ${quotedTable(at)}`, \"This plan allows only additive changes, as db init does, so it can neither drop that foreign key nor change a primary key. Run db update instead, which drops that foreign key before the key change.\");\n}\nfunction undeclaredSchemaRefusal(change, at) {\n\tconst table = quotedTable(at);\n\treturn blockedKeyChange(change, at, `the contract does not declare schema \"${at.ddlSchemaName}\", whose tables a plan never drops`, `With migration plan, declare ${table} in the contract and plan again, or ${migrationNewAdvice} With db update, drop that foreign key yourself, run db update, then add the foreign key back if you still want it.`);\n}\nfunction allowsOnlyAdditive(ctx) {\n\tconst allowed = ctx.policy.allowedOperationClasses;\n\treturn !allowed.includes(\"widening\") && !allowed.includes(\"destructive\");\n}\nfunction tableInEndTree(endTree, at) {\n\treturn Object.values(endTree.namespaces).some((namespace) => namespace.schemaName === at.ddlSchemaName && namespace.tables[at.tableName] !== void 0);\n}\nfunction keyCalls(change, ctx) {\n\tconst schemaName = emissionSchemaName(ctx, change.ddlSchemaName);\n\tconst drop = new DropConstraintCall(schemaName, change.tableName, change.oldKey.name ?? defaultPrimaryKeyName(change.tableName), \"primaryKey\");\n\tif (issueOutcome(change.issue) === \"not-expected\") return [drop];\n\tconst newKey = blindCast(change.issue.expected);\n\treturn [drop, new AddPrimaryKeyCall(schemaName, change.tableName, newKey.name ?? defaultPrimaryKeyName(change.tableName), [...newKey.columns])];\n}\n/**\n* Plans a primary key whose columns change, or that is removed: a drop of the old key, then an add of the new one. Postgres refuses to drop a key while a foreign key depends on its index, so every foreign key of the start tree that references the old key's columns is dropped first, unless its own issue already drops it, and added back from the end tree. The plan refuses the change instead when such a foreign key is on a table the control policy keeps it away from or another contract space owns, or when the end tree leaves the foreign key out and the plan does not drop it or its table: under a policy that allows additive changes alone, as `db init` does, or because the table is in a schema the end contract does not declare.\n*/\nfunction primaryKeyChangeStrategy(issues, ctx) {\n\tconst changes = issues.flatMap((issue) => keyChangeOf(issue) ?? []);\n\tif (changes.length === 0) return { kind: \"no_match\" };\n\tconst startForeignKeys = foreignKeysOf(ctx.startTree);\n\tconst calls = [];\n\tconst conflicts = [];\n\tfor (const change of changes) {\n\t\tconst changeCalls = [];\n\t\tconst changeConflicts = [];\n\t\tfor (const at of startForeignKeys) {\n\t\t\tif (!referencesKey(at, change) || hasOwnIssue(at, ctx.allIssues)) continue;\n\t\t\tconst drop = new DropConstraintCall(emissionSchemaName(ctx, at.ddlSchemaName), at.tableName, foreignKeyName(at), \"foreignKey\");\n\t\t\tconst kept = endForeignKey(ctx.endTree, at);\n\t\t\tconst authority = ctx.foreignKeyDropAuthority(at.ddlSchemaName, at.tableName, at.foreignKey);\n\t\t\tif (authority !== \"allowed\") {\n\t\t\t\tchangeConflicts.push(authority === \"otherSpace\" ? otherSpaceRefusal(change, at) : controlPolicyRefusal(change, at, kept !== void 0));\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tif (kept !== void 0) changeCalls.push(drop, new AddForeignKeyCall(drop.schemaName, at.tableName, fkSpecFromNode(kept, at.tableName)));\n\t\t\telse if (dropsTable(at, ctx.allIssues)) changeCalls.push(drop);\n\t\t\telse changeConflicts.push(tableInEndTree(ctx.endTree, at) ? removedForeignKeyRefusal(change, at) : allowsOnlyAdditive(ctx) ? undeclaredTableRefusal(change, at) : undeclaredSchemaRefusal(change, at));\n\t\t}\n\t\tif (changeConflicts.length > 0) conflicts.push(...changeConflicts);\n\t\telse calls.push(...changeCalls, ...keyCalls(change, ctx));\n\t}\n\tconst consumed = new Set(changes.map((change) => change.issue));\n\treturn {\n\t\tkind: \"match\",\n\t\tissues: issues.filter((issue) => !consumed.has(issue)),\n\t\tcalls,\n\t\tconflicts\n\t};\n}\n//#endregion\n//#region src/core/migrations/safe-widenings.ts\n/** The changes between data types that keep every value: each pair is `from→to` by data type id. */\nconst SAFE_WIDENINGS = /* @__PURE__ */ new Set([\n\t`${pgInt2.id}→${pgInt4.id}`,\n\t`${pgInt2.id}→${pgInt8.id}`,\n\t`${pgInt4.id}→${pgInt8.id}`,\n\t`${pgInt2.id}→${pgFloat4.id}`,\n\t`${pgInt2.id}→${pgFloat8.id}`,\n\t`${pgInt4.id}→${pgFloat8.id}`,\n\t`${pgFloat4.id}→${pgFloat8.id}`,\n\t`${pgVarchar.id}→${pgText.id}`,\n\t`${pgInt2.id}→${pgText.id}`,\n\t`${pgInt4.id}→${pgText.id}`,\n\t`${pgInt8.id}→${pgText.id}`,\n\t`${pgNumeric.id}→${pgText.id}`,\n\t`${pgFloat4.id}→${pgText.id}`,\n\t`${pgFloat8.id}→${pgText.id}`\n]);\n/** Types whose `length` caps their values; a larger cap, or none, keeps every value. */\nconst LENGTH_CAPPED = /* @__PURE__ */ new Set([pgVarchar.id, pgVarbit.id]);\n/** Types whose `precision` rounds their fractional seconds; more, or none, keeps every value. */\nconst PRECISION_ROUNDED = /* @__PURE__ */ new Set([\n\tpgTime.id,\n\tpgTimetz.id,\n\tpgTimestamp.id,\n\tpgTimestamptz.id\n]);\nfunction numberParam(params, key) {\n\tconst value = params[key];\n\treturn typeof value === \"number\" ? value : void 0;\n}\n/** Whether a cap, where `undefined` means none, is at least as large as before. */\nfunction capGrows(from, to) {\n\treturn to === void 0 || from !== void 0 && to >= from;\n}\n/**\n* A `numeric` keeps every value when it allows at least as many digits before the point and after\n* it; an unconstrained `numeric` holds any value.\n*/\nfunction numericGrows(from, to) {\n\tconst toPrecision = numberParam(to, \"precision\");\n\tif (toPrecision === void 0) return true;\n\tconst fromPrecision = numberParam(from, \"precision\");\n\tif (fromPrecision === void 0) return false;\n\tconst fromScale = numberParam(from, \"scale\") ?? 0;\n\tconst toScale = numberParam(to, \"scale\") ?? 0;\n\treturn toScale >= fromScale && toPrecision - toScale >= fromPrecision - fromScale;\n}\n/** Whether changing a column from one type to another keeps every value: both have a stored type, and the pair is a safe widening by stored type id and parameters in normal form. */\nfunction isSafeTypeWidening(from, to) {\n\tif (from.storedType === void 0 || to.storedType === void 0) return false;\n\tconst fromId = from.storedType.id;\n\tconst toId = to.storedType.id;\n\tconst fromParams = from.storedTypeParams ?? {};\n\tconst toParams = to.storedTypeParams ?? {};\n\tif (SAFE_WIDENINGS.has(`${fromId}→${toId}`)) return true;\n\tif (fromId !== toId) return false;\n\tif (LENGTH_CAPPED.has(fromId)) return capGrows(numberParam(fromParams, \"length\"), numberParam(toParams, \"length\"));\n\tif (PRECISION_ROUNDED.has(fromId)) return capGrows(numberParam(fromParams, \"precision\"), numberParam(toParams, \"precision\"));\n\tif (fromId === pgNumeric.id) return numericGrows(fromParams, toParams);\n\treturn false;\n}\n/** Whether changing a live column to the contract's column keeps every value. A list column never widens safely. */\nfunction liveColumnWidensSafely(expected, actual) {\n\tif (expected.many === true || actual.many === true) return false;\n\treturn isSafeTypeWidening(actual, expected);\n}\n//#endregion\n//#region src/core/migrations/planner-strategies.ts\n/**\n* Look up a storage table by its explicit namespace coordinate. Returns\n* `undefined` when the namespace has no table by that name (or no such\n* namespace exists). Callers that get `undefined` MUST treat it as an\n* explicit conflict — never silently fall back to a global default\n* schema or a name-only walk, because that footgun would resolve a\n* stale or duplicate table name to whichever namespace the iteration\n* order surfaced first (a real data-loss hazard in multi-namespace\n* contracts where two namespaces can carry the same table name).\n*/\nfunction tableAt(storage, namespaceId, tableName) {\n\tconst ns = storage.namespaces[namespaceId];\n\tif (ns === void 0) return void 0;\n\treturn ns.entries.table?.[tableName];\n}\n/**\n* Recovers the contract namespace id for a DDL schema name embedded in a\n* diff-issue path (`path[1]`). The strategies need the CONTRACT column/table\n* (for codec-hook reads and eligibility probes the retained subsystems still\n* run) even though the issue itself only carries the resolved DDL schema —\n* this is the reverse of `resolveDdlSchemaForNamespace`.\n*/\nfunction namespaceIdForDdlSchema(ctx, ddlSchemaName) {\n\treturn resolveNamespaceIdForDdlSchema(ctx.toContract, ddlSchemaName);\n}\n/** A `not-equal` column issue whose node pair is narrowed to `SqlColumnIR`. */\nfunction columnNodePair(issue) {\n\tconst node = issueNode(issue);\n\tif (node === void 0 || node.nodeKind !== RelationalSchemaNodeKind.column) return void 0;\n\tif (issue.expected === void 0 || issue.actual === void 0) return void 0;\n\treturn {\n\t\texpected: blindCast(issue.expected),\n\t\tactual: blindCast(issue.actual)\n\t};\n}\n/** The `--backfill` statement's column an issue is about, if a statement names it. */\nfunction backfilled(ctx, ddlSchemaName, tableName, columnName) {\n\tconst namespaceId = namespaceIdForDdlSchema(ctx, ddlSchemaName);\n\treturn ctx.statementColumns.backfill.find((column) => column.namespaceId === namespaceId && column.table === tableName && column.column === columnName);\n}\n/**\n* Handles a required column with no default added to an existing table, for a field a\n* `--backfill` statement names: a nullable add, a data transform whose slots the user fills, then\n* `SET NOT NULL`. Every other such column is left to `notNullAddColumnCallStrategy`.\n*/\nconst notNullBackfillCallStrategy = (issues, ctx) => {\n\tif (!ctx.policy.allowedOperationClasses.includes(\"data\")) return { kind: \"no_match\" };\n\tconst matched = [];\n\tconst calls = [];\n\tfor (const issue of issues) {\n\t\tif (issueOutcome(issue) !== \"not-found\") continue;\n\t\tconst node = issueNode(issue);\n\t\tif (node === void 0 || node.nodeKind !== RelationalSchemaNodeKind.column) continue;\n\t\tconst expected = blindCast(issue.expected);\n\t\tif (expected.nullable !== false || expected.resolvedDefault !== void 0) continue;\n\t\tconst ddlSchemaName = issueSchemaName(issue);\n\t\tconst tableName = issueTableName(issue);\n\t\tif (ddlSchemaName === void 0 || tableName === void 0) continue;\n\t\tconst named = backfilled(ctx, ddlSchemaName, tableName, expected.name);\n\t\tif (named === void 0) continue;\n\t\tconst schemaName = emissionSchemaName(ctx, ddlSchemaName);\n\t\tconst slot = named.text;\n\t\tmatched.push(issue);\n\t\tconst ddl = renderColumnDdl(expected.name, expected);\n\t\tconst nullableSpec = contractFree.col(ddl.name, ddl.type, { ...ddl.codecRef !== void 0 ? { codecRef: ddl.codecRef } : {} });\n\t\tcalls.push(new AddColumnCall(schemaName, tableName, nullableSpec, ctx.dataTypes), new DataTransformCall(`backfill-${tableName}-${expected.name}`, `${slot}:check`, `${slot}:run`, \"data\", {\n\t\t\tschema: schemaName,\n\t\t\ttable: tableName,\n\t\t\tcolumn: expected.name\n\t\t}), new SetNotNullCall(schemaName, tableName, expected.name));\n\t}\n\tif (matched.length === 0) return { kind: \"no_match\" };\n\treturn {\n\t\tkind: \"match\",\n\t\tissues: issues.filter((i) => !matched.includes(i)),\n\t\tcalls,\n\t\trecipe: true\n\t};\n};\n/**\n* Handles a `not-equal` column issue whose type differs, for a field a `--convert` statement names,\n* in a plan that may include `data` operations: `migration plan`. The alter is classed `data` and\n* its USING clause is a slot the user fills with the conversion. A known-safe widening needs no\n* conversion and is left to `mapNodeIssueToCall`, as is every type change no statement names: a\n* direct alter, `widening` or `destructive`, which the plan asks about.\n*\n* One node issue can carry both type and nullability drift, so the strategy also emits the\n* nullability change: `SET NOT NULL` after the alter, whose conversion can map NULL to a value.\n*/\n/** A field as a statement names it: with its namespace only when the contract has several. */\nconst typeChangeCallStrategy = (issues, ctx) => {\n\tif (ctx.fromContract === null || !ctx.policy.allowedOperationClasses.includes(\"data\")) return { kind: \"no_match\" };\n\tconst matched = [];\n\tconst calls = [];\n\tfor (const issue of issues) {\n\t\tif (issueOutcome(issue) !== \"not-equal\") continue;\n\t\tconst pair = columnNodePair(issue);\n\t\tif (pair === void 0) continue;\n\t\tconst { expected, actual } = pair;\n\t\tif (sqlColumnTypesEqual(expected, actual)) continue;\n\t\tconst ddlSchemaName = issueSchemaName(issue);\n\t\tconst tableName = issueTableName(issue);\n\t\tif (ddlSchemaName === void 0 || tableName === void 0) continue;\n\t\tconst namespaceId = namespaceIdForDdlSchema(ctx, ddlSchemaName);\n\t\tconst converted = ctx.statementColumns.convert.find((column) => column.namespaceId === namespaceId && column.table === tableName && column.column === expected.name);\n\t\tif (converted === void 0) continue;\n\t\tif (isSafeTypeWidening(actual, expected)) continue;\n\t\tconst schemaName = emissionSchemaName(ctx, ddlSchemaName);\n\t\tmatched.push(issue);\n\t\tcalls.push(new AlterColumnTypeCall({\n\t\t\tschemaName,\n\t\t\ttableName,\n\t\t\tcolumnName: expected.name,\n\t\t\ttype: renderColumnAlterType(expected),\n\t\t\tusing: {\n\t\t\t\tkind: \"placeholder\",\n\t\t\t\tslot: `${converted.text}:convert`\n\t\t\t},\n\t\t\t...expected.catalogText !== void 0 ? { raw: true } : {},\n\t\t\tdataTypes: ctx.dataTypes,\n\t\t\townsAutoincrementSequence: hasAutoincrementDefault(actual)\n\t\t}));\n\t\tif (expected.nullable !== actual.nullable) calls.push(expected.nullable ? new DropNotNullCall(schemaName, tableName, expected.name) : new SetNotNullCall(schemaName, tableName, expected.name));\n\t}\n\tif (matched.length === 0) return { kind: \"no_match\" };\n\treturn {\n\t\tkind: \"match\",\n\t\tissues: issues.filter((i) => !matched.includes(i)),\n\t\tcalls,\n\t\trecipe: true\n\t};\n};\n/**\n* Handles a `not-equal` column issue whose type did not change but which becomes required, for a\n* field a `--backfill` statement names: a data transform whose slots the user fills with values for\n* the NULLs, then `SET NOT NULL`. Every other such column gets the direct `SET NOT NULL` of\n* `mapNodeIssueToCall`. A type-changed issue's nullability is handled by `typeChangeCallStrategy`\n* or the direct alter.\n*/\nconst nullableTighteningCallStrategy = (issues, ctx) => {\n\tif (!ctx.policy.allowedOperationClasses.includes(\"data\")) return { kind: \"no_match\" };\n\tconst matched = [];\n\tconst calls = [];\n\tfor (const issue of issues) {\n\t\tif (issueOutcome(issue) !== \"not-equal\") continue;\n\t\tconst pair = columnNodePair(issue);\n\t\tif (pair === void 0) continue;\n\t\tconst { expected, actual } = pair;\n\t\tif (!sqlColumnTypesEqual(expected, actual)) continue;\n\t\tif (expected.nullable !== false || actual.nullable !== true) continue;\n\t\tconst ddlSchemaName = issueSchemaName(issue);\n\t\tconst tableName = issueTableName(issue);\n\t\tif (ddlSchemaName === void 0 || tableName === void 0) continue;\n\t\tconst named = backfilled(ctx, ddlSchemaName, tableName, expected.name);\n\t\tif (named === void 0) continue;\n\t\tconst schemaName = emissionSchemaName(ctx, ddlSchemaName);\n\t\tconst slot = named.text;\n\t\tmatched.push(issue);\n\t\tcalls.push(new DataTransformCall(`handle-nulls-${tableName}-${expected.name}`, `${slot}:check`, `${slot}:run`, \"data\", {\n\t\t\tschema: schemaName,\n\t\t\ttable: tableName,\n\t\t\tcolumn: expected.name\n\t\t}), new SetNotNullCall(schemaName, tableName, expected.name));\n\t}\n\tif (matched.length === 0) return { kind: \"no_match\" };\n\treturn {\n\t\tkind: \"match\",\n\t\tissues: issues.filter((i) => !matched.includes(i)),\n\t\tcalls,\n\t\trecipe: true\n\t};\n};\n/**\n* Dispatches codec-typed storage types through their codec's\n* `planTypeOperations` hook (the authoritative source for codec-driven DDL\n* such as custom type creation). Codec extension/type ops are not modeled as\n* diff nodes — this strategy drives entirely off `ctx.toContract.storage.types`\n* + codec hooks, consuming nothing from the node issue list (there is no\n* node-vocabulary equivalent of `type_missing` / `enum_values_changed`).\n*/\nconst storageTypePlanCallStrategy = (issues, ctx) => {\n\tconst storageTypes = ctx.toContract.storage.types ?? {};\n\tif (Object.keys(storageTypes).length === 0) return { kind: \"no_match\" };\n\tconst calls = [];\n\tfor (const [typeName, typeInstance] of Object.entries(storageTypes).sort(([a], [b]) => a.localeCompare(b))) {\n\t\tconst codecInstance = blindCast(typeInstance);\n\t\tconst hook = ctx.codecHooks.get(codecInstance.codecId);\n\t\tif (!hook?.planTypeOperations) continue;\n\t\tconst planResult = hook.planTypeOperations({\n\t\t\ttypeName,\n\t\t\ttypeInstance: codecInstance,\n\t\t\tcontract: ctx.toContract,\n\t\t\tschema: ctx.schema,\n\t\t\tschemaName: ctx.schemaName,\n\t\t\tpolicy: ctx.policy\n\t\t});\n\t\tif (!planResult) continue;\n\t\tfor (const op of planResult.operations) calls.push(new RawSqlCall(blindCast({\n\t\t\t...op,\n\t\t\ttarget: {\n\t\t\t\tid: op.target.id,\n\t\t\t\tdetails: buildTargetDetails(\"type\", typeName, ctx.schemaName)\n\t\t\t}\n\t\t})));\n\t}\n\tif (calls.length === 0) return { kind: \"no_match\" };\n\treturn {\n\t\tkind: \"match\",\n\t\tissues,\n\t\tcalls\n\t};\n};\n/**\n* Handles `not-found` column issues for NOT NULL columns without a contract\n* default. Replaces the legacy `buildAddColumnItem` non-default branches.\n*\n* Two shapes:\n* - Shared-temp-default safe: emit a single atomic composite op (add\n* nullable → backfill identity value → `SET NOT NULL` → `DROP DEFAULT`).\n* The temp-default value is resolved from the column node's `codecRef`\n* (`resolveColumnTemporaryDefault`, wrapping `resolveIdentityValue`).\n* - Empty-table guarded, for a column in a key, or whose values come from a value set, which\n* no one value stands in for: emit a hand-built op with a `tableIsEmptyCheck`\n* precheck so the failure message is \"table is not empty\" rather than the\n* raw PG NOT NULL violation.\n*\n* \"Normal\" not-found column cases (nullable or has a contract default) are\n* left for `mapNodeIssueToCall`'s default `AddColumnCall` emission.\n*/\nconst notNullAddColumnCallStrategy = (issues, ctx) => {\n\tconst matched = [];\n\tconst calls = [];\n\tfor (const issue of issues) {\n\t\tif (issueOutcome(issue) !== \"not-found\") continue;\n\t\tconst node = issueNode(issue);\n\t\tif (node === void 0 || node.nodeKind !== RelationalSchemaNodeKind.column) continue;\n\t\tconst expected = blindCast(issue.expected);\n\t\tif (expected.nullable !== false || expected.resolvedDefault !== void 0) continue;\n\t\tconst ddlSchemaName = issueSchemaName(issue);\n\t\tconst tableName = issueTableName(issue);\n\t\tif (ddlSchemaName === void 0 || tableName === void 0) continue;\n\t\tconst namespaceId = namespaceIdForDdlSchema(ctx, ddlSchemaName);\n\t\tconst schemaName = namespaceId === UNBOUND_NAMESPACE_ID ? UNBOUND_NAMESPACE_ID : ddlSchemaName;\n\t\tconst contractTable = tableAt(ctx.toContract.storage, namespaceId, tableName);\n\t\tconst column = contractTable?.columns[expected.name];\n\t\tif (!contractTable || !column) continue;\n\t\tif (ctx.schema.tables[tableName] === void 0) continue;\n\t\tconst temporaryDefault = resolveColumnTemporaryDefault(expected, ctx.codecHooks, ctx.types);\n\t\tconst canUseSharedTempDefault = temporaryDefault !== null && columnTakesTemporaryValue(contractTable, expected.name);\n\t\tmatched.push(issue);\n\t\tconst ddl = renderColumnDdl(expected.name, expected);\n\t\tcalls.push(canUseSharedTempDefault && temporaryDefault !== null ? new AddColumnWithTemporaryDefaultCall(schemaName, tableName, ddl.name, ddl.type, temporaryDefault, ctx.dataTypes) : new AddRequiredColumnToEmptyTableCall(schemaName, tableName, ddl.name, ddl.type, ctx.dataTypes));\n\t}\n\tif (matched.length === 0) return { kind: \"no_match\" };\n\treturn {\n\t\tkind: \"match\",\n\t\tissues: issues.filter((i) => !matched.includes(i)),\n\t\tcalls\n\t};\n};\n/**\n* Ordered list of Postgres planner strategies, shared by `migration plan`\n* and `db update` / `db init`. The issue planner runs each strategy in\n* order, letting it consume any issues it handles, and routes whatever's\n* left through `mapNodeIssueToCall`.\n*\n* The strategies that write a placeholder (`notNullBackfillCallStrategy`,\n* `typeChangeCallStrategy`, `nullableTighteningCallStrategy`) act only on a\n* field a `--backfill` or `--convert` statement names, and only when the\n* policy allows `data` (`migration plan`). Every other required field added to\n* an existing table gets the temporary default of\n* `notNullAddColumnCallStrategy`, and every other change the direct DDL of\n* `mapNodeIssueToCall`, under either command.\n*\n* Codec-typed storage type entries are dispatched through\n* `storageTypePlanCallStrategy`.\n*/\nconst postgresPlannerStrategies = [\n\tnotNullBackfillCallStrategy,\n\ttypeChangeCallStrategy,\n\tnullableTighteningCallStrategy,\n\tstorageTypePlanCallStrategy,\n\tnotNullAddColumnCallStrategy,\n\tprimaryKeyChangeStrategy\n];\n//#endregion\n//#region src/core/migrations/issue-planner.ts\nfunction issueConflict(kind, summary, location) {\n\treturn {\n\t\tkind,\n\t\tsummary,\n\t\twhy: \"Use `migration new` to author a custom migration for this change.\",\n\t\t...location ? { location } : {}\n\t};\n}\n/**\n* Classifies calls into DDL sequencing buckets. The order matches the\n* legacy walk-schema planner's emission order so `db init` and `db update`\n* produce byte-identical plans for the shared shape (deps → drops → tables\n* → columns → alters → PKs → uniques → indexes → FKs).\n*\n* `dropType` (DROP TYPE for a managed native enum) is its own bucket, ordered\n* after the general drop bucket: a type can only be dropped once every table\n* whose column uses it is gone. A column→enum edge would make this precise,\n* but `coalesceSubtreeIssues` removes the column issue under a whole-table\n* drop, so the edge never reaches the graph; the coarse bucket stands in until\n* that edge lands (the coordinate work is a later slice).\n*/\nfunction classifyCall(call) {\n\tswitch (call.factoryName) {\n\t\tcase \"createExtension\":\n\t\tcase \"setExtensionSchema\":\n\t\tcase \"createSchema\":\n\t\tcase \"createNativeEnumType\":\n\t\tcase \"addNativeEnumValue\": return \"dep\";\n\t\tcase \"dropNativeEnumType\":\n\t\tcase \"dropExtension\": return \"dropType\";\n\t\tcase \"dropTable\":\n\t\tcase \"dropColumn\":\n\t\tcase \"dropConstraint\":\n\t\tcase \"dropCheckConstraint\":\n\t\tcase \"dropIndex\":\n\t\tcase \"dropDefault\": return \"drop\";\n\t\tcase \"addCheckConstraint\":\n\t\tcase \"renameConstraint\": return \"unique\";\n\t\tcase \"createTable\":\n\t\tcase \"renameTable\":\n\t\tcase \"setTableSchema\":\n\t\tcase \"renameSchema\": return \"table\";\n\t\tcase \"dropSchema\": return \"dropSchema\";\n\t\tcase \"enableRowLevelSecurity\":\n\t\tcase \"disableRowLevelSecurity\": return \"rlsEnable\";\n\t\tcase \"createRlsPolicy\": return \"rlsPolicy\";\n\t\tcase \"dropRlsPolicy\": return \"drop\";\n\t\tcase \"addColumn\":\n\t\tcase \"renameColumn\": return \"column\";\n\t\tcase \"replaceStoredValue\":\n\t\tcase \"removeStoredValue\":\n\t\tcase \"renameStoredKey\":\n\t\tcase \"removeStoredKey\":\n\t\tcase \"fillStoredKey\":\n\t\tcase \"deleteRows\":\n\t\tcase \"alterColumnType\":\n\t\tcase \"setNotNull\":\n\t\tcase \"dropNotNull\":\n\t\tcase \"setDefault\": return \"alter\";\n\t\tcase \"addPrimaryKey\": return \"primaryKey\";\n\t\tcase \"addUnique\": return \"unique\";\n\t\tcase \"createIndex\":\n\t\tcase \"renameIndex\": return \"index\";\n\t\tcase \"addForeignKey\": return \"foreignKey\";\n\t\tcase \"rawSql\":\n\t\t\tif (blindCast(call).op?.target?.details?.objectType === \"type\") return \"dep\";\n\t\t\treturn \"alter\";\n\t\tdefault: return \"alter\";\n\t}\n}\nconst DEFAULT_POLICY = { allowedOperationClasses: [\n\t\"additive\",\n\t\"widening\",\n\t\"destructive\",\n\t\"data\"\n] };\nfunction emptySchemaIR() {\n\treturn new SqlSchemaIR({ tables: {} });\n}\n/**\n* Foreign key drops run first, then primary key and unique constraint drops, then the rest. A constraint never needs another object dropped before it, and a column or table drop takes its constraints with it, so this order is always valid.\n*/\nfunction dropRank(call) {\n\tif (call.factoryName !== \"dropConstraint\") return 2;\n\treturn call.kind === \"foreignKey\" ? 0 : 1;\n}\n/**\n* Schemas come first, then extensions, then the other dependencies such as enum types: an extension may be installed into a schema the same plan creates.\n*/\nfunction depRank(call) {\n\tswitch (call.factoryName) {\n\t\tcase \"createSchema\": return 0;\n\t\tcase \"createExtension\":\n\t\tcase \"setExtensionSchema\": return 1;\n\t\tdefault: return 2;\n\t}\n}\nfunction conflictKindForCall(call) {\n\tswitch (call.factoryName) {\n\t\tcase \"alterColumnType\": return \"typeMismatch\";\n\t\tcase \"setNotNull\":\n\t\tcase \"dropNotNull\": return \"nullabilityConflict\";\n\t\tcase \"addForeignKey\":\n\t\tcase \"dropConstraint\": return \"foreignKeyConflict\";\n\t\tcase \"createIndex\":\n\t\tcase \"renameIndex\":\n\t\tcase \"dropIndex\": return \"indexIncompatible\";\n\t\tcase \"createRlsPolicy\":\n\t\tcase \"dropRlsPolicy\":\n\t\tcase \"renameRlsPolicy\": return \"rlsPolicyIncompatible\";\n\t\tdefault: return \"missingButNonAdditive\";\n\t}\n}\nfunction locationForCall(call) {\n\tconst anyCall = blindCast(call);\n\tconst location = {};\n\tif (anyCall.tableName) {\n\t\tlocation.entityKind = \"table\";\n\t\tlocation.entityName = anyCall.tableName;\n\t} else if (anyCall.typeName) {\n\t\tlocation.entityKind = \"native_enum\";\n\t\tlocation.entityName = anyCall.typeName;\n\t}\n\tconst columnName = columnNameOfCall(call);\n\tif (columnName) location.column = columnName;\n\tif (anyCall.indexName) location.index = anyCall.indexName;\n\telse if (anyCall.newIndexName) location.index = anyCall.newIndexName;\n\tif (anyCall.constraintName) location.constraint = anyCall.constraintName;\n\telse if (anyCall.newConstraintName) location.constraint = anyCall.newConstraintName;\n\tif (anyCall.policyName) location.rlsPolicy = anyCall.policyName;\n\telse if (anyCall.policy?.name) location.rlsPolicy = anyCall.policy.name;\n\telse if (anyCall.newPolicyName) location.rlsPolicy = anyCall.newPolicyName;\n\treturn Object.keys(location).length > 0 ? blindCast(location) : void 0;\n}\nfunction conflictForDisallowedCall(call, allowed) {\n\tconst summary = `Operation \"${call.label}\" requires class \"${call.operationClass}\", but policy allows only: ${allowed.join(\", \")}`;\n\tconst location = locationForCall(call);\n\treturn {\n\t\tkind: conflictKindForCall(call),\n\t\tsummary,\n\t\twhy: \"Use `migration new` to author a custom migration for this change.\",\n\t\trefusedOperationClass: call.operationClass,\n\t\t...location ? { location } : {}\n\t};\n}\n/** The diff node an issue concerns — expected when present, else the actual (extra) node. */\nfunction issueNode(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\treturn blindCast(node);\n}\n/** DDL schema segment of a table-or-descendant issue path: `[database, ddlSchema, table, …]`. */\nfunction issueSchemaName(issue) {\n\treturn issue.path[1];\n}\n/** Table segment of a table-or-descendant issue path: `[database, ddlSchema, table, …]`. */\nfunction issueTableName(issue) {\n\treturn issue.path[2];\n}\n/** Column name embedded in a column/default issue path segment (`column:<name>`). */\nfunction issueColumnName(issue) {\n\tconst segment = issue.path[3];\n\tif (segment === void 0 || !segment.startsWith(\"column:\")) return void 0;\n\treturn segment.slice(7);\n}\n/**\n* The DDL schema name to use when EMITTING an op against `ddlSchemaName` (the\n* diff tree's resolved physical schema, `issueSchemaName(issue)`). The\n* unbound namespace's diff-tree identity resolves to `public` (a concrete\n* physical default the differ needs in order to compare its tree against\n* introspection — `resolveDdlSchemaForNamespaceStorage`), but DDL EMISSION\n* must stay unqualified so the live connection's `search_path` resolves it\n* at runtime (`boundSchema`). Recovers the logical namespace id via the\n* contract and substitutes the unbound sentinel back in when it resolves\n* there; every other namespace's `ddlSchemaName` already agrees between the\n* two resolution paths, so it passes through unchanged. A schema the contract\n* does not declare, such as one the origin contract had, stays qualified.\n*/\nfunction emissionSchemaName(ctx, ddlSchemaName) {\n\treturn resolveNamespaceIdForDdlSchema(ctx.toContract, ddlSchemaName) === UNBOUND_NAMESPACE_ID && ddlSchemaName === \"public\" && Object.hasOwn(ctx.toContract.storage.namespaces, UNBOUND_NAMESPACE_ID) ? UNBOUND_NAMESPACE_ID : ddlSchemaName;\n}\n/**\n* The generic differ is total: a missing/extra table (or column) emits an\n* issue for itself AND for every node in its subtree. `CreateTable`/`DropTable`\n* and `AddColumn`/`DropColumn` already account for the whole subtree, so the\n* nested issues are redundant — coalescing drops any issue whose path is a\n* strict descendant of a `not-found`/`not-expected` issue's path. Run over the\n* relational subset ONLY (policy issues and synthesized namespace issues are\n* handled on their own paths, never coalesced against tables).\n*/\nfunction coalesceSubtreeIssues(issues) {\n\tconst collapsingPaths = issues.filter((issue) => issueOutcome(issue) !== \"not-equal\").map((issue) => issue.path);\n\tif (collapsingPaths.length === 0) return issues;\n\tconst isCollapsed = (issue) => collapsingPaths.some((ancestor) => isStrictDescendantPath(issue.path, ancestor));\n\tconst collapsed = issues.filter(isCollapsed);\n\tconst kept = issues.filter((issue) => !isCollapsed(issue));\n\tconst inherited = new Map(kept.map((issue) => [issue, subtreeDependencies(issue, collapsed)]));\n\tconst dependsOnTarget = (from, to) => (inherited.get(from) ?? []).some((path) => samePath(path, to.path));\n\treturn kept.map((issue) => {\n\t\tconst extra = (inherited.get(issue) ?? []).filter((path) => !kept.some((other) => samePath(other.path, path) && dependsOnTarget(other, issue)));\n\t\treturn extra.length === 0 ? issue : {\n\t\t\t...issue,\n\t\t\tdependsOn: [...issue.dependsOn ?? [], ...extra]\n\t\t};\n\t});\n}\n/**\n* The dependencies a dropped issue's collapsed subtree has outside the subtree, such as the tables\n* its foreign keys name, so a whole-table drop runs before the drop of a table it references. Two\n* dropped tables that reference each other keep neither edge.\n*/\nfunction subtreeDependencies(issue, collapsed) {\n\tif (issueOutcome(issue) !== \"not-expected\") return [];\n\treturn collapsed.filter((descendant) => isStrictDescendantPath(descendant.path, issue.path)).flatMap((descendant) => descendant.dependsOn ?? []).filter((path) => !isStrictDescendantPath(path, issue.path) && !samePath(path, issue.path));\n}\nfunction samePath(left, right) {\n\treturn left.length === right.length && left.every((segment, index) => segment === right[index]);\n}\nfunction isStrictDescendantPath(path, ancestor) {\n\tif (path.length <= ancestor.length) return false;\n\tfor (let i = 0; i < ancestor.length; i += 1) if (path[i] !== ancestor[i]) return false;\n\treturn true;\n}\nfunction fkSpecFromNode(fk, tableName) {\n\treturn {\n\t\tname: fk.name ?? defaultForeignKeyName(tableName, fk.columns),\n\t\tcolumns: [...fk.columns],\n\t\treferences: {\n\t\t\tschema: fk.referencedSchema ?? \"\",\n\t\t\ttable: fk.referencedTable,\n\t\t\tcolumns: [...fk.referencedColumns]\n\t\t},\n\t\t...ifDefined(\"onDelete\", fk.onDelete),\n\t\t...ifDefined(\"onUpdate\", fk.onUpdate)\n\t};\n}\n/**\n* Builds the `CreateTable` + child `CreateIndex` / `AddForeignKey` / `AddUnique`\n* calls for a newly-expected table, reading only the table node's children. The\n* PK and every declared CHECK go inline as table constraints; indexes\n* (declared + FK-backing, already merged and ordered at derivation) and the\n* FK / unique constraints are separate calls (re-bucketed downstream). Every\n* column's DDL is resolved from its `codecRef` via `renderColumnDdl`.\n*/\nfunction buildCreateTableCallsFromNode(schemaName, ddlSchemaName, table) {\n\tconst ddlColumns = Object.values(table.columns).map((c) => renderColumnDdl(c.name, c));\n\tconst primaryKeyConstraints = table.primaryKey ? [contractFree.primaryKey([...table.primaryKey.columns], { ...ifDefined(\"name\", table.primaryKey.name) })] : [];\n\tconst declaredChecks = (table.checks ?? []).map((c) => contractFree.checkExpression(c.name, c.expression));\n\tconst allTableConstraints = [...primaryKeyConstraints, ...declaredChecks];\n\tconst calls = [new CreateTableCall(schemaName, table.name, ddlColumns, allTableConstraints.length > 0 ? allTableConstraints : void 0)];\n\tfor (const index of table.indexes) calls.push(createIndexCallFromNode(index, schemaName, table.name));\n\tfor (const fk of table.foreignKeys) calls.push(new AddForeignKeyCall(schemaName, table.name, fkSpecFromNode(fk, table.name)));\n\tfor (const unique of table.uniques) {\n\t\tconst constraintName = unique.name ?? defaultUniqueName(table.name, unique.columns);\n\t\tcalls.push(new AddUniqueCall(schemaName, table.name, constraintName, [...unique.columns]));\n\t}\n\tif (table.rlsEnabled) calls.push(new EnableRowLevelSecurityCall(ddlSchemaName, table.name));\n\treturn calls;\n}\nfunction nodeConflict(kind, message) {\n\treturn issueConflict(kind, message);\n}\n/**\n* True when `actualMembers` (the live database's ordered members) is a\n* strict, order-preserving prefix of `expectedMembers` (the contract's) —\n* the database already carries every contract member, in declaration\n* order, and the contract declares at least one member the database still\n* lacks. Any other relationship — a renamed value, a removed value, a\n* reordering, or the database holding members the contract lacks — is not\n* a suffix append.\n*/\nfunction isNativeEnumSuffixAppend(actualMembers, expectedMembers) {\n\tif (actualMembers.length >= expectedMembers.length) return false;\n\treturn actualMembers.every((member, index) => member === expectedMembers[index]);\n}\n/** Operator-worded refusal for a native-enum member change beyond a suffix append (design ruling — tests match this verbatim). */\nfunction nativeEnumMemberChangeRefusal(options) {\n\treturn `Native enum type \"${options.ddlSchemaName}\".\"${options.typeName}\" changed beyond appending new values (contract declares [${options.expectedMembers.join(\", \")}], database has [${options.actualMembers.join(\", \")}]). Prisma 8 does not modify a native enum's existing values (rename, removal, reorder) — see https://pris.ly/d/postgres-native-enums. Author the change manually with \\`migration new\\`.`;\n}\n/**\n* Managed native-enum issue -> op lowering. A missing declared type creates\n* it; an unclaimed live type drops it (ownership-scoped upstream by\n* `retainUnownedExtras`, and the `widening` drop gated by the operation-class\n* policy); a paired member-value mismatch lowers to one `ALTER TYPE ... ADD\n* VALUE` per appended member when the database's members are a strict,\n* order-preserving prefix of the contract's — any other change (rename,\n* removal, reorder, or the database holding members the contract lacks) is\n* refused with a NAMED diagnostic, never a silent no-op and never a\n* drop-and-recreate.\n*/\nfunction mapExtensionNodeIssue(issue) {\n\tconst asNode = (node) => node === void 0 ? void 0 : blindCast(node);\n\tconst expected = asNode(issue.expected);\n\tconst actual = asNode(issue.actual);\n\tif (expected !== void 0) {\n\t\tPostgresExtensionSchemaNode.assert(expected);\n\t\treturn ok([actual === void 0 ? new CreateExtensionCall(expected.schemaName, expected.name) : new SetExtensionSchemaCall(expected.name, expected.schemaName)]);\n\t}\n\tinvariant(actual !== void 0, \"an extension issue carries a node on one side\");\n\tPostgresExtensionSchemaNode.assert(actual);\n\treturn ok([new DropExtensionCall(actual.schemaName, actual.name)]);\n}\nfunction mapNativeEnumNodeIssue(issue, ctx) {\n\tconst ddlSchemaName = issueSchemaName(issue);\n\tif (ddlSchemaName === void 0) return notOk(nodeConflict(\"unsupportedOperation\", `Enum issue has no schema in its path: ${issue.path.join(\"/\")}`));\n\tconst schemaName = emissionSchemaName(ctx, ddlSchemaName);\n\tif (issueOutcome(issue) === \"not-found\") {\n\t\tconst expected = blindCast(issue.expected);\n\t\treturn ok([new CreateNativeEnumTypeCall(schemaName, expected.typeName, expected.members)]);\n\t}\n\tif (issueOutcome(issue) === \"not-expected\") return ok([new DropNativeEnumTypeCall(schemaName, blindCast(issue.actual).typeName)]);\n\tconst expected = blindCast(issue.expected);\n\tconst actual = blindCast(issue.actual);\n\tif (isNativeEnumSuffixAppend(actual.members, expected.members)) return ok(expected.members.slice(actual.members.length).map((value) => new AddNativeEnumValueCall(schemaName, expected.typeName, value)));\n\treturn notOk(nodeConflict(\"unsupportedOperation\", nativeEnumMemberChangeRefusal({\n\t\tddlSchemaName,\n\t\ttypeName: expected.typeName,\n\t\texpectedMembers: expected.members,\n\t\tactualMembers: actual.members\n\t})));\n}\nfunction mapTableNodeIssue(issue, schemaName, ddlSchemaName) {\n\tif (issueOutcome(issue) === \"not-found\") return ok(buildCreateTableCallsFromNode(schemaName, ddlSchemaName, blindCast(issue.expected)));\n\tif (issueOutcome(issue) === \"not-expected\") return ok([new DropTableCall(schemaName, blindCast(issue.actual).name)]);\n\tconst expected = blindCast(issue.expected);\n\tconst actual = blindCast(issue.actual);\n\tif (expected.rlsEnabled && !actual.rlsEnabled) return ok([new EnableRowLevelSecurityCall(ddlSchemaName, expected.name)]);\n\tif (!expected.rlsEnabled && actual.rlsEnabled) return ok([new DisableRowLevelSecurityCall(ddlSchemaName, expected.name)]);\n\treturn notOk(nodeConflict(\"unsupportedOperation\", `unhandled table-attribute drift on \"${expected.name}\": table not-equal with no rlsEnabled delta (a second table attribute drifted)`));\n}\nfunction mapColumnNodeIssue(issue, schemaName, tableName, dataTypes) {\n\tif (issueOutcome(issue) === \"not-found\") {\n\t\tconst column = blindCast(issue.expected);\n\t\treturn ok([new AddColumnCall(schemaName, tableName, renderColumnDdl(column.name, column), dataTypes)]);\n\t}\n\tif (issueOutcome(issue) === \"not-expected\") return ok([new DropColumnCall(schemaName, tableName, blindCast(issue.actual).name)]);\n\tconst expected = blindCast(issue.expected);\n\tconst actual = blindCast(issue.actual);\n\tconst calls = [];\n\tif (!sqlColumnTypesEqual(expected, actual)) calls.push(new AlterColumnTypeCall({\n\t\tschemaName,\n\t\ttableName,\n\t\tcolumnName: expected.name,\n\t\ttype: renderColumnAlterType(expected),\n\t\t...expected.catalogText !== void 0 ? { raw: true } : {},\n\t\tdataTypes,\n\t\townsAutoincrementSequence: hasAutoincrementDefault(actual),\n\t\toperationClass: liveColumnWidensSafely(expected, actual) ? \"widening\" : \"destructive\"\n\t}));\n\tif (expected.nullable !== actual.nullable) calls.push(expected.nullable ? new DropNotNullCall(schemaName, tableName, expected.name) : new SetNotNullCall(schemaName, tableName, expected.name));\n\treturn ok(calls);\n}\nfunction mapColumnDefaultNodeIssue(issue, schemaName, tableName, columnName, types) {\n\tif (issueOutcome(issue) === \"not-expected\") return ok([new DropDefaultCall(schemaName, tableName, columnName)]);\n\tif (issue.expected === void 0) return ok([]);\n\tconst column = buildSetDefaultColumn(columnName, blindCast(issue.expected), types);\n\tif (column === void 0) return ok([]);\n\treturn ok([new SetDefaultCall(schemaName, tableName, column, issueOutcome(issue) === \"not-equal\" ? \"widening\" : \"additive\")]);\n}\n/** A missing primary key is added. A changed or removed key is planned only by `primaryKeyChangeStrategy`, which also handles the foreign keys that depend on it; one that reaches this mapper is refused. */\nfunction mapPrimaryKeyNodeIssue(issue, schemaName, tableName) {\n\tif (issueOutcome(issue) !== \"not-found\") return notOk(nodeConflict(\"indexIncompatible\", issue.path.join(\"/\")));\n\tconst pk = blindCast(issue.expected);\n\treturn ok([new AddPrimaryKeyCall(schemaName, tableName, pk.name ?? defaultPrimaryKeyName(tableName), [...pk.columns])]);\n}\nfunction mapForeignKeyNodeIssue(issue, schemaName, tableName) {\n\tif (issueOutcome(issue) === \"not-found\") return ok([new AddForeignKeyCall(schemaName, tableName, fkSpecFromNode(blindCast(issue.expected), tableName))]);\n\tif (issueOutcome(issue) === \"not-expected\") {\n\t\tconst fk = blindCast(issue.actual);\n\t\treturn ok([new DropConstraintCall(schemaName, tableName, fk.name ?? defaultForeignKeyName(tableName, fk.columns), \"foreignKey\")]);\n\t}\n\tconst expected = blindCast(issue.expected);\n\tconst actual = blindCast(issue.actual);\n\treturn ok([new DropConstraintCall(schemaName, tableName, actual.name ?? defaultForeignKeyName(tableName, actual.columns), \"foreignKey\"), new AddForeignKeyCall(schemaName, tableName, fkSpecFromNode(expected, tableName))]);\n}\nfunction mapUniqueNodeIssue(issue, schemaName, tableName) {\n\tif (issueOutcome(issue) === \"not-found\") {\n\t\tconst unique = blindCast(issue.expected);\n\t\treturn ok([new AddUniqueCall(schemaName, tableName, unique.name ?? defaultUniqueName(tableName, unique.columns), [...unique.columns])]);\n\t}\n\tif (issueOutcome(issue) === \"not-expected\") {\n\t\tconst unique = blindCast(issue.actual);\n\t\treturn ok([new DropConstraintCall(schemaName, tableName, unique.name ?? defaultUniqueName(tableName, unique.columns), \"unique\")]);\n\t}\n\treturn notOk(nodeConflict(\"indexIncompatible\", issue.path.join(\"/\")));\n}\n/**\n* The CreateIndexCall for a name-identified index node: the node's own name\n* verbatim, its element list (column tuple or opaque expression), and the\n* unique/type/options/where attributes carried through.\n*/\nfunction createIndexCallFromNode(index, schemaName, tableName) {\n\tconst extras = {};\n\tif (index.type !== void 0) extras.type = index.type;\n\tif (index.options !== void 0) extras.options = index.options;\n\tif (index.where !== void 0) extras.where = index.where;\n\tif (index.unique) extras.unique = true;\n\treturn new CreateIndexCall(schemaName, tableName, index.name, index.columns !== void 0 ? { columns: [...index.columns] } : { expression: index.expression ?? \"\" }, extras);\n}\nfunction mapIndexNodeIssue(issue, schemaName, tableName) {\n\tif (issueOutcome(issue) === \"not-found\") return ok([createIndexCallFromNode(blindCast(issue.expected), schemaName, tableName)]);\n\tif (issueOutcome(issue) === \"not-expected\") return ok([new DropIndexCall(schemaName, tableName, blindCast(issue.actual).name)]);\n\treturn notOk(nodeConflict(\"indexIncompatible\", issue.path.join(\"/\")));\n}\n/**\n* The index treatment: a missing check is added, an undeclared live check is\n* dropped, and a paired divergence is a conflict. `not-equal` is reachable only\n* for an exact-named expected check — a wire-named one compares by name, so a\n* changed predicate re-suffixes the name and arrives as missing + extra\n* instead.\n*/\nfunction mapCheckNodeIssue(issue, schemaName, tableName) {\n\tif (issueOutcome(issue) === \"not-found\") {\n\t\tconst check = blindCast(issue.expected);\n\t\treturn ok([new AddCheckConstraintCall(schemaName, tableName, check.name, check.expression)]);\n\t}\n\tif (issueOutcome(issue) === \"not-expected\") return ok([new DropCheckConstraintCall(schemaName, tableName, blindCast(issue.actual).name)]);\n\treturn notOk(nodeConflict(\"unsupportedOperation\", issue.path.join(\"/\")));\n}\n/**\n* Maps one node-typed diff issue to its migration call(s), dispatching on the\n* node's `nodeKind` and the issue's presence-derived `issueOutcome`, reading\n* nodes and resolving column DDL from `codecRef` via `column-ddl-rendering.ts`.\n*/\nfunction mapNodeIssueToCall(issue, ctx) {\n\tconst node = issueNode(issue);\n\tif (node === void 0) return notOk(nodeConflict(\"unsupportedOperation\", `Issue carries neither an expected nor an actual node: ${issue.path.join(\"/\")}`));\n\tif (node.nodeKind === PostgresSchemaNodeKind.namespace) {\n\t\tif (issueOutcome(issue) !== \"not-found\") return notOk(nodeConflict(\"unsupportedOperation\", `Unexpected namespace drift: ${issue.path.join(\"/\")}`));\n\t\treturn ok([new CreateSchemaCall(blindCast(issue.expected).schemaName)]);\n\t}\n\tif (node.nodeKind === PostgresSchemaNodeKind.nativeEnum) return mapNativeEnumNodeIssue(issue, ctx);\n\tif (node.nodeKind === PostgresSchemaNodeKind.extension) return mapExtensionNodeIssue(issue);\n\tconst ddlSchemaName = issueSchemaName(issue);\n\tconst tableName = issueTableName(issue);\n\tif (ddlSchemaName === void 0 || tableName === void 0) return notOk(nodeConflict(\"unsupportedOperation\", `Issue has no schema/table in its path: ${issue.path.join(\"/\")}`));\n\tconst schemaName = emissionSchemaName(ctx, ddlSchemaName);\n\tswitch (node.nodeKind) {\n\t\tcase PostgresSchemaNodeKind.table: return mapTableNodeIssue(issue, schemaName, ddlSchemaName);\n\t\tcase RelationalSchemaNodeKind.column: return mapColumnNodeIssue(issue, schemaName, tableName, ctx.dataTypes);\n\t\tcase RelationalSchemaNodeKind.columnDefault: {\n\t\t\tconst columnName = issueColumnName(issue);\n\t\t\tif (columnName === void 0) return notOk(nodeConflict(\"unsupportedOperation\", `Default issue has no column in its path: ${issue.path.join(\"/\")}`));\n\t\t\treturn mapColumnDefaultNodeIssue(issue, schemaName, tableName, columnName, ctx.types);\n\t\t}\n\t\tcase RelationalSchemaNodeKind.primaryKey: return mapPrimaryKeyNodeIssue(issue, schemaName, tableName);\n\t\tcase RelationalSchemaNodeKind.foreignKey: return mapForeignKeyNodeIssue(issue, schemaName, tableName);\n\t\tcase RelationalSchemaNodeKind.unique: return mapUniqueNodeIssue(issue, schemaName, tableName);\n\t\tcase RelationalSchemaNodeKind.index: return mapIndexNodeIssue(issue, schemaName, tableName);\n\t\tcase RelationalSchemaNodeKind.check: return mapCheckNodeIssue(issue, schemaName, tableName);\n\t\tdefault: return notOk(nodeConflict(\"unsupportedOperation\", `Unhandled node kind: ${node.nodeKind}`));\n\t}\n}\n/**\n* Runs the ordered strategy list over the node-typed diff issues, maps\n* leftover issues via {@link mapNodeIssueToCall}, applies operation-class\n* policy gating, and buckets calls into the fixed DDL emission order (dep →\n* drop → table → column → recipe → alter → primaryKey → unique → index →\n* foreignKey).\n*/\nfunction planIssues(options) {\n\tconst policyProvided = options.policy !== void 0;\n\tconst policy = options.policy ?? DEFAULT_POLICY;\n\tconst schema = options.schema ?? emptySchemaIR();\n\tconst frameworkComponents = options.frameworkComponents ?? [];\n\tconst context = {\n\t\ttoContract: options.toContract,\n\t\tfromContract: options.fromContract,\n\t\tschemaName: options.schemaName,\n\t\tcodecHooks: options.codecHooks,\n\t\ttypes: options.types,\n\t\tschema,\n\t\tstartTree: options.startTree,\n\t\tendTree: options.endTree,\n\t\tallIssues: options.issues,\n\t\tforeignKeyDropAuthority: options.foreignKeyDropAuthority,\n\t\tpolicy,\n\t\tframeworkComponents,\n\t\tstatementColumns: options.statementColumns ?? {\n\t\t\tconvert: [],\n\t\t\tbackfill: []\n\t\t},\n\t\tdataTypes: stackDataTypes(frameworkComponents)\n\t};\n\tconst strategies = options.strategies ?? postgresPlannerStrategies;\n\tlet remaining = options.issues;\n\tconst recipeCalls = [];\n\tconst bucketablePatternCalls = [];\n\tconst conflicts = [];\n\tfor (const strategy of strategies) {\n\t\tconst result = strategy(remaining, context);\n\t\tif (result.kind === \"match\") {\n\t\t\tremaining = result.issues;\n\t\t\tconflicts.push(...result.conflicts ?? []);\n\t\t\tif (result.recipe) recipeCalls.push(...result.calls);\n\t\t\telse bucketablePatternCalls.push(...result.calls);\n\t\t}\n\t}\n\tconst sorted = orderIssuesByDependencies(remaining);\n\tconst defaultCalls = [];\n\tfor (const issue of sorted) {\n\t\tconst result = mapNodeIssueToCall(issue, context);\n\t\tif (result.ok) defaultCalls.push(...result.value);\n\t\telse conflicts.push(result.failure);\n\t}\n\tconst allowed = policy.allowedOperationClasses;\n\tlet gatedDefault = defaultCalls;\n\tlet gatedRecipe = recipeCalls;\n\tlet gatedBucketable = bucketablePatternCalls;\n\tif (policyProvided) {\n\t\tconst keepIfAllowed = (bucket) => (call) => {\n\t\t\tif (allowed.includes(call.operationClass)) {\n\t\t\t\tbucket.push(call);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconflicts.push(conflictForDisallowedCall(call, allowed));\n\t\t};\n\t\tconst gatedDefaultBucket = [];\n\t\tconst gatedRecipeBucket = [];\n\t\tconst gatedBucketableBucket = [];\n\t\tdefaultCalls.forEach(keepIfAllowed(gatedDefaultBucket));\n\t\trecipeCalls.forEach(keepIfAllowed(gatedRecipeBucket));\n\t\tbucketablePatternCalls.forEach(keepIfAllowed(gatedBucketableBucket));\n\t\tgatedDefault = gatedDefaultBucket;\n\t\tgatedRecipe = gatedRecipeBucket;\n\t\tgatedBucketable = gatedBucketableBucket;\n\t}\n\tif (conflicts.length > 0) return notOk(conflicts);\n\tconst combinedBucketable = [...gatedDefault, ...gatedBucketable];\n\tconst byCategory = (cat) => combinedBucketable.filter((c) => classifyCall(c) === cat);\n\treturn ok({ calls: [\n\t\t...byCategory(\"dep\").sort((a, b) => depRank(a) - depRank(b)),\n\t\t...byCategory(\"drop\").sort((a, b) => dropRank(a) - dropRank(b)),\n\t\t...byCategory(\"dropType\"),\n\t\t...byCategory(\"table\"),\n\t\t...byCategory(\"dropSchema\"),\n\t\t...byCategory(\"column\"),\n\t\t...gatedRecipe,\n\t\t...byCategory(\"alter\"),\n\t\t...byCategory(\"primaryKey\"),\n\t\t...byCategory(\"unique\"),\n\t\t...byCategory(\"index\"),\n\t\t...byCategory(\"foreignKey\"),\n\t\t...byCategory(\"rlsEnable\")\n\t] });\n}\n//#endregion\n//#region src/core/migrations/control-policy.ts\n/**\n* Factory calls that create a whole, previously-absent top-level storage\n* object. Used to decide whether `tolerated` permits a call (it only allows\n* creating absent objects, never modifying existing ones).\n*\n* Deliberately an explicit, closed set rather than a `factoryName`\n* create/alter/drop classification: it answers exactly one yes/no question\n* and is fail-closed. Any call not listed here — including future or\n* extension-contributed factories — is treated as NOT object-creation, so it\n* is suppressed under `tolerated` rather than permissively emitted.\n*\n* Lists the creation factories that actually reach the call-side resolver\n* (`resolvePostgresCallControlPolicySubject`) — today only RLS policy\n* creation, from `planPostgresSchemaDiff`. Every other whole-object create\n* (table, schema, native enum, and RLS enablement) is constructed inside\n* `planIssues` and graded on the node side by\n* `resolvePostgresNodeIssueCreationFactoryName`, so none of them are listed\n* here.\n*/\nconst OBJECT_CREATION_FACTORIES = /* @__PURE__ */ new Set([\"createRlsPolicy\"]);\nfunction createsNewTopLevelObject(call) {\n\treturn OBJECT_CREATION_FACTORIES.has(call.factoryName);\n}\nfunction ddlSchemaNameForNamespace(contract, namespaceId) {\n\tconst namespace = contract.storage.namespaces[namespaceId];\n\treturn isPostgresSchema(namespace) ? namespace.ddlSchemaName(contract.storage) : namespaceId;\n}\n/**\n* Resolve the namespace a declared storage entity lives in by walking every\n* namespace for one whose `entries` map actually contains the coordinate —\n* a table by its name, a native enum by its physical type name (see\n* {@link postgresNodeStorageCoordinate}). When `ddlSchemaName` is given, the\n* match must also land in that DDL schema (disambiguates same-named entities\n* declared under different namespaces); when omitted, the first namespace\n* that declares the entity wins. Falls back to {@link UNBOUND_NAMESPACE_ID}\n* when no namespace declares it — e.g. an extra/dropped entity the contract\n* doesn't claim at all.\n*/\nfunction resolveNamespaceIdForEntity(contract, coordinate, ddlSchemaName) {\n\tfor (const namespaceId of Object.keys(contract.storage.namespaces)) {\n\t\tif (!entityAt(contract.storage, {\n\t\t\tnamespaceId,\n\t\t\t...coordinate\n\t\t})) continue;\n\t\tif (ddlSchemaName === void 0 || ddlSchemaNameForNamespace(contract, namespaceId) === ddlSchemaName) return namespaceId;\n\t}\n\treturn UNBOUND_NAMESPACE_ID;\n}\nfunction resolveNamespaceIdForTable(contract, tableName, ddlSchemaName) {\n\treturn resolveNamespaceIdForEntity(contract, {\n\t\tentityKind: \"table\",\n\t\tentityName: tableName\n\t}, ddlSchemaName);\n}\nfunction resolveNamespaceIdForDdlSchema(contract, ddlSchemaName) {\n\tfor (const namespaceId of Object.keys(contract.storage.namespaces)) {\n\t\tconst ns = contract.storage.namespaces[namespaceId];\n\t\tif (isPostgresSchema(ns) && ns.ddlSchemaName(contract.storage) === ddlSchemaName) return namespaceId;\n\t\tif (namespaceId === ddlSchemaName) return namespaceId;\n\t}\n\treturn UNBOUND_NAMESPACE_ID;\n}\nfunction postgresCallFields(call) {\n\treturn {\n\t\t...ifDefined(\"schemaName\", \"schemaName\" in call ? call.schemaName : void 0),\n\t\t...ifDefined(\"tableName\", \"tableName\" in call ? call.tableName : void 0),\n\t\t...ifDefined(\"columnName\", columnNameOfCall(call))\n\t};\n}\nfunction formatSuppressionSubjectLabel(subject, contract) {\n\tif (subject === void 0) return \"unknown\";\n\tconst ddlSchema = ddlSchemaNameForNamespace(contract, subject.namespaceId);\n\tif (subject.entityKind !== void 0 && subject.entityName !== void 0) {\n\t\tconst entityLabel = `${subject.entityKind} \"${ddlSchema}.${subject.entityName}\"`;\n\t\treturn subject.rlsPolicy !== void 0 ? `RLS policy \"${subject.rlsPolicy}\" on ${entityLabel}` : entityLabel;\n\t}\n\treturn `namespace \"${ddlSchema}\"`;\n}\nfunction postgresSuppressionSummary(subjectLabel, subject, policy) {\n\tconst namespace = subject?.namespaceId ?? \"unknown\";\n\tconst declared = subject?.explicitNodeControlPolicy;\n\tif (policy === \"external\" && declared === \"managed\") return `control policy suppressed: ${subjectLabel} — namespace '${namespace}' has effective control 'external' but declared 'managed'`;\n\treturn `control policy suppressed: ${subjectLabel} — namespace '${namespace}' has effective control '${policy}'${declared ? ` but declared '${declared}'` : \"\"}`;\n}\n/**\n* Render one family {@link SuppressionRecord} into a target `SqlPlannerConflict`.\n* The family decides *that* a subject is suppressed and hands over the raw\n* coordinate + policy; the label, message, and location are rendered here,\n* driven entirely by the subject's own `(entityKind, entityName)` coordinate\n* — no target-owned table-vs-enum vocabulary.\n*/\nfunction renderPostgresSuppression(record, contract) {\n\tconst subject = record.subject;\n\treturn {\n\t\tkind: \"controlPolicySuppressedCall\",\n\t\tsummary: postgresSuppressionSummary(formatSuppressionSubjectLabel(subject, contract), subject, record.policy),\n\t\tlocation: {\n\t\t\t...ifDefined(\"namespaceId\", subject?.namespaceId),\n\t\t\t...ifDefined(\"entityKind\", subject?.entityKind),\n\t\t\t...ifDefined(\"entityName\", subject?.entityName),\n\t\t\t...ifDefined(\"column\", subject?.column),\n\t\t\t...ifDefined(\"rlsPolicy\", subject?.rlsPolicy)\n\t\t},\n\t\tmeta: {\n\t\t\tcontrolPolicy: record.policy,\n\t\t\t...ifDefined(\"factoryName\", record.factoryName),\n\t\t\t...ifDefined(\"rlsPolicy\", subject?.rlsPolicy),\n\t\t\t...ifDefined(\"declaredControlPolicy\", subject?.explicitNodeControlPolicy)\n\t\t}\n\t};\n}\nfunction resolvePostgresCallControlPolicySubject(call, contract) {\n\tconst callFields = postgresCallFields(call);\n\tconst createsNewObject = createsNewTopLevelObject(call);\n\tif (call.factoryName === \"createSchema\" && callFields.schemaName) return {\n\t\tnamespaceId: resolveNamespaceIdForDdlSchema(contract, callFields.schemaName),\n\t\tcreatesNewObject\n\t};\n\tif (callFields.tableName) {\n\t\tconst namespaceId = resolveNamespaceIdForTable(contract, callFields.tableName, callFields.schemaName);\n\t\tconst tableControlPolicy = entityAt(contract.storage, {\n\t\t\tnamespaceId,\n\t\t\tentityKind: \"table\",\n\t\t\tentityName: callFields.tableName\n\t\t})?.control;\n\t\treturn {\n\t\t\tnamespaceId,\n\t\t\tentityKind: \"table\",\n\t\t\tentityName: callFields.tableName,\n\t\t\t...ifDefined(\"column\", callFields.columnName),\n\t\t\t...ifDefined(\"explicitNodeControlPolicy\", tableControlPolicy),\n\t\t\tcreatesNewObject\n\t\t};\n\t}\n\tif (callFields.schemaName) return {\n\t\tnamespaceId: resolveNamespaceIdForDdlSchema(contract, callFields.schemaName),\n\t\tcreatesNewObject\n\t};\n}\n/**\n* Node kinds whose *absence* is the creation of a whole, top-level Postgres\n* object: a namespace, a table, or a native enum. Used by\n* {@link resolvePostgresNodeIssueCreationFactoryName} to decide whether a\n* `tolerated` subject permits the issue to flow into the planner\n* (create-if-absent) and to seed the suppressed-subject warning's\n* `factoryName` when the planner is skipped. RLS policy creation is not\n* listed here — policy issues never reach this issue-based partition (they\n* are routed to `planPostgresSchemaDiff` and gated via the call-based\n* {@link resolvePostgresCallControlPolicySubject} instead).\n*/\nconst POSTGRES_NODE_CREATION_FACTORY = Object.freeze({\n\t[PostgresSchemaNodeKind.namespace]: \"createSchema\",\n\t[PostgresSchemaNodeKind.table]: \"createTable\",\n\t[PostgresSchemaNodeKind.nativeEnum]: \"createNativeEnumType\",\n\t[PostgresSchemaNodeKind.extension]: \"createExtension\"\n});\n/**\n* A table `not-equal` issue whose `rlsEnabled` flips OFF→ON (expected on,\n* actual off) is enablement toward `ENABLE ROW LEVEL SECURITY`. It is\n* creation-class on the node side because `isEnablementCreationIssue` and\n* {@link resolvePostgresNodeIssueCreationFactoryName} treat this OFF→ON delta\n* as a creation: enabling RLS establishes the fail-closed guard the declared\n* policy set attaches to, the same grant `tolerated` extends to creating the\n* policies themselves. The opposite direction (`DISABLE`) is a modification\n* and stays managed-only. Keying on the actual delta (not just the expected\n* bit) keeps this correct if a second table attribute ever joins\n* `isEqualTo`: a not-equal with no `rlsEnabled` delta is not enablement, so\n* it is not admitted as creation-class here.\n*/\nfunction isEnablementCreationIssue(issue) {\n\tif (issueOutcome(issue) !== \"not-equal\") return false;\n\tconst { expected, actual } = issue;\n\treturn expected !== void 0 && actual !== void 0 && PostgresTableSchemaNode.is(expected) && PostgresTableSchemaNode.is(actual) && expected.rlsEnabled === true && actual.rlsEnabled === false;\n}\nfunction resolvePostgresNodeIssueCreationFactoryName(issue) {\n\tif (isEnablementCreationIssue(issue)) return \"enableRowLevelSecurity\";\n\tif (issueOutcome(issue) !== \"not-found\") return void 0;\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\treturn POSTGRES_NODE_CREATION_FACTORY[node.nodeKind];\n}\n/**\n* Resolves the control-policy subject for a node-typed {@link SchemaDiffIssue}\n* (the issue-side mirror of `resolvePostgresCallControlPolicySubject`).\n* Storage entities resolve off their node coordinate; a sub-entity issue\n* resolves off the enclosing table read from the issue path; an unclaimed\n* extra falls back to the unbound coordinate. A role always resolves\n* `'external'` — roles are referenced, never owned.\n*/\nfunction resolvePostgresNodeIssueControlPolicySubject(issue, contract) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\tif (node.nodeKind === PostgresSchemaNodeKind.namespace) return {\n\t\tnamespaceId: resolveNamespaceIdForDdlSchema(contract, blindCast(node).schemaName),\n\t\tcreatesNewObject: issueOutcome(issue) === \"not-found\"\n\t};\n\tif (node.nodeKind === PostgresSchemaNodeKind.role) {\n\t\tconst roleName = issue.path[1];\n\t\treturn {\n\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\t\texplicitNodeControlPolicy: (roleName === void 0 ? void 0 : entityAt(contract.storage, {\n\t\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\t\t\tentityKind: \"role\",\n\t\t\t\tentityName: roleName\n\t\t\t}))?.control ?? \"external\",\n\t\t\tcreatesNewObject: false\n\t\t};\n\t}\n\tconst coordinate = postgresNodeStorageCoordinate(node);\n\tif (coordinate !== void 0) {\n\t\tconst namespaceId = resolveNamespaceIdForEntity(contract, coordinate, node.nodeKind === PostgresSchemaNodeKind.extension ? void 0 : issue.path[1]);\n\t\tconst entityControl = entityAt(contract.storage, {\n\t\t\tnamespaceId,\n\t\t\t...coordinate\n\t\t})?.control;\n\t\treturn {\n\t\t\tnamespaceId,\n\t\t\t...coordinate,\n\t\t\t...ifDefined(\"column\", issueColumnName(issue)),\n\t\t\t...ifDefined(\"explicitNodeControlPolicy\", entityControl),\n\t\t\tcreatesNewObject: resolvePostgresNodeIssueCreationFactoryName(issue) !== void 0\n\t\t};\n\t}\n\tconst tableName = issue.path[2];\n\tif (tableName === void 0) return void 0;\n\tconst ddlSchemaName = issue.path[1];\n\tconst namespaceId = resolveNamespaceIdForTable(contract, tableName, ddlSchemaName);\n\tconst table = entityAt(contract.storage, {\n\t\tnamespaceId,\n\t\tentityKind: \"table\",\n\t\tentityName: tableName\n\t});\n\treturn {\n\t\tnamespaceId,\n\t\tentityKind: \"table\",\n\t\tentityName: tableName,\n\t\t...ifDefined(\"column\", issueColumnName(issue)),\n\t\t...ifDefined(\"explicitNodeControlPolicy\", table?.control),\n\t\tcreatesNewObject: resolvePostgresNodeIssueCreationFactoryName(issue) !== void 0\n\t};\n}\n//#endregion\nexport { resolvePostgresNodeIssueCreationFactoryName as a, issueNode as c, postgresPlannerStrategies as d, tableAt as f, resolvePostgresNodeIssueControlPolicySubject as i, issueSchemaName as l, resolveNamespaceIdForDdlSchema as n, coalesceSubtreeIssues as o, postgresNodeStorageCoordinate as p, resolvePostgresCallControlPolicySubject as r, conflictForDisallowedCall as s, renderPostgresSuppression as t, planIssues as u };\n\n//# sourceMappingURL=control-policy-K52VpMX0.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,SAAS,8BAA8B,MAAM;CAC5C,IAAI,wBAAwB,GAAG,IAAI,GAAG;EACrC,MAAM,aAAa,uBAAuB,KAAK,QAAQ;EACvD,OAAO,eAAe,KAAK,IAAI,KAAK,IAAI;GACvC;GACA,YAAY,KAAK;EAClB;CACD;CACA,IAAI,6BAA6B,GAAG,IAAI,GAAG;EAC1C,MAAM,aAAa,uBAAuB,KAAK,QAAQ;EACvD,OAAO,eAAe,KAAK,IAAI,KAAK,IAAI;GACvC;GACA,YAAY,KAAK;EAClB;CACD;CACA,IAAI,4BAA4B,GAAG,IAAI,GAAG;EACzC,MAAM,aAAa,uBAAuB,KAAK,QAAQ;EACvD,OAAO,eAAe,KAAK,IAAI,KAAK,IAAI;GACvC;GACA,YAAY,KAAK;EAClB;CACD;AACD;AAGA,MAAM,gBAAgB;;;;;;;AAOtB,SAAS,WAAW,QAAQ;CAC3B,OAAO;EACN,GAAG,eAAe,W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gresRoleSchemaNode, n as PostgresNamespaceSchemaNode, r as Pos
7
7
  import { t as postgresResolveDefault } from "./default-normalizer-BqK6XxdC-2OUb2ybG.mjs";
8
8
  import { n as renderFullTextIndexDocument } from "./full-text-search-document-Ceg9d2K0-DJ4MklAU.mjs";
9
9
  import { r as resolveDdlSchemaForNamespaceStorage } from "./resolve-ddl-schema-BZzteXH1-C57Iavtu.mjs";
10
- import { d as resolvePostgresNodeIssueControlPolicySubject } from "./control-policy-RIiGtzLL-dMGUsj7L.mjs";
10
+ import { d as resolvePostgresNodeIssueControlPolicySubject } from "./control-policy-K52VpMX0-CateWffI.mjs";
11
11
  import { blindCast } from "@prisma/orm-framework/utils/casts";
12
12
  import { UNBOUND_NAMESPACE_ID } from "@prisma/orm-framework/components/ir";
13
13
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
@@ -16,7 +16,7 @@ import { namingOf } from "@prisma/orm-family-sql/schema-ir/naming";
16
16
  import { PrimaryKey, RelationalSchemaNodeKind, SqlForeignKeyIR, SqlIndexIR, SqlUniqueIR } from "@prisma/orm-family-sql/schema-ir/types";
17
17
  import { contractNamespaceToSchemaIR, sqlTypeLookupsOf } from "@prisma/orm-family-sql/family/control";
18
18
  import { classifyDiffSubjectGranularity } from "@prisma/orm-family-sql/family/diff";
19
- //#region ../../../3-targets/postgres/1-target/dist/diff-database-schema-CvA43-eB.mjs
19
+ //#region ../../../3-targets/postgres/1-target/dist/diff-database-schema-D_vOsC7_.mjs
20
20
  /** The database root's fixed sentinel id (`PostgresDatabaseSchemaNode#id`). */
21
21
  function databaseStep() {
22
22
  return {
@@ -429,4 +429,4 @@ function buildPostgresPlanDiff(input) {
429
429
  //#endregion
430
430
  export { contractToPostgresDatabaseSchemaNode as n, diffPostgresSchema as r, buildPostgresPlanDiff as t };
431
431
 
432
- //# sourceMappingURL=diff-database-schema-CvA43-eB-BVodpxgx.mjs.map
432
+ //# sourceMappingURL=diff-database-schema-D_vOsC7_-CtLt0OwZ.mjs.map