@prisma/orm-target-sqlite 8.0.0-rc.25-dev.24 → 8.0.0-rc.25-dev.25

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 (76) hide show
  1. package/dist/{adapter-DwKhx_Xu.d.mts → adapter-BQZBUROY.d.mts} +6 -6
  2. package/dist/{adapter-DwKhx_Xu.d.mts.map → adapter-BQZBUROY.d.mts.map} +1 -1
  3. package/dist/{adapter-CxzIV2_z-BBps74Fk.mjs → adapter-CxzIV2_z-DKbo2Ebu.mjs} +7 -7
  4. package/dist/{adapter-CxzIV2_z-BBps74Fk.mjs.map → adapter-CxzIV2_z-DKbo2Ebu.mjs.map} +1 -1
  5. package/dist/adapter.d.mts +1 -1
  6. package/dist/adapter.mjs +3 -3
  7. package/dist/adapter__adapter.d.mts +1 -1
  8. package/dist/adapter__adapter.mjs +1 -1
  9. package/dist/adapter__control.mjs +4 -4
  10. package/dist/adapter__runtime.mjs +4 -4
  11. package/dist/adapter__sql-renderer.mjs +1 -1
  12. package/dist/{aggregates-Bee9csBL.d.mts → aggregates--0FaH9Te.d.mts} +6 -6
  13. package/dist/{aggregates-Bee9csBL.d.mts.map → aggregates--0FaH9Te.d.mts.map} +1 -1
  14. package/dist/{codecs-EhvrdV8v.mjs → codecs-BO3frExA.mjs} +2 -2
  15. package/dist/{codecs-EhvrdV8v.mjs.map → codecs-BO3frExA.mjs.map} +1 -1
  16. package/dist/{codecs-CE5McdzP-CZ5F4Trz.mjs → codecs-izq9l1NG-Bb2RnXsx.mjs} +3 -3
  17. package/dist/{codecs-CE5McdzP-CZ5F4Trz.mjs.map → codecs-izq9l1NG-Bb2RnXsx.mjs.map} +1 -1
  18. package/dist/{contract-free-CJlg0xGJ.mjs → contract-free-B5S1OSEd.mjs} +2 -2
  19. package/dist/{contract-free-CJlg0xGJ.mjs.map → contract-free-B5S1OSEd.mjs.map} +1 -1
  20. package/dist/{data-type-entries-C0WkKiPF-CKPYj4OT.mjs → data-type-entries-DaT4D2GV-DE0V_N6k.mjs} +3 -3
  21. package/dist/{data-type-entries-C0WkKiPF-CKPYj4OT.mjs.map → data-type-entries-DaT4D2GV-DE0V_N6k.mjs.map} +1 -1
  22. package/dist/{data-types-C_NKe4Ni-D7r8QkSb.mjs → data-types-Djvapurb-BR-Y4NWN.mjs} +6 -3
  23. package/dist/data-types-Djvapurb-BR-Y4NWN.mjs.map +1 -0
  24. package/dist/{date-time-now-generators-DtRz9c2R-BkrBeLl2.mjs → date-time-now-generators-DUb3x91B-D0keGG59.mjs} +3 -3
  25. package/dist/{date-time-now-generators-DtRz9c2R-BkrBeLl2.mjs.map → date-time-now-generators-DUb3x91B-D0keGG59.mjs.map} +1 -1
  26. package/dist/{datetime-text-nkVy_w0q-DZnIEmgr.mjs → datetime-text-DPjoF6HJ-se0mLEbc.mjs} +3 -3
  27. package/dist/{datetime-text-nkVy_w0q-DZnIEmgr.mjs.map → datetime-text-DPjoF6HJ-se0mLEbc.mjs.map} +1 -1
  28. package/dist/{default-normalizer-Xsys5QJm-bPQiHGKp.mjs → default-normalizer-BANdMVGr-BiUHyBX1.mjs} +3 -3
  29. package/dist/{default-normalizer-Xsys5QJm-bPQiHGKp.mjs.map → default-normalizer-BANdMVGr-BiUHyBX1.mjs.map} +1 -1
  30. package/dist/{descriptor-meta-CafFMPhN-Cedi6Vwa.mjs → descriptor-meta-CafFMPhN-x3YQXDSX.mjs} +2 -2
  31. package/dist/{descriptor-meta-CafFMPhN-Cedi6Vwa.mjs.map → descriptor-meta-CafFMPhN-x3YQXDSX.mjs.map} +1 -1
  32. package/dist/{descriptor-meta-uVTby90Y-CUfrzHVW.mjs → descriptor-meta-DEr1ALec-DvT6glGq.mjs} +5 -5
  33. package/dist/{descriptor-meta-uVTby90Y-CUfrzHVW.mjs.map → descriptor-meta-DEr1ALec-DvT6glGq.mjs.map} +1 -1
  34. package/dist/driver__runtime.mjs +1 -1
  35. package/dist/{migration-BZoV6EvH.mjs → migration-BYRMZiPU.mjs} +2 -2
  36. package/dist/{migration-BZoV6EvH.mjs.map → migration-BYRMZiPU.mjs.map} +1 -1
  37. package/dist/{op-factory-call-2IWWs4es-CajfeAMX.mjs → op-factory-call-DjbjegGT-DsQBI5Ll.mjs} +9 -6
  38. package/dist/op-factory-call-DjbjegGT-DsQBI5Ll.mjs.map +1 -0
  39. package/dist/{pack-CHESErO8.d.mts → pack-BG5STIN9.d.mts} +2 -2
  40. package/dist/{pack-CHESErO8.d.mts.map → pack-BG5STIN9.d.mts.map} +1 -1
  41. package/dist/{planner-B3kx0r5b-ByQSd1xn.mjs → planner-C1OMkqV5-BAv-WPw6.mjs} +5 -5
  42. package/dist/{planner-B3kx0r5b-ByQSd1xn.mjs.map → planner-C1OMkqV5-BAv-WPw6.mjs.map} +1 -1
  43. package/dist/{planner-produced-sqlite-migration-B_LI7-Li-BjO08-5q.mjs → planner-produced-sqlite-migration-CrbMD1ch-O7Mh_aKY.mjs} +5 -5
  44. package/dist/{planner-produced-sqlite-migration-B_LI7-Li-BjO08-5q.mjs.map → planner-produced-sqlite-migration-CrbMD1ch-O7Mh_aKY.mjs.map} +1 -1
  45. package/dist/{render-ops-BdrBMvjY-CyVOYy9i.mjs → render-ops-CQ-Kf4P0-DDUU4OFY.mjs} +3 -3
  46. package/dist/{render-ops-BdrBMvjY-CyVOYy9i.mjs.map → render-ops-CQ-Kf4P0-DDUU4OFY.mjs.map} +1 -1
  47. package/dist/{runtime-DQll1Swl.mjs → runtime-C43fN_cJ.mjs} +2 -2
  48. package/dist/{runtime-DQll1Swl.mjs.map → runtime-C43fN_cJ.mjs.map} +1 -1
  49. package/dist/{runtime-JuCbuSJz.d.mts → runtime-DqzT70C4.d.mts} +2 -2
  50. package/dist/{runtime-JuCbuSJz.d.mts.map → runtime-DqzT70C4.d.mts.map} +1 -1
  51. package/dist/{sqlite-contract-view-6qHjyMcG-BHZ8iO5v.mjs → sqlite-contract-view-c-qO_pKt-DOCoqwrD.mjs} +4 -4
  52. package/dist/sqlite-contract-view-c-qO_pKt-DOCoqwrD.mjs.map +1 -0
  53. package/dist/{sqlite-migration-BNMabSfq-C-TEN2jV.mjs → sqlite-migration-Cmzykasm--GxBXXny.mjs} +7 -7
  54. package/dist/{sqlite-migration-BNMabSfq-C-TEN2jV.mjs.map → sqlite-migration-Cmzykasm--GxBXXny.mjs.map} +1 -1
  55. package/dist/target.d.mts +3 -3
  56. package/dist/target.mjs +17 -17
  57. package/dist/target__aggregates.d.mts +1 -1
  58. package/dist/target__codecs.mjs +3 -3
  59. package/dist/target__contract-free.mjs +1 -1
  60. package/dist/target__control.mjs +28 -8
  61. package/dist/target__control.mjs.map +1 -1
  62. package/dist/target__data-types.mjs +2 -2
  63. package/dist/target__default-normalizer.mjs +1 -1
  64. package/dist/target__migration.mjs +2 -2
  65. package/dist/target__op-factory-call.mjs +1 -1
  66. package/dist/target__pack.d.mts +1 -1
  67. package/dist/target__pack.mjs +1 -1
  68. package/dist/target__planner-produced-sqlite-migration.mjs +1 -1
  69. package/dist/target__planner.mjs +1 -1
  70. package/dist/target__render-ops.mjs +1 -1
  71. package/dist/target__runtime.d.mts +1 -1
  72. package/dist/target__runtime.mjs +3 -3
  73. package/package.json +13 -13
  74. package/dist/data-types-C_NKe4Ni-D7r8QkSb.mjs.map +0 -1
  75. package/dist/op-factory-call-2IWWs4es-CajfeAMX.mjs.map +0 -1
  76. package/dist/sqlite-contract-view-6qHjyMcG-BHZ8iO5v.mjs.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"planner-B3kx0r5b-ByQSd1xn.mjs","names":["#lowerer"],"sources":["../../../../3-targets/sqlite/1-target/dist/planner-B3kx0r5b.mjs"],"sourcesContent":["import { a as sqliteTableRenameByHand, c as sqliteSchemaTables, d as coalesceSubtreeIssues, f as conflictForDisallowedCall, g as buildSqlitePlanDiff, h as sqlitePlannerStrategies, i as sqliteColumnRenameCall, l as indexNameCaseChange, m as planIssues, n as renameTableByHandStatements, o as sqliteTableRenameCall, p as issueNode, r as renderRenameTableCall, s as createWorkingSchema, u as pairIndexReplacements, v as sqliteActualSchema } from \"./sqlite-migration-BNMabSfq.mjs\";\nimport { a as DeleteRowsCall, c as DropTableCall, d as RawSqlCall, f as RecreateTableCall, g as RenameStoredKeyCall, l as FillStoredKeyCall, m as RemoveStoredValueCall, o as DropColumnCall, p as RemoveStoredKeyCall, v as ReplaceStoredValueCall } from \"./op-factory-call-2IWWs4es.mjs\";\nimport { t as TypeScriptRenderableSqliteMigration } from \"./planner-produced-sqlite-migration-B_LI7-Li.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { enumValueCoordinateJson, isRenameStatement, issueOutcome } from \"@internal/framework-components/control\";\nimport { UnfilledValue, appliedStatementsInOrder, backfillOfDefaultedField, columnTakesTemporaryValue, detectTableNameCaseChanges, extractCodecControlHooks, fieldEventStorage, fieldStatementColumns, planFieldEventCalls, planStatements, planStoredRewrites, plannerFailure, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, unknownCallNames } from \"@internal/family-sql/control\";\nimport { RelationalSchemaNodeKind, SqlTableIR } from \"@internal/sql-schema-ir/types\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { ok } from \"@internal/utils/result\";\n//#region src/core/migrations/operation-subjects.ts\nfunction lost(target, loss = \"drop\") {\n\treturn {\n\t\t...target,\n\t\tloss\n\t};\n}\nfunction tableTarget(table) {\n\treturn {\n\t\tstorageName: table,\n\t\ttable: {\n\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\t\ttable,\n\t\t\tcolumn: void 0\n\t\t}\n\t};\n}\nfunction columnTarget(table, column) {\n\treturn {\n\t\tstorageName: `${table}.${column}`,\n\t\ttable: {\n\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\t\ttable,\n\t\t\tcolumn\n\t\t}\n\t};\n}\nfunction operationCountOf(call) {\n\treturn \"companions\" in call && Array.isArray(call.companions) ? 1 + call.companions.length : 1;\n}\n/**\n* The columns a recreate loses: those the new table leaves out, whose values the copy drops, and,\n* when the recreate is destructive, those whose type it changes with no copy expression to convert them.\n*/\nfunction recreateLosses(call) {\n\tconst kept = new Set(call.contractTable.columns.map((column) => column.name));\n\tconst dropped = call.schemaColumnNames.filter((column) => !kept.has(column));\n\tconst retyped = call.operationClass === \"destructive\" ? call.retypedColumns.filter((column) => !Object.hasOwn(call.copyExpressions, column)) : [];\n\treturn [...dropped.map((column) => ({\n\t\tcolumn,\n\t\tloss: \"drop\"\n\t})), ...retyped.map((column) => ({\n\t\tcolumn,\n\t\tloss: \"typeChange\"\n\t}))];\n}\n/** The columns a recreate adds with a value its copy writes into every existing row. */\nfunction temporaryValuesOf(call) {\n\tconst copied = new Set(call.schemaColumnNames);\n\treturn Object.entries(call.temporaryValues).flatMap(([column, expression]) => copied.has(column) || expression.kind !== \"sql\" ? [] : [{\n\t\ttable: call.tableName,\n\t\tcolumn,\n\t\tvalue: expression.sql\n\t}]);\n}\n/** What to do about the rows of `tables` that reference deleted rows, which the SQLite runner does not delete. */\nfunction referencedRowsAdvice(tables) {\n\treturn `SQLite migrations run with foreign keys off, so deleting these rows does not delete the rows of ${tables.map((table) => `\"${table}\"`).join(\", \")} that reference them: the apply then fails at PRAGMA foreign_key_check. Delete or change those rows first.`;\n}\n/**\n* What each call of a SQLite plan loses. A recreate that leaves a column out loses its values\n* itself, so a later drop of that column is not listed again.\n*/\nfunction sqliteCallSubjects(calls, fieldEvents, storedValues = /* @__PURE__ */ new Map(), storedKeys = /* @__PURE__ */ new Map(), variantRows = /* @__PURE__ */ new Map(), referencingTables = () => []) {\n\tconst lostColumns = /* @__PURE__ */ new Set();\n\tconst unknownNames = unknownCallNames(calls.filter((call) => call.operationClass === \"destructive\" && !(call instanceof RecreateTableCall) && !(call instanceof DropColumnCall) && !(call instanceof DropTableCall) && !(call instanceof RawSqlCall) && !(call instanceof RemoveStoredValueCall) && !(call instanceof RemoveStoredKeyCall) && !(call instanceof DeleteRowsCall) && !fieldEvents.has(call)));\n\treturn calls.map((call) => {\n\t\tconst operationCount = operationCountOf(call);\n\t\tconst { label } = call;\n\t\tif (call instanceof RecreateTableCall) {\n\t\t\tconst columns = recreateLosses(call);\n\t\t\tfor (const { column } of columns) lostColumns.add(`${call.tableName}.${column}`);\n\t\t\treturn {\n\t\t\t\toperationCount,\n\t\t\t\tlabel,\n\t\t\t\tdataLoss: columns.length === 0 && call.operationClass === \"destructive\" ? [lost(tableTarget(call.tableName))] : columns.map(({ column, loss }) => lost(columnTarget(call.tableName, column), loss)),\n\t\t\t\taccessChanges: [],\n\t\t\t\ttemporaryValues: temporaryValuesOf(call)\n\t\t\t};\n\t\t}\n\t\tif (call instanceof DropColumnCall) return {\n\t\t\toperationCount,\n\t\t\tlabel,\n\t\t\tdataLoss: lostColumns.has(`${call.tableName}.${call.columnName}`) ? [] : [lost(columnTarget(call.tableName, call.columnName))],\n\t\t\taccessChanges: [],\n\t\t\ttemporaryValues: []\n\t\t};\n\t\tif (call instanceof DeleteRowsCall) {\n\t\t\tconst cascaded = new Set(call.cascade.map(({ table }) => table));\n\t\t\tconst referencing = referencingTables(call.tableName).filter((table) => !cascaded.has(table));\n\t\t\treturn {\n\t\t\t\toperationCount,\n\t\t\t\tlabel,\n\t\t\t\tdataLoss: [{\n\t\t\t\t\t...lost(tableTarget(call.tableName)),\n\t\t\t\t\t...ifDefined(\"model\", variantRows.get(call)),\n\t\t\t\t\t...ifDefined(\"keepDataAdvice\", referencing.length === 0 ? void 0 : referencedRowsAdvice(referencing))\n\t\t\t\t}],\n\t\t\t\taccessChanges: [],\n\t\t\t\ttemporaryValues: []\n\t\t\t};\n\t\t}\n\t\tif (call instanceof RemoveStoredKeyCall) return {\n\t\t\toperationCount,\n\t\t\tlabel,\n\t\t\tdataLoss: [{\n\t\t\t\t...lost(columnTarget(call.tableName, call.columnName)),\n\t\t\t\t...ifDefined(\"valueObjectField\", storedKeys.get(call))\n\t\t\t}],\n\t\t\taccessChanges: [],\n\t\t\ttemporaryValues: []\n\t\t};\n\t\tif (call instanceof RemoveStoredValueCall) {\n\t\t\tconst subject = storedValues.get(call);\n\t\t\treturn {\n\t\t\t\toperationCount,\n\t\t\t\tlabel,\n\t\t\t\tdataLoss: [{\n\t\t\t\t\t...lost(columnTarget(call.tableName, call.columnName)),\n\t\t\t\t\t...ifDefined(\"enumValue\", subject?.enumValue)\n\t\t\t\t}],\n\t\t\t\taccessChanges: [],\n\t\t\t\ttemporaryValues: []\n\t\t\t};\n\t\t}\n\t\tif (call instanceof DropTableCall) return {\n\t\t\toperationCount,\n\t\t\tlabel,\n\t\t\tdataLoss: [lost(tableTarget(call.tableName))],\n\t\t\taccessChanges: [],\n\t\t\ttemporaryValues: []\n\t\t};\n\t\tif (call instanceof FillStoredKeyCall) {\n\t\t\tconst valueObjectField = storedKeys.get(call);\n\t\t\treturn {\n\t\t\t\toperationCount,\n\t\t\t\tlabel,\n\t\t\t\tdataLoss: [],\n\t\t\t\taccessChanges: [],\n\t\t\t\ttemporaryValues: call.value instanceof UnfilledValue || valueObjectField === void 0 ? [] : [{\n\t\t\t\t\ttable: call.tableName,\n\t\t\t\t\tcolumn: call.columnName,\n\t\t\t\t\tvalue: JSON.stringify(call.value),\n\t\t\t\t\tvalueObjectField\n\t\t\t\t}]\n\t\t\t};\n\t\t}\n\t\tif (call.operationClass !== \"destructive\") return {\n\t\t\toperationCount,\n\t\t\tlabel,\n\t\t\tdataLoss: [],\n\t\t\taccessChanges: [],\n\t\t\ttemporaryValues: []\n\t\t};\n\t\tconst fieldEvent = fieldEvents.get(call);\n\t\treturn {\n\t\t\toperationCount,\n\t\t\tlabel,\n\t\t\tdataLoss: [lost(call instanceof RawSqlCall ? {\n\t\t\t\tstorageName: storageNameOfOperation(call.op),\n\t\t\t\ttable: void 0\n\t\t\t} : fieldEvent !== void 0 ? fieldEventStorage(fieldEvent) : {\n\t\t\t\tstorageName: unknownNames.get(call) ?? call.factoryName,\n\t\t\t\ttable: void 0\n\t\t\t})],\n\t\t\taccessChanges: [],\n\t\t\ttemporaryValues: []\n\t\t};\n\t});\n}\n//#endregion\n//#region src/core/migrations/stored-value-calls.ts\n/** The calls that carry out a plan's stored value rewrites, each with the rewrite it carries out. */\nfunction sqliteStoredValueCalls(rewrites, codecs) {\n\treturn new Map(rewrites.map((rewrite) => {\n\t\tconst codec = rewrite.codecRef === void 0 ? void 0 : {\n\t\t\tcodecRef: rewrite.codecRef,\n\t\t\tcodecs\n\t\t};\n\t\tconst { member } = rewrite;\n\t\treturn [rewrite.to === void 0 ? new RemoveStoredValueCall(rewrite.table, rewrite.column, rewrite.from, codec, enumValueCoordinateJson(rewrite.enumValue), member?.path, member?.nullable === true ? true : void 0) : new ReplaceStoredValueCall(rewrite.table, rewrite.column, rewrite.from, rewrite.to, codec, member?.path), rewrite];\n\t}));\n}\n/** The calls that carry out a plan's key rewrites of value object fields, each with the rewrite it carries out. */\nfunction sqliteStoredKeyCalls(rewrites) {\n\treturn new Map(rewrites.map((rewrite) => [rewrite.to === void 0 ? new RemoveStoredKeyCall(rewrite.table, rewrite.column, rewrite.path) : new RenameStoredKeyCall(rewrite.table, rewrite.column, rewrite.path, rewrite.to), rewrite]));\n}\n/** The calls that carry out a plan's fills of value object fields, each with the fill it carries out. */\nfunction sqliteStoredKeyFillCalls(fills) {\n\treturn new Map(fills.map((fill) => [new FillStoredKeyCall(fill.table, fill.column, fill.path, fill.value, {\n\t\ttext: fill.field,\n\t\tcheck: void 0\n\t}), fill]));\n}\n/** The calls that carry out a plan's row rewrites of variants, each with the rewrite it carries out. */\nfunction sqliteVariantRowCalls(rewrites, codecs) {\n\treturn new Map(rewrites.map((rewrite) => {\n\t\tconst codec = {\n\t\t\tcodecRef: rewrite.codecRef,\n\t\t\tcodecs\n\t\t};\n\t\treturn [rewrite.to === void 0 ? new DeleteRowsCall(rewrite.table, rewrite.column, rewrite.from, codec, rewrite.cascadingTable === void 0 ? [] : [{\n\t\t\ttable: rewrite.cascadingTable.table,\n\t\t\tcolumns: rewrite.cascadingTable.columns,\n\t\t\treferences: rewrite.cascadingTable.references\n\t\t}]) : new ReplaceStoredValueCall(rewrite.table, rewrite.column, rewrite.from, rewrite.to, codec), rewrite];\n\t}));\n}\n/** How the family's stored value code tells SQLite removals apart and builds replacements. */\nconst sqliteStoredValueCallClasses = {\n\tisRemoval: (call) => call instanceof RemoveStoredValueCall,\n\treplacementOf: (removal, { from, to }) => new ReplaceStoredValueCall(removal.tableName, removal.columnName, from, to, removal.codec, removal.path?.text)\n};\nconst RENDER_ONLY_CODECS = { descriptorFor: () => void 0 };\n/** The removal a failed check's mark describes, as `migration.ts` writes it. */\nfunction sqliteMarkedRemoval(mark) {\n\tconst codec = mark.codecRef === void 0 ? void 0 : {\n\t\tcodecRef: mark.codecRef,\n\t\tcodecs: RENDER_ONLY_CODECS\n\t};\n\treturn new RemoveStoredValueCall(mark.table, mark.column, mark.value, codec, mark.enumValue, mark.path);\n}\n//#endregion\n//#region src/core/migrations/planner.ts\nfunction createSqliteMigrationPlanner(lowerer) {\n\treturn new SqliteMigrationPlanner(lowerer);\n}\n/**\n* SQLite migration planner — a thin wrapper over `planIssues`.\n*\n* `plan()` diffs the live schema against the target contract via the one\n* differ (`buildSqlitePlanDiff`, producing node-typed `SchemaDiffIssue[]`)\n* and delegates to `planIssues` with the registered strategies. Strategies\n* absorb groups of related issues into composite recipes (e.g. recreating a\n* table to apply type/nullability/default/constraint changes at once);\n* anything not absorbed by a strategy flows through `mapNodeIssueToCall` in\n* the issue planner as a one-off call.\n*\n* FK-backing indexes are already merged into the expected table node's\n* `indexes` at derivation (`contractToSchemaIR`'s `convertTable`), so\n* `mapNodeIssueToCall` handles them uniformly alongside user-declared\n* indexes — no separate expansion step in the planner.\n*/\nvar SqliteMigrationPlanner = class {\n\t#lowerer;\n\tconstructor(lowerer) {\n\t\tthis.#lowerer = lowerer;\n\t}\n\tplan(options) {\n\t\treturn this.planSql(options);\n\t}\n\temptyMigration(context, spaceId) {\n\t\treturn new TypeScriptRenderableSqliteMigration([], {\n\t\t\tfrom: context.fromHash,\n\t\t\tto: context.toHash\n\t\t}, spaceId, context.snapshotsImportPath, void 0, this.#lowerer);\n\t}\n\tplanSql(options) {\n\t\tconst policyResult = this.ensureAdditivePolicy(options.policy);\n\t\tif (policyResult) return policyResult;\n\t\tconst statements = this.planStatements(options);\n\t\tif (!statements.ok) return plannerFailure([statements.failure]);\n\t\tconst { expected, actual, issues: diffIssues } = this.collectSchemaIssues(options, statements.value.schema);\n\t\tconst replacedIndexes = pairIndexReplacements(diffIssues, indexNameCaseChange);\n\t\tconst disallowedIndexCalls = replacedIndexes.calls.filter((call) => !options.policy.allowedOperationClasses.includes(call.operationClass));\n\t\tif (disallowedIndexCalls.length > 0) return plannerFailure(disallowedIndexCalls.map((call) => conflictForDisallowedCall(call, options.policy.allowedOperationClasses)));\n\t\tconst issues = diffIssues.filter((issue) => !replacedIndexes.consumed.has(issue));\n\t\tconst caseChangeConflicts = detectTableNameCaseChanges({\n\t\t\tissues,\n\t\t\ttableOf: (issue) => {\n\t\t\t\tconst node = issueNode(issue);\n\t\t\t\treturn node instanceof SqlTableIR ? node : void 0;\n\t\t\t},\n\t\t\tnamespaceIdOf: () => UNBOUND_NAMESPACE_ID,\n\t\t\trenameByHandStatements: renameTableByHandStatements,\n\t\t\trenameTableCall: renderRenameTableCall,\n\t\t\tcontract: options.contract,\n\t\t\tdefaultNamespaceId: UNBOUND_NAMESPACE_ID\n\t\t});\n\t\tif (caseChangeConflicts.length > 0) return plannerFailure(caseChangeConflicts);\n\t\tconst defaultedBackfill = backfillOfDefaultedField(options.statements, options.fromContract, options.contract);\n\t\tif (defaultedBackfill !== void 0) return plannerFailure([defaultedBackfill]);\n\t\tconst codecHooks = extractCodecControlHooks(options.frameworkComponents);\n\t\tconst types = sqlTypeLookupsOf(options.frameworkComponents);\n\t\tconst { codecLookup } = types;\n\t\tconst storedRewrites = planStoredRewrites({\n\t\t\tstatements: options.statements,\n\t\t\tfromContract: options.fromContract,\n\t\t\tcontract: options.contract,\n\t\t\ttables: sqliteSchemaTables(statements.value.schema),\n\t\t\ttypes,\n\t\t\tpolicy: options.policy,\n\t\t\tcalls: {\n\t\t\t\tstoredKeyCalls: sqliteStoredKeyCalls,\n\t\t\t\tstoredKeyFillCalls: (fills) => sqliteStoredKeyFillCalls(fills),\n\t\t\t\tstoredValueCalls: (rewrites) => sqliteStoredValueCalls(rewrites, codecLookup),\n\t\t\t\tvariantRowCalls: (rewrites) => sqliteVariantRowCalls(rewrites, codecLookup),\n\t\t\t\tstoredValueClasses: sqliteStoredValueCallClasses\n\t\t\t}\n\t\t});\n\t\tif (!storedRewrites.ok) return plannerFailure([storedRewrites.failure]);\n\t\tconst disallowedStoredValueCalls = storedRewrites.value.calls.filter((call) => !options.policy.allowedOperationClasses.includes(call.operationClass));\n\t\tif (disallowedStoredValueCalls.length > 0) return plannerFailure(disallowedStoredValueCalls.map((call) => conflictForDisallowedCall(call, options.policy.allowedOperationClasses)));\n\t\tconst result = planIssues({\n\t\t\tissues,\n\t\t\texpected,\n\t\t\tactual,\n\t\t\tpolicy: options.policy,\n\t\t\tframeworkComponents: options.frameworkComponents,\n\t\t\tstatementColumns: fieldStatementColumns(options.statements, options.contract),\n\t\t\toriginCodecId: (table, column) => options.fromContract?.storage.namespaces[UNBOUND_NAMESPACE_ID]?.entries.table?.[table]?.columns[column]?.codecId,\n\t\t\ttakesTemporaryValue: (table, column) => {\n\t\t\t\tconst storageTable = options.contract.storage.namespaces[UNBOUND_NAMESPACE_ID]?.entries.table?.[table];\n\t\t\t\treturn storageTable !== void 0 && columnTakesTemporaryValue(storageTable, column);\n\t\t\t},\n\t\t\tstrategies: sqlitePlannerStrategies\n\t\t});\n\t\tif (!result.ok) return plannerFailure(result.failure);\n\t\tconst fieldEventCalls = planFieldEventCalls({\n\t\t\tpriorContract: options.origin === null ? null : options.fromContract,\n\t\t\tnewContract: options.contract,\n\t\t\tcodecHooks,\n\t\t\ttableRenames: statements.value.tableRenames,\n\t\t\tcolumnRenames: statements.value.columnRenames,\n\t\t\tdataTypes: sqlTypeLookupsOf(options.frameworkComponents).dataTypeLookup\n\t\t});\n\t\tconst fieldEventOps = fieldEventCalls.map(({ call }) => call);\n\t\tconst calls = [\n\t\t\t...statements.value.calls,\n\t\t\t...replacedIndexes.calls,\n\t\t\t...result.value.calls,\n\t\t\t...storedRewrites.value.calls,\n\t\t\t...fieldEventOps\n\t\t];\n\t\tconst destination = {\n\t\t\tstorageHash: options.contract.storage.storageHash,\n\t\t\t...options.contract.profileHash !== void 0 ? { profileHash: options.contract.profileHash } : {}\n\t\t};\n\t\treturn {\n\t\t\tkind: \"success\",\n\t\t\tplan: new TypeScriptRenderableSqliteMigration(calls, {\n\t\t\t\tfrom: options.origin?.storageHash ?? null,\n\t\t\t\tto: options.contract.storage.storageHash\n\t\t\t}, options.spaceId, options.snapshotsImportPath, destination, this.#lowerer),\n\t\t\tappliedStatements: appliedStatementsInOrder(options.statements, statements.value.plannedStatements, (statement) => storedRewrites.value.operationIndexes(calls, statement)),\n\t\t\t...subjectsOfCalls(sqliteCallSubjects(calls, new Map(fieldEventCalls.map((fieldEvent) => [fieldEvent.call, fieldEvent])), storedRewrites.value.storedValues, storedRewrites.value.storedKeys, storedRewrites.value.variantRows, (table) => tablesReferencing(options.contract, table)), {\n\t\t\t\tfromContract: options.fromContract,\n\t\t\t\tcontract: options.contract,\n\t\t\t\torigins: statements.value.origins,\n\t\t\t\tstorageRenames: statements.value.storageRenames,\n\t\t\t\tbyHand: sqliteTableRenameByHand,\n\t\t\t\tremovedVariants: storedRewrites.value.removedVariants\n\t\t\t})\n\t\t};\n\t}\n\t/**\n\t* Plans the statements against a working copy of the schema the plan starts from, in order, so\n\t* each rename's index replacements are computed against the schema the earlier statements left.\n\t* The diff then runs on that schema.\n\t*/\n\tplanStatements(options) {\n\t\tconst working = createWorkingSchema(sqliteActualSchema(options.schema));\n\t\tconst planned = planStatements({\n\t\t\tstatements: options.statements.filter(isRenameStatement),\n\t\t\tfromContract: options.fromContract,\n\t\t\tcontract: options.contract,\n\t\t\tpolicy: options.policy,\n\t\t\ttarget: {\n\t\t\t\ttables: () => sqliteSchemaTables(working.current),\n\t\t\t\trenameTableCall: (rename) => sqliteTableRenameCall({\n\t\t\t\t\tprevious: working.current,\n\t\t\t\t\tcontract: options.contract,\n\t\t\t\t\trename,\n\t\t\t\t\tframeworkComponents: options.frameworkComponents\n\t\t\t\t}),\n\t\t\t\trenameColumnCall: (rename) => sqliteColumnRenameCall({\n\t\t\t\t\tprevious: working.current,\n\t\t\t\t\tcontract: options.contract,\n\t\t\t\t\trename,\n\t\t\t\t\tframeworkComponents: options.frameworkComponents\n\t\t\t\t}),\n\t\t\t\tapply: (call) => working.apply(call)\n\t\t\t}\n\t\t});\n\t\tif (!planned.ok) return planned;\n\t\treturn ok({\n\t\t\t...planned.value,\n\t\t\tschema: working.current\n\t\t});\n\t}\n\tensureAdditivePolicy(policy) {\n\t\tif (!policy.allowedOperationClasses.includes(\"additive\")) return plannerFailure([{\n\t\t\tkind: \"unsupportedOperation\",\n\t\t\tsummary: \"Migration planner requires additive operations be allowed\",\n\t\t\twhy: \"The planner requires the \\\"additive\\\" operation class to be allowed in the policy.\"\n\t\t}]);\n\t\treturn null;\n\t}\n\t/**\n\t* Diffs the target contract against the live schema via the one differ\n\t* (the same tree-building `diffSqliteSchema` uses, plus the\n\t* op-render stamper) and prepares the issue list `planIssues` consumes.\n\t*\n\t* Three passes, in order:\n\t* 1. Subtree coalescing — the differ is total (a missing/extra table also\n\t* emits an issue for every column/constraint under it); those nested\n\t* issues are redundant once the table-level `CreateTable`/`DropTable`\n\t* call already accounts for the whole subtree. Runs FIRST, over the\n\t* complete diff: a sibling-owned extra table's column issues must\n\t* collapse into its one table-level issue before the ownership pass,\n\t* because a bare column node carries no table reference — if coalescing\n\t* ran after ownership dropped the table-level issue, the orphaned column\n\t* issues would survive and the planner would emit drops against a\n\t* sibling space's table.\n\t* 2. Ownership — a live extra is only this plan's to drop when no contract\n\t* space owns it. The differ ran against THIS space's contract, so a\n\t* table a sibling owns surfaces here as `not-expected`; the planner asks\n\t* the ownership oracle (the passive aggregate) whether any space declares\n\t* it and, if so, leaves it alone. A table no space owns stays a genuine\n\t* extra. Ownership lives in the aggregate; the planner only asks. No\n\t* oracle (single-space) keeps every extra.\n\t* 3. Strict-mode extras gating — `not-expected` (extra table/column/\n\t* constraint) issues are dropped entirely outside strict mode, mirroring\n\t* the retired coordinate walk's `if (strict) { ...extra_* } }` guards:\n\t* an additive-only plan must never even consider dropping an unclaimed\n\t* object, not just refuse to emit the drop.\n\t*/\n\tcollectSchemaIssues(options, schema) {\n\t\tconst allowed = options.policy.allowedOperationClasses;\n\t\tconst strict = allowed.includes(\"widening\") || allowed.includes(\"destructive\");\n\t\tconst { expected, actual, issues: rawIssues } = buildSqlitePlanDiff({\n\t\t\tcontract: options.contract,\n\t\t\tactualSchema: schema,\n\t\t\tframeworkComponents: options.frameworkComponents\n\t\t});\n\t\tconst owned = retainUnownedExtras(coalesceSubtreeIssues(rawIssues), options.ownership);\n\t\treturn {\n\t\t\texpected,\n\t\t\tactual,\n\t\t\tissues: strict ? owned : owned.filter((issue) => issueOutcome(issue) !== \"not-expected\")\n\t\t};\n\t}\n};\n/**\n* Drops a `not-expected` issue when it is a whole extra TABLE that some\n* contract space owns, asking the ownership oracle per node.\n*\n* The consultation applies ONLY to table-level extras — a live table this\n* space's contract lacks — identified by asking the issue's own node\n* (`nodeKind === table`), never by counting path segments. SQLite is a\n* single-namespace target, so every coordinate is qualified with the shared\n* `UNBOUND_NAMESPACE_ID` sentinel (the same one the aggregate's declared\n* entities carry for this target). `entityKind` is the literal `'table'`:\n* this function only ever asks about a node already confirmed to be\n* `RelationalSchemaNodeKind.table` (checked just above), and that's a\n* diff-tree `nodeKind` spelling (`'sql-table'`) distinct from the storage\n* `entries` vocabulary `elementCoordinates` walks (`'table'`) — the literal\n* is that storage-entries spelling. `declaresEntity` answers over the whole\n* composition (self included), so a positive answer on such a table means\n* another space owns it (a table this space owned would be in its expected\n* tree, never an extra): leave it. A negative answer means no space owns\n* it — a genuine orphan to drop.\n*\n* A DEEPER extra (an extra column/constraint on a table this space DOES own —\n* only the child drifted, so the table is in the expected tree) is this\n* space's own drift and is always kept for dropping; asking the oracle there\n* would wrongly suppress it, because the owned table answers `true`. No oracle\n* ⇒ every extra is kept (single-space plan).\n*/\nfunction retainUnownedExtras(issues, ownership) {\n\tif (ownership === void 0) return issues;\n\treturn issues.filter((issue) => {\n\t\tif (issueOutcome(issue) !== \"not-expected\") return true;\n\t\tconst node = issueNode(issue);\n\t\tif (node === void 0 || node.nodeKind !== RelationalSchemaNodeKind.table) return true;\n\t\tconst tableName = issue.path[1];\n\t\treturn tableName === void 0 || !ownership.declaresEntity({\n\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\t\tentityKind: \"table\",\n\t\t\tentityName: tableName\n\t\t});\n\t});\n}\n/** The tables of `contract` with a foreign key to `table`. */\nfunction tablesReferencing(contract, table) {\n\tconst tables = contract.storage.namespaces[UNBOUND_NAMESPACE_ID]?.entries.table ?? {};\n\treturn Object.entries(tables).flatMap(([name, candidate]) => candidate.foreignKeys.some(({ target }) => target.tableName === table) ? [name] : []);\n}\n//#endregion\nexport { sqliteStoredValueCallClasses as i, createSqliteMigrationPlanner as n, sqliteMarkedRemoval as r, SqliteMigrationPlanner as t };\n\n//# sourceMappingURL=planner-B3kx0r5b.mjs.map"],"mappings":";;;;;;;;;;AAUA,SAAS,KAAK,QAAQ,OAAO,QAAQ;CACpC,OAAO;EACN,GAAG;EACH;CACD;AACD;AACA,SAAS,YAAY,OAAO;CAC3B,OAAO;EACN,aAAa;EACb,OAAO;GACN,aAAa;GACb;GACA,QAAQ,KAAK;EACd;CACD;AACD;AACA,SAAS,aAAa,OAAO,QAAQ;CACpC,OAAO;EACN,aAAa,GAAG,MAAM,GAAG;EACzB,OAAO;GACN,aAAa;GACb;GACA;EACD;CACD;AACD;AACA,SAAS,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a,yBAAyB,OAAO,OAAO;EAChF,MAAM,YAAY,MAAM,KAAK;EAC7B,OAAO,cAAc,KAAK,KAAK,CAAC,UAAU,eAAe;GACxD,aAAa;GACb,YAAY;GACZ,YAAY;EACb,CAAC;CACF,CAAC;AACF;;AAEA,SAAS,kBAAkB,UAAU,OAAO;CAC3C,MAAM,SAAS,SAAS,QAAQ,WAAW,qBAAqB,EAAE,QAAQ,SAAS,CAAC;CACpF,OAAO,OAAO,QAAQ,MAAM,CAAC,CAAC,SAAS,CAAC,MAAM,eAAe,UAAU,YAAY,MAAM,EAAE,aAAa,OAAO,cAAc,KAAK,IAAI,CAAC,IAAI,IAAI,CAAC,CAAC;AAClJ"}
1
+ {"version":3,"file":"planner-C1OMkqV5-BAv-WPw6.mjs","names":["#lowerer"],"sources":["../../../../3-targets/sqlite/1-target/dist/planner-C1OMkqV5.mjs"],"sourcesContent":["import { a as sqliteTableRenameByHand, c as sqliteSchemaTables, d as coalesceSubtreeIssues, f as conflictForDisallowedCall, g as buildSqlitePlanDiff, h as sqlitePlannerStrategies, i as sqliteColumnRenameCall, l as indexNameCaseChange, m as planIssues, n as renameTableByHandStatements, o as sqliteTableRenameCall, p as issueNode, r as renderRenameTableCall, s as createWorkingSchema, u as pairIndexReplacements, v as sqliteActualSchema } from \"./sqlite-migration-Cmzykasm.mjs\";\nimport { a as DeleteRowsCall, c as DropTableCall, d as RawSqlCall, f as RecreateTableCall, g as RenameStoredKeyCall, l as FillStoredKeyCall, m as RemoveStoredValueCall, o as DropColumnCall, p as RemoveStoredKeyCall, v as ReplaceStoredValueCall } from \"./op-factory-call-DjbjegGT.mjs\";\nimport { t as TypeScriptRenderableSqliteMigration } from \"./planner-produced-sqlite-migration-CrbMD1ch.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { enumValueCoordinateJson, isRenameStatement, issueOutcome } from \"@internal/framework-components/control\";\nimport { UnfilledValue, appliedStatementsInOrder, backfillOfDefaultedField, columnTakesTemporaryValue, detectTableNameCaseChanges, extractCodecControlHooks, fieldEventStorage, fieldStatementColumns, planFieldEventCalls, planStatements, planStoredRewrites, plannerFailure, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, unknownCallNames } from \"@internal/family-sql/control\";\nimport { RelationalSchemaNodeKind, SqlTableIR } from \"@internal/sql-schema-ir/types\";\nimport { UNBOUND_NAMESPACE_ID } from \"@internal/framework-components/ir\";\nimport { ok } from \"@internal/utils/result\";\n//#region src/core/migrations/operation-subjects.ts\nfunction lost(target, loss = \"drop\") {\n\treturn {\n\t\t...target,\n\t\tloss\n\t};\n}\nfunction tableTarget(table) {\n\treturn {\n\t\tstorageName: table,\n\t\ttable: {\n\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\t\ttable,\n\t\t\tcolumn: void 0\n\t\t}\n\t};\n}\nfunction columnTarget(table, column) {\n\treturn {\n\t\tstorageName: `${table}.${column}`,\n\t\ttable: {\n\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\t\ttable,\n\t\t\tcolumn\n\t\t}\n\t};\n}\nfunction operationCountOf(call) {\n\treturn \"companions\" in call && Array.isArray(call.companions) ? 1 + call.companions.length : 1;\n}\n/**\n* The columns a recreate loses: those the new table leaves out, whose values the copy drops, and,\n* when the recreate is destructive, those whose type it changes with no copy expression to convert them.\n*/\nfunction recreateLosses(call) {\n\tconst kept = new Set(call.contractTable.columns.map((column) => column.name));\n\tconst dropped = call.schemaColumnNames.filter((column) => !kept.has(column));\n\tconst retyped = call.operationClass === \"destructive\" ? call.retypedColumns.filter((column) => !Object.hasOwn(call.copyExpressions, column)) : [];\n\treturn [...dropped.map((column) => ({\n\t\tcolumn,\n\t\tloss: \"drop\"\n\t})), ...retyped.map((column) => ({\n\t\tcolumn,\n\t\tloss: \"typeChange\"\n\t}))];\n}\n/** The columns a recreate adds with a value its copy writes into every existing row. */\nfunction temporaryValuesOf(call) {\n\tconst copied = new Set(call.schemaColumnNames);\n\treturn Object.entries(call.temporaryValues).flatMap(([column, expression]) => copied.has(column) || expression.kind !== \"sql\" ? [] : [{\n\t\ttable: call.tableName,\n\t\tcolumn,\n\t\tvalue: expression.sql\n\t}]);\n}\n/** What to do about the rows of `tables` that reference deleted rows, which the SQLite runner does not delete. */\nfunction referencedRowsAdvice(tables) {\n\treturn `SQLite migrations run with foreign keys off, so deleting these rows does not delete the rows of ${tables.map((table) => `\"${table}\"`).join(\", \")} that reference them: the apply then fails at PRAGMA foreign_key_check. Delete or change those rows first.`;\n}\n/**\n* What each call of a SQLite plan loses. A recreate that leaves a column out loses its values\n* itself, so a later drop of that column is not listed again.\n*/\nfunction sqliteCallSubjects(calls, fieldEvents, storedValues = /* @__PURE__ */ new Map(), storedKeys = /* @__PURE__ */ new Map(), variantRows = /* @__PURE__ */ new Map(), referencingTables = () => []) {\n\tconst lostColumns = /* @__PURE__ */ new Set();\n\tconst unknownNames = unknownCallNames(calls.filter((call) => call.operationClass === \"destructive\" && !(call instanceof RecreateTableCall) && !(call instanceof DropColumnCall) && !(call instanceof DropTableCall) && !(call instanceof RawSqlCall) && !(call instanceof RemoveStoredValueCall) && !(call instanceof RemoveStoredKeyCall) && !(call instanceof DeleteRowsCall) && !fieldEvents.has(call)));\n\treturn calls.map((call) => {\n\t\tconst operationCount = operationCountOf(call);\n\t\tconst { label } = call;\n\t\tif (call instanceof RecreateTableCall) {\n\t\t\tconst columns = recreateLosses(call);\n\t\t\tfor (const { column } of columns) lostColumns.add(`${call.tableName}.${column}`);\n\t\t\treturn {\n\t\t\t\toperationCount,\n\t\t\t\tlabel,\n\t\t\t\tdataLoss: columns.length === 0 && call.operationClass === \"destructive\" ? [lost(tableTarget(call.tableName))] : columns.map(({ column, loss }) => lost(columnTarget(call.tableName, column), loss)),\n\t\t\t\taccessChanges: [],\n\t\t\t\ttemporaryValues: temporaryValuesOf(call)\n\t\t\t};\n\t\t}\n\t\tif (call instanceof DropColumnCall) return {\n\t\t\toperationCount,\n\t\t\tlabel,\n\t\t\tdataLoss: lostColumns.has(`${call.tableName}.${call.columnName}`) ? [] : [lost(columnTarget(call.tableName, call.columnName))],\n\t\t\taccessChanges: [],\n\t\t\ttemporaryValues: []\n\t\t};\n\t\tif (call instanceof DeleteRowsCall) {\n\t\t\tconst cascaded = new Set(call.cascade.map(({ table }) => table));\n\t\t\tconst referencing = referencingTables(call.tableName).filter((table) => !cascaded.has(table));\n\t\t\treturn {\n\t\t\t\toperationCount,\n\t\t\t\tlabel,\n\t\t\t\tdataLoss: [{\n\t\t\t\t\t...lost(tableTarget(call.tableName)),\n\t\t\t\t\t...ifDefined(\"model\", variantRows.get(call)),\n\t\t\t\t\t...ifDefined(\"keepDataAdvice\", referencing.length === 0 ? void 0 : referencedRowsAdvice(referencing))\n\t\t\t\t}],\n\t\t\t\taccessChanges: [],\n\t\t\t\ttemporaryValues: []\n\t\t\t};\n\t\t}\n\t\tif (call instanceof RemoveStoredKeyCall) return {\n\t\t\toperationCount,\n\t\t\tlabel,\n\t\t\tdataLoss: [{\n\t\t\t\t...lost(columnTarget(call.tableName, call.columnName)),\n\t\t\t\t...ifDefined(\"valueObjectField\", storedKeys.get(call))\n\t\t\t}],\n\t\t\taccessChanges: [],\n\t\t\ttemporaryValues: []\n\t\t};\n\t\tif (call instanceof RemoveStoredValueCall) {\n\t\t\tconst subject = storedValues.get(call);\n\t\t\treturn {\n\t\t\t\toperationCount,\n\t\t\t\tlabel,\n\t\t\t\tdataLoss: [{\n\t\t\t\t\t...lost(columnTarget(call.tableName, call.columnName)),\n\t\t\t\t\t...ifDefined(\"enumValue\", subject?.enumValue)\n\t\t\t\t}],\n\t\t\t\taccessChanges: [],\n\t\t\t\ttemporaryValues: []\n\t\t\t};\n\t\t}\n\t\tif (call instanceof DropTableCall) return {\n\t\t\toperationCount,\n\t\t\tlabel,\n\t\t\tdataLoss: [lost(tableTarget(call.tableName))],\n\t\t\taccessChanges: [],\n\t\t\ttemporaryValues: []\n\t\t};\n\t\tif (call instanceof FillStoredKeyCall) {\n\t\t\tconst valueObjectField = storedKeys.get(call);\n\t\t\treturn {\n\t\t\t\toperationCount,\n\t\t\t\tlabel,\n\t\t\t\tdataLoss: [],\n\t\t\t\taccessChanges: [],\n\t\t\t\ttemporaryValues: call.value instanceof UnfilledValue || valueObjectField === void 0 ? [] : [{\n\t\t\t\t\ttable: call.tableName,\n\t\t\t\t\tcolumn: call.columnName,\n\t\t\t\t\tvalue: JSON.stringify(call.value),\n\t\t\t\t\tvalueObjectField\n\t\t\t\t}]\n\t\t\t};\n\t\t}\n\t\tif (call.operationClass !== \"destructive\") return {\n\t\t\toperationCount,\n\t\t\tlabel,\n\t\t\tdataLoss: [],\n\t\t\taccessChanges: [],\n\t\t\ttemporaryValues: []\n\t\t};\n\t\tconst fieldEvent = fieldEvents.get(call);\n\t\treturn {\n\t\t\toperationCount,\n\t\t\tlabel,\n\t\t\tdataLoss: [lost(call instanceof RawSqlCall ? {\n\t\t\t\tstorageName: storageNameOfOperation(call.op),\n\t\t\t\ttable: void 0\n\t\t\t} : fieldEvent !== void 0 ? fieldEventStorage(fieldEvent) : {\n\t\t\t\tstorageName: unknownNames.get(call) ?? call.factoryName,\n\t\t\t\ttable: void 0\n\t\t\t})],\n\t\t\taccessChanges: [],\n\t\t\ttemporaryValues: []\n\t\t};\n\t});\n}\n//#endregion\n//#region src/core/migrations/stored-value-calls.ts\n/** The calls that carry out a plan's stored value rewrites, each with the rewrite it carries out. */\nfunction sqliteStoredValueCalls(rewrites, codecs) {\n\treturn new Map(rewrites.map((rewrite) => {\n\t\tconst codec = rewrite.codecRef === void 0 ? void 0 : {\n\t\t\tcodecRef: rewrite.codecRef,\n\t\t\tcodecs\n\t\t};\n\t\tconst { member } = rewrite;\n\t\treturn [rewrite.to === void 0 ? new RemoveStoredValueCall(rewrite.table, rewrite.column, rewrite.from, codec, enumValueCoordinateJson(rewrite.enumValue), member?.path, member?.nullable === true ? true : void 0) : new ReplaceStoredValueCall(rewrite.table, rewrite.column, rewrite.from, rewrite.to, codec, member?.path), rewrite];\n\t}));\n}\n/** The calls that carry out a plan's key rewrites of value object fields, each with the rewrite it carries out. */\nfunction sqliteStoredKeyCalls(rewrites) {\n\treturn new Map(rewrites.map((rewrite) => [rewrite.to === void 0 ? new RemoveStoredKeyCall(rewrite.table, rewrite.column, rewrite.path) : new RenameStoredKeyCall(rewrite.table, rewrite.column, rewrite.path, rewrite.to), rewrite]));\n}\n/** The calls that carry out a plan's fills of value object fields, each with the fill it carries out. */\nfunction sqliteStoredKeyFillCalls(fills) {\n\treturn new Map(fills.map((fill) => [new FillStoredKeyCall(fill.table, fill.column, fill.path, fill.value, {\n\t\ttext: fill.field,\n\t\tcheck: void 0\n\t}), fill]));\n}\n/** The calls that carry out a plan's row rewrites of variants, each with the rewrite it carries out. */\nfunction sqliteVariantRowCalls(rewrites, codecs) {\n\treturn new Map(rewrites.map((rewrite) => {\n\t\tconst codec = {\n\t\t\tcodecRef: rewrite.codecRef,\n\t\t\tcodecs\n\t\t};\n\t\treturn [rewrite.to === void 0 ? new DeleteRowsCall(rewrite.table, rewrite.column, rewrite.from, codec, rewrite.cascadingTable === void 0 ? [] : [{\n\t\t\ttable: rewrite.cascadingTable.table,\n\t\t\tcolumns: rewrite.cascadingTable.columns,\n\t\t\treferences: rewrite.cascadingTable.references\n\t\t}]) : new ReplaceStoredValueCall(rewrite.table, rewrite.column, rewrite.from, rewrite.to, codec), rewrite];\n\t}));\n}\n/** How the family's stored value code tells SQLite removals apart and builds replacements. */\nconst sqliteStoredValueCallClasses = {\n\tisRemoval: (call) => call instanceof RemoveStoredValueCall,\n\treplacementOf: (removal, { from, to }) => new ReplaceStoredValueCall(removal.tableName, removal.columnName, from, to, removal.codec, removal.path?.text)\n};\nconst RENDER_ONLY_CODECS = { descriptorFor: () => void 0 };\n/** The removal a failed check's mark describes, as `migration.ts` writes it. */\nfunction sqliteMarkedRemoval(mark) {\n\tconst codec = mark.codecRef === void 0 ? void 0 : {\n\t\tcodecRef: mark.codecRef,\n\t\tcodecs: RENDER_ONLY_CODECS\n\t};\n\treturn new RemoveStoredValueCall(mark.table, mark.column, mark.value, codec, mark.enumValue, mark.path);\n}\n//#endregion\n//#region src/core/migrations/planner.ts\nfunction createSqliteMigrationPlanner(lowerer) {\n\treturn new SqliteMigrationPlanner(lowerer);\n}\n/**\n* SQLite migration planner — a thin wrapper over `planIssues`.\n*\n* `plan()` diffs the live schema against the target contract via the one\n* differ (`buildSqlitePlanDiff`, producing node-typed `SchemaDiffIssue[]`)\n* and delegates to `planIssues` with the registered strategies. Strategies\n* absorb groups of related issues into composite recipes (e.g. recreating a\n* table to apply type/nullability/default/constraint changes at once);\n* anything not absorbed by a strategy flows through `mapNodeIssueToCall` in\n* the issue planner as a one-off call.\n*\n* FK-backing indexes are already merged into the expected table node's\n* `indexes` at derivation (`contractToSchemaIR`'s `convertTable`), so\n* `mapNodeIssueToCall` handles them uniformly alongside user-declared\n* indexes — no separate expansion step in the planner.\n*/\nvar SqliteMigrationPlanner = class {\n\t#lowerer;\n\tconstructor(lowerer) {\n\t\tthis.#lowerer = lowerer;\n\t}\n\tplan(options) {\n\t\treturn this.planSql(options);\n\t}\n\temptyMigration(context, spaceId) {\n\t\treturn new TypeScriptRenderableSqliteMigration([], {\n\t\t\tfrom: context.fromHash,\n\t\t\tto: context.toHash\n\t\t}, spaceId, context.snapshotsImportPath, void 0, this.#lowerer);\n\t}\n\tplanSql(options) {\n\t\tconst policyResult = this.ensureAdditivePolicy(options.policy);\n\t\tif (policyResult) return policyResult;\n\t\tconst statements = this.planStatements(options);\n\t\tif (!statements.ok) return plannerFailure([statements.failure]);\n\t\tconst { expected, actual, issues: diffIssues } = this.collectSchemaIssues(options, statements.value.schema);\n\t\tconst replacedIndexes = pairIndexReplacements(diffIssues, indexNameCaseChange);\n\t\tconst disallowedIndexCalls = replacedIndexes.calls.filter((call) => !options.policy.allowedOperationClasses.includes(call.operationClass));\n\t\tif (disallowedIndexCalls.length > 0) return plannerFailure(disallowedIndexCalls.map((call) => conflictForDisallowedCall(call, options.policy.allowedOperationClasses)));\n\t\tconst issues = diffIssues.filter((issue) => !replacedIndexes.consumed.has(issue));\n\t\tconst caseChangeConflicts = detectTableNameCaseChanges({\n\t\t\tissues,\n\t\t\ttableOf: (issue) => {\n\t\t\t\tconst node = issueNode(issue);\n\t\t\t\treturn node instanceof SqlTableIR ? node : void 0;\n\t\t\t},\n\t\t\tnamespaceIdOf: () => UNBOUND_NAMESPACE_ID,\n\t\t\trenameByHandStatements: renameTableByHandStatements,\n\t\t\trenameTableCall: renderRenameTableCall,\n\t\t\tcontract: options.contract,\n\t\t\tdefaultNamespaceId: UNBOUND_NAMESPACE_ID\n\t\t});\n\t\tif (caseChangeConflicts.length > 0) return plannerFailure(caseChangeConflicts);\n\t\tconst defaultedBackfill = backfillOfDefaultedField(options.statements, options.fromContract, options.contract);\n\t\tif (defaultedBackfill !== void 0) return plannerFailure([defaultedBackfill]);\n\t\tconst codecHooks = extractCodecControlHooks(options.frameworkComponents);\n\t\tconst types = sqlTypeLookupsOf(options.frameworkComponents);\n\t\tconst { codecLookup } = types;\n\t\tconst storedRewrites = planStoredRewrites({\n\t\t\tstatements: options.statements,\n\t\t\tfromContract: options.fromContract,\n\t\t\tcontract: options.contract,\n\t\t\ttables: sqliteSchemaTables(statements.value.schema),\n\t\t\ttypes,\n\t\t\tpolicy: options.policy,\n\t\t\tcalls: {\n\t\t\t\tstoredKeyCalls: sqliteStoredKeyCalls,\n\t\t\t\tstoredKeyFillCalls: (fills) => sqliteStoredKeyFillCalls(fills),\n\t\t\t\tstoredValueCalls: (rewrites) => sqliteStoredValueCalls(rewrites, codecLookup),\n\t\t\t\tvariantRowCalls: (rewrites) => sqliteVariantRowCalls(rewrites, codecLookup),\n\t\t\t\tstoredValueClasses: sqliteStoredValueCallClasses\n\t\t\t}\n\t\t});\n\t\tif (!storedRewrites.ok) return plannerFailure([storedRewrites.failure]);\n\t\tconst disallowedStoredValueCalls = storedRewrites.value.calls.filter((call) => !options.policy.allowedOperationClasses.includes(call.operationClass));\n\t\tif (disallowedStoredValueCalls.length > 0) return plannerFailure(disallowedStoredValueCalls.map((call) => conflictForDisallowedCall(call, options.policy.allowedOperationClasses)));\n\t\tconst result = planIssues({\n\t\t\tissues,\n\t\t\texpected,\n\t\t\tactual,\n\t\t\tpolicy: options.policy,\n\t\t\tframeworkComponents: options.frameworkComponents,\n\t\t\tstatementColumns: fieldStatementColumns(options.statements, options.contract),\n\t\t\toriginCodecId: (table, column) => options.fromContract?.storage.namespaces[UNBOUND_NAMESPACE_ID]?.entries.table?.[table]?.columns[column]?.codecId,\n\t\t\ttakesTemporaryValue: (table, column) => {\n\t\t\t\tconst storageTable = options.contract.storage.namespaces[UNBOUND_NAMESPACE_ID]?.entries.table?.[table];\n\t\t\t\treturn storageTable !== void 0 && columnTakesTemporaryValue(storageTable, column);\n\t\t\t},\n\t\t\tstrategies: sqlitePlannerStrategies\n\t\t});\n\t\tif (!result.ok) return plannerFailure(result.failure);\n\t\tconst fieldEventCalls = planFieldEventCalls({\n\t\t\tpriorContract: options.origin === null ? null : options.fromContract,\n\t\t\tnewContract: options.contract,\n\t\t\tcodecHooks,\n\t\t\ttableRenames: statements.value.tableRenames,\n\t\t\tcolumnRenames: statements.value.columnRenames,\n\t\t\tdataTypes: sqlTypeLookupsOf(options.frameworkComponents).dataTypeLookup\n\t\t});\n\t\tconst fieldEventOps = fieldEventCalls.map(({ call }) => call);\n\t\tconst calls = [\n\t\t\t...statements.value.calls,\n\t\t\t...replacedIndexes.calls,\n\t\t\t...result.value.calls,\n\t\t\t...storedRewrites.value.calls,\n\t\t\t...fieldEventOps\n\t\t];\n\t\tconst destination = {\n\t\t\tstorageHash: options.contract.storage.storageHash,\n\t\t\t...options.contract.profileHash !== void 0 ? { profileHash: options.contract.profileHash } : {}\n\t\t};\n\t\treturn {\n\t\t\tkind: \"success\",\n\t\t\tplan: new TypeScriptRenderableSqliteMigration(calls, {\n\t\t\t\tfrom: options.origin?.storageHash ?? null,\n\t\t\t\tto: options.contract.storage.storageHash\n\t\t\t}, options.spaceId, options.snapshotsImportPath, destination, this.#lowerer),\n\t\t\tappliedStatements: appliedStatementsInOrder(options.statements, statements.value.plannedStatements, (statement) => storedRewrites.value.operationIndexes(calls, statement)),\n\t\t\t...subjectsOfCalls(sqliteCallSubjects(calls, new Map(fieldEventCalls.map((fieldEvent) => [fieldEvent.call, fieldEvent])), storedRewrites.value.storedValues, storedRewrites.value.storedKeys, storedRewrites.value.variantRows, (table) => tablesReferencing(options.contract, table)), {\n\t\t\t\tfromContract: options.fromContract,\n\t\t\t\tcontract: options.contract,\n\t\t\t\torigins: statements.value.origins,\n\t\t\t\tstorageRenames: statements.value.storageRenames,\n\t\t\t\tbyHand: sqliteTableRenameByHand,\n\t\t\t\tremovedVariants: storedRewrites.value.removedVariants\n\t\t\t})\n\t\t};\n\t}\n\t/**\n\t* Plans the statements against a working copy of the schema the plan starts from, in order, so\n\t* each rename's index replacements are computed against the schema the earlier statements left.\n\t* The diff then runs on that schema.\n\t*/\n\tplanStatements(options) {\n\t\tconst working = createWorkingSchema(sqliteActualSchema(options.schema));\n\t\tconst planned = planStatements({\n\t\t\tstatements: options.statements.filter(isRenameStatement),\n\t\t\tfromContract: options.fromContract,\n\t\t\tcontract: options.contract,\n\t\t\tpolicy: options.policy,\n\t\t\ttarget: {\n\t\t\t\ttables: () => sqliteSchemaTables(working.current),\n\t\t\t\trenameTableCall: (rename) => sqliteTableRenameCall({\n\t\t\t\t\tprevious: working.current,\n\t\t\t\t\tcontract: options.contract,\n\t\t\t\t\trename,\n\t\t\t\t\tframeworkComponents: options.frameworkComponents\n\t\t\t\t}),\n\t\t\t\trenameColumnCall: (rename) => sqliteColumnRenameCall({\n\t\t\t\t\tprevious: working.current,\n\t\t\t\t\tcontract: options.contract,\n\t\t\t\t\trename,\n\t\t\t\t\tframeworkComponents: options.frameworkComponents\n\t\t\t\t}),\n\t\t\t\tapply: (call) => working.apply(call)\n\t\t\t}\n\t\t});\n\t\tif (!planned.ok) return planned;\n\t\treturn ok({\n\t\t\t...planned.value,\n\t\t\tschema: working.current\n\t\t});\n\t}\n\tensureAdditivePolicy(policy) {\n\t\tif (!policy.allowedOperationClasses.includes(\"additive\")) return plannerFailure([{\n\t\t\tkind: \"unsupportedOperation\",\n\t\t\tsummary: \"Migration planner requires additive operations be allowed\",\n\t\t\twhy: \"The planner requires the \\\"additive\\\" operation class to be allowed in the policy.\"\n\t\t}]);\n\t\treturn null;\n\t}\n\t/**\n\t* Diffs the target contract against the live schema via the one differ\n\t* (the same tree-building `diffSqliteSchema` uses, plus the\n\t* op-render stamper) and prepares the issue list `planIssues` consumes.\n\t*\n\t* Three passes, in order:\n\t* 1. Subtree coalescing — the differ is total (a missing/extra table also\n\t* emits an issue for every column/constraint under it); those nested\n\t* issues are redundant once the table-level `CreateTable`/`DropTable`\n\t* call already accounts for the whole subtree. Runs FIRST, over the\n\t* complete diff: a sibling-owned extra table's column issues must\n\t* collapse into its one table-level issue before the ownership pass,\n\t* because a bare column node carries no table reference — if coalescing\n\t* ran after ownership dropped the table-level issue, the orphaned column\n\t* issues would survive and the planner would emit drops against a\n\t* sibling space's table.\n\t* 2. Ownership — a live extra is only this plan's to drop when no contract\n\t* space owns it. The differ ran against THIS space's contract, so a\n\t* table a sibling owns surfaces here as `not-expected`; the planner asks\n\t* the ownership oracle (the passive aggregate) whether any space declares\n\t* it and, if so, leaves it alone. A table no space owns stays a genuine\n\t* extra. Ownership lives in the aggregate; the planner only asks. No\n\t* oracle (single-space) keeps every extra.\n\t* 3. Strict-mode extras gating — `not-expected` (extra table/column/\n\t* constraint) issues are dropped entirely outside strict mode, mirroring\n\t* the retired coordinate walk's `if (strict) { ...extra_* } }` guards:\n\t* an additive-only plan must never even consider dropping an unclaimed\n\t* object, not just refuse to emit the drop.\n\t*/\n\tcollectSchemaIssues(options, schema) {\n\t\tconst allowed = options.policy.allowedOperationClasses;\n\t\tconst strict = allowed.includes(\"widening\") || allowed.includes(\"destructive\");\n\t\tconst { expected, actual, issues: rawIssues } = buildSqlitePlanDiff({\n\t\t\tcontract: options.contract,\n\t\t\tactualSchema: schema,\n\t\t\tframeworkComponents: options.frameworkComponents\n\t\t});\n\t\tconst owned = retainUnownedExtras(coalesceSubtreeIssues(rawIssues), options.ownership);\n\t\treturn {\n\t\t\texpected,\n\t\t\tactual,\n\t\t\tissues: strict ? owned : owned.filter((issue) => issueOutcome(issue) !== \"not-expected\")\n\t\t};\n\t}\n};\n/**\n* Drops a `not-expected` issue when it is a whole extra TABLE that some\n* contract space owns, asking the ownership oracle per node.\n*\n* The consultation applies ONLY to table-level extras — a live table this\n* space's contract lacks — identified by asking the issue's own node\n* (`nodeKind === table`), never by counting path segments. SQLite is a\n* single-namespace target, so every coordinate is qualified with the shared\n* `UNBOUND_NAMESPACE_ID` sentinel (the same one the aggregate's declared\n* entities carry for this target). `entityKind` is the literal `'table'`:\n* this function only ever asks about a node already confirmed to be\n* `RelationalSchemaNodeKind.table` (checked just above), and that's a\n* diff-tree `nodeKind` spelling (`'sql-table'`) distinct from the storage\n* `entries` vocabulary `elementCoordinates` walks (`'table'`) — the literal\n* is that storage-entries spelling. `declaresEntity` answers over the whole\n* composition (self included), so a positive answer on such a table means\n* another space owns it (a table this space owned would be in its expected\n* tree, never an extra): leave it. A negative answer means no space owns\n* it — a genuine orphan to drop.\n*\n* A DEEPER extra (an extra column/constraint on a table this space DOES own —\n* only the child drifted, so the table is in the expected tree) is this\n* space's own drift and is always kept for dropping; asking the oracle there\n* would wrongly suppress it, because the owned table answers `true`. No oracle\n* ⇒ every extra is kept (single-space plan).\n*/\nfunction retainUnownedExtras(issues, ownership) {\n\tif (ownership === void 0) return issues;\n\treturn issues.filter((issue) => {\n\t\tif (issueOutcome(issue) !== \"not-expected\") return true;\n\t\tconst node = issueNode(issue);\n\t\tif (node === void 0 || node.nodeKind !== RelationalSchemaNodeKind.table) return true;\n\t\tconst tableName = issue.path[1];\n\t\treturn tableName === void 0 || !ownership.declaresEntity({\n\t\t\tnamespaceId: UNBOUND_NAMESPACE_ID,\n\t\t\tentityKind: \"table\",\n\t\t\tentityName: tableName\n\t\t});\n\t});\n}\n/** The tables of `contract` with a foreign key to `table`. */\nfunction tablesReferencing(contract, table) {\n\tconst tables = contract.storage.namespaces[UNBOUND_NAMESPACE_ID]?.entries.table ?? {};\n\treturn Object.entries(tables).flatMap(([name, candidate]) => candidate.foreignKeys.some(({ target }) => target.tableName === table) ? [name] : []);\n}\n//#endregion\nexport { sqliteStoredValueCallClasses as i, createSqliteMigrationPlanner as n, sqliteMarkedRemoval as r, SqliteMigrationPlanner as t };\n\n//# sourceMappingURL=planner-C1OMkqV5.mjs.map"],"mappings":";;;;;;;;;;AAUA,SAAS,KAAK,QAAQ,OAAO,QAAQ;CACpC,OAAO;EACN,GAAG;EACH;CACD;AACD;AACA,SAAS,YAAY,OAAO;CAC3B,OAAO;EACN,aAAa;EACb,OAAO;GACN,aAAa;GACb;GACA,QAAQ,KAAK;EACd;CACD;AACD;AACA,SAAS,aAAa,OAAO,QAAQ;CACpC,OAAO;EACN,aAAa,GAAG,MAAM,GAAG;EACzB,OAAO;GACN,aAAa;GACb;GACA;EACD;CACD;AACD;AACA,SAAS,iBAAiB,MAAM;CAC/B,OAAO,gBAAgB,QAAQ,MAAM,QAAQ,KAAK,UAAU,IAAI,IAAI,KAAK,WAAW,SAAS;AAC9F;;;;;AAKA,SAAS,eAAe,MAAM;CAC7B,MAAM,OAAO,IAAI,IAAI,KAAK,cAAc,QAAQ,KAAK,WAAW,OAAO,IAAI,CAAC;CAC5E,MAAM,UAAU,KAAK,kBAAkB,QAAQ,WAAW,CAAC,KAAK,IAAI,MAAM,CAAC;CAC3E,MAAM,UAAU,KAAK,mBAAmB,gBAAgB,KAAK,eAAe,QAAQ,WAAW,CAAC,OAAO,OAAO,KAAK,iBAAiB,MAAM,CAAC,IAAI,CAAC;CAChJ,OAAO,CAAC,GAAG,QAAQ,KAAK,YAAY;EACnC;EACA,MAAM;CACP,EAAE,GAAG,GAA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eAMX.mjs";
2
- import { t as SqliteMigration } from "./sqlite-migration-BNMabSfq-C-TEN2jV.mjs";
3
- import { t as renderOps } from "./render-ops-BdrBMvjY-CyVOYy9i.mjs";
1
+ import { f as MIGRATION_MODULE } from "./op-factory-call-DjbjegGT-DsQBI5Ll.mjs";
2
+ import { t as SqliteMigration } from "./sqlite-migration-Cmzykasm--GxBXXny.mjs";
3
+ import { t as renderOps } from "./render-ops-CQ-Kf4P0-DDUU4OFY.mjs";
4
4
  import { contractSnapshotJsonSpecifier, contractSnapshotTypesSpecifier } from "@prisma/orm-framework/components/control";
5
5
  import { renderImports } from "@prisma/orm-framework/ts-render";
6
6
  import { detectScaffoldRuntime, shebangLineFor } from "@prisma/orm-toolchain/migration-tools/migration-ts";
7
- //#region ../../../3-targets/sqlite/1-target/dist/planner-produced-sqlite-migration-B_LI7-Li.mjs
7
+ //#region ../../../3-targets/sqlite/1-target/dist/planner-produced-sqlite-migration-CrbMD1ch.mjs
8
8
  /**
9
9
  * Polymorphic TypeScript emitter for the SQLite migration IR. Mirrors the
10
10
  * Postgres `render-typescript.ts` — different base-class + factory module
@@ -137,4 +137,4 @@ var TypeScriptRenderableSqliteMigration = class extends SqliteMigration {
137
137
  //#endregion
138
138
  export { TypeScriptRenderableSqliteMigration as t };
139
139
 
140
- //# sourceMappingURL=planner-produced-sqlite-migration-B_LI7-Li-BjO08-5q.mjs.map
140
+ //# sourceMappingURL=planner-produced-sqlite-migration-CrbMD1ch-O7Mh_aKY.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"planner-produced-sqlite-migration-B_LI7-Li-BjO08-5q.mjs","names":["#calls","#meta","#spaceId","#snapshotsImportPath","#destination","#lowerer","#operationsCache"],"sources":["../../../../3-targets/sqlite/1-target/dist/planner-produced-sqlite-migration-B_LI7-Li.mjs"],"sourcesContent":["import { t as SqliteMigration } from \"./sqlite-migration-BNMabSfq.mjs\";\nimport { u as MIGRATION_MODULE } from \"./op-factory-call-2IWWs4es.mjs\";\nimport { t as renderOps } from \"./render-ops-BdrBMvjY.mjs\";\nimport { contractSnapshotJsonSpecifier, contractSnapshotTypesSpecifier } from \"@internal/framework-components/control\";\nimport { renderImports } from \"@internal/ts-render\";\nimport { detectScaffoldRuntime, shebangLineFor } from \"@internal/migration-tools/migration-ts\";\n//#region src/core/migrations/render-typescript.ts\n/**\n* Polymorphic TypeScript emitter for the SQLite migration IR. Mirrors the\n* Postgres `render-typescript.ts` — different base-class + factory module\n* specifier, same overall shape.\n*/\nconst BASE_IMPORTS = [{\n\tmoduleSpecifier: MIGRATION_MODULE,\n\tsymbol: \"Migration\"\n}, {\n\tmoduleSpecifier: MIGRATION_MODULE,\n\tsymbol: \"MigrationCLI\"\n}];\nfunction renderCallsToTypeScript(calls, meta) {\n\tconst imports = buildImports(calls, meta);\n\tconst operationsBody = calls.map((c) => c.renderTypeScript()).join(\",\\n\");\n\tconst hasStart = meta.from !== null;\n\tconst startField = hasStart ? [\" override readonly startContractJson = startContract;\"] : [];\n\treturn [\n\t\tshebangLineFor(detectScaffoldRuntime()),\n\t\timports,\n\t\t\"\",\n\t\t`export default class M extends Migration<${hasStart ? \"Start\" : \"never\"}, End> {`,\n\t\t...startField,\n\t\t\" override readonly endContractJson = endContract;\",\n\t\t\"\",\n\t\t\" override get operations() {\",\n\t\t\" return [\",\n\t\tindent(operationsBody, 6),\n\t\t\" ];\",\n\t\t\" }\",\n\t\t\"}\",\n\t\t\"\",\n\t\t\"MigrationCLI.run(import.meta.url, M);\",\n\t\t\"\"\n\t].join(\"\\n\");\n}\nfunction buildImports(calls, meta) {\n\tconst requirements = [...BASE_IMPORTS, ...contractImports(meta)];\n\tfor (const call of calls) for (const req of call.importRequirements()) requirements.push(req);\n\treturn renderImports(requirements.map((requirement) => requirement.moduleSpecifier === \"<migrations.module>\" ? {\n\t\t...requirement,\n\t\tmoduleSpecifier: meta.migrationModule\n\t} : requirement));\n}\n/**\n* The committed contract-JSON imports the scaffold reads its from/to identity\n* from, resolved to the deduplicated snapshot store under\n* `meta.snapshotsImportPath`. The end snapshot is always present; the start\n* snapshot is added only for a non-baseline migration (`meta.from !== null`).\n* The matching `Contract` type imports (aliased `Start`/`End`) feed the\n* `Migration<Start, End>` generics. Baseline emits `Migration<never, End>` with\n* no start imports — `never` is the honest \"no prior contract\" Start.\n*/\nfunction contractImports(meta) {\n\tconst reqs = [{\n\t\tmoduleSpecifier: contractSnapshotJsonSpecifier(meta.snapshotsImportPath, meta.to),\n\t\tsymbol: \"endContract\",\n\t\tkind: \"default\",\n\t\tattributes: { type: \"json\" }\n\t}, {\n\t\tmoduleSpecifier: contractSnapshotTypesSpecifier(meta.snapshotsImportPath, meta.to),\n\t\tsymbol: \"Contract\",\n\t\talias: \"End\",\n\t\ttypeOnly: true\n\t}];\n\tif (meta.from !== null) {\n\t\treqs.push({\n\t\t\tmoduleSpecifier: contractSnapshotJsonSpecifier(meta.snapshotsImportPath, meta.from),\n\t\t\tsymbol: \"startContract\",\n\t\t\tkind: \"default\",\n\t\t\tattributes: { type: \"json\" }\n\t\t});\n\t\treqs.push({\n\t\t\tmoduleSpecifier: contractSnapshotTypesSpecifier(meta.snapshotsImportPath, meta.from),\n\t\t\tsymbol: \"Contract\",\n\t\t\talias: \"Start\",\n\t\t\ttypeOnly: true\n\t\t});\n\t}\n\treturn reqs;\n}\nfunction indent(text, spaces) {\n\tconst pad = \" \".repeat(spaces);\n\treturn text.split(\"\\n\").map((line) => line.trim() ? `${pad}${line}` : line).join(\"\\n\");\n}\n//#endregion\n//#region src/core/migrations/planner-produced-sqlite-migration.ts\nvar TypeScriptRenderableSqliteMigration = class extends SqliteMigration {\n\t#calls;\n\t#meta;\n\t#destination;\n\t#spaceId;\n\t#snapshotsImportPath;\n\t#lowerer;\n\t#operationsCache;\n\tconstructor(calls, meta, spaceId, snapshotsImportPath, destination, lowerer) {\n\t\tsuper();\n\t\tthis.#calls = calls;\n\t\tthis.#meta = meta;\n\t\tthis.#spaceId = spaceId;\n\t\tthis.#snapshotsImportPath = snapshotsImportPath;\n\t\tthis.#destination = destination ?? { storageHash: meta.to };\n\t\tthis.#lowerer = lowerer;\n\t}\n\tget operations() {\n\t\tthis.#operationsCache ??= renderOps(this.#calls, this.#lowerer);\n\t\treturn this.#operationsCache;\n\t}\n\tdescribe() {\n\t\treturn this.#meta;\n\t}\n\tget destination() {\n\t\treturn this.#destination;\n\t}\n\t/**\n\t* Contract space this planner-produced plan applies to. Threaded\n\t* from {@link SqlMigrationPlannerPlanOptions.spaceId} so the runner\n\t* keys the marker row by the right space when executing the plan.\n\t*/\n\tget spaceId() {\n\t\treturn this.#spaceId;\n\t}\n\trenderTypeScript(migrationModule) {\n\t\treturn renderCallsToTypeScript(this.#calls, {\n\t\t\tfrom: this.#meta.from,\n\t\t\tto: this.#meta.to,\n\t\t\tsnapshotsImportPath: this.#snapshotsImportPath,\n\t\t\tmigrationModule\n\t\t});\n\t}\n};\n//#endregion\nexport { TypeScriptRenderableSqliteMigration as t };\n\n//# sourceMappingURL=planner-produced-sqlite-migration-B_LI7-Li.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,MAAM,eAAe,CAAC;CACrB,iBAAiB;CACjB,QAAQ;AACT,GAAG;CACF,iBAAiB;CACjB,QAAQ;AACT,CAAC;AACD,SAAS,wBAAwB,OAAO,MAAM;CAC7C,MAAM,UAAU,aAAa,OAAO,IAAI;CACxC,MAAM,iBAAiB,MAAM,KAAK,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,KAAK,KAAK;CACxE,MAAM,WAAW,KAAK,SAAS;CAC/B,MAAM,aAAa,WAAW,CAAC,wDAAwD,IAAI,CAAC;CAC5F,OAAO;EACN,eAAe,sBAAsB,CAAC;EACtC;EACA;EACA,4CAA4C,WAAW,UAAU,QAAQ;EACzE,GAAG;EACH;EACA;EACA;EACA;EACA,OAAO,gBAAgB,CAAC;EACxB;EACA;EACA;EACA;EACA;EACA;CACD,CAAC,CAAC,KAAK,IAAI;AACZ;AACA,SAAS,aAAa,OAAO,MA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KAAKC,uBAAuB;EAC5B,KAAKC,eAAe,eAAe,EAAE,aAAa,KAAK,GAAG;EAC1D,KAAKC,WAAW;CACjB;CACA,IAAI,aAAa;EAChB,KAAKC,qBAAqB,UAAU,KAAKN,QAAQ,KAAKK,QAAQ;EAC9D,OAAO,KAAKC;CACb;CACA,WAAW;EACV,OAAO,KAAKL;CACb;CACA,IAAI,cAAc;EACjB,OAAO,KAAKG;CACb;;;;;;CAMA,IAAI,UAAU;EACb,OAAO,KAAKF;CACb;CACA,iBAAiB,iBAAiB;EACjC,OAAO,wBAAwB,KAAKF,QAAQ;GAC3C,MAAM,KAAKC,MAAM;GACjB,IAAI,KAAKA,MAAM;GACf,qBAAqB,KAAKE;GAC1B;EACD,CAAC;CACF;AACD"}
1
+ {"version":3,"file":"planner-produced-sqlite-migration-CrbMD1ch-O7Mh_aKY.mjs","names":["#calls","#meta","#spaceId","#snapshotsImportPath","#destination","#lowerer","#operationsCache"],"sources":["../../../../3-targets/sqlite/1-target/dist/planner-produced-sqlite-migration-CrbMD1ch.mjs"],"sourcesContent":["import { t as SqliteMigration } from \"./sqlite-migration-Cmzykasm.mjs\";\nimport { u as MIGRATION_MODULE } from \"./op-factory-call-DjbjegGT.mjs\";\nimport { t as renderOps } from \"./render-ops-CQ-Kf4P0.mjs\";\nimport { contractSnapshotJsonSpecifier, contractSnapshotTypesSpecifier } from \"@internal/framework-components/control\";\nimport { renderImports } from \"@internal/ts-render\";\nimport { detectScaffoldRuntime, shebangLineFor } from \"@internal/migration-tools/migration-ts\";\n//#region src/core/migrations/render-typescript.ts\n/**\n* Polymorphic TypeScript emitter for the SQLite migration IR. Mirrors the\n* Postgres `render-typescript.ts` — different base-class + factory module\n* specifier, same overall shape.\n*/\nconst BASE_IMPORTS = [{\n\tmoduleSpecifier: MIGRATION_MODULE,\n\tsymbol: \"Migration\"\n}, {\n\tmoduleSpecifier: MIGRATION_MODULE,\n\tsymbol: \"MigrationCLI\"\n}];\nfunction renderCallsToTypeScript(calls, meta) {\n\tconst imports = buildImports(calls, meta);\n\tconst operationsBody = calls.map((c) => c.renderTypeScript()).join(\",\\n\");\n\tconst hasStart = meta.from !== null;\n\tconst startField = hasStart ? [\" override readonly startContractJson = startContract;\"] : [];\n\treturn [\n\t\tshebangLineFor(detectScaffoldRuntime()),\n\t\timports,\n\t\t\"\",\n\t\t`export default class M extends Migration<${hasStart ? \"Start\" : \"never\"}, End> {`,\n\t\t...startField,\n\t\t\" override readonly endContractJson = endContract;\",\n\t\t\"\",\n\t\t\" override get operations() {\",\n\t\t\" return [\",\n\t\tindent(operationsBody, 6),\n\t\t\" ];\",\n\t\t\" }\",\n\t\t\"}\",\n\t\t\"\",\n\t\t\"MigrationCLI.run(import.meta.url, M);\",\n\t\t\"\"\n\t].join(\"\\n\");\n}\nfunction buildImports(calls, meta) {\n\tconst requirements = [...BASE_IMPORTS, ...contractImports(meta)];\n\tfor (const call of calls) for (const req of call.importRequirements()) requirements.push(req);\n\treturn renderImports(requirements.map((requirement) => requirement.moduleSpecifier === \"<migrations.module>\" ? {\n\t\t...requirement,\n\t\tmoduleSpecifier: meta.migrationModule\n\t} : requirement));\n}\n/**\n* The committed contract-JSON imports the scaffold reads its from/to identity\n* from, resolved to the deduplicated snapshot store under\n* `meta.snapshotsImportPath`. The end snapshot is always present; the start\n* snapshot is added only for a non-baseline migration (`meta.from !== null`).\n* The matching `Contract` type imports (aliased `Start`/`End`) feed the\n* `Migration<Start, End>` generics. Baseline emits `Migration<never, End>` with\n* no start imports — `never` is the honest \"no prior contract\" Start.\n*/\nfunction contractImports(meta) {\n\tconst reqs = [{\n\t\tmoduleSpecifier: contractSnapshotJsonSpecifier(meta.snapshotsImportPath, meta.to),\n\t\tsymbol: \"endContract\",\n\t\tkind: \"default\",\n\t\tattributes: { type: \"json\" }\n\t}, {\n\t\tmoduleSpecifier: contractSnapshotTypesSpecifier(meta.snapshotsImportPath, meta.to),\n\t\tsymbol: \"Contract\",\n\t\talias: \"End\",\n\t\ttypeOnly: true\n\t}];\n\tif (meta.from !== null) {\n\t\treqs.push({\n\t\t\tmoduleSpecifier: contractSnapshotJsonSpecifier(meta.snapshotsImportPath, meta.from),\n\t\t\tsymbol: \"startContract\",\n\t\t\tkind: \"default\",\n\t\t\tattributes: { type: \"json\" }\n\t\t});\n\t\treqs.push({\n\t\t\tmoduleSpecifier: contractSnapshotTypesSpecifier(meta.snapshotsImportPath, meta.from),\n\t\t\tsymbol: \"Contract\",\n\t\t\talias: \"Start\",\n\t\t\ttypeOnly: true\n\t\t});\n\t}\n\treturn reqs;\n}\nfunction indent(text, spaces) {\n\tconst pad = \" \".repeat(spaces);\n\treturn text.split(\"\\n\").map((line) => line.trim() ? `${pad}${line}` : line).join(\"\\n\");\n}\n//#endregion\n//#region src/core/migrations/planner-produced-sqlite-migration.ts\nvar TypeScriptRenderableSqliteMigration = class extends SqliteMigration {\n\t#calls;\n\t#meta;\n\t#destination;\n\t#spaceId;\n\t#snapshotsImportPath;\n\t#lowerer;\n\t#operationsCache;\n\tconstructor(calls, meta, spaceId, snapshotsImportPath, destination, lowerer) {\n\t\tsuper();\n\t\tthis.#calls = calls;\n\t\tthis.#meta = meta;\n\t\tthis.#spaceId = spaceId;\n\t\tthis.#snapshotsImportPath = snapshotsImportPath;\n\t\tthis.#destination = destination ?? { storageHash: meta.to };\n\t\tthis.#lowerer = lowerer;\n\t}\n\tget operations() {\n\t\tthis.#operationsCache ??= renderOps(this.#calls, this.#lowerer);\n\t\treturn this.#operationsCache;\n\t}\n\tdescribe() {\n\t\treturn this.#meta;\n\t}\n\tget destination() {\n\t\treturn this.#destination;\n\t}\n\t/**\n\t* Contract space this planner-produced plan applies to. Threaded\n\t* from {@link SqlMigrationPlannerPlanOptions.spaceId} so the runner\n\t* keys the marker row by the right space when executing the plan.\n\t*/\n\tget spaceId() {\n\t\treturn this.#spaceId;\n\t}\n\trenderTypeScript(migrationModule) {\n\t\treturn renderCallsToTypeScript(this.#calls, {\n\t\t\tfrom: this.#meta.from,\n\t\t\tto: this.#meta.to,\n\t\t\tsnapshotsImportPath: this.#snapshotsImportPath,\n\t\t\tmigrationModule\n\t\t});\n\t}\n};\n//#endregion\nexport { TypeScriptRenderableSqliteMigration as t };\n\n//# sourceMappingURL=planner-produced-sqlite-migration-CrbMD1ch.mjs.map"],"mappings":";;;;;;;;;;;;AAYA,MAAM,eAAe,CAAC;CACrB,iBAAiB;CACjB,QAAQ;AACT,GAAG;CACF,iBAAiB;CACjB,QAAQ;AACT,CAAC;AACD,SAAS,wBAAwB,OAAO,MAAM;CAC7C,MAAM,UAAU,aAAa,OAAO,IAAI;CACxC,MAAM,iBAAiB,MAAM,KAAK,MAAM,EAAE,iBAAiB,CAAC,CAAC,CAAC,KAAK,KAAK;CACxE,MAAM,WAAW,KAAK,SAAS;CAC/B,MAAM,aAAa,WAAW,CAAC,wDAAwD,IAAI,CAAC;CAC5F,OAAO;EACN,eAAe,sBAAsB,CAAC;EACtC;EACA;EACA,4CAA4C,WAAW,UAAU,QAAQ;EACzE,GAAG;EACH;EACA;EACA;EACA;EACA,OAAO,gBAAgB,CAAC;EACxB;EACA;EACA;EACA;EACA;EACA;CACD,CAAC,CAAC,KAAK,IAAI;AACZ;AACA,SAAS,aAAa,OAAO,MAAM;CAClC,MAAM,eAAe,CAAC,GAAG,cAAc,GAAG,gBAAgB,IAAI,CAAC;CAC/D,KAAK,MAAM,QAAQ,OAAO,KAAK,MAAM,OAAO,KAAK,mBAAmB,GAAG,aAAa,KAAK,GAAG;CAC5F,OAAO,cAAc,aAAa,KAAK,gBAAgB,YAAY,oBAAoB,wBAAwB;EAC9G,GAAG;EACH,iBAAiB,KAAK;CACvB,IAAI,WAAW,CAAC;AACjB;;;;;;;;;;AAUA,SAAS,gBAAgB,MAAM;CAC9B,MAAM,OAAO,CAAC;EACb,iBAAiB,8BAA8B,KAAK,qBAAqB,KAAK,EAAE;EAChF,QAAQ;EACR,MAAM;EACN,YAAY,EAAE,MAAM,OAAO;CAC5B,GAAG;EACF,iBA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ACD"}
@@ -1,8 +1,8 @@
1
1
  import { l as sqliteError } from "./errors-DxbvEzQp-CeTjoGtL.mjs";
2
- import { E as isSqliteOpFactoryCall } from "./op-factory-call-2IWWs4es-CajfeAMX.mjs";
2
+ import { D as isSqliteOpFactoryCall } from "./op-factory-call-DjbjegGT-DsQBI5Ll.mjs";
3
3
  import { blindCast } from "@prisma/orm-framework/utils/casts";
4
4
  import { isThenable } from "@prisma/orm-framework/utils/promise";
5
- //#region ../../../3-targets/sqlite/1-target/dist/render-ops-BdrBMvjY.mjs
5
+ //#region ../../../3-targets/sqlite/1-target/dist/render-ops-CQ-Kf4P0.mjs
6
6
  function assertSqliteOp(op, callFactoryName) {
7
7
  const targetId = blindCast(op).target?.id;
8
8
  if (targetId !== "sqlite") throw sqliteError("MIGRATION.TARGET_MISMATCH", `renderOps: expected sqlite op but got target.id="${String(targetId)}" for op.id="${op.id}" (factoryName="${callFactoryName}"). An OpFactoryCall produced an op for a different target on the sqlite planner path; check the call's target binding.`, { meta: {
@@ -31,4 +31,4 @@ function renderOps(calls, lowerer) {
31
31
  //#endregion
32
32
  export { renderOps as t };
33
33
 
34
- //# sourceMappingURL=render-ops-BdrBMvjY-CyVOYy9i.mjs.map
34
+ //# sourceMappingURL=render-ops-CQ-Kf4P0-DDUU4OFY.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"render-ops-BdrBMvjY-CyVOYy9i.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/render-ops-BdrBMvjY.mjs"],"sourcesContent":["import { l as sqliteError } from \"./errors-DxbvEzQp.mjs\";\nimport { b as isSqliteOpFactoryCall } from \"./op-factory-call-2IWWs4es.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { isThenable } from \"@internal/utils/promise\";\n//#region src/core/migrations/render-ops.ts\nfunction assertSqliteOp(op, callFactoryName) {\n\tconst targetId = blindCast(op).target?.id;\n\tif (targetId !== \"sqlite\") throw sqliteError(\"MIGRATION.TARGET_MISMATCH\", `renderOps: expected sqlite op but got target.id=\"${String(targetId)}\" for op.id=\"${op.id}\" (factoryName=\"${callFactoryName}\"). An OpFactoryCall produced an op for a different target on the sqlite planner path; check the call's target binding.`, { meta: {\n\t\topId: op.id,\n\t\ttargetId: String(targetId),\n\t\tfactoryName: callFactoryName\n\t} });\n}\nfunction checkedOp(opOrPromise, callFactoryName) {\n\tif (isThenable(opOrPromise)) {\n\t\tconst checked = opOrPromise.then((op) => {\n\t\t\tassertSqliteOp(op, callFactoryName);\n\t\t\treturn op;\n\t\t});\n\t\tchecked.catch(() => void 0);\n\t\treturn checked;\n\t}\n\tassertSqliteOp(opOrPromise, callFactoryName);\n\treturn opOrPromise;\n}\nfunction renderOps(calls, lowerer) {\n\treturn calls.flatMap((c) => {\n\t\treturn (isSqliteOpFactoryCall(c) ? c.toOps(lowerer) : [blindCast(c).toOp(lowerer)]).map((opOrPromise) => checkedOp(opOrPromise, c.factoryName));\n\t});\n}\n//#endregion\nexport { renderOps as t };\n\n//# sourceMappingURL=render-ops-BdrBMvjY.mjs.map"],"mappings":";;;;;AAKA,SAAS,eAAe,IAAI,iBAAiB;CAC5C,MAAM,WAAW,UAAU,EAAE,CAAC,CAAC,QAAQ;CACvC,IAAI,aAAa,UAAU,MAAM,YAAY,6BAA6B,oDAAoD,OAAO,QAAQ,EAAE,eAAe,GAAG,GAAG,kBAAkB,gBAAgB,0HAA0H,EAAE,MAAM;EACvU,MAAM,GAAG;EACT,UAAU,OAAO,QAAQ;EACzB,aAAa;CACd,EAAE,CAAC;AACJ;AACA,SAAS,UAAU,aAAa,iBAAiB;CAChD,IAAI,WAAW,WAAW,GAAG;EAC5B,MAAM,UAAU,YAAY,MAAM,OAAO;GACxC,eAAe,IAAI,eAAe;GAClC,OAAO;EACR,CAAC;EACD,QAAQ,YAAY,KAAK,CAAC;EAC1B,OAAO;CACR;CACA,eAAe,aAAa,eAAe;CAC3C,OAAO;AACR;AACA,SAAS,UAAU,OAAO,SAAS;CAClC,OAAO,MAAM,SAAS,MAAM;EAC3B,QAAQ,sBAAsB,CAAC,IAAI,EAAE,MAAM,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,EAAA,CAAG,KAAK,gBAAgB,UAAU,aAAa,EAAE,WAAW,CAAC;CAC/I,CAAC;AACF"}
1
+ {"version":3,"file":"render-ops-CQ-Kf4P0-DDUU4OFY.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/render-ops-CQ-Kf4P0.mjs"],"sourcesContent":["import { l as sqliteError } from \"./errors-DxbvEzQp.mjs\";\nimport { b as isSqliteOpFactoryCall } from \"./op-factory-call-DjbjegGT.mjs\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { isThenable } from \"@internal/utils/promise\";\n//#region src/core/migrations/render-ops.ts\nfunction assertSqliteOp(op, callFactoryName) {\n\tconst targetId = blindCast(op).target?.id;\n\tif (targetId !== \"sqlite\") throw sqliteError(\"MIGRATION.TARGET_MISMATCH\", `renderOps: expected sqlite op but got target.id=\"${String(targetId)}\" for op.id=\"${op.id}\" (factoryName=\"${callFactoryName}\"). An OpFactoryCall produced an op for a different target on the sqlite planner path; check the call's target binding.`, { meta: {\n\t\topId: op.id,\n\t\ttargetId: String(targetId),\n\t\tfactoryName: callFactoryName\n\t} });\n}\nfunction checkedOp(opOrPromise, callFactoryName) {\n\tif (isThenable(opOrPromise)) {\n\t\tconst checked = opOrPromise.then((op) => {\n\t\t\tassertSqliteOp(op, callFactoryName);\n\t\t\treturn op;\n\t\t});\n\t\tchecked.catch(() => void 0);\n\t\treturn checked;\n\t}\n\tassertSqliteOp(opOrPromise, callFactoryName);\n\treturn opOrPromise;\n}\nfunction renderOps(calls, lowerer) {\n\treturn calls.flatMap((c) => {\n\t\treturn (isSqliteOpFactoryCall(c) ? c.toOps(lowerer) : [blindCast(c).toOp(lowerer)]).map((opOrPromise) => checkedOp(opOrPromise, c.factoryName));\n\t});\n}\n//#endregion\nexport { renderOps as t };\n\n//# sourceMappingURL=render-ops-CQ-Kf4P0.mjs.map"],"mappings":";;;;;AAKA,SAAS,eAAe,IAAI,iBAAiB;CAC5C,MAAM,WAAW,UAAU,EAAE,CAAC,CAAC,QAAQ;CACvC,IAAI,aAAa,UAAU,MAAM,YAAY,6BAA6B,oDAAoD,OAAO,QAAQ,EAAE,eAAe,GAAG,GAAG,kBAAkB,gBAAgB,0HAA0H,EAAE,MAAM;EACvU,MAAM,GAAG;EACT,UAAU,OAAO,QAAQ;EACzB,aAAa;CACd,EAAE,CAAC;AACJ;AACA,SAAS,UAAU,aAAa,iBAAiB;CAChD,IAAI,WAAW,WAAW,GAAG;EAC5B,MAAM,UAAU,YAAY,MAAM,OAAO;GACxC,eAAe,IAAI,eAAe;GAClC,OAAO;EACR,CAAC;EACD,QAAQ,YAAY,KAAK,CAAC;EAC1B,OAAO;CACR;CACA,eAAe,aAAa,eAAe;CAC3C,OAAO;AACR;AACA,SAAS,UAAU,OAAO,SAAS;CAClC,OAAO,MAAM,SAAS,MAAM;EAC3B,QAAQ,sBAAsB,CAAC,IAAI,EAAE,MAAM,OAAO,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,EAAA,CAAG,KAAK,gBAAgB,UAAU,aAAa,EAAE,WAAW,CAAC;CAC/I,CAAC;AACF"}
@@ -1,4 +1,4 @@
1
- import { n as sqliteTargetDescriptorMetaRuntime } from "./date-time-now-generators-DtRz9c2R-BkrBeLl2.mjs";
1
+ import { n as sqliteTargetDescriptorMetaRuntime } from "./date-time-now-generators-DUb3x91B-D0keGG59.mjs";
2
2
  import { structuredError } from "@prisma/orm-framework/utils/structured-error";
3
3
  import { type } from "arktype";
4
4
  //#region ../../../3-targets/sqlite/1-target/dist/runtime.mjs
@@ -29,4 +29,4 @@ function validateSqliteIsolationLevel(value) {
29
29
  //#endregion
30
30
  export { validateSqliteIsolationLevel as i, sqliteIsolationLevels as n, sqliteRuntimeTargetDescriptor as r, sqliteIsolationLevelSchema as t };
31
31
 
32
- //# sourceMappingURL=runtime-DQll1Swl.mjs.map
32
+ //# sourceMappingURL=runtime-C43fN_cJ.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-DQll1Swl.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/runtime.mjs"],"sourcesContent":["import { n as sqliteTargetDescriptorMetaRuntime, t as sqliteNowGenerators } from \"./date-time-now-generators-DtRz9c2R.mjs\";\nimport { n as SqliteContractSerializer, t as SqliteContractView } from \"./sqlite-contract-view-6qHjyMcG.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { type } from \"arktype\";\n//#region src/core/runtime/runtime-target.ts\nconst sqliteRuntimeTargetDescriptor = {\n\t...sqliteTargetDescriptorMetaRuntime,\n\tcodecs: () => [],\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"sqlite\"\n\t\t};\n\t}\n};\n//#endregion\n//#region src/core/transaction-isolation.ts\nconst sqliteIsolationLevels = { Serializable: \"Serializable\" };\nconst sqliteIsolationLevelSchema = type.enumerated(...Object.values(sqliteIsolationLevels));\nfunction validateSqliteIsolationLevel(value) {\n\tconst result = sqliteIsolationLevelSchema(value);\n\tif (result instanceof type.errors) throw structuredError(\"RUNTIME.ARGUMENT_INVALID\", \"Invalid transaction isolation level\", {\n\t\twhy: result.summary,\n\t\tfix: \"Use Serializable for SQLite transactions.\",\n\t\tmeta: {\n\t\t\targument: \"isolationLevel\",\n\t\t\treceived: value\n\t\t}\n\t});\n\treturn result;\n}\n//#endregion\nexport { SqliteContractSerializer, SqliteContractView, sqliteRuntimeTargetDescriptor as default, sqliteIsolationLevelSchema, sqliteIsolationLevels, sqliteNowGenerators, validateSqliteIsolationLevel };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;AAKA,MAAM,gCAAgC;CACrC,GAAG;CACH,cAAc,CAAC;CACf,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD;AAGA,MAAM,wBAAwB,EAAE,cAAc,eAAe;AAC7D,MAAM,6BAA6B,KAAK,WAAW,GAAG,OAAO,OAAO,qBAAqB,CAAC;AAC1F,SAAS,6BAA6B,OAAO;CAC5C,MAAM,SAAS,2BAA2B,KAAK;CAC/C,IAAI,kBAAkB,KAAK,QAAQ,MAAM,gBAAgB,4BAA4B,uCAAuC;EAC3H,KAAK,OAAO;EACZ,KAAK;EACL,MAAM;GACL,UAAU;GACV,UAAU;EACX;CACD,CAAC;CACD,OAAO;AACR"}
1
+ {"version":3,"file":"runtime-C43fN_cJ.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/runtime.mjs"],"sourcesContent":["import { n as sqliteTargetDescriptorMetaRuntime, t as sqliteNowGenerators } from \"./date-time-now-generators-DUb3x91B.mjs\";\nimport { n as SqliteContractSerializer, t as SqliteContractView } from \"./sqlite-contract-view-c-qO_pKt.mjs\";\nimport { structuredError } from \"@internal/utils/structured-error\";\nimport { type } from \"arktype\";\n//#region src/core/runtime/runtime-target.ts\nconst sqliteRuntimeTargetDescriptor = {\n\t...sqliteTargetDescriptorMetaRuntime,\n\tcodecs: () => [],\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"sqlite\"\n\t\t};\n\t}\n};\n//#endregion\n//#region src/core/transaction-isolation.ts\nconst sqliteIsolationLevels = { Serializable: \"Serializable\" };\nconst sqliteIsolationLevelSchema = type.enumerated(...Object.values(sqliteIsolationLevels));\nfunction validateSqliteIsolationLevel(value) {\n\tconst result = sqliteIsolationLevelSchema(value);\n\tif (result instanceof type.errors) throw structuredError(\"RUNTIME.ARGUMENT_INVALID\", \"Invalid transaction isolation level\", {\n\t\twhy: result.summary,\n\t\tfix: \"Use Serializable for SQLite transactions.\",\n\t\tmeta: {\n\t\t\targument: \"isolationLevel\",\n\t\t\treceived: value\n\t\t}\n\t});\n\treturn result;\n}\n//#endregion\nexport { SqliteContractSerializer, SqliteContractView, sqliteRuntimeTargetDescriptor as default, sqliteIsolationLevelSchema, sqliteIsolationLevels, sqliteNowGenerators, validateSqliteIsolationLevel };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;;AAKA,MAAM,gCAAgC;CACrC,GAAG;CACH,cAAc,CAAC;CACf,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD;AAGA,MAAM,wBAAwB,EAAE,cAAc,eAAe;AAC7D,MAAM,6BAA6B,KAAK,WAAW,GAAG,OAAO,OAAO,qBAAqB,CAAC;AAC1F,SAAS,6BAA6B,OAAO;CAC5C,MAAM,SAAS,2BAA2B,KAAK;CAC/C,IAAI,kBAAkB,KAAK,QAAQ,MAAM,gBAAgB,4BAA4B,uCAAuC;EAC3H,KAAK,OAAO;EACZ,KAAK;EACL,MAAM;GACL,UAAU;GACV,UAAU;EACX;CACD,CAAC;CACD,OAAO;AACR"}
@@ -52,7 +52,7 @@ declare const sqliteRuntimeTargetDescriptor: SqlRuntimeTargetDescriptor<'sqlite'
52
52
  declare class SqliteContractSerializer extends SqlContractSerializerBase<Contract<SqlStorage>> {
53
53
  constructor();
54
54
  protected hydrateSqlNamespaceEntry(nsId: string, raw: Record<string, unknown>): Namespace | SqlNamespaceInput;
55
- serializeContract(contract: Contract<SqlStorage>): JsonObject;
55
+ protected printContractV1(contract: Contract<SqlStorage>): JsonObject;
56
56
  }
57
57
  //#endregion
58
58
  //#region src/core/transaction-isolation.d.ts
@@ -64,4 +64,4 @@ declare const sqliteIsolationLevelSchema: import("arktype/internal/variants/stri
64
64
  declare function validateSqliteIsolationLevel(value: unknown): SqliteIsolationLevel;
65
65
  //#endregion
66
66
  export { sqliteIsolationLevels as a, validateSqliteIsolationLevel as c, sqliteIsolationLevelSchema as i, SqliteIsolationLevel as n, sqliteNowGenerators as o, SqliteRuntimeTargetInstance as r, sqliteRuntimeTargetDescriptor as s, SqliteContractSerializer as t };
67
- //# sourceMappingURL=runtime-JuCbuSJz.d.mts.map
67
+ //# sourceMappingURL=runtime-DqzT70C4.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-JuCbuSJz.d.mts","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;iBAWiB,cAAc,SAAS;iBACvB,gBAAgB,SAAS;iBACzB,gBAAgB,SAAS;iBACzB;iBACA;;;;cAIH;WACH;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB,UAAU;;WAE3B;WACA,iBAAiB;;;;UAIlB,oCAAoC;cAChC,+BAA+B,qCAAqC;;;;;;;;;cASpE,iCAAiC,0BAA0B,SAAS;EAChF;YACU,yBAAyB,cAAc,KAAK,0BAA0B,YAAY;EAC5F,kBAAkB,UAAU,SAAS,cAAc;;;;cAIvC;WACH;;KAEN,+BAA+B,oCAAoC;cAC1D,0EAA0E;iBACvE,6BAA6B,iBAAiB"}
1
+ {"version":3,"file":"runtime-DqzT70C4.d.mts","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/runtime.d.mts"],"mappings":";;;;;;;;;;;;iBAWiB,cAAc,SAAS;iBACvB,gBAAgB,SAAS;iBACzB,gBAAgB,SAAS;iBACzB;iBACA;;;;cAIH;WACH;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB;;WAEjB;WACA,iBAAiB,UAAU;;WAE3B;WACA,iBAAiB;;;;UAIlB,oCAAoC;cAChC,+BAA+B,qCAAqC;;;;;;;;;cASpE,iCAAiC,0BAA0B,SAAS;EAChF;YACU,yBAAyB,cAAc,KAAK,0BAA0B,YAAY;YAClF,gBAAgB,UAAU,SAAS,cAAc;;;;cAI/C;WACH;;KAEN,+BAA+B,oCAAoC;cAC1D,0EAA0E;iBACvE,6BAA6B,iBAAiB"}
@@ -1,10 +1,10 @@
1
- import { s as sqliteDataTypes } from "./data-types-C_NKe4Ni-D7r8QkSb.mjs";
1
+ import { s as sqliteDataTypes } from "./data-types-Djvapurb-BR-Y4NWN.mjs";
2
2
  import { n as buildSqliteNamespace } from "./sqlite-unbound-database-CfLXSiVo-Dy5VBXGz.mjs";
3
3
  import { createDataTypeLookup } from "@prisma/orm-framework/components/codec";
4
4
  import { blindCast } from "@prisma/orm-framework/utils/casts";
5
5
  import { SqlContractSerializerBase } from "@prisma/orm-family-sql/family/ir";
6
6
  import { buildSqlSingleNamespaceView } from "@prisma/orm-family-sql/contract/contract-view";
7
- //#region ../../../3-targets/sqlite/1-target/dist/sqlite-contract-view-6qHjyMcG.mjs
7
+ //#region ../../../3-targets/sqlite/1-target/dist/sqlite-contract-view-c-qO_pKt.mjs
8
8
  /**
9
9
  * SQLite target `ContractSerializer` concretion. Mirrors the Postgres
10
10
  * shape: inherits the full SQL-family deserialization pipeline and
@@ -18,7 +18,7 @@ var SqliteContractSerializer = class extends SqlContractSerializerBase {
18
18
  hydrateSqlNamespaceEntry(nsId, raw) {
19
19
  return buildSqliteNamespace(blindCast(super.hydrateSqlNamespaceEntry(nsId, raw)));
20
20
  }
21
- serializeContract(contract) {
21
+ printContractV1(contract) {
22
22
  const { storage, ...rest } = contract;
23
23
  const namespacesJson = {};
24
24
  for (const [nsId, ns] of Object.entries(storage.namespaces)) namespacesJson[nsId] = {
@@ -48,4 +48,4 @@ const SqliteContractView = {
48
48
  //#endregion
49
49
  export { SqliteContractView as n, SqliteContractSerializer as t };
50
50
 
51
- //# sourceMappingURL=sqlite-contract-view-6qHjyMcG-BHZ8iO5v.mjs.map
51
+ //# sourceMappingURL=sqlite-contract-view-c-qO_pKt-DOCoqwrD.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sqlite-contract-view-c-qO_pKt-DOCoqwrD.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/sqlite-contract-view-c-qO_pKt.mjs"],"sourcesContent":["import { s as sqliteDataTypes } from \"./data-types-Djvapurb.mjs\";\nimport { n as buildSqliteNamespace } from \"./sqlite-unbound-database-CfLXSiVo.mjs\";\nimport { createDataTypeLookup } from \"@internal/framework-components/codec\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { SqlContractSerializerBase } from \"@internal/family-sql/ir\";\nimport { buildSqlSingleNamespaceView } from \"@internal/sql-contract/contract-view\";\n//#region src/core/sqlite-contract-serializer.ts\n/**\n* SQLite target `ContractSerializer` concretion. Mirrors the Postgres\n* shape: inherits the full SQL-family deserialization pipeline and\n* materialises namespace entries as SQLite database concretions that\n* expose `qualifyTable()` for runtime SQL rendering.\n*/\nvar SqliteContractSerializer = class extends SqlContractSerializerBase {\n\tconstructor() {\n\t\tsuper(/* @__PURE__ */ new Map(), [], createDataTypeLookup(sqliteDataTypes));\n\t}\n\thydrateSqlNamespaceEntry(nsId, raw) {\n\t\treturn buildSqliteNamespace(blindCast(super.hydrateSqlNamespaceEntry(nsId, raw)));\n\t}\n\tprintContractV1(contract) {\n\t\tconst { storage, ...rest } = contract;\n\t\tconst namespacesJson = {};\n\t\tfor (const [nsId, ns] of Object.entries(storage.namespaces)) namespacesJson[nsId] = {\n\t\t\tid: ns.id,\n\t\t\tentries: this.serializeNamespaceEntries(ns.entries)\n\t\t};\n\t\treturn blindCast({\n\t\t\t...rest,\n\t\t\tstorage: {\n\t\t\t\tstorageHash: String(storage.storageHash),\n\t\t\t\tnamespaces: namespacesJson,\n\t\t\t\t...storage.types !== void 0 ? { types: this.serializeJsonObject(storage.types) } : {}\n\t\t\t}\n\t\t});\n\t}\n};\n//#endregion\n//#region src/core/sqlite-contract-view.ts\nconst SqliteContractView = {\n\t/** Wrap an already-deserialized SQLite contract in a view. */\n\tfrom(contract) {\n\t\treturn buildSqlSingleNamespaceView(contract);\n\t},\n\t/** Deserialize a SQLite contract JSON envelope and wrap it in a view. */\n\tfromJson(json) {\n\t\treturn buildSqlSingleNamespaceView(new SqliteContractSerializer().deserializeContract(json));\n\t}\n};\n//#endregion\nexport { SqliteContractSerializer as n, SqliteContractView as t };\n\n//# sourceMappingURL=sqlite-contract-view-c-qO_pKt.mjs.map"],"mappings":";;;;;;;;;;;;;AAaA,IAAI,2BAA2B,cAAc,0BAA0B;CACtE,cAAc;EACb,sBAAsB,IAAI,IAAI,GAAG,CAAC,GAAG,qBAAqB,eAAe,CAAC;CAC3E;CACA,yBAAyB,MAAM,KAAK;EACnC,OAAO,qBAAqB,UAAU,MAAM,yBAAyB,MAAM,GAAG,CAAC,CAAC;CACjF;CACA,gBAAgB,UAAU;EACzB,MAAM,EAAE,SAAS,GAAG,SAAS;EAC7B,MAAM,iBAAiB,CAAC;EACxB,KAAK,MAAM,CAAC,MAAM,OAAO,OAAO,QAAQ,QAAQ,UAAU,GAAG,eAAe,QAAQ;GACnF,IAAI,GAAG;GACP,SAAS,KAAK,0BAA0B,GAAG,OAAO;EACnD;EACA,OAAO,UAAU;GAChB,GAAG;GACH,SAAS;IACR,aAAa,OAAO,QAAQ,WAAW;IACvC,YAAY;IACZ,GAAG,QAAQ,UAAU,KAAK,IAAI,EAAE,OAAO,KAAK,oBAAoB,QAAQ,KAAK,EAAE,IAAI,CAAC;GACrF;EACD,CAAC;CACF;AACD;AAGA,MAAM,qBAAqB;;CAE1B,KAAK,UAAU;EACd,OAAO,4BAA4B,QAAQ;CAC5C;;CAEA,SAAS,MAAM;EACd,OAAO,4BAA4B,IAAI,yBAAyB,CAAC,CAAC,oBAAoB,IAAI,CAAC;CAC5F;AACD"}
@@ -1,11 +1,11 @@
1
1
  import { f as SQLITE_INTEGER_CODEC_ID, h as SQLITE_TEXT_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID } from "./codec-ids-CTshXpbg-tcdbf_VC.mjs";
2
- import { S as sqliteTime, _ as sqliteInteger, b as sqliteText, c as sqliteDate, h as sqliteDuration, i as sqliteCharacter, o as sqliteCharacterVarying, p as sqliteDecimal, r as sqliteBoolean, t as sqliteBlob, u as sqliteDatetime, v as sqliteJson, y as sqliteReal } from "./data-types-C_NKe4Ni-D7r8QkSb.mjs";
2
+ import { S as sqliteTime, _ as sqliteInteger, b as sqliteText, c as sqliteDate, h as sqliteDuration, i as sqliteCharacter, o as sqliteCharacterVarying, p as sqliteDecimal, r as sqliteBoolean, t as sqliteBlob, u as sqliteDatetime, v as sqliteJson, y as sqliteReal } from "./data-types-Djvapurb-BR-Y4NWN.mjs";
3
3
  import { i as errorSqliteMigrationStackMissing, l as sqliteError } from "./errors-DxbvEzQp-CeTjoGtL.mjs";
4
- import { n as encodeSqliteDatetime } from "./codecs-CE5McdzP-CZ5F4Trz.mjs";
4
+ import { n as encodeSqliteDatetime } from "./codecs-izq9l1NG-Bb2RnXsx.mjs";
5
5
  import { n as escapeLiteral } from "./sql-utils-CHBxMmv--Dl7wl7n3.mjs";
6
- import { n as SqliteContractView } from "./sqlite-contract-view-6qHjyMcG-BHZ8iO5v.mjs";
7
- import { n as sqliteResolveDefault } from "./default-normalizer-Xsys5QJm-bPQiHGKp.mjs";
8
- import { A as sqliteIdentifiersCollide, O as renameTableSteps, S as buildRecreateSummary, T as indexReplacementCalls, _ as RenameStoredKeyCall, a as DeleteRowsCall, c as DropTableCall, g as RenameColumnCall, h as RemoveStoredValueCall, i as DataTransformCall, k as sqliteDefaultToDdlColumnDefault, l as FillStoredKeyCall, m as RemoveStoredKeyCall, n as CreateIndexCall, o as DropColumnCall, p as RecreateTableCall, r as CreateTableCall, s as DropIndexCall, t as AddColumnCall, u as INLINE_AUTOINCREMENT_PRIMARY_KEY, v as RenameTableCall, x as buildRecreatePostchecks, y as ReplaceStoredValueCall } from "./op-factory-call-2IWWs4es-CajfeAMX.mjs";
6
+ import { n as SqliteContractView } from "./sqlite-contract-view-c-qO_pKt-DOCoqwrD.mjs";
7
+ import { n as sqliteResolveDefault } from "./default-normalizer-BANdMVGr-BiUHyBX1.mjs";
8
+ import { A as sqliteDefaultToDdlColumnDefault, C as buildRecreateSummary, E as indexReplacementCalls, S as buildRecreatePostchecks, _ as RenameColumnCall, a as DataTransformCall, b as ReplaceStoredValueCall, c as DropIndexCall, d as INLINE_AUTOINCREMENT_PRIMARY_KEY, g as RemoveStoredValueCall, h as RemoveStoredKeyCall, i as CreateTableCall, j as sqliteIdentifiersCollide, k as renameTableSteps, l as DropTableCall, m as RecreateTableCall, o as DeleteRowsCall, r as CreateIndexCall, s as DropColumnCall, t as AddColumnCall, u as FillStoredKeyCall, v as RenameStoredKeyCall, y as RenameTableCall } from "./op-factory-call-DjbjegGT-DsQBI5Ll.mjs";
9
9
  import { t as CONTROL_TABLE_NAMES } from "./control-tables-D_o8dKRB-n_QqsXcm.mjs";
10
10
  import { DdlColumn, ForeignKeyConstraint, PrimaryKeyConstraint, UniqueConstraint } from "@prisma/orm-family-sql/relational-core/ast";
11
11
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
@@ -24,7 +24,7 @@ import { namingOf, namingOfLiveName, parseWireName } from "@prisma/orm-family-sq
24
24
  import { isArrayEqual } from "@prisma/orm-framework/utils/array-equal";
25
25
  import { Migration } from "@prisma/orm-family-sql/family/migration";
26
26
  import { MigrationContractViews } from "@prisma/orm-toolchain/migration-tools/migration";
27
- //#region ../../../3-targets/sqlite/1-target/dist/sqlite-migration-BNMabSfq.mjs
27
+ //#region ../../../3-targets/sqlite/1-target/dist/sqlite-migration-Cmzykasm.mjs
28
28
  /**
29
29
  * The SQLite expected-side projection: contract → flat relational schema IR.
30
30
  *
@@ -1360,4 +1360,4 @@ function copyExpressionSlotsOf(copyExpressions, table, option = "copyExpressions
1360
1360
  //#endregion
1361
1361
  export { sqliteSchemaTables as _, createWorkingSchema as a, verifySqliteDatabaseSchema as b, issueNode as c, renameTableByHandStatements as d, renderRenameTableCall as f, sqlitePlannerStrategies as g, sqliteContractToSchema as h, conflictForDisallowedCall as i, pairIndexReplacements as l, sqliteColumnRenameCall as m, buildSqlitePlanDiff as n, diffSqliteSchema as o, sqliteActualSchema as p, coalesceSubtreeIssues as r, indexNameCaseChange as s, SqliteMigration as t, planIssues as u, sqliteTableRenameByHand as v, sqliteTableRenameCall as y };
1362
1362
 
1363
- //# sourceMappingURL=sqlite-migration-BNMabSfq-C-TEN2jV.mjs.map
1363
+ //# sourceMappingURL=sqlite-migration-Cmzykasm--GxBXXny.mjs.map