@prisma/orm-target-sqlite 0.17.0-dev.1 → 0.17.0-dev.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/{adapter-wc9p_v2Z-y8pzqMfG.mjs → adapter-BI0XGOVw-Df6PZFmg.mjs} +6 -6
  2. package/dist/{adapter-wc9p_v2Z-y8pzqMfG.mjs.map → adapter-BI0XGOVw-Df6PZFmg.mjs.map} +1 -1
  3. package/dist/adapter-D7zw14p5.d.mts +2 -0
  4. package/dist/{adapter-DizMsGCb-n4h4w8ms.d.mts → adapter-DEYUC-KO-DO_abhIq.d.mts} +12 -4
  5. package/dist/adapter-DEYUC-KO-DO_abhIq.d.mts.map +1 -0
  6. package/dist/adapter.d.mts +11 -10
  7. package/dist/adapter.mjs +2 -2
  8. package/dist/adapter__adapter.d.mts +3 -3
  9. package/dist/adapter__adapter.mjs +1 -1
  10. package/dist/adapter__codec-types.d.mts +3 -3
  11. package/dist/adapter__control.d.mts +1 -1
  12. package/dist/adapter__control.mjs +2 -2
  13. package/dist/adapter__control.mjs.map +1 -1
  14. package/dist/adapter__runtime.d.mts +1 -1
  15. package/dist/adapter__runtime.mjs +3 -3
  16. package/dist/adapter__runtime.mjs.map +1 -1
  17. package/dist/adapter__sql-renderer.d.mts +3 -0
  18. package/dist/adapter__sql-renderer.mjs +2 -0
  19. package/dist/adapter__types.d.mts +2 -2
  20. package/dist/aggregates-BGuKJwfI.d.mts +10 -0
  21. package/dist/aggregates-BGuKJwfI.d.mts.map +1 -0
  22. package/dist/aggregates-CTDRDyvD.mjs +95 -0
  23. package/dist/aggregates-CTDRDyvD.mjs.map +1 -0
  24. package/dist/{codec-descriptor-BcgD9f3L-BjEkn9Ob.d.mts → codec-descriptor-BcgD9f3L-yDi5nh_k.d.mts} +2 -2
  25. package/dist/{codec-descriptor-BcgD9f3L-BjEkn9Ob.d.mts.map → codec-descriptor-BcgD9f3L-yDi5nh_k.d.mts.map} +1 -1
  26. package/dist/codec-descriptor-rFuZ9DzY-CKRIRxah.d.mts +1 -0
  27. package/dist/codec-descriptor-vwfD3BMy.d.mts +2 -0
  28. package/dist/codec-types-BV3IjK44.d.mts +2 -0
  29. package/dist/codec-types-C29741cn.d.mts +1 -0
  30. package/dist/{codec-types-DKB--ltR-CIuvX0zx.d.mts → codec-types-DOyikA9Q-DVHiIZxI.d.mts} +5 -5
  31. package/dist/{codec-types-DKB--ltR-CIuvX0zx.d.mts.map → codec-types-DOyikA9Q-DVHiIZxI.d.mts.map} +1 -1
  32. package/dist/codecs-BVBvwzGc.d.mts +1 -0
  33. package/dist/{codecs-CM_2W3uA.mjs → codecs-BaoqGdxT.mjs} +13 -3
  34. package/dist/{codecs-CM_2W3uA.mjs.map → codecs-BaoqGdxT.mjs.map} +1 -1
  35. package/dist/{codecs-1-oOsTPG-Bv518Lbm.d.mts → codecs-CEh66QoN-oCsdncEe.d.mts} +12 -6
  36. package/dist/{codecs-1-oOsTPG-Bv518Lbm.d.mts.map → codecs-CEh66QoN-oCsdncEe.d.mts.map} +1 -1
  37. package/dist/{control-cahq7u71.d.mts → control-CLirKz11.d.mts} +4 -4
  38. package/dist/{control-cahq7u71.d.mts.map → control-CLirKz11.d.mts.map} +1 -1
  39. package/dist/descriptor-meta-DjKgG4z5-CDdHwPoG.mjs +34 -0
  40. package/dist/descriptor-meta-DjKgG4z5-CDdHwPoG.mjs.map +1 -0
  41. package/dist/{pack-BfwyQ0b3.d.mts → pack-Cnu6UOJx.d.mts} +2 -2
  42. package/dist/{pack-BfwyQ0b3.d.mts.map → pack-Cnu6UOJx.d.mts.map} +1 -1
  43. package/dist/{planner-DiGcIjl1-QnNAhVmX.mjs → planner-DiGcIjl1-oFtDTY7-.mjs} +2 -2
  44. package/dist/{planner-DiGcIjl1-QnNAhVmX.mjs.map → planner-DiGcIjl1-oFtDTY7-.mjs.map} +1 -1
  45. package/dist/{runtime-tbBYTw7Z.d.mts → runtime-C5J9fusd.d.mts} +2 -2
  46. package/dist/{runtime-tbBYTw7Z.d.mts.map → runtime-C5J9fusd.d.mts.map} +1 -1
  47. package/dist/sql-renderer-KX6hn_tg.d.mts +1 -0
  48. package/dist/target.d.mts +9 -8
  49. package/dist/target.mjs +5 -4
  50. package/dist/target__aggregates.d.mts +2 -0
  51. package/dist/target__aggregates.mjs +2 -0
  52. package/dist/target__codec-descriptor.d.mts +2 -2
  53. package/dist/target__codec-types.d.mts +3 -3
  54. package/dist/target__codecs.d.mts +2 -2
  55. package/dist/target__codecs.mjs +1 -1
  56. package/dist/target__control.mjs +1 -1
  57. package/dist/target__pack.d.mts +1 -1
  58. package/dist/target__planner.mjs +1 -1
  59. package/dist/types-B7e2QVEx.d.mts +1 -0
  60. package/dist/{types-C5FSREvo-Bm6N5Kog.d.mts → types-C5FSREvo-CwUlKK34.d.mts} +4 -4
  61. package/dist/{types-C5FSREvo-Bm6N5Kog.d.mts.map → types-C5FSREvo-CwUlKK34.d.mts.map} +1 -1
  62. package/package.json +11 -9
  63. package/dist/adapter-DizMsGCb-n4h4w8ms.d.mts.map +0 -1
  64. package/dist/adapter-m_BtnNSn.d.mts +0 -2
  65. package/dist/codec-descriptor-CyCQXvSl.d.mts +0 -2
  66. package/dist/codec-descriptor-rFuZ9DzY-DO0k8l6N.d.mts +0 -1
  67. package/dist/codec-types-Tw3EFTjf.d.mts +0 -1
  68. package/dist/codec-types-wPDlPoD7.d.mts +0 -2
  69. package/dist/codecs-j-8RDkOt.d.mts +0 -1
  70. package/dist/descriptor-meta-CbYkqTkO-DEJNrICG.mjs +0 -30
  71. package/dist/descriptor-meta-CbYkqTkO-DEJNrICG.mjs.map +0 -1
  72. package/dist/types-DiH2oWUJ.d.mts +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"planner-DiGcIjl1-QnNAhVmX.mjs","names":["#lowerer"],"sources":["../../../../3-targets/3-targets/sqlite/dist/planner-DiGcIjl1.mjs"],"sourcesContent":["import { a as DropColumnCall, d as buildRecreateSummary, h as renderDefaultLiteral, i as DataTransformCall, l as RecreateTableCall, m as buildColumnTypeSql, n as CreateIndexCall, o as DropIndexCall, p as buildColumnDefaultSql, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as buildRecreatePostchecks } from \"./op-factory-call-C_or6163.mjs\";\nimport { t as CONTROL_TABLE_NAMES } from \"./control-tables-D_o8dKRB.mjs\";\nimport { t as TypeScriptRenderableSqliteMigration } from \"./planner-produced-sqlite-migration-C8nxPT0P.mjs\";\nimport { DdlColumn, ForeignKeyConstraint, FunctionColumnDefault, LiteralColumnDefault, PrimaryKeyConstraint, UniqueConstraint } from \"@internal/sql-relational-core/ast\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { RelationalSchemaNodeKind, SqlSchemaIR, relationalNodeGranularity } from \"@internal/sql-schema-ir/types\";\nimport { UNBOUND_NAMESPACE_ID, entityAt } from \"@internal/framework-components/ir\";\nimport { buildNativeTypeExpander, contractToSchemaIR, extractCodecControlHooks, planFieldEventOperations, plannerFailure } from \"@internal/family-sql/control\";\nimport { verifySqlSchemaByDiff } from \"@internal/family-sql/diff\";\nimport { diffSchemas, issueOutcome, orderIssuesByDependencies } from \"@internal/framework-components/control\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { InternalError, assertNever } from \"@internal/utils/internal-error\";\n//#region src/core/migrations/diff-database-schema.ts\n/** Renders a column default for the SQLite dialect. */\nfunction sqliteRenderDefault(def, _column) {\n\tif (def.kind === \"function\") {\n\t\tif (def.expression === \"now()\") return \"datetime('now')\";\n\t\treturn def.expression;\n\t}\n\treturn renderDefaultLiteral(def.value);\n}\n/**\n* The SQLite expected-side projection: contract → flat relational schema IR.\n*\n* `extras` thread the plan-time derivation input: the native-type expander,\n* so the expected side carries resolved native types (like the verify\n* side). Every expected column also carries its `codecRef` unconditionally\n* (Decision 5) — the planner's op-builders resolve DDL rendering from it at\n* plan time, so no separate render stamper is threaded here.\n*/\nfunction sqliteContractToSchema(contract, extras) {\n\treturn contractToSchemaIR(contract, {\n\t\tannotationNamespace: \"sqlite\",\n\t\trenderDefault: sqliteRenderDefault,\n\t\t...ifDefined(\"expandNativeType\", extras?.expandNativeType)\n\t});\n}\n/**\n* The SQLite schema verify: the full-tree node-diff verdict wrapped in the\n* issue-based result envelope. Used by the runner's post-apply check; the\n* family `verifySchema` runs the same composition via the descriptor hook.\n*/\nfunction verifySqliteDatabaseSchema(input) {\n\treturn verifySqlSchemaByDiff({\n\t\tcontract: input.contract,\n\t\tschema: input.actualSchema,\n\t\tstrict: input.strict,\n\t\tframeworkComponents: input.frameworkComponents,\n\t\tdiffSchema: diffSqliteSchema,\n\t\tgranularityOf: relationalNodeGranularity\n\t});\n}\n/**\n* Resolves a verdict-diff issue's subject table's declared control policy\n* directly from the contract. SQLite's expected tree is flat, so the issue\n* path carries no namespace segment — `path[1]` is the table name (`path[0]`\n* is the tree root's own id); every contract namespace is searched for that\n* table name (table names are globally unique in the flat tree — duplicates\n* across namespaces are rejected earlier, at `contractToSchemaIR`).\n*/\nfunction resolveControlPolicy(issue, contract) {\n\tconst tableName = issue.path[1];\n\tif (tableName === void 0) return void 0;\n\tfor (const namespaceId of Object.keys(contract.storage.namespaces)) {\n\t\tconst table = entityAt(contract.storage, {\n\t\t\tnamespaceId,\n\t\t\tentityKind: \"table\",\n\t\t\tentityName: tableName\n\t\t});\n\t\tif (table !== void 0) return table.control;\n\t}\n}\n/**\n* The SQLite full-tree node diff for the family verify verdict: derive the\n* expected flat tree with resolved leaf values (expander threaded so\n* parameterized types compare expanded; FK nodes born with the flat empty\n* `resolvedReferencedNamespace`), and run the generic differ over the trees\n* as derived. Flat targets need no ownership scoping. The codec `verifyType`\n* hooks run once per contract namespace with tables, each against the sole\n* flat actual root — exactly the legacy per-namespace pairing.\n*/\nfunction diffSqliteSchema(input) {\n\tconst expandNativeType = buildNativeTypeExpander(input.frameworkComponents);\n\tconst expected = sqliteContractToSchema(input.contract, { ...ifDefined(\"expandNativeType\", expandNativeType) });\n\tconst actual = input.schema instanceof SqlSchemaIR ? input.schema : blindCast(input.schema);\n\treturn {\n\t\tissues: diffSchemas(expected, actual),\n\t\tresolveControlPolicy: (issue) => resolveControlPolicy(issue, input.contract),\n\t\tnamespacePairs: Object.values(input.contract.storage.namespaces).filter((ns) => Object.keys(ns.entries.table ?? {}).length > 0).map(() => ({ actual }))\n\t};\n}\n/**\n* The SQLite planner's diff input: the same tree-building\n* `diffSqliteSchema` uses (expander threaded, FK nodes born flat). One differ\n* drives both verify and plan over the trees as derived; this is the plan-side\n* derivation — column DDL resolves from each expected column's `codecRef` at\n* plan time (`column-ddl-rendering.ts`), so no separate render stamping happens here.\n*/\nfunction buildSqlitePlanDiff(input) {\n\tconst expandNativeType = buildNativeTypeExpander(input.frameworkComponents);\n\tconst expected = sqliteContractToSchema(input.contract, { ...ifDefined(\"expandNativeType\", expandNativeType) });\n\tconst actual = new SqlSchemaIR(withRecordKeyNames(input.actualSchema));\n\treturn {\n\t\texpected,\n\t\tactual,\n\t\tissues: diffSchemas(expected, actual)\n\t};\n}\n/**\n* Every schema-tree builder in this codebase derives a table's / column's\n* `name` from the record key it's stored under (`contractToSchemaIR`,\n* the SQLite introspection adapter) rather than trusting a redundant\n* embedded field — the record key IS the identity. Mirrors that discipline\n* for the actual/live tree before construction, so `SqlTableIR.id` /\n* `SqlColumnIR.id` (both derived from `.name`) are always correct without\n* requiring every caller to duplicate the key onto the value. A no-op for a\n* tree that already carries matching names (the real introspection adapter\n* always does).\n*/\nfunction withRecordKeyNames(actualSchema) {\n\tconst raw = blindCast(actualSchema);\n\tconst tables = {};\n\tfor (const [tableName, table] of Object.entries(raw.tables ?? {})) {\n\t\tconst rawTable = blindCast(table);\n\t\tconst columns = {};\n\t\tfor (const [columnName, column] of Object.entries(blindCast(table).columns ?? {})) columns[columnName] = {\n\t\t\t...blindCast(column),\n\t\t\tname: columnName\n\t\t};\n\t\ttables[tableName] = {\n\t\t\t...rawTable,\n\t\t\tname: tableName,\n\t\t\tcolumns,\n\t\t\tforeignKeys: rawTable.foreignKeys ?? [],\n\t\t\tuniques: rawTable.uniques ?? [],\n\t\t\tindexes: rawTable.indexes ?? []\n\t\t};\n\t}\n\treturn { tables };\n}\n//#endregion\n//#region src/core/migrations/column-ddl-rendering.ts\n/**\n* Reconstructs the `StorageColumn`-shaped fields `buildColumnTypeSql` /\n* `buildColumnDefaultSql` expect, from a column node's own stamped codec\n* identity (`codecRef` / `codecBaseNativeType`, Decision 5) — never the\n* contract. SQLite's type renderer only uppercases the resolved base type\n* (no parameterized expansion, no named-type quoting), so `typeRef` is\n* deliberately left unset here: setting it would send `buildColumnTypeSql`\n* back through a live `storageTypes` lookup the node's fields have already\n* resolved past, which throws for an unrecognized reference (unlike\n* Postgres's lenient fallback).\n*/\nfunction columnLike(column) {\n\tif (column.codecRef === void 0 || column.codecBaseNativeType === void 0) throw new InternalError(`columnLike: expected column \"${column.name}\" carries no codec identity — the expected tree must be derived via contractToSchemaIR for planning`);\n\treturn {\n\t\tnativeType: column.codecBaseNativeType,\n\t\tcodecId: column.codecRef.codecId,\n\t\tnullable: column.nullable,\n\t\t...(column.many ?? column.codecRef.many) !== void 0 ? { many: column.many ?? column.codecRef.many } : {},\n\t\t...column.codecRef.typeParams !== void 0 ? { typeParams: blindCast(column.codecRef.typeParams) } : {},\n\t\t...column.resolvedDefault !== void 0 ? { default: column.resolvedDefault } : {}\n\t};\n}\nfunction sqliteDefaultToDdlColumnDefault(columnDefault) {\n\tif (!columnDefault) return void 0;\n\tswitch (columnDefault.kind) {\n\t\tcase \"literal\": return new LiteralColumnDefault(columnDefault.value);\n\t\tcase \"function\":\n\t\t\tif (columnDefault.expression === \"autoincrement()\") return void 0;\n\t\t\treturn new FunctionColumnDefault(columnDefault.expression);\n\t\tdefault: {\n\t\t\tconst exhaustive = columnDefault;\n\t\t\treturn assertNever(exhaustive, `sqliteDefaultToDdlColumnDefault: unhandled kind \"${blindCast(exhaustive).kind}\"`);\n\t\t}\n\t}\n}\n/**\n* True when the column is rendered inline as `INTEGER PRIMARY KEY\n* AUTOINCREMENT` — the sole member of the table's primary key with an\n* `autoincrement()` default. Node-based sibling of the retired\n* `isInlineAutoincrementPrimaryKey` (which read the raw `StorageTable`);\n* reads the table/column nodes instead.\n*/\nfunction isInlineAutoincrementPrimaryKeyNode(table, column) {\n\tif (table.primaryKey?.columns.length !== 1) return false;\n\tif (table.primaryKey.columns[0] !== column.name) return false;\n\treturn column.resolvedDefault?.kind === \"function\" && column.resolvedDefault.expression === \"autoincrement()\";\n}\n/**\n* Builds the flat `SqliteColumnSpec` `AddColumnCall` / `RecreateTableCall`\n* need, resolved from the column node's codec identity — the same builders\n* the pre-`plan(start, end)` op-path called, so the output is\n* byte-identical.\n*/\nfunction columnSpecFromNode(column, inline) {\n\tconst like = columnLike(column);\n\tconst typeSql = buildColumnTypeSql(like, {});\n\tconst defaultSql = buildColumnDefaultSql(like.default);\n\treturn {\n\t\tname: column.name,\n\t\ttypeSql,\n\t\tdefaultSql,\n\t\tnullable: column.nullable,\n\t\t...inline ? { inlineAutoincrementPrimaryKey: true } : {}\n\t};\n}\n/**\n* Builds the `DdlColumn` the `CreateTableCall` path needs, resolved from the\n* column node's codec identity.\n*/\nfunction ddlColumnFromNode(column, inline) {\n\tconst like = columnLike(column);\n\tconst typeSql = buildColumnTypeSql(like, {});\n\tif (inline) return new DdlColumn({\n\t\tname: column.name,\n\t\ttype: `${typeSql} PRIMARY KEY AUTOINCREMENT`\n\t});\n\tconst colDefault = sqliteDefaultToDdlColumnDefault(like.default);\n\treturn new DdlColumn({\n\t\tname: column.name,\n\t\ttype: typeSql,\n\t\t...!column.nullable ? { notNull: true } : {},\n\t\t...colDefault !== void 0 ? { default: colDefault } : {},\n\t\t...column.codecRef !== void 0 ? { codecRef: column.codecRef } : {}\n\t});\n}\n/**\n* Builds the table-level constraints (PK / unique / FK) for a `CreateTable`\n* path from the table node — the node-sourced sibling of the retired\n* contract-based `tableToDdlParts`'s constraint half.\n*/\nfunction tableConstraintsFromNode(table, hasInlinePk) {\n\tconst constraints = [];\n\tif (table.primaryKey && !hasInlinePk) constraints.push(new PrimaryKeyConstraint({ columns: table.primaryKey.columns }));\n\tfor (const u of table.uniques) constraints.push(new UniqueConstraint({\n\t\tcolumns: u.columns,\n\t\t...u.name !== void 0 ? { name: u.name } : {}\n\t}));\n\tfor (const fk of table.foreignKeys) constraints.push(new ForeignKeyConstraint({\n\t\tcolumns: fk.columns,\n\t\trefTable: fk.referencedTable,\n\t\trefColumns: fk.referencedColumns,\n\t\t...fk.name !== void 0 ? { name: fk.name } : {},\n\t\t...fk.onDelete !== void 0 ? { onDelete: fk.onDelete } : {},\n\t\t...fk.onUpdate !== void 0 ? { onUpdate: fk.onUpdate } : {}\n\t}));\n\treturn constraints;\n}\n//#endregion\n//#region src/core/migrations/planner-strategies.ts\n/**\n* Classifies a node issue into the operation class a recreate absorbing it\n* would need, or `null` when the strategy doesn't handle this node/reason at\n* all (table/column not-found-or-not-expected, and index issues — those are\n* standalone ops, never folded into a recreate).\n*\n* Column drift is a single `not-equal` issue now (type AND nullability\n* compared together by `SqlColumnIR.isEqualTo`), so this reads both fields\n* off the node pair directly rather than trusting a separate issue kind per\n* attribute: a type change is always destructive; a pure nullability change\n* is destructive when tightening (NOT NULL required) and widening when\n* relaxing.\n*/\nfunction classifyNodeIssue(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return null;\n\tswitch (blindCast(node).nodeKind) {\n\t\tcase RelationalSchemaNodeKind.column: {\n\t\t\tif (issueOutcome(issue) !== \"not-equal\") return null;\n\t\t\tconst expected = blindCast(issue.expected);\n\t\t\tif (columnTypeChanged(expected, blindCast(issue.actual))) return \"destructive\";\n\t\t\treturn expected.nullable ? \"widening\" : \"destructive\";\n\t\t}\n\t\tcase RelationalSchemaNodeKind.columnDefault: return issueOutcome(issue) === \"not-expected\" ? \"destructive\" : \"widening\";\n\t\tcase RelationalSchemaNodeKind.primaryKey:\n\t\tcase RelationalSchemaNodeKind.foreignKey:\n\t\tcase RelationalSchemaNodeKind.unique: return \"destructive\";\n\t\tdefault: return null;\n\t}\n}\n/**\n* Groups recreate-eligible issues by table, decides per-table operation class\n* (destructive wins over widening), and emits one `RecreateTableCall` per\n* table. Returns unchanged-or-smaller issue list — issues the strategy\n* consumed are removed so `mapNodeIssueToCall` doesn't double-handle them.\n*\n* The full desired/live table shapes come from `ctx.expected`/`ctx.actual`\n* directly (keyed by table name — SQLite is a flat, single-namespace target)\n* rather than from any individual issue, since a single drifted attribute's\n* issue only carries that attribute's own node, never the whole table.\n*/\nconst recreateTableStrategy = (issues, ctx) => {\n\tconst byTable = /* @__PURE__ */ new Map();\n\tconst consumed = /* @__PURE__ */ new Set();\n\tfor (const issue of issues) {\n\t\tconst cls = classifyNodeIssue(issue);\n\t\tif (!cls) continue;\n\t\tconst tableName = issue.path[1];\n\t\tif (tableName === void 0) continue;\n\t\tconst entry = byTable.get(tableName);\n\t\tif (entry) {\n\t\t\tentry.issues.push(issue);\n\t\t\tif (cls === \"destructive\") entry.hasDestructive = true;\n\t\t} else byTable.set(tableName, {\n\t\t\tissues: [issue],\n\t\t\thasDestructive: cls === \"destructive\"\n\t\t});\n\t\tconsumed.add(issue);\n\t}\n\tif (byTable.size === 0) return { kind: \"no_match\" };\n\tconst calls = [];\n\tfor (const [tableName, entry] of byTable) {\n\t\tconst expectedTable = ctx.expected.tables[tableName];\n\t\tconst actualTable = ctx.actual.tables[tableName];\n\t\tif (!expectedTable || !actualTable) continue;\n\t\tconst operationClass = entry.hasDestructive ? \"destructive\" : \"widening\";\n\t\tconst tableSpec = tableSpecFromNode(expectedTable);\n\t\tconst indexes = expectedTable.indexes.map((idx) => ({\n\t\t\tname: idx.name,\n\t\t\tcolumns: idx.columns ?? []\n\t\t}));\n\t\tcalls.push(new RecreateTableCall({\n\t\t\ttableName,\n\t\t\tcontractTable: tableSpec,\n\t\t\tschemaColumnNames: Object.keys(actualTable.columns),\n\t\t\tindexes,\n\t\t\tsummary: buildRecreateSummary(tableName, entry.issues),\n\t\t\tpostchecks: buildRecreatePostchecks(tableName, entry.issues, tableSpec),\n\t\t\toperationClass\n\t\t}));\n\t}\n\treturn {\n\t\tkind: \"match\",\n\t\tissues: issues.filter((i) => !consumed.has(i)),\n\t\tcalls,\n\t\trecipe: true\n\t};\n};\n/**\n* When the policy allows `'data'` and the expected tree tightens one or more\n* columns from nullable to NOT NULL, emit a `DataTransformCall` stub per\n* tightened column. The user fills the backfill `UPDATE` in the rendered\n* `migration.ts` before the subsequent `RecreateTableCall` copies data into\n* the tightened schema (whose `INSERT INTO temp SELECT … FROM old` would\n* otherwise fail at runtime if any `NULL`s remain).\n*\n* Does NOT consume the tightening issue — `recreateTableStrategy` still\n* needs it to produce the actual recreate that enforces the NOT NULL at\n* the schema level. The backfill op and the recreate op end up in the\n* recipe slot in strategy order (backfill first, recreate second), which\n* matches the required execution order.\n*\n* Mirrors Postgres's `nullableTighteningCallStrategy` / `'data'`-class\n* gating. When `'data'` is not in the policy (the default `db update` /\n* `db init` path), the strategy short-circuits and the recreate alone\n* runs with its current destructive-class gating — preserving today's\n* behavior where a tightening blows up at runtime if NULLs are present.\n*/\nconst nullabilityTighteningBackfillStrategy = (issues, ctx) => {\n\tif (!ctx.policy.allowedOperationClasses.includes(\"data\")) return { kind: \"no_match\" };\n\tconst calls = [];\n\tfor (const issue of issues) {\n\t\tif (issueOutcome(issue) !== \"not-equal\" || issue.expected === void 0 || issue.actual === void 0) continue;\n\t\tif (blindCast(issue.expected).nodeKind !== RelationalSchemaNodeKind.column) continue;\n\t\tconst expectedColumn = blindCast(issue.expected);\n\t\tconst actualColumn = blindCast(issue.actual);\n\t\tif (expectedColumn.nullable === actualColumn.nullable) continue;\n\t\tif (expectedColumn.nullable) continue;\n\t\tconst tableName = issue.path[1];\n\t\tif (tableName === void 0) continue;\n\t\tcalls.push(new DataTransformCall(`data_migration.backfill-${tableName}-${expectedColumn.name}`, `Backfill NULLs in \"${tableName}\".\"${expectedColumn.name}\" before NOT NULL tightening`, tableName, expectedColumn.name));\n\t}\n\tif (calls.length === 0) return { kind: \"no_match\" };\n\treturn {\n\t\tkind: \"match\",\n\t\tissues,\n\t\tcalls,\n\t\trecipe: true\n\t};\n};\nconst sqlitePlannerStrategies = [nullabilityTighteningBackfillStrategy, recreateTableStrategy];\n//#endregion\n//#region src/core/migrations/issue-planner.ts\n/**\n* The generic differ is total: a missing/extra table (or column) emits an\n* issue for itself AND for every node in its subtree (columns, defaults,\n* constraints, indexes). `CreateTableCall`/`DropTableCall` and\n* `AddColumnCall`/`DropColumnCall` already account for the whole subtree\n* (reading it directly off the table/column node), so the nested issues are\n* redundant — coalescing them is \"the planner's responsibility\" the differ's\n* own contract assigns (`schema-diff.ts`). Drops any issue whose path is a\n* strict descendant of a `not-found`/`not-expected` issue's path.\n*/\nfunction coalesceSubtreeIssues(issues) {\n\tconst collapsingPaths = issues.filter((issue) => issueOutcome(issue) === \"not-found\" || issueOutcome(issue) === \"not-expected\").map((issue) => issue.path);\n\tif (collapsingPaths.length === 0) return issues;\n\treturn issues.filter((issue) => !collapsingPaths.some((ancestor) => isStrictDescendantPath(issue.path, ancestor)));\n}\nfunction isStrictDescendantPath(path, ancestor) {\n\tif (path.length <= ancestor.length) return false;\n\tfor (let i = 0; i < ancestor.length; i += 1) if (path[i] !== ancestor[i]) return false;\n\treturn true;\n}\nfunction issueNode(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\treturn blindCast(node);\n}\n/** Whether the expected/actual native type (resolved, or raw+many fallback) differs — mirrors `SqlColumnIR.isEqualTo`'s type comparison. */\nfunction columnTypeChanged(expected, actual) {\n\tif (expected.resolvedNativeType !== void 0 && actual.resolvedNativeType !== void 0) return expected.resolvedNativeType !== actual.resolvedNativeType;\n\treturn expected.nativeType !== actual.nativeType || Boolean(expected.many) !== Boolean(actual.many);\n}\n/**\n* Builds the flat `SqliteTableSpec` `RecreateTableCall` needs from the\n* expected table node — the node-sourced equivalent of the retired\n* `toTableSpec` (which read a raw contract `StorageTable`). Every column's\n* spec is resolved from its `codecRef` via `columnSpecFromNode`.\n*/\nfunction tableSpecFromNode(table) {\n\tconst columns = Object.values(table.columns).map((c) => columnSpecFromNode(c, isInlineAutoincrementPrimaryKeyNode(table, c)));\n\tconst uniques = table.uniques.map((u) => ({\n\t\tcolumns: u.columns,\n\t\t...u.name !== void 0 ? { name: u.name } : {}\n\t}));\n\tconst foreignKeys = table.foreignKeys.map((fk) => ({\n\t\tcolumns: fk.columns,\n\t\treferences: {\n\t\t\ttable: fk.referencedTable,\n\t\t\tcolumns: fk.referencedColumns\n\t\t},\n\t\t...fk.name !== void 0 ? { name: fk.name } : {},\n\t\t...fk.onDelete !== void 0 ? { onDelete: fk.onDelete } : {},\n\t\t...fk.onUpdate !== void 0 ? { onUpdate: fk.onUpdate } : {}\n\t}));\n\treturn {\n\t\tcolumns,\n\t\t...table.primaryKey ? { primaryKey: { columns: table.primaryKey.columns } } : {},\n\t\tuniques,\n\t\tforeignKeys\n\t};\n}\nfunction issueConflict(kind, summary, location) {\n\treturn {\n\t\tkind,\n\t\tsummary,\n\t\twhy: \"Use `migration new` to author a custom migration for this change.\",\n\t\t...location ? { location } : {}\n\t};\n}\nfunction issueLocation(tableName, columnName) {\n\treturn columnName !== void 0 ? {\n\t\tentityKind: \"table\",\n\t\tentityName: tableName,\n\t\tcolumn: columnName\n\t} : {\n\t\tentityKind: \"table\",\n\t\tentityName: tableName\n\t};\n}\n/**\n* Conflict kind for a node kind that `recreateTableStrategy` absorbs for\n* every reachable production issue. Reaching `mapNodeIssueToCall` for one of\n* these means the recreate strategy didn't run — mirrors the legacy\n* `conflictKindForIssue` per-kind categorization.\n*/\nfunction absorbedConflictKind(nodeKind) {\n\tswitch (nodeKind) {\n\t\tcase RelationalSchemaNodeKind.primaryKey:\n\t\tcase RelationalSchemaNodeKind.unique: return \"indexIncompatible\";\n\t\tcase RelationalSchemaNodeKind.foreignKey: return \"foreignKeyConflict\";\n\t\tdefault: return \"missingButNonAdditive\";\n\t}\n}\n/**\n* Builds the `CreateTableCall` + per-index `CreateIndexCall`s for a\n* newly-expected table. Reads only the table node's own children — indexes\n* (declared + FK-backing, deduped) are already merged and ordered at\n* derivation (`contractToSchemaIR`'s `convertTable`).\n*/\nfunction buildCreateTableCalls(table) {\n\tconst columns = Object.values(table.columns).map((c) => ddlColumnFromNode(c, isInlineAutoincrementPrimaryKeyNode(table, c)));\n\tconst constraints = tableConstraintsFromNode(table, Object.values(table.columns).some((c) => isInlineAutoincrementPrimaryKeyNode(table, c)));\n\tconst calls = [new CreateTableCall(table.name, columns, constraints.length > 0 ? constraints : void 0)];\n\tfor (const index of table.indexes) {\n\t\tconst indexName = index.name;\n\t\tcalls.push(new CreateIndexCall(table.name, indexName, index.columns ?? []));\n\t}\n\treturn calls;\n}\nfunction mapTableIssue(issue) {\n\tif (issueOutcome(issue) === \"not-found\") return ok(buildCreateTableCalls(blindCast(issue.expected)));\n\tif (issueOutcome(issue) === \"not-expected\") {\n\t\tconst table = blindCast(issue.actual);\n\t\tif (CONTROL_TABLE_NAMES.has(table.name)) return ok([]);\n\t\treturn ok([new DropTableCall(table.name)]);\n\t}\n\treturn notOk(issueConflict(\"unsupportedOperation\", `Unexpected table drift: ${issue.path.join(\"/\")}`));\n}\nfunction mapColumnIssue(issue, ctx) {\n\tconst tableName = issue.path[1];\n\tif (tableName === void 0) return notOk(issueConflict(\"unsupportedOperation\", `Column issue has no table in its path: ${issue.path.join(\"/\")}`));\n\tif (issueOutcome(issue) === \"not-found\") {\n\t\tconst column = blindCast(issue.expected);\n\t\tconst table = ctx.expected.tables[tableName];\n\t\treturn ok([new AddColumnCall(tableName, columnSpecFromNode(column, table !== void 0 && isInlineAutoincrementPrimaryKeyNode(table, column)))]);\n\t}\n\tif (issueOutcome(issue) === \"not-expected\") return ok([new DropColumnCall(tableName, blindCast(issue.actual).name)]);\n\tconst expected = blindCast(issue.expected);\n\treturn notOk(issueConflict(columnTypeChanged(expected, blindCast(issue.actual)) ? \"typeMismatch\" : \"nullabilityConflict\", issue.path.join(\"/\"), issueLocation(tableName, expected.name)));\n}\nfunction mapIndexIssue(issue) {\n\tconst tableName = issue.path[1];\n\tif (tableName === void 0) return notOk(issueConflict(\"unsupportedOperation\", `Index issue has no table in its path: ${issue.path.join(\"/\")}`));\n\tif (issueOutcome(issue) === \"not-found\") {\n\t\tconst index = blindCast(issue.expected);\n\t\tconst indexName = index.name;\n\t\treturn ok([new CreateIndexCall(tableName, indexName, index.columns ?? [])]);\n\t}\n\tif (issueOutcome(issue) === \"not-expected\") {\n\t\tconst indexName = blindCast(issue.actual).name;\n\t\treturn ok([new DropIndexCall(tableName, indexName)]);\n\t}\n\treturn notOk(issueConflict(\"indexIncompatible\", issue.path.join(\"/\"), issueLocation(tableName)));\n}\nfunction mapNodeIssueToCall(issue, ctx) {\n\tconst node = issueNode(issue);\n\tif (node === void 0) return notOk(issueConflict(\"unsupportedOperation\", `Issue carries neither an expected nor an actual node: ${issue.path.join(\"/\")}`));\n\tswitch (node.nodeKind) {\n\t\tcase RelationalSchemaNodeKind.table: return mapTableIssue(issue);\n\t\tcase RelationalSchemaNodeKind.column: return mapColumnIssue(issue, ctx);\n\t\tcase RelationalSchemaNodeKind.index: return mapIndexIssue(issue);\n\t\tcase RelationalSchemaNodeKind.columnDefault:\n\t\tcase RelationalSchemaNodeKind.primaryKey:\n\t\tcase RelationalSchemaNodeKind.foreignKey:\n\t\tcase RelationalSchemaNodeKind.unique: return notOk(issueConflict(absorbedConflictKind(node.nodeKind), issue.path.join(\"/\")));\n\t\tcase RelationalSchemaNodeKind.check: return notOk(issueConflict(\"unsupportedOperation\", `SQLite does not support CHECK constraint DDL: ${issue.path.join(\"/\")}`));\n\t\tdefault: return notOk(issueConflict(\"unsupportedOperation\", `Unhandled node kind: ${node.nodeKind}`));\n\t}\n}\nfunction classifyCall(call) {\n\tswitch (call.factoryName) {\n\t\tcase \"createTable\": return \"create-table\";\n\t\tcase \"addColumn\": return \"add-column\";\n\t\tcase \"createIndex\": return \"create-index\";\n\t\tcase \"dropColumn\": return \"drop-column\";\n\t\tcase \"dropIndex\": return \"drop-index\";\n\t\tcase \"dropTable\": return \"drop-table\";\n\t\tcase \"recreateTable\": return null;\n\t\tdefault: return null;\n\t}\n}\nconst DEFAULT_POLICY = { allowedOperationClasses: [\n\t\"additive\",\n\t\"widening\",\n\t\"destructive\",\n\t\"data\"\n] };\nfunction planIssues(options) {\n\tconst policyProvided = options.policy !== void 0;\n\tconst policy = options.policy ?? DEFAULT_POLICY;\n\tconst frameworkComponents = options.frameworkComponents ?? [];\n\tconst context = {\n\t\texpected: options.expected ?? emptySchemaIR(),\n\t\tactual: options.actual ?? emptySchemaIR(),\n\t\tpolicy,\n\t\tframeworkComponents\n\t};\n\tconst strategies = options.strategies ?? sqlitePlannerStrategies;\n\tlet remaining = options.issues;\n\tconst recipeCalls = [];\n\tconst bucketableCalls = [];\n\tfor (const strategy of strategies) {\n\t\tconst result = strategy(remaining, context);\n\t\tif (result.kind === \"match\") {\n\t\t\tremaining = result.issues;\n\t\t\tif (result.recipe) recipeCalls.push(...result.calls);\n\t\t\telse bucketableCalls.push(...result.calls);\n\t\t}\n\t}\n\tconst sorted = orderIssuesByDependencies(remaining);\n\tconst defaultCalls = [];\n\tconst conflicts = [];\n\tfor (const issue of sorted) {\n\t\tconst result = mapNodeIssueToCall(issue, context);\n\t\tif (result.ok) defaultCalls.push(...result.value);\n\t\telse conflicts.push(result.failure);\n\t}\n\tconst allowed = policy.allowedOperationClasses;\n\tlet gatedRecipe = recipeCalls;\n\tlet gatedBucketable = bucketableCalls;\n\tlet gatedDefault = defaultCalls;\n\tif (policyProvided) {\n\t\tconst sink = (acc) => (call) => {\n\t\t\tif (allowed.includes(call.operationClass)) {\n\t\t\t\tacc.push(call);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconflicts.push(conflictForDisallowedCall(call, allowed));\n\t\t};\n\t\tconst gatedRecipeBucket = [];\n\t\tconst gatedBucketableBucket = [];\n\t\tconst gatedDefaultBucket = [];\n\t\trecipeCalls.forEach(sink(gatedRecipeBucket));\n\t\tbucketableCalls.forEach(sink(gatedBucketableBucket));\n\t\tdefaultCalls.forEach(sink(gatedDefaultBucket));\n\t\tgatedRecipe = gatedRecipeBucket;\n\t\tgatedBucketable = gatedBucketableBucket;\n\t\tgatedDefault = gatedDefaultBucket;\n\t}\n\tif (conflicts.length > 0) return notOk(conflicts);\n\tconst combined = [...gatedDefault, ...gatedBucketable];\n\tconst byCategory = (cat) => combined.filter((c) => classifyCall(c) === cat);\n\treturn ok({ calls: [\n\t\t...byCategory(\"create-table\"),\n\t\t...byCategory(\"add-column\"),\n\t\t...byCategory(\"create-index\"),\n\t\t...gatedRecipe,\n\t\t...byCategory(\"drop-column\"),\n\t\t...byCategory(\"drop-index\"),\n\t\t...byCategory(\"drop-table\")\n\t] });\n}\nfunction emptySchemaIR() {\n\treturn new SqlSchemaIR({ tables: {} });\n}\nfunction conflictForDisallowedCall(call, allowed) {\n\tconst summary = `Operation \"${call.label}\" requires class \"${call.operationClass}\", but policy allows only: ${allowed.join(\", \")}`;\n\tconst location = locationForCall(call);\n\treturn {\n\t\tkind: conflictKindForCall(call),\n\t\tsummary,\n\t\twhy: \"Use `migration new` to author a custom migration for this change.\",\n\t\t...location ? { location } : {}\n\t};\n}\nfunction conflictKindForCall(call) {\n\tswitch (call.factoryName) {\n\t\tcase \"createIndex\":\n\t\tcase \"dropIndex\": return \"indexIncompatible\";\n\t\tdefault: return \"missingButNonAdditive\";\n\t}\n}\nfunction locationForCall(call) {\n\tconst location = {};\n\tif (\"tableName\" in call) {\n\t\tlocation.entityKind = \"table\";\n\t\tlocation.entityName = call.tableName;\n\t}\n\tif (\"columnName\" in call) location.column = call.columnName;\n\tif (\"indexName\" in call) location.index = call.indexName;\n\treturn Object.keys(location).length > 0 ? location : void 0;\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 { expected, actual, issues } = this.collectSchemaIssues(options);\n\t\tconst codecHooks = extractCodecControlHooks(options.frameworkComponents);\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\tstrategies: sqlitePlannerStrategies\n\t\t});\n\t\tif (!result.ok) return plannerFailure(result.failure);\n\t\tconst fieldEventOps = planFieldEventOperations({\n\t\t\tpriorContract: options.fromContract,\n\t\t\tnewContract: options.contract,\n\t\t\tcodecHooks\n\t\t});\n\t\tconst calls = [...result.value.calls, ...fieldEventOps];\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.fromContract?.storage.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};\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) {\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: options.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//#endregion\nexport { verifySqliteDatabaseSchema as a, sqliteContractToSchema as i, createSqliteMigrationPlanner as n, diffSqliteSchema as r, SqliteMigrationPlanner as t };\n\n//# sourceMappingURL=planner-DiGcIjl1.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,SAAS,oBAAoB,KAAK,SAAS;CAC1C,IAAI,IAAI,SAAS,YAAY;EAC5B,IAAI,IAAI,eAAe,SAAS,OAAO;EACvC,OAAO,IAAI;CACZ;CACA,OAAO,qBAAqB,IAAI,KAAK;AACtC;;;;;;;;;;AAUA,SAAS,uBAAuB,UAAU,QAAQ;CACjD,OAAO,mBAAmB,UAAU;EACnC,qBAAqB;EACrB,eAAe;EACf,GAAG,UAAU,oBAAoB,QAAQ,gBAAgB;CAC1D,CAAC;AACF;;;;;;AAMA,SAAS,2BAA2B,OAAO;CAC1C,OAAO,sBAAsB;EAC5B,UAAU,MAAM;EAChB,QAAQ,MAAM;EACd,QAAQ,MAAM;EACd,qBAAqB,MAAM;EAC3B,YAAY;EACZ,eAAe;CAChB,CAAC;AACF;;;;;;;;;AASA,SAAS,qBAAqB,OAAO,UAAU;CAC9C,MAAM,YAAY,MAAM,KAAK;CAC7B,IAAI,cAAc,KAAK,GAAG,OAAO,KAAK;CACtC,KAAK,MAAM,eAAe,OAAO,KAAK,SAAS,QAAQ,UAAU,GAAG;EACnE,MAAM,QAAQ,SAAS,SAAS,SAAS;GACxC;GACA,YAAY;GACZ,YAAY;EACb,CAAC;EACD,IAAI,UA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rF,OAAO;GACN;GACA;GACA,QAAQ,SAAS,QAAQ,MAAM,QAAQ,UAAU,aAAa,KAAK,MAAM,cAAc;EACxF;CACD;AACD;;;;;;;;;;;;;;;;;;;;;;;;;;;AA2BA,SAAS,oBAAoB,QAAQ,WAAW;CAC/C,IAAI,cAAc,KAAK,GAAG,OAAO;CACjC,OAAO,OAAO,QAAQ,UAAU;EAC/B,IAAI,aAAa,KAAK,MAAM,gBAAgB,OAAO;EACnD,MAAM,OAAO,UAAU,KAAK;EAC5B,IAAI,SAAS,KAAK,KAAK,KAAK,aAAa,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"}
1
+ {"version":3,"file":"planner-DiGcIjl1-oFtDTY7-.mjs","names":["#lowerer"],"sources":["../../../../3-targets/3-targets/sqlite/dist/planner-DiGcIjl1.mjs"],"sourcesContent":["import { a as DropColumnCall, d as buildRecreateSummary, h as renderDefaultLiteral, i as DataTransformCall, l as RecreateTableCall, m as buildColumnTypeSql, n as CreateIndexCall, o as DropIndexCall, p as buildColumnDefaultSql, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as buildRecreatePostchecks } from \"./op-factory-call-C_or6163.mjs\";\nimport { t as CONTROL_TABLE_NAMES } from \"./control-tables-D_o8dKRB.mjs\";\nimport { t as TypeScriptRenderableSqliteMigration } from \"./planner-produced-sqlite-migration-C8nxPT0P.mjs\";\nimport { DdlColumn, ForeignKeyConstraint, FunctionColumnDefault, LiteralColumnDefault, PrimaryKeyConstraint, UniqueConstraint } from \"@internal/sql-relational-core/ast\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { RelationalSchemaNodeKind, SqlSchemaIR, relationalNodeGranularity } from \"@internal/sql-schema-ir/types\";\nimport { UNBOUND_NAMESPACE_ID, entityAt } from \"@internal/framework-components/ir\";\nimport { buildNativeTypeExpander, contractToSchemaIR, extractCodecControlHooks, planFieldEventOperations, plannerFailure } from \"@internal/family-sql/control\";\nimport { verifySqlSchemaByDiff } from \"@internal/family-sql/diff\";\nimport { diffSchemas, issueOutcome, orderIssuesByDependencies } from \"@internal/framework-components/control\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { InternalError, assertNever } from \"@internal/utils/internal-error\";\n//#region src/core/migrations/diff-database-schema.ts\n/** Renders a column default for the SQLite dialect. */\nfunction sqliteRenderDefault(def, _column) {\n\tif (def.kind === \"function\") {\n\t\tif (def.expression === \"now()\") return \"datetime('now')\";\n\t\treturn def.expression;\n\t}\n\treturn renderDefaultLiteral(def.value);\n}\n/**\n* The SQLite expected-side projection: contract → flat relational schema IR.\n*\n* `extras` thread the plan-time derivation input: the native-type expander,\n* so the expected side carries resolved native types (like the verify\n* side). Every expected column also carries its `codecRef` unconditionally\n* (Decision 5) — the planner's op-builders resolve DDL rendering from it at\n* plan time, so no separate render stamper is threaded here.\n*/\nfunction sqliteContractToSchema(contract, extras) {\n\treturn contractToSchemaIR(contract, {\n\t\tannotationNamespace: \"sqlite\",\n\t\trenderDefault: sqliteRenderDefault,\n\t\t...ifDefined(\"expandNativeType\", extras?.expandNativeType)\n\t});\n}\n/**\n* The SQLite schema verify: the full-tree node-diff verdict wrapped in the\n* issue-based result envelope. Used by the runner's post-apply check; the\n* family `verifySchema` runs the same composition via the descriptor hook.\n*/\nfunction verifySqliteDatabaseSchema(input) {\n\treturn verifySqlSchemaByDiff({\n\t\tcontract: input.contract,\n\t\tschema: input.actualSchema,\n\t\tstrict: input.strict,\n\t\tframeworkComponents: input.frameworkComponents,\n\t\tdiffSchema: diffSqliteSchema,\n\t\tgranularityOf: relationalNodeGranularity\n\t});\n}\n/**\n* Resolves a verdict-diff issue's subject table's declared control policy\n* directly from the contract. SQLite's expected tree is flat, so the issue\n* path carries no namespace segment — `path[1]` is the table name (`path[0]`\n* is the tree root's own id); every contract namespace is searched for that\n* table name (table names are globally unique in the flat tree — duplicates\n* across namespaces are rejected earlier, at `contractToSchemaIR`).\n*/\nfunction resolveControlPolicy(issue, contract) {\n\tconst tableName = issue.path[1];\n\tif (tableName === void 0) return void 0;\n\tfor (const namespaceId of Object.keys(contract.storage.namespaces)) {\n\t\tconst table = entityAt(contract.storage, {\n\t\t\tnamespaceId,\n\t\t\tentityKind: \"table\",\n\t\t\tentityName: tableName\n\t\t});\n\t\tif (table !== void 0) return table.control;\n\t}\n}\n/**\n* The SQLite full-tree node diff for the family verify verdict: derive the\n* expected flat tree with resolved leaf values (expander threaded so\n* parameterized types compare expanded; FK nodes born with the flat empty\n* `resolvedReferencedNamespace`), and run the generic differ over the trees\n* as derived. Flat targets need no ownership scoping. The codec `verifyType`\n* hooks run once per contract namespace with tables, each against the sole\n* flat actual root — exactly the legacy per-namespace pairing.\n*/\nfunction diffSqliteSchema(input) {\n\tconst expandNativeType = buildNativeTypeExpander(input.frameworkComponents);\n\tconst expected = sqliteContractToSchema(input.contract, { ...ifDefined(\"expandNativeType\", expandNativeType) });\n\tconst actual = input.schema instanceof SqlSchemaIR ? input.schema : blindCast(input.schema);\n\treturn {\n\t\tissues: diffSchemas(expected, actual),\n\t\tresolveControlPolicy: (issue) => resolveControlPolicy(issue, input.contract),\n\t\tnamespacePairs: Object.values(input.contract.storage.namespaces).filter((ns) => Object.keys(ns.entries.table ?? {}).length > 0).map(() => ({ actual }))\n\t};\n}\n/**\n* The SQLite planner's diff input: the same tree-building\n* `diffSqliteSchema` uses (expander threaded, FK nodes born flat). One differ\n* drives both verify and plan over the trees as derived; this is the plan-side\n* derivation — column DDL resolves from each expected column's `codecRef` at\n* plan time (`column-ddl-rendering.ts`), so no separate render stamping happens here.\n*/\nfunction buildSqlitePlanDiff(input) {\n\tconst expandNativeType = buildNativeTypeExpander(input.frameworkComponents);\n\tconst expected = sqliteContractToSchema(input.contract, { ...ifDefined(\"expandNativeType\", expandNativeType) });\n\tconst actual = new SqlSchemaIR(withRecordKeyNames(input.actualSchema));\n\treturn {\n\t\texpected,\n\t\tactual,\n\t\tissues: diffSchemas(expected, actual)\n\t};\n}\n/**\n* Every schema-tree builder in this codebase derives a table's / column's\n* `name` from the record key it's stored under (`contractToSchemaIR`,\n* the SQLite introspection adapter) rather than trusting a redundant\n* embedded field — the record key IS the identity. Mirrors that discipline\n* for the actual/live tree before construction, so `SqlTableIR.id` /\n* `SqlColumnIR.id` (both derived from `.name`) are always correct without\n* requiring every caller to duplicate the key onto the value. A no-op for a\n* tree that already carries matching names (the real introspection adapter\n* always does).\n*/\nfunction withRecordKeyNames(actualSchema) {\n\tconst raw = blindCast(actualSchema);\n\tconst tables = {};\n\tfor (const [tableName, table] of Object.entries(raw.tables ?? {})) {\n\t\tconst rawTable = blindCast(table);\n\t\tconst columns = {};\n\t\tfor (const [columnName, column] of Object.entries(blindCast(table).columns ?? {})) columns[columnName] = {\n\t\t\t...blindCast(column),\n\t\t\tname: columnName\n\t\t};\n\t\ttables[tableName] = {\n\t\t\t...rawTable,\n\t\t\tname: tableName,\n\t\t\tcolumns,\n\t\t\tforeignKeys: rawTable.foreignKeys ?? [],\n\t\t\tuniques: rawTable.uniques ?? [],\n\t\t\tindexes: rawTable.indexes ?? []\n\t\t};\n\t}\n\treturn { tables };\n}\n//#endregion\n//#region src/core/migrations/column-ddl-rendering.ts\n/**\n* Reconstructs the `StorageColumn`-shaped fields `buildColumnTypeSql` /\n* `buildColumnDefaultSql` expect, from a column node's own stamped codec\n* identity (`codecRef` / `codecBaseNativeType`, Decision 5) — never the\n* contract. SQLite's type renderer only uppercases the resolved base type\n* (no parameterized expansion, no named-type quoting), so `typeRef` is\n* deliberately left unset here: setting it would send `buildColumnTypeSql`\n* back through a live `storageTypes` lookup the node's fields have already\n* resolved past, which throws for an unrecognized reference (unlike\n* Postgres's lenient fallback).\n*/\nfunction columnLike(column) {\n\tif (column.codecRef === void 0 || column.codecBaseNativeType === void 0) throw new InternalError(`columnLike: expected column \"${column.name}\" carries no codec identity — the expected tree must be derived via contractToSchemaIR for planning`);\n\treturn {\n\t\tnativeType: column.codecBaseNativeType,\n\t\tcodecId: column.codecRef.codecId,\n\t\tnullable: column.nullable,\n\t\t...(column.many ?? column.codecRef.many) !== void 0 ? { many: column.many ?? column.codecRef.many } : {},\n\t\t...column.codecRef.typeParams !== void 0 ? { typeParams: blindCast(column.codecRef.typeParams) } : {},\n\t\t...column.resolvedDefault !== void 0 ? { default: column.resolvedDefault } : {}\n\t};\n}\nfunction sqliteDefaultToDdlColumnDefault(columnDefault) {\n\tif (!columnDefault) return void 0;\n\tswitch (columnDefault.kind) {\n\t\tcase \"literal\": return new LiteralColumnDefault(columnDefault.value);\n\t\tcase \"function\":\n\t\t\tif (columnDefault.expression === \"autoincrement()\") return void 0;\n\t\t\treturn new FunctionColumnDefault(columnDefault.expression);\n\t\tdefault: {\n\t\t\tconst exhaustive = columnDefault;\n\t\t\treturn assertNever(exhaustive, `sqliteDefaultToDdlColumnDefault: unhandled kind \"${blindCast(exhaustive).kind}\"`);\n\t\t}\n\t}\n}\n/**\n* True when the column is rendered inline as `INTEGER PRIMARY KEY\n* AUTOINCREMENT` — the sole member of the table's primary key with an\n* `autoincrement()` default. Node-based sibling of the retired\n* `isInlineAutoincrementPrimaryKey` (which read the raw `StorageTable`);\n* reads the table/column nodes instead.\n*/\nfunction isInlineAutoincrementPrimaryKeyNode(table, column) {\n\tif (table.primaryKey?.columns.length !== 1) return false;\n\tif (table.primaryKey.columns[0] !== column.name) return false;\n\treturn column.resolvedDefault?.kind === \"function\" && column.resolvedDefault.expression === \"autoincrement()\";\n}\n/**\n* Builds the flat `SqliteColumnSpec` `AddColumnCall` / `RecreateTableCall`\n* need, resolved from the column node's codec identity — the same builders\n* the pre-`plan(start, end)` op-path called, so the output is\n* byte-identical.\n*/\nfunction columnSpecFromNode(column, inline) {\n\tconst like = columnLike(column);\n\tconst typeSql = buildColumnTypeSql(like, {});\n\tconst defaultSql = buildColumnDefaultSql(like.default);\n\treturn {\n\t\tname: column.name,\n\t\ttypeSql,\n\t\tdefaultSql,\n\t\tnullable: column.nullable,\n\t\t...inline ? { inlineAutoincrementPrimaryKey: true } : {}\n\t};\n}\n/**\n* Builds the `DdlColumn` the `CreateTableCall` path needs, resolved from the\n* column node's codec identity.\n*/\nfunction ddlColumnFromNode(column, inline) {\n\tconst like = columnLike(column);\n\tconst typeSql = buildColumnTypeSql(like, {});\n\tif (inline) return new DdlColumn({\n\t\tname: column.name,\n\t\ttype: `${typeSql} PRIMARY KEY AUTOINCREMENT`\n\t});\n\tconst colDefault = sqliteDefaultToDdlColumnDefault(like.default);\n\treturn new DdlColumn({\n\t\tname: column.name,\n\t\ttype: typeSql,\n\t\t...!column.nullable ? { notNull: true } : {},\n\t\t...colDefault !== void 0 ? { default: colDefault } : {},\n\t\t...column.codecRef !== void 0 ? { codecRef: column.codecRef } : {}\n\t});\n}\n/**\n* Builds the table-level constraints (PK / unique / FK) for a `CreateTable`\n* path from the table node — the node-sourced sibling of the retired\n* contract-based `tableToDdlParts`'s constraint half.\n*/\nfunction tableConstraintsFromNode(table, hasInlinePk) {\n\tconst constraints = [];\n\tif (table.primaryKey && !hasInlinePk) constraints.push(new PrimaryKeyConstraint({ columns: table.primaryKey.columns }));\n\tfor (const u of table.uniques) constraints.push(new UniqueConstraint({\n\t\tcolumns: u.columns,\n\t\t...u.name !== void 0 ? { name: u.name } : {}\n\t}));\n\tfor (const fk of table.foreignKeys) constraints.push(new ForeignKeyConstraint({\n\t\tcolumns: fk.columns,\n\t\trefTable: fk.referencedTable,\n\t\trefColumns: fk.referencedColumns,\n\t\t...fk.name !== void 0 ? { name: fk.name } : {},\n\t\t...fk.onDelete !== void 0 ? { onDelete: fk.onDelete } : {},\n\t\t...fk.onUpdate !== void 0 ? { onUpdate: fk.onUpdate } : {}\n\t}));\n\treturn constraints;\n}\n//#endregion\n//#region src/core/migrations/planner-strategies.ts\n/**\n* Classifies a node issue into the operation class a recreate absorbing it\n* would need, or `null` when the strategy doesn't handle this node/reason at\n* all (table/column not-found-or-not-expected, and index issues — those are\n* standalone ops, never folded into a recreate).\n*\n* Column drift is a single `not-equal` issue now (type AND nullability\n* compared together by `SqlColumnIR.isEqualTo`), so this reads both fields\n* off the node pair directly rather than trusting a separate issue kind per\n* attribute: a type change is always destructive; a pure nullability change\n* is destructive when tightening (NOT NULL required) and widening when\n* relaxing.\n*/\nfunction classifyNodeIssue(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return null;\n\tswitch (blindCast(node).nodeKind) {\n\t\tcase RelationalSchemaNodeKind.column: {\n\t\t\tif (issueOutcome(issue) !== \"not-equal\") return null;\n\t\t\tconst expected = blindCast(issue.expected);\n\t\t\tif (columnTypeChanged(expected, blindCast(issue.actual))) return \"destructive\";\n\t\t\treturn expected.nullable ? \"widening\" : \"destructive\";\n\t\t}\n\t\tcase RelationalSchemaNodeKind.columnDefault: return issueOutcome(issue) === \"not-expected\" ? \"destructive\" : \"widening\";\n\t\tcase RelationalSchemaNodeKind.primaryKey:\n\t\tcase RelationalSchemaNodeKind.foreignKey:\n\t\tcase RelationalSchemaNodeKind.unique: return \"destructive\";\n\t\tdefault: return null;\n\t}\n}\n/**\n* Groups recreate-eligible issues by table, decides per-table operation class\n* (destructive wins over widening), and emits one `RecreateTableCall` per\n* table. Returns unchanged-or-smaller issue list — issues the strategy\n* consumed are removed so `mapNodeIssueToCall` doesn't double-handle them.\n*\n* The full desired/live table shapes come from `ctx.expected`/`ctx.actual`\n* directly (keyed by table name — SQLite is a flat, single-namespace target)\n* rather than from any individual issue, since a single drifted attribute's\n* issue only carries that attribute's own node, never the whole table.\n*/\nconst recreateTableStrategy = (issues, ctx) => {\n\tconst byTable = /* @__PURE__ */ new Map();\n\tconst consumed = /* @__PURE__ */ new Set();\n\tfor (const issue of issues) {\n\t\tconst cls = classifyNodeIssue(issue);\n\t\tif (!cls) continue;\n\t\tconst tableName = issue.path[1];\n\t\tif (tableName === void 0) continue;\n\t\tconst entry = byTable.get(tableName);\n\t\tif (entry) {\n\t\t\tentry.issues.push(issue);\n\t\t\tif (cls === \"destructive\") entry.hasDestructive = true;\n\t\t} else byTable.set(tableName, {\n\t\t\tissues: [issue],\n\t\t\thasDestructive: cls === \"destructive\"\n\t\t});\n\t\tconsumed.add(issue);\n\t}\n\tif (byTable.size === 0) return { kind: \"no_match\" };\n\tconst calls = [];\n\tfor (const [tableName, entry] of byTable) {\n\t\tconst expectedTable = ctx.expected.tables[tableName];\n\t\tconst actualTable = ctx.actual.tables[tableName];\n\t\tif (!expectedTable || !actualTable) continue;\n\t\tconst operationClass = entry.hasDestructive ? \"destructive\" : \"widening\";\n\t\tconst tableSpec = tableSpecFromNode(expectedTable);\n\t\tconst indexes = expectedTable.indexes.map((idx) => ({\n\t\t\tname: idx.name,\n\t\t\tcolumns: idx.columns ?? []\n\t\t}));\n\t\tcalls.push(new RecreateTableCall({\n\t\t\ttableName,\n\t\t\tcontractTable: tableSpec,\n\t\t\tschemaColumnNames: Object.keys(actualTable.columns),\n\t\t\tindexes,\n\t\t\tsummary: buildRecreateSummary(tableName, entry.issues),\n\t\t\tpostchecks: buildRecreatePostchecks(tableName, entry.issues, tableSpec),\n\t\t\toperationClass\n\t\t}));\n\t}\n\treturn {\n\t\tkind: \"match\",\n\t\tissues: issues.filter((i) => !consumed.has(i)),\n\t\tcalls,\n\t\trecipe: true\n\t};\n};\n/**\n* When the policy allows `'data'` and the expected tree tightens one or more\n* columns from nullable to NOT NULL, emit a `DataTransformCall` stub per\n* tightened column. The user fills the backfill `UPDATE` in the rendered\n* `migration.ts` before the subsequent `RecreateTableCall` copies data into\n* the tightened schema (whose `INSERT INTO temp SELECT … FROM old` would\n* otherwise fail at runtime if any `NULL`s remain).\n*\n* Does NOT consume the tightening issue — `recreateTableStrategy` still\n* needs it to produce the actual recreate that enforces the NOT NULL at\n* the schema level. The backfill op and the recreate op end up in the\n* recipe slot in strategy order (backfill first, recreate second), which\n* matches the required execution order.\n*\n* Mirrors Postgres's `nullableTighteningCallStrategy` / `'data'`-class\n* gating. When `'data'` is not in the policy (the default `db update` /\n* `db init` path), the strategy short-circuits and the recreate alone\n* runs with its current destructive-class gating — preserving today's\n* behavior where a tightening blows up at runtime if NULLs are present.\n*/\nconst nullabilityTighteningBackfillStrategy = (issues, ctx) => {\n\tif (!ctx.policy.allowedOperationClasses.includes(\"data\")) return { kind: \"no_match\" };\n\tconst calls = [];\n\tfor (const issue of issues) {\n\t\tif (issueOutcome(issue) !== \"not-equal\" || issue.expected === void 0 || issue.actual === void 0) continue;\n\t\tif (blindCast(issue.expected).nodeKind !== RelationalSchemaNodeKind.column) continue;\n\t\tconst expectedColumn = blindCast(issue.expected);\n\t\tconst actualColumn = blindCast(issue.actual);\n\t\tif (expectedColumn.nullable === actualColumn.nullable) continue;\n\t\tif (expectedColumn.nullable) continue;\n\t\tconst tableName = issue.path[1];\n\t\tif (tableName === void 0) continue;\n\t\tcalls.push(new DataTransformCall(`data_migration.backfill-${tableName}-${expectedColumn.name}`, `Backfill NULLs in \"${tableName}\".\"${expectedColumn.name}\" before NOT NULL tightening`, tableName, expectedColumn.name));\n\t}\n\tif (calls.length === 0) return { kind: \"no_match\" };\n\treturn {\n\t\tkind: \"match\",\n\t\tissues,\n\t\tcalls,\n\t\trecipe: true\n\t};\n};\nconst sqlitePlannerStrategies = [nullabilityTighteningBackfillStrategy, recreateTableStrategy];\n//#endregion\n//#region src/core/migrations/issue-planner.ts\n/**\n* The generic differ is total: a missing/extra table (or column) emits an\n* issue for itself AND for every node in its subtree (columns, defaults,\n* constraints, indexes). `CreateTableCall`/`DropTableCall` and\n* `AddColumnCall`/`DropColumnCall` already account for the whole subtree\n* (reading it directly off the table/column node), so the nested issues are\n* redundant — coalescing them is \"the planner's responsibility\" the differ's\n* own contract assigns (`schema-diff.ts`). Drops any issue whose path is a\n* strict descendant of a `not-found`/`not-expected` issue's path.\n*/\nfunction coalesceSubtreeIssues(issues) {\n\tconst collapsingPaths = issues.filter((issue) => issueOutcome(issue) === \"not-found\" || issueOutcome(issue) === \"not-expected\").map((issue) => issue.path);\n\tif (collapsingPaths.length === 0) return issues;\n\treturn issues.filter((issue) => !collapsingPaths.some((ancestor) => isStrictDescendantPath(issue.path, ancestor)));\n}\nfunction isStrictDescendantPath(path, ancestor) {\n\tif (path.length <= ancestor.length) return false;\n\tfor (let i = 0; i < ancestor.length; i += 1) if (path[i] !== ancestor[i]) return false;\n\treturn true;\n}\nfunction issueNode(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\tif (node === void 0) return void 0;\n\treturn blindCast(node);\n}\n/** Whether the expected/actual native type (resolved, or raw+many fallback) differs — mirrors `SqlColumnIR.isEqualTo`'s type comparison. */\nfunction columnTypeChanged(expected, actual) {\n\tif (expected.resolvedNativeType !== void 0 && actual.resolvedNativeType !== void 0) return expected.resolvedNativeType !== actual.resolvedNativeType;\n\treturn expected.nativeType !== actual.nativeType || Boolean(expected.many) !== Boolean(actual.many);\n}\n/**\n* Builds the flat `SqliteTableSpec` `RecreateTableCall` needs from the\n* expected table node — the node-sourced equivalent of the retired\n* `toTableSpec` (which read a raw contract `StorageTable`). Every column's\n* spec is resolved from its `codecRef` via `columnSpecFromNode`.\n*/\nfunction tableSpecFromNode(table) {\n\tconst columns = Object.values(table.columns).map((c) => columnSpecFromNode(c, isInlineAutoincrementPrimaryKeyNode(table, c)));\n\tconst uniques = table.uniques.map((u) => ({\n\t\tcolumns: u.columns,\n\t\t...u.name !== void 0 ? { name: u.name } : {}\n\t}));\n\tconst foreignKeys = table.foreignKeys.map((fk) => ({\n\t\tcolumns: fk.columns,\n\t\treferences: {\n\t\t\ttable: fk.referencedTable,\n\t\t\tcolumns: fk.referencedColumns\n\t\t},\n\t\t...fk.name !== void 0 ? { name: fk.name } : {},\n\t\t...fk.onDelete !== void 0 ? { onDelete: fk.onDelete } : {},\n\t\t...fk.onUpdate !== void 0 ? { onUpdate: fk.onUpdate } : {}\n\t}));\n\treturn {\n\t\tcolumns,\n\t\t...table.primaryKey ? { primaryKey: { columns: table.primaryKey.columns } } : {},\n\t\tuniques,\n\t\tforeignKeys\n\t};\n}\nfunction issueConflict(kind, summary, location) {\n\treturn {\n\t\tkind,\n\t\tsummary,\n\t\twhy: \"Use `migration new` to author a custom migration for this change.\",\n\t\t...location ? { location } : {}\n\t};\n}\nfunction issueLocation(tableName, columnName) {\n\treturn columnName !== void 0 ? {\n\t\tentityKind: \"table\",\n\t\tentityName: tableName,\n\t\tcolumn: columnName\n\t} : {\n\t\tentityKind: \"table\",\n\t\tentityName: tableName\n\t};\n}\n/**\n* Conflict kind for a node kind that `recreateTableStrategy` absorbs for\n* every reachable production issue. Reaching `mapNodeIssueToCall` for one of\n* these means the recreate strategy didn't run — mirrors the legacy\n* `conflictKindForIssue` per-kind categorization.\n*/\nfunction absorbedConflictKind(nodeKind) {\n\tswitch (nodeKind) {\n\t\tcase RelationalSchemaNodeKind.primaryKey:\n\t\tcase RelationalSchemaNodeKind.unique: return \"indexIncompatible\";\n\t\tcase RelationalSchemaNodeKind.foreignKey: return \"foreignKeyConflict\";\n\t\tdefault: return \"missingButNonAdditive\";\n\t}\n}\n/**\n* Builds the `CreateTableCall` + per-index `CreateIndexCall`s for a\n* newly-expected table. Reads only the table node's own children — indexes\n* (declared + FK-backing, deduped) are already merged and ordered at\n* derivation (`contractToSchemaIR`'s `convertTable`).\n*/\nfunction buildCreateTableCalls(table) {\n\tconst columns = Object.values(table.columns).map((c) => ddlColumnFromNode(c, isInlineAutoincrementPrimaryKeyNode(table, c)));\n\tconst constraints = tableConstraintsFromNode(table, Object.values(table.columns).some((c) => isInlineAutoincrementPrimaryKeyNode(table, c)));\n\tconst calls = [new CreateTableCall(table.name, columns, constraints.length > 0 ? constraints : void 0)];\n\tfor (const index of table.indexes) {\n\t\tconst indexName = index.name;\n\t\tcalls.push(new CreateIndexCall(table.name, indexName, index.columns ?? []));\n\t}\n\treturn calls;\n}\nfunction mapTableIssue(issue) {\n\tif (issueOutcome(issue) === \"not-found\") return ok(buildCreateTableCalls(blindCast(issue.expected)));\n\tif (issueOutcome(issue) === \"not-expected\") {\n\t\tconst table = blindCast(issue.actual);\n\t\tif (CONTROL_TABLE_NAMES.has(table.name)) return ok([]);\n\t\treturn ok([new DropTableCall(table.name)]);\n\t}\n\treturn notOk(issueConflict(\"unsupportedOperation\", `Unexpected table drift: ${issue.path.join(\"/\")}`));\n}\nfunction mapColumnIssue(issue, ctx) {\n\tconst tableName = issue.path[1];\n\tif (tableName === void 0) return notOk(issueConflict(\"unsupportedOperation\", `Column issue has no table in its path: ${issue.path.join(\"/\")}`));\n\tif (issueOutcome(issue) === \"not-found\") {\n\t\tconst column = blindCast(issue.expected);\n\t\tconst table = ctx.expected.tables[tableName];\n\t\treturn ok([new AddColumnCall(tableName, columnSpecFromNode(column, table !== void 0 && isInlineAutoincrementPrimaryKeyNode(table, column)))]);\n\t}\n\tif (issueOutcome(issue) === \"not-expected\") return ok([new DropColumnCall(tableName, blindCast(issue.actual).name)]);\n\tconst expected = blindCast(issue.expected);\n\treturn notOk(issueConflict(columnTypeChanged(expected, blindCast(issue.actual)) ? \"typeMismatch\" : \"nullabilityConflict\", issue.path.join(\"/\"), issueLocation(tableName, expected.name)));\n}\nfunction mapIndexIssue(issue) {\n\tconst tableName = issue.path[1];\n\tif (tableName === void 0) return notOk(issueConflict(\"unsupportedOperation\", `Index issue has no table in its path: ${issue.path.join(\"/\")}`));\n\tif (issueOutcome(issue) === \"not-found\") {\n\t\tconst index = blindCast(issue.expected);\n\t\tconst indexName = index.name;\n\t\treturn ok([new CreateIndexCall(tableName, indexName, index.columns ?? [])]);\n\t}\n\tif (issueOutcome(issue) === \"not-expected\") {\n\t\tconst indexName = blindCast(issue.actual).name;\n\t\treturn ok([new DropIndexCall(tableName, indexName)]);\n\t}\n\treturn notOk(issueConflict(\"indexIncompatible\", issue.path.join(\"/\"), issueLocation(tableName)));\n}\nfunction mapNodeIssueToCall(issue, ctx) {\n\tconst node = issueNode(issue);\n\tif (node === void 0) return notOk(issueConflict(\"unsupportedOperation\", `Issue carries neither an expected nor an actual node: ${issue.path.join(\"/\")}`));\n\tswitch (node.nodeKind) {\n\t\tcase RelationalSchemaNodeKind.table: return mapTableIssue(issue);\n\t\tcase RelationalSchemaNodeKind.column: return mapColumnIssue(issue, ctx);\n\t\tcase RelationalSchemaNodeKind.index: return mapIndexIssue(issue);\n\t\tcase RelationalSchemaNodeKind.columnDefault:\n\t\tcase RelationalSchemaNodeKind.primaryKey:\n\t\tcase RelationalSchemaNodeKind.foreignKey:\n\t\tcase RelationalSchemaNodeKind.unique: return notOk(issueConflict(absorbedConflictKind(node.nodeKind), issue.path.join(\"/\")));\n\t\tcase RelationalSchemaNodeKind.check: return notOk(issueConflict(\"unsupportedOperation\", `SQLite does not support CHECK constraint DDL: ${issue.path.join(\"/\")}`));\n\t\tdefault: return notOk(issueConflict(\"unsupportedOperation\", `Unhandled node kind: ${node.nodeKind}`));\n\t}\n}\nfunction classifyCall(call) {\n\tswitch (call.factoryName) {\n\t\tcase \"createTable\": return \"create-table\";\n\t\tcase \"addColumn\": return \"add-column\";\n\t\tcase \"createIndex\": return \"create-index\";\n\t\tcase \"dropColumn\": return \"drop-column\";\n\t\tcase \"dropIndex\": return \"drop-index\";\n\t\tcase \"dropTable\": return \"drop-table\";\n\t\tcase \"recreateTable\": return null;\n\t\tdefault: return null;\n\t}\n}\nconst DEFAULT_POLICY = { allowedOperationClasses: [\n\t\"additive\",\n\t\"widening\",\n\t\"destructive\",\n\t\"data\"\n] };\nfunction planIssues(options) {\n\tconst policyProvided = options.policy !== void 0;\n\tconst policy = options.policy ?? DEFAULT_POLICY;\n\tconst frameworkComponents = options.frameworkComponents ?? [];\n\tconst context = {\n\t\texpected: options.expected ?? emptySchemaIR(),\n\t\tactual: options.actual ?? emptySchemaIR(),\n\t\tpolicy,\n\t\tframeworkComponents\n\t};\n\tconst strategies = options.strategies ?? sqlitePlannerStrategies;\n\tlet remaining = options.issues;\n\tconst recipeCalls = [];\n\tconst bucketableCalls = [];\n\tfor (const strategy of strategies) {\n\t\tconst result = strategy(remaining, context);\n\t\tif (result.kind === \"match\") {\n\t\t\tremaining = result.issues;\n\t\t\tif (result.recipe) recipeCalls.push(...result.calls);\n\t\t\telse bucketableCalls.push(...result.calls);\n\t\t}\n\t}\n\tconst sorted = orderIssuesByDependencies(remaining);\n\tconst defaultCalls = [];\n\tconst conflicts = [];\n\tfor (const issue of sorted) {\n\t\tconst result = mapNodeIssueToCall(issue, context);\n\t\tif (result.ok) defaultCalls.push(...result.value);\n\t\telse conflicts.push(result.failure);\n\t}\n\tconst allowed = policy.allowedOperationClasses;\n\tlet gatedRecipe = recipeCalls;\n\tlet gatedBucketable = bucketableCalls;\n\tlet gatedDefault = defaultCalls;\n\tif (policyProvided) {\n\t\tconst sink = (acc) => (call) => {\n\t\t\tif (allowed.includes(call.operationClass)) {\n\t\t\t\tacc.push(call);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tconflicts.push(conflictForDisallowedCall(call, allowed));\n\t\t};\n\t\tconst gatedRecipeBucket = [];\n\t\tconst gatedBucketableBucket = [];\n\t\tconst gatedDefaultBucket = [];\n\t\trecipeCalls.forEach(sink(gatedRecipeBucket));\n\t\tbucketableCalls.forEach(sink(gatedBucketableBucket));\n\t\tdefaultCalls.forEach(sink(gatedDefaultBucket));\n\t\tgatedRecipe = gatedRecipeBucket;\n\t\tgatedBucketable = gatedBucketableBucket;\n\t\tgatedDefault = gatedDefaultBucket;\n\t}\n\tif (conflicts.length > 0) return notOk(conflicts);\n\tconst combined = [...gatedDefault, ...gatedBucketable];\n\tconst byCategory = (cat) => combined.filter((c) => classifyCall(c) === cat);\n\treturn ok({ calls: [\n\t\t...byCategory(\"create-table\"),\n\t\t...byCategory(\"add-column\"),\n\t\t...byCategory(\"create-index\"),\n\t\t...gatedRecipe,\n\t\t...byCategory(\"drop-column\"),\n\t\t...byCategory(\"drop-index\"),\n\t\t...byCategory(\"drop-table\")\n\t] });\n}\nfunction emptySchemaIR() {\n\treturn new SqlSchemaIR({ tables: {} });\n}\nfunction conflictForDisallowedCall(call, allowed) {\n\tconst summary = `Operation \"${call.label}\" requires class \"${call.operationClass}\", but policy allows only: ${allowed.join(\", \")}`;\n\tconst location = locationForCall(call);\n\treturn {\n\t\tkind: conflictKindForCall(call),\n\t\tsummary,\n\t\twhy: \"Use `migration new` to author a custom migration for this change.\",\n\t\t...location ? { location } : {}\n\t};\n}\nfunction conflictKindForCall(call) {\n\tswitch (call.factoryName) {\n\t\tcase \"createIndex\":\n\t\tcase \"dropIndex\": return \"indexIncompatible\";\n\t\tdefault: return \"missingButNonAdditive\";\n\t}\n}\nfunction locationForCall(call) {\n\tconst location = {};\n\tif (\"tableName\" in call) {\n\t\tlocation.entityKind = \"table\";\n\t\tlocation.entityName = call.tableName;\n\t}\n\tif (\"columnName\" in call) location.column = call.columnName;\n\tif (\"indexName\" in call) location.index = call.indexName;\n\treturn Object.keys(location).length > 0 ? location : void 0;\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 { expected, actual, issues } = this.collectSchemaIssues(options);\n\t\tconst codecHooks = extractCodecControlHooks(options.frameworkComponents);\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\tstrategies: sqlitePlannerStrategies\n\t\t});\n\t\tif (!result.ok) return plannerFailure(result.failure);\n\t\tconst fieldEventOps = planFieldEventOperations({\n\t\t\tpriorContract: options.fromContract,\n\t\t\tnewContract: options.contract,\n\t\t\tcodecHooks\n\t\t});\n\t\tconst calls = [...result.value.calls, ...fieldEventOps];\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.fromContract?.storage.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};\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) {\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: options.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//#endregion\nexport { verifySqliteDatabaseSchema as a, sqliteContractToSchema as i, createSqliteMigrationPlanner as n, diffSqliteSchema as r, SqliteMigrationPlanner as t };\n\n//# sourceMappingURL=planner-DiGcIjl1.mjs.map"],"mappings":";;;;;;;;;;;;;;;AAeA,SAAS,oBAAoB,KAAK,SAAS;CAC1C,IAAI,IAAI,SAAS,YAAY;EAC5B,IAAI,IAAI,eAAe,SAAS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istry } from "./adapter-DizMsGCb-n4h4w8ms.mjs";
1
+ import { n as createSqliteAdapterWithCodecRegistry } from "./adapter-DEYUC-KO-DO_abhIq.mjs";
2
2
  import { SqlRuntimeAdapterDescriptor } from "@prisma/orm-family-sql/runtime";
3
3
  import { RuntimeAdapterInstance } from "@prisma/orm-framework/components/execution";
4
4
  //#region ../../../3-targets/6-adapters/sqlite/dist/runtime.d.mts
@@ -7,4 +7,4 @@ type SqliteRuntimeAdapterInstance = RuntimeAdapterInstance<'sql', 'sqlite'> & Re
7
7
  declare const sqliteRuntimeAdapterDescriptor: SqlRuntimeAdapterDescriptor<'sqlite', SqliteRuntimeAdapterInstance>;
8
8
  //#endregion
9
9
  export { sqliteRuntimeAdapterDescriptor as n, SqliteRuntimeAdapterInstance as t };
10
- //# sourceMappingURL=runtime-tbBYTw7Z.d.mts.map
10
+ //# sourceMappingURL=runtime-C5J9fusd.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime-tbBYTw7Z.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/sqlite/dist/runtime.d.mts"],"mappings":";;;;;KAIK,+BAA+B,0CAA0C,kBAAkB;cAClF,gCAAgC,sCAAsC"}
1
+ {"version":3,"file":"runtime-C5J9fusd.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/sqlite/dist/runtime.d.mts"],"mappings":";;;;;KAIK,+BAA+B,0CAA0C,kBAAkB;cAClF,gCAAgC,sCAAsC"}
@@ -0,0 +1 @@
1
+ import "./adapter-DEYUC-KO-DO_abhIq.mjs";
package/dist/target.d.mts CHANGED
@@ -1,16 +1,17 @@
1
- import { a as SqliteCodecOptions, c as isSqliteCodecDescriptor, i as SqliteCodecDescriptorRegistry, l as sqliteCodec, n as AnySqliteCodecDescriptor, o as buildSqliteCodecDescriptorRegistry, r as SqliteCodecDescriptor, s as defineSqliteCodecs, t as AdaptedSqliteCodecDescriptor } from "./codec-descriptor-BcgD9f3L-BjEkn9Ob.mjs";
2
- import "./codec-descriptor-CyCQXvSl.mjs";
1
+ import { a as SqliteCodecOptions, c as isSqliteCodecDescriptor, i as SqliteCodecDescriptorRegistry, l as sqliteCodec, n as AnySqliteCodecDescriptor, o as buildSqliteCodecDescriptorRegistry, r as SqliteCodecDescriptor, s as defineSqliteCodecs, t as AdaptedSqliteCodecDescriptor } from "./codec-descriptor-BcgD9f3L-yDi5nh_k.mjs";
2
+ import "./codec-descriptor-vwfD3BMy.mjs";
3
3
  import { i as SqliteDdlVisitor, n as SqliteCreateTable, r as SqliteDdlNode, t as AnySqliteDdlNode } from "./nodes-D8EC1yCx-rpfpuJ4T.mjs";
4
4
  import "./ddl-CfSqNT0M.mjs";
5
5
  import { a as SQLITE_JSON_CODEC_ID, c as SQL_CHAR_CODEC_ID, d as SQL_VARCHAR_CODEC_ID, i as SQLITE_INTEGER_CODEC_ID, l as SQL_FLOAT_CODEC_ID, n as SQLITE_BLOB_CODEC_ID, o as SQLITE_REAL_CODEC_ID, r as SQLITE_DATETIME_CODEC_ID, s as SQLITE_TEXT_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID, u as SQL_INT_CODEC_ID } from "./codec-ids-DocGjhs--CHhP1jNZ.mjs";
6
- import { _ as sqliteRealColumn, a as SqliteIntegerDescriptor, c as SqliteTextDescriptor, d as sqliteBlobColumn, f as sqliteCodecDescriptorRegistry, g as sqliteJsonColumn, h as sqliteIntegerColumn, i as SqliteDatetimeDescriptor, l as jsonDocumentRetag, m as sqliteDatetimeColumn, n as SqliteBigintDescriptor, o as SqliteJsonDescriptor, p as sqliteCodecRegistry, r as SqliteBlobDescriptor, s as SqliteRealDescriptor, t as JsonValue$1, u as sqliteBigintColumn, v as sqliteTextColumn } from "./codecs-1-oOsTPG-Bv518Lbm.mjs";
7
- import { t as CodecTypes } from "./codec-types-DKB--ltR-CIuvX0zx.mjs";
8
- import "./codec-types-wPDlPoD7.mjs";
6
+ import { _ as sqliteRealColumn, a as SqliteIntegerDescriptor, c as SqliteTextDescriptor, d as sqliteBlobColumn, f as sqliteCodecDescriptorRegistry, g as sqliteJsonColumn, h as sqliteIntegerColumn, i as SqliteDatetimeDescriptor, l as jsonDocumentRetag, m as sqliteDatetimeColumn, n as SqliteBigintDescriptor, o as SqliteJsonDescriptor, p as sqliteCodecRegistry, r as SqliteBlobDescriptor, s as SqliteRealDescriptor, t as JsonValue$1, u as sqliteBigintColumn, v as sqliteTextColumn } from "./codecs-CEh66QoN-oCsdncEe.mjs";
7
+ import { t as CodecTypes } from "./codec-types-DOyikA9Q-DVHiIZxI.mjs";
8
+ import "./codec-types-BV3IjK44.mjs";
9
9
  import { n as quoteIdentifier, t as escapeLiteral } from "./sql-utils-0SJZOd7Q.mjs";
10
10
  import { t as parseSqliteDefault } from "./default-normalizer-B9V7TY5u.mjs";
11
11
  import { t as normalizeSqliteNativeType } from "./native-type-normalizer-CO2wKGL6.mjs";
12
+ import { t as sqliteAggregateDescriptors } from "./aggregates-BGuKJwfI.mjs";
12
13
  import "./codec-ids-ChRBs2aB.mjs";
13
- import "./codecs-j-8RDkOt.mjs";
14
+ import "./codecs-BVBvwzGc.mjs";
14
15
  import { a as buildSignMarkerBootstrapQueries, c as datetime, d as jsonText, f as sqliteTable, i as buildControlTableBootstrapQueries, l as indexExistsAst, m as text, n as IndexExistsCheckBuilder, o as columnExistsAst, p as tableExistsAst, r as TableExistsCheckBuilder, s as createTable, t as ColumnExistsCheckBuilder, u as integer } from "./contract-free-CCLAXZV2.mjs";
15
16
  import { n as buildTargetDetails, t as SqlitePlanTargetDetails } from "./planner-target-details-xR6UfIcz-CMahymzq.mjs";
16
17
  import { r as sqliteCreateNamespace, t as SqliteUnboundDatabase } from "./control--wMueaTg.mjs";
@@ -19,10 +20,10 @@ import { t as SqliteContractView } from "./sqlite-contract-view-BpNMaU2m-COMDaGa
19
20
  import { t as SqliteMigration } from "./sqlite-migration-o23JHwzY-CwNJcqwl.mjs";
20
21
  import { a as fn, c as placeholder, d as unique, i as dataTransform, l as primaryKey, n as MigrationCLI, o as foreignKey, r as col, s as lit, t as DataTransformOptions, u as rawSql } from "./migration-uylRe5MP.mjs";
21
22
  import { a as DropColumnCall, c as RawSqlCall, i as DataTransformCall, l as RecreateTableCall, n as CreateIndexCall, o as DropIndexCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as SqliteOpFactoryCall } from "./op-factory-call-DoHN7Q7L.mjs";
22
- import "./pack-BfwyQ0b3.mjs";
23
+ import "./pack-Cnu6UOJx.mjs";
23
24
  import { n as TypeScriptRenderableSqliteMigration, t as SqliteMigrationDestinationInfo } from "./planner-produced-sqlite-migration-BuJysRxx-CaDUbNVx.mjs";
24
25
  import { n as SqlitePlanResult, r as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-Bxdi7jZF.mjs";
25
26
  import "./planner-produced-sqlite-migration-uySoqJO-.mjs";
26
27
  import { t as renderOps } from "./render-ops-B10yqmdG.mjs";
27
28
  import { n as SqliteRuntimeTargetInstance, t as SqliteContractSerializer } from "./runtime-B99c4n56.mjs";
28
- export { type AdaptedSqliteCodecDescriptor, AddColumnCall, type AnySqliteCodecDescriptor, type AnySqliteDdlNode, CONTROL_TABLE_NAMES, CodecTypes, type ColumnExistsCheckBuilder, CreateIndexCall, CreateTableCall, DataTransformCall, type DataTransformOptions, DropColumnCall, DropIndexCall, DropTableCall, type IndexExistsCheckBuilder, type JsonValue$1 as JsonValue, LEDGER_TABLE_NAME, MARKER_TABLE_NAME, SqliteMigration as Migration, MigrationCLI, RawSqlCall, RecreateTableCall, SQLITE_BIGINT_CODEC_ID, SQLITE_BLOB_CODEC_ID, SQLITE_DATETIME_CODEC_ID, SQLITE_INTEGER_CODEC_ID, SQLITE_JSON_CODEC_ID, SQLITE_REAL_CODEC_ID, SQLITE_TEXT_CODEC_ID, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_VARCHAR_CODEC_ID, type SqliteBigintDescriptor, type SqliteBlobDescriptor, SqliteCodecDescriptor, type SqliteCodecDescriptorRegistry, type SqliteCodecOptions, SqliteContractSerializer, SqliteContractView, SqliteCreateTable, type SqliteDatetimeDescriptor, SqliteDdlNode, type SqliteDdlVisitor, type SqliteIntegerDescriptor, type SqliteJsonDescriptor, type SqliteMigrationDestinationInfo, SqliteMigrationPlanner, type SqliteOpFactoryCall, type SqlitePlanResult, type SqlitePlanTargetDetails, type SqliteRealDescriptor, type SqliteRuntimeTargetInstance, type SqliteTextDescriptor, SqliteUnboundDatabase, type TableExistsCheckBuilder, TypeScriptRenderableSqliteMigration, buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, buildSqliteCodecDescriptorRegistry, buildTargetDetails, col, columnExistsAst, createSqliteMigrationPlanner, createTable, dataTransform, datetime, defineSqliteCodecs, escapeLiteral, fn, foreignKey, indexExistsAst, integer, isSqliteCodecDescriptor, jsonDocumentRetag, jsonText, lit, normalizeSqliteNativeType, parseSqliteDefault, placeholder, primaryKey, quoteIdentifier, rawSql, renderOps, sqliteBigintColumn, sqliteBlobColumn, sqliteCodec, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteCreateNamespace, sqliteDatetimeColumn, sqliteIntegerColumn, sqliteJsonColumn, sqliteRealColumn, sqliteTable, sqliteTextColumn, tableExistsAst, text, unique };
29
+ export { type AdaptedSqliteCodecDescriptor, AddColumnCall, type AnySqliteCodecDescriptor, type AnySqliteDdlNode, CONTROL_TABLE_NAMES, CodecTypes, type ColumnExistsCheckBuilder, CreateIndexCall, CreateTableCall, DataTransformCall, type DataTransformOptions, DropColumnCall, DropIndexCall, DropTableCall, type IndexExistsCheckBuilder, type JsonValue$1 as JsonValue, LEDGER_TABLE_NAME, MARKER_TABLE_NAME, SqliteMigration as Migration, MigrationCLI, RawSqlCall, RecreateTableCall, SQLITE_BIGINT_CODEC_ID, SQLITE_BLOB_CODEC_ID, SQLITE_DATETIME_CODEC_ID, SQLITE_INTEGER_CODEC_ID, SQLITE_JSON_CODEC_ID, SQLITE_REAL_CODEC_ID, SQLITE_TEXT_CODEC_ID, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_VARCHAR_CODEC_ID, type SqliteBigintDescriptor, type SqliteBlobDescriptor, SqliteCodecDescriptor, type SqliteCodecDescriptorRegistry, type SqliteCodecOptions, SqliteContractSerializer, SqliteContractView, SqliteCreateTable, type SqliteDatetimeDescriptor, SqliteDdlNode, type SqliteDdlVisitor, type SqliteIntegerDescriptor, type SqliteJsonDescriptor, type SqliteMigrationDestinationInfo, SqliteMigrationPlanner, type SqliteOpFactoryCall, type SqlitePlanResult, type SqlitePlanTargetDetails, type SqliteRealDescriptor, type SqliteRuntimeTargetInstance, type SqliteTextDescriptor, SqliteUnboundDatabase, type TableExistsCheckBuilder, TypeScriptRenderableSqliteMigration, buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, buildSqliteCodecDescriptorRegistry, buildTargetDetails, col, columnExistsAst, createSqliteMigrationPlanner, createTable, dataTransform, datetime, defineSqliteCodecs, escapeLiteral, fn, foreignKey, indexExistsAst, integer, isSqliteCodecDescriptor, jsonDocumentRetag, jsonText, lit, normalizeSqliteNativeType, parseSqliteDefault, placeholder, primaryKey, quoteIdentifier, rawSql, renderOps, sqliteAggregateDescriptors, sqliteBigintColumn, sqliteBlobColumn, sqliteCodec, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteCreateNamespace, sqliteDatetimeColumn, sqliteIntegerColumn, sqliteJsonColumn, sqliteRealColumn, sqliteTable, sqliteTextColumn, tableExistsAst, text, unique };
package/dist/target.mjs CHANGED
@@ -1,6 +1,7 @@
1
- import { a as sqliteCodec, i as isSqliteCodecDescriptor, n as buildSqliteCodecDescriptorRegistry, r as defineSqliteCodecs, t as SqliteCodecDescriptor } from "./codec-descriptor-kVCSW1OR-CPatZUPM.mjs";
2
1
  import { a as SQLITE_JSON_CODEC_ID, c as SQL_CHAR_CODEC_ID, d as SQL_VARCHAR_CODEC_ID, i as SQLITE_INTEGER_CODEC_ID, l as SQL_FLOAT_CODEC_ID, n as SQLITE_BLOB_CODEC_ID, o as SQLITE_REAL_CODEC_ID, r as SQLITE_DATETIME_CODEC_ID, s as SQLITE_TEXT_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID, u as SQL_INT_CODEC_ID } from "./codec-ids-xicqpuAa-DHnKqnIs.mjs";
3
- import { a as sqliteCodecRegistry, c as sqliteJsonColumn, i as sqliteCodecDescriptorRegistry, l as sqliteRealColumn, n as sqliteBigintColumn, o as sqliteDatetimeColumn, r as sqliteBlobColumn, s as sqliteIntegerColumn, t as jsonDocumentRetag, u as sqliteTextColumn } from "./codecs-CM_2W3uA.mjs";
2
+ import { t as sqliteAggregateDescriptors } from "./aggregates-CTDRDyvD.mjs";
3
+ import { a as sqliteCodec, i as isSqliteCodecDescriptor, n as buildSqliteCodecDescriptorRegistry, r as defineSqliteCodecs, t as SqliteCodecDescriptor } from "./codec-descriptor-kVCSW1OR-CPatZUPM.mjs";
4
+ import { a as sqliteCodecRegistry, c as sqliteJsonColumn, i as sqliteCodecDescriptorRegistry, l as sqliteRealColumn, n as sqliteBigintColumn, o as sqliteDatetimeColumn, r as sqliteBlobColumn, s as sqliteIntegerColumn, t as jsonDocumentRetag, u as sqliteTextColumn } from "./codecs-BaoqGdxT.mjs";
4
5
  import { n as SqliteDdlNode, t as SqliteCreateTable } from "./nodes-DUZSdX86-BBEEaxXY.mjs";
5
6
  import { i as tableExistsAst, n as createTable, r as indexExistsAst, t as columnExistsAst } from "./ddl-CW34JvfE-rd1ZIxOn.mjs";
6
7
  import { a as jsonText, i as integer, n as buildSignMarkerBootstrapQueries, o as sqliteTable, r as datetime, s as text, t as buildControlTableBootstrapQueries } from "./contract-free-DElSXD0q.mjs";
@@ -13,7 +14,7 @@ import { t as renderOps } from "./render-ops-DIOn_wOx-D33LOy3b.mjs";
13
14
  import { i as sqliteCreateNamespace, n as SqliteContractView, r as SqliteUnboundDatabase, t as SqliteContractSerializer } from "./sqlite-contract-view-CnDITHEE-BvjSbmzL.mjs";
14
15
  import { t as SqliteMigration } from "./sqlite-migration-CV6LIqhx-D5eMTAbH.mjs";
15
16
  import { t as TypeScriptRenderableSqliteMigration } from "./planner-produced-sqlite-migration-C8nxPT0P-DdBqfmAD.mjs";
16
- import { n as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-DiGcIjl1-QnNAhVmX.mjs";
17
+ import { n as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-DiGcIjl1-oFtDTY7-.mjs";
17
18
  import { a as foreignKey, c as primaryKey, i as fn, l as rawSql, n as col, o as lit, r as dataTransform, s as placeholder, t as MigrationCLI, u as unique } from "./migration-jsmNRI_8.mjs";
18
19
  import { t as normalizeSqliteNativeType } from "./native-type-normalizer-GpQMEyN5.mjs";
19
- export { AddColumnCall, CONTROL_TABLE_NAMES, CreateIndexCall, CreateTableCall, DataTransformCall, DropColumnCall, DropIndexCall, DropTableCall, LEDGER_TABLE_NAME, MARKER_TABLE_NAME, SqliteMigration as Migration, MigrationCLI, RawSqlCall, RecreateTableCall, SQLITE_BIGINT_CODEC_ID, SQLITE_BLOB_CODEC_ID, SQLITE_DATETIME_CODEC_ID, SQLITE_INTEGER_CODEC_ID, SQLITE_JSON_CODEC_ID, SQLITE_REAL_CODEC_ID, SQLITE_TEXT_CODEC_ID, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SqliteCodecDescriptor, SqliteContractSerializer, SqliteContractView, SqliteCreateTable, SqliteDdlNode, SqliteMigrationPlanner, SqliteUnboundDatabase, TypeScriptRenderableSqliteMigration, buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, buildSqliteCodecDescriptorRegistry, buildTargetDetails, col, columnExistsAst, createSqliteMigrationPlanner, createTable, dataTransform, datetime, defineSqliteCodecs, escapeLiteral, fn, foreignKey, indexExistsAst, integer, isSqliteCodecDescriptor, jsonDocumentRetag, jsonText, lit, normalizeSqliteNativeType, parseSqliteDefault, placeholder, primaryKey, quoteIdentifier, rawSql, renderOps, sqliteBigintColumn, sqliteBlobColumn, sqliteCodec, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteCreateNamespace, sqliteDatetimeColumn, sqliteIntegerColumn, sqliteJsonColumn, sqliteRealColumn, sqliteTable, sqliteTextColumn, tableExistsAst, text, unique };
20
+ export { AddColumnCall, CONTROL_TABLE_NAMES, CreateIndexCall, CreateTableCall, DataTransformCall, DropColumnCall, DropIndexCall, DropTableCall, LEDGER_TABLE_NAME, MARKER_TABLE_NAME, SqliteMigration as Migration, MigrationCLI, RawSqlCall, RecreateTableCall, SQLITE_BIGINT_CODEC_ID, SQLITE_BLOB_CODEC_ID, SQLITE_DATETIME_CODEC_ID, SQLITE_INTEGER_CODEC_ID, SQLITE_JSON_CODEC_ID, SQLITE_REAL_CODEC_ID, SQLITE_TEXT_CODEC_ID, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SqliteCodecDescriptor, SqliteContractSerializer, SqliteContractView, SqliteCreateTable, SqliteDdlNode, SqliteMigrationPlanner, SqliteUnboundDatabase, TypeScriptRenderableSqliteMigration, buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, buildSqliteCodecDescriptorRegistry, buildTargetDetails, col, columnExistsAst, createSqliteMigrationPlanner, createTable, dataTransform, datetime, defineSqliteCodecs, escapeLiteral, fn, foreignKey, indexExistsAst, integer, isSqliteCodecDescriptor, jsonDocumentRetag, jsonText, lit, normalizeSqliteNativeType, parseSqliteDefault, placeholder, primaryKey, quoteIdentifier, rawSql, renderOps, sqliteAggregateDescriptors, sqliteBigintColumn, sqliteBlobColumn, sqliteCodec, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteCreateNamespace, sqliteDatetimeColumn, sqliteIntegerColumn, sqliteJsonColumn, sqliteRealColumn, sqliteTable, sqliteTextColumn, tableExistsAst, text, unique };
@@ -0,0 +1,2 @@
1
+ import { t as sqliteAggregateDescriptors } from "./aggregates-BGuKJwfI.mjs";
2
+ export { sqliteAggregateDescriptors };
@@ -0,0 +1,2 @@
1
+ import { t as sqliteAggregateDescriptors } from "./aggregates-CTDRDyvD.mjs";
2
+ export { sqliteAggregateDescriptors };
@@ -1,3 +1,3 @@
1
- import { a as SqliteCodecOptions, c as isSqliteCodecDescriptor, i as SqliteCodecDescriptorRegistry, l as sqliteCodec, n as AnySqliteCodecDescriptor, o as buildSqliteCodecDescriptorRegistry, r as SqliteCodecDescriptor, s as defineSqliteCodecs, t as AdaptedSqliteCodecDescriptor } from "./codec-descriptor-BcgD9f3L-BjEkn9Ob.mjs";
2
- import "./codec-descriptor-CyCQXvSl.mjs";
1
+ import { a as SqliteCodecOptions, c as isSqliteCodecDescriptor, i as SqliteCodecDescriptorRegistry, l as sqliteCodec, n as AnySqliteCodecDescriptor, o as buildSqliteCodecDescriptorRegistry, r as SqliteCodecDescriptor, s as defineSqliteCodecs, t as AdaptedSqliteCodecDescriptor } from "./codec-descriptor-BcgD9f3L-yDi5nh_k.mjs";
2
+ import "./codec-descriptor-vwfD3BMy.mjs";
3
3
  export { type AdaptedSqliteCodecDescriptor, type AnySqliteCodecDescriptor, SqliteCodecDescriptor, type SqliteCodecDescriptorRegistry, type SqliteCodecOptions, buildSqliteCodecDescriptorRegistry, defineSqliteCodecs, isSqliteCodecDescriptor, sqliteCodec };
@@ -1,4 +1,4 @@
1
- import { t as JsonValue$1 } from "./codecs-1-oOsTPG-Bv518Lbm.mjs";
2
- import { t as CodecTypes } from "./codec-types-DKB--ltR-CIuvX0zx.mjs";
3
- import "./codec-types-wPDlPoD7.mjs";
1
+ import { t as JsonValue$1 } from "./codecs-CEh66QoN-oCsdncEe.mjs";
2
+ import { t as CodecTypes } from "./codec-types-DOyikA9Q-DVHiIZxI.mjs";
3
+ import "./codec-types-BV3IjK44.mjs";
4
4
  export { CodecTypes, type JsonValue$1 as JsonValue };
@@ -1,3 +1,3 @@
1
- import { _ as sqliteRealColumn, a as SqliteIntegerDescriptor, c as SqliteTextDescriptor, d as sqliteBlobColumn, f as sqliteCodecDescriptorRegistry, g as sqliteJsonColumn, h as sqliteIntegerColumn, i as SqliteDatetimeDescriptor, l as jsonDocumentRetag, m as sqliteDatetimeColumn, n as SqliteBigintDescriptor, o as SqliteJsonDescriptor, p as sqliteCodecRegistry, r as SqliteBlobDescriptor, s as SqliteRealDescriptor, t as JsonValue$1, u as sqliteBigintColumn, v as sqliteTextColumn } from "./codecs-1-oOsTPG-Bv518Lbm.mjs";
2
- import "./codecs-j-8RDkOt.mjs";
1
+ import { _ as sqliteRealColumn, a as SqliteIntegerDescriptor, c as SqliteTextDescriptor, d as sqliteBlobColumn, f as sqliteCodecDescriptorRegistry, g as sqliteJsonColumn, h as sqliteIntegerColumn, i as SqliteDatetimeDescriptor, l as jsonDocumentRetag, m as sqliteDatetimeColumn, n as SqliteBigintDescriptor, o as SqliteJsonDescriptor, p as sqliteCodecRegistry, r as SqliteBlobDescriptor, s as SqliteRealDescriptor, t as JsonValue$1, u as sqliteBigintColumn, v as sqliteTextColumn } from "./codecs-CEh66QoN-oCsdncEe.mjs";
2
+ import "./codecs-BVBvwzGc.mjs";
3
3
  export { type JsonValue$1 as JsonValue, type SqliteBigintDescriptor, type SqliteBlobDescriptor, type SqliteDatetimeDescriptor, type SqliteIntegerDescriptor, type SqliteJsonDescriptor, type SqliteRealDescriptor, type SqliteTextDescriptor, jsonDocumentRetag, sqliteBigintColumn, sqliteBlobColumn, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteDatetimeColumn, sqliteIntegerColumn, sqliteJsonColumn, sqliteRealColumn, sqliteTextColumn };
@@ -1,2 +1,2 @@
1
- import { a as sqliteCodecRegistry, c as sqliteJsonColumn, i as sqliteCodecDescriptorRegistry, l as sqliteRealColumn, n as sqliteBigintColumn, o as sqliteDatetimeColumn, r as sqliteBlobColumn, s as sqliteIntegerColumn, t as jsonDocumentRetag, u as sqliteTextColumn } from "./codecs-CM_2W3uA.mjs";
1
+ import { a as sqliteCodecRegistry, c as sqliteJsonColumn, i as sqliteCodecDescriptorRegistry, l as sqliteRealColumn, n as sqliteBigintColumn, o as sqliteDatetimeColumn, r as sqliteBlobColumn, s as sqliteIntegerColumn, t as jsonDocumentRetag, u as sqliteTextColumn } from "./codecs-BaoqGdxT.mjs";
2
2
  export { jsonDocumentRetag, sqliteBigintColumn, sqliteBlobColumn, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteDatetimeColumn, sqliteIntegerColumn, sqliteJsonColumn, sqliteRealColumn, sqliteTextColumn };
@@ -2,7 +2,7 @@ import { n as sqliteError } from "./errors-CKsaaSnD-BeB4JS8h.mjs";
2
2
  import { t as sqliteTargetDescriptorMeta } from "./descriptor-meta-DnwDwnGg-D3f936hn.mjs";
3
3
  import { r as MARKER_TABLE_NAME } from "./control-tables-D_o8dKRB-BXi43noL.mjs";
4
4
  import { i as sqliteCreateNamespace, r as SqliteUnboundDatabase, t as SqliteContractSerializer } from "./sqlite-contract-view-CnDITHEE-BvjSbmzL.mjs";
5
- import { a as verifySqliteDatabaseSchema, i as sqliteContractToSchema, n as createSqliteMigrationPlanner, r as diffSqliteSchema } from "./planner-DiGcIjl1-QnNAhVmX.mjs";
5
+ import { a as verifySqliteDatabaseSchema, i as sqliteContractToSchema, n as createSqliteMigrationPlanner, r as diffSqliteSchema } from "./planner-DiGcIjl1-oFtDTY7-.mjs";
6
6
  import { blindCast } from "@prisma/orm-framework/utils/casts";
7
7
  import { APP_SPACE_ID } from "@prisma/orm-framework/components/control";
8
8
  import { runnerFailure, runnerSuccess } from "@prisma/orm-family-sql/family/control";
@@ -1,2 +1,2 @@
1
- import { t as sqliteTargetDescriptorMeta } from "./pack-BfwyQ0b3.mjs";
1
+ import { t as sqliteTargetDescriptorMeta } from "./pack-Cnu6UOJx.mjs";
2
2
  export { sqliteTargetDescriptorMeta as default };
@@ -1,2 +1,2 @@
1
- import { n as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-DiGcIjl1-QnNAhVmX.mjs";
1
+ import { n as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-DiGcIjl1-oFtDTY7-.mjs";
2
2
  export { SqliteMigrationPlanner, createSqliteMigrationPlanner };
@@ -0,0 +1 @@
1
+ import "./types-C5FSREvo-CwUlKK34.mjs";
@@ -1,7 +1,7 @@
1
- import { i as SqliteCodecDescriptorRegistry, n as AnySqliteCodecDescriptor } from "./codec-descriptor-BcgD9f3L-BjEkn9Ob.mjs";
2
- import "./codec-descriptor-CyCQXvSl.mjs";
3
- import { CodecRegistry } from "@prisma/orm-framework/components/codec";
1
+ import { i as SqliteCodecDescriptorRegistry, n as AnySqliteCodecDescriptor } from "./codec-descriptor-BcgD9f3L-yDi5nh_k.mjs";
2
+ import "./codec-descriptor-vwfD3BMy.mjs";
4
3
  import { LoweredStatement } from "@prisma/orm-family-sql/relational-core/ast";
4
+ import { CodecRegistry } from "@prisma/orm-framework/components/codec";
5
5
  import { SqlStorage } from "@prisma/orm-family-sql/contract/types";
6
6
  import { Contract } from "@prisma/orm-framework/contract/types";
7
7
  //#region ../../../3-targets/6-adapters/sqlite/dist/types-C5FSREvo.d.mts
@@ -22,4 +22,4 @@ type SqliteContract = Contract<SqlStorage> & {
22
22
  type SqliteLoweredStatement = LoweredStatement;
23
23
  //#endregion
24
24
  export { SqliteLoweredStatement as i, SqliteCodecRegistry as n, SqliteContract as r, SqliteAdapterOptions as t };
25
- //# sourceMappingURL=types-C5FSREvo-Bm6N5Kog.d.mts.map
25
+ //# sourceMappingURL=types-C5FSREvo-CwUlKK34.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types-C5FSREvo-Bm6N5Kog.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/sqlite/dist/types-C5FSREvo.d.mts"],"mappings":";;;;;;;;KAMK,sBAAsB,gBAAgB;UACjC;WACC;;;;;;WAMA,4BAA4B;;KAElC,iBAAiB,SAAS;WACpB;;KAEN,yBAAyB"}
1
+ {"version":3,"file":"types-C5FSREvo-CwUlKK34.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/sqlite/dist/types-C5FSREvo.d.mts"],"mappings":";;;;;;;;KAMK,sBAAsB,gBAAgB;UACjC;WACC;;;;;;WAMA,4BAA4B;;KAElC,iBAAiB,SAAS;WACpB;;KAEN,yBAAyB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/orm-target-sqlite",
3
- "version": "0.17.0-dev.1",
3
+ "version": "0.17.0-dev.10",
4
4
  "license": "Apache-2.0",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -9,18 +9,18 @@
9
9
  "dist"
10
10
  ],
11
11
  "dependencies": {
12
- "@prisma/orm-family-sql": "0.17.0-dev.1",
13
- "@prisma/orm-framework": "0.17.0-dev.1",
14
- "@prisma/orm-toolchain": "0.17.0-dev.1",
12
+ "@prisma/orm-family-sql": "0.17.0-dev.10",
13
+ "@prisma/orm-framework": "0.17.0-dev.10",
14
+ "@prisma/orm-toolchain": "0.17.0-dev.10",
15
15
  "@standard-schema/spec": "1.1.0",
16
16
  "arktype": "^2.2.2"
17
17
  },
18
18
  "devDependencies": {
19
- "@internal/adapter-sqlite": "0.17.0-dev.1",
20
- "@internal/driver-sqlite": "0.17.0-dev.1",
21
- "@internal/target-sqlite": "0.17.0-dev.1",
22
- "@repo/tsconfig": "0.17.0-dev.1",
23
- "@repo/tsdown": "0.17.0-dev.1",
19
+ "@internal/adapter-sqlite": "0.17.0-dev.10",
20
+ "@internal/driver-sqlite": "0.17.0-dev.10",
21
+ "@internal/target-sqlite": "0.17.0-dev.10",
22
+ "@repo/tsconfig": "0.17.0-dev.10",
23
+ "@repo/tsdown": "0.17.0-dev.10",
24
24
  "tsdown": "0.22.14",
25
25
  "typescript": "5.9.3"
26
26
  },
@@ -39,11 +39,13 @@
39
39
  "./adapter/column-types": "./dist/adapter__column-types.mjs",
40
40
  "./adapter/control": "./dist/adapter__control.mjs",
41
41
  "./adapter/runtime": "./dist/adapter__runtime.mjs",
42
+ "./adapter/sql-renderer": "./dist/adapter__sql-renderer.mjs",
42
43
  "./adapter/types": "./dist/adapter__types.mjs",
43
44
  "./driver": "./dist/driver.mjs",
44
45
  "./driver/control": "./dist/driver__control.mjs",
45
46
  "./driver/runtime": "./dist/driver__runtime.mjs",
46
47
  "./target": "./dist/target.mjs",
48
+ "./target/aggregates": "./dist/target__aggregates.mjs",
47
49
  "./target/codec-descriptor": "./dist/target__codec-descriptor.mjs",
48
50
  "./target/codec-ids": "./dist/target__codec-ids.mjs",
49
51
  "./target/codec-types": "./dist/target__codec-types.mjs",
@@ -1 +0,0 @@
1
- {"version":3,"file":"adapter-DizMsGCb-n4h4w8ms.d.mts","names":[],"sources":["../../../../3-targets/6-adapters/sqlite/dist/adapter-DizMsGCb.d.mts"],"mappings":";;;;;;;cAMc,6BAA6B,QAAQ,aAAa,gBAAgB;;WAErE;WACA;WACA,SAAS;EAClB,YAAY,eAAe,qBAAqB;EAChD,MAAM,KAAK,cAAc,eAAe,SAAS,eAAe,kBAAkB;;;cAGtE,uBAAuB;iBACpB,oBAAoB,UAAU,uBAAuB,SAAS;iBAC9D,qCAAqC,eAAe,sBAAsB,SAAS"}
@@ -1,2 +0,0 @@
1
- import "./types-C5FSREvo-Bm6N5Kog.mjs";
2
- import "./adapter-DizMsGCb-n4h4w8ms.mjs";
@@ -1,2 +0,0 @@
1
- import "./codec-descriptor-BcgD9f3L-BjEkn9Ob.mjs";
2
- import "./codec-descriptor-rFuZ9DzY-DO0k8l6N.mjs";
@@ -1 +0,0 @@
1
- import "./codec-descriptor-BcgD9f3L-BjEkn9Ob.mjs";
@@ -1 +0,0 @@
1
- import "./codec-types-wPDlPoD7.mjs";
@@ -1,2 +0,0 @@
1
- import "./codecs-1-oOsTPG-Bv518Lbm.mjs";
2
- import "./codec-types-DKB--ltR-CIuvX0zx.mjs";
@@ -1 +0,0 @@
1
- import "./codecs-1-oOsTPG-Bv518Lbm.mjs";
@@ -1,30 +0,0 @@
1
- import { a as sqliteCodecRegistry } from "./codecs-CM_2W3uA.mjs";
2
- //#region ../../../3-targets/6-adapters/sqlite/dist/descriptor-meta-CbYkqTkO.mjs
3
- const sqliteAdapterDescriptorMeta = {
4
- kind: "adapter",
5
- familyId: "sql",
6
- targetId: "sqlite",
7
- id: "sqlite",
8
- version: "0.0.1",
9
- capabilities: { sql: {
10
- orderBy: true,
11
- limit: true,
12
- lateral: false,
13
- jsonAgg: true,
14
- returning: true,
15
- foreignKeys: true,
16
- enums: false
17
- } },
18
- types: { codecTypes: {
19
- codecDescriptors: Array.from(sqliteCodecRegistry.values()).filter((d) => d.renderOutputType === void 0),
20
- import: {
21
- package: "@internal/adapter-sqlite/codec-types",
22
- named: "CodecTypes",
23
- alias: "SqliteTypes"
24
- }
25
- } }
26
- };
27
- //#endregion
28
- export { sqliteAdapterDescriptorMeta as t };
29
-
30
- //# sourceMappingURL=descriptor-meta-CbYkqTkO-DEJNrICG.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"descriptor-meta-CbYkqTkO-DEJNrICG.mjs","names":[],"sources":["../../../../3-targets/6-adapters/sqlite/dist/descriptor-meta-CbYkqTkO.mjs"],"sourcesContent":["import { sqliteCodecRegistry } from \"@internal/target-sqlite/codecs\";\nconst sqliteAdapterDescriptorMeta = {\n\tkind: \"adapter\",\n\tfamilyId: \"sql\",\n\ttargetId: \"sqlite\",\n\tid: \"sqlite\",\n\tversion: \"0.0.1\",\n\tcapabilities: { sql: {\n\t\torderBy: true,\n\t\tlimit: true,\n\t\tlateral: false,\n\t\tjsonAgg: true,\n\t\treturning: true,\n\t\tforeignKeys: true,\n\t\tenums: false\n\t} },\n\ttypes: { codecTypes: {\n\t\tcodecDescriptors: Array.from(sqliteCodecRegistry.values()).filter((d) => d.renderOutputType === void 0),\n\t\timport: {\n\t\t\tpackage: \"@internal/adapter-sqlite/codec-types\",\n\t\t\tnamed: \"CodecTypes\",\n\t\t\talias: \"SqliteTypes\"\n\t\t}\n\t} }\n};\n//#endregion\nexport { sqliteAdapterDescriptorMeta as t };\n\n//# sourceMappingURL=descriptor-meta-CbYkqTkO.mjs.map"],"mappings":";;AACA,MAAM,8BAA8B;CACnC,MAAM;CACN,UAAU;CACV,UAAU;CACV,IAAI;CACJ,SAAS;CACT,cAAc,EAAE,KAAK;EACpB,SAAS;EACT,OAAO;EACP,SAAS;EACT,SAAS;EACT,WAAW;EACX,aAAa;EACb,OAAO;CACR,EAAE;CACF,OAAO,EAAE,YAAY;EACpB,kBAAkB,MAAM,KAAK,oBAAoB,OAAO,CAAC,CAAC,CAAC,QAAQ,MAAM,EAAE,qBAAqB,KAAK,CAAC;EACtG,QAAQ;GACP,SAAS;GACT,OAAO;GACP,OAAO;EACR;CACD,EAAE;AACH"}
@@ -1 +0,0 @@
1
- import "./types-C5FSREvo-Bm6N5Kog.mjs";