@prisma/orm-target-sqlite 8.0.0-rc.17-dev.37 → 8.0.0-rc.17-dev.39
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.
- package/dist/{adapter-Cfp6xn4m-BtODbERC.mjs → adapter-Cfp6xn4m-CqnRsbnV.mjs} +2 -2
- package/dist/{adapter-Cfp6xn4m-BtODbERC.mjs.map → adapter-Cfp6xn4m-CqnRsbnV.mjs.map} +1 -1
- package/dist/adapter.mjs +2 -2
- package/dist/adapter__adapter.mjs +1 -1
- package/dist/adapter__control.mjs +3 -3
- package/dist/adapter__runtime.mjs +1 -1
- package/dist/adapter__sql-renderer.mjs +1 -1
- package/dist/{control-DJq7MF_s.mjs → control-CVmnzYUI.mjs} +113 -18
- package/dist/control-CVmnzYUI.mjs.map +1 -0
- package/dist/{control-4njwExvT.mjs → control-DKT_rL3s.mjs} +11 -3
- package/dist/control-DKT_rL3s.mjs.map +1 -0
- package/dist/driver.mjs +1 -1
- package/dist/driver__control.mjs +1 -1
- package/dist/{migration-CIKnw9my.mjs → migration-DOkUBr8w.mjs} +2 -2
- package/dist/{migration-CIKnw9my.mjs.map → migration-DOkUBr8w.mjs.map} +1 -1
- package/dist/{migration-BsYgVFeM.d.mts → migration-wH0Hw2VD.d.mts} +3 -3
- package/dist/{migration-BsYgVFeM.d.mts.map → migration-wH0Hw2VD.d.mts.map} +1 -1
- package/dist/{op-factory-call-C-6Lxtlm.d.mts → op-factory-call-DAI1NqNz.d.mts} +16 -10
- package/dist/op-factory-call-DAI1NqNz.d.mts.map +1 -0
- package/dist/{op-factory-call-gwVgzGbc-caCULmpj.mjs → op-factory-call-hxIbAMSY-CinxsQHg.mjs} +234 -25
- package/dist/op-factory-call-hxIbAMSY-CinxsQHg.mjs.map +1 -0
- package/dist/{planner-Ddpm7j-w-BzyQ-raY.mjs → planner-BENMBCnG-CW6-1do-.mjs} +65 -23
- package/dist/planner-BENMBCnG-CW6-1do-.mjs.map +1 -0
- package/dist/planner-produced-sqlite-migration-CB9UDEdR.d.mts +1 -0
- package/dist/{planner-produced-sqlite-migration-D50U99OT--9-v0jj6.d.mts → planner-produced-sqlite-migration-CkHb8T4n-SM_tztzo.d.mts} +3 -3
- package/dist/planner-produced-sqlite-migration-CkHb8T4n-SM_tztzo.d.mts.map +1 -0
- package/dist/{planner-produced-sqlite-migration-Cj_QCROn-0eatEGzt.mjs → planner-produced-sqlite-migration-DjEZTiif-DpC6rk_q.mjs} +4 -4
- package/dist/{planner-produced-sqlite-migration-Cj_QCROn-0eatEGzt.mjs.map → planner-produced-sqlite-migration-DjEZTiif-DpC6rk_q.mjs.map} +1 -1
- package/dist/{planner-DRDXnFF-.d.mts → planner-tv5z1cn8.d.mts} +5 -4
- package/dist/planner-tv5z1cn8.d.mts.map +1 -0
- package/dist/{render-ops-CBkWzmKj-6vfxyU3K.mjs → render-ops-B889CY71-JvEeW9B4.mjs} +3 -3
- package/dist/{render-ops-CBkWzmKj-6vfxyU3K.mjs.map → render-ops-B889CY71-JvEeW9B4.mjs.map} +1 -1
- package/dist/{sql-utils-C2O4zVkP-Dz3Hb85I.mjs → sql-utils-XGT5Esi2-5k9pvJeF.mjs} +30 -3
- package/dist/sql-utils-XGT5Esi2-5k9pvJeF.mjs.map +1 -0
- package/dist/{sqlite-contract-view-BrXalcTm-DYDH4LQC.mjs → sqlite-contract-view-TELBWEt4-CVsdZnpX.mjs} +3 -3
- package/dist/{sqlite-contract-view-BrXalcTm-DYDH4LQC.mjs.map → sqlite-contract-view-TELBWEt4-CVsdZnpX.mjs.map} +1 -1
- package/dist/{sqlite-migration-omhBdJEh-CizoFjMg.d.mts → sqlite-migration-BqbQmUY1-CTmurARU.d.mts} +9 -3
- package/dist/{sqlite-migration-omhBdJEh-CizoFjMg.d.mts.map → sqlite-migration-BqbQmUY1-CTmurARU.d.mts.map} +1 -1
- package/dist/{sqlite-migration-D7DWt0JL-D_5jFkOx.mjs → sqlite-migration-CTNkjYJ1-eRdmsbpK.mjs} +235 -66
- package/dist/sqlite-migration-CTNkjYJ1-eRdmsbpK.mjs.map +1 -0
- package/dist/{tables-CvLOKCiJ-DYQkJ90L.d.mts → tables-DD_EmImp-B8ZaVBMr.d.mts} +16 -7
- package/dist/tables-DD_EmImp-B8ZaVBMr.d.mts.map +1 -0
- package/dist/target.d.mts +6 -6
- package/dist/target.mjs +9 -9
- package/dist/target__control.mjs +2 -2
- package/dist/target__migration.d.mts +2 -2
- package/dist/target__migration.mjs +2 -2
- package/dist/target__op-factory-call.d.mts +1 -1
- package/dist/target__op-factory-call.mjs +1 -1
- package/dist/target__planner-produced-sqlite-migration.d.mts +2 -2
- package/dist/target__planner-produced-sqlite-migration.mjs +1 -1
- package/dist/target__planner.d.mts +1 -1
- package/dist/target__planner.mjs +1 -1
- package/dist/target__render-ops.mjs +1 -1
- package/dist/target__runtime.mjs +1 -1
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/target__sql-utils.mjs +1 -1
- package/package.json +9 -9
- package/dist/control-4njwExvT.mjs.map +0 -1
- package/dist/control-DJq7MF_s.mjs.map +0 -1
- package/dist/op-factory-call-C-6Lxtlm.d.mts.map +0 -1
- package/dist/op-factory-call-gwVgzGbc-caCULmpj.mjs.map +0 -1
- package/dist/planner-DRDXnFF-.d.mts.map +0 -1
- package/dist/planner-Ddpm7j-w-BzyQ-raY.mjs.map +0 -1
- package/dist/planner-produced-sqlite-migration-CWUahMOX.d.mts +0 -1
- package/dist/planner-produced-sqlite-migration-D50U99OT--9-v0jj6.d.mts.map +0 -1
- package/dist/sql-utils-C2O4zVkP-Dz3Hb85I.mjs.map +0 -1
- package/dist/sqlite-migration-D7DWt0JL-D_5jFkOx.mjs.map +0 -1
- package/dist/tables-CvLOKCiJ-DYQkJ90L.d.mts.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sqlite-migration-CTNkjYJ1-eRdmsbpK.mjs","names":["#current","#endView","#startView","#renames"],"sources":["../../../../3-targets/3-targets/sqlite/dist/sqlite-migration-CTNkjYJ1.mjs"],"sourcesContent":["import { a as SQLITE_INTEGER_CODEC_ID, c as SQLITE_TEXT_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, o as SQLITE_JSON_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID } from \"./codec-ids-KMliSCRp.mjs\";\nimport { c as sqliteText, i as sqliteCharacterVarying, n as sqliteCharacter, o as sqliteInteger, s as sqliteReal, t as sqliteBlob } from \"./data-types-pFQMl37_.mjs\";\nimport { n as sqliteError, t as errorSqliteMigrationStackMissing } from \"./errors-DnR-sMHS.mjs\";\nimport { r as encodeSqliteDatetime } from \"./codecs-BctEWIFt.mjs\";\nimport { n as SQLITE_NOW_EXPRESSION } from \"./datetime-text-Bniwehv-.mjs\";\nimport { n as sqliteResolveDefault } from \"./default-normalizer-Ch3VFnEH.mjs\";\nimport { n as escapeLiteral } from \"./sql-utils-XGT5Esi2.mjs\";\nimport { C as buildColumnTypeSql, S as sqliteIdentifiersCollide, a as DropColumnCall, b as sqliteDefaultToDdlColumnDefault, d as RenameTableCall, f as indexReplacementCalls, g as buildRecreateSummary, h as buildRecreatePostchecks, i as DataTransformCall, l as RecreateTableCall, n as CreateIndexCall, o as DropIndexCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RenameColumnCall, w as renderDefaultLiteral, y as renameTableSteps } from \"./op-factory-call-hxIbAMSY.mjs\";\nimport { t as CONTROL_TABLE_NAMES } from \"./control-tables-D_o8dKRB.mjs\";\nimport { t as SqliteContractView } from \"./sqlite-contract-view-TELBWEt4.mjs\";\nimport { DdlColumn, ForeignKeyConstraint, PrimaryKeyConstraint, UniqueConstraint } from \"@internal/sql-relational-core/ast\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { sqlDataTypeOfCodec } from \"@internal/sql-contract/data-type\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { diffSchemas, issueOutcome, orderIssuesByDependencies } from \"@internal/framework-components/control\";\nimport { contractToSchemaIR, extractCodecControlHooks, resolveColumnRenameAgainst, resolveTableRenameAgainst, sqlTypeLookupsOf, unmatchedColumnRename, unmatchedTableRename } from \"@internal/family-sql/control\";\nimport { PrimaryKey, RelationalSchemaNodeKind, SqlCheckConstraintIR, SqlColumnIR, SqlForeignKeyIR, SqlIndexIR, SqlSchemaIR, SqlTableIR, SqlUniqueIR, contractDefaultRefusal, relationalNodeGranularity } from \"@internal/sql-schema-ir/types\";\nimport { UNBOUND_NAMESPACE_ID, entityAt } from \"@internal/framework-components/ir\";\nimport { verifySqlSchemaByDiff } from \"@internal/family-sql/diff\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { namingOf, namingOfLiveName, parseWireName } from \"@internal/sql-schema-ir/naming\";\nimport { isArrayEqual } from \"@internal/utils/array-equal\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { sqlTextOf } from \"@internal/sql-relational-core/contract-free\";\nimport { Migration } from \"@internal/family-sql/migration\";\nimport { MigrationContractViews } from \"@internal/migration-tools/migration\";\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 SQLITE_NOW_EXPRESSION;\n\t\treturn def.expression;\n\t}\n\treturn renderDefaultLiteral(def.value, column);\n}\n/**\n* The SQLite expected-side projection: contract → flat relational schema IR.\n*\n* Each column's type is written from the data type its codec represents.\n* 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, types) {\n\treturn contractToSchemaIR(contract, {\n\t\tannotationNamespace: \"sqlite\",\n\t\trenderDefault: sqliteRenderDefault,\n\t\tresolveDefault: sqliteResolveDefault,\n\t\tdataTypeLookup: types.dataTypeLookup,\n\t\tcodecLookup: types.codecLookup\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 (parameterized types written\n* with their parameters; 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 types = sqlTypeLookupsOf(input.frameworkComponents);\n\tconst expected = sqliteContractToSchema(input.contract, types);\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 (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 types = sqlTypeLookupsOf(input.frameworkComponents);\n\tconst expected = sqliteContractToSchema(input.contract, types);\n\tconst actual = sqliteActualSchema(input.actualSchema);\n\treturn {\n\t\texpected,\n\t\tactual,\n\t\tissues: diffSchemas(expected, actual)\n\t};\n}\n/** The schema a plan starts from as a `SqlSchemaIR`, its table and column names taken from their keys. */\nfunction sqliteActualSchema(actualSchema) {\n\treturn new SqlSchemaIR(withRecordKeyNames(actualSchema));\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* expects, from a column node's own stamped codec\n* identity (`codecRef` / `codecBaseNativeType`, Decision 5) — never the\n* contract. `typeRef` is deliberately left unset here: setting it would send\n* `buildColumnTypeSql` back through a live `storageTypes` lookup the node's\n* fields have already resolved past, which throws for an unrecognized\n* reference.\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\tcodecId: column.codecRef.codecId,\n\t\tnullable: column.nullable,\n\t\tmany: column.many ?? column.codecRef.many ? { elementNullable: false } : false,\n\t\t...column.codecRef.typeParams !== void 0 ? { typeParams: blindCast(column.codecRef.typeParams) } : {},\n\t\t...ifDefined(\"default\", plannableDefault(column))\n\t};\n}\n/**\n* The default DDL writes. A contract default the canonical form of the column's values refuses,\n* which a contract emitted by an earlier version can hold, is refused rather than written.\n*/\nfunction plannableDefault(column) {\n\tconst columnDefault = column.authoredDefault ?? column.resolvedDefault;\n\tconst refusal = contractDefaultRefusal(columnDefault, column.toCanonicalForm, (column.many ?? column.codecRef?.many) === true);\n\tif (refusal !== void 0) throw sqliteError(\"CONTRACT.DEFAULT_INVALID\", `Column \"${column.name}\": ${refusal}`, { meta: {\n\t\treason: \"default-not-canonical\",\n\t\tcolumn: column.name\n\t} });\n\treturn columnDefault;\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, types) {\n\tconst like = columnLike(column);\n\tconst typeSql = buildColumnTypeSql(like, types);\n\treturn {\n\t\tname: column.name,\n\t\ttypeSql,\n\t\t...inline ? {} : {\n\t\t\t...ifDefined(\"default\", like.default),\n\t\t\t...ifDefined(\"codecRef\", column.codecRef)\n\t\t},\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, types) {\n\tconst like = columnLike(column);\n\tconst typeSql = buildColumnTypeSql(like, types);\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*\n* A check constraint on the table node throws rather than being dropped.\n* `@@check` is refused earlier, by the `sql.checkConstraint` capability gate in\n* PSL interpretation. The TS `check()` builder is not gated there — capabilities\n* are adapter-reported and reach the contract only after it is built — so a\n* `check()` declared against SQLite arrives here, and this is where it is\n* refused. It is the primary enforcement point for that surface, and the safety\n* net for a contract that reached storage some other way.\n*/\nfunction tableConstraintsFromNode(table, hasInlinePk) {\n\tconst constraints = [];\n\tif (table.primaryKey && !hasInlinePk) constraints.push(new PrimaryKeyConstraint({ columns: table.primaryKey.columns }));\n\tfor (const check of table.checks ?? []) throw sqliteError(\"CONTRACT.CONSTRAINT_INVALID\", `The SQLite target does not support CHECK constraints (constraint \"${check.name}\" on table \"${table.name}\"). The \"checkConstraint\" capability is Postgres-only — remove the \"@@check\" / \"check()\" declaration, or target Postgres.`, { meta: {\n\t\tconstraintName: check.name,\n\t\ttableName: table.name\n\t} });\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-fill-values.ts\n/** Values for the codecs that store text their reader parses, so `''` would not read back. */\nconst CODEC_FILL_VALUES = /* @__PURE__ */ new Map([[SQLITE_DATETIME_CODEC_ID, `'${escapeLiteral(encodeSqliteDatetime(/* @__PURE__ */ new Date(0)))}'`], [SQLITE_JSON_CODEC_ID, `'{}'`]]);\nconst DATA_TYPE_FILL_VALUES = /* @__PURE__ */ new Map([\n\t[sqliteInteger.id, \"0\"],\n\t[sqliteReal.id, \"0\"],\n\t[sqliteText.id, \"''\"],\n\t[sqliteCharacter.id, \"''\"],\n\t[sqliteCharacterVarying.id, \"''\"],\n\t[sqliteBlob.id, \"X''\"]\n]);\nfunction isParamRecord(value) {\n\treturn value !== null && typeof value === \"object\" && !Array.isArray(value);\n}\n/**\n* The SQL value a new required column takes in the rows a table already has, or `undefined` when\n* its type has none: the column's codec hook first, as on Postgres, then a value the codec reads\n* back, then a value of the data type it stores.\n*/\nfunction sqliteFillValue(column, codecHooks, types) {\n\tconst codecRef = column.codecRef;\n\tif (codecRef === void 0 || column.many === true) return void 0;\n\tconst dataType = sqlDataTypeOfCodec(codecRef.codecId, types).id;\n\tconst fromHook = codecHooks.get(codecRef.codecId)?.resolveIdentityValue?.({\n\t\tdataType,\n\t\tcodecId: codecRef.codecId,\n\t\t...isParamRecord(codecRef.typeParams) ? { typeParams: codecRef.typeParams } : {}\n\t});\n\tif (fromHook !== void 0) return fromHook ?? void 0;\n\treturn CODEC_FILL_VALUES.get(codecRef.codecId) ?? DATA_TYPE_FILL_VALUES.get(dataType);\n}\n//#endregion\n//#region src/core/migrations/planner-strategies.ts\n/**\n* SQLite migration strategies.\n*\n* Each strategy examines the node-typed issue list, consumes issues it\n* handles, and returns the `SqliteOpFactoryCall[]` to address them. The issue\n* planner runs each strategy in order and routes whatever's left through\n* `mapNodeIssueToCall`.\n*\n* SQLite has no enums and no component-declared database dependencies. The\n* recipe that needs strategy-level multi-issue consumption is `recreateTable`,\n* which absorbs type/nullability/default/constraint mismatches, and required\n* columns added to existing tables, for a given table into one rebuild.\n*/\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 (type and nullability compared\n* together by `SqlColumnIR.isEqualTo`): a type change is destructive, because\n* the copy can change values; a nullability change alone is widening, because\n* a tightening copy fails on a NULL rather than losing it.\n*/\n/** The column of a column issue, which `classifyNodeIssue` classes destructive only for a type change. */\nfunction columnNameOf(issue) {\n\treturn blindCast(issue.expected).name;\n}\n/**\n* The changes of codec a table rebuild's copy makes without losing a value: the column's type\n* affinity stores each old value as the same value of the new type. An integer becomes its decimal\n* text; a real is not listed, since SQLite writes it as text with fifteen significant digits. Keyed\n* by codec, not data type, because `Int` and `BigInt` differ only in their codec.\n*/\nconst LOSSLESS_COPIES = /* @__PURE__ */ new Set([\n\t`${SQLITE_INTEGER_CODEC_ID}→${SQLITE_TEXT_CODEC_ID}`,\n\t`${SQLITE_BIGINT_CODEC_ID}→${SQLITE_TEXT_CODEC_ID}`,\n\t`${SQLITE_INTEGER_CODEC_ID}→${SQLITE_BIGINT_CODEC_ID}`\n]);\nfunction copyKeepsEveryValue(fromCodec, to) {\n\tconst toCodec = to.codecRef?.codecId;\n\treturn fromCodec !== void 0 && toCodec !== void 0 && LOSSLESS_COPIES.has(`${fromCodec}→${toCodec}`);\n}\nfunction classifyNodeIssue(issue, ctx) {\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\tconst actual = blindCast(issue.actual);\n\t\t\tconst fromCodec = ctx.originCodecId(String(issue.path[1]), actual.name);\n\t\t\treturn columnTypeChanged(expected, actual) && !copyKeepsEveryValue(fromCodec, expected) ? \"destructive\" : \"widening\";\n\t\t}\n\t\tcase RelationalSchemaNodeKind.columnDefault:\n\t\tcase RelationalSchemaNodeKind.primaryKey:\n\t\tcase RelationalSchemaNodeKind.foreignKey:\n\t\tcase RelationalSchemaNodeKind.unique: return \"widening\";\n\t\tdefault: return null;\n\t}\n}\nfunction columnNode(node) {\n\treturn blindCast(node);\n}\nfunction isColumnIssue(issue) {\n\tconst node = issue.expected ?? issue.actual;\n\treturn node !== void 0 && blindCast(node).nodeKind === RelationalSchemaNodeKind.column;\n}\n/** The column a `--convert` or `--backfill` statement of `kind` names, if one names it. */\nfunction statementColumn(ctx, kind, tableName, columnName) {\n\tif (!ctx.policy.allowedOperationClasses.includes(\"data\")) return void 0;\n\treturn ctx.statementColumns[kind].find((column) => column.table === tableName && column.column === columnName);\n}\n/**\n* A required column with no default that the plan adds to a table the database already has, so\n* existing rows need a value for it.\n*/\nfunction addedRequiredColumn(issue, ctx) {\n\tif (issueOutcome(issue) !== \"not-found\" || !isColumnIssue(issue)) return void 0;\n\tconst tableName = issue.path[1];\n\tif (tableName === void 0 || ctx.actual.tables[tableName] === void 0) return void 0;\n\tconst column = columnNode(issue.expected);\n\treturn column.nullable || column.resolvedDefault !== void 0 ? void 0 : column;\n}\nconst CLASS_ORDER = [\n\t\"additive\",\n\t\"widening\",\n\t\"data\",\n\t\"destructive\"\n];\nfunction highestClass(classes) {\n\treturn classes.reduce((highest, next) => CLASS_ORDER.indexOf(next) > CLASS_ORDER.indexOf(highest) ? next : highest, \"additive\");\n}\n/**\n* Groups recreate-eligible issues by table and emits one `RecreateTableCall` per table, removing\n* the issues it consumed so `mapNodeIssueToCall` does not handle them again.\n*\n* - A type change is `destructive`, since the copy can change values, unless a `--convert`\n* statement names the column: the copy then goes through a slot the user fills, and the rebuild\n* is `data`. Either way the rebuild checks after its copy that every value took the new type.\n* - A nullability or constraint change alone is `widening`: a tightening copy fails on a NULL\n* rather than losing it.\n* - A required column with no default added to an existing table is copied from a temporary value\n* (`additive`). A column in a key or foreign key, whose values come from a value set, or whose\n* type has no such value is carried with nothing to copy from: the rebuild succeeds on an empty\n* table and fails on `NOT NULL` when the table has rows. A column a `--backfill` statement names\n* was added nullable and filled by earlier calls, so the rebuild copies it like a live column.\n* - A rebuild that leaves a live column out loses its values, so it is `destructive`.\n*\n* The table shapes come from `ctx.expected` and `ctx.actual`, keyed by table name: SQLite is a\n* flat, single-namespace target, and one issue only carries its own node.\n*/\nconst recreateTableStrategy = (issues, ctx) => {\n\tconst byTable = /* @__PURE__ */ new Map();\n\tconst consumed = /* @__PURE__ */ new Set();\n\tconst codecHooks = extractCodecControlHooks(ctx.frameworkComponents);\n\tconst rebuildOf = (tableName) => {\n\t\tconst existing = byTable.get(tableName);\n\t\tif (existing !== void 0) return existing;\n\t\tconst created = {\n\t\t\tissues: [],\n\t\t\tclasses: [],\n\t\t\tretypedColumns: [],\n\t\t\tcopyExpressions: {},\n\t\t\ttemporaryValues: {},\n\t\t\taddedColumns: []\n\t\t};\n\t\tbyTable.set(tableName, created);\n\t\treturn created;\n\t};\n\tfor (const issue of issues) {\n\t\tconst tableName = issue.path[1];\n\t\tif (tableName === void 0) continue;\n\t\tconst added = addedRequiredColumn(issue, ctx);\n\t\tif (added !== void 0) {\n\t\t\tconst expectedTable = ctx.expected.tables[tableName];\n\t\t\tif (statementColumn(ctx, \"backfill\", tableName, added.name) !== void 0) {\n\t\t\t\tconst rebuild = rebuildOf(tableName);\n\t\t\t\trebuild.issues.push(issue);\n\t\t\t\trebuild.addedColumns.push(added.name);\n\t\t\t\trebuild.classes.push(\"widening\");\n\t\t\t\tconsumed.add(issue);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst fill = expectedTable === void 0 || !ctx.takesTemporaryValue(tableName, added.name) ? void 0 : sqliteFillValue(added, codecHooks, ctx.types);\n\t\t\tconst rebuild = rebuildOf(tableName);\n\t\t\trebuild.issues.push(issue);\n\t\t\tif (fill !== void 0) rebuild.temporaryValues[added.name] = {\n\t\t\t\tkind: \"sql\",\n\t\t\t\tsql: fill\n\t\t\t};\n\t\t\trebuild.classes.push(\"additive\");\n\t\t\tconsumed.add(issue);\n\t\t\tcontinue;\n\t\t}\n\t\tconst cls = classifyNodeIssue(issue, ctx);\n\t\tif (!cls) continue;\n\t\tconst rebuild = rebuildOf(tableName);\n\t\trebuild.issues.push(issue);\n\t\tconsumed.add(issue);\n\t\tif (cls === \"widening\") {\n\t\t\trebuild.classes.push(\"widening\");\n\t\t\tcontinue;\n\t\t}\n\t\tconst column = columnNameOf(issue);\n\t\tconst converted = statementColumn(ctx, \"convert\", tableName, column);\n\t\trebuild.retypedColumns.push(column);\n\t\tif (converted === void 0) {\n\t\t\trebuild.classes.push(\"destructive\");\n\t\t\tcontinue;\n\t\t}\n\t\trebuild.copyExpressions[column] = {\n\t\t\tkind: \"placeholder\",\n\t\t\tslot: `${converted.text}:convert`\n\t\t};\n\t\trebuild.classes.push(\"data\");\n\t}\n\tif (byTable.size === 0) return { kind: \"no_match\" };\n\tconst calls = [];\n\tfor (const [tableName, rebuild] 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 leavesColumnsOut = Object.keys(actualTable.columns).some((column) => !Object.hasOwn(expectedTable.columns, column));\n\t\tconst operationClass = highestClass([...rebuild.classes, ...leavesColumnsOut ? [\"destructive\"] : []]);\n\t\tconst tableSpec = tableSpecFromNode(expectedTable, ctx.types);\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), ...rebuild.addedColumns],\n\t\t\tindexes,\n\t\t\tsummary: buildRecreateSummary(tableName, rebuild.issues),\n\t\t\tpostchecks: [...buildRecreatePostchecks(tableName, rebuild.issues, tableSpec, /* @__PURE__ */ new Set([...Object.keys(rebuild.copyExpressions), ...Object.keys(rebuild.temporaryValues)]), new Set(tableSpec.columns.filter(({ name }) => statementColumn(ctx, \"backfill\", tableName, name) !== void 0).map(({ name }) => name)))],\n\t\t\toperationClass,\n\t\t\tcopyExpressions: rebuild.copyExpressions,\n\t\t\ttemporaryValues: rebuild.temporaryValues,\n\t\t\tretypedColumns: rebuild.retypedColumns\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* Writes the calls that come before the rebuild of a column a `--backfill` statement names: for a\n* required column added to an existing table, the nullable add and a data transform whose slot the\n* user fills; for a column made required, the data transform. The rebuild that makes the column\n* NOT NULL comes from `recreateTableStrategy`, so this strategy consumes no issue. Without the\n* statement, a tightening rebuild fails on a NULL rather than guessing a value for it.\n*/\nconst nullabilityTighteningBackfillStrategy = (issues, ctx) => {\n\tconst calls = [];\n\tfor (const issue of issues) {\n\t\tconst tableName = issue.path[1];\n\t\tif (tableName === void 0 || !isColumnIssue(issue)) continue;\n\t\tconst added = addedRequiredColumn(issue, ctx);\n\t\tconst tightened = issueOutcome(issue) === \"not-equal\" && !columnNode(issue.expected).nullable && columnNode(issue.actual).nullable ? columnNode(issue.expected) : void 0;\n\t\tconst column = added ?? tightened;\n\t\tif (column === void 0) continue;\n\t\tconst named = statementColumn(ctx, \"backfill\", tableName, column.name);\n\t\tif (named === void 0) continue;\n\t\tif (added !== void 0) calls.push(new AddColumnCall(tableName, {\n\t\t\t...columnSpecFromNode(added, false, ctx.types),\n\t\t\tnullable: true\n\t\t}));\n\t\tcalls.push(new DataTransformCall(`data_migration.backfill-${tableName}-${column.name}`, `Backfill NULLs in \"${tableName}\".\"${column.name}\" before NOT NULL tightening`, tableName, column.name, `${named.text}:run`));\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, types) {\n\tconst columns = Object.values(table.columns).map((c) => columnSpecFromNode(c, isInlineAutoincrementPrimaryKeyNode(table, c), types));\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, types) {\n\tconst columns = Object.values(table.columns).map((c) => ddlColumnFromNode(c, isInlineAutoincrementPrimaryKeyNode(table, c), types));\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, types) {\n\tif (issueOutcome(issue) === \"not-found\") return ok(buildCreateTableCalls(blindCast(issue.expected), types));\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), ctx.types))]);\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, ctx.types);\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\", `The SQLite target 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\ttypes: sqlTypeLookupsOf(frameworkComponents),\n\t\tstatementColumns: options.statementColumns ?? {\n\t\t\tconvert: [],\n\t\t\tbackfill: []\n\t\t},\n\t\ttakesTemporaryValue: options.takesTemporaryValue ?? (() => true),\n\t\toriginCodecId: options.originCodecId ?? (() => void 0)\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 rebuiltIndexes = new Set(gatedRecipe.flatMap((call) => call instanceof RecreateTableCall ? call.indexes.map((index) => indexKey(call.tableName, index.name)) : []));\n\tconst bucketed = [...gatedDefault, ...gatedBucketable];\n\tconst addedBeforeIndexes = new Set(bucketed.flatMap((call) => call instanceof AddColumnCall ? [indexKey(call.tableName, call.columnName)] : []));\n\tconst indexesANewColumn = (call) => {\n\t\tconst live = context.actual.tables[call.tableName];\n\t\treturn live !== void 0 && call.columns.some((column) => live.columns[column] === void 0 && !addedBeforeIndexes.has(indexKey(call.tableName, column)));\n\t};\n\tconst combined = bucketed.filter((call) => !(call instanceof CreateIndexCall) || !indexesANewColumn(call) || !rebuiltIndexes.has(indexKey(call.tableName, call.indexName)));\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 indexKey(tableName, indexName) {\n\treturn JSON.stringify([tableName, indexName]);\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\trefusedOperationClass: call.operationClass,\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/index-replacements.ts\nfunction indexFindings(issues, outcome) {\n\treturn issues.flatMap((issue) => {\n\t\tconst node = issueNode(issue);\n\t\tconst tableName = issue.path[1];\n\t\tif (node === void 0 || !SqlIndexIR.is(node) || tableName === void 0) return [];\n\t\treturn issueOutcome(issue) === outcome ? [{\n\t\t\tissue,\n\t\t\tindex: node,\n\t\t\ttableName\n\t\t}] : [];\n\t});\n}\n/**\n* An index on a renamed table whose wire name derives from the table name: the old and the new index share their content hash and differ in name.\n*/\nfunction renamedTableIndex(renamedTables) {\n\treturn (old, replacement) => {\n\t\tconst oldWire = parseWireName(old.index.name);\n\t\tconst replacementWire = parseWireName(replacement.index.name);\n\t\treturn renamedTables.has(old.tableName) && old.tableName === replacement.tableName && oldWire !== void 0 && oldWire.hash === replacementWire?.hash && old.index.name !== replacement.index.name;\n\t};\n}\n/**\n* An index on the renamed column whose wire name derives from the column name: after the rename\n* the old and the new index cover the same columns on the same table and differ in name.\n*/\nfunction renamedColumnIndex(table, column) {\n\treturn (old, replacement) => old.tableName === table && replacement.tableName === table && old.index.name !== replacement.index.name && old.index.expression === void 0 && old.index.where === void 0 && (old.index.columns ?? []).includes(column) && old.index.unique === replacement.index.unique && isArrayEqual(old.index.columns ?? [], replacement.index.columns ?? []);\n}\n/**\n* An index on the same table whose new name SQLite takes for the old one, as after a table renamed by hand. Its content is not compared: the old index must be dropped before the new one can be created whatever either defines, and the new one is created from its own definition.\n*/\nconst indexNameCaseChange = (old, replacement) => old.tableName === replacement.tableName && old.index.name !== replacement.index.name && sqliteIdentifiersCollide(old.index.name, replacement.index.name);\n/**\n* Pairs each index the plan drops with the index that replaces it, and plans every paired drop before every paired create. SQLite cannot rename an index, and it compares index names without regard to the case of ASCII letters, so a replacement whose name differs from the old one only in that case would otherwise collide with it. The paired issues are returned as consumed so the ordinary diff does not plan them again.\n*/\nfunction pairIndexReplacements(issues, matches) {\n\tconst missing = indexFindings(issues, \"not-found\");\n\tconst pairs = indexFindings(issues, \"not-expected\").flatMap((old) => {\n\t\tconst replacement = missing.find((candidate) => matches(old, candidate));\n\t\tif (replacement === void 0) return [];\n\t\tmissing.splice(missing.indexOf(replacement), 1);\n\t\treturn [{\n\t\t\told,\n\t\t\treplacement\n\t\t}];\n\t});\n\tconst replacements = pairs.map(({ old, replacement }) => ({\n\t\tdrop: new DropIndexCall(old.tableName, old.index.name),\n\t\tcreate: new CreateIndexCall(replacement.tableName, replacement.index.name, replacement.index.columns ?? [])\n\t}));\n\treturn {\n\t\treplacements,\n\t\tcalls: indexReplacementCalls(replacements),\n\t\tconsumed: new Set(pairs.flatMap(({ old, replacement }) => [old.issue, replacement.issue]))\n\t};\n}\n//#endregion\n//#region src/core/migrations/schema-tables.ts\n/**\n* The tables of a SQLite schema. SQLite has one namespace, so the namespace id is ignored, and it\n* compares table and column names without regard to the case of ASCII letters.\n*/\nfunction sqliteSchemaTables(schema) {\n\tconst hasTable = (_namespaceId, table) => Object.hasOwn(schema.tables, table);\n\treturn {\n\t\thasTable,\n\t\thasColumn: (_namespaceId, table, column) => Object.hasOwn(schema.tables[table]?.columns ?? {}, column),\n\t\ttablesNamed: (_namespaceId, table) => Object.keys(schema.tables).filter((existing) => sqliteIdentifiersCollide(existing, table)),\n\t\tcolumnsNamed: (_namespaceId, table, column) => Object.keys(schema.tables[table]?.columns ?? {}).filter((existing) => sqliteIdentifiersCollide(existing, column)),\n\t\tnamespacesWithTable: (table) => hasTable(UNBOUND_NAMESPACE_ID, table) ? [UNBOUND_NAMESPACE_ID] : []\n\t};\n}\n//#endregion\n//#region src/core/migrations/working-schema.ts\nfunction rewriteRefs(refs, rewrite) {\n\treturn refs?.map(rewrite);\n}\n/**\n* Rewrites the step of `kind` and `id` in a ref that runs through the given table, and the table\n* step itself when `kind` is the table kind.\n*/\nfunction stepRewrite(tableName, kind, fromId, toId) {\n\treturn (ref) => {\n\t\tconst tableStep = ref[1];\n\t\tif (tableStep?.nodeKind !== RelationalSchemaNodeKind.table || tableStep.id !== tableName) return ref;\n\t\treturn ref.map((step, index) => index >= 1 && step.nodeKind === kind && step.id === fromId ? {\n\t\t\tnodeKind: kind,\n\t\t\tid: toId\n\t\t} : step);\n\t};\n}\nfunction withColumnName(column, name) {\n\treturn new SqlColumnIR({\n\t\tname,\n\t\tnativeType: column.nativeType,\n\t\tnullable: column.nullable,\n\t\t...ifDefined(\"default\", column.default),\n\t\t...ifDefined(\"annotations\", column.annotations),\n\t\t...ifDefined(\"many\", column.many),\n\t\t...ifDefined(\"resolvedNativeType\", column.resolvedNativeType),\n\t\t...ifDefined(\"resolvedDefault\", column.resolvedDefault),\n\t\t...ifDefined(\"authoredDefault\", column.authoredDefault),\n\t\t...ifDefined(\"codecRef\", column.codecRef),\n\t\t...ifDefined(\"codecBaseNativeType\", column.codecBaseNativeType),\n\t\t...ifDefined(\"dataType\", column.dataType),\n\t\t...ifDefined(\"toCanonicalForm\", column.toCanonicalForm)\n\t});\n}\n/**\n* An index whose definition carries SQL text, an expression or a predicate, keeps its columns as\n* they are: a column named inside the text cannot be renamed here, so the diff plans the index.\n*/\nfunction withIndex(index, name, rewrite, columnName) {\n\tconst columnsFollow = index.expression === void 0 && index.where === void 0;\n\tconst base = {\n\t\tnaming: name === index.name ? namingOf(index.name, index.prefix) : namingOfLiveName(name),\n\t\twhere: index.where,\n\t\tunique: index.unique,\n\t\tpartial: index.partial,\n\t\ttype: index.type,\n\t\toptions: index.options,\n\t\tannotations: index.annotations,\n\t\tdependsOn: rewriteRefs(index.dependsOn, rewrite)\n\t};\n\treturn new SqlIndexIR(index.expression !== void 0 ? {\n\t\t...base,\n\t\texpression: index.expression\n\t} : {\n\t\t...base,\n\t\tcolumns: (index.columns ?? []).map(columnsFollow ? columnName : (c) => c)\n\t});\n}\nfunction rebuildTable(table, edit, rewrite) {\n\tconst { primaryKey } = table;\n\tconst { columnName } = edit;\n\treturn new SqlTableIR({\n\t\tname: edit.name,\n\t\tcolumns: Object.fromEntries(Object.values(table.columns).map((column) => {\n\t\t\tconst name = columnName(column.name);\n\t\t\treturn [name, name === column.name ? column : withColumnName(column, name)];\n\t\t})),\n\t\t...ifDefined(\"primaryKey\", primaryKey === void 0 ? void 0 : new PrimaryKey({\n\t\t\tcolumns: primaryKey.columns.map(columnName),\n\t\t\t...ifDefined(\"name\", primaryKey.name),\n\t\t\t...ifDefined(\"dependsOn\", rewriteRefs(primaryKey.dependsOn, rewrite))\n\t\t})),\n\t\tuniques: table.uniques.map((unique) => new SqlUniqueIR({\n\t\t\tcolumns: unique.columns.map(columnName),\n\t\t\t...ifDefined(\"name\", unique.name),\n\t\t\t...ifDefined(\"annotations\", unique.annotations),\n\t\t\t...ifDefined(\"dependsOn\", rewriteRefs(unique.dependsOn, rewrite))\n\t\t})),\n\t\tforeignKeys: table.foreignKeys.map((fk) => new SqlForeignKeyIR({\n\t\t\tcolumns: fk.columns.map(columnName),\n\t\t\treferencedTable: edit.referencedTable(fk),\n\t\t\treferencedColumns: edit.referencedColumns(fk),\n\t\t\t...ifDefined(\"referencedSchema\", fk.referencedSchema),\n\t\t\t...ifDefined(\"name\", fk.name),\n\t\t\t...ifDefined(\"onDelete\", fk.onDelete),\n\t\t\t...ifDefined(\"onUpdate\", fk.onUpdate),\n\t\t\t...ifDefined(\"annotations\", fk.annotations),\n\t\t\t...ifDefined(\"resolvedReferencedNamespace\", fk.resolvedReferencedNamespace),\n\t\t\t...ifDefined(\"dependsOn\", rewriteRefs(fk.dependsOn, rewrite))\n\t\t})),\n\t\tindexes: table.indexes.map((index) => withIndex(index, edit.indexName(index), rewrite, columnName)),\n\t\t...ifDefined(\"checks\", table.checks?.map((check) => new SqlCheckConstraintIR({\n\t\t\tnaming: namingOf(check.name, check.prefix),\n\t\t\texpression: check.expression,\n\t\t\tdependsOn: rewriteRefs(check.dependsOn, rewrite)\n\t\t}))),\n\t\t...ifDefined(\"annotations\", table.annotations)\n\t});\n}\n/** Rebuilds every table: `editFor` returns the edit for a table, or `undefined` to keep it. */\nfunction mapTables(schema, rewrite, editFor) {\n\treturn new SqlSchemaIR({\n\t\ttables: Object.fromEntries(Object.values(schema.tables).map((table) => {\n\t\t\tconst rebuilt = rebuildTable(table, {\n\t\t\t\tname: table.name,\n\t\t\t\tcolumnName: (column) => column,\n\t\t\t\treferencedTable: (fk) => fk.referencedTable,\n\t\t\t\treferencedColumns: (fk) => fk.referencedColumns,\n\t\t\t\tindexName: (index) => index.name,\n\t\t\t\t...editFor(table)\n\t\t\t}, rewrite);\n\t\t\treturn [rebuilt.name, rebuilt];\n\t\t})),\n\t\t...ifDefined(\"annotations\", schema.annotations)\n\t});\n}\n/**\n* The schema with one table under its new name. Foreign keys anywhere that reference the table\n* follow it, and every dependency that names it moves with it. Object names do not change. An\n* unnamed primary key, unique constraint or foreign key stays unnamed: SQLite gives such a\n* constraint no name, so an introspected schema has none either, and the planner never renames\n* one.\n*/\nfunction renameTableInSqliteSchema(schema, rename) {\n\tconst { from, to } = rename;\n\treturn mapTables(schema, stepRewrite(from, RelationalSchemaNodeKind.table, from, to), (table) => ({\n\t\t...table.name === from ? { name: to } : {},\n\t\treferencedTable: (fk) => fk.referencedTable === from ? to : fk.referencedTable\n\t}));\n}\n/**\n* The schema with one column under its new name. The table's primary key, unique constraints,\n* foreign keys and plain column indexes name it under the new name, foreign keys anywhere that\n* reference it follow it, and every dependency that names it moves with it. An index with an\n* expression or a predicate keeps its SQL text, and index names do not change, as in SQLite.\n*/\nfunction renameColumnInSqliteSchema(schema, rename) {\n\tconst { table: tableName, from, to } = rename;\n\tconst rewrite = stepRewrite(tableName, RelationalSchemaNodeKind.column, `column:${from}`, `column:${to}`);\n\tconst renamed = (column) => column === from ? to : column;\n\treturn mapTables(schema, rewrite, (table) => ({\n\t\t...table.name === tableName ? { columnName: renamed } : {},\n\t\treferencedColumns: (fk) => fk.referencedTable === tableName ? fk.referencedColumns.map(renamed) : fk.referencedColumns\n\t}));\n}\nfunction replaceIndex(schema, replacement) {\n\tconst { tableName, indexName: oldIndexName } = replacement.drop;\n\tconst newIndexName = replacement.create.indexName;\n\treturn mapTables(schema, stepRewrite(tableName, RelationalSchemaNodeKind.index, `index:${oldIndexName}`, `index:${newIndexName}`), (table) => table.name === tableName ? { indexName: (index) => index.name === oldIndexName ? newIndexName : index.name } : void 0);\n}\n/** The working schema of a plan or a migration, starting from `initial`. */\nfunction createWorkingSchema(initial) {\n\treturn new WorkingSchemaImpl(initial);\n}\nvar WorkingSchemaImpl = class {\n\t#current;\n\tconstructor(initial) {\n\t\tthis.#current = initial;\n\t}\n\tget current() {\n\t\treturn this.#current;\n\t}\n\tapply(call) {\n\t\tconst renamed = call instanceof RenameColumnCall ? renameColumnInSqliteSchema(this.#current, {\n\t\t\ttable: call.tableName,\n\t\t\tfrom: call.oldColumnName,\n\t\t\tto: call.columnName\n\t\t}) : renameTableInSqliteSchema(this.#current, {\n\t\t\tfrom: call.oldTableName,\n\t\t\tto: call.tableName\n\t\t});\n\t\tthis.#current = call.indexReplacements.reduce(replaceIndex, renamed);\n\t}\n};\n//#endregion\n//#region src/core/migrations/table-rename-calls.ts\n/** The SQL a user runs against the database to rename the table by hand. */\nfunction renameTableByHandStatements(rename) {\n\treturn renameTableSteps(rename.from, rename.to).map((renameStep) => renameStep.sql);\n}\n/** The `renameTable` call a user writes in `migration.ts` for `rename`; SQLite has no namespaces. */\nfunction renderRenameTableCall(rename) {\n\treturn new RenameTableCall(rename.from, rename.to, []).renderTypeScript();\n}\n/** How a user renames a table by hand on SQLite. */\nconst sqliteTableRenameByHand = {\n\trenderTableRename: renderRenameTableCall,\n\ttableRenameByHand: renameTableByHandStatements\n};\n/**\n* The call that renames a table, carrying as companions a drop and a create under the new name of\n* each index whose wire name derives from the old table name, since SQLite cannot rename an index.\n* `previous` is the schema with the table under its old name; the renamed copy is diffed against\n* `contract`. SQLite names no primary key, unique constraint or foreign key the contract leaves\n* unnamed, so those need nothing.\n*/\nfunction sqliteTableRenameCall(input) {\n\tconst { from, to } = input.rename;\n\tconst { issues } = buildSqlitePlanDiff({\n\t\tcontract: input.contract,\n\t\tactualSchema: renameTableInSqliteSchema(input.previous, {\n\t\t\tfrom,\n\t\t\tto\n\t\t}),\n\t\tframeworkComponents: input.frameworkComponents\n\t});\n\tconst { replacements } = pairIndexReplacements(coalesceSubtreeIssues(issues), renamedTableIndex(/* @__PURE__ */ new Set([to])));\n\treturn new RenameTableCall(from, to, replacements);\n}\n/**\n* The call that renames a column, carrying as companions a drop and a create under the new name of\n* each index on the column whose wire name derives from the column name, since SQLite cannot rename\n* an index and keeps the old name when it renames the column. `previous` is the schema with the\n* column under its old name; the renamed copy is diffed against `contract`.\n*/\nfunction sqliteColumnRenameCall(input) {\n\tconst { table, from, to } = input.rename;\n\tconst { issues } = buildSqlitePlanDiff({\n\t\tcontract: input.contract,\n\t\tactualSchema: renameColumnInSqliteSchema(input.previous, {\n\t\t\ttable,\n\t\t\tfrom,\n\t\t\tto\n\t\t}),\n\t\tframeworkComponents: input.frameworkComponents\n\t});\n\tconst { replacements } = pairIndexReplacements(coalesceSubtreeIssues(issues), renamedColumnIndex(table, to));\n\treturn new RenameColumnCall(table, from, to, replacements);\n}\n//#endregion\n//#region src/core/migrations/sqlite-migration.ts\n/**\n* Target-owned base class for SQLite migrations. Fixes the `SqlMigration`\n* generic to `SqlitePlanTargetDetails` and the abstract `targetId` to the\n* SQLite literal, so both user-authored migrations and renderer-generated\n* scaffolds can extend `SqliteMigration` directly without redeclaring\n* target-local identity.\n*\n* The constructor materializes a single SQLite `SqlControlAdapter` from\n* `stack.adapter.create(stack)` and stores it; the protected instance methods\n* forward to the corresponding `*Call` with that stored adapter, so user\n* migrations can write `this.createTable({...})` without threading the adapter\n* through every call.\n*\n* Binds the framework base's `Start` / `End` contract generics so a subclass\n* that assigns its snapshot-store `contract.json` imports to\n* `startContractJson` / `endContractJson` gets fully-typed view accessors:\n* `this.endContract` is a `SqliteContractView<End>`\n* (sole namespace unwrapped to the root — `this.endContract.table.<name>`),\n* built lazily from the JSON fields via the shared `MigrationContractViews`\n* helper. Mirrors `MongoMigration`'s view getters; the framework base derives\n* `describe()` from the same JSON.\n*/\nvar SqliteMigration = class extends Migration {\n\ttargetId = \"sqlite\";\n\t/**\n\t* Materialized SQLite control adapter, created once per migration\n\t* instance from the injected stack. `undefined` only when the migration\n\t* was instantiated without a stack (test fixtures); `controlAdapterFor`\n\t* throws a MIGRATION.SQLITE_CONTROL_STACK_MISSING in that case to surface the misuse.\n\t*/\n\tcontrolAdapter;\n\t#endView = new MigrationContractViews(this, \"SqliteMigration\", (json) => SqliteContractView.fromJson(json));\n\t/** The rename calls this read of `operations` has made so far, in order. */\n\t#renames = [];\n\t#startView = new MigrationContractViews(this, \"SqliteMigration\", (json) => SqliteContractView.fromJson(json));\n\tconstructor(stack) {\n\t\tsuper(stack);\n\t\tthis.controlAdapter = stack?.adapter ? blindCast(stack.adapter.create(stack)) : void 0;\n\t}\n\tframeworkComponents() {\n\t\tconst stack = this.stack;\n\t\tif (stack === void 0) return [];\n\t\treturn [\n\t\t\tstack.target,\n\t\t\t...stack.adapter === void 0 ? [] : [stack.adapter],\n\t\t\t...stack.extensions\n\t\t];\n\t}\n\t/**\n\t* Returns the materialized control adapter, or throws a MIGRATION.SQLITE_CONTROL_STACK_MISSING naming\n\t* `operation` when the migration was constructed without a `ControlStack`.\n\t* Single home for the null-check that every DDL/DML method shares.\n\t*/\n\tcontrolAdapterFor(operation) {\n\t\tif (!this.controlAdapter) throw errorSqliteMigrationStackMissing(operation);\n\t\treturn this.controlAdapter;\n\t}\n\t/**\n\t* The typed SQLite view over this migration's end-state contract — sole\n\t* namespace unwrapped to the root, so `this.endContract.table.<name>` etc.\n\t* Throws if no `endContractJson` was provided.\n\t*/\n\tget endContract() {\n\t\treturn this.#endView.endContract;\n\t}\n\t/**\n\t* The typed SQLite view over this migration's start-state contract, or\n\t* `null` for a baseline migration (no `startContractJson`).\n\t*/\n\tget startContract() {\n\t\treturn this.#startView.startContract;\n\t}\n\tcreateTable(options) {\n\t\treturn new CreateTableCall(options.table, options.columns, options.constraints).toOp(this.controlAdapterFor(\"createTable\"));\n\t}\n\tdropTable(options) {\n\t\treturn new DropTableCall(options.table).toOp(this.controlAdapterFor(\"dropTable\"));\n\t}\n\t/**\n\t* Emit the operations that rename a table: the table rename, then a drop and a create under the\n\t* new name of each index whose name was derived from the old table name. The old name is resolved\n\t* against the schema as this migration's earlier `renameTable` calls leave it, and the new name\n\t* against the end contract. Spread the result into `operations`:\n\t* `...this.renameTable({ table: 'userProfile', to: 'UserProfile' })`. Throws\n\t* `MIGRATION.TABLE_RENAME_UNMATCHED` when the table does not exist at that point of the migration\n\t* or the end contract lacks the new name.\n\t*/\n\trenameTable(options) {\n\t\tconst adapter = this.controlAdapterFor(\"renameTable\");\n\t\tconst rename = {\n\t\t\tnamespaceId: void 0,\n\t\t\tfrom: options.table,\n\t\t\tto: options.to\n\t\t};\n\t\tconst startContract = this.startContract;\n\t\tif (startContract === null) throw unmatchedTableRename(rename, \"the migration has no start contract\");\n\t\tconst current = this.schemaAfterRenames(startContract);\n\t\tconst endContract = this.endContract;\n\t\tconst resolved = resolveTableRenameAgainst(sqliteSchemaTables(current), endContract, rename);\n\t\tif (!resolved.ok) throw resolved.failure;\n\t\tconst call = sqliteTableRenameCall({\n\t\t\tprevious: current,\n\t\t\tcontract: endContract,\n\t\t\trename: resolved.value,\n\t\t\tframeworkComponents: this.frameworkComponents()\n\t\t});\n\t\tthis.#renames.push(call);\n\t\treturn call.toOps(adapter);\n\t}\n\t/**\n\t* Emit the operations that rename a column: the column rename, then a drop and a create under\n\t* the new name of each index on the column whose name was derived from the old column name. The\n\t* column is resolved against the schema as this migration's earlier rename calls leave it, so a\n\t* column of a table an earlier `renameTable` renamed is named on the table's new name. Spread the\n\t* result into `operations`: `...this.renameColumn({ table: 'User', column: 'name', to:\n\t* 'fullName' })`. Throws `MIGRATION.COLUMN_RENAME_UNMATCHED` when the table or column does not\n\t* exist at that point of the migration, the table already has the new column, or the end\n\t* contract lacks it.\n\t*/\n\trenameColumn(options) {\n\t\tconst adapter = this.controlAdapterFor(\"renameColumn\");\n\t\tconst rename = {\n\t\t\tnamespaceId: void 0,\n\t\t\ttable: options.table,\n\t\t\tfrom: options.column,\n\t\t\tto: options.to\n\t\t};\n\t\tconst startContract = this.startContract;\n\t\tif (startContract === null) throw unmatchedColumnRename(rename, \"the migration has no start contract\");\n\t\tconst current = this.schemaAfterRenames(startContract);\n\t\tconst resolved = resolveColumnRenameAgainst(sqliteSchemaTables(current), this.endContract, rename);\n\t\tif (!resolved.ok) throw resolved.failure;\n\t\tconst call = sqliteColumnRenameCall({\n\t\t\tprevious: current,\n\t\t\tcontract: this.endContract,\n\t\t\trename: resolved.value,\n\t\t\tframeworkComponents: this.frameworkComponents()\n\t\t});\n\t\tthis.#renames.push(call);\n\t\treturn call.toOps(adapter);\n\t}\n\t/** The start contract's schema with this read's rename calls applied in order. */\n\tschemaAfterRenames(startContract) {\n\t\tconst working = createWorkingSchema(sqliteContractToSchema(startContract, sqlTypeLookupsOf(this.frameworkComponents())));\n\t\tfor (const call of this.#renames) working.apply(call);\n\t\treturn working.current;\n\t}\n\tbeginOperationsRead() {\n\t\tthis.#renames = [];\n\t}\n\taddColumn(options) {\n\t\treturn new AddColumnCall(options.table, columnSpecOf(options.column, \"addColumn\", options.table)).toOp(this.controlAdapterFor(\"addColumn\"));\n\t}\n\tdropColumn(options) {\n\t\treturn new DropColumnCall(options.table, options.column).toOp(this.controlAdapterFor(\"dropColumn\"));\n\t}\n\tcreateIndex(options) {\n\t\treturn new CreateIndexCall(options.table, options.index, options.columns).toOp(this.controlAdapterFor(\"createIndex\"));\n\t}\n\tdropIndex(options) {\n\t\treturn new DropIndexCall(options.table, options.index).toOp(this.controlAdapterFor(\"dropIndex\"));\n\t}\n\trecreateTable(options) {\n\t\tconst { copyExpressions, temporaryValues, ...args } = options;\n\t\treturn new RecreateTableCall({\n\t\t\t...args,\n\t\t\tcontractTable: {\n\t\t\t\t...options.contractTable,\n\t\t\t\tcolumns: options.contractTable.columns.map((column) => columnSpecOf(column, \"recreateTable\", options.tableName))\n\t\t\t},\n\t\t\t...ifDefined(\"copyExpressions\", copyExpressions === void 0 ? void 0 : copyExpressionSlotsOf(copyExpressions, options.tableName)),\n\t\t\t...ifDefined(\"temporaryValues\", temporaryValues === void 0 ? void 0 : copyExpressionSlotsOf(temporaryValues, options.tableName, \"temporaryValues\"))\n\t\t}).toOp(this.controlAdapterFor(\"recreateTable\"));\n\t}\n};\nfunction columnDefaultOf(columnDefault, what) {\n\treturn columnDefault.kind === \"function\" ? {\n\t\tkind: \"function\",\n\t\texpression: sqlTextOf(columnDefault.expression, what)\n\t} : columnDefault;\n}\nfunction columnSpecOf(column, operation, table) {\n\tconst { default: columnDefault, ...rest } = column;\n\tconst what = `${operation} ${JSON.stringify(table)}.${JSON.stringify(column.name)} default`;\n\treturn {\n\t\t...rest,\n\t\t...ifDefined(\"default\", columnDefault === void 0 ? void 0 : columnDefaultOf(columnDefault, what))\n\t};\n}\nfunction copyExpressionSlotsOf(copyExpressions, table, option = \"copyExpressions\") {\n\treturn Object.fromEntries(Object.entries(copyExpressions).map(([column, expression]) => [column, {\n\t\tkind: \"sql\",\n\t\tsql: sqlTextOf(expression, `recreateTable ${JSON.stringify(table)} ${option}.${column}`)\n\t}]));\n}\n//#endregion\nexport { diffSqliteSchema as _, sqliteTableRenameByHand as a, verifySqliteDatabaseSchema as b, sqliteSchemaTables as c, coalesceSubtreeIssues as d, conflictForDisallowedCall as f, buildSqlitePlanDiff as g, sqlitePlannerStrategies as h, sqliteColumnRenameCall as i, indexNameCaseChange as l, planIssues as m, renameTableByHandStatements as n, sqliteTableRenameCall as o, issueNode as p, renderRenameTableCall as r, createWorkingSchema as s, SqliteMigration as t, pairIndexReplacements as u, sqliteActualSchema as v, sqliteContractToSchema as y };\n\n//# sourceMappingURL=sqlite-migration-CTNkjYJ1.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;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CAC7C,OAAO,cAAc,SAAS,aAAa;EAC1C,MAAM;EACN,YAAY,UAAU,cAAc,YAAY,IAAI;CACrD,IAAI;AACL;AACA,SAAS,aAAa,QAAQ,WAAW,OAAO;CAC/C,MAAM,EAAE,SAAS,eAAe,GAAG,SAAS;CAC5C,MAAM,OAAO,GAAG,UAAU,GAAG,KAAK,UAAU,KAAK,EAAE,GAAG,KAAK,UAAU,OAAO,IAAI,EAAE;CAClF,OAAO;EACN,GAAG;EACH,GAAG,UAAU,WAAW,kBAAkB,KAAK,IAAI,KAAK,IAAI,gBAAgB,eAAe,IAAI,CAAC;CACjG;AACD;AACA,SAAS,sBAAsB,iBAAiB,OAAO,SAAS,mBAAmB;CAClF,OAAO,OAAO,YAAY,OAAO,QAAQ,eAAe,CAAC,CAAC,KAAK,CAAC,QAAQ,gBAAgB,CAAC,QAAQ;EAChG,MAAM;EACN,KAAK,UAAU,YAAY,iBAAiB,KAAK,UAAU,KAAK,EAAE,GAAG,OAAO,GAAG,QAAQ;CACxF,CAAC,CAAC,CAAC;AACJ"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { t as SqlitePlanTargetDetails } from "./planner-target-details-xR6UfIcz-CMahymzq.mjs";
|
|
2
2
|
import { CodecRef } from "@prisma/orm-family-sql/relational-core/ast";
|
|
3
|
-
import "@prisma/orm-framework/components/control";
|
|
3
|
+
import { RowsWithoutValue } from "@prisma/orm-framework/components/control";
|
|
4
4
|
import { SqlMigrationPlanOperation } from "@prisma/orm-family-sql/family/control";
|
|
5
5
|
import { ReferentialAction } from "@prisma/orm-family-sql/contract/types";
|
|
6
6
|
import { ColumnDefault } from "@prisma/orm-framework/contract/types";
|
|
7
|
-
//#region ../../../3-targets/3-targets/sqlite/dist/tables-
|
|
7
|
+
//#region ../../../3-targets/3-targets/sqlite/dist/tables-DD_EmImp.d.mts
|
|
8
8
|
//#region src/core/migrations/operations/shared.d.ts
|
|
9
9
|
type Op = SqlMigrationPlanOperation<SqlitePlanTargetDetails>;
|
|
10
10
|
/**
|
|
@@ -71,17 +71,26 @@ interface SqliteIndexSpec {
|
|
|
71
71
|
}
|
|
72
72
|
//#endregion
|
|
73
73
|
//#region src/core/migrations/operations/tables.d.ts
|
|
74
|
+
/** A column the rebuild makes required: one that held NULL before, or a new one the copy gives no value. */
|
|
75
|
+
interface RecreateRequiredColumn {
|
|
76
|
+
readonly column: string;
|
|
77
|
+
readonly reason: RowsWithoutValue['reason'];
|
|
78
|
+
}
|
|
79
|
+
/** A recreate postcheck written as SQL. */
|
|
80
|
+
interface RecreateSqlPostcheck {
|
|
81
|
+
readonly description: string;
|
|
82
|
+
readonly sql: string;
|
|
83
|
+
/** The column the check finds required; when the copy fails on it, the runner counts its rows. */
|
|
84
|
+
readonly requiredColumn?: RecreateRequiredColumn;
|
|
85
|
+
}
|
|
74
86
|
/**
|
|
75
87
|
* A recreate postcheck: SQL, or the name of a column whose default the recreated table must carry,
|
|
76
88
|
* which becomes SQL once the adapter has written the column's `DEFAULT …` clause.
|
|
77
89
|
*/
|
|
78
|
-
type RecreatePostcheck = {
|
|
79
|
-
readonly description: string;
|
|
80
|
-
readonly sql: string;
|
|
81
|
-
} | {
|
|
90
|
+
type RecreatePostcheck = RecreateSqlPostcheck | {
|
|
82
91
|
readonly description: string;
|
|
83
92
|
readonly columnDefault: string;
|
|
84
93
|
};
|
|
85
94
|
//#endregion
|
|
86
95
|
export { SqliteTableSpec as a, SqliteIndexSpec as i, RecreatePostcheck as n, SqliteColumnSpec as r, Op as t };
|
|
87
|
-
//# sourceMappingURL=tables-
|
|
96
|
+
//# sourceMappingURL=tables-DD_EmImp-B8ZaVBMr.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tables-DD_EmImp-B8ZaVBMr.d.mts","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/tables-DD_EmImp.d.mts"],"mappings":";;;;;;;;KAQK,KAAK,0BAA0B;;;;;;;;;;;;;;;;;;;UAmB1B;WACC;WACA;WACA,UAAU;WACV,WAAW;WACX;WACA;;UAED;WACC;;UAED;WACC;WACA;;UAED;WACC;WACA;aACE;aACA;;WAEF;WACA,WAAW;WACX,WAAW;;;;;;UAMZ;WACC,kBAAkB;WAClB,aAAa;WACb,mBAAmB;WACnB,uBAAuB;;;;;;;UAOxB;WACC;WACA;;;;;UAKD;WACC;WACA,QAAQ;;;UAGT;WACC;WACA;;WAEA,iBAAiB;;;;;;KAMvB,oBAAoB;WACd;WACA"}
|
package/dist/target.d.mts
CHANGED
|
@@ -18,13 +18,13 @@ import { i as sqlitePslTypeConstructors, r as sqliteCreateNamespace, t as Sqlite
|
|
|
18
18
|
import { n as LEDGER_TABLE_NAME, r as MARKER_TABLE_NAME, t as CONTROL_TABLE_NAMES } from "./control-tables-Dua-YcJL.mjs";
|
|
19
19
|
import { a as sqliteDataTypeEntries, c as sqliteReal, i as sqliteCharacterVarying, l as sqliteText, n as sqliteCharacter, o as sqliteDataTypes, r as sqliteCharacterLengthParams, s as sqliteInteger, t as sqliteBlob } from "./data-types-B_k5-Ohy.mjs";
|
|
20
20
|
import { t as SqliteContractView } from "./sqlite-contract-view-BDw8T5Cp-CbLVOPJq.mjs";
|
|
21
|
-
import { t as SqliteMigration } from "./sqlite-migration-
|
|
22
|
-
import { a as fn, c as placeholder, d as sql, f 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-
|
|
23
|
-
import { a as DropColumnCall, c as RawSqlCall, d as RenameTableCall, f as SqliteOpFactoryCall, i as DataTransformCall, l as RecreateTableCall, n as CreateIndexCall, o as DropIndexCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RenameColumnCall } from "./op-factory-call-
|
|
21
|
+
import { t as SqliteMigration } from "./sqlite-migration-BqbQmUY1-CTmurARU.mjs";
|
|
22
|
+
import { a as fn, c as placeholder, d as sql, f 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-wH0Hw2VD.mjs";
|
|
23
|
+
import { a as DropColumnCall, c as RawSqlCall, d as RenameTableCall, f as SqliteOpFactoryCall, i as DataTransformCall, l as RecreateTableCall, n as CreateIndexCall, o as DropIndexCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RenameColumnCall } from "./op-factory-call-DAI1NqNz.mjs";
|
|
24
24
|
import "./pack-D3pJo5Xh.mjs";
|
|
25
|
-
import { n as TypeScriptRenderableSqliteMigration, t as SqliteMigrationDestinationInfo } from "./planner-produced-sqlite-migration-
|
|
26
|
-
import { n as SqlitePlanResult, r as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-
|
|
27
|
-
import "./planner-produced-sqlite-migration-
|
|
25
|
+
import { n as TypeScriptRenderableSqliteMigration, t as SqliteMigrationDestinationInfo } from "./planner-produced-sqlite-migration-CkHb8T4n-SM_tztzo.mjs";
|
|
26
|
+
import { n as SqlitePlanResult, r as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-tv5z1cn8.mjs";
|
|
27
|
+
import "./planner-produced-sqlite-migration-CB9UDEdR.mjs";
|
|
28
28
|
import { t as renderOps } from "./render-ops-B10yqmdG.mjs";
|
|
29
29
|
import { n as SqliteRuntimeTargetInstance, t as SqliteContractSerializer } from "./runtime-8_WfNAcA.mjs";
|
|
30
30
|
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, RenameColumnCall, RenameTableCall, SQLITE_BIGINT_CODEC_ID, SQLITE_BIGINT_NUMBER_CODEC_ID, SQLITE_BLOB_CODEC_ID, SQLITE_DATETIME_CODEC_ID, SQLITE_INTEGER_CODEC_ID, SQLITE_JSON_CODEC_ID, SQLITE_NOW_EXPRESSION, 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 SqliteBigintNumberDescriptor, type SqliteBlobDescriptor, SqliteCodecDescriptor, type SqliteCodecDescriptorRegistry, type SqliteCodecOptions, type SqliteCodecRegistry, 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, assembleSqliteCodecRegistry, buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, buildSqliteCodecDescriptorRegistry, buildTargetDetails, col, columnExistsAst, createSqliteBuiltinCodecLookup, createSqliteCodecRegistryWithBuiltins, createSqliteMigrationPlanner, createTable, dataTransform, datetime, defineSqliteCodecs, escapeLiteral, fn, foreignKey, indexExistsAst, integer, isSqliteCodecDescriptor, jsonDocumentRetag, jsonText, lit, normalizeSqliteNativeType, parseSqliteDefault, placeholder, primaryKey, quoteIdentifier, rawSql, renderOps, sql, sqliteAggregateDescriptors, sqliteBigintColumn, sqliteBigintNumberColumn, sqliteBlob, sqliteBlobColumn, sqliteCharacter, sqliteCharacterLengthParams, sqliteCharacterVarying, sqliteCodec, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteCreateNamespace, sqliteDataTypeEntries, sqliteDataTypes, sqliteDatetimeColumn, sqliteInteger, sqliteIntegerColumn, sqliteJsonColumn, sqlitePslTypeConstructors, sqliteReal, sqliteRealColumn, sqliteTable, sqliteText, sqliteTextColumn, tableExistsAst, text, unique };
|
package/dist/target.mjs
CHANGED
|
@@ -9,17 +9,17 @@ import { n as SqliteDdlNode, t as SqliteCreateTable } from "./nodes-DUZSdX86-BBE
|
|
|
9
9
|
import { a as tableExistsAst, i as indexExistsAst, r as createTable, t as columnExistsAst } from "./ddl-CDoa1Ehx-BOT670XL.mjs";
|
|
10
10
|
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-CEPqytba.mjs";
|
|
11
11
|
import { t as sqliteDataTypeEntries } from "./data-type-entries-B-DjiLVo-B9t48xaX.mjs";
|
|
12
|
-
import { n as
|
|
12
|
+
import { n as escapeLiteral, r as quoteIdentifier } from "./sql-utils-XGT5Esi2-5k9pvJeF.mjs";
|
|
13
13
|
import { t as parseSqliteDefault } from "./default-normalizer-Ch3VFnEH-C-h1XtlJ.mjs";
|
|
14
14
|
import { t as buildTargetDetails } from "./planner-target-details-CIQ789Gc-C5U4yVY9.mjs";
|
|
15
|
-
import { a as DropColumnCall, c as RawSqlCall, d as RenameTableCall, i as DataTransformCall, l as RecreateTableCall, n as CreateIndexCall, o as DropIndexCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RenameColumnCall } from "./op-factory-call-
|
|
15
|
+
import { a as DropColumnCall, c as RawSqlCall, d as RenameTableCall, i as DataTransformCall, l as RecreateTableCall, n as CreateIndexCall, o as DropIndexCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RenameColumnCall } from "./op-factory-call-hxIbAMSY-CinxsQHg.mjs";
|
|
16
16
|
import { n as LEDGER_TABLE_NAME, r as MARKER_TABLE_NAME, t as CONTROL_TABLE_NAMES } from "./control-tables-D_o8dKRB-BXi43noL.mjs";
|
|
17
|
-
import { i as sqliteCreateNamespace, n as SqliteContractView, r as SqliteUnboundDatabase, t as SqliteContractSerializer } from "./sqlite-contract-view-
|
|
18
|
-
import { t as SqliteMigration } from "./sqlite-migration-
|
|
19
|
-
import { t as renderOps } from "./render-ops-
|
|
20
|
-
import { t as TypeScriptRenderableSqliteMigration } from "./planner-produced-sqlite-migration-
|
|
21
|
-
import { n as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-
|
|
22
|
-
import { n as sqlitePslTypeConstructors } from "./control-
|
|
23
|
-
import { a as foreignKey, c as primaryKey, d as unique, i as fn, l as rawSql, n as col, o as lit, r as dataTransform, s as placeholder, t as MigrationCLI, u as sql } from "./migration-
|
|
17
|
+
import { i as sqliteCreateNamespace, n as SqliteContractView, r as SqliteUnboundDatabase, t as SqliteContractSerializer } from "./sqlite-contract-view-TELBWEt4-CVsdZnpX.mjs";
|
|
18
|
+
import { t as SqliteMigration } from "./sqlite-migration-CTNkjYJ1-eRdmsbpK.mjs";
|
|
19
|
+
import { t as renderOps } from "./render-ops-B889CY71-JvEeW9B4.mjs";
|
|
20
|
+
import { t as TypeScriptRenderableSqliteMigration } from "./planner-produced-sqlite-migration-DjEZTiif-DpC6rk_q.mjs";
|
|
21
|
+
import { n as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-BENMBCnG-CW6-1do-.mjs";
|
|
22
|
+
import { n as sqlitePslTypeConstructors } from "./control-CVmnzYUI.mjs";
|
|
23
|
+
import { a as foreignKey, c as primaryKey, d as unique, i as fn, l as rawSql, n as col, o as lit, r as dataTransform, s as placeholder, t as MigrationCLI, u as sql } from "./migration-DOkUBr8w.mjs";
|
|
24
24
|
import { t as normalizeSqliteNativeType } from "./native-type-normalizer-GpQMEyN5.mjs";
|
|
25
25
|
export { AddColumnCall, CONTROL_TABLE_NAMES, CreateIndexCall, CreateTableCall, DataTransformCall, DropColumnCall, DropIndexCall, DropTableCall, LEDGER_TABLE_NAME, MARKER_TABLE_NAME, SqliteMigration as Migration, MigrationCLI, RawSqlCall, RecreateTableCall, RenameColumnCall, RenameTableCall, SQLITE_BIGINT_CODEC_ID, SQLITE_BIGINT_NUMBER_CODEC_ID, SQLITE_BLOB_CODEC_ID, SQLITE_DATETIME_CODEC_ID, SQLITE_INTEGER_CODEC_ID, SQLITE_JSON_CODEC_ID, SQLITE_NOW_EXPRESSION, 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, assembleSqliteCodecRegistry, buildControlTableBootstrapQueries, buildSignMarkerBootstrapQueries, buildSqliteCodecDescriptorRegistry, buildTargetDetails, col, columnExistsAst, createSqliteBuiltinCodecLookup, createSqliteCodecRegistryWithBuiltins, createSqliteMigrationPlanner, createTable, dataTransform, datetime, defineSqliteCodecs, escapeLiteral, fn, foreignKey, indexExistsAst, integer, isSqliteCodecDescriptor, jsonDocumentRetag, jsonText, lit, normalizeSqliteNativeType, parseSqliteDefault, placeholder, primaryKey, quoteIdentifier, rawSql, renderOps, sql, sqliteAggregateDescriptors, sqliteBigintColumn, sqliteBigintNumberColumn, sqliteBlob, sqliteBlobColumn, sqliteCharacter, sqliteCharacterLengthParams, sqliteCharacterVarying, sqliteCodec, sqliteCodecDescriptorRegistry, sqliteCodecRegistry, sqliteCreateNamespace, sqliteDataTypeEntries, sqliteDataTypes, sqliteDatetimeColumn, sqliteInteger, sqliteIntegerColumn, sqliteJsonColumn, sqlitePslTypeConstructors, sqliteReal, sqliteRealColumn, sqliteTable, sqliteText, sqliteTextColumn, tableExistsAst, text, unique };
|
package/dist/target__control.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { i as sqliteCreateNamespace, r as SqliteUnboundDatabase } from "./sqlite-contract-view-
|
|
2
|
-
import { n as sqlitePslTypeConstructors, t as sqliteControlTargetDescriptor } from "./control-
|
|
1
|
+
import { i as sqliteCreateNamespace, r as SqliteUnboundDatabase } from "./sqlite-contract-view-TELBWEt4-CVsdZnpX.mjs";
|
|
2
|
+
import { n as sqlitePslTypeConstructors, t as sqliteControlTargetDescriptor } from "./control-CVmnzYUI.mjs";
|
|
3
3
|
export { SqliteUnboundDatabase, sqliteControlTargetDescriptor as default, sqliteCreateNamespace, sqlitePslTypeConstructors };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as SqliteMigration } from "./sqlite-migration-
|
|
2
|
-
import { a as fn, c as placeholder, d as sql, f 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-
|
|
1
|
+
import { t as SqliteMigration } from "./sqlite-migration-BqbQmUY1-CTmurARU.mjs";
|
|
2
|
+
import { a as fn, c as placeholder, d as sql, f 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-wH0Hw2VD.mjs";
|
|
3
3
|
export { type DataTransformOptions, SqliteMigration as Migration, MigrationCLI, col, dataTransform, fn, foreignKey, lit, placeholder, primaryKey, rawSql, sql, unique };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { t as SqliteMigration } from "./sqlite-migration-
|
|
2
|
-
import { a as foreignKey, c as primaryKey, d as unique, i as fn, l as rawSql, n as col, o as lit, r as dataTransform, s as placeholder, t as MigrationCLI, u as sql } from "./migration-
|
|
1
|
+
import { t as SqliteMigration } from "./sqlite-migration-CTNkjYJ1-eRdmsbpK.mjs";
|
|
2
|
+
import { a as foreignKey, c as primaryKey, d as unique, i as fn, l as rawSql, n as col, o as lit, r as dataTransform, s as placeholder, t as MigrationCLI, u as sql } from "./migration-DOkUBr8w.mjs";
|
|
3
3
|
export { SqliteMigration as Migration, MigrationCLI, col, dataTransform, fn, foreignKey, lit, placeholder, primaryKey, rawSql, sql, unique };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DropColumnCall, c as RawSqlCall, d as RenameTableCall, f as SqliteOpFactoryCall, i as DataTransformCall, l as RecreateTableCall, n as CreateIndexCall, o as DropIndexCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RenameColumnCall } from "./op-factory-call-
|
|
1
|
+
import { a as DropColumnCall, c as RawSqlCall, d as RenameTableCall, f as SqliteOpFactoryCall, i as DataTransformCall, l as RecreateTableCall, n as CreateIndexCall, o as DropIndexCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RenameColumnCall } from "./op-factory-call-DAI1NqNz.mjs";
|
|
2
2
|
export { AddColumnCall, CreateIndexCall, CreateTableCall, DataTransformCall, DropColumnCall, DropIndexCall, DropTableCall, RawSqlCall, RecreateTableCall, RenameColumnCall, RenameTableCall, type SqliteOpFactoryCall };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { a as DropColumnCall, c as RawSqlCall, d as RenameTableCall, i as DataTransformCall, l as RecreateTableCall, n as CreateIndexCall, o as DropIndexCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RenameColumnCall } from "./op-factory-call-
|
|
1
|
+
import { a as DropColumnCall, c as RawSqlCall, d as RenameTableCall, i as DataTransformCall, l as RecreateTableCall, n as CreateIndexCall, o as DropIndexCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RenameColumnCall } from "./op-factory-call-hxIbAMSY-CinxsQHg.mjs";
|
|
2
2
|
export { AddColumnCall, CreateIndexCall, CreateTableCall, DataTransformCall, DropColumnCall, DropIndexCall, DropTableCall, RawSqlCall, RecreateTableCall, RenameColumnCall, RenameTableCall };
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { n as TypeScriptRenderableSqliteMigration, t as SqliteMigrationDestinationInfo } from "./planner-produced-sqlite-migration-
|
|
2
|
-
import "./planner-produced-sqlite-migration-
|
|
1
|
+
import { n as TypeScriptRenderableSqliteMigration, t as SqliteMigrationDestinationInfo } from "./planner-produced-sqlite-migration-CkHb8T4n-SM_tztzo.mjs";
|
|
2
|
+
import "./planner-produced-sqlite-migration-CB9UDEdR.mjs";
|
|
3
3
|
export { type SqliteMigrationDestinationInfo, TypeScriptRenderableSqliteMigration };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as TypeScriptRenderableSqliteMigration } from "./planner-produced-sqlite-migration-
|
|
1
|
+
import { t as TypeScriptRenderableSqliteMigration } from "./planner-produced-sqlite-migration-DjEZTiif-DpC6rk_q.mjs";
|
|
2
2
|
export { TypeScriptRenderableSqliteMigration };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as SqlitePlanResult, r as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-
|
|
1
|
+
import { n as SqlitePlanResult, r as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-tv5z1cn8.mjs";
|
|
2
2
|
export { SqliteMigrationPlanner, type SqlitePlanResult, createSqliteMigrationPlanner };
|
package/dist/target__planner.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-
|
|
1
|
+
import { n as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-BENMBCnG-CW6-1do-.mjs";
|
|
2
2
|
export { SqliteMigrationPlanner, createSqliteMigrationPlanner };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as renderOps } from "./render-ops-
|
|
1
|
+
import { t as renderOps } from "./render-ops-B889CY71-JvEeW9B4.mjs";
|
|
2
2
|
export { renderOps };
|
package/dist/target__runtime.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as sqliteTargetDescriptorMetaRuntime } from "./descriptor-meta-runtime-Dqtz58eJ-BJ4UjLXW.mjs";
|
|
2
|
-
import { n as SqliteContractView, t as SqliteContractSerializer } from "./sqlite-contract-view-
|
|
2
|
+
import { n as SqliteContractView, t as SqliteContractSerializer } from "./sqlite-contract-view-TELBWEt4-CVsdZnpX.mjs";
|
|
3
3
|
//#region ../../../3-targets/3-targets/sqlite/dist/runtime.mjs
|
|
4
4
|
const sqliteRuntimeTargetDescriptor = {
|
|
5
5
|
...sqliteTargetDescriptorMetaRuntime,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"target__runtime.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/runtime.mjs"],"sourcesContent":["import { t as sqliteTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-Dqtz58eJ.mjs\";\nimport { n as SqliteContractSerializer, t as SqliteContractView } from \"./sqlite-contract-view-
|
|
1
|
+
{"version":3,"file":"target__runtime.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/runtime.mjs"],"sourcesContent":["import { t as sqliteTargetDescriptorMetaRuntime } from \"./descriptor-meta-runtime-Dqtz58eJ.mjs\";\nimport { n as SqliteContractSerializer, t as SqliteContractView } from \"./sqlite-contract-view-TELBWEt4.mjs\";\n//#region src/core/runtime-target.ts\nconst sqliteRuntimeTargetDescriptor = {\n\t...sqliteTargetDescriptorMetaRuntime,\n\tcodecs: () => [],\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"sqlite\"\n\t\t};\n\t}\n};\n//#endregion\nexport { SqliteContractSerializer, SqliteContractView, sqliteRuntimeTargetDescriptor as default };\n\n//# sourceMappingURL=runtime.mjs.map"],"mappings":";;;AAGA,MAAM,gCAAgC;CACrC,GAAG;CACH,cAAc,CAAC;CACf,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;AACD"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as
|
|
1
|
+
import { n as escapeLiteral, r as quoteIdentifier } from "./sql-utils-XGT5Esi2-5k9pvJeF.mjs";
|
|
2
2
|
export { escapeLiteral, quoteIdentifier };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/orm-target-sqlite",
|
|
3
|
-
"version": "8.0.0-rc.17-dev.
|
|
3
|
+
"version": "8.0.0-rc.17-dev.39",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -9,19 +9,19 @@
|
|
|
9
9
|
"dist"
|
|
10
10
|
],
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@prisma/orm-family-sql": "8.0.0-rc.17-dev.
|
|
13
|
-
"@prisma/orm-framework": "8.0.0-rc.17-dev.
|
|
14
|
-
"@prisma/orm-toolchain": "8.0.0-rc.17-dev.
|
|
12
|
+
"@prisma/orm-family-sql": "8.0.0-rc.17-dev.39",
|
|
13
|
+
"@prisma/orm-framework": "8.0.0-rc.17-dev.39",
|
|
14
|
+
"@prisma/orm-toolchain": "8.0.0-rc.17-dev.39",
|
|
15
15
|
"@standard-schema/spec": "1.1.0",
|
|
16
16
|
"arktype": "^2.2.2",
|
|
17
17
|
"pathe": "^2.0.3"
|
|
18
18
|
},
|
|
19
19
|
"devDependencies": {
|
|
20
|
-
"@internal/adapter-sqlite": "8.0.0-rc.17-dev.
|
|
21
|
-
"@internal/driver-sqlite": "8.0.0-rc.17-dev.
|
|
22
|
-
"@internal/target-sqlite": "8.0.0-rc.17-dev.
|
|
23
|
-
"@repo/tsconfig": "8.0.0-rc.17-dev.
|
|
24
|
-
"@repo/tsdown": "8.0.0-rc.17-dev.
|
|
20
|
+
"@internal/adapter-sqlite": "8.0.0-rc.17-dev.39",
|
|
21
|
+
"@internal/driver-sqlite": "8.0.0-rc.17-dev.39",
|
|
22
|
+
"@internal/target-sqlite": "8.0.0-rc.17-dev.39",
|
|
23
|
+
"@repo/tsconfig": "8.0.0-rc.17-dev.39",
|
|
24
|
+
"@repo/tsdown": "8.0.0-rc.17-dev.39",
|
|
25
25
|
"tsdown": "0.22.14",
|
|
26
26
|
"typescript": "5.9.3"
|
|
27
27
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"control-4njwExvT.mjs","names":[],"sources":["../../../../3-targets/7-drivers/sqlite/dist/control.mjs"],"sourcesContent":["import { n as sqliteParams, r as normalizeSqliteError, t as sqliteDriverDescriptorMeta } from \"./descriptor-meta-cwy5CXTT.mjs\";\nimport { DatabaseSync } from \"node:sqlite\";\nimport { errorRuntime } from \"@internal/errors/execution\";\nimport { basename } from \"pathe\";\n//#region src/core/control-driver.ts\nvar SqliteControlDriver = class {\n\tdb;\n\tlocation;\n\tfamilyId = \"sql\";\n\ttargetId = \"sqlite\";\n\tconstructor(db, location) {\n\t\tthis.db = db;\n\t\tthis.location = location;\n\t}\n\tasync query(sql, params) {\n\t\ttry {\n\t\t\treturn { rows: this.db.prepare(sql).all(...sqliteParams(params)) };\n\t\t} catch (error) {\n\t\t\tthrow normalizeSqliteError(error);\n\t\t}\n\t}\n\tasync databaseName() {\n\t\tif (this.location === \":memory:\" || this.location.length === 0) return;\n\t\tconst name = basename(this.location);\n\t\treturn name.length > 0 ? name : void 0;\n\t}\n\tasync close() {\n\t\tthis.db.close();\n\t}\n};\nconst sqliteDriverDescriptor = {\n\t...sqliteDriverDescriptorMeta,\n\tasync create(pathOrMemory) {\n\t\ttry {\n\t\t\tconst db = new DatabaseSync(pathOrMemory);\n\t\t\tdb.exec(\"PRAGMA foreign_keys = ON\");\n\t\t\tdb.exec(\"PRAGMA busy_timeout = 5000\");\n\t\t\treturn new SqliteControlDriver(db, pathOrMemory);\n\t\t} catch (error) {\n\t\t\tthrow errorRuntime(\"DRIVER.CONNECTION_FAILED\", \"Database connection failed\", {\n\t\t\t\twhy: error instanceof Error ? error.message : String(error),\n\t\t\t\tfix: \"Verify the database file path exists and is accessible\",\n\t\t\t\tmeta: { path: pathOrMemory },\n\t\t\t\tcause: error\n\t\t\t});\n\t\t}\n\t}\n};\n//#endregion\nexport { SqliteControlDriver, sqliteDriverDescriptor as default };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;AAKA,IAAI,sBAAsB,MAAM;CAC/B;CACA;CACA,WAAW;CACX,WAAW;CACX,YAAY,IAAI,UAAU;EACzB,KAAK,KAAK;EACV,KAAK,WAAW;CACjB;CACA,MAAM,MAAM,KAAK,QAAQ;EACxB,IAAI;GACH,OAAO,EAAE,MAAM,KAAK,GAAG,QAAQ,GAAG,CAAC,CAAC,IAAI,GAAG,aAAa,MAAM,CAAC,EAAE;EAClE,SAAS,OAAO;GACf,MAAM,qBAAqB,KAAK;EACjC;CACD;CACA,MAAM,eAAe;EACpB,IAAI,KAAK,aAAa,cAAc,KAAK,SAAS,WAAW,GAAG;EAChE,MAAM,OAAO,SAAS,KAAK,QAAQ;EACnC,OAAO,KAAK,SAAS,IAAI,OAAO,KAAK;CACtC;CACA,MAAM,QAAQ;EACb,KAAK,GAAG,MAAM;CACf;AACD;AACA,MAAM,yBAAyB;CAC9B,GAAG;CACH,MAAM,OAAO,cAAc;EAC1B,IAAI;GACH,MAAM,KAAK,IAAI,aAAa,YAAY;GACxC,GAAG,KAAK,0BAA0B;GAClC,GAAG,KAAK,4BAA4B;GACpC,OAAO,IAAI,oBAAoB,IAAI,YAAY;EAChD,SAAS,OAAO;GACf,MAAM,aAAa,4BAA4B,8BAA8B;IAC5E,KAAK,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK;IAC1D,KAAK;IACL,MAAM,EAAE,MAAM,aAAa;IAC3B,OAAO;GACR,CAAC;EACF;CACD;AACD"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"control-DJq7MF_s.mjs","names":[],"sources":["../../../../3-targets/3-targets/sqlite/dist/control.mjs"],"sourcesContent":["import { a as SQLITE_INTEGER_CODEC_ID, c as SQLITE_TEXT_CODEC_ID, i as SQLITE_DATETIME_CODEC_ID, o as SQLITE_JSON_CODEC_ID, r as SQLITE_BLOB_CODEC_ID, s as SQLITE_REAL_CODEC_ID, t as SQLITE_BIGINT_CODEC_ID } from \"./codec-ids-KMliSCRp.mjs\";\nimport { n as sqliteError } from \"./errors-DnR-sMHS.mjs\";\nimport { t as sqliteTargetDescriptorMeta } from \"./descriptor-meta-CthMyZ9m.mjs\";\nimport { n as quoteIdentifier } from \"./sql-utils-C2O4zVkP.mjs\";\nimport { _ as diffSqliteSchema, b as verifySqliteDatabaseSchema, y as sqliteContractToSchema } from \"./sqlite-migration-D7DWt0JL.mjs\";\nimport { r as MARKER_TABLE_NAME } from \"./control-tables-D_o8dKRB.mjs\";\nimport { n as createSqliteMigrationPlanner } from \"./planner-Ddpm7j-w.mjs\";\nimport { i as sqliteCreateNamespace, n as SqliteContractSerializer, r as SqliteUnboundDatabase } from \"./sqlite-contract-view-BrXalcTm.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { APP_SPACE_ID } from \"@internal/framework-components/control\";\nimport { runnerFailure, runnerSuccess, sqlTypeLookupsOf } from \"@internal/family-sql/control\";\nimport { SqlStorage } from \"@internal/sql-contract/types\";\nimport { relationalNodeEntityKind, relationalNodeGranularity } from \"@internal/sql-schema-ir/types\";\nimport { notOk, ok, okVoid } from \"@internal/utils/result\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { SqlSchemaVerifierBase } from \"@internal/family-sql/ir\";\n//#region src/core/migrations/runner.ts\nfunction createSqliteMigrationRunner(family) {\n\treturn new SqliteMigrationRunner(family);\n}\nvar SqliteMigrationRunner = class {\n\tfamily;\n\tconstructor(family) {\n\t\tthis.family = family;\n\t}\n\t/**\n\t* Apply the plan against an already-open connection without managing\n\t* the transaction lifecycle. The caller ({@link SqliteMigrationRunner.execute})\n\t* owns BEGIN/COMMIT/ROLLBACK and any connection-level setup (FK pragma\n\t* toggle, FK integrity check).\n\t*/\n\tasync executeOnConnection(options) {\n\t\tconst driver = options.driver;\n\t\tif (options.space !== void 0 && options.space !== options.plan.spaceId) throw sqliteError(\"MIGRATION.CONTRACT_SPACE_VIOLATION\", `SqlMigrationRunner: options.space (${options.space}) does not match plan.spaceId (${options.plan.spaceId})`, { meta: {\n\t\t\tspace: options.space,\n\t\t\tplanSpaceId: options.plan.spaceId\n\t\t} });\n\t\tconst space = options.plan.spaceId;\n\t\tconst planOps = blindCast(await Promise.all(options.plan.operations));\n\t\tconst destinationCheck = this.ensurePlanMatchesDestinationContract(options.plan.destination, options.destinationContract);\n\t\tif (!destinationCheck.ok) return destinationCheck;\n\t\tconst policyCheck = this.enforcePolicyCompatibility(options.policy, planOps);\n\t\tif (!policyCheck.ok) return policyCheck;\n\t\tconst ensureResult = await this.ensureControlTables(driver, options.destinationContract);\n\t\tif (!ensureResult.ok) return ensureResult;\n\t\tconst existingMarker = await this.family.readMarker({\n\t\t\tdriver,\n\t\t\tspace\n\t\t});\n\t\tconst markerCheck = this.ensureMarkerCompatibility(existingMarker, options.plan);\n\t\tif (!markerCheck.ok) return markerCheck;\n\t\tconst markerAtDestination = this.markerMatchesDestination(existingMarker, options.plan);\n\t\tconst isSelfEdge = options.plan.origin?.storageHash === options.plan.destination.storageHash;\n\t\tconst skipOperations = markerAtDestination && options.plan.origin != null && !isSelfEdge;\n\t\tlet operationsExecuted;\n\t\tlet executedOperations;\n\t\tif (skipOperations) {\n\t\t\toperationsExecuted = 0;\n\t\t\texecutedOperations = [];\n\t\t} else {\n\t\t\tconst applyResult = await this.applyPlan(driver, options, planOps);\n\t\t\tif (!applyResult.ok) return applyResult;\n\t\t\toperationsExecuted = applyResult.value.operationsExecuted;\n\t\t\texecutedOperations = applyResult.value.executedOperations;\n\t\t}\n\t\tif (space === APP_SPACE_ID) {\n\t\t\tconst schemaNode = await this.family.introspect({\n\t\t\t\tdriver,\n\t\t\t\tcontract: options.destinationContract\n\t\t\t});\n\t\t\tconst schemaVerifyResult = verifySqliteDatabaseSchema({\n\t\t\t\tcontract: options.destinationContract,\n\t\t\t\tactualSchema: schemaNode,\n\t\t\t\tstrict: options.strictVerification ?? true,\n\t\t\t\tframeworkComponents: options.frameworkComponents\n\t\t\t});\n\t\t\tif (!schemaVerifyResult.ok) return runnerFailure(\"MIGRATION.SCHEMA_VERIFY_FAILED\", schemaVerifyResult.summary, {\n\t\t\t\twhy: \"The resulting database schema does not satisfy the destination contract.\",\n\t\t\t\tmeta: { issues: schemaVerifyResult.schema.issues }\n\t\t\t});\n\t\t}\n\t\tconst incomingInvariants = options.plan.providedInvariants;\n\t\tconst existingInvariants = new Set(existingMarker?.invariants ?? []);\n\t\tconst incomingIsSubsetOfExisting = incomingInvariants.every((id) => existingInvariants.has(id));\n\t\tif (!(isSelfEdge && operationsExecuted === 0 && incomingIsSubsetOfExisting)) {\n\t\t\tconst markerResult = await this.upsertMarker(driver, options, existingMarker, space);\n\t\t\tif (!markerResult.ok) return markerResult;\n\t\t\tawait this.recordLedgerEntries(driver, options, executedOperations);\n\t\t}\n\t\treturn runnerSuccess({\n\t\t\toperationsPlanned: planOps.length,\n\t\t\toperationsExecuted\n\t\t});\n\t}\n\tasync execute(options) {\n\t\tconst driver = options.driver;\n\t\tconst perSpaceOptions = options.perSpaceOptions;\n\t\tif (perSpaceOptions.length === 0) return ok({ perSpaceResults: [] });\n\t\tconst fkWasEnabled = await this.readForeignKeysEnabled(driver);\n\t\tif (fkWasEnabled) await driver.query(\"PRAGMA foreign_keys = OFF\");\n\t\ttry {\n\t\t\tawait this.beginExclusiveTransaction(driver);\n\t\t\tlet committed = false;\n\t\t\ttry {\n\t\t\t\tconst perSpaceResults = [];\n\t\t\t\tlet lastProcessedSpace;\n\t\t\t\tfor (const spaceOptions of perSpaceOptions) {\n\t\t\t\t\tconst space = spaceOptions.space ?? spaceOptions.plan.spaceId;\n\t\t\t\t\tconst result = await this.executeOnConnection({\n\t\t\t\t\t\t...spaceOptions,\n\t\t\t\t\t\tdriver,\n\t\t\t\t\t\tspace\n\t\t\t\t\t});\n\t\t\t\t\tif (!result.ok) return notOk({\n\t\t\t\t\t\t...result.failure,\n\t\t\t\t\t\tfailingSpace: space\n\t\t\t\t\t});\n\t\t\t\t\tperSpaceResults.push({\n\t\t\t\t\t\tspace,\n\t\t\t\t\t\tvalue: result.value\n\t\t\t\t\t});\n\t\t\t\t\tlastProcessedSpace = space;\n\t\t\t\t}\n\t\t\t\tif (fkWasEnabled) {\n\t\t\t\t\tconst fkIntegrityCheck = await this.verifyForeignKeyIntegrity(driver);\n\t\t\t\t\tif (!fkIntegrityCheck.ok) return notOk({\n\t\t\t\t\t\t...fkIntegrityCheck.failure,\n\t\t\t\t\t\tfailingSpace: lastProcessedSpace ?? APP_SPACE_ID\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\tawait this.commitTransaction(driver);\n\t\t\t\tcommitted = true;\n\t\t\t\treturn ok({ perSpaceResults });\n\t\t\t} finally {\n\t\t\t\tif (!committed) await this.rollbackTransaction(driver);\n\t\t\t}\n\t\t} finally {\n\t\t\tif (fkWasEnabled) await driver.query(\"PRAGMA foreign_keys = ON\");\n\t\t}\n\t}\n\tasync readForeignKeysEnabled(driver) {\n\t\treturn (await driver.query(\"PRAGMA foreign_keys\")).rows[0]?.foreign_keys === 1;\n\t}\n\tasync verifyForeignKeyIntegrity(driver) {\n\t\tconst result = await driver.query(\"PRAGMA foreign_key_check\");\n\t\tif (result.rows.length === 0) return okVoid();\n\t\treturn runnerFailure(\"MIGRATION.FOREIGN_KEY_VIOLATION\", `Foreign key integrity check failed after migration: ${result.rows.length} violation(s).`, {\n\t\t\twhy: \"PRAGMA foreign_key_check reported violations after applying recreate-table operations.\",\n\t\t\tmeta: { violations: result.rows }\n\t\t});\n\t}\n\tasync applyPlan(driver, options, ops) {\n\t\tconst checks = options.executionChecks;\n\t\tconst runPrechecks = checks?.prechecks !== false;\n\t\tconst runPostchecks = checks?.postchecks !== false;\n\t\tconst runIdempotency = checks?.idempotencyChecks !== false;\n\t\tlet operationsExecuted = 0;\n\t\tconst executedOperations = [];\n\t\tfor (const operation of ops) {\n\t\t\toptions.callbacks?.onOperationStart?.(operation);\n\t\t\ttry {\n\t\t\t\tif (runPostchecks && runIdempotency) {\n\t\t\t\t\tif (await this.expectationsAreSatisfied(driver, operation.postcheck)) {\n\t\t\t\t\t\texecutedOperations.push(this.createSkipRecord(operation));\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (runPrechecks) {\n\t\t\t\t\tconst precheckResult = await this.runExpectationSteps(driver, operation.precheck, operation, \"precheck\");\n\t\t\t\t\tif (!precheckResult.ok) return precheckResult;\n\t\t\t\t}\n\t\t\t\tconst executeResult = await this.runExecuteSteps(driver, operation.execute, operation);\n\t\t\t\tif (!executeResult.ok) return executeResult;\n\t\t\t\tif (runPostchecks) {\n\t\t\t\t\tconst postcheckResult = await this.runExpectationSteps(driver, operation.postcheck, operation, \"postcheck\");\n\t\t\t\t\tif (!postcheckResult.ok) return postcheckResult;\n\t\t\t\t}\n\t\t\t\texecutedOperations.push(operation);\n\t\t\t\toperationsExecuted += 1;\n\t\t\t} finally {\n\t\t\t\toptions.callbacks?.onOperationComplete?.(operation);\n\t\t\t}\n\t\t}\n\t\treturn ok({\n\t\t\toperationsExecuted,\n\t\t\texecutedOperations\n\t\t});\n\t}\n\tasync ensureControlTables(driver, contract) {\n\t\tconst legacyDetection = await this.detectLegacyMarkerShape(driver);\n\t\tif (!legacyDetection.ok) return legacyDetection;\n\t\tconst lowererContext = { contract };\n\t\tfor (const query of this.family.bootstrapControlTableQueries()) await this.executeStatement(driver, await this.family.lowerAst(query, lowererContext));\n\t\treturn okVoid();\n\t}\n\tasync detectLegacyMarkerShape(driver) {\n\t\tconst tableInfo = await driver.query(`PRAGMA table_info(${quoteIdentifier(MARKER_TABLE_NAME)})`);\n\t\tif (tableInfo.rows.length === 0) return okVoid();\n\t\tconst columns = new Set(tableInfo.rows.map((row) => row.name));\n\t\tif (columns.has(\"space\")) return okVoid();\n\t\treturn runnerFailure(\"MIGRATION.LEGACY_MARKER_SHAPE\", `Legacy marker-table shape detected on ${MARKER_TABLE_NAME} (no \\`space\\` column). Prisma 8 is in pre-1.0; the previous transitional auto-migration to the per-space-row schema has been removed. Drop \\`${MARKER_TABLE_NAME}\\` and re-run \\`dbInit\\` to reinitialise from a clean baseline.`, { meta: {\n\t\t\ttable: MARKER_TABLE_NAME,\n\t\t\tcolumns: [...columns].sort()\n\t\t} });\n\t}\n\tasync runExpectationSteps(driver, steps, operation, phase) {\n\t\tfor (const step of steps) {\n\t\t\tconst result = await driver.query(step.sql, step.params ?? []);\n\t\t\tif (!this.stepResultIsTrue(result.rows)) return runnerFailure(phase === \"precheck\" ? \"MIGRATION.PRECHECK_FAILED\" : \"MIGRATION.POSTCHECK_FAILED\", `Operation ${operation.id} failed during ${phase}: ${step.description}`, { meta: {\n\t\t\t\toperationId: operation.id,\n\t\t\t\tphase,\n\t\t\t\tstepDescription: step.description\n\t\t\t} });\n\t\t}\n\t\treturn okVoid();\n\t}\n\tasync runExecuteSteps(driver, steps, operation) {\n\t\tfor (const step of steps) try {\n\t\t\tawait driver.query(step.sql, step.params ?? []);\n\t\t} catch (error) {\n\t\t\tconst message = error instanceof Error ? error.message : String(error);\n\t\t\treturn runnerFailure(\"MIGRATION.EXECUTION_FAILED\", `Operation ${operation.id} failed during execution: ${step.description}`, {\n\t\t\t\twhy: message,\n\t\t\t\tmeta: {\n\t\t\t\t\toperationId: operation.id,\n\t\t\t\t\tstepDescription: step.description,\n\t\t\t\t\tsql: step.sql\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn okVoid();\n\t}\n\tstepResultIsTrue(rows) {\n\t\tif (!rows || rows.length === 0) return false;\n\t\tconst firstRow = rows[0];\n\t\tconst firstValue = firstRow ? Object.values(firstRow)[0] : void 0;\n\t\tif (typeof firstValue === \"number\") return firstValue !== 0;\n\t\tif (typeof firstValue === \"boolean\") return firstValue;\n\t\tif (typeof firstValue === \"string\") {\n\t\t\tconst lower = firstValue.toLowerCase();\n\t\t\tif (lower === \"true\" || lower === \"1\") return true;\n\t\t\tif (lower === \"false\" || lower === \"0\") return false;\n\t\t\treturn firstValue.length > 0;\n\t\t}\n\t\treturn Boolean(firstValue);\n\t}\n\tasync expectationsAreSatisfied(driver, steps) {\n\t\tif (steps.length === 0) return false;\n\t\tfor (const step of steps) {\n\t\t\tconst result = await driver.query(step.sql, step.params ?? []);\n\t\t\tif (!this.stepResultIsTrue(result.rows)) return false;\n\t\t}\n\t\treturn true;\n\t}\n\tcreateSkipRecord(operation) {\n\t\treturn Object.freeze({\n\t\t\tid: operation.id,\n\t\t\tlabel: operation.label,\n\t\t\t...ifDefined(\"summary\", operation.summary),\n\t\t\toperationClass: operation.operationClass,\n\t\t\ttarget: operation.target,\n\t\t\tprecheck: Object.freeze([]),\n\t\t\texecute: Object.freeze([]),\n\t\t\tpostcheck: Object.freeze([...operation.postcheck]),\n\t\t\tmeta: Object.freeze({\n\t\t\t\t...operation.meta ?? {},\n\t\t\t\trunner: Object.freeze({\n\t\t\t\t\tskipped: true,\n\t\t\t\t\treason: \"postcheck_pre_satisfied\"\n\t\t\t\t})\n\t\t\t})\n\t\t});\n\t}\n\tmarkerMatchesDestination(marker, plan) {\n\t\tif (!marker) return false;\n\t\tif (marker.storageHash !== plan.destination.storageHash) return false;\n\t\tif (plan.destination.profileHash && marker.profileHash !== plan.destination.profileHash) return false;\n\t\treturn true;\n\t}\n\tenforcePolicyCompatibility(policy, operations) {\n\t\tconst allowedClasses = new Set(policy.allowedOperationClasses);\n\t\tfor (const operation of operations) if (!allowedClasses.has(operation.operationClass)) return runnerFailure(\"MIGRATION.POLICY_VIOLATION\", `Operation ${operation.id} has class \"${operation.operationClass}\" which is not allowed by policy.`, {\n\t\t\twhy: `Policy only allows: ${policy.allowedOperationClasses.join(\", \")}.`,\n\t\t\tmeta: {\n\t\t\t\toperationId: operation.id,\n\t\t\t\toperationClass: operation.operationClass,\n\t\t\t\tallowedClasses: policy.allowedOperationClasses\n\t\t\t}\n\t\t});\n\t\treturn okVoid();\n\t}\n\tensureMarkerCompatibility(marker, plan) {\n\t\tconst origin = plan.origin ?? null;\n\t\tif (!origin) return okVoid();\n\t\tif (!marker) return runnerFailure(\"MIGRATION.MARKER_ORIGIN_MISMATCH\", `Missing contract marker: expected origin storage hash ${origin.storageHash}.`, { meta: { expectedOriginStorageHash: origin.storageHash } });\n\t\tif (marker.storageHash !== origin.storageHash) return runnerFailure(\"MIGRATION.MARKER_ORIGIN_MISMATCH\", `Existing contract marker (${marker.storageHash}) does not match plan origin (${origin.storageHash}).`, { meta: {\n\t\t\tmarkerStorageHash: marker.storageHash,\n\t\t\texpectedOriginStorageHash: origin.storageHash\n\t\t} });\n\t\tif (origin.profileHash && marker.profileHash !== origin.profileHash) return runnerFailure(\"MIGRATION.MARKER_ORIGIN_MISMATCH\", `Existing contract marker profile hash (${marker.profileHash}) does not match plan origin profile hash (${origin.profileHash}).`, { meta: {\n\t\t\tmarkerProfileHash: marker.profileHash,\n\t\t\texpectedOriginProfileHash: origin.profileHash\n\t\t} });\n\t\treturn okVoid();\n\t}\n\tensurePlanMatchesDestinationContract(destination, contract) {\n\t\tif (destination.storageHash !== contract.storage.storageHash) return runnerFailure(\"MIGRATION.DESTINATION_CONTRACT_MISMATCH\", `Plan destination storage hash (${destination.storageHash}) does not match provided contract storage hash (${contract.storage.storageHash}).`, { meta: {\n\t\t\tplanStorageHash: destination.storageHash,\n\t\t\tcontractStorageHash: contract.storage.storageHash\n\t\t} });\n\t\tif (destination.profileHash && contract.profileHash && destination.profileHash !== contract.profileHash) return runnerFailure(\"MIGRATION.DESTINATION_CONTRACT_MISMATCH\", `Plan destination profile hash (${destination.profileHash}) does not match provided contract profile hash (${contract.profileHash}).`, { meta: {\n\t\t\tplanProfileHash: destination.profileHash,\n\t\t\tcontractProfileHash: contract.profileHash\n\t\t} });\n\t\treturn okVoid();\n\t}\n\tasync upsertMarker(driver, options, existingMarker, space) {\n\t\tconst destination = {\n\t\t\tstorageHash: options.plan.destination.storageHash,\n\t\t\tprofileHash: options.plan.destination.profileHash ?? options.destinationContract.profileHash ?? options.plan.destination.storageHash,\n\t\t\tinvariants: options.plan.providedInvariants ?? []\n\t\t};\n\t\tif (!existingMarker) {\n\t\t\tawait this.family.initMarker({\n\t\t\t\tdriver,\n\t\t\t\tspace,\n\t\t\t\tdestination\n\t\t\t});\n\t\t\treturn okVoid();\n\t\t}\n\t\tif (!await this.family.updateMarker({\n\t\t\tdriver,\n\t\t\tspace,\n\t\t\texpectedFrom: existingMarker.storageHash,\n\t\t\tdestination\n\t\t})) {\n\t\t\tconst found = await this.family.readMarker({\n\t\t\t\tdriver,\n\t\t\t\tspace\n\t\t\t});\n\t\t\treturn runnerFailure(\"MIGRATION.MARKER_CAS_FAILURE\", \"Marker was modified by another process during migration execution.\", { meta: {\n\t\t\t\tspace,\n\t\t\t\texpectedStorageHash: existingMarker.storageHash,\n\t\t\t\tfoundStorageHash: found?.storageHash ?? null,\n\t\t\t\tdestinationStorageHash: options.plan.destination.storageHash\n\t\t\t} });\n\t\t}\n\t\treturn okVoid();\n\t}\n\tasync recordLedgerEntries(driver, options, executedOperations) {\n\t\tconst plan = options.plan;\n\t\tconst space = plan.spaceId;\n\t\tconst edges = options.migrationEdges;\n\t\tconst totalEdgeOps = edges.reduce((sum, edge) => sum + edge.operationCount, 0);\n\t\tif (totalEdgeOps !== plan.operations.length) throw new InternalError(`Ledger write: plan.operations length (${plan.operations.length}) does not match sum of migrationEdges operationCount (${totalEdgeOps})`);\n\t\tlet offset = 0;\n\t\tfor (const edge of edges) {\n\t\t\tconst edgeOps = executedOperations.slice(offset, offset + edge.operationCount);\n\t\t\toffset += edge.operationCount;\n\t\t\tawait this.family.writeLedgerEntry({\n\t\t\t\tdriver,\n\t\t\t\tspace,\n\t\t\t\tentry: {\n\t\t\t\t\tedgeId: `${edge.from}->${edge.to}`,\n\t\t\t\t\tfrom: edge.from,\n\t\t\t\t\tto: edge.to,\n\t\t\t\t\tmigrationName: edge.dirName,\n\t\t\t\t\tmigrationHash: edge.migrationHash,\n\t\t\t\t\toperations: edgeOps\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}\n\tasync beginExclusiveTransaction(driver) {\n\t\tawait driver.query(\"BEGIN EXCLUSIVE\");\n\t}\n\tasync commitTransaction(driver) {\n\t\tawait driver.query(\"COMMIT\");\n\t}\n\tasync rollbackTransaction(driver) {\n\t\tawait driver.query(\"ROLLBACK\");\n\t}\n\tasync executeStatement(driver, statement) {\n\t\tawait driver.query(statement.sql, statement.params);\n\t}\n};\n//#endregion\n//#region src/core/sqlite-schema-verifier.ts\n/**\n* SQLite target `SchemaVerifier` concretion. Mirrors the Postgres\n* shape: hooks return the empty list pending the call-site migration\n* that routes the existing verifier behaviour through the SPI.\n*/\nvar SqliteSchemaVerifier = class extends SqlSchemaVerifierBase {\n\tverifyCommonSqlSchema(_options) {\n\t\treturn [];\n\t}\n\tverifyTargetExtensions(_options) {\n\t\treturn [];\n\t}\n};\n//#endregion\n//#region src/core/control-target.ts\nfunction isSqlContract(contract) {\n\treturn contract === null || contract.storage instanceof SqlStorage;\n}\nconst sqliteControlTargetDescriptor = {\n\t...sqliteTargetDescriptorMeta,\n\tcontractSerializer: new SqliteContractSerializer(),\n\tschemaVerifier: new SqliteSchemaVerifier(),\n\tdiffSchema(input) {\n\t\treturn diffSqliteSchema(input);\n\t},\n\tclassifySubjectGranularity: relationalNodeGranularity,\n\tclassifyEntityKind: relationalNodeEntityKind,\n\tmigrations: {\n\t\tcreatePlanner(adapter) {\n\t\t\treturn createSqliteMigrationPlanner(adapter);\n\t\t},\n\t\tcreateRunner(family) {\n\t\t\treturn createSqliteMigrationRunner(family);\n\t\t},\n\t\tcontractToSchema(contract, frameworkComponents) {\n\t\t\tif (!isSqlContract(contract)) throw sqliteError(\"CONTRACT.TARGET_MISMATCH\", \"sqliteControlTargetDescriptor.contractToSchema received a non-SQL contract; expected Contract<SqlStorage>\");\n\t\t\treturn sqliteContractToSchema(contract, sqlTypeLookupsOf(frameworkComponents));\n\t\t}\n\t},\n\tcreate() {\n\t\treturn {\n\t\t\tfamilyId: \"sql\",\n\t\t\ttargetId: \"sqlite\"\n\t\t};\n\t},\n\tcreatePlanner(adapter) {\n\t\treturn createSqliteMigrationPlanner(adapter);\n\t},\n\tcreateRunner(family) {\n\t\treturn createSqliteMigrationRunner(family);\n\t}\n};\n//#endregion\n//#region src/core/type-constructors.ts\n/**\n* The base PSL scalars as zero-arg type constructors in the unified authoring\n* channel. Each names a codec; the column's database type is its data type's.\n*\n* The type position is the only storage decider: a mutation-default generator\n* (`@default(uuid())`) never re-picks a column's storage.\n*\n* These are the constructors only PSL offers. They are defined here, next to the codecs they name, but the adapter contributes them: the TypeScript contract builder builds its `type.*` helpers from the target, so a target contribution would add `type.String()` and the like there. The constructors that should also be `type.*` helpers are the target's own (`sqliteAuthoringTypes`).\n*/\nconst sqlitePslTypeConstructors = {\n\tString: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Variable-length text stored as SQLite text.\",\n\t\toutput: { codecId: SQLITE_TEXT_CODEC_ID }\n\t},\n\tInt: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An integer stored as SQLite integer and represented as a JavaScript number.\",\n\t\toutput: { codecId: SQLITE_INTEGER_CODEC_ID }\n\t},\n\tBigInt: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"An integer stored as SQLite integer and represented as a JavaScript bigint.\",\n\t\toutput: { codecId: SQLITE_BIGINT_CODEC_ID }\n\t},\n\tFloat: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A floating-point number stored as SQLite real.\",\n\t\toutput: { codecId: SQLITE_REAL_CODEC_ID }\n\t},\n\tDecimal: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A decimal value stored and represented as text to preserve precision.\",\n\t\toutput: { codecId: SQLITE_TEXT_CODEC_ID }\n\t},\n\tDateTime: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A date and time stored as SQLite text.\",\n\t\toutput: { codecId: SQLITE_DATETIME_CODEC_ID }\n\t},\n\tJson: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"A JSON value serialized to SQLite text.\",\n\t\toutput: { codecId: SQLITE_JSON_CODEC_ID }\n\t},\n\tBytes: {\n\t\tkind: \"typeConstructor\",\n\t\tdocumentation: \"Binary data stored as a SQLite blob.\",\n\t\toutput: { codecId: SQLITE_BLOB_CODEC_ID }\n\t}\n};\n//#endregion\nexport { SqliteUnboundDatabase, sqliteControlTargetDescriptor as default, sqliteCreateNamespace, sqlitePslTypeConstructors };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,SAAS,4BAA4B,QAAQ;CAC5C,OAAO,IAAI,sBAAsB,MAAM;AACxC;AACA,IAAI,wBAAwB,MAAM;CACjC;CACA,YAAY,QAAQ;EACnB,KAAK,SAAS;CACf;;;;;;;CAOA,MAAM,oBAAoB,SAAS;EAClC,MAAM,SAAS,QAAQ;EACvB,IAAI,QAAQ,UAAU,KAAK,KAAK,QAAQ,UAAU,QAAQ,KAAK,SAAS,MAAM,YAAY,sCAAsC,sCAAsC,QAAQ,MAAM,iCAAiC,QAAQ,KAAK,QAAQ,IAAI,EAAE,MAAM;GACrP,OAAO,QAAQ;GACf,aAAa,QAAQ,KAAK;EAC3B,EAAE,CAAC;EACH,MAAM,QAAQ,QAAQ,KAAK;EAC3B,MAAM,UAAU,UAAU,MAAM,QAAQ,IAAI,QAAQ,KAAK,UAAU,CAAC;EACpE,MAAM,mBAAmB,KAAK,qCAAqC,QAAQ,KAAK,aAAa,QAAQ,mBAAmB;EACxH,IAAI,CAAC,iBAAiB,IAAI,OAAO;EACjC,MAAM,cAAc,KAAK,2BAA2B,QAAQ,QAAQ,OAAO;EAC3E,IAAI,CAAC,YAAY,IAAI,OAAO;EAC5B,MAAM,eAAe,MAAM,KAAK,oBAAoB,QAAQ,QAAQ,mBAAmB;EACvF,IAAI,CAAC,aAAa,IAAI,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