@prisma/orm-target-postgres 8.0.0-rc.18-dev.27 → 8.0.0-rc.18-dev.29

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 (41) hide show
  1. package/dist/{adapter-vfsQ80l6.d.mts → adapter-CEZ6dg2a.d.mts} +8 -8
  2. package/dist/{adapter-vfsQ80l6.d.mts.map → adapter-CEZ6dg2a.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/adapter__control.mjs +1 -1
  6. package/dist/{aggregates-B3lIBjGK.d.mts → aggregates-C2xqsGZ2.d.mts} +8 -8
  7. package/dist/{aggregates-B3lIBjGK.d.mts.map → aggregates-C2xqsGZ2.d.mts.map} +1 -1
  8. package/dist/{migration-DO23kNde.d.mts → migration-DST6YA2w.d.mts} +2 -2
  9. package/dist/{migration-DO23kNde.d.mts.map → migration-DST6YA2w.d.mts.map} +1 -1
  10. package/dist/{planner-C1czBCmI-C-x1Ip-_.mjs → planner-CE4YoVdA-BfwuVRuT.mjs} +5 -4
  11. package/dist/planner-CE4YoVdA-BfwuVRuT.mjs.map +1 -0
  12. package/dist/{planner-B_MRApHM.d.mts → planner-D3wWu7Kj.d.mts} +2 -2
  13. package/dist/{planner-B_MRApHM.d.mts.map → planner-D3wWu7Kj.d.mts.map} +1 -1
  14. package/dist/{planner-produced-postgres-migration-B6NsNaam-BmvloI2L.d.mts → planner-produced-postgres-migration-BRjNXwjn-DhjS0Pbw.d.mts} +3 -3
  15. package/dist/planner-produced-postgres-migration-BRjNXwjn-DhjS0Pbw.d.mts.map +1 -0
  16. package/dist/planner-produced-postgres-migration-CiHKwaE_.d.mts +1 -0
  17. package/dist/{postgres-contract-view-2OP5JnXl-D2fpy4-8.d.mts → postgres-contract-view-BFzIDwwN-pJ6gJGOT.d.mts} +2 -2
  18. package/dist/{postgres-contract-view-2OP5JnXl-D2fpy4-8.d.mts.map → postgres-contract-view-BFzIDwwN-pJ6gJGOT.d.mts.map} +1 -1
  19. package/dist/{postgres-migration-CRLV93uK-ThJW3tFf.d.mts → postgres-migration-Crcs_mmg-D1ZyiWtc.d.mts} +3 -3
  20. package/dist/{postgres-migration-CRLV93uK-ThJW3tFf.d.mts.map → postgres-migration-Crcs_mmg-D1ZyiWtc.d.mts.map} +1 -1
  21. package/dist/{prisma7-binding-CzO7rkpS.mjs → prisma7-binding-CS42flik.mjs} +2 -2
  22. package/dist/{prisma7-binding-CzO7rkpS.mjs.map → prisma7-binding-CS42flik.mjs.map} +1 -1
  23. package/dist/{runtime-1ioqDrqf.d.mts → runtime-BeTyqpCH.d.mts} +2 -2
  24. package/dist/{runtime-1ioqDrqf.d.mts.map → runtime-BeTyqpCH.d.mts.map} +1 -1
  25. package/dist/target.d.mts +8 -8
  26. package/dist/target.mjs +3 -3
  27. package/dist/target__aggregates.d.mts +1 -1
  28. package/dist/target__control.mjs +3 -3
  29. package/dist/target__control.mjs.map +1 -1
  30. package/dist/target__migration.d.mts +2 -2
  31. package/dist/target__planner-produced-postgres-migration.d.mts +2 -2
  32. package/dist/target__planner.d.mts +1 -1
  33. package/dist/target__planner.mjs +1 -1
  34. package/dist/target__prisma7-binding.mjs +1 -1
  35. package/dist/target__runtime.d.mts +2 -2
  36. package/dist/{type-constructors-CrNUrtwZ-dmWF-mtV.mjs → type-constructors-C4QD_3HB-Czhx8fAX.mjs} +3 -3
  37. package/dist/{type-constructors-CrNUrtwZ-dmWF-mtV.mjs.map → type-constructors-C4QD_3HB-Czhx8fAX.mjs.map} +1 -1
  38. package/package.json +9 -9
  39. package/dist/planner-C1czBCmI-C-x1Ip-_.mjs.map +0 -1
  40. package/dist/planner-produced-postgres-migration-B6NsNaam-BmvloI2L.d.mts.map +0 -1
  41. package/dist/planner-produced-postgres-migration-BW8GJFjS.d.mts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"prisma7-binding-CzO7rkpS.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/prisma7-binding.mjs"],"sourcesContent":["import { A as pgTimestamptz, E as pgTime, F as pgUuid, L as pgVarchar, M as pgTimetz, O as pgTimestamp, R as postgresDataTypes, _ as pgInt8, a as pgBytea, b as pgJsonb, c as pgDate, f as pgFloat4, g as pgInt4, h as pgInt2, i as pgBool, m as pgInet, o as pgChar, p as pgFloat8, w as pgText, x as pgNumeric, y as pgJson } from \"./data-types-Cs-LkJBw.mjs\";\nimport { t as postgresDataTypeEntries } from \"./data-type-entries-CqnLlCkK.mjs\";\nimport { a as postgresCodecDescriptorRegistry } from \"./codec-registry-T79ktJL4.mjs\";\nimport { c as postgresNowGeneratorFor } from \"./authoring-DhyLHFHA.mjs\";\nimport { i as postgresCreateNamespace } from \"./postgres-schema-DyUXtYIT.mjs\";\nimport { t as postgresTargetDescriptorMeta } from \"./descriptor-meta-Bzs7kSyA.mjs\";\nimport { n as defaultPrimaryKeyName, t as defaultForeignKeyName } from \"./default-constraint-names-CtcRXhV8.mjs\";\nimport { i as buildPslDocumentAst, n as postgresPslTypeConstructors, o as createPostgresDefaultMapping, p as noColumnDefaults, s as noInferredDefaults } from \"./type-constructors-CrNUrtwZ.mjs\";\nimport { createDataTypeLookup } from \"@internal/framework-components/codec\";\nimport { authoringTypeConstructorArguments } from \"@internal/framework-components/authoring\";\nimport { SqlSchemaIR, SqlTableIR } from \"@internal/sql-schema-ir/types\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { inferredTypeConstructors } from \"@internal/family-sql/psl-build\";\nimport { toModelName } from \"@internal/family-sql/psl-infer\";\nimport { flatPslModels } from \"@internal/framework-components/psl-ast\";\n//#region src/core/prisma7-temporal-defaults.ts\nconst RFC_3339 = /^(\\d{4}-\\d{2}-\\d{2})[Tt ](\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?)([Zz]|[+-]\\d{2}:\\d{2})$/;\n/**\n* What a Prisma 7 `DateTime` default, such as `2024-01-02T03:04:05.123+02:00`, means on a column of `dataType`, as the body of the type's tag: `date` keeps the written date, `time` and `timestamp` the written wall-clock time without the offset, `timetz` the time with the written offset, and `timestamptz` the written instant, offset included. The tag reads the body as Postgres reads the default Prisma 7 writes. `undefined` for text that is not an RFC 3339 date and time, or a type that is not a date or time type.\n*/\nfunction prisma7TemporalTagBody(text, dataType) {\n\tconst match = RFC_3339.exec(text);\n\tif (match === null) return void 0;\n\tconst [, date = \"\", clock = \"\", zone = \"\"] = match;\n\tconst offset = zone.toUpperCase();\n\tswitch (dataType) {\n\t\tcase pgDate.id: return date;\n\t\tcase pgTime.id: return clock;\n\t\tcase pgTimetz.id: return `${clock}${offset}`;\n\t\tcase pgTimestamp.id: return `${date}T${clock}`;\n\t\tcase pgTimestamptz.id: return `${date}T${clock}${offset}`;\n\t\tdefault: return;\n\t}\n}\nconst MICROSECONDS_PER_SECOND = 1000000n;\nconst POSTGRES_EPOCH_MS = Date.UTC(2e3, 0, 1);\n/**\n* The value PostgreSQL stores for a Prisma 7 `DateTime` default with more fraction digits than a column of `dataType` with `precision` holds, written in the same RFC 3339 form: the fraction is first rounded to microseconds as PostgreSQL reads text, then to `precision` digits as it rounds a value for its column, a tie going away from midnight on 2000-01-01, PostgreSQL's epoch. `undefined` when the column holds the text as written, or for a date column, which keeps only the date.\n*/\nfunction prisma7TemporalStored(text, dataType, precision) {\n\tconst match = RFC_3339.exec(text);\n\tif (match === null || dataType === pgDate.id) return void 0;\n\tconst [, date = \"\", clock = \"\", zone = \"\"] = match;\n\tconst [hms = \"\", fraction = \"\"] = clock.split(\".\");\n\tif (fraction.length <= precision) return void 0;\n\tconst [year, month, day] = date.split(\"-\").map(Number);\n\tconst [hour, minute, second] = hms.split(\":\").map(Number);\n\tconst wallMs = (/* @__PURE__ */ new Date(0)).setUTCFullYear(year ?? 0, (month ?? 1) - 1, day ?? 1);\n\tconst wall = (BigInt(wallMs - POSTGRES_EPOCH_MS) / 1000n + BigInt((hour ?? 0) * 3600 + (minute ?? 0) * 60 + (second ?? 0))) * MICROSECONDS_PER_SECOND + microsecondsOf(fraction);\n\tconst instant = dataType === pgTimestamptz.id ? wall - offsetMicroseconds(zone) : wall;\n\tconst tieGoesEarlier = (dataType === pgTimestamp.id || dataType === pgTimestamptz.id) && instant < 0n;\n\treturn `${printedWall(roundedTo(wall, 10n ** BigInt(6 - precision), tieGoesEarlier), precision)}${zone}`;\n}\n/** PostgreSQL reads the fraction of a second as a double and rounds it to whole microseconds. */\nfunction microsecondsOf(fraction) {\n\tif (fraction.length <= 6) return BigInt(fraction.padEnd(6, \"0\"));\n\tconst scaled = Number(`0.${fraction}`) * 1e6;\n\tconst floor = Math.floor(scaled);\n\tconst rest = scaled - floor;\n\tconst rounded = rest > .5 || rest === .5 && floor % 2 === 1 ? floor + 1 : floor;\n\treturn BigInt(rounded);\n}\nfunction offsetMicroseconds(zone) {\n\tconst offset = /^([+-])(\\d{2}):(\\d{2})$/.exec(zone);\n\tif (offset === null) return 0n;\n\tconst [, sign, hours = \"0\", minutes = \"0\"] = offset;\n\tconst seconds = BigInt(Number(hours) * 3600 + Number(minutes) * 60);\n\treturn (sign === \"-\" ? -seconds : seconds) * MICROSECONDS_PER_SECOND;\n}\nfunction roundedTo(value, step, tieGoesEarlier) {\n\tconst rest = (value % step + step) % step;\n\tconst below = value - rest;\n\tconst twice = rest * 2n;\n\tif (twice > step || twice === step && !tieGoesEarlier) return below + step;\n\treturn below;\n}\nfunction printedWall(microseconds, precision) {\n\tconst rest = (microseconds % MICROSECONDS_PER_SECOND + MICROSECONDS_PER_SECOND) % MICROSECONDS_PER_SECOND;\n\tconst seconds = (microseconds - rest) / MICROSECONDS_PER_SECOND;\n\tconst at = new Date(POSTGRES_EPOCH_MS + Number(seconds) * 1e3);\n\tconst two = (n) => String(n).padStart(2, \"0\");\n\treturn `${`${String(at.getUTCFullYear()).padStart(4, \"0\")}-${two(at.getUTCMonth() + 1)}-${two(at.getUTCDate())}`}T${`${two(at.getUTCHours())}:${two(at.getUTCMinutes())}:${two(at.getUTCSeconds())}`}${precision === 0 ? \"\" : `.${String(rest).padStart(6, \"0\").slice(0, precision)}`}`;\n}\n//#endregion\n//#region src/core/prisma7-type-map.ts\nconst of = (type, params = {}) => ({\n\tdataType: type.id,\n\tparams\n});\n/**\n* What Prisma 7.10.0 creates in Postgres for each Prisma 7 scalar and `@db.*` native type, as a data type and its parameters. Derived from the SQL recorded in `test/integration/test/fixtures/prisma7-source/reference/migration.sql`. A `@db.*` attribute's own arguments replace the parameters; without any, the column gets these, so `@db.Char` is the `character(1)` Postgres stores for Prisma 7's `CHAR`.\n*/\nconst prisma7PostgresTypes = {\n\tscalars: {\n\t\tString: of(pgText),\n\t\tBoolean: of(pgBool),\n\t\tInt: of(pgInt4),\n\t\tBigInt: of(pgInt8),\n\t\tFloat: of(pgFloat8),\n\t\tDecimal: of(pgNumeric, {\n\t\t\tprecision: 65,\n\t\t\tscale: 30\n\t\t}),\n\t\tDateTime: of(pgTimestamp, { precision: 3 }),\n\t\tJson: of(pgJsonb),\n\t\tBytes: of(pgBytea)\n\t},\n\tnativeTypes: {\n\t\tText: of(pgText),\n\t\tVarChar: of(pgVarchar),\n\t\tChar: of(pgChar, { length: 1 }),\n\t\tUuid: of(pgUuid),\n\t\tInet: of(pgInet),\n\t\tBoolean: of(pgBool),\n\t\tInteger: of(pgInt4),\n\t\tSmallInt: of(pgInt2),\n\t\tBigInt: of(pgInt8),\n\t\tReal: of(pgFloat4),\n\t\tDoublePrecision: of(pgFloat8),\n\t\tDecimal: of(pgNumeric),\n\t\tTimestamp: of(pgTimestamp),\n\t\tTimestamptz: of(pgTimestamptz),\n\t\tDate: of(pgDate),\n\t\tTime: of(pgTime),\n\t\tTimetz: of(pgTimetz),\n\t\tJson: of(pgJson),\n\t\tJsonB: of(pgJsonb),\n\t\tByteA: of(pgBytea)\n\t}\n};\nconst marked = inferredTypeConstructors({\n\tauthoringTypes: postgresPslTypeConstructors,\n\tcodecLookup: postgresCodecDescriptorRegistry,\n\tdataTypeLookup: createDataTypeLookup(postgresDataTypes)\n});\n/**\n* The constructor marked `inferred` for the column's data type, with every parameter Prisma 7 gives the column as an argument. The reader builds a contract, so it keeps each parameter rather than the fewest arguments printed PSL writes (design 13.8).\n*/\nfunction mappingOf({ dataType, params }) {\n\tconst markedConstructor = marked.get(dataType);\n\tconst args = markedConstructor === void 0 ? void 0 : authoringTypeConstructorArguments(markedConstructor.descriptor, {\n\t\tcodecId: markedConstructor.descriptor.output.codecId,\n\t\ttypeParams: params\n\t});\n\tif (markedConstructor === void 0 || args === void 0) throw new InternalError(`No constructor marked inferred writes ${dataType} with these parameters.`);\n\treturn {\n\t\tconstructorName: markedConstructor.path.join(\".\"),\n\t\targs: args.map(String)\n\t};\n}\nfunction mappingsOf(types) {\n\treturn Object.fromEntries(Object.entries(types).map(([name, type]) => [name, mappingOf(type)]));\n}\n/** {@link prisma7PostgresTypes} as the Prisma 7 reader takes it: each type's constructor call. */\nconst prisma7PostgresTypeMap = {\n\tscalars: mappingsOf(prisma7PostgresTypes.scalars),\n\tnativeTypes: mappingsOf(prisma7PostgresTypes.nativeTypes)\n};\n//#endregion\n//#region src/core/psl-infer/junction-relation-field-names.ts\nconst EMPTY_FOREIGN_KEY_EXTRAS = {\n\textraRelationsByTable: /* @__PURE__ */ new Map(),\n\tcrossSpaceFieldNamesByTable: /* @__PURE__ */ new Map(),\n\tdanglingForeignKeysByTable: /* @__PURE__ */ new Map()\n};\nfunction idTable(name) {\n\treturn new SqlTableIR({\n\t\tname,\n\t\tcolumns: { id: {\n\t\t\tname: \"id\",\n\t\t\ttypeText: \"int4\",\n\t\t\tnullable: false\n\t\t} },\n\t\tforeignKeys: [],\n\t\tuniques: [],\n\t\tindexes: [],\n\t\tprimaryKey: { columns: [\"id\"] }\n\t});\n}\n/**\n* The relation field names `contract infer` prints for an implicit\n* many-to-many junction table whose columns `A` and `B` reference `tableA`\n* and `tableB`, found by running infer's PSL construction on that table.\n*/\nfunction junctionRelationFieldNames(tableA, tableB) {\n\tlet junctionName = \"_junction\";\n\twhile ([tableA, tableB].some((table) => toModelName(table).name === toModelName(junctionName).name)) junctionName = `${junctionName}x`;\n\tconst column = (name) => ({\n\t\tname,\n\t\ttypeText: \"int4\",\n\t\tnullable: false\n\t});\n\tconst foreignKey = (columnName, referencedTable) => ({\n\t\tcolumns: [columnName],\n\t\treferencedTable,\n\t\treferencedColumns: [\"id\"]\n\t});\n\tconst junction = new SqlTableIR({\n\t\tname: junctionName,\n\t\tcolumns: {\n\t\t\tA: column(\"A\"),\n\t\t\tB: column(\"B\")\n\t\t},\n\t\tforeignKeys: [foreignKey(\"A\", tableA), foreignKey(\"B\", tableB)],\n\t\tuniques: [],\n\t\tindexes: [],\n\t\tprimaryKey: { columns: [\"A\", \"B\"] }\n\t});\n\tconst document = buildPslDocumentAst(new SqlSchemaIR({ tables: {\n\t\t[tableA]: idTable(tableA),\n\t\t[tableB]: idTable(tableB),\n\t\t[junctionName]: junction\n\t} }), {\n\t\tcolumnTypes: () => ({\n\t\t\tpath: [\"Int\"],\n\t\t\targs: []\n\t\t}),\n\t\tdefaultMapping: createPostgresDefaultMapping(),\n\t\tdefaultOf: noInferredDefaults,\n\t\tcolumnDefaults: noColumnDefaults\n\t}, EMPTY_FOREIGN_KEY_EXTRAS);\n\tconst junctionModelName = toModelName(junctionName).name;\n\tconst fields = flatPslModels(document).find((model) => model.name === junctionModelName)?.fields;\n\tconst scalarFieldCount = Object.keys(junction.columns).length;\n\tconst [a = \"\", b = \"\"] = (fields ?? []).slice(scalarFieldCount).map((field) => field.name);\n\treturn [a, b];\n}\n//#endregion\n//#region src/core/prisma7-binding.ts\n/** The date and time types a Prisma 7 `DateTime` default can be written on. */\nconst DATE_TIME_TYPES = /* @__PURE__ */ new Set([\n\tpgTimestamp.id,\n\tpgTimestamptz.id,\n\tpgDate.id,\n\tpgTime.id,\n\tpgTimetz.id\n]);\nconst ENTRIES = postgresDataTypeEntries();\n/** The tag the authoring entry of `dataType` writes its values with. */\nfunction tagOf(dataType) {\n\tconst written = ENTRIES[dataType]?.written;\n\treturn written?.kind === \"tag\" ? written.tag : void 0;\n}\n/** A date or time column without a precision holds microseconds. */\nfunction precisionOf(typeParams) {\n\tconst precision = typeParams?.[\"precision\"];\n\treturn typeof precision === \"number\" ? precision : 6;\n}\nfunction base64ToHex(base64) {\n\tif (!/^[A-Za-z0-9+/]*={0,2}$/.test(base64) || base64.length % 4 !== 0) return void 0;\n\treturn `\\\\x${Buffer.from(base64, \"base64\").toString(\"hex\")}`;\n}\n/**\n* What the Postgres target supplies to the Prisma 7 interpreter. A `Bytes` or\n* `DateTime` default is read through the tag its column type's authoring entry\n* writes, as the current schema language reads it: a `Bytes` default's base64\n* as the hex body of `bytea`, and a `DateTime` default as the body of the date\n* or time tag that keeps what the written value means on the column.\n*/\nconst prisma7PostgresBinding = {\n\ttarget: postgresTargetDescriptorMeta,\n\tcreateNamespace: postgresCreateNamespace,\n\tproviders: [\"postgresql\", \"postgres\"],\n\ttypeMap: prisma7PostgresTypeMap,\n\tnativeEnum: {\n\t\tentityKind: \"native_enum\",\n\t\ttypeConstructor: [\"pg\", \"enum\"]\n\t},\n\tindexTypes: {\n\t\tBTree: \"btree\",\n\t\tHash: \"hash\",\n\t\tGin: \"gin\",\n\t\tGist: \"gist\",\n\t\tSpGist: \"spgist\",\n\t\tBrin: \"brin\"\n\t},\n\t/** `NAMEDATALEN - 1`. */\n\tidentifierMaxBytes: 63,\n\tdefaultConstraintNames: {\n\t\tprimaryKey: defaultPrimaryKeyName,\n\t\tforeignKey: defaultForeignKeyName\n\t},\n\tjunctionRelationFieldNames,\n\tupdatedAtGenerator: postgresNowGeneratorFor,\n\tliteralDefaultForm: ({ dataType, typeParams }) => {\n\t\tif (dataType === pgJson.id || dataType === pgJsonb.id) return { kind: \"json\" };\n\t\tconst tag = tagOf(dataType);\n\t\tif (tag === void 0) return void 0;\n\t\tif (dataType === pgBytea.id) return {\n\t\t\tkind: \"tag\",\n\t\t\ttag,\n\t\t\tbody: base64ToHex\n\t\t};\n\t\tif (!DATE_TIME_TYPES.has(dataType)) return void 0;\n\t\treturn {\n\t\t\tkind: \"tag\",\n\t\t\ttag,\n\t\t\tbody: (text) => prisma7TemporalTagBody(text, dataType),\n\t\t\tfinerThanColumn: (text) => {\n\t\t\t\tconst heldDigits = precisionOf(typeParams);\n\t\t\t\tconst stored = prisma7TemporalStored(text, dataType, heldDigits);\n\t\t\t\treturn stored === void 0 ? void 0 : {\n\t\t\t\t\theldDigits,\n\t\t\t\t\tstored\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t}\n};\n//#endregion\nexport { prisma7PostgresBinding };\n\n//# sourceMappingURL=prisma7-binding.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAM,WAAW;;;;AAIjB,SAAS,uBAAuB,MAAM,UAAU;CAC/C,MAAM,QAAQ,SAAS,KAAK,IAAI;CAChC,IAAI,UAAU,MAAM,OAAO,KAAK;CAChC,MAAM,GAAG,OAAO,IAAI,QAAQ,IAAI,OAAO,MAAM;CAC7C,MAAM,SAAS,KAAK,YAAY;CAChC,QAAQ,UAAR;EACC,KAAK,OAAO,IAAI,OAAO;EACvB,KAAK,OAAO,IAAI,OAAO;EACvB,KAAK,SAAS,IAAI,OAAO,GAAG,QAAQ;EACpC,KAAK,YAAY,IAAI,OAAO,GAAG,KAAK,GAAG;EACvC,KAAK,cAAc,IAAI,OAAO,GAAG,KAAK,GAAG,QAAQ;EACjD,SAAS;CACV;AACD;AACA,MAAM,0BAA0B;AAChC,MAAM,oBAAoB,KAAK,IAAI,KAAK,GAAG,CAAC;;;;AAI5C,SAAS,sBAAsB,MAAM,UAAU,WAAW;CACzD,MAAM,QAAQ,SAAS,KAAK,IAAI;CAChC,IAAI,UAAU,QAAQ,aAAa,OAAO,IAAI,OAAO,KAAK;CAC1D,MAAM,GAAG,OAAO,IAAI,QAAQ,IAAI,OAAO,MAAM;CAC7C,MAAM,CAAC,MAAM,IAAI,WAAW,MAAM,MAAM,MAAM,GAAG;CACjD,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I,aAAa,OAAO,MAAM,aAAa,QAAQ,IAAI,OAAO,EAAE,MAAM,OAAO;EAC7E,MAAM,MAAM,MAAM,QAAQ;EAC1B,IAAI,QAAQ,KAAK,GAAG,OAAO,KAAK;EAChC,IAAI,aAAa,QAAQ,IAAI,OAAO;GACnC,MAAM;GACN;GACA,MAAM;EACP;EACA,IAAI,CAAC,gBAAgB,IAAI,QAAQ,GAAG,OAAO,KAAK;EAChD,OAAO;GACN,MAAM;GACN;GACA,OAAO,SAAS,uBAAuB,MAAM,QAAQ;GACrD,kBAAkB,SAAS;IAC1B,MAAM,aAAa,YAAY,UAAU;IACzC,MAAM,SAAS,sBAAsB,MAAM,UAAU,UAAU;IAC/D,OAAO,WAAW,KAAK,IAAI,KAAK,IAAI;KACnC;KACA;IACD;GACD;EACD;CACD;AACD"}
1
+ {"version":3,"file":"prisma7-binding-CS42flik.mjs","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/prisma7-binding.mjs"],"sourcesContent":["import { A as pgTimestamptz, E as pgTime, F as pgUuid, L as pgVarchar, M as pgTimetz, O as pgTimestamp, R as postgresDataTypes, _ as pgInt8, a as pgBytea, b as pgJsonb, c as pgDate, f as pgFloat4, g as pgInt4, h as pgInt2, i as pgBool, m as pgInet, o as pgChar, p as pgFloat8, w as pgText, x as pgNumeric, y as pgJson } from \"./data-types-Cs-LkJBw.mjs\";\nimport { t as postgresDataTypeEntries } from \"./data-type-entries-CqnLlCkK.mjs\";\nimport { a as postgresCodecDescriptorRegistry } from \"./codec-registry-T79ktJL4.mjs\";\nimport { c as postgresNowGeneratorFor } from \"./authoring-DhyLHFHA.mjs\";\nimport { i as postgresCreateNamespace } from \"./postgres-schema-DyUXtYIT.mjs\";\nimport { t as postgresTargetDescriptorMeta } from \"./descriptor-meta-Bzs7kSyA.mjs\";\nimport { n as defaultPrimaryKeyName, t as defaultForeignKeyName } from \"./default-constraint-names-CtcRXhV8.mjs\";\nimport { i as buildPslDocumentAst, n as postgresPslTypeConstructors, o as createPostgresDefaultMapping, p as noColumnDefaults, s as noInferredDefaults } from \"./type-constructors-C4QD_3HB.mjs\";\nimport { createDataTypeLookup } from \"@internal/framework-components/codec\";\nimport { authoringTypeConstructorArguments } from \"@internal/framework-components/authoring\";\nimport { SqlSchemaIR, SqlTableIR } from \"@internal/sql-schema-ir/types\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { inferredTypeConstructors } from \"@internal/family-sql/psl-build\";\nimport { toModelName } from \"@internal/family-sql/psl-infer\";\nimport { flatPslModels } from \"@internal/framework-components/psl-ast\";\n//#region src/core/prisma7-temporal-defaults.ts\nconst RFC_3339 = /^(\\d{4}-\\d{2}-\\d{2})[Tt ](\\d{2}:\\d{2}:\\d{2}(?:\\.\\d+)?)([Zz]|[+-]\\d{2}:\\d{2})$/;\n/**\n* What a Prisma 7 `DateTime` default, such as `2024-01-02T03:04:05.123+02:00`, means on a column of `dataType`, as the body of the type's tag: `date` keeps the written date, `time` and `timestamp` the written wall-clock time without the offset, `timetz` the time with the written offset, and `timestamptz` the written instant, offset included. The tag reads the body as Postgres reads the default Prisma 7 writes. `undefined` for text that is not an RFC 3339 date and time, or a type that is not a date or time type.\n*/\nfunction prisma7TemporalTagBody(text, dataType) {\n\tconst match = RFC_3339.exec(text);\n\tif (match === null) return void 0;\n\tconst [, date = \"\", clock = \"\", zone = \"\"] = match;\n\tconst offset = zone.toUpperCase();\n\tswitch (dataType) {\n\t\tcase pgDate.id: return date;\n\t\tcase pgTime.id: return clock;\n\t\tcase pgTimetz.id: return `${clock}${offset}`;\n\t\tcase pgTimestamp.id: return `${date}T${clock}`;\n\t\tcase pgTimestamptz.id: return `${date}T${clock}${offset}`;\n\t\tdefault: return;\n\t}\n}\nconst MICROSECONDS_PER_SECOND = 1000000n;\nconst POSTGRES_EPOCH_MS = Date.UTC(2e3, 0, 1);\n/**\n* The value PostgreSQL stores for a Prisma 7 `DateTime` default with more fraction digits than a column of `dataType` with `precision` holds, written in the same RFC 3339 form: the fraction is first rounded to microseconds as PostgreSQL reads text, then to `precision` digits as it rounds a value for its column, a tie going away from midnight on 2000-01-01, PostgreSQL's epoch. `undefined` when the column holds the text as written, or for a date column, which keeps only the date.\n*/\nfunction prisma7TemporalStored(text, dataType, precision) {\n\tconst match = RFC_3339.exec(text);\n\tif (match === null || dataType === pgDate.id) return void 0;\n\tconst [, date = \"\", clock = \"\", zone = \"\"] = match;\n\tconst [hms = \"\", fraction = \"\"] = clock.split(\".\");\n\tif (fraction.length <= precision) return void 0;\n\tconst [year, month, day] = date.split(\"-\").map(Number);\n\tconst [hour, minute, second] = hms.split(\":\").map(Number);\n\tconst wallMs = (/* @__PURE__ */ new Date(0)).setUTCFullYear(year ?? 0, (month ?? 1) - 1, day ?? 1);\n\tconst wall = (BigInt(wallMs - POSTGRES_EPOCH_MS) / 1000n + BigInt((hour ?? 0) * 3600 + (minute ?? 0) * 60 + (second ?? 0))) * MICROSECONDS_PER_SECOND + microsecondsOf(fraction);\n\tconst instant = dataType === pgTimestamptz.id ? wall - offsetMicroseconds(zone) : wall;\n\tconst tieGoesEarlier = (dataType === pgTimestamp.id || dataType === pgTimestamptz.id) && instant < 0n;\n\treturn `${printedWall(roundedTo(wall, 10n ** BigInt(6 - precision), tieGoesEarlier), precision)}${zone}`;\n}\n/** PostgreSQL reads the fraction of a second as a double and rounds it to whole microseconds. */\nfunction microsecondsOf(fraction) {\n\tif (fraction.length <= 6) return BigInt(fraction.padEnd(6, \"0\"));\n\tconst scaled = Number(`0.${fraction}`) * 1e6;\n\tconst floor = Math.floor(scaled);\n\tconst rest = scaled - floor;\n\tconst rounded = rest > .5 || rest === .5 && floor % 2 === 1 ? floor + 1 : floor;\n\treturn BigInt(rounded);\n}\nfunction offsetMicroseconds(zone) {\n\tconst offset = /^([+-])(\\d{2}):(\\d{2})$/.exec(zone);\n\tif (offset === null) return 0n;\n\tconst [, sign, hours = \"0\", minutes = \"0\"] = offset;\n\tconst seconds = BigInt(Number(hours) * 3600 + Number(minutes) * 60);\n\treturn (sign === \"-\" ? -seconds : seconds) * MICROSECONDS_PER_SECOND;\n}\nfunction roundedTo(value, step, tieGoesEarlier) {\n\tconst rest = (value % step + step) % step;\n\tconst below = value - rest;\n\tconst twice = rest * 2n;\n\tif (twice > step || twice === step && !tieGoesEarlier) return below + step;\n\treturn below;\n}\nfunction printedWall(microseconds, precision) {\n\tconst rest = (microseconds % MICROSECONDS_PER_SECOND + MICROSECONDS_PER_SECOND) % MICROSECONDS_PER_SECOND;\n\tconst seconds = (microseconds - rest) / MICROSECONDS_PER_SECOND;\n\tconst at = new Date(POSTGRES_EPOCH_MS + Number(seconds) * 1e3);\n\tconst two = (n) => String(n).padStart(2, \"0\");\n\treturn `${`${String(at.getUTCFullYear()).padStart(4, \"0\")}-${two(at.getUTCMonth() + 1)}-${two(at.getUTCDate())}`}T${`${two(at.getUTCHours())}:${two(at.getUTCMinutes())}:${two(at.getUTCSeconds())}`}${precision === 0 ? \"\" : `.${String(rest).padStart(6, \"0\").slice(0, precision)}`}`;\n}\n//#endregion\n//#region src/core/prisma7-type-map.ts\nconst of = (type, params = {}) => ({\n\tdataType: type.id,\n\tparams\n});\n/**\n* What Prisma 7.10.0 creates in Postgres for each Prisma 7 scalar and `@db.*` native type, as a data type and its parameters. Derived from the SQL recorded in `test/integration/test/fixtures/prisma7-source/reference/migration.sql`. A `@db.*` attribute's own arguments replace the parameters; without any, the column gets these, so `@db.Char` is the `character(1)` Postgres stores for Prisma 7's `CHAR`.\n*/\nconst prisma7PostgresTypes = {\n\tscalars: {\n\t\tString: of(pgText),\n\t\tBoolean: of(pgBool),\n\t\tInt: of(pgInt4),\n\t\tBigInt: of(pgInt8),\n\t\tFloat: of(pgFloat8),\n\t\tDecimal: of(pgNumeric, {\n\t\t\tprecision: 65,\n\t\t\tscale: 30\n\t\t}),\n\t\tDateTime: of(pgTimestamp, { precision: 3 }),\n\t\tJson: of(pgJsonb),\n\t\tBytes: of(pgBytea)\n\t},\n\tnativeTypes: {\n\t\tText: of(pgText),\n\t\tVarChar: of(pgVarchar),\n\t\tChar: of(pgChar, { length: 1 }),\n\t\tUuid: of(pgUuid),\n\t\tInet: of(pgInet),\n\t\tBoolean: of(pgBool),\n\t\tInteger: of(pgInt4),\n\t\tSmallInt: of(pgInt2),\n\t\tBigInt: of(pgInt8),\n\t\tReal: of(pgFloat4),\n\t\tDoublePrecision: of(pgFloat8),\n\t\tDecimal: of(pgNumeric),\n\t\tTimestamp: of(pgTimestamp),\n\t\tTimestamptz: of(pgTimestamptz),\n\t\tDate: of(pgDate),\n\t\tTime: of(pgTime),\n\t\tTimetz: of(pgTimetz),\n\t\tJson: of(pgJson),\n\t\tJsonB: of(pgJsonb),\n\t\tByteA: of(pgBytea)\n\t}\n};\nconst marked = inferredTypeConstructors({\n\tauthoringTypes: postgresPslTypeConstructors,\n\tcodecLookup: postgresCodecDescriptorRegistry,\n\tdataTypeLookup: createDataTypeLookup(postgresDataTypes)\n});\n/**\n* The constructor marked `inferred` for the column's data type, with every parameter Prisma 7 gives the column as an argument. The reader builds a contract, so it keeps each parameter rather than the fewest arguments printed PSL writes (design 13.8).\n*/\nfunction mappingOf({ dataType, params }) {\n\tconst markedConstructor = marked.get(dataType);\n\tconst args = markedConstructor === void 0 ? void 0 : authoringTypeConstructorArguments(markedConstructor.descriptor, {\n\t\tcodecId: markedConstructor.descriptor.output.codecId,\n\t\ttypeParams: params\n\t});\n\tif (markedConstructor === void 0 || args === void 0) throw new InternalError(`No constructor marked inferred writes ${dataType} with these parameters.`);\n\treturn {\n\t\tconstructorName: markedConstructor.path.join(\".\"),\n\t\targs: args.map(String)\n\t};\n}\nfunction mappingsOf(types) {\n\treturn Object.fromEntries(Object.entries(types).map(([name, type]) => [name, mappingOf(type)]));\n}\n/** {@link prisma7PostgresTypes} as the Prisma 7 reader takes it: each type's constructor call. */\nconst prisma7PostgresTypeMap = {\n\tscalars: mappingsOf(prisma7PostgresTypes.scalars),\n\tnativeTypes: mappingsOf(prisma7PostgresTypes.nativeTypes)\n};\n//#endregion\n//#region src/core/psl-infer/junction-relation-field-names.ts\nconst EMPTY_FOREIGN_KEY_EXTRAS = {\n\textraRelationsByTable: /* @__PURE__ */ new Map(),\n\tcrossSpaceFieldNamesByTable: /* @__PURE__ */ new Map(),\n\tdanglingForeignKeysByTable: /* @__PURE__ */ new Map()\n};\nfunction idTable(name) {\n\treturn new SqlTableIR({\n\t\tname,\n\t\tcolumns: { id: {\n\t\t\tname: \"id\",\n\t\t\ttypeText: \"int4\",\n\t\t\tnullable: false\n\t\t} },\n\t\tforeignKeys: [],\n\t\tuniques: [],\n\t\tindexes: [],\n\t\tprimaryKey: { columns: [\"id\"] }\n\t});\n}\n/**\n* The relation field names `contract infer` prints for an implicit\n* many-to-many junction table whose columns `A` and `B` reference `tableA`\n* and `tableB`, found by running infer's PSL construction on that table.\n*/\nfunction junctionRelationFieldNames(tableA, tableB) {\n\tlet junctionName = \"_junction\";\n\twhile ([tableA, tableB].some((table) => toModelName(table).name === toModelName(junctionName).name)) junctionName = `${junctionName}x`;\n\tconst column = (name) => ({\n\t\tname,\n\t\ttypeText: \"int4\",\n\t\tnullable: false\n\t});\n\tconst foreignKey = (columnName, referencedTable) => ({\n\t\tcolumns: [columnName],\n\t\treferencedTable,\n\t\treferencedColumns: [\"id\"]\n\t});\n\tconst junction = new SqlTableIR({\n\t\tname: junctionName,\n\t\tcolumns: {\n\t\t\tA: column(\"A\"),\n\t\t\tB: column(\"B\")\n\t\t},\n\t\tforeignKeys: [foreignKey(\"A\", tableA), foreignKey(\"B\", tableB)],\n\t\tuniques: [],\n\t\tindexes: [],\n\t\tprimaryKey: { columns: [\"A\", \"B\"] }\n\t});\n\tconst document = buildPslDocumentAst(new SqlSchemaIR({ tables: {\n\t\t[tableA]: idTable(tableA),\n\t\t[tableB]: idTable(tableB),\n\t\t[junctionName]: junction\n\t} }), {\n\t\tcolumnTypes: () => ({\n\t\t\tpath: [\"Int\"],\n\t\t\targs: []\n\t\t}),\n\t\tdefaultMapping: createPostgresDefaultMapping(),\n\t\tdefaultOf: noInferredDefaults,\n\t\tcolumnDefaults: noColumnDefaults\n\t}, EMPTY_FOREIGN_KEY_EXTRAS);\n\tconst junctionModelName = toModelName(junctionName).name;\n\tconst fields = flatPslModels(document).find((model) => model.name === junctionModelName)?.fields;\n\tconst scalarFieldCount = Object.keys(junction.columns).length;\n\tconst [a = \"\", b = \"\"] = (fields ?? []).slice(scalarFieldCount).map((field) => field.name);\n\treturn [a, b];\n}\n//#endregion\n//#region src/core/prisma7-binding.ts\n/** The date and time types a Prisma 7 `DateTime` default can be written on. */\nconst DATE_TIME_TYPES = /* @__PURE__ */ new Set([\n\tpgTimestamp.id,\n\tpgTimestamptz.id,\n\tpgDate.id,\n\tpgTime.id,\n\tpgTimetz.id\n]);\nconst ENTRIES = postgresDataTypeEntries();\n/** The tag the authoring entry of `dataType` writes its values with. */\nfunction tagOf(dataType) {\n\tconst written = ENTRIES[dataType]?.written;\n\treturn written?.kind === \"tag\" ? written.tag : void 0;\n}\n/** A date or time column without a precision holds microseconds. */\nfunction precisionOf(typeParams) {\n\tconst precision = typeParams?.[\"precision\"];\n\treturn typeof precision === \"number\" ? precision : 6;\n}\nfunction base64ToHex(base64) {\n\tif (!/^[A-Za-z0-9+/]*={0,2}$/.test(base64) || base64.length % 4 !== 0) return void 0;\n\treturn `\\\\x${Buffer.from(base64, \"base64\").toString(\"hex\")}`;\n}\n/**\n* What the Postgres target supplies to the Prisma 7 interpreter. A `Bytes` or\n* `DateTime` default is read through the tag its column type's authoring entry\n* writes, as the current schema language reads it: a `Bytes` default's base64\n* as the hex body of `bytea`, and a `DateTime` default as the body of the date\n* or time tag that keeps what the written value means on the column.\n*/\nconst prisma7PostgresBinding = {\n\ttarget: postgresTargetDescriptorMeta,\n\tcreateNamespace: postgresCreateNamespace,\n\tproviders: [\"postgresql\", \"postgres\"],\n\ttypeMap: prisma7PostgresTypeMap,\n\tnativeEnum: {\n\t\tentityKind: \"native_enum\",\n\t\ttypeConstructor: [\"pg\", \"enum\"]\n\t},\n\tindexTypes: {\n\t\tBTree: \"btree\",\n\t\tHash: \"hash\",\n\t\tGin: \"gin\",\n\t\tGist: \"gist\",\n\t\tSpGist: \"spgist\",\n\t\tBrin: \"brin\"\n\t},\n\t/** `NAMEDATALEN - 1`. */\n\tidentifierMaxBytes: 63,\n\tdefaultConstraintNames: {\n\t\tprimaryKey: defaultPrimaryKeyName,\n\t\tforeignKey: defaultForeignKeyName\n\t},\n\tjunctionRelationFieldNames,\n\tupdatedAtGenerator: postgresNowGeneratorFor,\n\tliteralDefaultForm: ({ dataType, typeParams }) => {\n\t\tif (dataType === pgJson.id || dataType === pgJsonb.id) return { kind: \"json\" };\n\t\tconst tag = tagOf(dataType);\n\t\tif (tag === void 0) return void 0;\n\t\tif (dataType === pgBytea.id) return {\n\t\t\tkind: \"tag\",\n\t\t\ttag,\n\t\t\tbody: base64ToHex\n\t\t};\n\t\tif (!DATE_TIME_TYPES.has(dataType)) return void 0;\n\t\treturn {\n\t\t\tkind: \"tag\",\n\t\t\ttag,\n\t\t\tbody: (text) => prisma7TemporalTagBody(text, dataType),\n\t\t\tfinerThanColumn: (text) => {\n\t\t\t\tconst heldDigits = precisionOf(typeParams);\n\t\t\t\tconst stored = prisma7TemporalStored(text, dataType, heldDigits);\n\t\t\t\treturn stored === void 0 ? void 0 : {\n\t\t\t\t\theldDigits,\n\t\t\t\t\tstored\n\t\t\t\t};\n\t\t\t}\n\t\t};\n\t}\n};\n//#endregion\nexport { prisma7PostgresBinding };\n\n//# sourceMappingURL=prisma7-binding.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAM,WAAW;;;;AAIjB,SAAS,uBAAuB,MAAM,UAAU;CAC/C,MAAM,QAAQ,SAAS,KAAK,IAAI;CAChC,IAAI,UAAU,MAAM,OAAO,KAAK;CAChC,MAAM,GAAG,OAAO,IAAI,QAAQ,IAAI,OAAO,MAAM;CAC7C,MAAM,SAAS,KAAK,YAAY;CAChC,QAAQ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c,WAAW,YAAY;AACpD;AACA,SAAS,YAAY,QAAQ;CAC5B,IAAI,CAAC,yBAAyB,KAAK,MAAM,KAAK,OAAO,SAAS,MAAM,GAAG,OAAO,KAAK;CACnF,OAAO,MAAM,OAAO,KAAK,QAAQ,QAAQ,CAAC,CAAC,SAAS,KAAK;AAC1D;;;;;;;;AAQA,MAAM,yBAAyB;CAC9B,QAAQ;CACR,iBAAiB;CACjB,WAAW,CAAC,cAAc,UAAU;CACpC,SAAS;CACT,YAAY;EACX,YAAY;EACZ,iBAAiB,CAAC,MAAM,MAAM;CAC/B;CACA,YAAY;EACX,OAAO;EACP,MAAM;EACN,KAAK;EACL,MAAM;EACN,QAAQ;EACR,MAAM;CACP;;CAEA,oBAAoB;CACpB,wBAAwB;EACvB,YAAY;EACZ,YAAY;CACb;CACA;CACA,oBAAoB;CACpB,qBAAqB,EAAE,UAAU,iBAAiB;EACjD,IAAI,aAAa,OAAO,MAAM,aAAa,QAAQ,IAAI,OAAO,EAAE,MAAM,OAAO;EAC7E,MAAM,MAAM,MAAM,QAAQ;EAC1B,IAAI,QAAQ,KAAK,GAAG,OAAO,KAAK;EAChC,IAAI,aAAa,QAAQ,IAAI,OAAO;GACnC,MAAM;GACN;GACA,MAAM;EACP;EACA,IAAI,CAAC,gBAAgB,IAAI,QAAQ,GAAG,OAAO,KAAK;EAChD,OAAO;GACN,MAAM;GACN;GACA,OAAO,SAAS,uBAAuB,MAAM,QAAQ;GACrD,kBAAkB,SAAS;IAC1B,MAAM,aAAa,YAAY,UAAU;IACzC,MAAM,SAAS,sBAAsB,MAAM,UAAU,UAAU;IAC/D,OAAO,WAAW,KAAK,IAAI,KAAK,IAAI;KACnC;KACA;IACD;GACD;EACD;CACD;AACD"}
@@ -1,6 +1,6 @@
1
1
  import "./date-time-now-generators-CMkXVbMG-CYwplAuf.mjs";
2
2
  import "./full-text-collection-method-BIqQH9XN-CkW2x4u2.mjs";
3
- import "./postgres-contract-view-2OP5JnXl-D2fpy4-8.mjs";
3
+ import "./postgres-contract-view-BFzIDwwN-pJ6gJGOT.mjs";
4
4
  import { AnyCodecDescriptor } from "@prisma/orm-framework/components/codec";
5
5
  import { AnyEntityKindDescriptor, Namespace } from "@prisma/orm-framework/components/ir";
6
6
  import { SqlNamespaceInput, SqlStorage } from "@prisma/orm-family-sql/contract/types";
@@ -37,4 +37,4 @@ declare const postgresRuntimeTargetDescriptor: RuntimeTargetDescriptor<'sql', 'p
37
37
  };
38
38
  //#endregion
39
39
  export { postgresRuntimeTargetDescriptor as i, PostgresListDecoder as n, PostgresRuntimeTargetInstance as r, PostgresContractSerializer as t };
40
- //# sourceMappingURL=runtime-1ioqDrqf.d.mts.map
40
+ //# sourceMappingURL=runtime-BeTyqpCH.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-1ioqDrqf.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;;;;cAec,mCAAmC,0BAA0B,SAAS;EAClF,qBAAqB;EACrB,YAAY,gCAAgC;YAClC,yBAAyB,cAAc,KAAK,0BAA0B,YAAY;EAC5F,kBAAkB,UAAU,SAAS,cAAc;;;;UAI3C,sCAAsC;KAC3C,uBAAuB,oBAAoB,gBAAgB,mBAAmB,qBAAqB;;;;;;;cAO1F,iCAAiC,2CAA2C;WAC/E,uBAAuB;WACvB,mBAAmB;WACnB,uBAAuB;WACvB,kCAAkC"}
1
+ {"version":3,"file":"runtime-BeTyqpCH.d.mts","names":[],"sources":["../../../../3-targets/3-targets/postgres/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;;;;cAec,mCAAmC,0BAA0B,SAAS;EAClF,qBAAqB;EACrB,YAAY,gCAAgC;YAClC,yBAAyB,cAAc,KAAK,0BAA0B,YAAY;EAC5F,kBAAkB,UAAU,SAAS,cAAc;;;;UAI3C,sCAAsC;KAC3C,uBAAuB,oBAAoB,gBAAgB,mBAAmB,qBAAqB;;;;;;;cAO1F,iCAAiC,2CAA2C;WAC/E,uBAAuB;WACvB,mBAAmB;WACnB,uBAAuB;WACvB,kCAAkC"}
package/dist/target.d.mts CHANGED
@@ -18,7 +18,7 @@ import "./ddl-D_JWHRzo.mjs";
18
18
  import "./codec-ids-BQRXOwQR.mjs";
19
19
  import { a as FullTextIndexCandidate, c as FullTextSearchLanguage, d as fullTextIndexProblems, f as weightGroupsOf, i as FullTextFieldsInput, n as FULL_TEXT_INDEX_TYPE, o as FullTextIndexDefinition, r as FullTextColumnCodecs, s as FullTextIndexProblem, t as DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, u as describeFullTextIndexProblem } from "./full-text-index-definition-D5iBWLss-FifKlctQ.mjs";
20
20
  import { a as renderFullTextIndexDocument, i as quoteQualifiedName, n as qualifyName, o as validateEnumValueLength, r as quoteIdentifier, t as escapeLiteral } from "./sql-utils-B7LfCQCB.mjs";
21
- import { t as postgresAggregateDescriptors } from "./aggregates-B3lIBjGK.mjs";
21
+ import { t as postgresAggregateDescriptors } from "./aggregates-C2xqsGZ2.mjs";
22
22
  import { a as JsonValue$1, c as Time, d as TimestampString, f as Timestamptz, g as Varchar, h as VarBit, i as Interval, l as TimeString, m as Timetz, n as Char, o as Numeric, p as TimestamptzString, r as CodecTypes, s as ParameterizedOutputTypesForTypeParams, t as Bit, u as Timestamp } from "./codec-types-DX-72F9v-CORaQjWv.mjs";
23
23
  import "./codec-types-DoxsMXp7.mjs";
24
24
  import { A as noNullValuesAst, B as timestamptz, C as createTable, D as int4, E as indexExistsAst, F as tableExistsAst, H as toRegclass, I as tableIsEmptyAst, L as tablePrimaryKeyAst, M as rlsEnabledAst, N as rlsPolicyExistsAst, O as int8, P as sequenceNameAvailableAst, R as text, S as createSchema, T as extensionExistsAst, V as timestamptzJsDate, _ as columnDefaultSequenceAst, a as IndexExistsCheckBuilder, b as columnTypeAst, c as TableExistsCheckBuilder, d as addConstraintAction, f as alterColumnTypeAction, g as columnDefaultAst, h as buildSignMarkerBootstrapQueries, i as ExtensionExistsCheckBuilder, j as pgTable, k as jsonb, l as TablePrimaryKeyCheckBuilder, m as buildControlTableBootstrapQueries, n as ColumnExistsCheckBuilder, o as RlsEnabledCheckBuilder, p as alterTable, r as ConstraintExistsCheckBuilder, s as RlsPolicyExistsCheckBuilder, t as ColumnDefaultCheckBuilder, u as addColumnAction, v as columnExistsAst, w as dropDefaultAction, x as constraintExistsAst, y as columnNullabilityAst, z as textArray } from "./contract-free-D1JEZVpQ.mjs";
@@ -39,23 +39,23 @@ import { i as stackDataTypes, n as alterTypeCheck, r as qualifyTableName, t as C
39
39
  import { A as RenameColumnCall, C as DropNativeEnumTypeCall, D as EnableRowLevelSecurityCall, E as DropTableCall, F as SetDefaultCall, I as SetNotNullCall, M as RenameIndexCall, N as RenamePostgresRlsPolicyCall, P as RenameTableCall, S as DropIndexCall, T as DropPostgresRlsPolicyCall, _ 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, j as RenameConstraintCall, k as RawSqlCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddPrimaryKeyCall, p as CreatePostgresRlsPolicyCall, r as AddColumnWithTemporaryDefaultCall, s as AddRequiredColumnToEmptyTableCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNotNullCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-kdPO0kgG-DV8hS6qA.mjs";
40
40
  import { n as planIssues, t as coalesceSubtreeIssues } from "./issue-planner-DrWlNiAf.mjs";
41
41
  import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-BGBqXaQ4.mjs";
42
- import { t as PostgresContractView } from "./postgres-contract-view-2OP5JnXl-D2fpy4-8.mjs";
43
- import { t as PostgresMigration } from "./postgres-migration-CRLV93uK-ThJW3tFf.mjs";
44
- import { a as fn, c as placeholder, d as sql, f as unique, i as createExtension, l as primaryKey, n as checkExpression, o as foreignKey, r as col, s as lit, t as MigrationCLI, u as rawSql } from "./migration-DO23kNde.mjs";
42
+ import { t as PostgresContractView } from "./postgres-contract-view-BFzIDwwN-pJ6gJGOT.mjs";
43
+ import { t as PostgresMigration } from "./postgres-migration-Crcs_mmg-D1ZyiWtc.mjs";
44
+ import { a as fn, c as placeholder, d as sql, f as unique, i as createExtension, l as primaryKey, n as checkExpression, o as foreignKey, r as col, s as lit, t as MigrationCLI, u as rawSql } from "./migration-DST6YA2w.mjs";
45
45
  import { n as IntrospectedTypeText, r as introspectedTypeText, t as CatalogColumnType } from "./native-type-normalizer-DFE5L3YY.mjs";
46
46
  import "./op-factory-call-CijzNDaJ.mjs";
47
47
  import "./operation-types-ECV4mkfb.mjs";
48
48
  import "./pack-CcQNl-gj.mjs";
49
- import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-B6NsNaam-BmvloI2L.mjs";
50
- import { n as createPostgresMigrationPlanner, t as contractToPostgresDatabaseSchemaNode } from "./planner-B_MRApHM.mjs";
49
+ import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-BRjNXwjn-DhjS0Pbw.mjs";
50
+ import { n as createPostgresMigrationPlanner, t as contractToPostgresDatabaseSchemaNode } from "./planner-D3wWu7Kj.mjs";
51
51
  import { t as buildColumnTypeSql } from "./planner-ddl-builders-DbG9_uAk.mjs";
52
52
  import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./planner-identity-values-B-NAiN7I.mjs";
53
- import "./planner-produced-postgres-migration-BW8GJFjS.mjs";
53
+ import "./planner-produced-postgres-migration-CiHKwaE_.mjs";
54
54
  import { i as hasUniqueConstraint, n as hasForeignKey, r as hasIndex, t as buildSchemaLookupMap } from "./planner-schema-lookup-C4DHAddq.mjs";
55
55
  import "./planner-sql-checks-CB4oLSuZ.mjs";
56
56
  import { t as prisma7PostgresBinding } from "./prisma7-binding-C5RLV6kJ.mjs";
57
57
  import { t as renderOps } from "./render-ops-DPwhZt2W.mjs";
58
58
  import { t as renderCallsToTypeScript } from "./render-typescript-6sCFvMBh.mjs";
59
- import { n as PostgresListDecoder, r as PostgresRuntimeTargetInstance, t as PostgresContractSerializer } from "./runtime-1ioqDrqf.mjs";
59
+ import { n as PostgresListDecoder, r as PostgresRuntimeTargetInstance, t as PostgresContractSerializer } from "./runtime-BeTyqpCH.mjs";
60
60
  import { t as resolveDdlSchemaForNamespaceStorage } from "./schema-ir-annotations-DuuYh0gl.mjs";
61
61
  export { type AdaptedPostgresCodecDescriptor, AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddColumnWithTemporaryDefaultCall, AddConstraintAction, AddForeignKeyCall, AddNativeEnumValueCall, AddPrimaryKeyCall, AddRequiredColumnToEmptyTableCall, AddUniqueCall, AlterColumnTypeAction, AlterColumnTypeCall, type AlterTableActionVisitor, type AnyAlterTableAction, type AnyPostgresCodecDescriptor, type AnyPostgresDdlNode, Bit, type CatalogColumnType, Char, CodecTypes, type ColumnDefaultCheckBuilder, type ColumnExistsCheckBuilder, type ColumnTypeCheck, type ConstraintExistsCheckBuilder, type ContentHashParts, CreateExtensionCall, CreateIndexCall, type CreateIndexElements, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, DataTransformCall, type DataTransformClosure, type DataTransformOptions, type DdlIndexElements, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, type ExtensionExistsCheckBuilder, FULL_TEXT_INDEX_TYPE, type FullTextColumnCodecs, FullTextDocument, type FullTextDocumentColumn, type FullTextDocumentGroups, type FullTextFieldsInput, type FullTextHeadlineOptions, type FullTextIndexCandidate, type FullTextIndexDefinition, type FullTextIndexProblem, type FullTextIndexReference, type FullTextMatchesOptions, type FullTextRankOptions, type FullTextSearchLanguage, type IndexExistsCheckBuilder, Interval, type IntrospectedTypeText, type JsonValue$1 as JsonValue, MARKER_LOCK_KEY, MARKER_LOCK_SQL, PostgresMigration as Migration, MigrationCLI, Numeric, PG_BIT_CODEC_ID, PG_BOOL_CODEC_ID, PG_BYTEA_CODEC_ID, PG_CHAR_CODEC_ID, PG_DATE_STRING_CODEC_ID, PG_DATE_TEMPORAL_CODEC_ID, PG_ENUM_CODEC_ID, PG_FLOAT4_CODEC_ID, PG_FLOAT8_CODEC_ID, PG_FLOAT_CODEC_ID, PG_INET_CODEC_ID, PG_INT2_CODEC_ID, PG_INT4_CODEC_ID, PG_INT8_CODEC_ID, PG_INT8_NUMBER_CODEC_ID, PG_INTERVAL_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_TEXT_ARRAY_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_DATE_CODEC_ID, PG_TIMESTAMPTZ_STRING_CODEC_ID, PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, PG_TIMESTAMP_STRING_CODEC_ID, PG_TIMESTAMP_TEMPORAL_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_STRING_CODEC_ID, PG_TIME_TEMPORAL_CODEC_ID, PG_TSQUERY_CODEC_ID, PG_UNBOUNDED_INT_CODEC_ID, PG_UUID_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, POLICY_COMMAND_SQL, POLICY_OPERATION_PREDICATES, ParameterizedOutputTypesForTypeParams, type PgBitDescriptor, type PgBoolDescriptor, type PgCharDescriptor, type PgEnumCodec, type PgEnumDescriptor, type PgEnumParams, type PgFloat4Descriptor, type PgFloat8Descriptor, type PgFloatDescriptor, type PgInetDescriptor, type PgInt2Descriptor, type PgInt4Descriptor, type PgInt8Descriptor, type PgInt8NumberDescriptor, type PgIntDescriptor, type PgInterval, type PgIntervalDescriptor, type PgJsonDescriptor, type PgJsonbDescriptor, type PgNumericDescriptor, type PgTextDescriptor, PgTimestamptzDateCodec, PgTimestamptzDateDescriptor, type PgTimetzDescriptor, type PgUnboundedIntDescriptor, type PgUuidDescriptor, type PgVarbitDescriptor, type PgVarcharDescriptor, PostgresAlterIndexRename, PostgresAlterPolicyRename, PostgresAlterTable, type PostgresCheckExpressionCandidate, type PostgresCheckExpressionInput, type PostgresCheckKind, PostgresCodecDescriptor, type PostgresCodecDescriptorRegistry, type PostgresCodecOptions, type PostgresCodecRegistry, type PostgresColumnDefault, type PostgresContract, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, type PostgresDatabaseSchemaNodeInput, PostgresDdlNode, type PostgresDdlVisitor, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropType, type PostgresFullTextMethods, PostgresListDecoder, PostgresNamespaceSchemaNode, type PostgresNamespaceSchemaNodeInput, PostgresNativeEnum, type PostgresNativeEnumInput, PostgresNativeEnumSchemaNode, type PostgresNativeEnumSchemaNodeInput, type PostgresPlanTargetDetails, PostgresPolicySchemaNode, type PostgresPolicySchemaNodeInput, type PostgresReportedDefault, PostgresRlsEnablement, type PostgresRlsEnablementInput, PostgresRlsPolicy, type PostgresRlsPolicyInput, PostgresRole, type PostgresRoleInput, PostgresRoleSchemaNode, type PostgresRoleSchemaNodeInput, PostgresRuntimeTargetInstance, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, type PostgresTableSchemaNodeInput, PostgresTableSource, type PostgresTsqueryArgument, PostgresUnboundSchema, type QueryOperationTypes, type QueryOperationTypesForCodecs, RawSqlCall, RenameColumnCall, RenameConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, RenameTableCall, type RenderedRlsPolicyLiteral, type RlsEnabledCheckBuilder, type RlsPolicyExistsCheckBuilder, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, type SerializedRlsPolicy, SetDefaultCall, SetNotNullCall, type TableExistsCheckBuilder, type TablePrimaryKeyCheckBuilder, type TextArgument, Time, TimeString, Timestamp, TimestampString, Timestamptz, TimestamptzString, Timetz, type TsqueryArgument, type TsqueryExpression, type TsqueryParser, type TsqueryParserOptions, type TsqueryTag, TypeScriptRenderablePostgresMigration, VarBit, Varchar, addColumnAction, addConstraintAction, alterColumnTypeAction, alterTable, alterTypeCheck, assemblePostgresCodecRegistry, assemblePostgresCodecRegistryWithBuiltins, buildBuiltinIdentityValue, buildColumnTypeSql, buildControlTableBootstrapQueries, buildPostgresCodecDescriptorRegistry, buildPostgresPlanDiff, buildSchemaLookupMap, buildSignMarkerBootstrapQueries, checkExpression, coalesceSubtreeIssues, col, columnDefaultAst, columnDefaultSequenceAst, columnExistsAst, columnNullabilityAst, columnTypeAst, computeContentHash, constraintExistsAst, contractToPostgresDatabaseSchemaNode, createExtension, createPostgresBuiltinCodecLookup, createPostgresBuiltinDataTypeLookup, createPostgresCodecRegistryWithBuiltins, createPostgresMigrationPlanner, createSchema, createTable, dataTransform, decodePostgresListText, definePostgresCodecs, describeFullTextIndexProblem, dropDefaultAction, errorPostgresMigrationStackMissing, escapeLiteral, extensionExistsAst, fn, foreignKey, fullTextDocument, fullTextIndexProblems, hasForeignKey, hasIndex, hasUniqueConstraint, indexExistsAst, int4, int8, introspectedTypeText, isPgEnumParams, isPostgresCodecDescriptor, isPostgresSchema, jsonb, lit, noNullValuesAst, parsePostgresListText, pgBit, pgBitColumn, pgBitLengthParams, pgBool, pgBoolColumn, pgBytea, pgChar, pgCharColumn, pgCharacterLengthParams, pgDate, pgDateStoredText, pgEnum, pgEnumDescriptor, pgEnumParams, pgFloat4, pgFloat4Column, pgFloat8, pgFloat8Column, pgFloatColumn, pgInet, pgInetColumn, pgInt2, pgInt2Column, pgInt4, pgInt4Column, pgInt8, pgInt8Column, pgInt8NumberColumn, pgIntColumn, pgInterval, pgIntervalColumn, pgJson, pgJsonColumn, pgJsonb, pgJsonbColumn, pgNumeric, pgNumericColumn, pgNumericParams, pgPrecisionParams, pgTable, pgText, pgTextArray, pgTextColumn, pgTime, pgTimeStoredText, pgTimestamp, pgTimestampStoredText, pgTimestamptz, pgTimestamptzDateColumn, pgTimestamptzDateDescriptor, pgTimestamptzStoredText, pgTimetz, pgTimetzColumn, pgTimetzStoredText, pgTsquery, pgUnboundedIntColumn, pgUuid, pgUuidColumn, pgVarbit, pgVarbitColumn, pgVarchar, pgVarcharColumn, phrasetoTsquery, placeholder, plaintoTsquery, planIssues, policyInputFromSerialized, policyRoleList, postgresAggregateDescriptors, postgresCodec, postgresCodecDescriptorRegistry, postgresCodecRegistry, postgresCodecTraitsOf, postgresCreateNamespace, postgresDataTypeEntries, postgresDataTypes, postgresError, postgresNativeAuthoringTypes, postgresNowGeneratorControlDescriptors, postgresNowGenerators, postgresPslTypeConstructors, postgresRenderCheckExpressions, postgresResolveDefault, postgresScalarAuthoringTypes, primaryKey, prisma7PostgresBinding, qualifiedEnumName, qualifyName, qualifyTableName, quoteIdentifier, quoteQualifiedName, rawSql, readPostgresDefault, renderCallsToTypeScript, renderFullTextIndexDocument, renderOps, resolveDdlSchemaForNamespaceStorage, resolveIdentityValue, rlsEnabledAst, rlsPolicyExistsAst, sequenceNameAvailableAst, sql, stackDataTypes, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass, toTsquery, tsquery, unique, validateEnumValueLength, websearchToTsquery, weightGroupsOf };
package/dist/target.mjs CHANGED
@@ -34,13 +34,13 @@ import { t as PostgresMigration } from "./postgres-migration-BbXm1l5I-DDy8IgYB.m
34
34
  import { t as renderOps } from "./render-ops-MeXLgeOa-nL4PdJzz.mjs";
35
35
  import { t as renderCallsToTypeScript } from "./render-typescript-Dqp1Spgn-B128r1qw.mjs";
36
36
  import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-F9joIngl-C04yYu-i.mjs";
37
- import { t as createPostgresMigrationPlanner } from "./planner-C1czBCmI-C-x1Ip-_.mjs";
37
+ import { t as createPostgresMigrationPlanner } from "./planner-CE4YoVdA-BfwuVRuT.mjs";
38
38
  import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-DFc1Tfv5-QMJSzMIa.mjs";
39
- import { _ as postgresNativeAuthoringTypes, v as postgresPslTypeConstructors, y as postgresScalarAuthoringTypes } from "./type-constructors-CrNUrtwZ-dmWF-mtV.mjs";
39
+ import { _ as postgresNativeAuthoringTypes, v as postgresPslTypeConstructors, y as postgresScalarAuthoringTypes } from "./type-constructors-C4QD_3HB-Czhx8fAX.mjs";
40
40
  import { c as toTsquery, l as websearchToTsquery, n as fullTextDocument, o as phrasetoTsquery, s as plaintoTsquery, t as FullTextDocument } from "./full-text-parsers-CrMjTR2n-CHDNR_vE.mjs";
41
41
  import { t as tsquery } from "./full-text-CSMAiOYz.mjs";
42
42
  import { a as foreignKey, c as primaryKey, d as unique, i as fn, l as rawSql, n as checkExpression, o as lit, r as col, s as placeholder, t as MigrationCLI, u as sql } from "./migration-CbOh59ZJ.mjs";
43
43
  import { t as introspectedTypeText } from "./native-type-normalizer-a1XJSlk6.mjs";
44
44
  import { i as hasUniqueConstraint, n as hasForeignKey, r as hasIndex, t as buildSchemaLookupMap } from "./planner-schema-lookup-CdgWer9s.mjs";
45
- import { t as prisma7PostgresBinding } from "./prisma7-binding-CzO7rkpS.mjs";
45
+ import { t as prisma7PostgresBinding } from "./prisma7-binding-CS42flik.mjs";
46
46
  export { AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddColumnWithTemporaryDefaultCall, AddConstraintAction, AddForeignKeyCall, AddNativeEnumValueCall, AddPrimaryKeyCall, AddRequiredColumnToEmptyTableCall, AddUniqueCall, AlterColumnTypeAction, AlterColumnTypeCall, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, DataTransformCall, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropTableCall, EnableRowLevelSecurityCall, FULL_TEXT_INDEX_TYPE, FullTextDocument, MARKER_LOCK_KEY, MARKER_LOCK_SQL, PostgresMigration as Migration, MigrationCLI, PG_BIT_CODEC_ID, PG_BOOL_CODEC_ID, PG_BYTEA_CODEC_ID, PG_CHAR_CODEC_ID, PG_DATE_STRING_CODEC_ID, PG_DATE_TEMPORAL_CODEC_ID, PG_ENUM_CODEC_ID, PG_FLOAT4_CODEC_ID, PG_FLOAT8_CODEC_ID, PG_FLOAT_CODEC_ID, PG_INET_CODEC_ID, PG_INT2_CODEC_ID, PG_INT4_CODEC_ID, PG_INT8_CODEC_ID, PG_INT8_NUMBER_CODEC_ID, PG_INTERVAL_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_TEXT_ARRAY_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_DATE_CODEC_ID, PG_TIMESTAMPTZ_STRING_CODEC_ID, PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, PG_TIMESTAMP_STRING_CODEC_ID, PG_TIMESTAMP_TEMPORAL_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_STRING_CODEC_ID, PG_TIME_TEMPORAL_CODEC_ID, PG_TSQUERY_CODEC_ID, PG_UNBOUNDED_INT_CODEC_ID, PG_UUID_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, POLICY_COMMAND_SQL, POLICY_OPERATION_PREDICATES, PgTimestamptzDateCodec, PgTimestamptzDateDescriptor, PostgresAlterIndexRename, PostgresAlterPolicyRename, PostgresAlterTable, PostgresCodecDescriptor, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, PostgresDdlNode, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropType, PostgresNamespaceSchemaNode, PostgresNativeEnum, PostgresNativeEnumSchemaNode, PostgresPolicySchemaNode, PostgresRlsEnablement, PostgresRlsPolicy, PostgresRole, PostgresRoleSchemaNode, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, PostgresTableSource, PostgresUnboundSchema, RawSqlCall, RenameColumnCall, RenameConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, RenameTableCall, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SetDefaultCall, SetNotNullCall, TypeScriptRenderablePostgresMigration, addColumnAction, addConstraintAction, alterColumnTypeAction, alterTable, alterTypeCheck, assemblePostgresCodecRegistry, assemblePostgresCodecRegistryWithBuiltins, buildBuiltinIdentityValue, buildColumnTypeSql, buildControlTableBootstrapQueries, buildPostgresCodecDescriptorRegistry, buildPostgresPlanDiff, buildSchemaLookupMap, buildSignMarkerBootstrapQueries, checkExpression, coalesceSubtreeIssues, col, columnDefaultAst, columnDefaultSequenceAst, columnExistsAst, columnNullabilityAst, columnTypeAst, computeContentHash, constraintExistsAst, contractToPostgresDatabaseSchemaNode, createExtension, createPostgresBuiltinCodecLookup, createPostgresBuiltinDataTypeLookup, createPostgresCodecRegistryWithBuiltins, createPostgresMigrationPlanner, createSchema, createTable, dataTransform, decodePostgresListText, definePostgresCodecs, describeFullTextIndexProblem, dropDefaultAction, errorPostgresMigrationStackMissing, escapeLiteral, extensionExistsAst, fn, foreignKey, fullTextDocument, fullTextIndexProblems, hasForeignKey, hasIndex, hasUniqueConstraint, indexExistsAst, int4, int8, introspectedTypeText, isPgEnumParams, isPostgresCodecDescriptor, isPostgresSchema, jsonb, lit, noNullValuesAst, parsePostgresListText, pgBit, pgBitColumn, pgBitLengthParams, pgBool, pgBoolColumn, pgBytea, pgChar, pgCharColumn, pgCharacterLengthParams, pgDate, pgDateStoredText, pgEnum, pgEnumDescriptor, pgEnumParams, pgFloat4, pgFloat4Column, pgFloat8, pgFloat8Column, pgFloatColumn, pgInet, pgInetColumn, pgInt2, pgInt2Column, pgInt4, pgInt4Column, pgInt8, pgInt8Column, pgInt8NumberColumn, pgIntColumn, pgInterval, pgIntervalColumn, pgJson, pgJsonColumn, pgJsonb, pgJsonbColumn, pgNumeric, pgNumericColumn, pgNumericParams, pgPrecisionParams, pgTable, pgText, pgTextArray, pgTextColumn, pgTime, pgTimeStoredText, pgTimestamp, pgTimestampStoredText, pgTimestamptz, pgTimestamptzDateColumn, pgTimestamptzDateDescriptor, pgTimestamptzStoredText, pgTimetz, pgTimetzColumn, pgTimetzStoredText, pgTsquery, pgUnboundedIntColumn, pgUuid, pgUuidColumn, pgVarbit, pgVarbitColumn, pgVarchar, pgVarcharColumn, phrasetoTsquery, placeholder, plaintoTsquery, planIssues, policyInputFromSerialized, policyRoleList, postgresAggregateDescriptors, postgresCodec, postgresCodecDescriptorRegistry, postgresCodecRegistry, postgresCodecTraitsOf, postgresCreateNamespace, postgresDataTypeEntries, postgresDataTypes, postgresError, postgresNativeAuthoringTypes, postgresNowGeneratorControlDescriptors, postgresNowGenerators, postgresPslTypeConstructors, postgresRenderCheckExpressions, postgresResolveDefault, postgresScalarAuthoringTypes, primaryKey, prisma7PostgresBinding, qualifiedEnumName, qualifyName, qualifyTableName, quoteIdentifier, quoteQualifiedName, rawSql, readPostgresDefault, renderCallsToTypeScript, renderFullTextIndexDocument, renderOps, resolveDdlSchemaForNamespaceStorage, resolveIdentityValue, rlsEnabledAst, rlsPolicyExistsAst, sequenceNameAvailableAst, sql, stackDataTypes, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass, toTsquery, tsquery, unique, validateEnumValueLength, websearchToTsquery, weightGroupsOf };
@@ -1,2 +1,2 @@
1
- import { t as postgresAggregateDescriptors } from "./aggregates-B3lIBjGK.mjs";
1
+ import { t as postgresAggregateDescriptors } from "./aggregates-C2xqsGZ2.mjs";
2
2
  export { postgresAggregateDescriptors };
@@ -16,9 +16,9 @@ import { i as qualifyTableName } from "./planner-sql-checks-pkURMYMz-2QAIKyW-.mj
16
16
  import { r as diffPostgresSchema } from "./diff-database-schema-DyCIRT80-C1zMCmRx.mjs";
17
17
  import { t as PostgresContractSerializer } from "./postgres-contract-view-B-bLZB7o-zpuamDXT.mjs";
18
18
  import { o as postgresContractToSchema } from "./postgres-migration-BbXm1l5I-DDy8IgYB.mjs";
19
- import { t as createPostgresMigrationPlanner } from "./planner-C1czBCmI-C-x1Ip-_.mjs";
19
+ import { t as createPostgresMigrationPlanner } from "./planner-CE4YoVdA-BfwuVRuT.mjs";
20
20
  import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-DFc1Tfv5-QMJSzMIa.mjs";
21
- import { _ as postgresNativeAuthoringTypes, a as buildIndexAttribute, c as buildNativeEnumBlock, d as inferPostgresPslContract, f as namedArg, g as positionalArg, h as parseDefaultAttributeString, i as buildFullTextIndexAttribute, n as buildAttribute, o as buildMapAttribute, r as buildCheckAttribute, s as buildModelConstraintAttribute, t as SYNTHETIC_SPAN, v as postgresPslTypeConstructors, y as postgresScalarAuthoringTypes } from "./type-constructors-CrNUrtwZ-dmWF-mtV.mjs";
21
+ import { _ as postgresNativeAuthoringTypes, a as buildIndexAttribute, c as buildNativeEnumBlock, d as inferPostgresPslContract, f as namedArg, g as positionalArg, h as parseDefaultAttributeString, i as buildFullTextIndexAttribute, n as buildAttribute, o as buildMapAttribute, r as buildCheckAttribute, s as buildModelConstraintAttribute, t as SYNTHETIC_SPAN, v as postgresPslTypeConstructors, y as postgresScalarAuthoringTypes } from "./type-constructors-C4QD_3HB-Czhx8fAX.mjs";
22
22
  import { dataTypeParams, requiredParamKeys, validateCodecTypeParams } from "@prisma/orm-framework/components/codec";
23
23
  import { blindCast } from "@prisma/orm-framework/utils/casts";
24
24
  import { isSqlDataType, unquotedSqlBaseName } from "@prisma/orm-family-sql/contract/data-type";
@@ -36,9 +36,9 @@ import { printSqlExpressionLiteral, sqlTextsReadBack } from "@prisma/orm-family-
36
36
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
37
37
  import { notOk, ok, okVoid } from "@prisma/orm-framework/utils/result";
38
38
  import { SqlSchemaVerifierBase } from "@prisma/orm-family-sql/family/ir";
39
+ import { effectiveControlPolicy } from "@prisma/orm-framework/contract/types";
39
40
  import { defaultFunctionCallFor, fieldPresetCallFor, inferredTypeConstructors, mapDefault, pslTypeArgumentText } from "@prisma/orm-family-sql/family/psl-build";
40
41
  import { UNBOUND_PSL_NAMESPACE_NAME, UNSPECIFIED_PSL_NAMESPACE_ID, makePslNamespace, makePslNamespaceEntries } from "@prisma/orm-framework/components/psl-ast";
41
- import { effectiveControlPolicy } from "@prisma/orm-framework/contract/types";
42
42
  import { Temporal } from "temporal-polyfill/full/implementation";
43
43
  import { SqlQueryError } from "@prisma/orm-family-sql/errors";
44
44
  import { canonicalizeJson } from "@prisma/orm-framework/components/utils";