@prisma/orm-target-sqlite 8.0.0-rc.20-dev.8 → 8.0.0-rc.20-dev.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/dist/{adapter-xs2nBMBo.d.mts → adapter-C3hrAasJ.d.mts} +4 -4
  2. package/dist/{adapter-xs2nBMBo.d.mts.map → adapter-C3hrAasJ.d.mts.map} +1 -1
  3. package/dist/adapter.d.mts +1 -1
  4. package/dist/adapter__adapter.d.mts +1 -1
  5. package/dist/{aggregates-DC8nyCjN.d.mts → aggregates-UBmpuURb.d.mts} +4 -4
  6. package/dist/{aggregates-DC8nyCjN.d.mts.map → aggregates-UBmpuURb.d.mts.map} +1 -1
  7. package/dist/{migration-BiEvYZud.d.mts → migration-BHhnGEA2.d.mts} +2 -2
  8. package/dist/{migration-BiEvYZud.d.mts.map → migration-BHhnGEA2.d.mts.map} +1 -1
  9. package/dist/{migration-8iTYuvo3.mjs → migration-D0UlBTQw.mjs} +2 -2
  10. package/dist/{migration-8iTYuvo3.mjs.map → migration-D0UlBTQw.mjs.map} +1 -1
  11. package/dist/{op-factory-call-CbRRVCjr.d.mts → op-factory-call-B8bJlvkP.d.mts} +38 -5
  12. package/dist/{op-factory-call-CbRRVCjr.d.mts.map → op-factory-call-B8bJlvkP.d.mts.map} +1 -1
  13. package/dist/{op-factory-call-lluKW6u9-D2x8W4qv.mjs → op-factory-call-DADakw8V-yXzHuXlv.mjs} +146 -4
  14. package/dist/op-factory-call-DADakw8V-yXzHuXlv.mjs.map +1 -0
  15. package/dist/{pack-BT-BNRPc.d.mts → pack-B3YrlPJI.d.mts} +2 -2
  16. package/dist/{pack-BT-BNRPc.d.mts.map → pack-B3YrlPJI.d.mts.map} +1 -1
  17. package/dist/{planner-B73VGVF0-Dl4v3Bcx.mjs → planner-1zVd0jR2-mkF3bIWw.mjs} +101 -12
  18. package/dist/planner-1zVd0jR2-mkF3bIWw.mjs.map +1 -0
  19. package/dist/{planner-j4kgbkbY.d.mts → planner-DcOz-1na.d.mts} +2 -2
  20. package/dist/{planner-j4kgbkbY.d.mts.map → planner-DcOz-1na.d.mts.map} +1 -1
  21. package/dist/{planner-produced-sqlite-migration-B-05qsmU-BpCrTiPQ.mjs → planner-produced-sqlite-migration-Dgme3v9a-BzrIbSW_.mjs} +4 -4
  22. package/dist/{planner-produced-sqlite-migration-B-05qsmU-BpCrTiPQ.mjs.map → planner-produced-sqlite-migration-Dgme3v9a-BzrIbSW_.mjs.map} +1 -1
  23. package/dist/planner-produced-sqlite-migration-DxyN096L.d.mts +1 -0
  24. package/dist/{planner-produced-sqlite-migration-HnOjnBHx-B_d6P_xk.d.mts → planner-produced-sqlite-migration-DyUPHRKW-CFtZi2VG.d.mts} +3 -3
  25. package/dist/planner-produced-sqlite-migration-DyUPHRKW-CFtZi2VG.d.mts.map +1 -0
  26. package/dist/{render-ops-Dq0lrks_-BNZp7Sj9.mjs → render-ops-CwuscSzF-D3hoxOT_.mjs} +3 -3
  27. package/dist/{render-ops-Dq0lrks_-BNZp7Sj9.mjs.map → render-ops-CwuscSzF-D3hoxOT_.mjs.map} +1 -1
  28. package/dist/{sqlite-migration-DXkxomAv-BSjN30Zu.mjs → sqlite-migration-BLyz5GQr-BMImgGTB.mjs} +24 -3
  29. package/dist/sqlite-migration-BLyz5GQr-BMImgGTB.mjs.map +1 -0
  30. package/dist/{sqlite-migration-BNHxL3Xy-CGdqsq1O.d.mts → sqlite-migration-CcXBptQr-DlKSNedI.d.mts} +29 -3
  31. package/dist/sqlite-migration-CcXBptQr-DlKSNedI.d.mts.map +1 -0
  32. package/dist/target.d.mts +9 -9
  33. package/dist/target.mjs +7 -7
  34. package/dist/target__aggregates.d.mts +1 -1
  35. package/dist/target__control.mjs +44 -5
  36. package/dist/target__control.mjs.map +1 -1
  37. package/dist/target__migration.d.mts +2 -2
  38. package/dist/target__migration.mjs +2 -2
  39. package/dist/target__op-factory-call.d.mts +2 -2
  40. package/dist/target__op-factory-call.mjs +2 -2
  41. package/dist/target__pack.d.mts +1 -1
  42. package/dist/target__planner-produced-sqlite-migration.d.mts +2 -2
  43. package/dist/target__planner-produced-sqlite-migration.mjs +1 -1
  44. package/dist/target__planner.d.mts +1 -1
  45. package/dist/target__planner.mjs +1 -1
  46. package/dist/target__render-ops.mjs +1 -1
  47. package/package.json +9 -9
  48. package/dist/op-factory-call-lluKW6u9-D2x8W4qv.mjs.map +0 -1
  49. package/dist/planner-B73VGVF0-Dl4v3Bcx.mjs.map +0 -1
  50. package/dist/planner-produced-sqlite-migration-BkkAIXsc.d.mts +0 -1
  51. package/dist/planner-produced-sqlite-migration-HnOjnBHx-B_d6P_xk.d.mts.map +0 -1
  52. package/dist/sqlite-migration-BNHxL3Xy-CGdqsq1O.d.mts.map +0 -1
  53. package/dist/sqlite-migration-DXkxomAv-BSjN30Zu.mjs.map +0 -1
@@ -2,16 +2,16 @@ import { n as sqliteError } from "./errors-DnR-sMHS-D_gh214a.mjs";
2
2
  import { n as sqliteTargetDescriptorMeta, t as sqliteScalarTypeConstructors } from "./descriptor-meta-COSGM3xb-Ct_5RPcm.mjs";
3
3
  import { r as quoteIdentifier } from "./sql-utils-XGT5Esi2-Zr2mqJf8.mjs";
4
4
  import { i as sqliteCreateNamespace, r as SqliteUnboundDatabase, t as SqliteContractSerializer } from "./sqlite-contract-view-CGfiGvKH-CT-JjNHd.mjs";
5
- import { g as conversionCopyOf, p as affinityStorageClasses, y as rebuiltTableName } from "./op-factory-call-lluKW6u9-D2x8W4qv.mjs";
6
- import { b as verifySqliteDatabaseSchema, h as sqliteContractToSchema, o as diffSqliteSchema } from "./sqlite-migration-DXkxomAv-BSjN30Zu.mjs";
7
- import { n as createSqliteMigrationPlanner } from "./planner-B73VGVF0-Dl4v3Bcx.mjs";
5
+ import { h as affinityStorageClasses, v as conversionCopyOf, x as rebuiltTableName } from "./op-factory-call-DADakw8V-yXzHuXlv.mjs";
6
+ import { b as verifySqliteDatabaseSchema, h as sqliteContractToSchema, o as diffSqliteSchema } from "./sqlite-migration-BLyz5GQr-BMImgGTB.mjs";
7
+ import { n as createSqliteMigrationPlanner, r as keepRowsEdit } from "./planner-1zVd0jR2-mkF3bIWw.mjs";
8
8
  import { ifDefined } from "@prisma/orm-framework/utils/defined";
9
9
  import { blindCast } from "@prisma/orm-framework/utils/casts";
10
10
  import { InternalError } from "@prisma/orm-framework/utils/internal-error";
11
11
  import { APP_SPACE_ID, failedPostcheckWhy, failedPrecheckWhy, schemaCheckWhy, withDatabaseUnchanged, withFailingSpace } from "@prisma/orm-framework/components/control";
12
12
  import { SqlStorage } from "@prisma/orm-family-sql/contract/types";
13
13
  import { SqlSchemaVerifierBase } from "@prisma/orm-family-sql/family/ir";
14
- import { convertedColumnOf, fieldOfColumn, requiredColumnsOfMigration, rowsWithoutValueFailure, runnerFailure, runnerSuccess, sqlTypeLookupsOf, unconvertedFieldOf } from "@prisma/orm-family-sql/family/control";
14
+ import { convertedColumnOf, fieldOfColumn, requiredColumnsOfMigration, rowsHoldingValueOf, rowsHoldingValueSummary, rowsWithoutValueFailure, runnerFailure, runnerSuccess, sqlTypeLookupsOf, unconvertedFieldOf } from "@prisma/orm-family-sql/family/control";
15
15
  import { relationalNodeEntityKind, relationalNodeGranularity } from "@prisma/orm-family-sql/schema-ir/types";
16
16
  import { notOk, ok, okVoid } from "@prisma/orm-framework/utils/result";
17
17
  import { SqlConnectionError, SqlQueryError } from "@prisma/orm-family-sql/errors";
@@ -188,7 +188,10 @@ var SqliteMigrationRunner = class {
188
188
  }
189
189
  }
190
190
  if (runPrechecks) {
191
- const precheckResult = await this.runExpectationSteps(driver, operation.precheck, operation, "precheck");
191
+ const precheckResult = await this.runExpectationSteps(driver, operation.precheck, operation, "precheck", {
192
+ contract: options.destinationContract,
193
+ operationIndex: ops.indexOf(operation)
194
+ });
192
195
  if (!precheckResult.ok) return precheckResult;
193
196
  }
194
197
  const executeResult = await this.runExecuteSteps(driver, operation.execute, operation, {
@@ -234,6 +237,14 @@ var SqliteMigrationRunner = class {
234
237
  description: step.description,
235
238
  ...ifDefined("expectation", step.expectation)
236
239
  };
240
+ const holding = phase === "precheck" && plan !== void 0 ? await this.rowsHoldingValue(driver, step, operation, plan.operationIndex) : void 0;
241
+ if (holding !== void 0) return runnerFailure(code, holding.summary, {
242
+ why: `Operation ${operation.id} failed during ${phase}: ${step.description}`,
243
+ meta: {
244
+ failedCheck,
245
+ rowsHoldingValue: holding.report
246
+ }
247
+ });
237
248
  const unconverted = converted === void 0 ? void 0 : await this.unconvertedValueText(driver, converted);
238
249
  return runnerFailure(code, `Operation ${operation.id} failed during ${phase}: ${step.description}`, {
239
250
  ...ifDefined("why", unconverted ?? (phase === "precheck" ? failedPrecheckWhy(failedCheck) : failedPostcheckWhy(failedCheck))),
@@ -256,6 +267,34 @@ var SqliteMigrationRunner = class {
256
267
  }
257
268
  return okVoid();
258
269
  }
270
+ /**
271
+ * Counts the rows that hold the stored value a removal check guards, as `rowsHoldingValueMeta`
272
+ * marks the check. A count that fails leaves the failure without it.
273
+ */
274
+ async rowsHoldingValue(driver, step, operation, operationIndex) {
275
+ const mark = rowsHoldingValueOf(step);
276
+ const details = operation.target.details;
277
+ const stored = step.params?.[0];
278
+ if (mark === void 0 || details?.table === void 0) return void 0;
279
+ if (typeof stored !== "string" && typeof stored !== "number") return void 0;
280
+ let rows;
281
+ try {
282
+ const counted = await driver.query(`SELECT COUNT(*) AS rows FROM ${quoteIdentifier(details.table)} WHERE ${quoteIdentifier(details.name)} = ?`, [stored]);
283
+ rows = Number(counted.rows[0]?.rows ?? 0);
284
+ } catch {
285
+ return;
286
+ }
287
+ return {
288
+ summary: rowsHoldingValueSummary(details.table, details.name, stored, rows),
289
+ report: {
290
+ enumValue: mark.enumValue,
291
+ value: stored,
292
+ rows,
293
+ operationIndex,
294
+ keepDataEdit: keepRowsEdit(details.table, details.name, mark)
295
+ }
296
+ };
297
+ }
259
298
  /** Names the first value of a retyped column that kept a storage class its new type does not hold. */
260
299
  async unconvertedValueText(driver, cast) {
261
300
  const typeSql = (await driver.query("SELECT type FROM pragma_table_info(?) WHERE name = ?", [cast.table, cast.column])).rows[0]?.type;
@@ -1 +1 @@
1
- {"version":3,"file":"target__control.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/control.mjs"],"sourcesContent":["import { n as sqliteError } from \"./errors-DnR-sMHS.mjs\";\nimport { n as sqliteScalarTypeConstructors, t as sqliteTargetDescriptorMeta } from \"./descriptor-meta-COSGM3xb.mjs\";\nimport { r as quoteIdentifier } from \"./sql-utils-XGT5Esi2.mjs\";\nimport { i as sqliteCreateNamespace, n as SqliteContractSerializer, r as SqliteUnboundDatabase } from \"./sqlite-contract-view-CGfiGvKH.mjs\";\nimport { _ as diffSqliteSchema, b as verifySqliteDatabaseSchema, y as sqliteContractToSchema } from \"./sqlite-migration-DXkxomAv.mjs\";\nimport { _ as conversionCopyOf, m as affinityStorageClasses, v as rebuiltTableName } from \"./op-factory-call-lluKW6u9.mjs\";\nimport { n as createSqliteMigrationPlanner } from \"./planner-B73VGVF0.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { APP_SPACE_ID, failedPostcheckWhy, failedPrecheckWhy, schemaCheckWhy, withDatabaseUnchanged, withFailingSpace } from \"@internal/framework-components/control\";\nimport { convertedColumnOf, fieldOfColumn, requiredColumnsOfMigration, rowsWithoutValueFailure, runnerFailure, runnerSuccess, sqlTypeLookupsOf, unconvertedFieldOf } from \"@internal/family-sql/control\";\nimport { SqlStorage } from \"@internal/sql-contract/types\";\nimport { relationalNodeEntityKind, relationalNodeGranularity } from \"@internal/sql-schema-ir/types\";\nimport { SqlSchemaVerifierBase } from \"@internal/family-sql/ir\";\nimport { notOk, ok, okVoid } from \"@internal/utils/result\";\nimport { SqlConnectionError, SqlQueryError } from \"@internal/sql-errors\";\n//#region src/core/migrations/runner.ts\nconst NOT_NULL_VIOLATION_SQLSTATE = \"23502\";\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: schemaCheckWhy(schemaVerifyResult.schema.issues),\n\t\t\t\tmeta: { schemaIssues: 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\tlet result;\n\t\ttry {\n\t\t\tresult = await this.executeInTransaction(driver, perSpaceOptions, fkWasEnabled);\n\t\t} catch (error) {\n\t\t\tif (fkWasEnabled) await this.afterFailure(driver.query(\"PRAGMA foreign_keys = ON\"));\n\t\t\tthrow error;\n\t\t}\n\t\tif (fkWasEnabled) {\n\t\t\tconst restore = driver.query(\"PRAGMA foreign_keys = ON\");\n\t\t\tawait (result.ok ? restore : this.afterFailure(restore));\n\t\t}\n\t\treturn result;\n\t}\n\tasync executeInTransaction(driver, perSpaceOptions, fkWasEnabled) {\n\t\tawait this.beginExclusiveTransaction(driver);\n\t\tlet result;\n\t\ttry {\n\t\t\tresult = await this.executeSpaces(driver, perSpaceOptions, fkWasEnabled);\n\t\t} catch (error) {\n\t\t\tawait this.afterFailure(this.rollbackTransaction(driver));\n\t\t\tthrow error;\n\t\t}\n\t\tif (!result.ok) {\n\t\t\tawait this.afterFailure(this.rollbackTransaction(driver));\n\t\t\treturn notOk(withDatabaseUnchanged(result.failure, true));\n\t\t}\n\t\ttry {\n\t\t\tawait this.commitTransaction(driver);\n\t\t} catch (error) {\n\t\t\tawait this.afterFailure(this.rollbackTransaction(driver));\n\t\t\tthrow error;\n\t\t}\n\t\treturn result;\n\t}\n\tasync afterFailure(cleanup) {\n\t\tawait cleanup.catch(() => void 0);\n\t}\n\tasync executeSpaces(driver, perSpaceOptions, fkWasEnabled) {\n\t\tconst perSpaceResults = [];\n\t\tlet lastProcessedSpace;\n\t\tfor (const spaceOptions of perSpaceOptions) {\n\t\t\tconst space = spaceOptions.space ?? spaceOptions.plan.spaceId;\n\t\t\tconst result = await this.executeOnConnection({\n\t\t\t\t...spaceOptions,\n\t\t\t\tdriver,\n\t\t\t\tspace\n\t\t\t});\n\t\t\tif (!result.ok) return notOk(withFailingSpace(result.failure, space));\n\t\t\tperSpaceResults.push({\n\t\t\t\tspace,\n\t\t\t\tvalue: result.value\n\t\t\t});\n\t\t\tlastProcessedSpace = space;\n\t\t}\n\t\tif (fkWasEnabled) {\n\t\t\tconst fkIntegrityCheck = await this.verifyForeignKeyIntegrity(driver);\n\t\t\tif (!fkIntegrityCheck.ok) return notOk(withFailingSpace(fkIntegrityCheck.failure, lastProcessedSpace ?? APP_SPACE_ID));\n\t\t}\n\t\treturn ok({ perSpaceResults });\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\t\tcontract: options.destinationContract,\n\t\t\t\t\toperationIndex: ops.indexOf(operation),\n\t\t\t\t\toperations: ops,\n\t\t\t\t\tedges: options.migrationEdges\n\t\t\t\t});\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\t\tcontract: options.destinationContract,\n\t\t\t\t\t\toperationIndex: ops.indexOf(operation)\n\t\t\t\t\t});\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 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 runExpectationSteps(driver, steps, operation, phase, plan) {\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)) {\n\t\t\t\tconst code = phase === \"precheck\" ? \"MIGRATION.PRECHECK_FAILED\" : \"MIGRATION.POSTCHECK_FAILED\";\n\t\t\t\tconst field = plan === void 0 ? void 0 : unconvertedFieldOf(step, plan.contract);\n\t\t\t\tconst converted = convertedColumnOf(step);\n\t\t\t\tconst failedCheck = {\n\t\t\t\t\toperationId: operation.id,\n\t\t\t\t\tphase,\n\t\t\t\t\tdescription: step.description,\n\t\t\t\t\t...ifDefined(\"expectation\", step.expectation)\n\t\t\t\t};\n\t\t\t\tconst unconverted = converted === void 0 ? void 0 : await this.unconvertedValueText(driver, converted);\n\t\t\t\treturn runnerFailure(code, `Operation ${operation.id} failed during ${phase}: ${step.description}`, {\n\t\t\t\t\t...ifDefined(\"why\", unconverted ?? (phase === \"precheck\" ? failedPrecheckWhy(failedCheck) : failedPostcheckWhy(failedCheck))),\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tfailedCheck,\n\t\t\t\t\t\t...ifDefined(\"failedTypeChange\", field === void 0 || plan === void 0 || converted === void 0 ? void 0 : converted.by === \"conversion\" ? {\n\t\t\t\t\t\t\tfield,\n\t\t\t\t\t\t\tby: \"conversion\",\n\t\t\t\t\t\t\treason: \"invalidResult\",\n\t\t\t\t\t\t\toperationIndex: plan.operationIndex\n\t\t\t\t\t\t} : {\n\t\t\t\t\t\t\tfield,\n\t\t\t\t\t\t\tby: \"cast\",\n\t\t\t\t\t\t\treason: \"value\",\n\t\t\t\t\t\t\toperationIndex: plan.operationIndex\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn okVoid();\n\t}\n\t/** Names the first value of a retyped column that kept a storage class its new type does not hold. */\n\tasync unconvertedValueText(driver, cast) {\n\t\tconst typeSql = (await driver.query(\"SELECT type FROM pragma_table_info(?) WHERE name = ?\", [cast.table, cast.column])).rows[0]?.type;\n\t\tif (typeSql === void 0) return void 0;\n\t\tconst column = quoteIdentifier(cast.column);\n\t\tconst classes = [\"null\", ...affinityStorageClasses(typeSql)];\n\t\tconst row = (await driver.query(`SELECT quote(${column}) AS value, typeof(${column}) AS storageClass FROM ${quoteIdentifier(cast.table)} WHERE typeof(${column}) NOT IN (${classes.map(() => \"?\").join(\", \")}) LIMIT 1`, classes)).rows[0];\n\t\tif (row === void 0) return void 0;\n\t\treturn `The value ${row.value.length > 40 ? `${row.value.slice(0, 40)}…` : row.value} of column \"${cast.column}\" on \"${cast.table}\" is still stored as ${row.storageClass}, which ${typeSql} cannot hold.`;\n\t}\n\tasync runExecuteSteps(driver, steps, operation, plan) {\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\tconst failed = `Operation ${operation.id} failed during execution: ${step.description}`;\n\t\t\tif (SqlConnectionError.is(error)) return runnerFailure(\"MIGRATION.EXECUTION_FAILED\", failed, {\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\tconnectionLost: error.transient === false,\n\t\t\t\t\ttransient: error.transient\n\t\t\t\t}\n\t\t\t});\n\t\t\tconst rowsWithoutValue = await this.rowsWithoutValue(driver, error, plan);\n\t\t\tconst failedConversion = rowsWithoutValue === void 0 ? await this.failedConversion(driver, step, error, plan) : void 0;\n\t\t\treturn runnerFailure(\"MIGRATION.EXECUTION_FAILED\", rowsWithoutValue?.summary ?? failed, {\n\t\t\t\twhy: rowsWithoutValue === void 0 ? message : `${failed}: ${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\t...ifDefined(\"rowsWithoutValue\", rowsWithoutValue?.reports),\n\t\t\t\t\t...ifDefined(\"failedTypeChange\", failedConversion)\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn okVoid();\n\t}\n\t/**\n\t* The conversion that failed, when the failed step is the copy of a rebuild that converts columns\n\t* and there is evidence for it: a copy expression that fails on its own has an error in its\n\t* expression, and a constraint of the new table that names a converted column was broken by a\n\t* value the conversion produced. Any other failure of the copy is not the conversion's.\n\t*/\n\tasync failedConversion(driver, step, error, plan) {\n\t\tconst copy = conversionCopyOf(step);\n\t\tif (copy === void 0) return void 0;\n\t\tconst columns = Object.keys(copy.expressions);\n\t\tconst failed = async (column) => {\n\t\t\ttry {\n\t\t\t\tawait driver.query(`SELECT ${copy.expressions[column]} FROM ${quoteIdentifier(copy.table)}`);\n\t\t\t\treturn false;\n\t\t\t} catch {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tfor (const column of columns) if (await failed(column)) return this.conversionOf(plan, copy.table, column, \"expressionError\");\n\t\tconst constrainedList = SqlQueryError.is(error) ? error.constraint : void 0;\n\t\tif (constrainedList === void 0) return void 0;\n\t\tconst constrained = new Set(constrainedList.split(\", \"));\n\t\tconst column = columns.find((name) => constrained.has(`${rebuiltTableName(copy.table)}.${name}`));\n\t\treturn column === void 0 ? void 0 : this.conversionOf(plan, copy.table, column, \"invalidResult\");\n\t}\n\tconversionOf(plan, table, column, reason) {\n\t\tconst field = fieldOfColumn(plan.contract, table, column);\n\t\treturn field === void 0 ? void 0 : {\n\t\t\tfield,\n\t\t\tby: \"conversion\",\n\t\t\treason,\n\t\t\toperationIndex: plan.operationIndex\n\t\t};\n\t}\n\t/**\n\t* The rows a table rebuild found no value for, when its copy failed on a NOT NULL column of the\n\t* new table: the columns the rebuild's postchecks mark as becoming required are counted, the\n\t* rebuild's own first, then those of every other operation of its migration.\n\t*/\n\trowsWithoutValue(driver, error, plan) {\n\t\tif (!(SqlQueryError.is(error) && error.sqlState === NOT_NULL_VIOLATION_SQLSTATE)) return Promise.resolve(void 0);\n\t\tconst marks = requiredColumnsOfMigration(plan.operations, plan.edges, plan.operationIndex);\n\t\treturn rowsWithoutValueFailure({\n\t\t\tfailed: marks.filter((mark) => mark.operationIndex === plan.operationIndex),\n\t\t\tothers: marks,\n\t\t\tcount: async ({ required }) => {\n\t\t\t\tconst where = required.reason !== \"newField\" ? ` WHERE ${quoteIdentifier(required.column)} IS NULL` : \"\";\n\t\t\t\treturn (await driver.query(`SELECT COUNT(*) AS rows FROM ${quoteIdentifier(required.table)}${where}`)).rows[0]?.rows ?? 0;\n\t\t\t},\n\t\t\tcontract: plan.contract\n\t\t});\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/migrations/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/migrations/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\nexport { SqliteUnboundDatabase, sqliteControlTargetDescriptor as default, sqliteCreateNamespace, sqliteScalarTypeConstructors };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,8BAA8B;AACpC,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,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;CAChC,OAAO,aAAa,QAAQ,SAAS,mBAAmB;AACzD;AACA,MAAM,gCAAgC;CACrC,GAAG;CACH,oBAAoB,IAAI,yBAAyB;CACjD,gBAAgB,IAAI,qBAAqB;CACzC,WAAW,OAAO;EACjB,OAAO,iBAAiB,KAAK;CAC9B;CACA,4BAA4B;CAC5B,oBAAoB;CACpB,YAAY;EACX,cAAc,SAAS;GACtB,OAAO,6BAA6B,OAAO;EAC5C;EACA,aAAa,QAAQ;GACpB,OAAO,4BAA4B,MAAM;EAC1C;EACA,iBAAiB,UAAU,qBAAqB;GAC/C,IAAI,CAAC,cAAc,QAAQ,GAAG,MAAM,YAAY,4BAA4B,2GAA2G;GACvL,OAAO,uBAAuB,UAAU,iBAAiB,mBAAmB,CAAC;EAC9E;CACD;CACA,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;CACA,cAAc,SAAS;EACtB,OAAO,6BAA6B,OAAO;CAC5C;CACA,aAAa,QAAQ;EACpB,OAAO,4BAA4B,MAAM;CAC1C;AACD"}
1
+ {"version":3,"file":"target__control.mjs","names":[],"sources":["../../../../3-targets/sqlite/1-target/dist/control.mjs"],"sourcesContent":["import { n as sqliteError } from \"./errors-DnR-sMHS.mjs\";\nimport { n as sqliteScalarTypeConstructors, t as sqliteTargetDescriptorMeta } from \"./descriptor-meta-COSGM3xb.mjs\";\nimport { r as quoteIdentifier } from \"./sql-utils-XGT5Esi2.mjs\";\nimport { i as sqliteCreateNamespace, n as SqliteContractSerializer, r as SqliteUnboundDatabase } from \"./sqlite-contract-view-CGfiGvKH.mjs\";\nimport { _ as diffSqliteSchema, b as verifySqliteDatabaseSchema, y as sqliteContractToSchema } from \"./sqlite-migration-BLyz5GQr.mjs\";\nimport { b as rebuiltTableName, g as affinityStorageClasses, y as conversionCopyOf } from \"./op-factory-call-DADakw8V.mjs\";\nimport { n as createSqliteMigrationPlanner, r as keepRowsEdit } from \"./planner-1zVd0jR2.mjs\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { InternalError } from \"@internal/utils/internal-error\";\nimport { APP_SPACE_ID, failedPostcheckWhy, failedPrecheckWhy, schemaCheckWhy, withDatabaseUnchanged, withFailingSpace } from \"@internal/framework-components/control\";\nimport { convertedColumnOf, fieldOfColumn, requiredColumnsOfMigration, rowsHoldingValueOf, rowsHoldingValueSummary, rowsWithoutValueFailure, runnerFailure, runnerSuccess, sqlTypeLookupsOf, unconvertedFieldOf } from \"@internal/family-sql/control\";\nimport { SqlStorage } from \"@internal/sql-contract/types\";\nimport { relationalNodeEntityKind, relationalNodeGranularity } from \"@internal/sql-schema-ir/types\";\nimport { SqlSchemaVerifierBase } from \"@internal/family-sql/ir\";\nimport { notOk, ok, okVoid } from \"@internal/utils/result\";\nimport { SqlConnectionError, SqlQueryError } from \"@internal/sql-errors\";\n//#region src/core/migrations/runner.ts\nconst NOT_NULL_VIOLATION_SQLSTATE = \"23502\";\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: schemaCheckWhy(schemaVerifyResult.schema.issues),\n\t\t\t\tmeta: { schemaIssues: 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\tlet result;\n\t\ttry {\n\t\t\tresult = await this.executeInTransaction(driver, perSpaceOptions, fkWasEnabled);\n\t\t} catch (error) {\n\t\t\tif (fkWasEnabled) await this.afterFailure(driver.query(\"PRAGMA foreign_keys = ON\"));\n\t\t\tthrow error;\n\t\t}\n\t\tif (fkWasEnabled) {\n\t\t\tconst restore = driver.query(\"PRAGMA foreign_keys = ON\");\n\t\t\tawait (result.ok ? restore : this.afterFailure(restore));\n\t\t}\n\t\treturn result;\n\t}\n\tasync executeInTransaction(driver, perSpaceOptions, fkWasEnabled) {\n\t\tawait this.beginExclusiveTransaction(driver);\n\t\tlet result;\n\t\ttry {\n\t\t\tresult = await this.executeSpaces(driver, perSpaceOptions, fkWasEnabled);\n\t\t} catch (error) {\n\t\t\tawait this.afterFailure(this.rollbackTransaction(driver));\n\t\t\tthrow error;\n\t\t}\n\t\tif (!result.ok) {\n\t\t\tawait this.afterFailure(this.rollbackTransaction(driver));\n\t\t\treturn notOk(withDatabaseUnchanged(result.failure, true));\n\t\t}\n\t\ttry {\n\t\t\tawait this.commitTransaction(driver);\n\t\t} catch (error) {\n\t\t\tawait this.afterFailure(this.rollbackTransaction(driver));\n\t\t\tthrow error;\n\t\t}\n\t\treturn result;\n\t}\n\tasync afterFailure(cleanup) {\n\t\tawait cleanup.catch(() => void 0);\n\t}\n\tasync executeSpaces(driver, perSpaceOptions, fkWasEnabled) {\n\t\tconst perSpaceResults = [];\n\t\tlet lastProcessedSpace;\n\t\tfor (const spaceOptions of perSpaceOptions) {\n\t\t\tconst space = spaceOptions.space ?? spaceOptions.plan.spaceId;\n\t\t\tconst result = await this.executeOnConnection({\n\t\t\t\t...spaceOptions,\n\t\t\t\tdriver,\n\t\t\t\tspace\n\t\t\t});\n\t\t\tif (!result.ok) return notOk(withFailingSpace(result.failure, space));\n\t\t\tperSpaceResults.push({\n\t\t\t\tspace,\n\t\t\t\tvalue: result.value\n\t\t\t});\n\t\t\tlastProcessedSpace = space;\n\t\t}\n\t\tif (fkWasEnabled) {\n\t\t\tconst fkIntegrityCheck = await this.verifyForeignKeyIntegrity(driver);\n\t\t\tif (!fkIntegrityCheck.ok) return notOk(withFailingSpace(fkIntegrityCheck.failure, lastProcessedSpace ?? APP_SPACE_ID));\n\t\t}\n\t\treturn ok({ perSpaceResults });\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\t\tcontract: options.destinationContract,\n\t\t\t\t\t\toperationIndex: ops.indexOf(operation)\n\t\t\t\t\t});\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\t\tcontract: options.destinationContract,\n\t\t\t\t\toperationIndex: ops.indexOf(operation),\n\t\t\t\t\toperations: ops,\n\t\t\t\t\tedges: options.migrationEdges\n\t\t\t\t});\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\t\tcontract: options.destinationContract,\n\t\t\t\t\t\toperationIndex: ops.indexOf(operation)\n\t\t\t\t\t});\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 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 runExpectationSteps(driver, steps, operation, phase, plan) {\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)) {\n\t\t\t\tconst code = phase === \"precheck\" ? \"MIGRATION.PRECHECK_FAILED\" : \"MIGRATION.POSTCHECK_FAILED\";\n\t\t\t\tconst field = plan === void 0 ? void 0 : unconvertedFieldOf(step, plan.contract);\n\t\t\t\tconst converted = convertedColumnOf(step);\n\t\t\t\tconst failedCheck = {\n\t\t\t\t\toperationId: operation.id,\n\t\t\t\t\tphase,\n\t\t\t\t\tdescription: step.description,\n\t\t\t\t\t...ifDefined(\"expectation\", step.expectation)\n\t\t\t\t};\n\t\t\t\tconst holding = phase === \"precheck\" && plan !== void 0 ? await this.rowsHoldingValue(driver, step, operation, plan.operationIndex) : void 0;\n\t\t\t\tif (holding !== void 0) return runnerFailure(code, holding.summary, {\n\t\t\t\t\twhy: `Operation ${operation.id} failed during ${phase}: ${step.description}`,\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tfailedCheck,\n\t\t\t\t\t\trowsHoldingValue: holding.report\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\tconst unconverted = converted === void 0 ? void 0 : await this.unconvertedValueText(driver, converted);\n\t\t\t\treturn runnerFailure(code, `Operation ${operation.id} failed during ${phase}: ${step.description}`, {\n\t\t\t\t\t...ifDefined(\"why\", unconverted ?? (phase === \"precheck\" ? failedPrecheckWhy(failedCheck) : failedPostcheckWhy(failedCheck))),\n\t\t\t\t\tmeta: {\n\t\t\t\t\t\tfailedCheck,\n\t\t\t\t\t\t...ifDefined(\"failedTypeChange\", field === void 0 || plan === void 0 || converted === void 0 ? void 0 : converted.by === \"conversion\" ? {\n\t\t\t\t\t\t\tfield,\n\t\t\t\t\t\t\tby: \"conversion\",\n\t\t\t\t\t\t\treason: \"invalidResult\",\n\t\t\t\t\t\t\toperationIndex: plan.operationIndex\n\t\t\t\t\t\t} : {\n\t\t\t\t\t\t\tfield,\n\t\t\t\t\t\t\tby: \"cast\",\n\t\t\t\t\t\t\treason: \"value\",\n\t\t\t\t\t\t\toperationIndex: plan.operationIndex\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn okVoid();\n\t}\n\t/**\n\t* Counts the rows that hold the stored value a removal check guards, as `rowsHoldingValueMeta`\n\t* marks the check. A count that fails leaves the failure without it.\n\t*/\n\tasync rowsHoldingValue(driver, step, operation, operationIndex) {\n\t\tconst mark = rowsHoldingValueOf(step);\n\t\tconst details = operation.target.details;\n\t\tconst stored = step.params?.[0];\n\t\tif (mark === void 0 || details?.table === void 0) return void 0;\n\t\tif (typeof stored !== \"string\" && typeof stored !== \"number\") return void 0;\n\t\tlet rows;\n\t\ttry {\n\t\t\tconst counted = await driver.query(`SELECT COUNT(*) AS rows FROM ${quoteIdentifier(details.table)} WHERE ${quoteIdentifier(details.name)} = ?`, [stored]);\n\t\t\trows = Number(counted.rows[0]?.rows ?? 0);\n\t\t} catch {\n\t\t\treturn;\n\t\t}\n\t\treturn {\n\t\t\tsummary: rowsHoldingValueSummary(details.table, details.name, stored, rows),\n\t\t\treport: {\n\t\t\t\tenumValue: mark.enumValue,\n\t\t\t\tvalue: stored,\n\t\t\t\trows,\n\t\t\t\toperationIndex,\n\t\t\t\tkeepDataEdit: keepRowsEdit(details.table, details.name, mark)\n\t\t\t}\n\t\t};\n\t}\n\t/** Names the first value of a retyped column that kept a storage class its new type does not hold. */\n\tasync unconvertedValueText(driver, cast) {\n\t\tconst typeSql = (await driver.query(\"SELECT type FROM pragma_table_info(?) WHERE name = ?\", [cast.table, cast.column])).rows[0]?.type;\n\t\tif (typeSql === void 0) return void 0;\n\t\tconst column = quoteIdentifier(cast.column);\n\t\tconst classes = [\"null\", ...affinityStorageClasses(typeSql)];\n\t\tconst row = (await driver.query(`SELECT quote(${column}) AS value, typeof(${column}) AS storageClass FROM ${quoteIdentifier(cast.table)} WHERE typeof(${column}) NOT IN (${classes.map(() => \"?\").join(\", \")}) LIMIT 1`, classes)).rows[0];\n\t\tif (row === void 0) return void 0;\n\t\treturn `The value ${row.value.length > 40 ? `${row.value.slice(0, 40)}…` : row.value} of column \"${cast.column}\" on \"${cast.table}\" is still stored as ${row.storageClass}, which ${typeSql} cannot hold.`;\n\t}\n\tasync runExecuteSteps(driver, steps, operation, plan) {\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\tconst failed = `Operation ${operation.id} failed during execution: ${step.description}`;\n\t\t\tif (SqlConnectionError.is(error)) return runnerFailure(\"MIGRATION.EXECUTION_FAILED\", failed, {\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\tconnectionLost: error.transient === false,\n\t\t\t\t\ttransient: error.transient\n\t\t\t\t}\n\t\t\t});\n\t\t\tconst rowsWithoutValue = await this.rowsWithoutValue(driver, error, plan);\n\t\t\tconst failedConversion = rowsWithoutValue === void 0 ? await this.failedConversion(driver, step, error, plan) : void 0;\n\t\t\treturn runnerFailure(\"MIGRATION.EXECUTION_FAILED\", rowsWithoutValue?.summary ?? failed, {\n\t\t\t\twhy: rowsWithoutValue === void 0 ? message : `${failed}: ${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\t...ifDefined(\"rowsWithoutValue\", rowsWithoutValue?.reports),\n\t\t\t\t\t...ifDefined(\"failedTypeChange\", failedConversion)\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t\treturn okVoid();\n\t}\n\t/**\n\t* The conversion that failed, when the failed step is the copy of a rebuild that converts columns\n\t* and there is evidence for it: a copy expression that fails on its own has an error in its\n\t* expression, and a constraint of the new table that names a converted column was broken by a\n\t* value the conversion produced. Any other failure of the copy is not the conversion's.\n\t*/\n\tasync failedConversion(driver, step, error, plan) {\n\t\tconst copy = conversionCopyOf(step);\n\t\tif (copy === void 0) return void 0;\n\t\tconst columns = Object.keys(copy.expressions);\n\t\tconst failed = async (column) => {\n\t\t\ttry {\n\t\t\t\tawait driver.query(`SELECT ${copy.expressions[column]} FROM ${quoteIdentifier(copy.table)}`);\n\t\t\t\treturn false;\n\t\t\t} catch {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t};\n\t\tfor (const column of columns) if (await failed(column)) return this.conversionOf(plan, copy.table, column, \"expressionError\");\n\t\tconst constrainedList = SqlQueryError.is(error) ? error.constraint : void 0;\n\t\tif (constrainedList === void 0) return void 0;\n\t\tconst constrained = new Set(constrainedList.split(\", \"));\n\t\tconst column = columns.find((name) => constrained.has(`${rebuiltTableName(copy.table)}.${name}`));\n\t\treturn column === void 0 ? void 0 : this.conversionOf(plan, copy.table, column, \"invalidResult\");\n\t}\n\tconversionOf(plan, table, column, reason) {\n\t\tconst field = fieldOfColumn(plan.contract, table, column);\n\t\treturn field === void 0 ? void 0 : {\n\t\t\tfield,\n\t\t\tby: \"conversion\",\n\t\t\treason,\n\t\t\toperationIndex: plan.operationIndex\n\t\t};\n\t}\n\t/**\n\t* The rows a table rebuild found no value for, when its copy failed on a NOT NULL column of the\n\t* new table: the columns the rebuild's postchecks mark as becoming required are counted, the\n\t* rebuild's own first, then those of every other operation of its migration.\n\t*/\n\trowsWithoutValue(driver, error, plan) {\n\t\tif (!(SqlQueryError.is(error) && error.sqlState === NOT_NULL_VIOLATION_SQLSTATE)) return Promise.resolve(void 0);\n\t\tconst marks = requiredColumnsOfMigration(plan.operations, plan.edges, plan.operationIndex);\n\t\treturn rowsWithoutValueFailure({\n\t\t\tfailed: marks.filter((mark) => mark.operationIndex === plan.operationIndex),\n\t\t\tothers: marks,\n\t\t\tcount: async ({ required }) => {\n\t\t\t\tconst where = required.reason !== \"newField\" ? ` WHERE ${quoteIdentifier(required.column)} IS NULL` : \"\";\n\t\t\t\treturn (await driver.query(`SELECT COUNT(*) AS rows FROM ${quoteIdentifier(required.table)}${where}`)).rows[0]?.rows ?? 0;\n\t\t\t},\n\t\t\tcontract: plan.contract\n\t\t});\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/migrations/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/migrations/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\nexport { SqliteUnboundDatabase, sqliteControlTargetDescriptor as default, sqliteCreateNamespace, sqliteScalarTypeConstructors };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,8BAA8B;AACpC,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,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iB,QAAQ,WAAW;EACzC,MAAM,OAAO,MAAM,UAAU,KAAK,UAAU,MAAM;CACnD;AACD;;;;;;AAQA,IAAI,uBAAuB,cAAc,sBAAsB;CAC9D,sBAAsB,UAAU;EAC/B,OAAO,CAAC;CACT;CACA,uBAAuB,UAAU;EAChC,OAAO,CAAC;CACT;AACD;AAGA,SAAS,cAAc,UAAU;CAChC,OAAO,aAAa,QAAQ,SAAS,mBAAmB;AACzD;AACA,MAAM,gCAAgC;CACrC,GAAG;CACH,oBAAoB,IAAI,yBAAyB;CACjD,gBAAgB,IAAI,qBAAqB;CACzC,WAAW,OAAO;EACjB,OAAO,iBAAiB,KAAK;CAC9B;CACA,4BAA4B;CAC5B,oBAAoB;CACpB,YAAY;EACX,cAAc,SAAS;GACtB,OAAO,6BAA6B,OAAO;EAC5C;EACA,aAAa,QAAQ;GACpB,OAAO,4BAA4B,MAAM;EAC1C;EACA,iBAAiB,UAAU,qBAAqB;GAC/C,IAAI,CAAC,cAAc,QAAQ,GAAG,MAAM,YAAY,4BAA4B,2GAA2G;GACvL,OAAO,uBAAuB,UAAU,iBAAiB,mBAAmB,CAAC;EAC9E;CACD;CACA,SAAS;EACR,OAAO;GACN,UAAU;GACV,UAAU;EACX;CACD;CACA,cAAc,SAAS;EACtB,OAAO,6BAA6B,OAAO;CAC5C;CACA,aAAa,QAAQ;EACpB,OAAO,4BAA4B,MAAM;CAC1C;AACD"}
@@ -1,3 +1,3 @@
1
- import { t as SqliteMigration } from "./sqlite-migration-BNHxL3Xy-CGdqsq1O.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-BiEvYZud.mjs";
1
+ import { t as SqliteMigration } from "./sqlite-migration-CcXBptQr-DlKSNedI.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-BHhnGEA2.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-DXkxomAv-BSjN30Zu.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-8iTYuvo3.mjs";
1
+ import { t as SqliteMigration } from "./sqlite-migration-BLyz5GQr-BMImgGTB.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-D0UlBTQw.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-CbRRVCjr.mjs";
2
- export { AddColumnCall, CreateIndexCall, CreateTableCall, DataTransformCall, DropColumnCall, DropIndexCall, DropTableCall, RawSqlCall, RecreateTableCall, RenameColumnCall, RenameTableCall, type SqliteOpFactoryCall };
1
+ import { a as DropColumnCall, c as RawSqlCall, d as RenameColumnCall, f as RenameTableCall, i as DataTransformCall, l as RecreateTableCall, m as SqliteOpFactoryCall, n as CreateIndexCall, o as DropIndexCall, p as ReplaceStoredValueCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RemoveStoredValueCall } from "./op-factory-call-B8bJlvkP.mjs";
2
+ export { AddColumnCall, CreateIndexCall, CreateTableCall, DataTransformCall, DropColumnCall, DropIndexCall, DropTableCall, RawSqlCall, RecreateTableCall, RemoveStoredValueCall, RenameColumnCall, RenameTableCall, ReplaceStoredValueCall, type SqliteOpFactoryCall };
@@ -1,2 +1,2 @@
1
- import { a as DropColumnCall, d as RenameColumnCall, f as RenameTableCall, i as DataTransformCall, l as RawSqlCall, n as CreateIndexCall, o as DropIndexCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RecreateTableCall } from "./op-factory-call-lluKW6u9-D2x8W4qv.mjs";
2
- export { AddColumnCall, CreateIndexCall, CreateTableCall, DataTransformCall, DropColumnCall, DropIndexCall, DropTableCall, RawSqlCall, RecreateTableCall, RenameColumnCall, RenameTableCall };
1
+ import { a as DropColumnCall, d as RemoveStoredValueCall, f as RenameColumnCall, i as DataTransformCall, l as RawSqlCall, m as ReplaceStoredValueCall, n as CreateIndexCall, o as DropIndexCall, p as RenameTableCall, r as CreateTableCall, s as DropTableCall, t as AddColumnCall, u as RecreateTableCall } from "./op-factory-call-DADakw8V-yXzHuXlv.mjs";
2
+ export { AddColumnCall, CreateIndexCall, CreateTableCall, DataTransformCall, DropColumnCall, DropIndexCall, DropTableCall, RawSqlCall, RecreateTableCall, RemoveStoredValueCall, RenameColumnCall, RenameTableCall, ReplaceStoredValueCall };
@@ -1,2 +1,2 @@
1
- import { t as sqliteTargetDescriptorMeta } from "./pack-BT-BNRPc.mjs";
1
+ import { t as sqliteTargetDescriptorMeta } from "./pack-B3YrlPJI.mjs";
2
2
  export { sqliteTargetDescriptorMeta as default };
@@ -1,3 +1,3 @@
1
- import { n as TypeScriptRenderableSqliteMigration, t as SqliteMigrationDestinationInfo } from "./planner-produced-sqlite-migration-HnOjnBHx-B_d6P_xk.mjs";
2
- import "./planner-produced-sqlite-migration-BkkAIXsc.mjs";
1
+ import { n as TypeScriptRenderableSqliteMigration, t as SqliteMigrationDestinationInfo } from "./planner-produced-sqlite-migration-DyUPHRKW-CFtZi2VG.mjs";
2
+ import "./planner-produced-sqlite-migration-DxyN096L.mjs";
3
3
  export { type SqliteMigrationDestinationInfo, TypeScriptRenderableSqliteMigration };
@@ -1,2 +1,2 @@
1
- import { t as TypeScriptRenderableSqliteMigration } from "./planner-produced-sqlite-migration-B-05qsmU-BpCrTiPQ.mjs";
1
+ import { t as TypeScriptRenderableSqliteMigration } from "./planner-produced-sqlite-migration-Dgme3v9a-BzrIbSW_.mjs";
2
2
  export { TypeScriptRenderableSqliteMigration };
@@ -1,2 +1,2 @@
1
- import { n as SqlitePlanResult, r as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-j4kgbkbY.mjs";
1
+ import { n as SqlitePlanResult, r as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-DcOz-1na.mjs";
2
2
  export { SqliteMigrationPlanner, type SqlitePlanResult, createSqliteMigrationPlanner };
@@ -1,2 +1,2 @@
1
- import { n as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-B73VGVF0-Dl4v3Bcx.mjs";
1
+ import { n as createSqliteMigrationPlanner, t as SqliteMigrationPlanner } from "./planner-1zVd0jR2-mkF3bIWw.mjs";
2
2
  export { SqliteMigrationPlanner, createSqliteMigrationPlanner };
@@ -1,2 +1,2 @@
1
- import { t as renderOps } from "./render-ops-Dq0lrks_-BNZp7Sj9.mjs";
1
+ import { t as renderOps } from "./render-ops-CwuscSzF-D3hoxOT_.mjs";
2
2
  export { renderOps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/orm-target-sqlite",
3
- "version": "8.0.0-rc.20-dev.8",
3
+ "version": "8.0.0-rc.20-dev.10",
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.20-dev.8",
13
- "@prisma/orm-framework": "8.0.0-rc.20-dev.8",
14
- "@prisma/orm-toolchain": "8.0.0-rc.20-dev.8",
12
+ "@prisma/orm-family-sql": "8.0.0-rc.20-dev.10",
13
+ "@prisma/orm-framework": "8.0.0-rc.20-dev.10",
14
+ "@prisma/orm-toolchain": "8.0.0-rc.20-dev.10",
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.20-dev.8",
21
- "@internal/driver-sqlite": "8.0.0-rc.20-dev.8",
22
- "@internal/target-sqlite": "8.0.0-rc.20-dev.8",
23
- "@repo/tsconfig": "8.0.0-rc.20-dev.8",
24
- "@repo/tsdown": "8.0.0-rc.20-dev.8",
20
+ "@internal/adapter-sqlite": "8.0.0-rc.20-dev.10",
21
+ "@internal/driver-sqlite": "8.0.0-rc.20-dev.10",
22
+ "@internal/target-sqlite": "8.0.0-rc.20-dev.10",
23
+ "@repo/tsconfig": "8.0.0-rc.20-dev.10",
24
+ "@repo/tsdown": "8.0.0-rc.20-dev.10",
25
25
  "tsdown": "0.22.14",
26
26
  "typescript": "5.9.3"
27
27
  },