@prisma/orm-target-sqlite 8.0.0-rc.1-dev.11 → 8.0.0-rc.1-dev.13

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 (38) hide show
  1. package/dist/{adapter-C8clzDxQ-Bu3XOcDJ.mjs → adapter-NeO612zv-B705D3Z8.mjs} +8 -5
  2. package/dist/adapter-NeO612zv-B705D3Z8.mjs.map +1 -0
  3. package/dist/adapter.mjs +1 -1
  4. package/dist/adapter__adapter.mjs +1 -1
  5. package/dist/adapter__control.mjs +2 -2
  6. package/dist/adapter__control.mjs.map +1 -1
  7. package/dist/adapter__runtime.mjs +3 -3
  8. package/dist/adapter__runtime.mjs.map +1 -1
  9. package/dist/adapter__sql-renderer.mjs +1 -1
  10. package/dist/{aggregates-Cy5ovVZD.mjs → aggregates-DWyPO7t6.mjs} +39 -8
  11. package/dist/aggregates-DWyPO7t6.mjs.map +1 -0
  12. package/dist/{codecs-d_xAsfTz.mjs → codecs-TyM6tD3U.mjs} +63 -5
  13. package/dist/codecs-TyM6tD3U.mjs.map +1 -0
  14. package/dist/{descriptor-meta-DjKgG4z5-DYuZ-AXi.mjs → descriptor-meta-DjKgG4z5-BAKSkr1j.mjs} +3 -3
  15. package/dist/{descriptor-meta-DjKgG4z5-DYuZ-AXi.mjs.map → descriptor-meta-DjKgG4z5-BAKSkr1j.mjs.map} +1 -1
  16. package/dist/{migration-DWP33-2M.mjs → migration-BX7YeaQT.mjs} +2 -2
  17. package/dist/{migration-DWP33-2M.mjs.map → migration-BX7YeaQT.mjs.map} +1 -1
  18. package/dist/{op-factory-call-BCDGjXmK-D_Q47Yko.mjs → op-factory-call-CsNFRTPS-HuMdWaBX.mjs} +3 -3
  19. package/dist/{op-factory-call-BCDGjXmK-D_Q47Yko.mjs.map → op-factory-call-CsNFRTPS-HuMdWaBX.mjs.map} +1 -1
  20. package/dist/{planner-B9A1yTAH-NXeVipfr.mjs → planner-DuW2pz1t-DFhIqgV2.mjs} +5 -5
  21. package/dist/{planner-B9A1yTAH-NXeVipfr.mjs.map → planner-DuW2pz1t-DFhIqgV2.mjs.map} +1 -1
  22. package/dist/{planner-produced-sqlite-migration-BRxGeP57-Ban7mFdH.mjs → planner-produced-sqlite-migration-DB3xleco-C1ncLSxE.mjs} +3 -3
  23. package/dist/{planner-produced-sqlite-migration-BRxGeP57-Ban7mFdH.mjs.map → planner-produced-sqlite-migration-DB3xleco-C1ncLSxE.mjs.map} +1 -1
  24. package/dist/{sqlite-migration-DWl9RerP-X0sf9N80.mjs → sqlite-migration-MGxXxUB4-zfSNsC-a.mjs} +3 -3
  25. package/dist/{sqlite-migration-DWl9RerP-X0sf9N80.mjs.map → sqlite-migration-MGxXxUB4-zfSNsC-a.mjs.map} +1 -1
  26. package/dist/target.mjs +7 -7
  27. package/dist/target__aggregates.mjs +1 -1
  28. package/dist/target__codecs.mjs +1 -1
  29. package/dist/target__control.mjs +2 -2
  30. package/dist/target__control.mjs.map +1 -1
  31. package/dist/target__migration.mjs +2 -2
  32. package/dist/target__op-factory-call.mjs +1 -1
  33. package/dist/target__planner-produced-sqlite-migration.mjs +1 -1
  34. package/dist/target__planner.mjs +1 -1
  35. package/package.json +9 -9
  36. package/dist/adapter-C8clzDxQ-Bu3XOcDJ.mjs.map +0 -1
  37. package/dist/aggregates-Cy5ovVZD.mjs.map +0 -1
  38. package/dist/codecs-d_xAsfTz.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codecs-TyM6tD3U.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/codecs.mjs"],"sourcesContent":["import { a as SQLITE_INTEGER_CODEC_ID, c as SQLITE_TEXT_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, n as SQLITE_BIGINT_NUMBER_CODEC_ID, o as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_REAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID } from \"./codec-ids-KMliSCRp.mjs\";\nimport { a as sqliteCodec, n as buildSqliteCodecDescriptorRegistry, r as defineSqliteCodecs, t as SqliteCodecDescriptor } from \"./codec-descriptor-B9ru99aI.mjs\";\nimport { n as sqliteError } from \"./errors-CKsaaSnD.mjs\";\nimport { CaseExpr, CastExpr, FunctionCallExpr, LiteralExpr, NullCheckExpr, sqlCharDescriptor, sqlFloatDescriptor, sqlIntDescriptor, sqlVarcharDescriptor } from \"@internal/sql-relational-core/ast\";\nimport { CodecImpl, column, renderTsLiteral, voidParamsSchema } from \"@internal/framework-components/codec\";\nimport { buildCodecDescriptorRegistry } from \"@internal/sql-relational-core/codec-descriptor-registry\";\n//#region src/core/codecs.ts\n/**\n* Projects the expression unchanged, for codecs whose canonical JSON is what\n* SQLite's own JSON conversion already produces.\n*\n* Identity here is a claim about the target's behaviour, not an absence of one:\n* the codec's conformance cases are what test it, including at the boundaries\n* of the representation where a native conversion would be most likely to\n* diverge.\n*/\nconst identityJsonProjection = (expression) => expression;\n/**\n* Projects an integer-valued expression as decimal text.\n*\n* The cast is part of the projected expression, so it applies before the JSON\n* constructor sees the value: handed an INTEGER directly, the constructor emits\n* a JSON number, and SQLite's 64-bit range does not survive being read back as\n* a double. Casting the constructor's result would be too late.\n*/\nconst decimalTextJsonProjection = (expression) => CastExpr.as(expression, \"TEXT\");\n/**\n* Projects an integer-valued expression as a JSON number.\n*\n* The JSON constructor renders whatever it is handed, so the canonical form\n* depends on the storage class the expression carries — and an aggregate whose\n* result this codec reads arrives here already cast to text, the form that\n* keeps a wide integer off the driver's numeric reads. The cast returns the\n* value to the INTEGER class, where the constructor emits its digits; over a\n* stored INTEGER it changes nothing.\n*\n* Digits past the safe integer range survive into the JSON text, so a value\n* that cannot be a `number` rounds in `JSON.parse` and the codec's own guard\n* refuses it rather than answering with the value that lost them.\n*/\nconst integerJsonProjection = (expression) => CastExpr.as(expression, \"INTEGER\");\n/**\n* Projects a BLOB as hexadecimal text.\n*\n* SQLite's JSON functions reject a BLOB argument outright, so the encoding has\n* to replace the native conversion rather than post-process it. `hex()` emits\n* uppercase and never wraps at any length, which is the spelling `encodeJson`\n* pins.\n*\n* `hex(NULL)` is `''` rather than NULL, and `''` is the hex of an empty blob —\n* so without the NULL check an absent blob and an empty one would both project\n* as `''`, and `decodeJson` accepts `''` because zero hex pairs is a valid\n* empty blob. The check keeps the two distinguishable.\n*/\nconst hexJsonProjection = (expression) => CaseExpr.of([{\n\tcondition: NullCheckExpr.isNull(expression),\n\tvalue: LiteralExpr.of(null)\n}], FunctionCallExpr.of(\"hex\", [expression]));\nconst JSON_RETAG_FN = \"json\";\n/**\n* Re-applies SQLite's JSON subtype to a document-valued expression.\n*\n* SQLite carries \"this text is JSON\" as a subtype on the value rather than in\n* its type, and the subtype does not survive a derived table: a document that\n* `json_object` produced arrives one level out as plain text, so the enclosing\n* constructor embeds it as a *string containing JSON* rather than as a\n* document. `json()` re-applies the subtype, which is what makes the value nest\n* as a document again.\n*\n* The loss happens at the first derived-table boundary and does not compound, so\n* a retag is needed where the document is consumed rather than at every level it\n* passes through.\n*\n* Applying this twice is a no-op — SQLite's `json()` is idempotent, and the\n* wrapper collapses rather than nesting so the rendered SQL says so too. It is\n* safe on any valid JSON text, including scalars, and on NULL; it raises\n* `malformed JSON` on text that is not JSON, which is the correct failure for a\n* value that was never a document.\n*/\nconst jsonDocumentRetag = (expression) => isJsonRetag(expression) ? expression : FunctionCallExpr.of(JSON_RETAG_FN, [expression]);\n/** Whether an expression is already a retag, so applying one again would only nest. */\nconst isJsonRetag = (expression) => expression instanceof FunctionCallExpr && expression.fn === JSON_RETAG_FN && expression.args.length === 1;\nconst DECIMAL_INTEGER = /^-?\\d+$/;\nconst UPPERCASE_HEX = /^(?:[0-9A-F]{2})*$/;\n/**\n* JSON has no spelling for an infinity or a NaN, and SQLite renders one as\n* `9.0e+999`, which reads back as `Infinity` rather than failing. A real is\n* therefore carried only where it is finite.\n*/\nconst finiteReal = (value, code) => {\n\tif (!Number.isFinite(value)) throw sqliteError(code, \"sqlite/real@1 value must be a finite number\", { meta: {\n\t\tcodecId: SQLITE_REAL_CODEC_ID,\n\t\treceived: String(value)\n\t} });\n\treturn value;\n};\nconst MIN_SAFE_INTEGER_BIGINT = BigInt(Number.MIN_SAFE_INTEGER);\nconst MAX_SAFE_INTEGER_BIGINT = BigInt(Number.MAX_SAFE_INTEGER);\n/**\n* Requires an application value to be of the JS type the codec reads.\n*\n* A range check reads a value of the wrong type as a value out of range, and\n* reports a number plainly inside the range as outside it — so the type is\n* established first and answered for on its own terms, naming what a caller\n* has to change.\n*/\nconst requireJsType = (codecId, expected, value) => {\n\tif (typeof value === expected) return;\n\tthrow sqliteError(\"RUNTIME.ENCODE_FAILED\", `${codecId} value must be a ${expected}, got ${typeof value} ${String(value)}`, { meta: {\n\t\tcodecId,\n\t\treceived: typeof value\n\t} });\n};\n/**\n* Writes an application value as the decimal text `sqlite/bigint@1` carries as\n* its canonical JSON.\n*\n* A schema-written literal default (`BigInt @default(0)`) arrives here as a\n* `number`, since a number literal is the only integer a schema language\n* writes, and one that is a safe integer names its value exactly. Past that\n* range the literal was rounded before any of this ran, so the value written is\n* not the value meant — which this refuses rather than minting an exact-looking\n* value from it. A non-integral number is refused on the same terms.\n*/\nconst bigintEncodeJson = (codecId, value) => {\n\tif (typeof value !== \"number\") {\n\t\trequireJsType(codecId, \"bigint\", value);\n\t\treturn value.toString();\n\t}\n\tif (!Number.isSafeInteger(value)) throw sqliteError(\"RUNTIME.ENCODE_FAILED\", `${codecId} number literal must be an integer within the safe integer range, got ${String(value)}`, { meta: {\n\t\tcodecId,\n\t\treceived: String(value)\n\t} });\n\treturn BigInt(value).toString();\n};\n/**\n* Requires an integer within ±(2^53 − 1), the range a JS `number` holds\n* exactly. The guard throws rather than rounding: past the boundary a `number`\n* silently loses digits, which is the failure mode this codec exists to refuse.\n*/\nconst safeIntegerNumber = (value, code) => {\n\tif (!Number.isSafeInteger(value)) throw sqliteError(code, `sqlite/bigintnumber@1 value must be an integer within the safe integer range, got ${String(value)}`, { meta: {\n\t\tcodecId: SQLITE_BIGINT_NUMBER_CODEC_ID,\n\t\treceived: String(value)\n\t} });\n\tif (Object.is(value, -0)) return 0;\n\treturn value;\n};\n/** The application value the number-flavoured integer codec writes: the JS type it reads, within the range that type holds exactly. */\nconst encodableSafeInteger = (value) => {\n\trequireJsType(SQLITE_BIGINT_NUMBER_CODEC_ID, \"number\", value);\n\treturn safeIntegerNumber(value, \"RUNTIME.ENCODE_FAILED\");\n};\n/**\n* Converts an exact `bigint` into a safe-range `number`, comparing before any\n* conversion so an out-of-range value throws rather than rounds.\n*/\nconst safeIntegerFromBigint = (value) => {\n\tif (value < MIN_SAFE_INTEGER_BIGINT || value > MAX_SAFE_INTEGER_BIGINT) throw sqliteError(\"RUNTIME.DECODE_FAILED\", `sqlite/bigintnumber@1 value must be an integer within the safe integer range, got ${value}`, { meta: {\n\t\tcodecId: SQLITE_BIGINT_NUMBER_CODEC_ID,\n\t\treceived: value.toString()\n\t} });\n\treturn Number(value);\n};\nconst sqliteSqlCharDescriptor = sqliteCodec(sqlCharDescriptor, { jsonProjection: identityJsonProjection });\nconst sqliteSqlVarcharDescriptor = sqliteCodec(sqlVarcharDescriptor, { jsonProjection: identityJsonProjection });\nconst sqliteSqlIntDescriptor = sqliteCodec(sqlIntDescriptor, { jsonProjection: identityJsonProjection });\nconst sqliteSqlFloatDescriptor = sqliteCodec(sqlFloatDescriptor, { jsonProjection: identityJsonProjection });\nvar SqliteTextCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn json;\n\t}\n};\nvar SqliteTextDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tcodecId = SQLITE_TEXT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"textual\"\n\t];\n\ttargetTypes = [\"text\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteTextCodec(this);\n\t}\n};\nconst sqliteTextDescriptor = new SqliteTextDescriptor();\nconst sqliteTextColumn = () => column(sqliteTextDescriptor.factory(), sqliteTextDescriptor.codecId, void 0, \"text\");\nvar SqliteIntegerCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn json;\n\t}\n};\nvar SqliteIntegerDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tcodecId = SQLITE_INTEGER_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\ttargetTypes = [\"integer\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteIntegerCodec(this);\n\t}\n};\nconst sqliteIntegerDescriptor = new SqliteIntegerDescriptor();\nconst sqliteIntegerColumn = () => column(sqliteIntegerDescriptor.factory(), sqliteIntegerDescriptor.codecId, void 0, \"integer\");\nvar SqliteRealCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn finiteReal(value, \"RUNTIME.ENCODE_FAILED\");\n\t}\n\tdecodeJson(json) {\n\t\tif (typeof json !== \"number\") throw sqliteError(\"RUNTIME.DECODE_FAILED\", \"sqlite/real@1 database JSON value must be a number\", { meta: {\n\t\t\tcodecId: SQLITE_REAL_CODEC_ID,\n\t\t\treceived: typeof json\n\t\t} });\n\t\treturn finiteReal(json, \"RUNTIME.DECODE_FAILED\");\n\t}\n};\nvar SqliteRealDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tcodecId = SQLITE_REAL_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\ttargetTypes = [\"real\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteRealCodec(this);\n\t}\n};\nconst sqliteRealDescriptor = new SqliteRealDescriptor();\nconst sqliteRealColumn = () => column(sqliteRealDescriptor.factory(), sqliteRealDescriptor.codecId, void 0, \"real\");\nvar SqliteBlobCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn value;\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn wire;\n\t}\n\tencodeJson(value) {\n\t\treturn Buffer.from(value).toString(\"hex\").toUpperCase();\n\t}\n\tdecodeJson(json) {\n\t\tif (typeof json !== \"string\" || !UPPERCASE_HEX.test(json)) throw sqliteError(\"RUNTIME.DECODE_FAILED\", \"sqlite/blob@1 database JSON value must be uppercase hexadecimal text\", { meta: {\n\t\t\tcodecId: SQLITE_BLOB_CODEC_ID,\n\t\t\treceived: typeof json\n\t\t} });\n\t\treturn new Uint8Array(Buffer.from(json, \"hex\"));\n\t}\n};\nvar SqliteBlobDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn hexJsonProjection(expression);\n\t}\n\tcodecId = SQLITE_BLOB_CODEC_ID;\n\ttraits = [\"equality\"];\n\ttargetTypes = [\"blob\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteBlobCodec(this);\n\t}\n};\nconst sqliteBlobDescriptor = new SqliteBlobDescriptor();\nconst sqliteBlobColumn = () => column(sqliteBlobDescriptor.factory(), sqliteBlobDescriptor.codecId, void 0, \"blob\");\nvar SqliteDatetimeCodec = class extends CodecImpl {\n\tparseDate(value) {\n\t\tconst date = new Date(value);\n\t\tif (Number.isNaN(date.getTime())) throw sqliteError(\"RUNTIME.DECODE_FAILED\", `sqlite/datetime@1 value must be a valid ISO-8601 string: ${value}`, { meta: {\n\t\t\tcodecId: SQLITE_DATETIME_CODEC_ID,\n\t\t\treceived: value\n\t\t} });\n\t\treturn date;\n\t}\n\tasync encode(value, _ctx) {\n\t\treturn value.toISOString();\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn this.parseDate(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn value.toISOString();\n\t}\n\tdecodeJson(json) {\n\t\tif (typeof json !== \"string\") throw sqliteError(\"RUNTIME.DECODE_FAILED\", \"sqlite/datetime@1 contract value must be an ISO-8601 string\", { meta: {\n\t\t\tcodecId: SQLITE_DATETIME_CODEC_ID,\n\t\t\treceived: typeof json\n\t\t} });\n\t\treturn this.parseDate(json);\n\t}\n};\nvar SqliteDatetimeDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn expression;\n\t}\n\tcodecId = SQLITE_DATETIME_CODEC_ID;\n\ttraits = [\"equality\", \"order\"];\n\ttargetTypes = [\"text\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteDatetimeCodec(this);\n\t}\n};\nconst sqliteDatetimeDescriptor = new SqliteDatetimeDescriptor();\nconst sqliteDatetimeColumn = () => column(sqliteDatetimeDescriptor.factory(), sqliteDatetimeDescriptor.codecId, void 0, \"text\");\nvar SqliteJsonCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn JSON.stringify(value);\n\t}\n\tasync decode(wire, _ctx) {\n\t\treturn typeof wire === \"string\" ? JSON.parse(wire) : wire;\n\t}\n\tencodeJson(value) {\n\t\treturn value;\n\t}\n\tdecodeJson(json) {\n\t\treturn json;\n\t}\n};\nvar SqliteJsonDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn jsonDocumentRetag(expression);\n\t}\n\tcodecId = SQLITE_JSON_CODEC_ID;\n\ttraits = [\"equality\"];\n\ttargetTypes = [\"text\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteJsonCodec(this);\n\t}\n};\nconst sqliteJsonDescriptor = new SqliteJsonDescriptor();\nconst sqliteJsonColumn = () => column(sqliteJsonDescriptor.factory(), sqliteJsonDescriptor.codecId, void 0, \"text\");\nvar SqliteBigintCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\trequireJsType(SQLITE_BIGINT_CODEC_ID, \"bigint\", value);\n\t\treturn value;\n\t}\n\t/**\n\t* The wire value is text wherever the value could outrun a JS number: an\n\t* aggregate SQLite computes leaves the database through the descriptor's cast\n\t* to text, because the driver reads an integer no number can hold as an error\n\t* rather than a value. A number-typed wire value must therefore be a safe\n\t* integer — past ±(2^53 − 1) it has already rounded, and converting it would\n\t* mint a spuriously-exact `bigint` that need not equal the stored value.\n\t*/\n\tasync decode(wire, _ctx) {\n\t\tif (typeof wire === \"number\" && !Number.isSafeInteger(wire)) throw sqliteError(\"RUNTIME.DECODE_FAILED\", `sqlite/bigint@1 wire number must be an integer within the safe integer range, got ${String(wire)}`, { meta: {\n\t\t\tcodecId: SQLITE_BIGINT_CODEC_ID,\n\t\t\treceived: String(wire)\n\t\t} });\n\t\tif (typeof wire === \"string\" && !DECIMAL_INTEGER.test(wire)) throw sqliteError(\"RUNTIME.DECODE_FAILED\", \"sqlite/bigint@1 wire value must be a decimal string\", { meta: {\n\t\t\tcodecId: SQLITE_BIGINT_CODEC_ID,\n\t\t\treceived: wire\n\t\t} });\n\t\treturn BigInt(wire);\n\t}\n\tencodeJson(value) {\n\t\treturn bigintEncodeJson(SQLITE_BIGINT_CODEC_ID, value);\n\t}\n\tdecodeJson(json) {\n\t\tif (typeof json !== \"string\" || !DECIMAL_INTEGER.test(json)) throw sqliteError(\"RUNTIME.DECODE_FAILED\", \"sqlite/bigint@1 database JSON value must be a decimal string\", { meta: {\n\t\t\tcodecId: SQLITE_BIGINT_CODEC_ID,\n\t\t\treceived: typeof json\n\t\t} });\n\t\treturn BigInt(json);\n\t}\n};\nvar SqliteBigintDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn decimalTextJsonProjection(expression);\n\t}\n\tcodecId = SQLITE_BIGINT_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\ttargetTypes = [\"integer\"];\n\tparamsSchema = voidParamsSchema;\n\tfactory() {\n\t\treturn () => new SqliteBigintCodec(this);\n\t}\n};\nconst sqliteBigintDescriptor = new SqliteBigintDescriptor();\nconst sqliteBigintColumn = () => column(sqliteBigintDescriptor.factory(), sqliteBigintDescriptor.codecId, void 0, \"integer\");\n/**\n* A SQLite INTEGER decoded as a JS `number`, for columns whose values stay\n* within the safe integer range ±(2^53 − 1). Both directions guard rather than\n* round: decode (wire and JSON) and encode throw a structured error on\n* out-of-range or non-integral input. The canonical JSON is a JSON number —\n* the deliberate exception to the decimal-text rule for 64-bit integers, and\n* the codec's purpose. The descriptor claims no target type, so `integer` in\n* type position keeps its current codecs.\n*/\nvar SqliteBigintNumberCodec = class extends CodecImpl {\n\tasync encode(value, _ctx) {\n\t\treturn encodableSafeInteger(value);\n\t}\n\t/**\n\t* The driver hands an INTEGER over as a `number` or, in safe-integer mode, a\n\t* `bigint`; a bigint (or decimal text) is range-checked exactly before any\n\t* conversion to `number`, so an out-of-range value throws rather than rounds.\n\t*/\n\tasync decode(wire, _ctx) {\n\t\tif (typeof wire === \"number\") return safeIntegerNumber(wire, \"RUNTIME.DECODE_FAILED\");\n\t\tif (typeof wire === \"string\" && !DECIMAL_INTEGER.test(wire)) throw sqliteError(\"RUNTIME.DECODE_FAILED\", \"sqlite/bigintnumber@1 wire value must be a decimal string\", { meta: {\n\t\t\tcodecId: SQLITE_BIGINT_NUMBER_CODEC_ID,\n\t\t\treceived: wire\n\t\t} });\n\t\treturn safeIntegerFromBigint(BigInt(wire));\n\t}\n\tencodeJson(value) {\n\t\treturn encodableSafeInteger(value);\n\t}\n\tdecodeJson(json) {\n\t\tif (typeof json !== \"number\") throw sqliteError(\"RUNTIME.DECODE_FAILED\", \"sqlite/bigintnumber@1 database JSON value must be a number\", { meta: {\n\t\t\tcodecId: SQLITE_BIGINT_NUMBER_CODEC_ID,\n\t\t\treceived: typeof json\n\t\t} });\n\t\treturn safeIntegerNumber(json, \"RUNTIME.DECODE_FAILED\");\n\t}\n};\nvar SqliteBigintNumberDescriptor = class extends SqliteCodecDescriptor {\n\tjsonProjection(expression) {\n\t\treturn integerJsonProjection(expression);\n\t}\n\tcodecId = SQLITE_BIGINT_NUMBER_CODEC_ID;\n\ttraits = [\n\t\t\"equality\",\n\t\t\"order\",\n\t\t\"numeric\"\n\t];\n\ttargetTypes = [];\n\tparamsSchema = voidParamsSchema;\n\trenderValueLiteral(value) {\n\t\treturn renderTsLiteral(value);\n\t}\n\tfactory() {\n\t\treturn () => new SqliteBigintNumberCodec(this);\n\t}\n};\nconst sqliteBigintNumberDescriptor = new SqliteBigintNumberDescriptor();\nconst sqliteBigintNumberColumn = () => column(sqliteBigintNumberDescriptor.factory(), sqliteBigintNumberDescriptor.codecId, void 0, \"integer\");\nconst codecDescriptors = defineSqliteCodecs([\n\tsqliteSqlCharDescriptor,\n\tsqliteSqlVarcharDescriptor,\n\tsqliteSqlIntDescriptor,\n\tsqliteSqlFloatDescriptor,\n\tsqliteTextDescriptor,\n\tsqliteIntegerDescriptor,\n\tsqliteRealDescriptor,\n\tsqliteBlobDescriptor,\n\tsqliteDatetimeDescriptor,\n\tsqliteJsonDescriptor,\n\tsqliteBigintDescriptor,\n\tsqliteBigintNumberDescriptor\n]);\n//#endregion\n//#region src/core/registry.ts\n/**\n* Registry of every codec descriptor shipped by `@internal/target-sqlite`.\n*\n* Public consumer surface for the sqlite codec set: the sqlite adapter and any other consumer that needs to enumerate or look up a sqlite codec by id consumes this rather than the raw descriptor array. See ADR 208.\n*/\nconst sqliteCodecRegistry = buildCodecDescriptorRegistry(codecDescriptors);\nconst sqliteCodecDescriptorRegistry = buildSqliteCodecDescriptorRegistry(codecDescriptors);\n//#endregion\nexport { jsonDocumentRetag, sqliteBigintColumn, sqliteBigintNumberColumn, sqliteBlobColumn, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteDatetimeColumn, sqliteIntegerColumn, sqliteJsonColumn, sqliteRealColumn, sqliteTextColumn };\n\n//# sourceMappingURL=codecs.mjs.map"],"mappings":";;;;;;;;;;;;;;;;AAgBA,MAAM,0BAA0B,eAAe;;;;;;;;;AAS/C,MAAM,6BAA6B,eAAe,SAAS,GAAG,YAAY,MAAM;;;;;;;;;;;;;;;AAehF,MAAM,yBAAyB,eAAe,SAAS,GAAG,YAAY,SAAS;;;;;;;;;;;;;;AAc/E,MAAM,qBAAqB,eAAe,SAAS,GAAG,CAAC;CACtD,WAAW,cAAc,OAAO,UAAU;CAC1C,OAAO,YAAY,GAAG,IAAI;AAC3B,CAAC,GAAG,iBAAiB,GAAG,OAAO,CAAC,UAAU,CAAC,CAAC;AAC5C,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;AAqBtB,MAAM,qBAAqB,eAAe,YAAY,UAAU,IAAI,aAAa,iBAAiB,GAAG,eAAe,CAAC,UAAU,CAAC;;AAEhI,MAAM,eAAe,eAAe,sBAAsB,oBAAoB,WAAW,OAAO,iBAAiB,WAAW,KAAK,WAAW;AAC5I,MAAM,kBAAkB;AACxB,MAAM,gBAAgB;;;;;;AAMtB,MAAM,cAAc,OAAO,SAAS;CACnC,IAAI,CAAC,OAAO,SAAS,KAAK,GAAG,MAAM,YAAY,MAAM,+CAA+C,EAAE,MAAM;EAC3G,SAAS;EACT,UAAU,OAAO,KAAK;CACvB,EAAE,CAAC;CACH,OAAO;AACR;AACA,MAAM,0BAA0B,OAAO,OAAO,gBAAgB;AAC9D,MAAM,0BAA0B,OAAO,OAAO,gBAAgB;;;;;;;;;AAS9D,MAAM,iBAAiB,SAAS,UAAU,UAAU;CACnD,IAAI,OAAO,UAAU,UAAU;CAC/B,MAAM,YAAY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ACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACD,CAAC;;;;;;AAQD,MAAM,sBAAsB,6BAA6B,gBAAgB;AACzE,MAAM,gCAAgC,mCAAmC,gBAAgB"}
@@ -1,5 +1,5 @@
1
- import { t as sqliteAggregateDescriptors } from "./aggregates-Cy5ovVZD.mjs";
2
- import { o as sqliteCodecRegistry } from "./codecs-d_xAsfTz.mjs";
1
+ import { t as sqliteAggregateDescriptors } from "./aggregates-DWyPO7t6.mjs";
2
+ import { o as sqliteCodecRegistry } from "./codecs-TyM6tD3U.mjs";
3
3
  //#region ../../../3-targets/6-adapters/sqlite/dist/descriptor-meta-DjKgG4z5.mjs
4
4
  const sqliteAdapterDescriptorMeta = {
5
5
  kind: "adapter",
@@ -31,4 +31,4 @@ const sqliteAdapterDescriptorMeta = {
31
31
  //#endregion
32
32
  export { sqliteAdapterDescriptorMeta as t };
33
33
 
34
- //# sourceMappingURL=descriptor-meta-DjKgG4z5-DYuZ-AXi.mjs.map
34
+ //# sourceMappingURL=descriptor-meta-DjKgG4z5-BAKSkr1j.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"descriptor-meta-DjKgG4z5-DYuZ-AXi.mjs","names":[],"sources":["../../../../3-targets/6-adapters/sqlite/dist/descriptor-meta-DjKgG4z5.mjs"],"sourcesContent":["import { sqliteCodecRegistry } from \"@internal/target-sqlite/codecs\";\nimport { sqliteAggregateDescriptors } from \"@internal/target-sqlite/aggregates\";\nconst sqliteAdapterDescriptorMeta = {\n\tkind: \"adapter\",\n\tfamilyId: \"sql\",\n\ttargetId: \"sqlite\",\n\tid: \"sqlite\",\n\tversion: \"0.0.1\",\n\tcapabilities: { sql: {\n\t\torderBy: true,\n\t\tlimit: true,\n\t\tlateral: false,\n\t\tjsonAgg: true,\n\t\treturning: true,\n\t\tforeignKeys: true,\n\t\tenums: false\n\t} },\n\ttypes: {\n\t\taggregateDescriptors: sqliteAggregateDescriptors,\n\t\tcodecTypes: {\n\t\t\tcodecDescriptors: Array.from(sqliteCodecRegistry.values()).filter((d) => d.renderOutputType === void 0),\n\t\t\timport: {\n\t\t\t\tpackage: \"@internal/adapter-sqlite/codec-types\",\n\t\t\t\tnamed: \"CodecTypes\",\n\t\t\t\talias: \"SqliteTypes\"\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\nexport { sqliteAdapterDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-DjKgG4z5.mjs.map"],"mappings":";;;AAEA,MAAM,8BAA8B;CACnC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,EAAE,KAAK;EACpB,SAAS;EACT,OAAO;EACP,SAAS;EACT,SAAS;EACT,WAAW;EACX,aAAa;EACb,OAAO;CACR,EAAE;CACF,OAAO;EACN,sBAAsB;EACtB,YAAY;GACX,kBAAkB,MAAM,KAAK,oBAAoB,OAAO,CAAC,CAAC,CAAC,QAAQ,MAAM,EAAE,qBAAqB,KAAK,CAAC;GACtG,QAAQ;IACP,SAAS;IACT,OAAO;IACP,OAAO;GACR;EACD;CACD;AACD"}
1
+ {"version":3,"file":"descriptor-meta-DjKgG4z5-BAKSkr1j.mjs","names":[],"sources":["../../../../3-targets/6-adapters/sqlite/dist/descriptor-meta-DjKgG4z5.mjs"],"sourcesContent":["import { sqliteCodecRegistry } from \"@internal/target-sqlite/codecs\";\nimport { sqliteAggregateDescriptors } from \"@internal/target-sqlite/aggregates\";\nconst sqliteAdapterDescriptorMeta = {\n\tkind: \"adapter\",\n\tfamilyId: \"sql\",\n\ttargetId: \"sqlite\",\n\tid: \"sqlite\",\n\tversion: \"0.0.1\",\n\tcapabilities: { sql: {\n\t\torderBy: true,\n\t\tlimit: true,\n\t\tlateral: false,\n\t\tjsonAgg: true,\n\t\treturning: true,\n\t\tforeignKeys: true,\n\t\tenums: false\n\t} },\n\ttypes: {\n\t\taggregateDescriptors: sqliteAggregateDescriptors,\n\t\tcodecTypes: {\n\t\t\tcodecDescriptors: Array.from(sqliteCodecRegistry.values()).filter((d) => d.renderOutputType === void 0),\n\t\t\timport: {\n\t\t\t\tpackage: \"@internal/adapter-sqlite/codec-types\",\n\t\t\t\tnamed: \"CodecTypes\",\n\t\t\t\talias: \"SqliteTypes\"\n\t\t\t}\n\t\t}\n\t}\n};\n//#endregion\nexport { sqliteAdapterDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-DjKgG4z5.mjs.map"],"mappings":";;;AAEA,MAAM,8BAA8B;CACnC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,EAAE,KAAK;EACpB,SAAS;EACT,OAAO;EACP,SAAS;EACT,SAAS;EACT,WAAW;EACX,aAAa;EACb,OAAO;CACR,EAAE;CACF,OAAO;EACN,sBAAsB;EACtB,YAAY;GACX,kBAAkB,MAAM,KAAK,oBAAoB,OAAO,CAAC,CAAC,CAAC,QAAQ,MAAM,EAAE,qBAAqB,KAAK,CAAC;GACtG,QAAQ;IACP,SAAS;IACT,OAAO;IACP,OAAO;GACR;EACD;CACD;AACD"}
@@ -1,5 +1,5 @@
1
1
  import { t as buildTargetDetails } from "./planner-target-details-CIQ789Gc-C5U4yVY9.mjs";
2
- import { h as step } from "./op-factory-call-BCDGjXmK-D_Q47Yko.mjs";
2
+ import { h as step } from "./op-factory-call-CsNFRTPS-HuMdWaBX.mjs";
3
3
  import { col as col$1, fn as fn$1, foreignKey, lit as lit$1, primaryKey, unique } from "@prisma/orm-family-sql/relational-core/contract-free";
4
4
  import { placeholder } from "@prisma/orm-framework/errors/migration";
5
5
  import { MigrationCLI } from "@prisma/orm-toolchain/cli/migration-cli";
@@ -44,4 +44,4 @@ function rawSql(op) {
44
44
  //#endregion
45
45
  export { foreignKey as a, primaryKey as c, fn$1 as i, rawSql as l, col$1 as n, lit$1 as o, dataTransform as r, placeholder as s, MigrationCLI as t, unique as u };
46
46
 
47
- //# sourceMappingURL=migration-DWP33-2M.mjs.map
47
+ //# sourceMappingURL=migration-BX7YeaQT.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"migration-DWP33-2M.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/migration.mjs"],"sourcesContent":["import { f as step } from \"./op-factory-call-BCDGjXmK.mjs\";\nimport { t as buildTargetDetails } from \"./planner-target-details-CIQ789Gc.mjs\";\nimport { t as SqliteMigration } from \"./sqlite-migration-DWl9RerP.mjs\";\nimport { placeholder } from \"@internal/errors/migration\";\nimport { col, fn, foreignKey, lit, primaryKey, unique } from \"@internal/sql-relational-core/contract-free\";\nimport { MigrationCLI } from \"@internal/cli/migration-cli\";\n//#region src/core/migrations/operations/data-transform.ts\n/**\n* User-facing `dataTransform` factory for the SQLite migration authoring\n* surface. Invoked directly inside a `migration.ts` file to supply a\n* user-authored SQL statement that runs with operation class `'data'`.\n*\n* Typical use: the planner emits a `DataTransformCall` stub when a NOT NULL\n* tightening requires a backfill. The rendered `migration.ts` exposes the\n* backfill as a `placeholder(\"…\")` slot the user fills in with an\n* `UPDATE … WHERE col IS NULL` statement. The filled-in `dataTransform(...)`\n* invocation returns a runnable operation the runner executes before the\n* subsequent recreate-table op copies data into the tightened schema.\n*/\nfunction dataTransform(opts) {\n\treturn {\n\t\tid: opts.id,\n\t\tlabel: opts.label,\n\t\tsummary: opts.description,\n\t\toperationClass: \"data\",\n\t\ttarget: {\n\t\t\tid: \"sqlite\",\n\t\t\tdetails: buildTargetDetails(\"table\", opts.table)\n\t\t},\n\t\tprecheck: [],\n\t\texecute: [step(opts.description, opts.run())],\n\t\tpostcheck: []\n\t};\n}\n//#endregion\n//#region src/core/migrations/operations/raw.ts\n/**\n* Identity factory for an already-materialized\n* `SqlMigrationPlanOperation<SqlitePlanTargetDetails>`. Mirrors the Postgres\n* `rawSql` factory: the planner uses this to carry ops produced by SQL-family\n* paths (codec lifecycle hooks, raw-SQL escape hatches) alongside structured\n* call IR without reverse-engineering their shape.\n*/\nfunction rawSql(op) {\n\treturn op;\n}\n//#endregion\nexport { SqliteMigration as Migration, MigrationCLI, col, dataTransform, fn, foreignKey, lit, placeholder, primaryKey, rawSql, unique };\n\n//# sourceMappingURL=migration.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,SAAS,cAAc,MAAM;CAC5B,OAAO;EACN,IAAI,KAAK;EACT,OAAO,KAAK;EACZ,SAAS,KAAK;EACd,gBAAgB;EAChB,QAAQ;GACP,IAAI;GACJ,SAAS,mBAAmB,SAAS,KAAK,KAAK;EAChD;EACA,UAAU,CAAC;EACX,SAAS,CAAC,KAAK,KAAK,aAAa,KAAK,IAAI,CAAC,CAAC;EAC5C,WAAW,CAAC;CACb;AACD;;;;;;;;AAUA,SAAS,OAAO,IAAI;CACnB,OAAO;AACR"}
1
+ {"version":3,"file":"migration-BX7YeaQT.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/migration.mjs"],"sourcesContent":["import { f as step } from \"./op-factory-call-CsNFRTPS.mjs\";\nimport { t as buildTargetDetails } from \"./planner-target-details-CIQ789Gc.mjs\";\nimport { t as SqliteMigration } from \"./sqlite-migration-MGxXxUB4.mjs\";\nimport { placeholder } from \"@internal/errors/migration\";\nimport { col, fn, foreignKey, lit, primaryKey, unique } from \"@internal/sql-relational-core/contract-free\";\nimport { MigrationCLI } from \"@internal/cli/migration-cli\";\n//#region src/core/migrations/operations/data-transform.ts\n/**\n* User-facing `dataTransform` factory for the SQLite migration authoring\n* surface. Invoked directly inside a `migration.ts` file to supply a\n* user-authored SQL statement that runs with operation class `'data'`.\n*\n* Typical use: the planner emits a `DataTransformCall` stub when a NOT NULL\n* tightening requires a backfill. The rendered `migration.ts` exposes the\n* backfill as a `placeholder(\"…\")` slot the user fills in with an\n* `UPDATE … WHERE col IS NULL` statement. The filled-in `dataTransform(...)`\n* invocation returns a runnable operation the runner executes before the\n* subsequent recreate-table op copies data into the tightened schema.\n*/\nfunction dataTransform(opts) {\n\treturn {\n\t\tid: opts.id,\n\t\tlabel: opts.label,\n\t\tsummary: opts.description,\n\t\toperationClass: \"data\",\n\t\ttarget: {\n\t\t\tid: \"sqlite\",\n\t\t\tdetails: buildTargetDetails(\"table\", opts.table)\n\t\t},\n\t\tprecheck: [],\n\t\texecute: [step(opts.description, opts.run())],\n\t\tpostcheck: []\n\t};\n}\n//#endregion\n//#region src/core/migrations/operations/raw.ts\n/**\n* Identity factory for an already-materialized\n* `SqlMigrationPlanOperation<SqlitePlanTargetDetails>`. Mirrors the Postgres\n* `rawSql` factory: the planner uses this to carry ops produced by SQL-family\n* paths (codec lifecycle hooks, raw-SQL escape hatches) alongside structured\n* call IR without reverse-engineering their shape.\n*/\nfunction rawSql(op) {\n\treturn op;\n}\n//#endregion\nexport { SqliteMigration as Migration, MigrationCLI, col, dataTransform, fn, foreignKey, lit, placeholder, primaryKey, rawSql, unique };\n\n//# sourceMappingURL=migration.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAmBA,SAAS,cAAc,MAAM;CAC5B,OAAO;EACN,IAAI,KAAK;EACT,OAAO,KAAK;EACZ,SAAS,KAAK;EACd,gBAAgB;EAChB,QAAQ;GACP,IAAI;GACJ,SAAS,mBAAmB,SAAS,KAAK,KAAK;EAChD;EACA,UAAU,CAAC;EACX,SAAS,CAAC,KAAK,KAAK,aAAa,KAAK,IAAI,CAAC,CAAC;EAC5C,WAAW,CAAC;CACb;AACD;;;;;;;;AAUA,SAAS,OAAO,IAAI;CACnB,OAAO;AACR"}
@@ -3,14 +3,14 @@ import { i as tableExistsAst, n as createTable, r as indexExistsAst, t as column
3
3
  import { n as quoteIdentifier, t as escapeLiteral } from "./sql-utils-DqPXZBMA-Mm27NNjs.mjs";
4
4
  import { t as buildTargetDetails } from "./planner-target-details-CIQ789Gc-C5U4yVY9.mjs";
5
5
  import { n as stripOuterParens } from "./default-normalizer-DuoHj9-O-DsK7lJZn.mjs";
6
+ import { ifDefined } from "@prisma/orm-framework/utils/defined";
6
7
  import { blindCast } from "@prisma/orm-framework/utils/casts";
7
8
  import { issueOutcome } from "@prisma/orm-framework/components/control";
8
- import { ifDefined } from "@prisma/orm-framework/utils/defined";
9
9
  import { RelationalSchemaNodeKind } from "@prisma/orm-family-sql/schema-ir/types";
10
10
  import { errorUnfilledPlaceholder } from "@prisma/orm-framework/errors/migration";
11
11
  import { TsExpression, jsonToTsSource } from "@prisma/orm-framework/ts-render";
12
12
  import { REFERENTIAL_ACTION_SQL } from "@prisma/orm-family-sql/contract/referential-action-sql";
13
- //#region ../../../3-targets/3-targets/sqlite/dist/op-factory-call-BCDGjXmK.mjs
13
+ //#region ../../../3-targets/3-targets/sqlite/dist/op-factory-call-CsNFRTPS.mjs
14
14
  const SAFE_NATIVE_TYPE_PATTERN = /^[a-zA-Z][a-zA-Z0-9_ ]*$/;
15
15
  function assertSafeNativeType(nativeType) {
16
16
  if (!SAFE_NATIVE_TYPE_PATTERN.test(nativeType)) throw sqliteError("CONTRACT.NATIVE_TYPE_INVALID", `Unsafe native type name in contract: "${nativeType}". Native type names must match /^[a-zA-Z][a-zA-Z0-9_ ]*\$/`, { meta: { nativeType } });
@@ -826,4 +826,4 @@ var RawSqlCall = class extends SqliteOpFactoryCallNode {
826
826
  //#endregion
827
827
  export { DropColumnCall as a, RawSqlCall as c, buildColumnTypeSql as d, buildRecreatePostchecks as f, step as h, DataTransformCall as i, RecreateTableCall as l, renderDefaultLiteral as m, CreateIndexCall as n, DropIndexCall as o, buildRecreateSummary as p, CreateTableCall as r, DropTableCall as s, AddColumnCall as t, buildColumnDefaultSql as u };
828
828
 
829
- //# sourceMappingURL=op-factory-call-BCDGjXmK-D_Q47Yko.mjs.map
829
+ //# sourceMappingURL=op-factory-call-CsNFRTPS-HuMdWaBX.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"op-factory-call-BCDGjXmK-D_Q47Yko.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/op-factory-call-BCDGjXmK.mjs"],"sourcesContent":["import { n as sqliteError } from \"./errors-CKsaaSnD.mjs\";\nimport { n as quoteIdentifier, t as escapeLiteral } from \"./sql-utils-DqPXZBMA.mjs\";\nimport { i as tableExistsAst, n as columnExistsAst, r as indexExistsAst, t as createTable } from \"./ddl-CXduXyOT.mjs\";\nimport { t as buildTargetDetails } from \"./planner-target-details-CIQ789Gc.mjs\";\nimport { n as stripOuterParens } from \"./default-normalizer-DuoHj9-O.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { RelationalSchemaNodeKind } from \"@internal/sql-schema-ir/types\";\nimport { issueOutcome } from \"@internal/framework-components/control\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { errorUnfilledPlaceholder } from \"@internal/errors/migration\";\nimport { TsExpression, jsonToTsSource } from \"@internal/ts-render\";\nimport { REFERENTIAL_ACTION_SQL } from \"@internal/sql-contract/referential-action-sql\";\n//#region src/core/migrations/planner-ddl-builders.ts\nconst SAFE_NATIVE_TYPE_PATTERN = /^[a-zA-Z][a-zA-Z0-9_ ]*$/;\nfunction assertSafeNativeType(nativeType) {\n\tif (!SAFE_NATIVE_TYPE_PATTERN.test(nativeType)) throw sqliteError(\"CONTRACT.NATIVE_TYPE_INVALID\", `Unsafe native type name in contract: \"${nativeType}\". Native type names must match /^[a-zA-Z][a-zA-Z0-9_ ]*\\$/`, { meta: { nativeType } });\n}\nfunction assertSafeDefaultExpression(expression) {\n\tif (expression.includes(\";\") || /--|\\/\\*|\\bSELECT\\b/i.test(expression)) throw sqliteError(\"CONTRACT.DEFAULT_INVALID\", `Unsafe default expression in contract: \"${expression}\". Default expressions must not contain semicolons, SQL comment tokens, or subqueries.`, { meta: { expression } });\n}\n/**\n* Renders the column's DDL type token (e.g. `\"INTEGER\"`, `\"TEXT\"`).\n* Resolves `typeRef` against `storageTypes` and validates the resulting\n* native type against a safe-identifier pattern.\n*/\nfunction buildColumnTypeSql(column, storageTypes = {}) {\n\tconst resolved = resolveColumnTypeMetadata(column, storageTypes);\n\tassertSafeNativeType(resolved.nativeType);\n\treturn resolved.nativeType.toUpperCase();\n}\n/**\n* Renders the column's `DEFAULT …` clause. Returns the empty string when\n* there is no default, and also when the default is `autoincrement()` —\n* SQLite encodes that as `INTEGER PRIMARY KEY AUTOINCREMENT` inline on the\n* column definition, not as a separate DEFAULT.\n*/\nfunction buildColumnDefaultSql(columnDefault) {\n\tif (!columnDefault) return \"\";\n\tswitch (columnDefault.kind) {\n\t\tcase \"literal\": return `DEFAULT ${renderDefaultLiteral(columnDefault.value)}`;\n\t\tcase \"function\":\n\t\t\tif (columnDefault.expression === \"autoincrement()\") return \"\";\n\t\t\tif (columnDefault.expression === \"now()\") return \"DEFAULT (datetime('now'))\";\n\t\t\tassertSafeDefaultExpression(columnDefault.expression);\n\t\t\treturn `DEFAULT (${columnDefault.expression})`;\n\t}\n}\nfunction renderDefaultLiteral(value) {\n\tif (value instanceof Date) return `'${escapeLiteral(value.toISOString())}'`;\n\tif (typeof value === \"string\") return `'${escapeLiteral(value)}'`;\n\tif (typeof value === \"number\" || typeof value === \"bigint\") return String(value);\n\tif (typeof value === \"boolean\") return value ? \"1\" : \"0\";\n\tif (value === null) return \"NULL\";\n\treturn `'${escapeLiteral(JSON.stringify(value))}'`;\n}\nfunction buildCreateIndexSql(tableName, indexName, columns, unique = false) {\n\treturn `CREATE ${unique ? \"UNIQUE \" : \"\"}INDEX ${quoteIdentifier(indexName)} ON ${quoteIdentifier(tableName)} (${columns.map(quoteIdentifier).join(\", \")})`;\n}\nfunction buildDropIndexSql(indexName) {\n\treturn `DROP INDEX IF EXISTS ${quoteIdentifier(indexName)}`;\n}\nfunction resolveColumnTypeMetadata(column, storageTypes) {\n\tif (!column.typeRef) return column;\n\tconst referencedType = storageTypes[column.typeRef];\n\tif (!referencedType) throw sqliteError(\"CONTRACT.TYPE_UNKNOWN\", `Storage type \"${column.typeRef}\" referenced by column is not defined in storage.types.`, { meta: { typeRef: column.typeRef } });\n\treturn {\n\t\tcodecId: referencedType.codecId,\n\t\tnativeType: referencedType.nativeType,\n\t\ttypeParams: referencedType.typeParams\n\t};\n}\n//#endregion\n//#region src/core/migrations/operations/shared.ts\nfunction step(description, sql, params) {\n\treturn {\n\t\tdescription,\n\t\tsql,\n\t\t...ifDefined(\"params\", params)\n\t};\n}\n/**\n* Renders a single column's inline DDL fragment within a `CREATE TABLE`\n* statement. Honours the `inlineAutoincrementPrimaryKey` flag — SQLite\n* treats `INTEGER PRIMARY KEY AUTOINCREMENT` as a special form that aliases\n* `rowid`, and the column must not carry a `DEFAULT` or repeat `NOT NULL`.\n*/\nfunction renderColumnDefinition(column) {\n\tconst parts = [quoteIdentifier(column.name), column.typeSql];\n\tif (column.inlineAutoincrementPrimaryKey) parts.push(\"PRIMARY KEY AUTOINCREMENT\");\n\telse {\n\t\tif (column.defaultSql) parts.push(column.defaultSql);\n\t\tif (!column.nullable) parts.push(\"NOT NULL\");\n\t}\n\treturn parts.join(\" \");\n}\n/**\n* Renders an inline FOREIGN KEY constraint clause for a `CREATE TABLE`\n* body. Every `SqliteForeignKeySpec` is constraint-bearing by construction\n* (`tableSpecFromNode` only ever builds specs from schema-IR FK nodes, which\n* are themselves constraint-only — a non-constraint FK contributes no node).\n*/\nfunction renderForeignKeyClause(fk) {\n\tlet sql = `${fk.name ? `CONSTRAINT ${quoteIdentifier(fk.name)} ` : \"\"}FOREIGN KEY (${fk.columns.map(quoteIdentifier).join(\", \")}) REFERENCES ${quoteIdentifier(fk.references.table)} (${fk.references.columns.map(quoteIdentifier).join(\", \")})`;\n\tif (fk.onDelete !== void 0) sql += ` ON DELETE ${REFERENTIAL_ACTION_SQL[fk.onDelete]}`;\n\tif (fk.onUpdate !== void 0) sql += ` ON UPDATE ${REFERENTIAL_ACTION_SQL[fk.onUpdate]}`;\n\treturn sql;\n}\n//#endregion\n//#region src/core/migrations/operations/columns.ts\nfunction addColumnExecuteSql(tableName, column) {\n\treturn [\n\t\t`ALTER TABLE ${quoteIdentifier(tableName)}`,\n\t\t`ADD COLUMN ${quoteIdentifier(column.name)} ${column.typeSql}`,\n\t\tcolumn.defaultSql,\n\t\tcolumn.nullable ? \"\" : \"NOT NULL\"\n\t].filter(Boolean).join(\" \");\n}\nfunction dropColumnExecuteSql(tableName, columnName) {\n\treturn `ALTER TABLE ${quoteIdentifier(tableName)} DROP COLUMN ${quoteIdentifier(columnName)}`;\n}\n//#endregion\n//#region src/core/migrations/operations/tables.ts\nasync function tableExistsSteps(lowerer, tableName) {\n\tconst checks = tableExistsAst(tableName);\n\treturn {\n\t\tpresent: await lowerer.lowerToExecuteRequest(checks.tablePresent()),\n\t\tabsent: await lowerer.lowerToExecuteRequest(checks.tableAbsent())\n\t};\n}\n/**\n* Renders the body of a `CREATE TABLE <name> ( … )` statement from a flat\n* `SqliteTableSpec`. SQLite's `INTEGER PRIMARY KEY AUTOINCREMENT` form is\n* inline on the column; the table-level PRIMARY KEY clause is emitted only\n* when no column carries `inlineAutoincrementPrimaryKey`.\n*/\nfunction renderCreateTableSql(tableName, spec) {\n\tconst columnDefs = spec.columns.map(renderColumnDefinition);\n\tconst constraintDefs = [];\n\tconst hasInlinePk = spec.columns.some((c) => c.inlineAutoincrementPrimaryKey);\n\tif (spec.primaryKey && !hasInlinePk) constraintDefs.push(`PRIMARY KEY (${spec.primaryKey.columns.map(quoteIdentifier).join(\", \")})`);\n\tfor (const u of spec.uniques ?? []) {\n\t\tconst name = u.name ? `CONSTRAINT ${quoteIdentifier(u.name)} ` : \"\";\n\t\tconstraintDefs.push(`${name}UNIQUE (${u.columns.map(quoteIdentifier).join(\", \")})`);\n\t}\n\tfor (const fk of spec.foreignKeys ?? []) {\n\t\tconst clause = renderForeignKeyClause(fk);\n\t\tif (clause) constraintDefs.push(clause);\n\t}\n\tconst allDefs = [...columnDefs, ...constraintDefs];\n\treturn `CREATE TABLE ${quoteIdentifier(tableName)} (\\n ${allDefs.join(\",\\n \")}\\n)`;\n}\nasync function recreateTable(args, lowerer) {\n\tconst { tableName, contractTable, schemaColumnNames, indexes, summary, postchecks, operationClass } = args;\n\tconst tempName = `_prisma_new_${tableName}`;\n\tconst liveSet = new Set(schemaColumnNames);\n\tconst sharedColumns = contractTable.columns.filter((c) => liveSet.has(c.name)).map((c) => c.name);\n\tconst columnList = sharedColumns.map(quoteIdentifier).join(\", \");\n\tconst indexStatements = indexes.map((idx) => ({\n\t\tdescription: `recreate index \"${idx.name}\" on \"${tableName}\"`,\n\t\tsql: buildCreateIndexSql(tableName, idx.name, idx.columns)\n\t}));\n\tconst copyStep = sharedColumns.length > 0 ? [step(`copy data from \"${tableName}\" to \"${tempName}\"`, `INSERT INTO ${quoteIdentifier(tempName)} (${columnList}) SELECT ${columnList} FROM ${quoteIdentifier(tableName)}`)] : [];\n\tconst tableSteps = await tableExistsSteps(lowerer, tableName);\n\tconst tempSteps = await tableExistsSteps(lowerer, tempName);\n\treturn {\n\t\tid: `recreateTable.${tableName}`,\n\t\tlabel: `Recreate table ${tableName}`,\n\t\tsummary,\n\t\toperationClass,\n\t\ttarget: {\n\t\t\tid: \"sqlite\",\n\t\t\tdetails: buildTargetDetails(\"table\", tableName)\n\t\t},\n\t\tprecheck: [step(`ensure table \"${tableName}\" exists`, tableSteps.present.sql, tableSteps.present.params), step(`ensure temp table \"${tempName}\" does not exist`, tempSteps.absent.sql, tempSteps.absent.params)],\n\t\texecute: [\n\t\t\tstep(`create new table \"${tempName}\" with desired schema`, renderCreateTableSql(tempName, contractTable)),\n\t\t\t...copyStep,\n\t\t\tstep(`drop old table \"${tableName}\"`, `DROP TABLE ${quoteIdentifier(tableName)}`),\n\t\t\tstep(`rename \"${tempName}\" to \"${tableName}\"`, `ALTER TABLE ${quoteIdentifier(tempName)} RENAME TO ${quoteIdentifier(tableName)}`),\n\t\t\t...indexStatements\n\t\t],\n\t\tpostcheck: [\n\t\t\tstep(`verify table \"${tableName}\" exists`, tableSteps.present.sql, tableSteps.present.params),\n\t\t\tstep(`verify temp table \"${tempName}\" is gone`, tempSteps.absent.sql, tempSteps.absent.params),\n\t\t\t...postchecks\n\t\t]\n\t};\n}\n/**\n* Build a one-line summary of a recreate-table operation from the schema-diff\n* issues that triggered it. Lives next to `recreateTable` so the planner\n* (which has the issues) can produce the same description the factory\n* used to build inline. Keeping the formatting target-side keeps\n* `RecreateTableCall` issue-free at the IR layer. `SchemaDiffIssue` carries\n* no rendered message, so this renders one from each issue's path.\n*/\nfunction buildRecreateSummary(tableName, issues) {\n\treturn `Recreates table ${tableName} to apply schema changes: ${issues.map((i) => i.path.join(\"/\")).join(\"; \")}`;\n}\nfunction nodeKindOf(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\treturn blindCast(node).nodeKind;\n}\n/** Mirrors `SqlColumnIR.isEqualTo`'s type comparison, isolated so a `not-equal` column issue's postcheck can target type drift and nullability drift independently. */\nfunction columnTypeChanged(expected, actual) {\n\tif (expected.resolvedNativeType !== void 0 && actual.resolvedNativeType !== void 0) return expected.resolvedNativeType !== actual.resolvedNativeType;\n\treturn expected.nativeType !== actual.nativeType || Boolean(expected.many) !== Boolean(actual.many);\n}\n/**\n* Returns the columns the contract expects as the table's primary key. Picks\n* up SQLite's inline `INTEGER PRIMARY KEY AUTOINCREMENT` form when no\n* explicit `primaryKey` clause is set on the spec.\n*/\nfunction expectedPrimaryKeyColumns(spec) {\n\tif (spec.primaryKey) return spec.primaryKey.columns;\n\tconst inlinePk = spec.columns.find((c) => c.inlineAutoincrementPrimaryKey);\n\treturn inlinePk ? [inlinePk.name] : [];\n}\nfunction quoteSqlList(values) {\n\treturn values.map((v) => `'${escapeLiteral(v)}'`).join(\", \");\n}\nfunction columnNameFromNode(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\treturn blindCast(node).name;\n}\n/**\n* A column-default issue's own node has no back-reference to its owning\n* column — it's a transient child built by `SqlColumnIR.children()`. The\n* column's id (`column:<name>`) is always the diff path's second-to-last\n* segment for a default issue (`[..., tableId, columnId, 'default']`), so\n* the name is recovered from the path rather than the node.\n*/\nfunction columnNameFromDefaultIssuePath(issue) {\n\tconst columnId = issue.path[issue.path.length - 2];\n\tif (columnId === void 0) return void 0;\n\treturn columnId.startsWith(\"column:\") ? columnId.slice(7) : columnId;\n}\n/**\n* Per-issue postchecks verifying the recreated table's shape against the\n* expected spec. Column-level issues (`sql-column` `not-equal`,\n* `sql-column-default` any reason) emit one targeted check each;\n* constraint-level issues (`sql-primary-key`, `sql-unique`, `sql-foreign-key`,\n* any reason) emit one `pragma_*`-driven check per declared constraint in the\n* expected spec, so a recreated table with the right columns but the wrong\n* PK / unique / FK shape fails the postcheck instead of passing silently.\n* Exported so the planner can pre-build the list at construction time and\n* `RecreateTableCall` doesn't have to carry `SchemaDiffIssue` objects through\n* to render time.\n*/\nfunction buildRecreatePostchecks(tableName, issues, spec) {\n\tconst checks = [];\n\tconst t = escapeLiteral(tableName);\n\tconst byName = new Map(spec.columns.map((c) => [c.name, c]));\n\tlet hasPkIssue = false;\n\tlet hasUniqueIssue = false;\n\tlet hasFkIssue = false;\n\tfor (const issue of issues) {\n\t\tconst nodeKind = nodeKindOf(issue);\n\t\tif (nodeKind === RelationalSchemaNodeKind.column && issueOutcome(issue) === \"not-equal\") {\n\t\t\tconst columnName = columnNameFromNode(issue);\n\t\t\tif (columnName === void 0) continue;\n\t\t\tconst c = escapeLiteral(columnName);\n\t\t\tconst expected = blindCast(issue.expected);\n\t\t\tconst actual = blindCast(issue.actual);\n\t\t\tif (expected.nullable !== actual.nullable) checks.push({\n\t\t\t\tdescription: `verify \"${columnName}\" nullability on \"${tableName}\"`,\n\t\t\t\tsql: `SELECT COUNT(*) > 0 FROM pragma_table_info('${t}') WHERE name = '${c}' AND \"notnull\" = ${expected.nullable ? 0 : 1}`\n\t\t\t});\n\t\t\tif (columnTypeChanged(expected, actual)) {\n\t\t\t\tconst colSpec = byName.get(columnName);\n\t\t\t\tif (colSpec) checks.push({\n\t\t\t\t\tdescription: `verify \"${columnName}\" type on \"${tableName}\"`,\n\t\t\t\t\tsql: `SELECT COUNT(*) > 0 FROM pragma_table_info('${t}') WHERE name = '${c}' AND LOWER(type) = '${escapeLiteral(colSpec.typeSql.toLowerCase())}'`\n\t\t\t\t});\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tif (nodeKind === RelationalSchemaNodeKind.columnDefault) {\n\t\t\tconst columnName = columnNameFromDefaultIssuePath(issue);\n\t\t\tif (columnName === void 0) continue;\n\t\t\tconst c = escapeLiteral(columnName);\n\t\t\tif (issueOutcome(issue) === \"not-expected\") {\n\t\t\t\tchecks.push({\n\t\t\t\t\tdescription: `verify \"${columnName}\" has no default on \"${tableName}\"`,\n\t\t\t\t\tsql: `SELECT COUNT(*) > 0 FROM pragma_table_info('${t}') WHERE name = '${c}' AND dflt_value IS NULL`\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst colSpec = byName.get(columnName);\n\t\t\tconst expectedRaw = colSpec?.defaultSql.startsWith(\"DEFAULT \") ? stripOuterParens(colSpec.defaultSql.slice(8)) : null;\n\t\t\tif (expectedRaw) checks.push({\n\t\t\t\tdescription: `verify \"${columnName}\" default on \"${tableName}\"`,\n\t\t\t\tsql: `SELECT COUNT(*) > 0 FROM pragma_table_info('${t}') WHERE name = '${c}' AND dflt_value = '${escapeLiteral(expectedRaw)}'`\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (nodeKind === RelationalSchemaNodeKind.primaryKey) hasPkIssue = true;\n\t\tif (nodeKind === RelationalSchemaNodeKind.unique) hasUniqueIssue = true;\n\t\tif (nodeKind === RelationalSchemaNodeKind.foreignKey) hasFkIssue = true;\n\t}\n\tif (hasPkIssue) {\n\t\tconst pkColumns = expectedPrimaryKeyColumns(spec);\n\t\tconst colCount = pkColumns.length;\n\t\tif (colCount === 0) checks.push({\n\t\t\tdescription: `verify \"${tableName}\" has no primary key`,\n\t\t\tsql: `SELECT (SELECT COUNT(*) FROM pragma_table_info('${t}') WHERE pk > 0) = 0`\n\t\t});\n\t\telse checks.push({\n\t\t\tdescription: `verify primary key on \"${tableName}\"`,\n\t\t\tsql: `SELECT (SELECT COUNT(*) FROM pragma_table_info('${t}') WHERE pk > 0) = ${colCount} AND (SELECT COUNT(*) FROM pragma_table_info('${t}') WHERE pk > 0 AND name IN (${quoteSqlList(pkColumns)})) = ${colCount}`\n\t\t});\n\t}\n\tif (hasUniqueIssue) for (const u of spec.uniques ?? []) {\n\t\tconst colCount = u.columns.length;\n\t\tconst description = u.name ? `verify unique constraint \"${u.name}\" on \"${tableName}\"` : `verify unique constraint (${u.columns.join(\", \")}) on \"${tableName}\"`;\n\t\tchecks.push({\n\t\t\tdescription,\n\t\t\tsql: `SELECT EXISTS (SELECT 1 FROM pragma_index_list('${t}') l WHERE l.\"unique\" = 1 AND (SELECT COUNT(*) FROM pragma_index_info(l.name)) = ${colCount} AND (SELECT COUNT(*) FROM pragma_index_info(l.name) WHERE name IN (${quoteSqlList(u.columns)})) = ${colCount})`\n\t\t});\n\t}\n\tif (hasFkIssue) for (const fk of spec.foreignKeys ?? []) {\n\t\tconst refTable = escapeLiteral(fk.references.table);\n\t\tconst colCount = fk.columns.length;\n\t\tconst tuples = fk.columns.map((from, i) => {\n\t\t\tconst to = fk.references.columns[i] ?? from;\n\t\t\treturn `('${escapeLiteral(from)}', '${escapeLiteral(to)}')`;\n\t\t}).join(\", \");\n\t\tconst description = `verify foreign key (${fk.columns.join(\", \")}) → ${fk.references.table}(${fk.references.columns.join(\", \")}) on \"${tableName}\"`;\n\t\tchecks.push({\n\t\t\tdescription,\n\t\t\tsql: `SELECT EXISTS (SELECT 1 FROM pragma_foreign_key_list('${t}') f WHERE f.\"table\" = '${refTable}' GROUP BY f.id HAVING COUNT(*) = ${colCount} AND SUM(CASE WHEN (f.\"from\", f.\"to\") IN (${tuples}) THEN 1 ELSE 0 END) = ${colCount})`\n\t\t});\n\t}\n\treturn checks;\n}\n//#endregion\n//#region src/core/migrations/op-factory-call.ts\n/**\n* SQLite migration IR: one concrete `*Call` class per pure factory under\n* `operations/`, plus a shared `SqliteOpFactoryCallNode` abstract base.\n*\n* Each call class carries fully-resolved literal arguments. `CreateTableCall`\n* holds structured `DdlColumn[]` + `DdlTableConstraint[]` and lowers via the\n* adapter's DDL path; other call classes carry flat SQL fragments. Codec /\n* `typeRef` / default expansion happens upstream in the issue-planner /\n* strategies, mirroring the Postgres `ColumnSpec` pattern.\n*/\nconst TARGET_MIGRATION_MODULE = \"@internal/sqlite/migration\";\nvar SqliteOpFactoryCallNode = class extends TsExpression {\n\timportRequirements() {\n\t\treturn [{\n\t\t\tmoduleSpecifier: TARGET_MIGRATION_MODULE,\n\t\t\tsymbol: this.factoryName\n\t\t}];\n\t}\n\tfreeze() {\n\t\tObject.freeze(this);\n\t}\n};\nfunction renderDdlColumnDefault(def) {\n\tif (!def) return \"\";\n\tif (def.kind === \"literal\") return `lit(${jsonToTsSource(def.value)})`;\n\treturn `fn(${jsonToTsSource(def.expression)})`;\n}\nfunction renderDdlColumnAsTsCall(column) {\n\tconst opts = [];\n\tif (column.notNull) opts.push(\"notNull: true\");\n\tif (column.primaryKey) opts.push(\"primaryKey: true\");\n\tif (column.default) opts.push(`default: ${renderDdlColumnDefault(column.default)}`);\n\tconst optsStr = opts.length > 0 ? `, { ${opts.join(\", \")} }` : \"\";\n\treturn `col(${jsonToTsSource(column.name)}, ${jsonToTsSource(column.type)}${optsStr})`;\n}\nfunction renderDdlConstraintAsTsCall(constraint) {\n\tswitch (constraint.kind) {\n\t\tcase \"primary-key\": {\n\t\t\tconst nameOpt = constraint.name ? `, { name: ${jsonToTsSource(constraint.name)} }` : \"\";\n\t\t\treturn `primaryKey(${jsonToTsSource(constraint.columns)}${nameOpt})`;\n\t\t}\n\t\tcase \"foreign-key\": {\n\t\t\tconst opts = [];\n\t\t\tif (constraint.name) opts.push(`name: ${jsonToTsSource(constraint.name)}`);\n\t\t\tif (constraint.onDelete) opts.push(`onDelete: ${jsonToTsSource(constraint.onDelete)}`);\n\t\t\tif (constraint.onUpdate) opts.push(`onUpdate: ${jsonToTsSource(constraint.onUpdate)}`);\n\t\t\tconst optsStr = opts.length > 0 ? `, { ${opts.join(\", \")} }` : \"\";\n\t\t\treturn `foreignKey(${jsonToTsSource(constraint.columns)}, ${jsonToTsSource(constraint.refTable)}, ${jsonToTsSource(constraint.refColumns)}${optsStr})`;\n\t\t}\n\t\tcase \"unique\": {\n\t\t\tconst nameOpt = constraint.name ? `, { name: ${jsonToTsSource(constraint.name)} }` : \"\";\n\t\t\treturn `unique(${jsonToTsSource(constraint.columns)}${nameOpt})`;\n\t\t}\n\t\tcase \"check-expression\": throw sqliteError(\"CONTRACT.CONSTRAINT_INVALID\", `SQLite does not support expression CHECK constraints (constraint \"${constraint.name}\"). Scalar-array columns and their element-non-null checks are Postgres-only.`, { meta: { constraintName: constraint.name } });\n\t}\n}\nfunction constraintImportSymbols(constraints) {\n\tif (!constraints || constraints.length === 0) return [];\n\tconst symbols = /* @__PURE__ */ new Set();\n\tfor (const c of constraints) if (c.kind === \"primary-key\") symbols.add(\"primaryKey\");\n\telse if (c.kind === \"foreign-key\") symbols.add(\"foreignKey\");\n\telse if (c.kind === \"unique\") symbols.add(\"unique\");\n\treturn [...symbols];\n}\nfunction defaultImportSymbols(columns) {\n\tconst symbols = /* @__PURE__ */ new Set();\n\tfor (const col of columns) if (col.default?.kind === \"literal\") symbols.add(\"lit\");\n\telse if (col.default?.kind === \"function\") symbols.add(\"fn\");\n\treturn [...symbols];\n}\nvar CreateTableCall = class extends SqliteOpFactoryCallNode {\n\tfactoryName = \"createTable\";\n\toperationClass = \"additive\";\n\ttableName;\n\tcolumns;\n\tconstraints;\n\tlabel;\n\tconstructor(tableName, columns, constraints) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.columns = Object.freeze([...columns]);\n\t\tthis.constraints = constraints ? Object.freeze([...constraints]) : void 0;\n\t\tthis.label = `Create table ${tableName}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw sqliteError(\"MIGRATION.SQLITE_CONTROL_STACK_MISSING\", `CreateTableCall.toOp: a DDL lowerer is required on the SQLite planner path (table \"${this.tableName}\"). Pass the control adapter to createSqliteMigrationPlanner.`, { meta: {\n\t\t\tfactory: this.factoryName,\n\t\t\ttableName: this.tableName\n\t\t} });\n\t\tconst ddlNode = createTable({\n\t\t\ttable: this.tableName,\n\t\t\tcolumns: this.columns,\n\t\t\t...ifDefined(\"constraints\", this.constraints)\n\t\t});\n\t\tconst statement = await lowerer.lowerToExecuteRequest(ddlNode);\n\t\tconst tableName = this.tableName;\n\t\tconst tableChecks = tableExistsAst(tableName);\n\t\tconst absent = await lowerer.lowerToExecuteRequest(tableChecks.tableAbsent());\n\t\tconst present = await lowerer.lowerToExecuteRequest(tableChecks.tablePresent());\n\t\treturn {\n\t\t\tid: `table.${tableName}`,\n\t\t\tlabel: `Create table ${tableName}`,\n\t\t\tsummary: `Creates table ${tableName} with required columns`,\n\t\t\toperationClass: \"additive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"sqlite\",\n\t\t\t\tdetails: buildTargetDetails(\"table\", tableName)\n\t\t\t},\n\t\t\tprecheck: [step(`ensure table \"${tableName}\" does not exist`, absent.sql, absent.params)],\n\t\t\texecute: [{\n\t\t\t\tdescription: `create table \"${tableName}\"`,\n\t\t\t\tsql: statement.sql,\n\t\t\t\tparams: statement.params ?? []\n\t\t\t}],\n\t\t\tpostcheck: [step(`verify table \"${tableName}\" exists`, present.sql, present.params)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\tconst columnsList = this.columns.map(renderDdlColumnAsTsCall).join(\", \");\n\t\tconst constraintsList = this.constraints ? this.constraints.map(renderDdlConstraintAsTsCall).join(\", \") : void 0;\n\t\tconst opts = [];\n\t\topts.push(`table: ${jsonToTsSource(this.tableName)}`);\n\t\topts.push(`columns: [${columnsList}]`);\n\t\tif (constraintsList) opts.push(`constraints: [${constraintsList}]`);\n\t\treturn `this.createTable({ ${opts.join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\tconst req = [];\n\t\tif (this.columns.length > 0) {\n\t\t\treq.push({\n\t\t\t\tmoduleSpecifier: TARGET_MIGRATION_MODULE,\n\t\t\t\tsymbol: \"col\"\n\t\t\t});\n\t\t\tfor (const sym of defaultImportSymbols(this.columns)) req.push({\n\t\t\t\tmoduleSpecifier: TARGET_MIGRATION_MODULE,\n\t\t\t\tsymbol: sym\n\t\t\t});\n\t\t}\n\t\tfor (const sym of constraintImportSymbols(this.constraints)) req.push({\n\t\t\tmoduleSpecifier: TARGET_MIGRATION_MODULE,\n\t\t\tsymbol: sym\n\t\t});\n\t\treturn req;\n\t}\n};\nvar DropTableCall = class extends SqliteOpFactoryCallNode {\n\tfactoryName = \"dropTable\";\n\toperationClass = \"destructive\";\n\ttableName;\n\tlabel;\n\tconstructor(tableName) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.label = `Drop table ${tableName}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw sqliteError(\"MIGRATION.SQLITE_CONTROL_STACK_MISSING\", `DropTableCall.toOp: a lowerer is required on the SQLite planner path (table \"${this.tableName}\"). Pass the control adapter to createSqliteMigrationPlanner.`, { meta: {\n\t\t\tfactory: this.factoryName,\n\t\t\ttableName: this.tableName\n\t\t} });\n\t\tconst checks = tableExistsAst(this.tableName);\n\t\tconst present = await lowerer.lowerToExecuteRequest(checks.tablePresent());\n\t\tconst absent = await lowerer.lowerToExecuteRequest(checks.tableAbsent());\n\t\treturn {\n\t\t\tid: `dropTable.${this.tableName}`,\n\t\t\tlabel: `Drop table ${this.tableName}`,\n\t\t\tsummary: `Drops table ${this.tableName} which is not in the contract`,\n\t\t\toperationClass: \"destructive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"sqlite\",\n\t\t\t\tdetails: buildTargetDetails(\"table\", this.tableName)\n\t\t\t},\n\t\t\tprecheck: [step(`ensure table \"${this.tableName}\" exists`, present.sql, present.params)],\n\t\t\texecute: [step(`drop table \"${this.tableName}\"`, `DROP TABLE ${quoteIdentifier(this.tableName)}`)],\n\t\t\tpostcheck: [step(`verify table \"${this.tableName}\" is gone`, absent.sql, absent.params)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.dropTable({ table: ${jsonToTsSource(this.tableName)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar RecreateTableCall = class extends SqliteOpFactoryCallNode {\n\tfactoryName = \"recreateTable\";\n\toperationClass;\n\ttableName;\n\tcontractTable;\n\tschemaColumnNames;\n\tindexes;\n\tsummary;\n\tpostchecks;\n\tlabel;\n\tconstructor(args) {\n\t\tsuper();\n\t\tthis.tableName = args.tableName;\n\t\tthis.contractTable = args.contractTable;\n\t\tthis.schemaColumnNames = args.schemaColumnNames;\n\t\tthis.indexes = args.indexes;\n\t\tthis.summary = args.summary;\n\t\tthis.postchecks = args.postchecks;\n\t\tthis.operationClass = args.operationClass;\n\t\tthis.label = `Recreate table ${args.tableName}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw sqliteError(\"MIGRATION.SQLITE_CONTROL_STACK_MISSING\", `RecreateTableCall.toOp: a lowerer is required on the SQLite planner path (table \"${this.tableName}\"). Pass the control adapter to createSqliteMigrationPlanner.`, { meta: {\n\t\t\tfactory: this.factoryName,\n\t\t\ttableName: this.tableName\n\t\t} });\n\t\treturn recreateTable({\n\t\t\ttableName: this.tableName,\n\t\t\tcontractTable: this.contractTable,\n\t\t\tschemaColumnNames: this.schemaColumnNames,\n\t\t\tindexes: this.indexes,\n\t\t\tsummary: this.summary,\n\t\t\tpostchecks: this.postchecks,\n\t\t\toperationClass: this.operationClass\n\t\t}, lowerer);\n\t}\n\trenderTypeScript() {\n\t\treturn `this.recreateTable(${jsonToTsSource({\n\t\t\ttableName: this.tableName,\n\t\t\tcontractTable: this.contractTable,\n\t\t\tschemaColumnNames: this.schemaColumnNames,\n\t\t\tindexes: this.indexes,\n\t\t\tsummary: this.summary,\n\t\t\tpostchecks: this.postchecks,\n\t\t\toperationClass: this.operationClass\n\t\t})})`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar AddColumnCall = class extends SqliteOpFactoryCallNode {\n\tfactoryName = \"addColumn\";\n\toperationClass = \"additive\";\n\ttableName;\n\tcolumnName;\n\tcolumn;\n\tlabel;\n\tconstructor(tableName, column) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.columnName = column.name;\n\t\tthis.column = column;\n\t\tthis.label = `Add column ${column.name} on ${tableName}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw sqliteError(\"MIGRATION.SQLITE_CONTROL_STACK_MISSING\", `AddColumnCall.toOp: a lowerer is required on the SQLite planner path (column \"${this.column.name}\" on table \"${this.tableName}\"). Pass the control adapter to createSqliteMigrationPlanner.`, { meta: {\n\t\t\tfactory: this.factoryName,\n\t\t\ttableName: this.tableName,\n\t\t\tcolumnName: this.column.name\n\t\t} });\n\t\tconst checks = columnExistsAst(this.tableName, this.column.name);\n\t\tconst absent = await lowerer.lowerToExecuteRequest(checks.columnAbsent());\n\t\tconst present = await lowerer.lowerToExecuteRequest(checks.columnPresent());\n\t\treturn {\n\t\t\tid: `column.${this.tableName}.${this.column.name}`,\n\t\t\tlabel: `Add column ${this.column.name} on ${this.tableName}`,\n\t\t\tsummary: `Adds column ${this.column.name} on ${this.tableName}`,\n\t\t\toperationClass: \"additive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"sqlite\",\n\t\t\t\tdetails: buildTargetDetails(\"column\", this.column.name, this.tableName)\n\t\t\t},\n\t\t\tprecheck: [step(`ensure column \"${this.column.name}\" is missing`, absent.sql, absent.params)],\n\t\t\texecute: [step(`add column \"${this.column.name}\"`, addColumnExecuteSql(this.tableName, this.column))],\n\t\t\tpostcheck: [step(`verify column \"${this.column.name}\" exists`, present.sql, present.params)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.addColumn({ table: ${jsonToTsSource(this.tableName)}, column: ${jsonToTsSource(this.column)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar DropColumnCall = class extends SqliteOpFactoryCallNode {\n\tfactoryName = \"dropColumn\";\n\toperationClass = \"destructive\";\n\ttableName;\n\tcolumnName;\n\tlabel;\n\tconstructor(tableName, columnName) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.columnName = columnName;\n\t\tthis.label = `Drop column ${columnName} on ${tableName}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw sqliteError(\"MIGRATION.SQLITE_CONTROL_STACK_MISSING\", `DropColumnCall.toOp: a lowerer is required on the SQLite planner path (column \"${this.columnName}\" on table \"${this.tableName}\"). Pass the control adapter to createSqliteMigrationPlanner.`, { meta: {\n\t\t\tfactory: this.factoryName,\n\t\t\ttableName: this.tableName,\n\t\t\tcolumnName: this.columnName\n\t\t} });\n\t\tconst checks = columnExistsAst(this.tableName, this.columnName);\n\t\tconst present = await lowerer.lowerToExecuteRequest(checks.columnPresent());\n\t\tconst absent = await lowerer.lowerToExecuteRequest(checks.columnAbsent());\n\t\treturn {\n\t\t\tid: `dropColumn.${this.tableName}.${this.columnName}`,\n\t\t\tlabel: `Drop column ${this.columnName} on ${this.tableName}`,\n\t\t\tsummary: `Drops column ${this.columnName} on ${this.tableName} which is not in the contract`,\n\t\t\toperationClass: \"destructive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"sqlite\",\n\t\t\t\tdetails: buildTargetDetails(\"column\", this.columnName, this.tableName)\n\t\t\t},\n\t\t\tprecheck: [step(`ensure column \"${this.columnName}\" exists on \"${this.tableName}\"`, present.sql, present.params)],\n\t\t\texecute: [step(`drop column \"${this.columnName}\" from \"${this.tableName}\"`, dropColumnExecuteSql(this.tableName, this.columnName))],\n\t\t\tpostcheck: [step(`verify column \"${this.columnName}\" is gone from \"${this.tableName}\"`, absent.sql, absent.params)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.dropColumn({ table: ${jsonToTsSource(this.tableName)}, column: ${jsonToTsSource(this.columnName)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar CreateIndexCall = class extends SqliteOpFactoryCallNode {\n\tfactoryName = \"createIndex\";\n\toperationClass = \"additive\";\n\ttableName;\n\tindexName;\n\tcolumns;\n\tlabel;\n\tconstructor(tableName, indexName, columns) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.indexName = indexName;\n\t\tthis.columns = columns;\n\t\tthis.label = `Create index ${indexName} on ${tableName}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw sqliteError(\"MIGRATION.SQLITE_CONTROL_STACK_MISSING\", `CreateIndexCall.toOp: a lowerer is required on the SQLite planner path (index \"${this.indexName}\" on table \"${this.tableName}\"). Pass the control adapter to createSqliteMigrationPlanner.`, { meta: {\n\t\t\tfactory: this.factoryName,\n\t\t\ttableName: this.tableName,\n\t\t\tindexName: this.indexName\n\t\t} });\n\t\tconst checks = indexExistsAst(this.indexName);\n\t\tconst absent = await lowerer.lowerToExecuteRequest(checks.indexAbsent());\n\t\tconst present = await lowerer.lowerToExecuteRequest(checks.indexPresent());\n\t\treturn {\n\t\t\tid: `index.${this.tableName}.${this.indexName}`,\n\t\t\tlabel: `Create index ${this.indexName} on ${this.tableName}`,\n\t\t\tsummary: `Creates index ${this.indexName} on ${this.tableName}`,\n\t\t\toperationClass: \"additive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"sqlite\",\n\t\t\t\tdetails: buildTargetDetails(\"index\", this.indexName, this.tableName)\n\t\t\t},\n\t\t\tprecheck: [step(`ensure index \"${this.indexName}\" is missing`, absent.sql, absent.params)],\n\t\t\texecute: [step(`create index \"${this.indexName}\"`, buildCreateIndexSql(this.tableName, this.indexName, this.columns))],\n\t\t\tpostcheck: [step(`verify index \"${this.indexName}\" exists`, present.sql, present.params)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.createIndex({ table: ${jsonToTsSource(this.tableName)}, index: ${jsonToTsSource(this.indexName)}, columns: ${jsonToTsSource(this.columns)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar DropIndexCall = class extends SqliteOpFactoryCallNode {\n\tfactoryName = \"dropIndex\";\n\toperationClass = \"destructive\";\n\ttableName;\n\tindexName;\n\tlabel;\n\tconstructor(tableName, indexName) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.indexName = indexName;\n\t\tthis.label = `Drop index ${indexName} on ${tableName}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw sqliteError(\"MIGRATION.SQLITE_CONTROL_STACK_MISSING\", `DropIndexCall.toOp: a lowerer is required on the SQLite planner path (index \"${this.indexName}\" on table \"${this.tableName}\"). Pass the control adapter to createSqliteMigrationPlanner.`, { meta: {\n\t\t\tfactory: this.factoryName,\n\t\t\ttableName: this.tableName,\n\t\t\tindexName: this.indexName\n\t\t} });\n\t\tconst checks = indexExistsAst(this.indexName);\n\t\tconst present = await lowerer.lowerToExecuteRequest(checks.indexPresent());\n\t\tconst absent = await lowerer.lowerToExecuteRequest(checks.indexAbsent());\n\t\treturn {\n\t\t\tid: `dropIndex.${this.tableName}.${this.indexName}`,\n\t\t\tlabel: `Drop index ${this.indexName} on ${this.tableName}`,\n\t\t\tsummary: `Drops index ${this.indexName} on ${this.tableName} which is not in the contract`,\n\t\t\toperationClass: \"destructive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"sqlite\",\n\t\t\t\tdetails: buildTargetDetails(\"index\", this.indexName, this.tableName)\n\t\t\t},\n\t\t\tprecheck: [step(`ensure index \"${this.indexName}\" exists`, present.sql, present.params)],\n\t\t\texecute: [step(`drop index \"${this.indexName}\"`, buildDropIndexSql(this.indexName))],\n\t\t\tpostcheck: [step(`verify index \"${this.indexName}\" is gone`, absent.sql, absent.params)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.dropIndex({ table: ${jsonToTsSource(this.tableName)}, index: ${jsonToTsSource(this.indexName)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\n/**\n* A planner-generated data-transform stub. The current default strategy\n* (`nullabilityTighteningBackfillStrategy`) emits one of these with a\n* backfill-flavored `id`/`label` when the policy allows `'data'` and the\n* contract tightens a column's nullability, but the op itself is generic —\n* any future strategy that needs a placeholder data step can construct one\n* with its own id/label.\n*\n* `toOp()` always throws `MIGRATION.UNFILLED_PLACEHOLDER`: the planner cannot lower a stubbed\n* transform to a runtime op — the user must edit the rendered\n* `migration.ts` and re-emit.\n*/\nvar DataTransformCall = class extends SqliteOpFactoryCallNode {\n\tfactoryName = \"dataTransform\";\n\toperationClass = \"data\";\n\tid;\n\tlabel;\n\ttableName;\n\tcolumnName;\n\tconstructor(id, label, tableName, columnName) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.label = label;\n\t\tthis.tableName = tableName;\n\t\tthis.columnName = columnName;\n\t\tthis.freeze();\n\t}\n\ttoOp(_lowerer) {\n\t\tthrow errorUnfilledPlaceholder(this.label);\n\t}\n\trenderTypeScript() {\n\t\tconst slot = `${this.tableName}-${this.columnName}-backfill-sql`;\n\t\treturn [\n\t\t\t\"dataTransform({\",\n\t\t\t` id: ${jsonToTsSource(this.id)},`,\n\t\t\t` label: ${jsonToTsSource(this.label)},`,\n\t\t\t` table: ${jsonToTsSource(this.tableName)},`,\n\t\t\t` description: ${jsonToTsSource(`Backfill NULL ${this.columnName} values in ${this.tableName}`)},`,\n\t\t\t` run: () => placeholder(${jsonToTsSource(slot)}),`,\n\t\t\t\"})\"\n\t\t].join(\"\\n\");\n\t}\n\timportRequirements() {\n\t\treturn [{\n\t\t\tmoduleSpecifier: TARGET_MIGRATION_MODULE,\n\t\t\tsymbol: this.factoryName\n\t\t}, {\n\t\t\tmoduleSpecifier: TARGET_MIGRATION_MODULE,\n\t\t\tsymbol: \"placeholder\"\n\t\t}];\n\t}\n};\n/**\n* Laundered pre-built operation. Mirrors Postgres's `RawSqlCall`: wraps an\n* already-materialized `SqlMigrationPlanOperation` (typically produced by a\n* SQL-family helper or a codec lifecycle hook) so the planner can carry it\n* alongside structured call IR. `toOp()` returns the stored op unchanged;\n* `renderTypeScript()` emits `rawSql({...})` with the op serialized as a\n* JSON literal — round-tripping requires every field on the op to be\n* JSON-serializable (no closures).\n*/\nvar RawSqlCall = class extends SqliteOpFactoryCallNode {\n\tfactoryName = \"rawSql\";\n\toperationClass;\n\tlabel;\n\top;\n\tconstructor(op) {\n\t\tsuper();\n\t\tthis.op = op;\n\t\tthis.label = op.label;\n\t\tthis.operationClass = op.operationClass;\n\t\tthis.freeze();\n\t}\n\ttoOp(_lowerer) {\n\t\treturn this.op;\n\t}\n\trenderTypeScript() {\n\t\treturn `rawSql(${jsonToTsSource(this.op)})`;\n\t}\n};\n//#endregion\nexport { DropColumnCall as a, RawSqlCall as c, buildRecreateSummary as d, step as f, renderDefaultLiteral as h, DataTransformCall as i, RecreateTableCall as l, buildColumnTypeSql as m, CreateIndexCall as n, DropIndexCall as o, buildColumnDefaultSql as p, CreateTableCall as r, DropTableCall as s, AddColumnCall as t, buildRecreatePostchecks as u };\n\n//# sourceMappingURL=op-factory-call-BCDGjXmK.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,MAAM,2BAA2B;AACjC,SAAS,qBAAqB,YAAY;CACzC,IAAI,CAAC,yBAAyB,KAAK,UAAU,GAAG,MAAM,YAAY,gCAAgC,yCAAyC,WAAW,8DAA8D,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AAC7O;AACA,SAAS,4BAA4B,YAAY;CAChD,IAAI,WAAW,SAAS,GAAG,KAAK,sBAAsB,KAAK,UAAU,GAAG,MAAM,YAAY,4BAA4B,2CAA2C,WAAW,yFAAyF,EAAE,MAAM,EAAE,WAAW,EAAE,CAAC;AAC9R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,CAAC;CACF;AACD;;;;;;;;;;AAUA,IAAI,aAAa,cAAc,wBAAwB;CACtD,cAAc;CACd;CACA;CACA;CACA,YAAY,IAAI;EACf,MAAM;EACN,KAAK,KAAK;EACV,KAAK,QAAQ,GAAG;EAChB,KAAK,iBAAiB,GAAG;EACzB,KAAK,OAAO;CACb;CACA,KAAK,UAAU;EACd,OAAO,KAAK;CACb;CACA,mBAAmB;EAClB,OAAO,UAAU,eAAe,KAAK,EAAE,EAAE;CAC1C;AACD"}
1
+ {"version":3,"file":"op-factory-call-CsNFRTPS-HuMdWaBX.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/op-factory-call-CsNFRTPS.mjs"],"sourcesContent":["import { n as sqliteError } from \"./errors-CKsaaSnD.mjs\";\nimport { n as quoteIdentifier, t as escapeLiteral } from \"./sql-utils-DqPXZBMA.mjs\";\nimport { i as tableExistsAst, n as columnExistsAst, r as indexExistsAst, t as createTable } from \"./ddl-CXduXyOT.mjs\";\nimport { t as buildTargetDetails } from \"./planner-target-details-CIQ789Gc.mjs\";\nimport { n as stripOuterParens } from \"./default-normalizer-DuoHj9-O.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { RelationalSchemaNodeKind } from \"@internal/sql-schema-ir/types\";\nimport { issueOutcome } from \"@internal/framework-components/control\";\nimport { errorUnfilledPlaceholder } from \"@internal/errors/migration\";\nimport { TsExpression, jsonToTsSource } from \"@internal/ts-render\";\nimport { REFERENTIAL_ACTION_SQL } from \"@internal/sql-contract/referential-action-sql\";\n//#region src/core/migrations/planner-ddl-builders.ts\nconst SAFE_NATIVE_TYPE_PATTERN = /^[a-zA-Z][a-zA-Z0-9_ ]*$/;\nfunction assertSafeNativeType(nativeType) {\n\tif (!SAFE_NATIVE_TYPE_PATTERN.test(nativeType)) throw sqliteError(\"CONTRACT.NATIVE_TYPE_INVALID\", `Unsafe native type name in contract: \"${nativeType}\". Native type names must match /^[a-zA-Z][a-zA-Z0-9_ ]*\\$/`, { meta: { nativeType } });\n}\nfunction assertSafeDefaultExpression(expression) {\n\tif (expression.includes(\";\") || /--|\\/\\*|\\bSELECT\\b/i.test(expression)) throw sqliteError(\"CONTRACT.DEFAULT_INVALID\", `Unsafe default expression in contract: \"${expression}\". Default expressions must not contain semicolons, SQL comment tokens, or subqueries.`, { meta: { expression } });\n}\n/**\n* Renders the column's DDL type token (e.g. `\"INTEGER\"`, `\"TEXT\"`).\n* Resolves `typeRef` against `storageTypes` and validates the resulting\n* native type against a safe-identifier pattern.\n*/\nfunction buildColumnTypeSql(column, storageTypes = {}) {\n\tconst resolved = resolveColumnTypeMetadata(column, storageTypes);\n\tassertSafeNativeType(resolved.nativeType);\n\treturn resolved.nativeType.toUpperCase();\n}\n/**\n* Renders the column's `DEFAULT …` clause. Returns the empty string when\n* there is no default, and also when the default is `autoincrement()` —\n* SQLite encodes that as `INTEGER PRIMARY KEY AUTOINCREMENT` inline on the\n* column definition, not as a separate DEFAULT.\n*/\nfunction buildColumnDefaultSql(columnDefault) {\n\tif (!columnDefault) return \"\";\n\tswitch (columnDefault.kind) {\n\t\tcase \"literal\": return `DEFAULT ${renderDefaultLiteral(columnDefault.value)}`;\n\t\tcase \"function\":\n\t\t\tif (columnDefault.expression === \"autoincrement()\") return \"\";\n\t\t\tif (columnDefault.expression === \"now()\") return \"DEFAULT (datetime('now'))\";\n\t\t\tassertSafeDefaultExpression(columnDefault.expression);\n\t\t\treturn `DEFAULT (${columnDefault.expression})`;\n\t}\n}\nfunction renderDefaultLiteral(value) {\n\tif (value instanceof Date) return `'${escapeLiteral(value.toISOString())}'`;\n\tif (typeof value === \"string\") return `'${escapeLiteral(value)}'`;\n\tif (typeof value === \"number\" || typeof value === \"bigint\") return String(value);\n\tif (typeof value === \"boolean\") return value ? \"1\" : \"0\";\n\tif (value === null) return \"NULL\";\n\treturn `'${escapeLiteral(JSON.stringify(value))}'`;\n}\nfunction buildCreateIndexSql(tableName, indexName, columns, unique = false) {\n\treturn `CREATE ${unique ? \"UNIQUE \" : \"\"}INDEX ${quoteIdentifier(indexName)} ON ${quoteIdentifier(tableName)} (${columns.map(quoteIdentifier).join(\", \")})`;\n}\nfunction buildDropIndexSql(indexName) {\n\treturn `DROP INDEX IF EXISTS ${quoteIdentifier(indexName)}`;\n}\nfunction resolveColumnTypeMetadata(column, storageTypes) {\n\tif (!column.typeRef) return column;\n\tconst referencedType = storageTypes[column.typeRef];\n\tif (!referencedType) throw sqliteError(\"CONTRACT.TYPE_UNKNOWN\", `Storage type \"${column.typeRef}\" referenced by column is not defined in storage.types.`, { meta: { typeRef: column.typeRef } });\n\treturn {\n\t\tcodecId: referencedType.codecId,\n\t\tnativeType: referencedType.nativeType,\n\t\ttypeParams: referencedType.typeParams\n\t};\n}\n//#endregion\n//#region src/core/migrations/operations/shared.ts\nfunction step(description, sql, params) {\n\treturn {\n\t\tdescription,\n\t\tsql,\n\t\t...ifDefined(\"params\", params)\n\t};\n}\n/**\n* Renders a single column's inline DDL fragment within a `CREATE TABLE`\n* statement. Honours the `inlineAutoincrementPrimaryKey` flag — SQLite\n* treats `INTEGER PRIMARY KEY AUTOINCREMENT` as a special form that aliases\n* `rowid`, and the column must not carry a `DEFAULT` or repeat `NOT NULL`.\n*/\nfunction renderColumnDefinition(column) {\n\tconst parts = [quoteIdentifier(column.name), column.typeSql];\n\tif (column.inlineAutoincrementPrimaryKey) parts.push(\"PRIMARY KEY AUTOINCREMENT\");\n\telse {\n\t\tif (column.defaultSql) parts.push(column.defaultSql);\n\t\tif (!column.nullable) parts.push(\"NOT NULL\");\n\t}\n\treturn parts.join(\" \");\n}\n/**\n* Renders an inline FOREIGN KEY constraint clause for a `CREATE TABLE`\n* body. Every `SqliteForeignKeySpec` is constraint-bearing by construction\n* (`tableSpecFromNode` only ever builds specs from schema-IR FK nodes, which\n* are themselves constraint-only — a non-constraint FK contributes no node).\n*/\nfunction renderForeignKeyClause(fk) {\n\tlet sql = `${fk.name ? `CONSTRAINT ${quoteIdentifier(fk.name)} ` : \"\"}FOREIGN KEY (${fk.columns.map(quoteIdentifier).join(\", \")}) REFERENCES ${quoteIdentifier(fk.references.table)} (${fk.references.columns.map(quoteIdentifier).join(\", \")})`;\n\tif (fk.onDelete !== void 0) sql += ` ON DELETE ${REFERENTIAL_ACTION_SQL[fk.onDelete]}`;\n\tif (fk.onUpdate !== void 0) sql += ` ON UPDATE ${REFERENTIAL_ACTION_SQL[fk.onUpdate]}`;\n\treturn sql;\n}\n//#endregion\n//#region src/core/migrations/operations/columns.ts\nfunction addColumnExecuteSql(tableName, column) {\n\treturn [\n\t\t`ALTER TABLE ${quoteIdentifier(tableName)}`,\n\t\t`ADD COLUMN ${quoteIdentifier(column.name)} ${column.typeSql}`,\n\t\tcolumn.defaultSql,\n\t\tcolumn.nullable ? \"\" : \"NOT NULL\"\n\t].filter(Boolean).join(\" \");\n}\nfunction dropColumnExecuteSql(tableName, columnName) {\n\treturn `ALTER TABLE ${quoteIdentifier(tableName)} DROP COLUMN ${quoteIdentifier(columnName)}`;\n}\n//#endregion\n//#region src/core/migrations/operations/tables.ts\nasync function tableExistsSteps(lowerer, tableName) {\n\tconst checks = tableExistsAst(tableName);\n\treturn {\n\t\tpresent: await lowerer.lowerToExecuteRequest(checks.tablePresent()),\n\t\tabsent: await lowerer.lowerToExecuteRequest(checks.tableAbsent())\n\t};\n}\n/**\n* Renders the body of a `CREATE TABLE <name> ( … )` statement from a flat\n* `SqliteTableSpec`. SQLite's `INTEGER PRIMARY KEY AUTOINCREMENT` form is\n* inline on the column; the table-level PRIMARY KEY clause is emitted only\n* when no column carries `inlineAutoincrementPrimaryKey`.\n*/\nfunction renderCreateTableSql(tableName, spec) {\n\tconst columnDefs = spec.columns.map(renderColumnDefinition);\n\tconst constraintDefs = [];\n\tconst hasInlinePk = spec.columns.some((c) => c.inlineAutoincrementPrimaryKey);\n\tif (spec.primaryKey && !hasInlinePk) constraintDefs.push(`PRIMARY KEY (${spec.primaryKey.columns.map(quoteIdentifier).join(\", \")})`);\n\tfor (const u of spec.uniques ?? []) {\n\t\tconst name = u.name ? `CONSTRAINT ${quoteIdentifier(u.name)} ` : \"\";\n\t\tconstraintDefs.push(`${name}UNIQUE (${u.columns.map(quoteIdentifier).join(\", \")})`);\n\t}\n\tfor (const fk of spec.foreignKeys ?? []) {\n\t\tconst clause = renderForeignKeyClause(fk);\n\t\tif (clause) constraintDefs.push(clause);\n\t}\n\tconst allDefs = [...columnDefs, ...constraintDefs];\n\treturn `CREATE TABLE ${quoteIdentifier(tableName)} (\\n ${allDefs.join(\",\\n \")}\\n)`;\n}\nasync function recreateTable(args, lowerer) {\n\tconst { tableName, contractTable, schemaColumnNames, indexes, summary, postchecks, operationClass } = args;\n\tconst tempName = `_prisma_new_${tableName}`;\n\tconst liveSet = new Set(schemaColumnNames);\n\tconst sharedColumns = contractTable.columns.filter((c) => liveSet.has(c.name)).map((c) => c.name);\n\tconst columnList = sharedColumns.map(quoteIdentifier).join(\", \");\n\tconst indexStatements = indexes.map((idx) => ({\n\t\tdescription: `recreate index \"${idx.name}\" on \"${tableName}\"`,\n\t\tsql: buildCreateIndexSql(tableName, idx.name, idx.columns)\n\t}));\n\tconst copyStep = sharedColumns.length > 0 ? [step(`copy data from \"${tableName}\" to \"${tempName}\"`, `INSERT INTO ${quoteIdentifier(tempName)} (${columnList}) SELECT ${columnList} FROM ${quoteIdentifier(tableName)}`)] : [];\n\tconst tableSteps = await tableExistsSteps(lowerer, tableName);\n\tconst tempSteps = await tableExistsSteps(lowerer, tempName);\n\treturn {\n\t\tid: `recreateTable.${tableName}`,\n\t\tlabel: `Recreate table ${tableName}`,\n\t\tsummary,\n\t\toperationClass,\n\t\ttarget: {\n\t\t\tid: \"sqlite\",\n\t\t\tdetails: buildTargetDetails(\"table\", tableName)\n\t\t},\n\t\tprecheck: [step(`ensure table \"${tableName}\" exists`, tableSteps.present.sql, tableSteps.present.params), step(`ensure temp table \"${tempName}\" does not exist`, tempSteps.absent.sql, tempSteps.absent.params)],\n\t\texecute: [\n\t\t\tstep(`create new table \"${tempName}\" with desired schema`, renderCreateTableSql(tempName, contractTable)),\n\t\t\t...copyStep,\n\t\t\tstep(`drop old table \"${tableName}\"`, `DROP TABLE ${quoteIdentifier(tableName)}`),\n\t\t\tstep(`rename \"${tempName}\" to \"${tableName}\"`, `ALTER TABLE ${quoteIdentifier(tempName)} RENAME TO ${quoteIdentifier(tableName)}`),\n\t\t\t...indexStatements\n\t\t],\n\t\tpostcheck: [\n\t\t\tstep(`verify table \"${tableName}\" exists`, tableSteps.present.sql, tableSteps.present.params),\n\t\t\tstep(`verify temp table \"${tempName}\" is gone`, tempSteps.absent.sql, tempSteps.absent.params),\n\t\t\t...postchecks\n\t\t]\n\t};\n}\n/**\n* Build a one-line summary of a recreate-table operation from the schema-diff\n* issues that triggered it. Lives next to `recreateTable` so the planner\n* (which has the issues) can produce the same description the factory\n* used to build inline. Keeping the formatting target-side keeps\n* `RecreateTableCall` issue-free at the IR layer. `SchemaDiffIssue` carries\n* no rendered message, so this renders one from each issue's path.\n*/\nfunction buildRecreateSummary(tableName, issues) {\n\treturn `Recreates table ${tableName} to apply schema changes: ${issues.map((i) => i.path.join(\"/\")).join(\"; \")}`;\n}\nfunction nodeKindOf(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\treturn blindCast(node).nodeKind;\n}\n/** Mirrors `SqlColumnIR.isEqualTo`'s type comparison, isolated so a `not-equal` column issue's postcheck can target type drift and nullability drift independently. */\nfunction columnTypeChanged(expected, actual) {\n\tif (expected.resolvedNativeType !== void 0 && actual.resolvedNativeType !== void 0) return expected.resolvedNativeType !== actual.resolvedNativeType;\n\treturn expected.nativeType !== actual.nativeType || Boolean(expected.many) !== Boolean(actual.many);\n}\n/**\n* Returns the columns the contract expects as the table's primary key. Picks\n* up SQLite's inline `INTEGER PRIMARY KEY AUTOINCREMENT` form when no\n* explicit `primaryKey` clause is set on the spec.\n*/\nfunction expectedPrimaryKeyColumns(spec) {\n\tif (spec.primaryKey) return spec.primaryKey.columns;\n\tconst inlinePk = spec.columns.find((c) => c.inlineAutoincrementPrimaryKey);\n\treturn inlinePk ? [inlinePk.name] : [];\n}\nfunction quoteSqlList(values) {\n\treturn values.map((v) => `'${escapeLiteral(v)}'`).join(\", \");\n}\nfunction columnNameFromNode(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\treturn blindCast(node).name;\n}\n/**\n* A column-default issue's own node has no back-reference to its owning\n* column — it's a transient child built by `SqlColumnIR.children()`. The\n* column's id (`column:<name>`) is always the diff path's second-to-last\n* segment for a default issue (`[..., tableId, columnId, 'default']`), so\n* the name is recovered from the path rather than the node.\n*/\nfunction columnNameFromDefaultIssuePath(issue) {\n\tconst columnId = issue.path[issue.path.length - 2];\n\tif (columnId === void 0) return void 0;\n\treturn columnId.startsWith(\"column:\") ? columnId.slice(7) : columnId;\n}\n/**\n* Per-issue postchecks verifying the recreated table's shape against the\n* expected spec. Column-level issues (`sql-column` `not-equal`,\n* `sql-column-default` any reason) emit one targeted check each;\n* constraint-level issues (`sql-primary-key`, `sql-unique`, `sql-foreign-key`,\n* any reason) emit one `pragma_*`-driven check per declared constraint in the\n* expected spec, so a recreated table with the right columns but the wrong\n* PK / unique / FK shape fails the postcheck instead of passing silently.\n* Exported so the planner can pre-build the list at construction time and\n* `RecreateTableCall` doesn't have to carry `SchemaDiffIssue` objects through\n* to render time.\n*/\nfunction buildRecreatePostchecks(tableName, issues, spec) {\n\tconst checks = [];\n\tconst t = escapeLiteral(tableName);\n\tconst byName = new Map(spec.columns.map((c) => [c.name, c]));\n\tlet hasPkIssue = false;\n\tlet hasUniqueIssue = false;\n\tlet hasFkIssue = false;\n\tfor (const issue of issues) {\n\t\tconst nodeKind = nodeKindOf(issue);\n\t\tif (nodeKind === RelationalSchemaNodeKind.column && issueOutcome(issue) === \"not-equal\") {\n\t\t\tconst columnName = columnNameFromNode(issue);\n\t\t\tif (columnName === void 0) continue;\n\t\t\tconst c = escapeLiteral(columnName);\n\t\t\tconst expected = blindCast(issue.expected);\n\t\t\tconst actual = blindCast(issue.actual);\n\t\t\tif (expected.nullable !== actual.nullable) checks.push({\n\t\t\t\tdescription: `verify \"${columnName}\" nullability on \"${tableName}\"`,\n\t\t\t\tsql: `SELECT COUNT(*) > 0 FROM pragma_table_info('${t}') WHERE name = '${c}' AND \"notnull\" = ${expected.nullable ? 0 : 1}`\n\t\t\t});\n\t\t\tif (columnTypeChanged(expected, actual)) {\n\t\t\t\tconst colSpec = byName.get(columnName);\n\t\t\t\tif (colSpec) checks.push({\n\t\t\t\t\tdescription: `verify \"${columnName}\" type on \"${tableName}\"`,\n\t\t\t\t\tsql: `SELECT COUNT(*) > 0 FROM pragma_table_info('${t}') WHERE name = '${c}' AND LOWER(type) = '${escapeLiteral(colSpec.typeSql.toLowerCase())}'`\n\t\t\t\t});\n\t\t\t}\n\t\t\tcontinue;\n\t\t}\n\t\tif (nodeKind === RelationalSchemaNodeKind.columnDefault) {\n\t\t\tconst columnName = columnNameFromDefaultIssuePath(issue);\n\t\t\tif (columnName === void 0) continue;\n\t\t\tconst c = escapeLiteral(columnName);\n\t\t\tif (issueOutcome(issue) === \"not-expected\") {\n\t\t\t\tchecks.push({\n\t\t\t\t\tdescription: `verify \"${columnName}\" has no default on \"${tableName}\"`,\n\t\t\t\t\tsql: `SELECT COUNT(*) > 0 FROM pragma_table_info('${t}') WHERE name = '${c}' AND dflt_value IS NULL`\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst colSpec = byName.get(columnName);\n\t\t\tconst expectedRaw = colSpec?.defaultSql.startsWith(\"DEFAULT \") ? stripOuterParens(colSpec.defaultSql.slice(8)) : null;\n\t\t\tif (expectedRaw) checks.push({\n\t\t\t\tdescription: `verify \"${columnName}\" default on \"${tableName}\"`,\n\t\t\t\tsql: `SELECT COUNT(*) > 0 FROM pragma_table_info('${t}') WHERE name = '${c}' AND dflt_value = '${escapeLiteral(expectedRaw)}'`\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tif (nodeKind === RelationalSchemaNodeKind.primaryKey) hasPkIssue = true;\n\t\tif (nodeKind === RelationalSchemaNodeKind.unique) hasUniqueIssue = true;\n\t\tif (nodeKind === RelationalSchemaNodeKind.foreignKey) hasFkIssue = true;\n\t}\n\tif (hasPkIssue) {\n\t\tconst pkColumns = expectedPrimaryKeyColumns(spec);\n\t\tconst colCount = pkColumns.length;\n\t\tif (colCount === 0) checks.push({\n\t\t\tdescription: `verify \"${tableName}\" has no primary key`,\n\t\t\tsql: `SELECT (SELECT COUNT(*) FROM pragma_table_info('${t}') WHERE pk > 0) = 0`\n\t\t});\n\t\telse checks.push({\n\t\t\tdescription: `verify primary key on \"${tableName}\"`,\n\t\t\tsql: `SELECT (SELECT COUNT(*) FROM pragma_table_info('${t}') WHERE pk > 0) = ${colCount} AND (SELECT COUNT(*) FROM pragma_table_info('${t}') WHERE pk > 0 AND name IN (${quoteSqlList(pkColumns)})) = ${colCount}`\n\t\t});\n\t}\n\tif (hasUniqueIssue) for (const u of spec.uniques ?? []) {\n\t\tconst colCount = u.columns.length;\n\t\tconst description = u.name ? `verify unique constraint \"${u.name}\" on \"${tableName}\"` : `verify unique constraint (${u.columns.join(\", \")}) on \"${tableName}\"`;\n\t\tchecks.push({\n\t\t\tdescription,\n\t\t\tsql: `SELECT EXISTS (SELECT 1 FROM pragma_index_list('${t}') l WHERE l.\"unique\" = 1 AND (SELECT COUNT(*) FROM pragma_index_info(l.name)) = ${colCount} AND (SELECT COUNT(*) FROM pragma_index_info(l.name) WHERE name IN (${quoteSqlList(u.columns)})) = ${colCount})`\n\t\t});\n\t}\n\tif (hasFkIssue) for (const fk of spec.foreignKeys ?? []) {\n\t\tconst refTable = escapeLiteral(fk.references.table);\n\t\tconst colCount = fk.columns.length;\n\t\tconst tuples = fk.columns.map((from, i) => {\n\t\t\tconst to = fk.references.columns[i] ?? from;\n\t\t\treturn `('${escapeLiteral(from)}', '${escapeLiteral(to)}')`;\n\t\t}).join(\", \");\n\t\tconst description = `verify foreign key (${fk.columns.join(\", \")}) → ${fk.references.table}(${fk.references.columns.join(\", \")}) on \"${tableName}\"`;\n\t\tchecks.push({\n\t\t\tdescription,\n\t\t\tsql: `SELECT EXISTS (SELECT 1 FROM pragma_foreign_key_list('${t}') f WHERE f.\"table\" = '${refTable}' GROUP BY f.id HAVING COUNT(*) = ${colCount} AND SUM(CASE WHEN (f.\"from\", f.\"to\") IN (${tuples}) THEN 1 ELSE 0 END) = ${colCount})`\n\t\t});\n\t}\n\treturn checks;\n}\n//#endregion\n//#region src/core/migrations/op-factory-call.ts\n/**\n* SQLite migration IR: one concrete `*Call` class per pure factory under\n* `operations/`, plus a shared `SqliteOpFactoryCallNode` abstract base.\n*\n* Each call class carries fully-resolved literal arguments. `CreateTableCall`\n* holds structured `DdlColumn[]` + `DdlTableConstraint[]` and lowers via the\n* adapter's DDL path; other call classes carry flat SQL fragments. Codec /\n* `typeRef` / default expansion happens upstream in the issue-planner /\n* strategies, mirroring the Postgres `ColumnSpec` pattern.\n*/\nconst TARGET_MIGRATION_MODULE = \"@internal/sqlite/migration\";\nvar SqliteOpFactoryCallNode = class extends TsExpression {\n\timportRequirements() {\n\t\treturn [{\n\t\t\tmoduleSpecifier: TARGET_MIGRATION_MODULE,\n\t\t\tsymbol: this.factoryName\n\t\t}];\n\t}\n\tfreeze() {\n\t\tObject.freeze(this);\n\t}\n};\nfunction renderDdlColumnDefault(def) {\n\tif (!def) return \"\";\n\tif (def.kind === \"literal\") return `lit(${jsonToTsSource(def.value)})`;\n\treturn `fn(${jsonToTsSource(def.expression)})`;\n}\nfunction renderDdlColumnAsTsCall(column) {\n\tconst opts = [];\n\tif (column.notNull) opts.push(\"notNull: true\");\n\tif (column.primaryKey) opts.push(\"primaryKey: true\");\n\tif (column.default) opts.push(`default: ${renderDdlColumnDefault(column.default)}`);\n\tconst optsStr = opts.length > 0 ? `, { ${opts.join(\", \")} }` : \"\";\n\treturn `col(${jsonToTsSource(column.name)}, ${jsonToTsSource(column.type)}${optsStr})`;\n}\nfunction renderDdlConstraintAsTsCall(constraint) {\n\tswitch (constraint.kind) {\n\t\tcase \"primary-key\": {\n\t\t\tconst nameOpt = constraint.name ? `, { name: ${jsonToTsSource(constraint.name)} }` : \"\";\n\t\t\treturn `primaryKey(${jsonToTsSource(constraint.columns)}${nameOpt})`;\n\t\t}\n\t\tcase \"foreign-key\": {\n\t\t\tconst opts = [];\n\t\t\tif (constraint.name) opts.push(`name: ${jsonToTsSource(constraint.name)}`);\n\t\t\tif (constraint.onDelete) opts.push(`onDelete: ${jsonToTsSource(constraint.onDelete)}`);\n\t\t\tif (constraint.onUpdate) opts.push(`onUpdate: ${jsonToTsSource(constraint.onUpdate)}`);\n\t\t\tconst optsStr = opts.length > 0 ? `, { ${opts.join(\", \")} }` : \"\";\n\t\t\treturn `foreignKey(${jsonToTsSource(constraint.columns)}, ${jsonToTsSource(constraint.refTable)}, ${jsonToTsSource(constraint.refColumns)}${optsStr})`;\n\t\t}\n\t\tcase \"unique\": {\n\t\t\tconst nameOpt = constraint.name ? `, { name: ${jsonToTsSource(constraint.name)} }` : \"\";\n\t\t\treturn `unique(${jsonToTsSource(constraint.columns)}${nameOpt})`;\n\t\t}\n\t\tcase \"check-expression\": throw sqliteError(\"CONTRACT.CONSTRAINT_INVALID\", `SQLite does not support expression CHECK constraints (constraint \"${constraint.name}\"). Scalar-array columns and their element-non-null checks are Postgres-only.`, { meta: { constraintName: constraint.name } });\n\t}\n}\nfunction constraintImportSymbols(constraints) {\n\tif (!constraints || constraints.length === 0) return [];\n\tconst symbols = /* @__PURE__ */ new Set();\n\tfor (const c of constraints) if (c.kind === \"primary-key\") symbols.add(\"primaryKey\");\n\telse if (c.kind === \"foreign-key\") symbols.add(\"foreignKey\");\n\telse if (c.kind === \"unique\") symbols.add(\"unique\");\n\treturn [...symbols];\n}\nfunction defaultImportSymbols(columns) {\n\tconst symbols = /* @__PURE__ */ new Set();\n\tfor (const col of columns) if (col.default?.kind === \"literal\") symbols.add(\"lit\");\n\telse if (col.default?.kind === \"function\") symbols.add(\"fn\");\n\treturn [...symbols];\n}\nvar CreateTableCall = class extends SqliteOpFactoryCallNode {\n\tfactoryName = \"createTable\";\n\toperationClass = \"additive\";\n\ttableName;\n\tcolumns;\n\tconstraints;\n\tlabel;\n\tconstructor(tableName, columns, constraints) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.columns = Object.freeze([...columns]);\n\t\tthis.constraints = constraints ? Object.freeze([...constraints]) : void 0;\n\t\tthis.label = `Create table ${tableName}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw sqliteError(\"MIGRATION.SQLITE_CONTROL_STACK_MISSING\", `CreateTableCall.toOp: a DDL lowerer is required on the SQLite planner path (table \"${this.tableName}\"). Pass the control adapter to createSqliteMigrationPlanner.`, { meta: {\n\t\t\tfactory: this.factoryName,\n\t\t\ttableName: this.tableName\n\t\t} });\n\t\tconst ddlNode = createTable({\n\t\t\ttable: this.tableName,\n\t\t\tcolumns: this.columns,\n\t\t\t...ifDefined(\"constraints\", this.constraints)\n\t\t});\n\t\tconst statement = await lowerer.lowerToExecuteRequest(ddlNode);\n\t\tconst tableName = this.tableName;\n\t\tconst tableChecks = tableExistsAst(tableName);\n\t\tconst absent = await lowerer.lowerToExecuteRequest(tableChecks.tableAbsent());\n\t\tconst present = await lowerer.lowerToExecuteRequest(tableChecks.tablePresent());\n\t\treturn {\n\t\t\tid: `table.${tableName}`,\n\t\t\tlabel: `Create table ${tableName}`,\n\t\t\tsummary: `Creates table ${tableName} with required columns`,\n\t\t\toperationClass: \"additive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"sqlite\",\n\t\t\t\tdetails: buildTargetDetails(\"table\", tableName)\n\t\t\t},\n\t\t\tprecheck: [step(`ensure table \"${tableName}\" does not exist`, absent.sql, absent.params)],\n\t\t\texecute: [{\n\t\t\t\tdescription: `create table \"${tableName}\"`,\n\t\t\t\tsql: statement.sql,\n\t\t\t\tparams: statement.params ?? []\n\t\t\t}],\n\t\t\tpostcheck: [step(`verify table \"${tableName}\" exists`, present.sql, present.params)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\tconst columnsList = this.columns.map(renderDdlColumnAsTsCall).join(\", \");\n\t\tconst constraintsList = this.constraints ? this.constraints.map(renderDdlConstraintAsTsCall).join(\", \") : void 0;\n\t\tconst opts = [];\n\t\topts.push(`table: ${jsonToTsSource(this.tableName)}`);\n\t\topts.push(`columns: [${columnsList}]`);\n\t\tif (constraintsList) opts.push(`constraints: [${constraintsList}]`);\n\t\treturn `this.createTable({ ${opts.join(\", \")} })`;\n\t}\n\timportRequirements() {\n\t\tconst req = [];\n\t\tif (this.columns.length > 0) {\n\t\t\treq.push({\n\t\t\t\tmoduleSpecifier: TARGET_MIGRATION_MODULE,\n\t\t\t\tsymbol: \"col\"\n\t\t\t});\n\t\t\tfor (const sym of defaultImportSymbols(this.columns)) req.push({\n\t\t\t\tmoduleSpecifier: TARGET_MIGRATION_MODULE,\n\t\t\t\tsymbol: sym\n\t\t\t});\n\t\t}\n\t\tfor (const sym of constraintImportSymbols(this.constraints)) req.push({\n\t\t\tmoduleSpecifier: TARGET_MIGRATION_MODULE,\n\t\t\tsymbol: sym\n\t\t});\n\t\treturn req;\n\t}\n};\nvar DropTableCall = class extends SqliteOpFactoryCallNode {\n\tfactoryName = \"dropTable\";\n\toperationClass = \"destructive\";\n\ttableName;\n\tlabel;\n\tconstructor(tableName) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.label = `Drop table ${tableName}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw sqliteError(\"MIGRATION.SQLITE_CONTROL_STACK_MISSING\", `DropTableCall.toOp: a lowerer is required on the SQLite planner path (table \"${this.tableName}\"). Pass the control adapter to createSqliteMigrationPlanner.`, { meta: {\n\t\t\tfactory: this.factoryName,\n\t\t\ttableName: this.tableName\n\t\t} });\n\t\tconst checks = tableExistsAst(this.tableName);\n\t\tconst present = await lowerer.lowerToExecuteRequest(checks.tablePresent());\n\t\tconst absent = await lowerer.lowerToExecuteRequest(checks.tableAbsent());\n\t\treturn {\n\t\t\tid: `dropTable.${this.tableName}`,\n\t\t\tlabel: `Drop table ${this.tableName}`,\n\t\t\tsummary: `Drops table ${this.tableName} which is not in the contract`,\n\t\t\toperationClass: \"destructive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"sqlite\",\n\t\t\t\tdetails: buildTargetDetails(\"table\", this.tableName)\n\t\t\t},\n\t\t\tprecheck: [step(`ensure table \"${this.tableName}\" exists`, present.sql, present.params)],\n\t\t\texecute: [step(`drop table \"${this.tableName}\"`, `DROP TABLE ${quoteIdentifier(this.tableName)}`)],\n\t\t\tpostcheck: [step(`verify table \"${this.tableName}\" is gone`, absent.sql, absent.params)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.dropTable({ table: ${jsonToTsSource(this.tableName)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar RecreateTableCall = class extends SqliteOpFactoryCallNode {\n\tfactoryName = \"recreateTable\";\n\toperationClass;\n\ttableName;\n\tcontractTable;\n\tschemaColumnNames;\n\tindexes;\n\tsummary;\n\tpostchecks;\n\tlabel;\n\tconstructor(args) {\n\t\tsuper();\n\t\tthis.tableName = args.tableName;\n\t\tthis.contractTable = args.contractTable;\n\t\tthis.schemaColumnNames = args.schemaColumnNames;\n\t\tthis.indexes = args.indexes;\n\t\tthis.summary = args.summary;\n\t\tthis.postchecks = args.postchecks;\n\t\tthis.operationClass = args.operationClass;\n\t\tthis.label = `Recreate table ${args.tableName}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw sqliteError(\"MIGRATION.SQLITE_CONTROL_STACK_MISSING\", `RecreateTableCall.toOp: a lowerer is required on the SQLite planner path (table \"${this.tableName}\"). Pass the control adapter to createSqliteMigrationPlanner.`, { meta: {\n\t\t\tfactory: this.factoryName,\n\t\t\ttableName: this.tableName\n\t\t} });\n\t\treturn recreateTable({\n\t\t\ttableName: this.tableName,\n\t\t\tcontractTable: this.contractTable,\n\t\t\tschemaColumnNames: this.schemaColumnNames,\n\t\t\tindexes: this.indexes,\n\t\t\tsummary: this.summary,\n\t\t\tpostchecks: this.postchecks,\n\t\t\toperationClass: this.operationClass\n\t\t}, lowerer);\n\t}\n\trenderTypeScript() {\n\t\treturn `this.recreateTable(${jsonToTsSource({\n\t\t\ttableName: this.tableName,\n\t\t\tcontractTable: this.contractTable,\n\t\t\tschemaColumnNames: this.schemaColumnNames,\n\t\t\tindexes: this.indexes,\n\t\t\tsummary: this.summary,\n\t\t\tpostchecks: this.postchecks,\n\t\t\toperationClass: this.operationClass\n\t\t})})`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar AddColumnCall = class extends SqliteOpFactoryCallNode {\n\tfactoryName = \"addColumn\";\n\toperationClass = \"additive\";\n\ttableName;\n\tcolumnName;\n\tcolumn;\n\tlabel;\n\tconstructor(tableName, column) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.columnName = column.name;\n\t\tthis.column = column;\n\t\tthis.label = `Add column ${column.name} on ${tableName}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw sqliteError(\"MIGRATION.SQLITE_CONTROL_STACK_MISSING\", `AddColumnCall.toOp: a lowerer is required on the SQLite planner path (column \"${this.column.name}\" on table \"${this.tableName}\"). Pass the control adapter to createSqliteMigrationPlanner.`, { meta: {\n\t\t\tfactory: this.factoryName,\n\t\t\ttableName: this.tableName,\n\t\t\tcolumnName: this.column.name\n\t\t} });\n\t\tconst checks = columnExistsAst(this.tableName, this.column.name);\n\t\tconst absent = await lowerer.lowerToExecuteRequest(checks.columnAbsent());\n\t\tconst present = await lowerer.lowerToExecuteRequest(checks.columnPresent());\n\t\treturn {\n\t\t\tid: `column.${this.tableName}.${this.column.name}`,\n\t\t\tlabel: `Add column ${this.column.name} on ${this.tableName}`,\n\t\t\tsummary: `Adds column ${this.column.name} on ${this.tableName}`,\n\t\t\toperationClass: \"additive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"sqlite\",\n\t\t\t\tdetails: buildTargetDetails(\"column\", this.column.name, this.tableName)\n\t\t\t},\n\t\t\tprecheck: [step(`ensure column \"${this.column.name}\" is missing`, absent.sql, absent.params)],\n\t\t\texecute: [step(`add column \"${this.column.name}\"`, addColumnExecuteSql(this.tableName, this.column))],\n\t\t\tpostcheck: [step(`verify column \"${this.column.name}\" exists`, present.sql, present.params)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.addColumn({ table: ${jsonToTsSource(this.tableName)}, column: ${jsonToTsSource(this.column)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar DropColumnCall = class extends SqliteOpFactoryCallNode {\n\tfactoryName = \"dropColumn\";\n\toperationClass = \"destructive\";\n\ttableName;\n\tcolumnName;\n\tlabel;\n\tconstructor(tableName, columnName) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.columnName = columnName;\n\t\tthis.label = `Drop column ${columnName} on ${tableName}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw sqliteError(\"MIGRATION.SQLITE_CONTROL_STACK_MISSING\", `DropColumnCall.toOp: a lowerer is required on the SQLite planner path (column \"${this.columnName}\" on table \"${this.tableName}\"). Pass the control adapter to createSqliteMigrationPlanner.`, { meta: {\n\t\t\tfactory: this.factoryName,\n\t\t\ttableName: this.tableName,\n\t\t\tcolumnName: this.columnName\n\t\t} });\n\t\tconst checks = columnExistsAst(this.tableName, this.columnName);\n\t\tconst present = await lowerer.lowerToExecuteRequest(checks.columnPresent());\n\t\tconst absent = await lowerer.lowerToExecuteRequest(checks.columnAbsent());\n\t\treturn {\n\t\t\tid: `dropColumn.${this.tableName}.${this.columnName}`,\n\t\t\tlabel: `Drop column ${this.columnName} on ${this.tableName}`,\n\t\t\tsummary: `Drops column ${this.columnName} on ${this.tableName} which is not in the contract`,\n\t\t\toperationClass: \"destructive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"sqlite\",\n\t\t\t\tdetails: buildTargetDetails(\"column\", this.columnName, this.tableName)\n\t\t\t},\n\t\t\tprecheck: [step(`ensure column \"${this.columnName}\" exists on \"${this.tableName}\"`, present.sql, present.params)],\n\t\t\texecute: [step(`drop column \"${this.columnName}\" from \"${this.tableName}\"`, dropColumnExecuteSql(this.tableName, this.columnName))],\n\t\t\tpostcheck: [step(`verify column \"${this.columnName}\" is gone from \"${this.tableName}\"`, absent.sql, absent.params)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.dropColumn({ table: ${jsonToTsSource(this.tableName)}, column: ${jsonToTsSource(this.columnName)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar CreateIndexCall = class extends SqliteOpFactoryCallNode {\n\tfactoryName = \"createIndex\";\n\toperationClass = \"additive\";\n\ttableName;\n\tindexName;\n\tcolumns;\n\tlabel;\n\tconstructor(tableName, indexName, columns) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.indexName = indexName;\n\t\tthis.columns = columns;\n\t\tthis.label = `Create index ${indexName} on ${tableName}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw sqliteError(\"MIGRATION.SQLITE_CONTROL_STACK_MISSING\", `CreateIndexCall.toOp: a lowerer is required on the SQLite planner path (index \"${this.indexName}\" on table \"${this.tableName}\"). Pass the control adapter to createSqliteMigrationPlanner.`, { meta: {\n\t\t\tfactory: this.factoryName,\n\t\t\ttableName: this.tableName,\n\t\t\tindexName: this.indexName\n\t\t} });\n\t\tconst checks = indexExistsAst(this.indexName);\n\t\tconst absent = await lowerer.lowerToExecuteRequest(checks.indexAbsent());\n\t\tconst present = await lowerer.lowerToExecuteRequest(checks.indexPresent());\n\t\treturn {\n\t\t\tid: `index.${this.tableName}.${this.indexName}`,\n\t\t\tlabel: `Create index ${this.indexName} on ${this.tableName}`,\n\t\t\tsummary: `Creates index ${this.indexName} on ${this.tableName}`,\n\t\t\toperationClass: \"additive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"sqlite\",\n\t\t\t\tdetails: buildTargetDetails(\"index\", this.indexName, this.tableName)\n\t\t\t},\n\t\t\tprecheck: [step(`ensure index \"${this.indexName}\" is missing`, absent.sql, absent.params)],\n\t\t\texecute: [step(`create index \"${this.indexName}\"`, buildCreateIndexSql(this.tableName, this.indexName, this.columns))],\n\t\t\tpostcheck: [step(`verify index \"${this.indexName}\" exists`, present.sql, present.params)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.createIndex({ table: ${jsonToTsSource(this.tableName)}, index: ${jsonToTsSource(this.indexName)}, columns: ${jsonToTsSource(this.columns)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\nvar DropIndexCall = class extends SqliteOpFactoryCallNode {\n\tfactoryName = \"dropIndex\";\n\toperationClass = \"destructive\";\n\ttableName;\n\tindexName;\n\tlabel;\n\tconstructor(tableName, indexName) {\n\t\tsuper();\n\t\tthis.tableName = tableName;\n\t\tthis.indexName = indexName;\n\t\tthis.label = `Drop index ${indexName} on ${tableName}`;\n\t\tthis.freeze();\n\t}\n\tasync toOp(lowerer) {\n\t\tif (lowerer === void 0) throw sqliteError(\"MIGRATION.SQLITE_CONTROL_STACK_MISSING\", `DropIndexCall.toOp: a lowerer is required on the SQLite planner path (index \"${this.indexName}\" on table \"${this.tableName}\"). Pass the control adapter to createSqliteMigrationPlanner.`, { meta: {\n\t\t\tfactory: this.factoryName,\n\t\t\ttableName: this.tableName,\n\t\t\tindexName: this.indexName\n\t\t} });\n\t\tconst checks = indexExistsAst(this.indexName);\n\t\tconst present = await lowerer.lowerToExecuteRequest(checks.indexPresent());\n\t\tconst absent = await lowerer.lowerToExecuteRequest(checks.indexAbsent());\n\t\treturn {\n\t\t\tid: `dropIndex.${this.tableName}.${this.indexName}`,\n\t\t\tlabel: `Drop index ${this.indexName} on ${this.tableName}`,\n\t\t\tsummary: `Drops index ${this.indexName} on ${this.tableName} which is not in the contract`,\n\t\t\toperationClass: \"destructive\",\n\t\t\ttarget: {\n\t\t\t\tid: \"sqlite\",\n\t\t\t\tdetails: buildTargetDetails(\"index\", this.indexName, this.tableName)\n\t\t\t},\n\t\t\tprecheck: [step(`ensure index \"${this.indexName}\" exists`, present.sql, present.params)],\n\t\t\texecute: [step(`drop index \"${this.indexName}\"`, buildDropIndexSql(this.indexName))],\n\t\t\tpostcheck: [step(`verify index \"${this.indexName}\" is gone`, absent.sql, absent.params)]\n\t\t};\n\t}\n\trenderTypeScript() {\n\t\treturn `this.dropIndex({ table: ${jsonToTsSource(this.tableName)}, index: ${jsonToTsSource(this.indexName)} })`;\n\t}\n\timportRequirements() {\n\t\treturn [];\n\t}\n};\n/**\n* A planner-generated data-transform stub. The current default strategy\n* (`nullabilityTighteningBackfillStrategy`) emits one of these with a\n* backfill-flavored `id`/`label` when the policy allows `'data'` and the\n* contract tightens a column's nullability, but the op itself is generic —\n* any future strategy that needs a placeholder data step can construct one\n* with its own id/label.\n*\n* `toOp()` always throws `MIGRATION.UNFILLED_PLACEHOLDER`: the planner cannot lower a stubbed\n* transform to a runtime op — the user must edit the rendered\n* `migration.ts` and re-emit.\n*/\nvar DataTransformCall = class extends SqliteOpFactoryCallNode {\n\tfactoryName = \"dataTransform\";\n\toperationClass = \"data\";\n\tid;\n\tlabel;\n\ttableName;\n\tcolumnName;\n\tconstructor(id, label, tableName, columnName) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.label = label;\n\t\tthis.tableName = tableName;\n\t\tthis.columnName = columnName;\n\t\tthis.freeze();\n\t}\n\ttoOp(_lowerer) {\n\t\tthrow errorUnfilledPlaceholder(this.label);\n\t}\n\trenderTypeScript() {\n\t\tconst slot = `${this.tableName}-${this.columnName}-backfill-sql`;\n\t\treturn [\n\t\t\t\"dataTransform({\",\n\t\t\t` id: ${jsonToTsSource(this.id)},`,\n\t\t\t` label: ${jsonToTsSource(this.label)},`,\n\t\t\t` table: ${jsonToTsSource(this.tableName)},`,\n\t\t\t` description: ${jsonToTsSource(`Backfill NULL ${this.columnName} values in ${this.tableName}`)},`,\n\t\t\t` run: () => placeholder(${jsonToTsSource(slot)}),`,\n\t\t\t\"})\"\n\t\t].join(\"\\n\");\n\t}\n\timportRequirements() {\n\t\treturn [{\n\t\t\tmoduleSpecifier: TARGET_MIGRATION_MODULE,\n\t\t\tsymbol: this.factoryName\n\t\t}, {\n\t\t\tmoduleSpecifier: TARGET_MIGRATION_MODULE,\n\t\t\tsymbol: \"placeholder\"\n\t\t}];\n\t}\n};\n/**\n* Laundered pre-built operation. Mirrors Postgres's `RawSqlCall`: wraps an\n* already-materialized `SqlMigrationPlanOperation` (typically produced by a\n* SQL-family helper or a codec lifecycle hook) so the planner can carry it\n* alongside structured call IR. `toOp()` returns the stored op unchanged;\n* `renderTypeScript()` emits `rawSql({...})` with the op serialized as a\n* JSON literal — round-tripping requires every field on the op to be\n* JSON-serializable (no closures).\n*/\nvar RawSqlCall = class extends SqliteOpFactoryCallNode {\n\tfactoryName = \"rawSql\";\n\toperationClass;\n\tlabel;\n\top;\n\tconstructor(op) {\n\t\tsuper();\n\t\tthis.op = op;\n\t\tthis.label = op.label;\n\t\tthis.operationClass = op.operationClass;\n\t\tthis.freeze();\n\t}\n\ttoOp(_lowerer) {\n\t\treturn this.op;\n\t}\n\trenderTypeScript() {\n\t\treturn `rawSql(${jsonToTsSource(this.op)})`;\n\t}\n};\n//#endregion\nexport { DropColumnCall as a, RawSqlCall as c, buildRecreateSummary as d, step as f, renderDefaultLiteral as h, DataTransformCall as i, RecreateTableCall as l, buildColumnTypeSql as m, CreateIndexCall as n, DropIndexCall as o, build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AAK,UAAU;EACd,MAAM,yBAAyB,KAAK,KAAK;CAC1C;CACA,mBAAmB;EAClB,MAAM,OAAO,GAAG,KAAK,UAAU,GAAG,KAAK,WAAW;EAClD,OAAO;GACN;GACA,SAAS,eAAe,KAAK,EAAE,EAAE;GACjC,YAAY,eAAe,KAAK,KAAK,EAAE;GACvC,YAAY,eAAe,KAAK,SAAS,EAAE;GAC3C,kBAAkB,eAAe,iBAAiB,KAAK,WAAW,aAAa,KAAK,WAAW,EAAE;GACjG,4BAA4B,eAAe,IAAI,EAAE;GACjD;EACD,CAAC,CAAC,KAAK,IAAI;CACZ;CACA,qBAAqB;EACpB,OAAO,CAAC;GACP,iBAAiB;GACjB,QAAQ,KAAK;EACd,GAAG;GACF,iBAAiB;GACjB,QAAQ;EACT,CAAC;CACF;AACD;;;;;;;;;;AAUA,IAAI,aAAa,cAAc,wBAAwB;CACtD,cAAc;CACd;CACA;CACA;CACA,YAAY,IAAI;EACf,MAAM;EACN,KAAK,KAAK;EACV,KAAK,QAAQ,GAAG;EAChB,KAAK,iBAAiB,GAAG;EACzB,KAAK,OAAO;CACb;CACA,KAAK,UAAU;EACd,OAAO,KAAK;CACb;CACA,mBAAmB;EAClB,OAAO,UAAU,eAAe,KAAK,EAAE,EAAE;CAC1C;AACD"}
@@ -1,17 +1,17 @@
1
- import { a as DropColumnCall, d as buildColumnTypeSql, f as buildRecreatePostchecks, i as DataTransformCall, l as RecreateTableCall, m as renderDefaultLiteral, n as CreateIndexCall, o as DropIndexCall, p as buildRecreateSummary, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as buildColumnDefaultSql } from "./op-factory-call-BCDGjXmK-D_Q47Yko.mjs";
1
+ import { a as DropColumnCall, d as buildColumnTypeSql, f as buildRecreatePostchecks, i as DataTransformCall, l as RecreateTableCall, m as renderDefaultLiteral, n as CreateIndexCall, o as DropIndexCall, p as buildRecreateSummary, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as buildColumnDefaultSql } from "./op-factory-call-CsNFRTPS-HuMdWaBX.mjs";
2
2
  import { t as CONTROL_TABLE_NAMES } from "./control-tables-D_o8dKRB-BXi43noL.mjs";
3
- import { t as TypeScriptRenderableSqliteMigration } from "./planner-produced-sqlite-migration-BRxGeP57-Ban7mFdH.mjs";
3
+ import { t as TypeScriptRenderableSqliteMigration } from "./planner-produced-sqlite-migration-DB3xleco-C1ncLSxE.mjs";
4
4
  import { DdlColumn, ForeignKeyConstraint, FunctionColumnDefault, LiteralColumnDefault, PrimaryKeyConstraint, UniqueConstraint } from "@prisma/orm-family-sql/relational-core/ast";
5
+ import { ifDefined } from "@prisma/orm-framework/utils/defined";
5
6
  import { blindCast } from "@prisma/orm-framework/utils/casts";
6
7
  import { diffSchemas, issueOutcome, orderIssuesByDependencies } from "@prisma/orm-framework/components/control";
7
8
  import { UNBOUND_NAMESPACE_ID, entityAt } from "@prisma/orm-framework/components/ir";
8
9
  import { buildNativeTypeExpander, contractToSchemaIR, extractCodecControlHooks, planFieldEventOperations, plannerFailure } from "@prisma/orm-family-sql/family/control";
9
- import { ifDefined } from "@prisma/orm-framework/utils/defined";
10
10
  import { RelationalSchemaNodeKind, SqlSchemaIR, relationalNodeGranularity } from "@prisma/orm-family-sql/schema-ir/types";
11
11
  import { verifySqlSchemaByDiff } from "@prisma/orm-family-sql/family/diff";
12
12
  import { notOk, ok } from "@prisma/orm-framework/utils/result";
13
13
  import { InternalError, assertNever } from "@prisma/orm-framework/utils/internal-error";
14
- //#region ../../../3-targets/3-targets/sqlite/dist/planner-B9A1yTAH.mjs
14
+ //#region ../../../3-targets/3-targets/sqlite/dist/planner-DuW2pz1t.mjs
15
15
  /** Renders a column default for the SQLite dialect. */
16
16
  function sqliteRenderDefault(def, _column) {
17
17
  if (def.kind === "function") {
@@ -808,4 +808,4 @@ function retainUnownedExtras(issues, ownership) {
808
808
  //#endregion
809
809
  export { verifySqliteDatabaseSchema as a, sqliteContractToSchema as i, createSqliteMigrationPlanner as n, diffSqliteSchema as r, SqliteMigrationPlanner as t };
810
810
 
811
- //# sourceMappingURL=planner-B9A1yTAH-NXeVipfr.mjs.map
811
+ //# sourceMappingURL=planner-DuW2pz1t-DFhIqgV2.mjs.map