@prisma/orm-family-sql 8.0.0-rc.19-dev.4 → 8.0.0-rc.19-dev.5

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.
@@ -1 +0,0 @@
1
- {"version":3,"file":"control-B_FwQQXi.mjs","names":["#fromContract","#contract","#policy","#target","#planModel","#planField","#operationCount","#controlPolicyRefusal","#emit","#renamedTables"],"sources":["../../../../2-sql/9-family/dist/control.mjs"],"sourcesContent":["import { a as sqlFamilyAuthoringTypes, c as sqlFamilyEntityTypes, l as sqlFamilyPslBlockDescriptors, n as sqlFamilyGeneratorDescriptors, r as sqlFamilyGeneratorFunctions, s as sqlFamilyAuthoringFieldPresets } from \"./generator-functions-DuDZSQHE.mjs\";\nimport { c as extractCodecControlHooks, n as classifyDiffSubjectGranularity, o as verifySqlSchemaByDiff, s as enforceSqlDataTypeInvariants, t as classifyDiffEntityKind } from \"./schema-verify-C3wbdviw.mjs\";\nimport { t as sqlFamilyError } from \"./errors-B5g0xWro.mjs\";\nimport { t as SqlContractSerializer } from \"./sql-contract-serializer-sMY3prTx.mjs\";\nimport { t as collectSupportedCodecTypeIds } from \"./verify-BVk5bjdH.mjs\";\nimport { isSqlDataType, nameIsCatalogText, renderSqlTypeName, sameSqlColumnType, sqlCodecColumnLength, sqlDataTypeOfCodec, sqlStorageType, unquotedSqlBaseName, validateSqlTypeParams } from \"@internal/sql-contract/data-type\";\nimport { SQL_EXPRESSION_TAG, printSqlExpressionLiteral, sqlExpressionRegistration, sqlTextsReadBack } from \"@internal/sql-contract/sql-expression\";\nimport { sqlEmission } from \"@internal/sql-contract-emitter\";\nimport { describeUnsupportedSqlAttribute, sqlAttributeSpecs } from \"@internal/sql-contract-psl/attribute-specs\";\nimport { describeUnresolvedSqlType } from \"@internal/sql-contract-psl/diagnostics\";\nimport { collectScalarTypeConstructors, tsTaggedTemplateSource } from \"@internal/framework-components/authoring\";\nimport { assembleDataTypes, codecForRef, dataTypeParams, objectSchemaKeys } from \"@internal/framework-components/codec\";\nimport { APP_SPACE_ID, SchemaTreeNode, VERIFY_CODE_HASH_MISMATCH, VERIFY_CODE_MARKER_MISSING, VERIFY_CODE_TARGET_MISMATCH, assembleAuthoringContributions, describeMigrationStatement, extractCodecLookup, fieldStatementText, issueOutcome, migrationRunnerFailure, modelDisplayName, sameMarkerHashes } from \"@internal/framework-components/control\";\nimport { UNBOUND_NAMESPACE_ID, isPlainRecord } from \"@internal/framework-components/ir\";\nimport { assertDescriptorSelfConsistency } from \"@internal/migration-tools/spaces\";\nimport { sqlContractCanonicalizationHooks } from \"@internal/sql-contract/canonicalization-hooks\";\nimport { blindCast } from \"@internal/utils/casts\";\nimport { ifDefined } from \"@internal/utils/defined\";\nimport { InternalError, isInternalError } from \"@internal/utils/internal-error\";\nimport { ContractValidationError } from \"@internal/contract/contract-validation-error\";\nimport { StorageTable, isStorageTypeInstance, nonEmptyTypeParams } from \"@internal/sql-contract/types\";\nimport { checkSqlDefaultText, valueObjectStorageTypeMissingMessage } from \"@internal/sql-contract/validators\";\nimport { isStructuredError, structuredError } from \"@internal/utils/structured-error\";\nimport { asNamespaceId, governingControlPolicy } from \"@internal/contract/types\";\nimport { type } from \"arktype\";\nimport { notOk, ok } from \"@internal/utils/result\";\nimport { namingOf } from \"@internal/sql-schema-ir/naming\";\nimport { RelationalSchemaNodeKind, SqlSchemaIR, SqlTableIR } from \"@internal/sql-schema-ir/types\";\nimport { canonicalizeJson } from \"@internal/framework-components/utils\";\nimport { jsonToTsSource } from \"@internal/ts-render\";\n//#region src/core/contract-stack-checks.ts\nfunction tablesOf(storage) {\n\treturn Object.entries(storage.namespaces).flatMap(([namespaceId, namespace]) => Object.entries(namespace.entries[\"table\"] ?? {}).map(([tableName, table]) => ({\n\t\tpath: `storage.namespaces.${namespaceId}.entries.table.${tableName}`,\n\t\tnamespaceId,\n\t\ttableName,\n\t\ttable: blindCast(table)\n\t})));\n}\nfunction dataTypeProblems(storage, codecLookup) {\n\treturn [...tablesOf(storage).flatMap(({ path, table }) => Object.entries(table.columns).map(([columnName, column]) => ({\n\t\tpath: `${path}.columns.${columnName}`,\n\t\tcodecId: column.codecId,\n\t\tdataType: column.dataType\n\t}))), ...Object.entries(storage.types ?? {}).flatMap(([typeName, entry]) => isStorageTypeInstance(entry) ? [{\n\t\tpath: `storage.types.${typeName}`,\n\t\tcodecId: entry.codecId,\n\t\tdataType: entry.dataType\n\t}] : [])].flatMap(({ path, codecId, dataType }) => {\n\t\tconst represented = codecLookup.descriptorFor(codecId)?.dataType;\n\t\tif (represented === void 0 || represented === dataType) return [];\n\t\treturn [`${path}: codec ${codecId} represents ${represented}, not ${dataType}`];\n\t});\n}\n/** Whether `type` refuses `params`. The check of the column's parameters reports that, so its default is not read under them. */\nfunction refusesParams(type, params) {\n\tif (!isSqlDataType(type)) return false;\n\ttry {\n\t\tvalidateSqlTypeParams(type, params);\n\t\treturn false;\n\t} catch (error) {\n\t\tif (isStructuredError(error) && error.code === \"CONTRACT.TYPE_PARAMS_INVALID\") return true;\n\t\tthrow error;\n\t}\n}\n/** Names the namespace, unless the contract has only the unbound one, as a SQLite contract does. */\nfunction columnPlace(refused) {\n\treturn refused.namespaceId === UNBOUND_NAMESPACE_ID ? `Table \"${refused.table}\", column \"${refused.column}\"` : `Namespace \"${refused.namespaceId}\", table \"${refused.table}\", column \"${refused.column}\"`;\n}\nfunction notAValue(refused) {\n\treturn {\n\t\trefused,\n\t\ttext: `${columnPlace(refused)}: the default ${JSON.stringify(refused.value)}${refused.elementIndex === void 0 ? \"\" : ` at element ${refused.elementIndex + 1}`} is not a value of ${refused.dataType}: ${refused.message}`\n\t};\n}\nfunction notAList(refused) {\n\treturn {\n\t\trefused,\n\t\ttext: `${columnPlace(refused)}: the default ${JSON.stringify(refused.value)} is not a list, and the column holds a list of ${refused.dataType}`\n\t};\n}\n/** Each literal default the column's type does not hold, under the column's parameters, element by element on a list column. A `null` is SQL NULL, which every column takes. */\nfunction refusedDefaults(storage, dataTypes) {\n\treturn tablesOf(storage).flatMap(({ namespaceId, tableName, table }) => Object.entries(table.columns).flatMap(([columnName, column]) => {\n\t\tconst columnDefault = column.default;\n\t\tif (columnDefault?.kind !== \"literal\") return [];\n\t\tconst type = dataTypes.get(column.dataType);\n\t\tif (type === void 0) return [];\n\t\tconst params = dataTypeParams(type, nonEmptyTypeParams(column.typeParams));\n\t\tif (refusesParams(type, params)) return [];\n\t\tconst place = {\n\t\t\tnamespaceId,\n\t\t\ttable: tableName,\n\t\t\tcolumn: columnName,\n\t\t\tdataType: type.id\n\t\t};\n\t\tconst isList = column.many !== void 0 && column.many !== false;\n\t\tif (isList && columnDefault.value !== null && !Array.isArray(columnDefault.value)) return [notAList({\n\t\t\t...place,\n\t\t\tvalue: columnDefault.value,\n\t\t\tmessage: \"The column holds a list, and the default is not one.\",\n\t\t\treason: \"type-refused-default\"\n\t\t})];\n\t\tconst listed = isList && Array.isArray(columnDefault.value);\n\t\tconst values = isList && Array.isArray(columnDefault.value) ? columnDefault.value : [columnDefault.value];\n\t\tfor (const [index, value] of values.entries()) {\n\t\t\tif (value === null) continue;\n\t\t\ttry {\n\t\t\t\ttype.fromContract(value, params);\n\t\t\t} catch (error) {\n\t\t\t\tif (isInternalError(error)) throw error;\n\t\t\t\treturn [notAValue({\n\t\t\t\t\t...place,\n\t\t\t\t\tvalue,\n\t\t\t\t\t...listed ? { elementIndex: index } : {},\n\t\t\t\t\tmessage: error instanceof Error ? error.message : String(error),\n\t\t\t\t\treason: \"type-refused-default\"\n\t\t\t\t})];\n\t\t\t}\n\t\t}\n\t\treturn [];\n\t}));\n}\nfunction valueObjectProblems(contract, authoring) {\n\tconst storageTypeName = authoring.valueObjectStorageType;\n\tconst expectedCodecId = storageTypeName === void 0 ? void 0 : collectScalarTypeConstructors(authoring.type).get(storageTypeName)?.codecId;\n\tconst tables = new Map(tablesOf(contract.storage).map((entry) => [`${entry.namespaceId}\\0${entry.tableName}`, entry]));\n\treturn Object.values(contract.domain.namespaces).flatMap((namespace) => Object.values(namespace.models).flatMap((model) => {\n\t\tconst storage = blindCast(model.storage);\n\t\tconst table = tables.get(`${storage.namespaceId}\\0${storage.table}`);\n\t\tif (table === void 0) return [];\n\t\treturn Object.entries(model.fields).flatMap(([fieldName, field]) => {\n\t\t\tif (field.type.kind !== \"valueObject\") return [];\n\t\t\tconst columnName = storage.fields[fieldName]?.column;\n\t\t\tconst column = columnName === void 0 ? void 0 : table.table.columns[columnName];\n\t\t\tif (columnName === void 0 || column === void 0) return [];\n\t\t\tconst path = `${table.path}.columns.${columnName}`;\n\t\t\tif (expectedCodecId === void 0) return [valueObjectStorageTypeMissingMessage(path)];\n\t\t\tif (column.codecId === expectedCodecId) return [];\n\t\t\treturn [`${path}: a value-object column uses codec ${expectedCodecId}, the codec of the stack's value-object storage type ${storageTypeName}, not ${column.codecId}`];\n\t\t});\n\t}));\n}\n/**\n* Checks a deserialized contract against the stack that loads it: each column's codec represents the data type the column names, each value-object column uses the codec of the stack's value-object storage type, and each literal default is a value of its column's type under the column's parameters.\n*/\nfunction assertContractMatchesStack(contract, stack) {\n\tconst defaults = refusedDefaults(contract.storage, stack.dataTypes.lookup);\n\tconst problems = [\n\t\t...dataTypeProblems(contract.storage, stack.codecLookup),\n\t\t...valueObjectProblems(contract, stack.authoringContributions),\n\t\t...defaults.map(({ text }) => text)\n\t];\n\tif (problems.length > 0) throw new ContractValidationError(problems.join(\"; \"), \"storage\", defaults.length > 0 ? { refusedDefaults: defaults.map(({ refused }) => refused) } : void 0);\n}\n//#endregion\n//#region src/core/migrations/operation-storage-name.ts\nfunction isStorageDetails(details) {\n\tif (typeof details !== \"object\" || details === null) return false;\n\tconst [objectType, name, schema, table] = [\n\t\t\"objectType\",\n\t\t\"name\",\n\t\t\"schema\",\n\t\t\"table\"\n\t].map((key) => Reflect.get(details, key));\n\treturn typeof objectType === \"string\" && typeof name === \"string\" && (schema === void 0 || typeof schema === \"string\") && (table === void 0 || typeof table === \"string\");\n}\nfunction storageDetailsOf(operation) {\n\tconst target = Reflect.get(operation, \"target\");\n\tif (typeof target !== \"object\" || target === null) return void 0;\n\tconst details = Reflect.get(target, \"details\");\n\treturn isStorageDetails(details) ? details : void 0;\n}\n/**\n* The name the database knows an operation's object by, read from the operation's target\n* details: `schema.table.column` for a column, `schema.name` for anything else, without the\n* schema in the unbound namespace. An operation without details is named by its id.\n*/\nfunction storageNameOfOperation(operation) {\n\tconst details = storageDetailsOf(operation);\n\tif (details === void 0) return operation.id;\n\tconst schema = details.schema === void 0 || details.schema === UNBOUND_NAMESPACE_ID ? [] : [details.schema];\n\tconst table = details.objectType === \"column\" && details.table !== void 0 ? [details.table] : [];\n\treturn [\n\t\t...schema,\n\t\t...table,\n\t\tdetails.name\n\t].join(\".\");\n}\n//#endregion\n//#region src/core/operation-preview.ts\nfunction isDdlStatement(sqlStatement) {\n\tconst trimmed = sqlStatement.trim().toLowerCase();\n\treturn trimmed.startsWith(\"create \") || trimmed.startsWith(\"alter \") || trimmed.startsWith(\"drop \");\n}\nfunction hasExecuteSteps(operation) {\n\tconst execute = Reflect.get(operation, \"execute\");\n\tif (!Array.isArray(execute)) return false;\n\treturn execute.every((step) => typeof step === \"object\" && step !== null && \"sql\" in step);\n}\n/**\n* Extracts a best-effort SQL DDL preview for CLI plan output.\n* Presentation-only: never used to decide migration correctness.\n*/\nfunction extractSqlDdl(operations) {\n\tconst statements = [];\n\tfor (const operation of operations) {\n\t\tif (!hasExecuteSteps(operation)) continue;\n\t\tfor (const step of operation.execute) if (typeof step.sql === \"string\" && isDdlStatement(step.sql)) statements.push(step.sql.trim());\n\t}\n\treturn statements;\n}\n/**\n* Wraps `extractSqlDdl` into the family-agnostic `OperationPreview` shape.\n* Each statement carries `language: 'sql'`.\n*/\nfunction sqlOperationsToPreview(operations) {\n\treturn { statements: extractSqlDdl(operations).map((text) => ({\n\t\ttext,\n\t\tlanguage: \"sql\"\n\t})) };\n}\n//#endregion\n//#region src/core/control-instance.ts\nfunction missingDescriptorOperationError(targetId, operation) {\n\treturn sqlFamilyError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", `SQL target \"${targetId}\" is missing the required ${operation} descriptor operation`, {\n\t\twhy: `The target descriptor does not contribute the ${operation} operation the SQL family requires for this call.`,\n\t\tfix: `Use a target package whose control descriptor implements ${operation}.`,\n\t\tmeta: {\n\t\t\ttargetId,\n\t\t\toperation\n\t\t}\n\t});\n}\nfunction extractCodecTypeIdsFromContract(contract) {\n\tconst typeIds = /* @__PURE__ */ new Set();\n\tif (typeof contract === \"object\" && contract !== null && \"storage\" in contract && typeof contract.storage === \"object\" && contract.storage !== null && \"namespaces\" in contract.storage && typeof contract.storage.namespaces === \"object\" && contract.storage.namespaces !== null) {\n\t\tconst namespaces = blindCast(contract.storage.namespaces);\n\t\tfor (const ns of Object.values(namespaces)) {\n\t\t\tconst tbls = ns.entries[\"table\"];\n\t\t\tif (typeof tbls !== \"object\" || tbls === null) continue;\n\t\t\tfor (const table of Object.values(tbls)) if (typeof table === \"object\" && table !== null && \"columns\" in table && typeof table.columns === \"object\" && table.columns !== null) {\n\t\t\t\tconst columns = blindCast(table.columns);\n\t\t\t\tfor (const column of Object.values(columns)) if (column && typeof column === \"object\" && \"codecId\" in column && typeof column.codecId === \"string\") typeIds.add(column.codecId);\n\t\t\t}\n\t\t}\n\t}\n\treturn Array.from(typeIds).sort();\n}\nfunction createVerifyResult(options) {\n\tconst contract = { storageHash: options.contractStorageHash };\n\tif (options.contractProfileHash) contract.profileHash = options.contractProfileHash;\n\tconst target = { expected: options.expectedTargetId };\n\tif (options.actualTargetId) target.actual = options.actualTargetId;\n\tconst meta = { contractPath: options.contractPath };\n\tif (options.configPath) meta.configPath = options.configPath;\n\treturn {\n\t\tok: options.ok,\n\t\tsummary: options.summary,\n\t\tcontract,\n\t\ttarget,\n\t\tmeta,\n\t\ttimings: { total: options.totalTime },\n\t\t...ifDefined(\"code\", options.code),\n\t\t...options.marker ? { marker: {\n\t\t\tstorageHash: options.marker.storageHash,\n\t\t\tprofileHash: options.marker.profileHash\n\t\t} } : {},\n\t\t...ifDefined(\"missingCodecs\", options.missingCodecs),\n\t\t...ifDefined(\"codecCoverageSkipped\", options.codecCoverageSkipped)\n\t};\n}\n/**\n* Builds a map from each extension id to the set of extension ids it\n* transitively depends on. Uses the same declared-dependency data that\n* `buildExtensionLoadOrder` in control-stack uses.\n*/\nfunction buildTransitiveDependsOnMap(extensions) {\n\tconst directDeps = /* @__PURE__ */ new Map();\n\tfor (const ext of extensions) {\n\t\tconst packs = ext.contractSpace?.contractJson?.extensions;\n\t\tconst deps = packs !== null && typeof packs === \"object\" ? Object.keys(packs) : [];\n\t\tdirectDeps.set(ext.id, deps);\n\t}\n\tconst result = /* @__PURE__ */ new Map();\n\tconst resolve = (id, visiting) => {\n\t\tconst cached = result.get(id);\n\t\tif (cached !== void 0) return cached;\n\t\tconst set = /* @__PURE__ */ new Set();\n\t\tresult.set(id, set);\n\t\tfor (const depId of directDeps.get(id) ?? []) {\n\t\t\tset.add(depId);\n\t\t\tif (!visiting.has(depId)) {\n\t\t\t\tvisiting.add(depId);\n\t\t\t\tfor (const transitive of resolve(depId, visiting)) set.add(transitive);\n\t\t\t\tvisiting.delete(depId);\n\t\t\t}\n\t\t}\n\t\treturn set;\n\t};\n\tfor (const ext of extensions) resolve(ext.id, /* @__PURE__ */ new Set([ext.id]));\n\treturn result;\n}\n/**\n* Asserts that no cross-space FK in any extension points against the\n* dependency direction.\n*\n* A cross-space FK (target.spaceId present) from extension A pointing at\n* space B is a violation when B depends on A (directly or transitively),\n* because that means A is pointing \"upward\" against the dependency arrows\n* established by the extension load order.\n*\n* Throws with a diagnostic naming the violating extension (source), the\n* target space, and the direction violation.\n*/\nfunction isObjectRecord(v) {\n\treturn typeof v === \"object\" && v !== null;\n}\nfunction assertNoCrossSpaceFkReverseReferences(extensions) {\n\tconst dependsOnMap = buildTransitiveDependsOnMap(extensions);\n\tfor (const ext of extensions) {\n\t\tconst namespaces = ext.contractSpace?.contractJson?.storage?.namespaces;\n\t\tif (!isObjectRecord(namespaces)) continue;\n\t\tfor (const ns of Object.values(namespaces)) {\n\t\t\tif (!isObjectRecord(ns)) continue;\n\t\t\tconst entries = ns[\"entries\"];\n\t\t\tif (!isObjectRecord(entries)) continue;\n\t\t\tfor (const slot of Object.values(entries)) {\n\t\t\t\tif (!isObjectRecord(slot)) continue;\n\t\t\t\tfor (const table of Object.values(slot)) {\n\t\t\t\t\tif (!isObjectRecord(table)) continue;\n\t\t\t\t\tconst foreignKeys = table[\"foreignKeys\"];\n\t\t\t\t\tif (!Array.isArray(foreignKeys)) continue;\n\t\t\t\t\tfor (const fk of foreignKeys) {\n\t\t\t\t\t\tif (!isObjectRecord(fk)) continue;\n\t\t\t\t\t\tconst target = fk[\"target\"];\n\t\t\t\t\t\tif (!isObjectRecord(target)) continue;\n\t\t\t\t\t\tif (target[\"spaceId\"] === void 0) continue;\n\t\t\t\t\t\tconst targetSpaceId = target[\"spaceId\"];\n\t\t\t\t\t\tif (typeof targetSpaceId !== \"string\") continue;\n\t\t\t\t\t\tif (dependsOnMap.get(targetSpaceId)?.has(ext.id)) throw sqlFamilyError(\"CONTRACT.FOREIGN_KEY_INVALID\", `Cross-space FK reverse-reference detected: extension \"${ext.id}\" has a cross-space FK targeting space \"${targetSpaceId}\", but \"${targetSpaceId}\" depends on \"${ext.id}\". Cross-space FKs must follow the dependency direction (a space can only reference spaces it depends on, not spaces that depend on it).`, {\n\t\t\t\t\t\t\twhy: \"The foreign key points against the contract-space dependency direction.\",\n\t\t\t\t\t\t\tfix: \"Move the foreign key to the depending space, or restructure the extension dependencies so the referencing space depends on the referenced one.\",\n\t\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\t\textensionId: ext.id,\n\t\t\t\t\t\t\t\ttargetSpaceId\n\t\t\t\t\t\t\t}\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}\n}\nfunction createSqlFamilyInstance(stack) {\n\tenforceSqlDataTypeInvariants(stack.declaredDataTypes, stack.codecDescriptors);\n\tif (!stack.adapter) throw new InternalError(\"SQL family requires an adapter descriptor in ControlStack\");\n\tconst target = blindCast(stack.target);\n\tconst adapter = blindCast(stack.adapter);\n\tconst extensions = blindCast(stack.extensions);\n\tfor (const extension of extensions) if (extension.contractSpace) {\n\t\tconst { contractJson, headRef } = extension.contractSpace;\n\t\tassertDescriptorSelfConsistency({\n\t\t\textensionId: extension.id,\n\t\t\ttarget: contractJson.target,\n\t\t\ttargetFamily: contractJson.targetFamily,\n\t\t\tstorage: contractJson.storage,\n\t\t\theadRefHash: headRef.hash,\n\t\t\t...sqlContractCanonicalizationHooks\n\t\t});\n\t}\n\tassertNoCrossSpaceFkReverseReferences(extensions);\n\tconst { codecTypeImports, extensionIds } = stack;\n\tlet controlAdapter;\n\tconst getControlAdapter = () => controlAdapter ??= adapter.create(stack);\n\tconst targetSerializer = blindCast(target).contractSerializer;\n\tconst targetInferPslContract = blindCast(target).inferPslContract;\n\tconst pslBuildContext = {\n\t\tauthoringContributions: stack.authoringContributions,\n\t\tcodecLookup: stack.codecLookup,\n\t\tdataTypes: stack.dataTypes,\n\t\tgeneratorFunctions: stack.generatorFunctions,\n\t\tcomponentIdsByGenerator: stack.controlMutationDefaults.componentIdsByGenerator\n\t};\n\tconst targetBuildPslContract = blindCast(target).buildPslContract;\n\tconst diffSchema = blindCast(target).diffSchema;\n\tconst targetGranularityOf = blindCast(target).classifySubjectGranularity;\n\tconst targetEntityKindOf = blindCast(target).classifyEntityKind;\n\tconst describedContracts = extensions.flatMap((extension) => extension.contractSpace ? [{\n\t\tspaceId: extension.id,\n\t\tcontract: extension.contractSpace.contractJson\n\t}] : []);\n\tconst loadContract = (contractOrJson) => {\n\t\tconst serializer = targetSerializer ?? new SqlContractSerializer();\n\t\tconst json = targetSerializer !== void 0 && !isPlainRecord(contractOrJson) ? targetSerializer.serializeContract(blindCast(contractOrJson)) : contractOrJson;\n\t\tconst contract = serializer.deserializeContract(json);\n\t\tassertContractMatchesStack(contract, stack);\n\t\treturn contract;\n\t};\n\tconst signSpaceMarker = async (controlAdapter, driver, { space, contract, expected }) => {\n\t\tconst storageHash = contract.storage.storageHash;\n\t\tconst profileHash = \"profileHash\" in contract && typeof contract.profileHash === \"string\" ? contract.profileHash : storageHash;\n\t\tconst signed = {\n\t\t\tspace,\n\t\t\tcontract: {\n\t\t\t\tstorageHash,\n\t\t\t\tprofileHash\n\t\t\t}\n\t\t};\n\t\tconst readHashes = async () => {\n\t\t\tconst marker = await controlAdapter.readMarker(driver, space);\n\t\t\treturn marker === null ? null : {\n\t\t\t\tstorageHash: marker.storageHash,\n\t\t\t\tprofileHash: marker.profileHash\n\t\t\t};\n\t\t};\n\t\tconst existing = await readHashes();\n\t\tif (!sameMarkerHashes(existing, expected)) return {\n\t\t\t...signed,\n\t\t\tstatus: \"conflict\",\n\t\t\texpected,\n\t\t\tfound: existing\n\t\t};\n\t\tif (existing === null) {\n\t\t\tawait controlAdapter.insertMarker(driver, space, {\n\t\t\t\tstorageHash,\n\t\t\t\tprofileHash\n\t\t\t});\n\t\t\treturn {\n\t\t\t\t...signed,\n\t\t\t\tstatus: \"created\"\n\t\t\t};\n\t\t}\n\t\tif (existing.storageHash === storageHash && existing.profileHash === profileHash) return {\n\t\t\t...signed,\n\t\t\tstatus: \"unchanged\"\n\t\t};\n\t\tif (!await controlAdapter.updateMarker(driver, space, existing.storageHash, {\n\t\t\tstorageHash,\n\t\t\tprofileHash\n\t\t})) return {\n\t\t\t...signed,\n\t\t\tstatus: \"conflict\",\n\t\t\texpected,\n\t\t\tfound: await readHashes()\n\t\t};\n\t\treturn {\n\t\t\t...signed,\n\t\t\tstatus: \"updated\",\n\t\t\tprevious: existing\n\t\t};\n\t};\n\tconst signSpaces = async (driver, spaces) => {\n\t\tconst [first] = spaces;\n\t\tif (first === void 0) return [];\n\t\tconst controlAdapter = getControlAdapter();\n\t\treturn controlAdapter.withTransaction(driver, async () => {\n\t\t\tawait controlAdapter.lockMarker(driver);\n\t\t\tfor (const query of controlAdapter.bootstrapSignMarkerQueries()) {\n\t\t\t\tconst lowered = await controlAdapter.lowerToExecuteRequest(query, { contract: first.contract });\n\t\t\t\tawait driver.query(lowered.sql, lowered.params);\n\t\t\t}\n\t\t\tconst signatures = [];\n\t\t\tfor (const space of spaces) signatures.push(await signSpaceMarker(controlAdapter, driver, space));\n\t\t\treturn signatures;\n\t\t});\n\t};\n\treturn {\n\t\tfamilyId: \"sql\",\n\t\tcodecTypeImports,\n\t\textensionIds,\n\t\tdeserializeContract(contractJson) {\n\t\t\treturn loadContract(contractJson);\n\t\t},\n\t\tasync verify(verifyOptions) {\n\t\t\tconst { driver, contract: rawContract, expectedTargetId, contractPath, configPath } = verifyOptions;\n\t\t\tconst startTime = Date.now();\n\t\t\tconst contract = loadContract(rawContract);\n\t\t\tconst contractStorageHash = contract.storage.storageHash;\n\t\t\tconst contractProfileHash = contract.profileHash;\n\t\t\tconst contractTarget = contract.target;\n\t\t\tconst marker = await getControlAdapter().readMarker(driver, APP_SPACE_ID);\n\t\t\tlet missingCodecs;\n\t\t\tlet codecCoverageSkipped = false;\n\t\t\tconst supportedTypeIds = collectSupportedCodecTypeIds([\n\t\t\t\tadapter,\n\t\t\t\ttarget,\n\t\t\t\t...extensions\n\t\t\t]);\n\t\t\tif (supportedTypeIds.length === 0) codecCoverageSkipped = true;\n\t\t\telse {\n\t\t\t\tconst supportedSet = new Set(supportedTypeIds);\n\t\t\t\tconst missing = extractCodecTypeIdsFromContract(contract).filter((id) => !supportedSet.has(id));\n\t\t\t\tif (missing.length > 0) missingCodecs = missing;\n\t\t\t}\n\t\t\tif (!marker) return createVerifyResult({\n\t\t\t\tok: false,\n\t\t\t\tcode: VERIFY_CODE_MARKER_MISSING,\n\t\t\t\tsummary: \"Marker missing\",\n\t\t\t\tcontractStorageHash,\n\t\t\t\texpectedTargetId,\n\t\t\t\tcontractPath,\n\t\t\t\ttotalTime: Date.now() - startTime,\n\t\t\t\t...contractProfileHash ? { contractProfileHash } : {},\n\t\t\t\t...missingCodecs ? { missingCodecs } : {},\n\t\t\t\t...codecCoverageSkipped ? { codecCoverageSkipped } : {},\n\t\t\t\t...configPath ? { configPath } : {}\n\t\t\t});\n\t\t\tif (contractTarget !== expectedTargetId) return createVerifyResult({\n\t\t\t\tok: false,\n\t\t\t\tcode: VERIFY_CODE_TARGET_MISMATCH,\n\t\t\t\tsummary: \"Target mismatch\",\n\t\t\t\tcontractStorageHash,\n\t\t\t\tmarker,\n\t\t\t\texpectedTargetId,\n\t\t\t\tactualTargetId: contractTarget,\n\t\t\t\tcontractPath,\n\t\t\t\ttotalTime: Date.now() - startTime,\n\t\t\t\t...contractProfileHash ? { contractProfileHash } : {},\n\t\t\t\t...missingCodecs ? { missingCodecs } : {},\n\t\t\t\t...codecCoverageSkipped ? { codecCoverageSkipped } : {},\n\t\t\t\t...configPath ? { configPath } : {}\n\t\t\t});\n\t\t\tif (marker.storageHash !== contractStorageHash) return createVerifyResult({\n\t\t\t\tok: false,\n\t\t\t\tcode: VERIFY_CODE_HASH_MISMATCH,\n\t\t\t\tsummary: \"Hash mismatch\",\n\t\t\t\tcontractStorageHash,\n\t\t\t\tmarker,\n\t\t\t\texpectedTargetId,\n\t\t\t\tcontractPath,\n\t\t\t\ttotalTime: Date.now() - startTime,\n\t\t\t\t...contractProfileHash ? { contractProfileHash } : {},\n\t\t\t\t...missingCodecs ? { missingCodecs } : {},\n\t\t\t\t...codecCoverageSkipped ? { codecCoverageSkipped } : {},\n\t\t\t\t...configPath ? { configPath } : {}\n\t\t\t});\n\t\t\tif (contractProfileHash && marker.profileHash !== contractProfileHash) return createVerifyResult({\n\t\t\t\tok: false,\n\t\t\t\tcode: VERIFY_CODE_HASH_MISMATCH,\n\t\t\t\tsummary: \"Hash mismatch\",\n\t\t\t\tcontractStorageHash,\n\t\t\t\tcontractProfileHash,\n\t\t\t\tmarker,\n\t\t\t\texpectedTargetId,\n\t\t\t\tcontractPath,\n\t\t\t\ttotalTime: Date.now() - startTime,\n\t\t\t\t...missingCodecs ? { missingCodecs } : {},\n\t\t\t\t...codecCoverageSkipped ? { codecCoverageSkipped } : {},\n\t\t\t\t...configPath ? { configPath } : {}\n\t\t\t});\n\t\t\treturn createVerifyResult({\n\t\t\t\tok: true,\n\t\t\t\tsummary: \"Database matches contract\",\n\t\t\t\tcontractStorageHash,\n\t\t\t\tmarker,\n\t\t\t\texpectedTargetId,\n\t\t\t\tcontractPath,\n\t\t\t\ttotalTime: Date.now() - startTime,\n\t\t\t\t...contractProfileHash ? { contractProfileHash } : {},\n\t\t\t\t...missingCodecs ? { missingCodecs } : {},\n\t\t\t\t...codecCoverageSkipped ? { codecCoverageSkipped } : {},\n\t\t\t\t...configPath ? { configPath } : {}\n\t\t\t});\n\t\t},\n\t\tverifySchema(options) {\n\t\t\tconst contract = loadContract(options.contract);\n\t\t\tif (!diffSchema) throw missingDescriptorOperationError(target.targetId, \"diffSchema\");\n\t\t\tif (!targetGranularityOf) throw missingDescriptorOperationError(target.targetId, \"classifySubjectGranularity\");\n\t\t\treturn verifySqlSchemaByDiff({\n\t\t\t\tcontract,\n\t\t\t\tschema: options.schema,\n\t\t\t\tstrict: options.strict,\n\t\t\t\tframeworkComponents: options.frameworkComponents,\n\t\t\t\tdiffSchema,\n\t\t\t\tgranularityOf: targetGranularityOf\n\t\t\t});\n\t\t},\n\t\t/**\n\t\t* Classifies a diff issue's subject granularity on demand, by resolving\n\t\t* its node's `nodeKind` through the target's classifier — the\n\t\t* {@link import('@internal/framework-components/control').SchemaSubjectClassifierCapable}\n\t\t* capability. Framework consumers spanning contract spaces (the\n\t\t* migration aggregate's unclaimed-elements sweep) detect and call this\n\t\t* instead of reaching into the concrete schema-IR node, which they\n\t\t* cannot read; nothing is stamped on the issue or the node.\n\t\t*/\n\t\tclassifySubjectGranularity(issue) {\n\t\t\tif (!targetGranularityOf) throw missingDescriptorOperationError(target.targetId, \"classifySubjectGranularity\");\n\t\t\treturn classifyDiffSubjectGranularity(issue, targetGranularityOf);\n\t\t},\n\t\t/**\n\t\t* Classifies a diff issue's subject storage `entityKind` on demand, by\n\t\t* resolving its node's `nodeKind` through the target's classifier —\n\t\t* the sibling of `classifySubjectGranularity` above, and part of the\n\t\t* same {@link import('@internal/framework-components/control').SchemaSubjectClassifierCapable}\n\t\t* capability.\n\t\t*/\n\t\tclassifyEntityKind(issue) {\n\t\t\tif (!targetEntityKindOf) throw missingDescriptorOperationError(target.targetId, \"classifyEntityKind\");\n\t\t\treturn classifyDiffEntityKind(issue, targetEntityKindOf);\n\t\t},\n\t\tasync signSpaces(options) {\n\t\t\treturn signSpaces(options.driver, options.spaces);\n\t\t},\n\t\tasync readMarker(options) {\n\t\t\treturn getControlAdapter().readMarker(options.driver, options.space);\n\t\t},\n\t\tasync readAllMarkers(options) {\n\t\t\treturn getControlAdapter().readAllMarkers(options.driver);\n\t\t},\n\t\tasync readLedger(options) {\n\t\t\treturn getControlAdapter().readLedger(options.driver, options.space);\n\t\t},\n\t\tasync initMarker(options) {\n\t\t\treturn getControlAdapter().initMarker(options.driver, options.space, options.destination);\n\t\t},\n\t\tasync updateMarker(options) {\n\t\t\treturn getControlAdapter().updateMarker(options.driver, options.space, options.expectedFrom, options.destination);\n\t\t},\n\t\tasync writeLedgerEntry(options) {\n\t\t\treturn getControlAdapter().writeLedgerEntry(options.driver, options.space, options.entry);\n\t\t},\n\t\tasync introspect(options) {\n\t\t\treturn getControlAdapter().introspect(options.driver, options.contract);\n\t\t},\n\t\tasync inferPslContract(schemaIR) {\n\t\t\tif (!targetInferPslContract) throw sqlFamilyError(\"CONTRACT.INFER_UNSUPPORTED\", `Target \"${target.targetId}\" does not support contract infer (no inferPslContract on its descriptor).`, {\n\t\t\t\twhy: \"The target descriptor does not provide the inferPslContract hook, so a PSL contract cannot be inferred from the database schema.\",\n\t\t\t\tfix: \"Use a target package that supports contract infer, or author the contract instead of inferring it.\",\n\t\t\t\tmeta: { targetId: target.targetId }\n\t\t\t});\n\t\t\treturn targetInferPslContract(schemaIR, pslBuildContext, describedContracts);\n\t\t},\n\t\tbuildPslContract(contract) {\n\t\t\tif (!targetBuildPslContract) throw sqlFamilyError(\"CONTRACT.PRINT_UNSUPPORTED\", `Target \"${target.targetId}\" does not support contract print (no buildPslContract on its descriptor).`, {\n\t\t\t\twhy: \"The target descriptor does not provide the buildPslContract hook, so the contract cannot be printed as a Prisma 8 PSL file.\",\n\t\t\t\tfix: \"Use a target whose descriptor provides buildPslContract, or write the Prisma 8 PSL file by hand.\",\n\t\t\t\tmeta: { targetId: target.targetId }\n\t\t\t});\n\t\t\treturn {\n\t\t\t\tdocument: targetBuildPslContract(contract, pslBuildContext),\n\t\t\t\tsourceSettings: ifDefined(\"defaultControlPolicy\", contract.defaultControlPolicy)\n\t\t\t};\n\t\t},\n\t\tlowerAst(ast, context) {\n\t\t\treturn getControlAdapter().lowerToExecuteRequest(ast, context);\n\t\t},\n\t\tbootstrapControlTableQueries() {\n\t\t\treturn getControlAdapter().bootstrapControlTableQueries();\n\t\t},\n\t\ttoOperationPreview(operations) {\n\t\t\treturn sqlOperationsToPreview(operations);\n\t\t},\n\t\tstorageNameOf(operation) {\n\t\t\treturn storageNameOfOperation(operation);\n\t\t},\n\t\ttoSchemaView(schema) {\n\t\t\tconst root = blindCast(schema);\n\t\t\tconst namespaceEntries = root.namespaces !== void 0 ? Object.entries(root.namespaces).map(([namespaceKey, namespace]) => [namespaceKey, namespace.tables]) : [[void 0, root.tables ?? {}]];\n\t\t\tconst qualify = namespaceEntries.length > 1;\n\t\t\tconst tableNodes = namespaceEntries.flatMap(([namespaceKey, tables]) => Object.entries(tables).map(([tableName, table]) => [\n\t\t\t\tqualify && namespaceKey !== void 0 ? `${namespaceKey}.${tableName}` : tableName,\n\t\t\t\ttableName,\n\t\t\t\ttable\n\t\t\t])).map(([displayName, tableName, table]) => {\n\t\t\t\tconst children = [];\n\t\t\t\tconst columnNodes = [];\n\t\t\t\tfor (const [columnName, column] of Object.entries(table.columns)) {\n\t\t\t\t\tconst label = `${columnName}: ${column.typeText} (${column.nullable ? \"nullable\" : \"not nullable\"})`;\n\t\t\t\t\tcolumnNodes.push(new SchemaTreeNode({\n\t\t\t\t\t\tkind: \"field\",\n\t\t\t\t\t\tid: `column-${displayName}-${columnName}`,\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\ttypeText: column.typeText,\n\t\t\t\t\t\t\tnullable: column.nullable,\n\t\t\t\t\t\t\t...ifDefined(\"default\", column.default)\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t\tif (columnNodes.length > 0) children.push(new SchemaTreeNode({\n\t\t\t\t\tkind: \"collection\",\n\t\t\t\t\tid: `columns-${displayName}`,\n\t\t\t\t\tlabel: \"columns\",\n\t\t\t\t\tchildren: columnNodes\n\t\t\t\t}));\n\t\t\t\tif (table.primaryKey) {\n\t\t\t\t\tconst pkColumns = table.primaryKey.columns.join(\", \");\n\t\t\t\t\tchildren.push(new SchemaTreeNode({\n\t\t\t\t\t\tkind: \"index\",\n\t\t\t\t\t\tid: `primary-key-${displayName}`,\n\t\t\t\t\t\tlabel: `primary key: ${pkColumns}`,\n\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\tcolumns: table.primaryKey.columns,\n\t\t\t\t\t\t\t...table.primaryKey.name ? { name: table.primaryKey.name } : {}\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t\tfor (const unique of table.uniques) {\n\t\t\t\t\tconst name = unique.name ?? `${tableName}_${unique.columns.join(\"_\")}_unique`;\n\t\t\t\t\tconst label = `unique ${name}`;\n\t\t\t\t\tchildren.push(new SchemaTreeNode({\n\t\t\t\t\t\tkind: \"index\",\n\t\t\t\t\t\tid: `unique-${displayName}-${name}`,\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\tcolumns: unique.columns,\n\t\t\t\t\t\t\tunique: true\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t\tfor (const index of table.indexes) {\n\t\t\t\t\tconst name = index.name;\n\t\t\t\t\tconst label = index.unique ? `unique index ${name}` : `index ${name}`;\n\t\t\t\t\tchildren.push(new SchemaTreeNode({\n\t\t\t\t\t\tkind: \"index\",\n\t\t\t\t\t\tid: `index-${displayName}-${name}`,\n\t\t\t\t\t\tlabel,\n\t\t\t\t\t\tmeta: {\n\t\t\t\t\t\t\tcolumns: index.columns,\n\t\t\t\t\t\t\tunique: index.unique\n\t\t\t\t\t\t}\n\t\t\t\t\t}));\n\t\t\t\t}\n\t\t\t\tconst tableMeta = {};\n\t\t\t\tif (table.primaryKey) {\n\t\t\t\t\ttableMeta[\"primaryKey\"] = table.primaryKey.columns;\n\t\t\t\t\tif (table.primaryKey.name) tableMeta[\"primaryKeyName\"] = table.primaryKey.name;\n\t\t\t\t}\n\t\t\t\tif (table.foreignKeys.length > 0) tableMeta[\"foreignKeys\"] = table.foreignKeys.map((fk) => ({\n\t\t\t\t\tcolumns: fk.columns,\n\t\t\t\t\treferencedTable: fk.referencedTable,\n\t\t\t\t\treferencedColumns: fk.referencedColumns,\n\t\t\t\t\t...fk.name ? { name: fk.name } : {}\n\t\t\t\t}));\n\t\t\t\treturn new SchemaTreeNode({\n\t\t\t\t\tkind: \"entity\",\n\t\t\t\t\tid: `table-${displayName}`,\n\t\t\t\t\tlabel: `table ${displayName}`,\n\t\t\t\t\t...Object.keys(tableMeta).length > 0 ? { meta: tableMeta } : {},\n\t\t\t\t\t...children.length > 0 ? { children } : {}\n\t\t\t\t});\n\t\t\t});\n\t\t\treturn { root: new SchemaTreeNode({\n\t\t\t\tkind: \"root\",\n\t\t\t\tid: \"sql-schema\",\n\t\t\t\tlabel: \"database\",\n\t\t\t\t...tableNodes.length > 0 ? { children: tableNodes } : {}\n\t\t\t}) };\n\t\t}\n\t};\n}\n//#endregion\n//#region src/core/control-descriptor.ts\nconst sqlFamilyDescribeUnsupportedAttribute = describeUnsupportedSqlAttribute;\nconst sqlFamilyDescribeUnresolvedType = describeUnresolvedSqlType;\nvar SqlFamilyDescriptor = class {\n\tkind = \"family\";\n\tid = \"sql\";\n\tfamilyId = \"sql\";\n\tversion = \"0.0.1\";\n\temission = sqlEmission;\n\tdataTypes = sqlExpressionRegistration.dataTypes;\n\tauthoring = {\n\t\tfield: sqlFamilyAuthoringFieldPresets,\n\t\ttype: sqlFamilyAuthoringTypes,\n\t\tentityTypes: sqlFamilyEntityTypes,\n\t\tpslBlockDescriptors: sqlFamilyPslBlockDescriptors,\n\t\tattributeSpecs: sqlAttributeSpecs,\n\t\tdataTypes: sqlExpressionRegistration.authoring.dataTypes\n\t};\n\tgeneratorFunctions = sqlFamilyGeneratorFunctions;\n\tcontrolMutationDefaults = {\n\t\tdefaultFunctionRegistry: /* @__PURE__ */ new Map(),\n\t\tgeneratorDescriptors: sqlFamilyGeneratorDescriptors\n\t};\n\tfieldLength = ({ codecId, typeParams }, dataTypes) => sqlCodecColumnLength(dataTypes, codecId, typeParams);\n\tpslDiagnostics = {\n\t\tdescribeUnsupportedAttribute: sqlFamilyDescribeUnsupportedAttribute,\n\t\tdescribeUnresolvedType: sqlFamilyDescribeUnresolvedType\n\t};\n\tcreate(stack) {\n\t\treturn createSqlFamilyInstance(stack);\n\t}\n};\n//#endregion\n//#region src/core/default-functions.ts\n/**\n* The SQL family's default functions, each a database default: `autoincrement()` and `now()`. A value the client generates is a generator function, written `@onCreate(...)`.\n*/\nfunction sqlDefaultFunctions() {\n\treturn {\n\t\tautoincrement: {\n\t\t\tsignature: { documentation: \"Generates an increasing integer value in the database.\" },\n\t\t\tusageSignatures: [\"autoincrement()\"],\n\t\t\tlower: () => databaseFunction(\"autoincrement()\")\n\t\t},\n\t\tnow: {\n\t\t\tsignature: { documentation: \"Uses the current database timestamp as the default value.\" },\n\t\t\tusageSignatures: [\"now()\"],\n\t\t\tlower: () => databaseFunction(\"now()\")\n\t\t}\n\t};\n}\nfunction databaseFunction(expression) {\n\treturn {\n\t\tok: true,\n\t\tvalue: {\n\t\t\tkind: \"storage\",\n\t\t\tdefaultValue: {\n\t\t\t\tkind: \"function\",\n\t\t\t\texpression\n\t\t\t}\n\t\t}\n\t};\n}\n//#endregion\n//#region src/core/migrations/contract-to-schema-ir.ts\nfunction convertColumn(name, column, types, hooks) {\n\tconst dataType = sqlDataTypeOfCodec(column.codecId, types);\n\tconst storage = sqlStorageType(dataType, types.dataTypeLookup);\n\tconst typeText = schemaTypeText(storage, column.typeParams);\n\tconst many = column.many !== void 0 && column.many !== false;\n\tconst rawColumnDefault = column.default ?? void 0;\n\tconst resolvedColumnDefault = rawColumnDefault !== void 0 && hooks.resolveDefault ? hooks.resolveDefault(rawColumnDefault, {\n\t\ttypeText,\n\t\tmany\n\t}) : rawColumnDefault;\n\treturn {\n\t\tname,\n\t\ttypeText,\n\t\tnullable: column.nullable,\n\t\t...ifDefined(\"many\", many ? true : void 0),\n\t\t...ifDefined(\"resolvedDefault\", resolvedColumnDefault),\n\t\t...ifDefined(\"authoredDefault\", rawColumnDefault),\n\t\tcodecRef: buildColumnCodecRef(column, many ? true : void 0),\n\t\tstoredType: storage,\n\t\tstoredTypeParams: storage.sql.normalize(dataTypeParams(storage, column.typeParams)),\n\t\t...ifDefined(\"catalogText\", nameIsCatalogText(storage) ? typeText : void 0),\n\t\t...ifDefined(\"defaultValue\", rawColumnDefault?.kind === \"literal\" && rawColumnDefault.value instanceof Date ? dateDefaultValue(rawColumnDefault.value, codecForRef(types.codecLookup, buildColumnCodecRef(column, void 0))) : contractDefaultValue(rawColumnDefault, dataType, dataTypeParams(dataType, column.typeParams), many)),\n\t\tsqlExpressionLiteralFor\n\t};\n}\nfunction sqlExpressionLiteralFor(text) {\n\treturn sqlTextsReadBack([text]) ? printSqlExpressionLiteral(text) : void 0;\n}\n/**\n* A `Date` default, which an in-memory contract can hold, as the value of the column's type the column's codec reads it as. `undefined` when the codec refuses it or no codec is registered, and the default then compares unequal to any other.\n*/\nfunction dateDefaultValue(value, codec) {\n\tif (codec === void 0) return void 0;\n\ttry {\n\t\treturn codec.toDataTypeValue(value);\n\t} catch (error) {\n\t\tif (isInternalError(error)) throw error;\n\t\treturn;\n\t}\n}\n/**\n* A literal default as a value of the column's type, read from the JSON the contract stores, element by element for a list column. A `null` is a value of a type that stores one, such as a JSON type, and SQL NULL otherwise, as DDL writes it. Loading a contract refuses a value its type does not hold, so a refusal here only means no value, and the comparison falls back to the stored JSON.\n*/\nfunction contractDefaultValue(columnDefault, type, params, many) {\n\tif (columnDefault?.kind !== \"literal\" || columnDefault.value instanceof Date) return void 0;\n\tconst stored = columnDefault.value;\n\tconst read = (json) => {\n\t\ttry {\n\t\t\treturn type.fromContract(json, params);\n\t\t} catch (error) {\n\t\t\tif (isStructuredError(error) && json === null) return null;\n\t\t\tthrow error;\n\t\t}\n\t};\n\ttry {\n\t\tif (many && Array.isArray(stored)) return stored.map(read);\n\t\treturn read(stored) ?? void 0;\n\t} catch (error) {\n\t\tif (isStructuredError(error)) return void 0;\n\t\tthrow error;\n\t}\n}\n/**\n* The column's type as the database reports it, from the type it is stored as: the written name with its normal-form parameters (`character(1)` for a bare `character`), or for a\n* type that claims a kind (an enum), its type name as stored.\n*/\nfunction schemaTypeText(type, typeParams) {\n\tconst params = dataTypeParams(type, typeParams);\n\treturn type.sql.claimsKind === void 0 ? renderSqlTypeName(type, type.sql.normalize(params)) : unquotedSqlBaseName(type, params);\n}\n/**\n* Builds the column's `CodecRef` from its codec identity — the same construction the query AST and the migration DDL renderer already use (TML-2456, TML-2918).\n*/\nfunction buildColumnCodecRef(column, many) {\n\treturn {\n\t\tcodecId: column.codecId,\n\t\t...ifDefined(\"typeParams\", column.typeParams !== void 0 ? blindCast(column.typeParams) : void 0),\n\t\t...ifDefined(\"many\", many)\n\t};\n}\nfunction convertCheck(check, tableName, tableColumns) {\n\treturn {\n\t\tnaming: namingOf(check.name, check.prefix),\n\t\texpression: check.expression,\n\t\tdependsOn: flatColumnDependsOn(tableName, tableColumns)\n\t};\n}\nfunction convertUnique(unique, tableName) {\n\treturn {\n\t\tcolumns: unique.columns,\n\t\t...ifDefined(\"name\", unique.name),\n\t\tdependsOn: flatColumnDependsOn(tableName, unique.columns)\n\t};\n}\nfunction convertIndex(index, tableName, tableColumns) {\n\tconst base = {\n\t\tnaming: namingOf(index.name, index.prefix),\n\t\twhere: index.where,\n\t\tunique: index.unique,\n\t\tpartial: index.where !== void 0,\n\t\ttype: index.type,\n\t\toptions: index.options,\n\t\tannotations: void 0,\n\t\tdependsOn: flatColumnDependsOn(tableName, index.columns ?? tableColumns)\n\t};\n\treturn index.expression !== void 0 ? {\n\t\t...base,\n\t\texpression: index.expression\n\t} : {\n\t\t...base,\n\t\tcolumns: index.columns ?? []\n\t};\n}\n/**\n* The referenced table's chain in the flat (single-schema) tree\n* `contractToSchemaIR`/`contractNamespaceToSchemaIR` build: the root\n* (`SqlSchemaIR`, fixed `'database'` id) followed by the table's own id.\n* Postgres discards this when it re-derives the FK against its own\n* multi-schema tree shape (`contractToPostgresDatabaseSchemaNode`); SQLite's\n* flat tree uses it as-is.\n*/\nfunction flatSchemaDependsOn(tableName) {\n\treturn [{\n\t\tnodeKind: RelationalSchemaNodeKind.schema,\n\t\tid: \"database\"\n\t}, {\n\t\tnodeKind: RelationalSchemaNodeKind.table,\n\t\tid: tableName\n\t}];\n}\n/**\n* The chains from a table-child object (foreign key, index, unique, primary\n* key) to each of the own columns it is built on, in the flat tree. Dropping\n* a covered column auto-drops the object, so the object's drop must precede\n* the column's; the graph derives that direction from these edges.\n*/\nfunction flatColumnDependsOn(tableName, columns) {\n\treturn columns.map((column) => [\n\t\t{\n\t\t\tnodeKind: RelationalSchemaNodeKind.schema,\n\t\t\tid: \"database\"\n\t\t},\n\t\t{\n\t\t\tnodeKind: RelationalSchemaNodeKind.table,\n\t\t\tid: tableName\n\t\t},\n\t\t{\n\t\t\tnodeKind: RelationalSchemaNodeKind.column,\n\t\t\tid: `column:${column}`\n\t\t}\n\t]);\n}\n/**\n* The FK's referenced-namespace identity comes from the target's namespace\n* node, not the raw namespace-id string. An unbound target namespace stamps\n* no `referencedSchema` at all — the FK node's id renders the absence as the\n* empty segment, which is what flat (single-schema) introspection produces,\n* so both diff sides' FK ids meet by construction. A bound namespace (or a\n* cross-space target whose namespace lives in another contract's storage)\n* stamps its coordinate verbatim; namespaced targets (Postgres) resolve the\n* real DDL schema downstream.\n*\n* `dependsOn` carries the referenced table (created before the FK, dropped\n* after it) plus the FK's own columns (dropped after the FK, since dropping a\n* column auto-drops the FK built on it).\n*/\nfunction convertForeignKey(fk, storage) {\n\tconst targetIsUnbound = storage.namespaces[fk.target.namespaceId]?.isUnbound === true;\n\treturn {\n\t\tcolumns: fk.source.columns,\n\t\treferencedTable: fk.target.tableName,\n\t\t...targetIsUnbound ? {} : { referencedSchema: fk.target.namespaceId },\n\t\treferencedColumns: fk.target.columns,\n\t\t...ifDefined(\"name\", fk.name),\n\t\t...ifDefined(\"onDelete\", fk.onDelete),\n\t\t...ifDefined(\"onUpdate\", fk.onUpdate),\n\t\tdependsOn: [flatSchemaDependsOn(fk.target.tableName), ...flatColumnDependsOn(fk.source.tableName, fk.source.columns)]\n\t};\n}\nconst COLUMN_TYPE_ERROR_CODES = /* @__PURE__ */ new Set([\"CONTRACT.CODEC_DESCRIPTOR_MISSING\", \"CONTRACT.DATA_TYPE_UNREGISTERED\"]);\nfunction withColumnInErrors(table, column, build) {\n\ttry {\n\t\treturn build();\n\t} catch (cause) {\n\t\tif (!isStructuredError(cause) || !COLUMN_TYPE_ERROR_CODES.has(cause.code)) throw cause;\n\t\tthrow structuredError(cause.code, cause.message, {\n\t\t\tcause,\n\t\t\t...ifDefined(\"why\", cause.why),\n\t\t\t...ifDefined(\"fix\", cause.fix),\n\t\t\tmeta: {\n\t\t\t\t...cause.meta,\n\t\t\t\ttable,\n\t\t\t\tcolumn\n\t\t\t}\n\t\t});\n\t}\n}\nfunction convertTable(name, table, types, hooks, storage) {\n\tconst columns = {};\n\tfor (const [colName, colDef] of Object.entries(table.columns)) columns[colName] = withColumnInErrors(name, colName, () => convertColumn(colName, colDef, types, hooks));\n\tconst checks = table.checks && table.checks.length > 0 ? table.checks.map((c) => convertCheck(c, name, Object.keys(table.columns))) : void 0;\n\treturn new SqlTableIR({\n\t\tname,\n\t\tcolumns,\n\t\t...ifDefined(\"primaryKey\", table.primaryKey !== void 0 ? {\n\t\t\tcolumns: table.primaryKey.columns,\n\t\t\t...ifDefined(\"name\", table.primaryKey.name),\n\t\t\tdependsOn: flatColumnDependsOn(name, table.primaryKey.columns)\n\t\t} : void 0),\n\t\tforeignKeys: table.foreignKeys.map((fk) => convertForeignKey(fk, storage)),\n\t\tuniques: table.uniques.map((u) => convertUnique(u, name)),\n\t\tindexes: table.indexes.map((i) => convertIndex(i, name, Object.keys(table.columns))),\n\t\t...ifDefined(\"checks\", checks)\n\t});\n}\n/**\n* Detects destructive changes between two contract storages.\n*\n* The additive-only planner silently ignores removals (tables, columns).\n* This function detects those removals so callers can report them as conflicts\n* rather than silently producing an empty plan.\n*\n* Returns an empty array if no destructive changes are found.\n*/\nfunction detectDestructiveChanges(from, to) {\n\tif (!from) return [];\n\tconst hasOwn = (value, key) => Object.hasOwn(value, key);\n\tconst conflicts = [];\n\tconst namespaceIds = [.../* @__PURE__ */ new Set([...Object.keys(from.namespaces), ...Object.keys(to.namespaces)])].sort((a, b) => a < b ? -1 : a > b ? 1 : 0);\n\tfor (const namespaceId of namespaceIds) {\n\t\tconst fromNs = from.namespaces[namespaceId];\n\t\tconst toNs = to.namespaces[namespaceId];\n\t\tconst fromTables = fromNs?.entries.table;\n\t\tif (!fromTables) continue;\n\t\tfor (const tableName of Object.keys(fromTables)) {\n\t\t\tconst toTableRaw = toNs?.entries.table?.[tableName];\n\t\t\tif (!StorageTable.is(toTableRaw)) {\n\t\t\t\tconflicts.push({\n\t\t\t\t\tkind: \"tableRemoved\",\n\t\t\t\t\tsummary: `Table \"${tableName}\" was removed`\n\t\t\t\t});\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tconst toTable = toTableRaw;\n\t\t\tconst fromTableRaw = fromTables[tableName];\n\t\t\tif (!StorageTable.is(fromTableRaw)) continue;\n\t\t\tconst fromTable = fromTableRaw;\n\t\t\tfor (const columnName of Object.keys(fromTable.columns)) if (!hasOwn(toTable.columns, columnName)) conflicts.push({\n\t\t\t\tkind: \"columnRemoved\",\n\t\t\t\tsummary: `Column \"${tableName}\".\"${columnName}\" was removed`\n\t\t\t});\n\t\t}\n\t}\n\treturn conflicts;\n}\n/**\n* Converts the tables of a single namespace into a `SqlSchemaIR`, keyed by\n* table name within that namespace. Unlike {@link contractToSchemaIR}, which\n* flattens every namespace's tables into one bare-keyed record (and throws on a\n* cross-namespace name collision), this scopes the table iteration to one\n* namespace so the same table name can exist in two schemas.\n*\n* The full `storage` is still passed to `convertTable`, so value-set / enum /\n* type resolution that legitimately spans namespaces is unaffected. Foreign\n* keys are built purely from the FK descriptor (`fk.target`), so cross-namespace\n* FKs survive per-namespace conversion. The `annotations` block (storage-type\n* derived) is omitted here — the per-namespace tree consumer reads only the\n* per-table fields.\n*/\nfunction contractNamespaceToSchemaIR(storage, namespaceId, options) {\n\tif (options.annotationNamespace.length === 0) throw sqlFamilyError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", \"annotationNamespace must be a non-empty string\", {\n\t\twhy: \"The calling target pack passed an empty annotationNamespace to the contract-to-schema-IR projection.\",\n\t\tfix: \"Fix the target pack to pass its non-empty annotation namespace (e.g. \\\"pg\\\").\",\n\t\tmeta: { option: \"annotationNamespace\" }\n\t});\n\tconst namespace = storage.namespaces[namespaceId];\n\tif (!namespace) return new SqlSchemaIR({ tables: {} });\n\tconst tables = {};\n\tfor (const [tableName, tableDefRaw] of Object.entries(namespace.entries.table ?? {})) {\n\t\tStorageTable.assert(tableDefRaw, `namespaces.${namespaceId}.entries.table.${tableName}`);\n\t\ttables[tableName] = convertTable(tableName, tableDefRaw, options, options, storage);\n\t}\n\treturn new SqlSchemaIR({ tables });\n}\n/**\n* Converts a `Contract` to `SqlSchemaIR`.\n*\n* Reads `contract.storage` for tables.\n*\n* Drops codec metadata (`codecId`) since the schema IR only represents\n* structural information. Each column's type is written from the data type its codec\n* represents, with its parameters (e.g. `character` + `{ length: 36 }` → `character(36)`),\n* so the resulting IR compares correctly against the \"to\" contract during planning.\n*\n* Returns an empty schema IR when `contract` is `null` (new project).\n*/\nfunction contractToSchemaIR(contract, options) {\n\tif (options.annotationNamespace.length === 0) throw sqlFamilyError(\"CONTRACT.PACK_CONTRIBUTION_INVALID\", \"annotationNamespace must be a non-empty string\", {\n\t\twhy: \"The calling target pack passed an empty annotationNamespace to the contract-to-schema-IR projection.\",\n\t\tfix: \"Fix the target pack to pass its non-empty annotation namespace (e.g. \\\"pg\\\").\",\n\t\tmeta: { option: \"annotationNamespace\" }\n\t});\n\tif (!contract) return new SqlSchemaIR({ tables: {} });\n\tconst storage = contract.storage;\n\tconst tables = {};\n\tfor (const ns of Object.values(storage.namespaces)) for (const [tableName, tableDefRaw] of Object.entries(ns.entries.table ?? {})) {\n\t\tStorageTable.assert(tableDefRaw, `namespaces.${ns.id}.entries.table.${tableName}`);\n\t\tconst tableDef = tableDefRaw;\n\t\tif (tables[tableName] !== void 0) throw sqlFamilyError(\"CONTRACT.TABLE_AMBIGUOUS\", `contractToSchemaIR: duplicate SQL table name \"${tableName}\" across namespaces (ambiguous for flat SqlSchemaIR.tables).`, {\n\t\t\twhy: \"Two namespaces declare a table with the same name, which is ambiguous for the flat schema-IR table map.\",\n\t\t\tfix: \"Rename one of the tables so every table name is unique across namespaces.\",\n\t\t\tmeta: { table: tableName }\n\t\t});\n\t\ttables[tableName] = convertTable(tableName, tableDef, options, options, storage);\n\t}\n\treturn new SqlSchemaIR({ tables });\n}\n//#endregion\n//#region src/core/migrations/control-policy.ts\n/**\n* Whether a call is allowed to emit under a given control policy.\n*\n* - `managed` — full lifecycle, every op allowed.\n* - `tolerated` — create-if-absent only: allowed iff the call creates a whole\n* new top-level object (and its subject was positively resolved). Anything\n* that modifies an existing object, and anything whose subject could not be\n* resolved, is suppressed.\n* - `external` / `observed` — no DDL at all.\n*/\nfunction callAllowedUnderControlPolicy(policy, subject) {\n\tswitch (policy) {\n\t\tcase \"managed\": return true;\n\t\tcase \"tolerated\": return subject?.createsNewObject === true;\n\t\tcase \"external\":\n\t\tcase \"observed\": return false;\n\t}\n}\n/**\n* Partition the calls produced for a single set of subjects into those the\n* effective control policy permits (`kept`) and a list of\n* {@link SuppressionRecord}s describing the suppressed calls.\n*\n* **Prefer {@link partitionIssuesByControlPolicy}** for the schema-issue\n* pipeline: it filters subjects out of the planner's *input* so the planner\n* never has to reason about un-modeled state on `external`/`observed`\n* subjects. This call-level helper remains for paths that bypass the issue\n* pipeline — currently the codec-emitted field-event ops, which originate\n* from declared contract fields rather than from introspected schema state\n* and therefore cannot trip the diff engine.\n*/\nfunction partitionCallsByControlPolicy(options) {\n\tconst defaultControlPolicy = options.contract.defaultControlPolicy;\n\tconst kept = [];\n\tconst suppressions = [];\n\tfor (const call of options.calls) {\n\t\tconst subject = options.resolveControlPolicySubject(call);\n\t\tconst policy = governingControlPolicy(subject, defaultControlPolicy);\n\t\tif (callAllowedUnderControlPolicy(policy, subject)) kept.push(call);\n\t\telse suppressions.push({\n\t\t\tsubject,\n\t\t\tpolicy,\n\t\t\tfactoryName: options.resolveFactoryName(call),\n\t\t\tcreatesNewObject: subject?.createsNewObject ?? false\n\t\t});\n\t}\n\treturn Object.freeze({\n\t\tkept: Object.freeze(kept),\n\t\tsuppressions: Object.freeze(suppressions)\n\t});\n}\n/**\n* Partition a list of schema-issue-shaped inputs by the effective control\n* policy of each issue's subject *before* the planner is invoked.\n*\n* `plannable` is the list of issues whose subject's effective policy permits\n* the planner to act on them (`managed`, or `tolerated` for whole-object\n* creation issues only). Issues for `external`/`observed` subjects, and\n* non-creation issues for `tolerated` subjects, are dropped from the planner's\n* input entirely — they never enter introspection-driven planning, never feed\n* the diff engine, and never produce DDL calls that would have to be\n* post-filtered. This sidesteps a class of failure where the diff engine\n* cannot reason about the live shape of a subject the user marked as\n* out-of-scope (`external`).\n*\n* `suppressions` is one {@link SuppressionRecord} per suppressed subject (not\n* per suppressed issue). Its `factoryName` is the creation factory name when any\n* of the subject's issues is whole-object creation (e.g. `createTable`), else\n* `undefined` — the family never invents a modification verb for an op that\n* produced no call; the target renders the message.\n*\n* Unresolved-subject issues (`resolveControlPolicySubject` returns\n* `undefined`) emit one record each; they cannot be deduplicated because they\n* carry no subject coordinate.\n*/\nfunction partitionIssuesByControlPolicy(options) {\n\tconst defaultControlPolicy = options.contract.defaultControlPolicy;\n\tconst plannable = [];\n\tconst suppressedSubjects = /* @__PURE__ */ new Map();\n\tconst unresolvedSuppressions = [];\n\tfor (const issue of options.issues) {\n\t\tconst subject = options.resolveControlPolicySubject(issue);\n\t\tconst policy = governingControlPolicy(subject, defaultControlPolicy);\n\t\tconst creationFactoryName = options.resolveCreationFactoryName(issue);\n\t\tif (policy === \"managed\") {\n\t\t\tplannable.push(issue);\n\t\t\tcontinue;\n\t\t}\n\t\tif (policy === \"tolerated\" && subject !== void 0 && creationFactoryName !== void 0 && subject.createsNewObject) {\n\t\t\tplannable.push(issue);\n\t\t\tcontinue;\n\t\t}\n\t\tif (subject === void 0) {\n\t\t\tunresolvedSuppressions.push({\n\t\t\t\tsubject: void 0,\n\t\t\t\tpolicy,\n\t\t\t\tfactoryName: creationFactoryName,\n\t\t\t\tcreatesNewObject: false\n\t\t\t});\n\t\t\tcontinue;\n\t\t}\n\t\tconst key = subjectKey(subject);\n\t\tconst existing = suppressedSubjects.get(key);\n\t\tif (existing) {\n\t\t\tif (existing.creationFactoryName === void 0 && creationFactoryName !== void 0) existing.creationFactoryName = creationFactoryName;\n\t\t} else suppressedSubjects.set(key, {\n\t\t\tsubject,\n\t\t\tpolicy,\n\t\t\t...ifDefined(\"creationFactoryName\", creationFactoryName)\n\t\t});\n\t}\n\tconst suppressions = [...unresolvedSuppressions];\n\tfor (const entry of suppressedSubjects.values()) suppressions.push({\n\t\tsubject: entry.subject,\n\t\tpolicy: entry.policy,\n\t\tfactoryName: entry.creationFactoryName,\n\t\tcreatesNewObject: entry.subject.createsNewObject\n\t});\n\treturn Object.freeze({\n\t\tplannable: Object.freeze(plannable),\n\t\tsuppressions: Object.freeze(suppressions)\n\t});\n}\nfunction subjectKey(subject) {\n\treturn `${subject.namespaceId}\\u0000${subject.entityKind ?? \"\"}\\u0000${subject.entityName ?? \"\"}\\u0000${subject.rlsPolicy ?? \"\"}`;\n}\n//#endregion\n//#region src/core/migrations/field-event-planner.ts\nfunction planFieldEventOperations(options) {\n\treturn planFieldEventCalls(options).map(({ call }) => call);\n}\n/** The calls the codec hooks return, each with the field event's column. */\nfunction planFieldEventCalls(options) {\n\tconst priorContract = options.priorContract;\n\tconst newContract = options.newContract;\n\tconst renamedTo = new Map(options.tableRenames.map((rename) => [renameKey(rename.namespaceId, rename.from), rename.to]));\n\tconst newNameOf = (namespaceId, tableName) => renamedTo.get(renameKey(namespaceId, tableName));\n\tconst columnRenamedTo = new Map(options.columnRenames.map((rename) => [renameKey(rename.namespaceId, rename.table, rename.from), rename.to]));\n\tconst added = [];\n\tconst dropped = [];\n\tconst altered = [];\n\tconst namespaceIds = unionSorted(priorContract ? Object.keys(priorContract.storage.namespaces) : [], Object.keys(newContract.storage.namespaces));\n\tfor (const namespaceId of namespaceIds) {\n\t\tconst priorNs = priorContract?.storage.namespaces[namespaceId];\n\t\tconst newNs = newContract.storage.namespaces[namespaceId];\n\t\tconst priorTables = underNewNames(priorNs?.entries.table, (tableName) => newNameOf(namespaceId, tableName));\n\t\tconst newTables = newNs?.entries.table;\n\t\tconst tableNames = unionSorted(priorTables ? Object.keys(priorTables) : [], newTables ? Object.keys(newTables) : []);\n\t\tfor (const tableName of tableNames) {\n\t\t\tconst priorTableRaw = priorTables?.[tableName];\n\t\t\tconst newTableRaw = newTables?.[tableName];\n\t\t\tconst priorTable = StorageTable.is(priorTableRaw) ? priorTableRaw : void 0;\n\t\t\tconst newTable = StorageTable.is(newTableRaw) ? newTableRaw : void 0;\n\t\t\tconst priorColumns = underNewNames(priorTable?.columns, (columnName) => columnRenamedTo.get(renameKey(namespaceId, tableName, columnName)));\n\t\t\tconst fieldNames = unionSorted(priorColumns ? Object.keys(priorColumns) : [], newTable ? Object.keys(newTable.columns) : []);\n\t\t\tfor (const fieldName of fieldNames) {\n\t\t\t\tconst priorField = priorColumns?.[fieldName];\n\t\t\t\tconst newField = newTable?.columns[fieldName];\n\t\t\t\tconst entry = {\n\t\t\t\t\tnamespaceId,\n\t\t\t\t\ttableName,\n\t\t\t\t\tfieldName,\n\t\t\t\t\tpriorTable,\n\t\t\t\t\tnewTable,\n\t\t\t\t\tpriorField,\n\t\t\t\t\tnewField\n\t\t\t\t};\n\t\t\t\tif (priorField === void 0 && newField !== void 0) added.push(entry);\n\t\t\t\telse if (priorField !== void 0 && newField === void 0) dropped.push(entry);\n\t\t\t\telse if (priorField !== void 0 && newField !== void 0) {\n\t\t\t\t\tif (isAlteration(priorField, newField, options.dataTypes)) altered.push(entry);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\tconst calls = [];\n\tappendCalls(\"added\", added, options.codecHooks, calls, (e) => e.newField?.codecId);\n\tappendCalls(\"dropped\", dropped, options.codecHooks, calls, (e) => e.priorField?.codecId);\n\tappendCalls(\"altered\", altered, options.codecHooks, calls, (e) => e.newField?.codecId);\n\treturn calls;\n}\nfunction renameKey(...parts) {\n\treturn JSON.stringify(parts);\n}\nfunction underNewNames(tables, newNameOf) {\n\tif (tables === void 0) return void 0;\n\treturn Object.fromEntries(Object.entries(tables).map(([tableName, table]) => [newNameOf(tableName) ?? tableName, table]));\n}\nfunction appendCalls(event, entries, codecHooks, calls, pickCodecId) {\n\tfor (const entry of entries) {\n\t\tconst codecId = pickCodecId(entry);\n\t\tif (codecId === void 0) continue;\n\t\tconst hook = codecHooks.get(codecId);\n\t\tif (!hook?.onFieldEvent) continue;\n\t\tconst ctx = buildContext(event, entry);\n\t\tconst emitted = hook.onFieldEvent(event, ctx);\n\t\tfor (const call of emitted) calls.push({\n\t\t\tcall,\n\t\t\tnamespaceId: entry.namespaceId,\n\t\t\ttableName: entry.tableName,\n\t\t\tcolumnName: entry.fieldName\n\t\t});\n\t}\n}\n/**\n* The context's prior/new sides are scoped to the event:\n*\n* - `'added'` — only `newTable` / `newField` populated.\n* - `'dropped'` — only `priorTable` / `priorField` populated.\n* - `'altered'` — both sides populated.\n*/\nfunction buildContext(event, entry) {\n\tconst base = {\n\t\tnamespaceId: entry.namespaceId,\n\t\ttableName: entry.tableName,\n\t\tfieldName: entry.fieldName\n\t};\n\tif (event === \"added\") return {\n\t\t...base,\n\t\t...entry.newTable !== void 0 ? { newTable: entry.newTable } : {},\n\t\t...entry.newField !== void 0 ? { newField: entry.newField } : {}\n\t};\n\tif (event === \"dropped\") return {\n\t\t...base,\n\t\t...entry.priorTable !== void 0 ? { priorTable: entry.priorTable } : {},\n\t\t...entry.priorField !== void 0 ? { priorField: entry.priorField } : {}\n\t};\n\treturn {\n\t\t...base,\n\t\t...entry.priorTable !== void 0 ? { priorTable: entry.priorTable } : {},\n\t\t...entry.newTable !== void 0 ? { newTable: entry.newTable } : {},\n\t\t...entry.priorField !== void 0 ? { priorField: entry.priorField } : {},\n\t\t...entry.newField !== void 0 ? { newField: entry.newField } : {}\n\t};\n}\n/**\n* `'altered'` predicate. Returns `false` whenever `codecId` differs —\n* any codec change suppresses the `altered` event entirely, including\n* cases where another property also differs in the same diff. Codec\n* rotation is a v1 non-goal; avoiding the mixed event keeps the\n* migration semantics for codec changes explicit rather than smuggling\n* them through as `altered`.\n*\n* For non-`codecId` diffs, returns `true` iff any other column property\n* differs.\n*/\nfunction isAlteration(prior, current, dataTypes) {\n\tif (prior.codecId !== current.codecId) return false;\n\treturn !sameStorageColumn(prior, current, dataTypes);\n}\nfunction sameStorageColumn(a, b, dataTypes) {\n\tif (a === b) return true;\n\tif (!sameSqlColumnType(a, b, dataTypes)) return false;\n\tif (a.nullable !== b.nullable) return false;\n\tif (canonicalizeJson(codecOwnParams(a, dataTypes)) !== canonicalizeJson(codecOwnParams(b, dataTypes))) return false;\n\tif (!sameJson(a.default, b.default)) return false;\n\treturn true;\n}\n/** The parameters a column's codec keeps for itself: every key its data type does not declare. */\nfunction codecOwnParams(column, dataTypes) {\n\tconst declared = new Set(objectSchemaKeys(dataTypes.get(column.dataType)?.params) ?? []);\n\treturn Object.fromEntries(Object.entries(column.typeParams ?? {}).filter(([key]) => !declared.has(key)));\n}\nfunction sameJson(a, b) {\n\tif (a === b) return true;\n\tif (a === void 0 || b === void 0) return false;\n\treturn JSON.stringify(a) === JSON.stringify(b);\n}\nfunction unionSorted(a, b) {\n\tconst set = /* @__PURE__ */ new Set();\n\tfor (const name of a) set.add(name);\n\tfor (const name of b) set.add(name);\n\treturn [...set].sort((x, y) => x < y ? -1 : x > y ? 1 : 0);\n}\n//#endregion\n//#region src/core/migrations/resolve-column-rename.ts\nconst COLUMN_RENAME_UNMATCHED_CODE = \"MIGRATION.COLUMN_RENAME_UNMATCHED\";\nfunction tableLabel$1(namespaceId, table) {\n\treturn namespaceId === void 0 || namespaceId === UNBOUND_NAMESPACE_ID ? table : `${namespaceId}.${table}`;\n}\nfunction columnLabel(namespaceId, table, column) {\n\treturn `\"${tableLabel$1(namespaceId, table)}\".\"${column}\"`;\n}\nfunction declaresColumn(contract, namespaceId, table, column) {\n\tconst columns = contract.storage.namespaces[namespaceId]?.entries.table?.[table]?.columns;\n\treturn columns !== void 0 && Object.hasOwn(columns, column);\n}\n/**\n* Refuses a `renameColumn` call that does not match the migration's contracts, with\n* `MIGRATION.COLUMN_RENAME_UNMATCHED`.\n*/\nfunction unmatchedColumnRename(rename, reason) {\n\treturn sqlFamilyError(COLUMN_RENAME_UNMATCHED_CODE, `renameColumn ${columnLabel(rename.namespaceId, rename.table, rename.from)} to \"${rename.to}\" does not match the migration's contracts: ${reason}.`, {\n\t\twhy: \"renameColumn must name a table and a column as the migration's earlier rename operations leave them, and a new column name that the end contract has on that table and that the table does not have yet. Order the rename calls in the sequence the renames happen, and check the names of the table, the column and the namespace.\",\n\t\tmeta: {\n\t\t\ttable: rename.table,\n\t\t\tfrom: rename.from,\n\t\t\tto: rename.to\n\t\t}\n\t});\n}\n/**\n* Checks a column rename: the table must exist in `previous` (in exactly one namespace when the\n* namespace is not given) with the old column and without the new one, and the end contract must\n* have the new column on that table.\n*/\nfunction checkColumnRename(previous, endContract, rename) {\n\tconst namespaceIds = rename.namespaceId === void 0 ? previous.namespacesWithTable(rename.table) : previous.hasTable(rename.namespaceId, rename.table) ? [rename.namespaceId] : [];\n\tconst [namespaceId, ...others] = namespaceIds;\n\tif (namespaceId === void 0) return notOk({ kind: \"tableMissing\" });\n\tif (others.length > 0) return notOk({\n\t\tkind: \"tableInManyNamespaces\",\n\t\tnamespaceIds\n\t});\n\tif (!previous.hasColumn(namespaceId, rename.table, rename.from)) return notOk({\n\t\tkind: \"columnMissing\",\n\t\tnamespaceId\n\t});\n\tconst [taken] = previous.columnsNamed(namespaceId, rename.table, rename.to).filter((column) => column !== rename.from);\n\tif (taken !== void 0) return notOk({\n\t\tkind: \"nameTaken\",\n\t\tnamespaceId,\n\t\ttaken\n\t});\n\tif (!declaresColumn(endContract, namespaceId, rename.table, rename.to)) return notOk({\n\t\tkind: \"notInEndContract\",\n\t\tnamespaceId\n\t});\n\treturn ok({\n\t\tnamespaceId,\n\t\ttable: rename.table,\n\t\tfrom: rename.from,\n\t\tto: rename.to\n\t});\n}\n/** The reason `MIGRATION.COLUMN_RENAME_UNMATCHED` gives for a mismatch. */\nfunction columnRenameMismatchReason(rename, mismatch) {\n\tswitch (mismatch.kind) {\n\t\tcase \"tableMissing\": return `table \"${tableLabel$1(rename.namespaceId, rename.table)}\" does not exist at this point of the migration`;\n\t\tcase \"tableInManyNamespaces\": return `table \"${rename.table}\" is declared in more than one namespace (${mismatch.namespaceIds.join(\", \")}); name its namespace`;\n\t\tcase \"columnMissing\": return `column ${columnLabel(mismatch.namespaceId, rename.table, rename.from)} does not exist at this point of the migration`;\n\t\tcase \"nameTaken\": return `column ${columnLabel(mismatch.namespaceId, rename.table, rename.to)} already exists at this point of the migration${mismatch.taken === rename.to ? \"\" : ` as \"${mismatch.taken}\"`}`;\n\t\tcase \"notInEndContract\": return `column ${columnLabel(mismatch.namespaceId, rename.table, rename.to)} does not exist in the end contract`;\n\t}\n}\n/**\n* Resolves a column a migration renames with {@link checkColumnRename}, refusing a mismatch with\n* `MIGRATION.COLUMN_RENAME_UNMATCHED`.\n*/\nfunction resolveColumnRenameAgainst(previous, endContract, rename) {\n\tconst checked = checkColumnRename(previous, endContract, rename);\n\tif (!checked.ok) return notOk(unmatchedColumnRename(rename, columnRenameMismatchReason(rename, checked.failure)));\n\treturn ok(checked.value);\n}\n//#endregion\n//#region src/core/migrations/resolve-table-rename.ts\nconst TABLE_RENAME_UNMATCHED_CODE = \"MIGRATION.TABLE_RENAME_UNMATCHED\";\nfunction tableLabel(namespaceId, tableName) {\n\treturn namespaceId === void 0 || namespaceId === UNBOUND_NAMESPACE_ID ? tableName : `${namespaceId}.${tableName}`;\n}\nfunction declares(contract, namespaceId, tableName) {\n\treturn Object.hasOwn(contract.storage.namespaces[namespaceId]?.entries.table ?? {}, tableName);\n}\n/**\n* Refuses a `renameTable` call that does not match the migration's contracts, with\n* `MIGRATION.TABLE_RENAME_UNMATCHED`.\n*/\nfunction unmatchedTableRename(rename, reason) {\n\treturn sqlFamilyError(TABLE_RENAME_UNMATCHED_CODE, `renameTable \"${tableLabel(rename.namespaceId, rename.from)}\" to \"${rename.to}\" does not match the migration's contracts: ${reason}.`, {\n\t\twhy: \"renameTable must name a table as the migration's earlier rename operations leave it, and a new name that the end contract has and that no earlier rename operation has already produced. Order the renameTable calls in the sequence the renames happen, make the rename its own schema change, and check the spelling, the table and the namespace.\",\n\t\tmeta: {\n\t\t\tfrom: rename.from,\n\t\t\tto: rename.to\n\t\t}\n\t});\n}\n/**\n* Checks a table rename: the table must exist in `previous` (in exactly one namespace when the\n* namespace is not given), and the new name must exist in the end contract and not in `previous`.\n*/\nfunction checkTableRename(previous, endContract, rename) {\n\tconst namespaceIds = rename.namespaceId === void 0 ? previous.namespacesWithTable(rename.from) : previous.hasTable(rename.namespaceId, rename.from) ? [rename.namespaceId] : [];\n\tconst [namespaceId, ...others] = namespaceIds;\n\tif (namespaceId === void 0) return notOk({ kind: \"tableMissing\" });\n\tif (others.length > 0) return notOk({\n\t\tkind: \"tableInManyNamespaces\",\n\t\tnamespaceIds\n\t});\n\tconst [taken] = previous.tablesNamed(namespaceId, rename.to).filter((table) => table !== rename.from);\n\tif (taken !== void 0) return notOk({\n\t\tkind: \"nameTaken\",\n\t\tnamespaceId,\n\t\ttaken\n\t});\n\tif (!declares(endContract, namespaceId, rename.to)) return notOk({\n\t\tkind: \"notInEndContract\",\n\t\tnamespaceId\n\t});\n\treturn ok({\n\t\tnamespaceId,\n\t\tfrom: rename.from,\n\t\tto: rename.to\n\t});\n}\n/** The reason `MIGRATION.TABLE_RENAME_UNMATCHED` gives for a mismatch. */\nfunction tableRenameMismatchReason(rename, mismatch) {\n\tswitch (mismatch.kind) {\n\t\tcase \"tableMissing\": return `table \"${tableLabel(rename.namespaceId, rename.from)}\" does not exist at this point of the migration`;\n\t\tcase \"tableInManyNamespaces\": return `table \"${rename.from}\" is declared in more than one namespace (${mismatch.namespaceIds.join(\", \")}); name its namespace`;\n\t\tcase \"nameTaken\": return `table \"${tableLabel(mismatch.namespaceId, rename.to)}\" already exists at this point of the migration${mismatch.taken === rename.to ? \"\" : ` as \"${mismatch.taken}\"`}`;\n\t\tcase \"notInEndContract\": return `table \"${tableLabel(mismatch.namespaceId, rename.to)}\" does not exist in the end contract`;\n\t}\n}\n/**\n* Resolves a table a migration renames with {@link checkTableRename}, refusing a mismatch with\n* `MIGRATION.TABLE_RENAME_UNMATCHED`.\n*/\nfunction resolveTableRenameAgainst(previous, endContract, rename) {\n\tconst checked = checkTableRename(previous, endContract, rename);\n\tif (!checked.ok) return notOk(unmatchedTableRename(rename, tableRenameMismatchReason(rename, checked.failure)));\n\treturn ok(checked.value);\n}\n//#endregion\n//#region src/core/migrations/statement-planning.ts\n/** Whether a model's storage names a table, as a model a SQL contract stores in a table does. */\nfunction isSqlModelStorage(storage) {\n\treturn typeof storage[\"table\"] === \"string\" && typeof storage[\"namespaceId\"] === \"string\" && typeof storage[\"fields\"] === \"object\" && storage[\"fields\"] !== null;\n}\n/** The storage of a model the contract stores in a table, or `undefined` for any other model. */\nfunction sqlModelStorage(contract, coordinate) {\n\tconst storage = contract.domain.namespaces[coordinate.namespaceId]?.models[coordinate.model]?.storage;\n\treturn storage !== void 0 && isSqlModelStorage(storage) ? storage : void 0;\n}\nfunction modelTable(contract, coordinate) {\n\tconst storage = sqlModelStorage(contract, coordinate);\n\treturn storage === void 0 ? void 0 : {\n\t\tnamespaceId: storage.namespaceId,\n\t\ttable: storage.table\n\t};\n}\n/**\n* The storage effect of a model rename: the origin model's table compared with the destination\n* model's. Equal tables mean the rename needs no storage change.\n*/\nfunction modelRenameStorageEffect(statement, fromContract, contract) {\n\tconst from = modelTable(fromContract, statement.from);\n\tif (from === void 0) return notOk({\n\t\tkind: \"noTable\",\n\t\tmodel: statement.from\n\t});\n\tconst to = modelTable(contract, statement.to);\n\tif (to === void 0) return notOk({\n\t\tkind: \"noTable\",\n\t\tmodel: statement.to\n\t});\n\tif (from.namespaceId !== to.namespaceId) return ok({\n\t\tkind: \"moveNamespace\",\n\t\tfrom,\n\t\tto\n\t});\n\tif (from.table === to.table) return ok({ kind: \"unchanged\" });\n\treturn ok({\n\t\tkind: \"renameTable\",\n\t\trename: {\n\t\t\tnamespaceId: from.namespaceId,\n\t\t\tfrom: from.table,\n\t\t\tto: to.table\n\t\t}\n\t});\n}\nfunction fieldColumn(contract, coordinate) {\n\tconst fields = sqlModelStorage(contract, coordinate)?.fields;\n\treturn fields !== void 0 && Object.hasOwn(fields, coordinate.field) ? fields[coordinate.field]?.column : void 0;\n}\n/**\n* The storage effect of a field rename: the origin field's column compared with the destination\n* field's. A relation field has no column on either side, and equal columns need no change.\n*/\nfunction fieldRenameStorageEffect(statement, fromContract, contract) {\n\tconst table = modelTable(fromContract, statement.from);\n\tif (table === void 0) return notOk({\n\t\tkind: \"noTable\",\n\t\tmodel: statement.from\n\t});\n\tconst from = fieldColumn(fromContract, statement.from);\n\tconst to = fieldColumn(contract, statement.to);\n\tif (from === void 0 && to === void 0) return ok({ kind: \"unchanged\" });\n\tif (from === void 0 || to === void 0) return notOk({ kind: \"columnOnOneSide\" });\n\tif (from === to) return ok({ kind: \"unchanged\" });\n\treturn ok({\n\t\tkind: \"renameColumn\",\n\t\ttable,\n\t\tfrom,\n\t\tto\n\t});\n}\nfunction operationsOf(call) {\n\treturn [call, ...call.companions];\n}\nconst DRIFTED = \"so the database has drifted from that contract. Inspect it with prisma db schema, or leave out this statement.\";\nconst UNMATCHED = \"A statement plans the rename a hand-written rename call makes, and that call does not match the contracts. Leave out this statement.\";\nfunction statementRefused(statement, summary, why, location, refusedOperationClass) {\n\treturn {\n\t\tkind: \"statementRefused\",\n\t\tsummary,\n\t\twhy,\n\t\trefusedStatement: statement,\n\t\t...refusedOperationClass === void 0 ? {} : { refusedOperationClass },\n\t\t...location === void 0 ? {} : { location: {\n\t\t\tnamespaceId: location.namespaceId,\n\t\t\tentityKind: \"table\",\n\t\t\tentityName: location.table,\n\t\t\t...location.column === void 0 ? {} : { column: location.column }\n\t\t} }\n\t};\n}\nfunction tableControlPolicy(contract, table) {\n\tconst node = contract.storage.namespaces[table.namespaceId]?.entries.table?.[table.table];\n\treturn governingControlPolicy({ explicitNodeControlPolicy: StorageTable.is(node) ? node.control : void 0 }, contract.defaultControlPolicy);\n}\nfunction tableKey(table) {\n\treturn JSON.stringify([table.namespaceId, table.table]);\n}\nfunction tableRenameRefused(statement, label, rename, mismatch) {\n\tswitch (mismatch.kind) {\n\t\tcase \"tableMissing\": return statementRefused(statement, `${label}: the schema being planned from has no table \"${rename.from}\"`, `The database has no table \"${rename.from}\", although the contract it was last updated to names it, ${DRIFTED}`, {\n\t\t\tnamespaceId: rename.namespaceId,\n\t\t\ttable: rename.from\n\t\t});\n\t\tcase \"nameTaken\": return statementRefused(statement, `${label}: the schema being planned from already has a table \"${rename.to}\"${mismatch.taken === rename.to ? \"\" : `, as \"${mismatch.taken}\"`}`, `A rename cannot replace a table that already exists. Rename or drop table \"${mismatch.taken}\" first, or leave out this statement.`, {\n\t\t\tnamespaceId: rename.namespaceId,\n\t\t\ttable: rename.to\n\t\t});\n\t\tcase \"tableInManyNamespaces\":\n\t\tcase \"notInEndContract\": return statementRefused(statement, `${label}: ${tableRenameMismatchReason(rename, mismatch)}`, UNMATCHED, {\n\t\t\tnamespaceId: rename.namespaceId,\n\t\t\ttable: rename.from\n\t\t});\n\t}\n}\nfunction columnRenameRefused(statement, label, rename, mismatch) {\n\tconst table = {\n\t\tnamespaceId: rename.namespaceId,\n\t\ttable: rename.table\n\t};\n\tswitch (mismatch.kind) {\n\t\tcase \"tableMissing\": return statementRefused(statement, `${label}: the schema being planned from has no table \"${rename.table}\"`, `The database has no table \"${rename.table}\", although the contract it was last updated to names it, ${DRIFTED}`, table);\n\t\tcase \"columnMissing\": return statementRefused(statement, `${label}: the schema being planned from has no column \"${rename.from}\" on table \"${rename.table}\"`, `The database has no column \"${rename.from}\" on table \"${rename.table}\", although the contract it was last updated to names it, ${DRIFTED}`, {\n\t\t\t...table,\n\t\t\tcolumn: rename.from\n\t\t});\n\t\tcase \"nameTaken\": return statementRefused(statement, `${label}: the schema being planned from already has a column \"${mismatch.taken}\" on table \"${rename.table}\"`, `A rename cannot replace a column that already exists. Rename or drop column \"${mismatch.taken}\" of table \"${rename.table}\" first, or leave out this statement.`, {\n\t\t\t...table,\n\t\t\tcolumn: rename.to\n\t\t});\n\t\tcase \"tableInManyNamespaces\":\n\t\tcase \"notInEndContract\": return statementRefused(statement, `${label}: ${columnRenameMismatchReason(rename, mismatch)}`, UNMATCHED, {\n\t\t\t...table,\n\t\t\tcolumn: rename.from\n\t\t});\n\t}\n}\nvar StatementPlanner = class {\n\t#fromContract;\n\t#contract;\n\t#policy;\n\t#target;\n\t/** The name each table renamed so far has in the working schema, keyed by its origin name. */\n\t#renamedTables = /* @__PURE__ */ new Map();\n\tcalls = [];\n\t/** How many operations the calls planned so far lower to. */\n\t#operationCount = 0;\n\ttableRenames = [];\n\tcolumnRenames = [];\n\tconstructor(input) {\n\t\tthis.#fromContract = input.fromContract;\n\t\tthis.#contract = input.contract;\n\t\tthis.#policy = input.policy;\n\t\tthis.#target = input.target;\n\t}\n\t/** Plans one statement; the result is the positions of the operations it accounts for. */\n\tplan(statement) {\n\t\treturn statement.entity === \"model\" ? this.#planModel(statement) : this.#planField(statement);\n\t}\n\t#controlPolicyRefusal(statement, label, destinationTable) {\n\t\tconst controlPolicy = tableControlPolicy(this.#contract, destinationTable);\n\t\tif (controlPolicy === \"managed\") return void 0;\n\t\treturn statementRefused(statement, `${label}: the table's control policy is \"${controlPolicy}\"`, `Statements rename only tables, and columns of tables, whose control policy is \"managed\"; table \"${destinationTable.table}\" is \"${controlPolicy}\". Make the change in the database yourself and leave out this statement.`, destinationTable);\n\t}\n\t#emit(statement, label, location, call) {\n\t\tconst refused = operationsOf(call).map((operation) => operation.operationClass).find((operationClass) => !this.#policy.allowedOperationClasses.includes(operationClass));\n\t\tif (refused !== void 0) return notOk(statementRefused(statement, `${label}: the plan does not allow \"${refused}\" operations`, `The rename produces a \"${refused}\" operation, and this command plans only ${this.#policy.allowedOperationClasses.map((c) => `\"${c}\"`).join(\", \")} operations. Leave out this statement, or make the change with a command that allows \"${refused}\" operations, such as migration plan.`, location, refused));\n\t\tthis.#target.apply(call);\n\t\tthis.calls.push(call);\n\t\tconst first = this.#operationCount;\n\t\tthis.#operationCount += operationsOf(call).length;\n\t\treturn ok(operationsOf(call).map((_, offset) => first + offset));\n\t}\n\t#planModel(statement) {\n\t\tconst worked = modelRenameStorageEffect(statement, this.#fromContract, this.#contract);\n\t\tif (!worked.ok) return notOk(statementRefused(statement, `Model \"${modelDisplayName(worked.failure.model)}\" has no table in its contract`, `A model rename renames the model's table, and model \"${modelDisplayName(worked.failure.model)}\" has none in its contract. Leave out this statement.`, void 0));\n\t\tconst effect = worked.value;\n\t\tif (effect.kind === \"unchanged\") return ok([]);\n\t\tif (effect.kind === \"moveNamespace\") return notOk(statementRefused(statement, `Moving a model to another namespace is not supported in this release: \"${modelDisplayName(statement.from)}\" to \"${modelDisplayName(statement.to)}\"`, `The model's table would move from namespace \"${effect.from.namespaceId}\" to namespace \"${effect.to.namespaceId}\". Leave out this statement and move the table yourself in a hand-written migration, or keep the model in namespace \"${effect.from.namespaceId}\".`, effect.from));\n\t\tconst { rename } = effect;\n\t\tconst destinationTable = {\n\t\t\tnamespaceId: rename.namespaceId,\n\t\t\ttable: rename.to\n\t\t};\n\t\tconst label = `Cannot rename table \"${rename.from}\" to \"${rename.to}\"`;\n\t\tconst policyRefusal = this.#controlPolicyRefusal(statement, label, destinationTable);\n\t\tif (policyRefusal !== void 0) return notOk(policyRefusal);\n\t\tconst checked = checkTableRename(this.#target.tables(), this.#contract, rename);\n\t\tif (!checked.ok) return notOk(tableRenameRefused(statement, label, rename, checked.failure));\n\t\tconst planned = this.#emit(statement, label, destinationTable, this.#target.renameTableCall(rename));\n\t\tif (planned.ok) {\n\t\t\tthis.tableRenames.push(rename);\n\t\t\tthis.#renamedTables.set(tableKey({\n\t\t\t\tnamespaceId: rename.namespaceId,\n\t\t\t\ttable: rename.from\n\t\t\t}), rename.to);\n\t\t}\n\t\treturn planned;\n\t}\n\t#planField(statement) {\n\t\tconst worked = fieldRenameStorageEffect(statement, this.#fromContract, this.#contract);\n\t\tif (!worked.ok && worked.failure.kind === \"noTable\") return notOk(statementRefused(statement, `Model \"${modelDisplayName(worked.failure.model)}\" has no table in its contract`, `A field rename renames the field's column, and model \"${modelDisplayName(worked.failure.model)}\" has no table in its contract. Leave out this statement.`, void 0));\n\t\tif (!worked.ok) return notOk(statementRefused(statement, `Field \"${modelDisplayName(statement.from)}.${statement.from.field}\" has a column on one side only of ${describeMigrationStatement(statement, this.#fromContract, this.#contract)}`, \"A field rename renames a column or changes nothing in storage, and this field gains or loses its column. Leave out this statement and plan the change without it.\", void 0));\n\t\tconst effect = worked.value;\n\t\tif (effect.kind === \"unchanged\") return ok([]);\n\t\tconst table = this.#renamedTables.get(tableKey(effect.table)) ?? effect.table.table;\n\t\tconst destinationTable = modelTable(this.#contract, statement.to);\n\t\tif (destinationTable !== void 0 && (destinationTable.namespaceId !== effect.table.namespaceId || destinationTable.table !== table)) {\n\t\t\tconst tableRename = {\n\t\t\t\tnamespaceId: effect.table.namespaceId,\n\t\t\t\tfrom: table,\n\t\t\t\tto: destinationTable.table\n\t\t\t};\n\t\t\tconst model = modelDisplayName(statement.to);\n\t\t\tconst fieldText = `${model}.${statement.from.field}:${model}.${statement.to.field}`;\n\t\t\treturn notOk(statementRefused(statement, `Cannot rename column \"${table}\".\"${effect.from}\": the model's table changes from \"${table}\" to \"${destinationTable.table}\", and no statement renames the table`, `The column would be renamed on a table the plan then drops and creates under the new name, and a migration that only changes the table name is planned the same way. With migration plan, rename the table by hand in its own migration first. Change the contract so that only the table name changes, and run prisma contract emit. Run prisma migration new --name <name> --from <hash of the migration the database is at>, add ${this.#target.renderTableRename(tableRename)} to the operations of its migration.ts, and run node on that migration.ts to write its ops.json. Then change the contract to its final form, emit it, and plan the field rename with --from that migration. With db update, change the contract so that only the table name changes, and run prisma contract emit. Rename the table in the database yourself with ${this.#target.tableRenameByHand(tableRename).join(\"; \")}, check that prisma db update --dry-run plans no drop of a table or column, and run prisma db update to store that contract. Then emit the final contract and run prisma db update --rename ${fieldText}.`, {\n\t\t\t\tnamespaceId: effect.table.namespaceId,\n\t\t\t\ttable,\n\t\t\t\tcolumn: effect.from\n\t\t\t}));\n\t\t}\n\t\tconst rename = {\n\t\t\tnamespaceId: effect.table.namespaceId,\n\t\t\ttable,\n\t\t\tfrom: effect.from,\n\t\t\tto: effect.to\n\t\t};\n\t\tconst tableLocation = {\n\t\t\tnamespaceId: rename.namespaceId,\n\t\t\ttable\n\t\t};\n\t\tconst label = `Cannot rename column \"${table}\".\"${rename.from}\" to \"${rename.to}\"`;\n\t\tconst policyRefusal = this.#controlPolicyRefusal(statement, label, tableLocation);\n\t\tif (policyRefusal !== void 0) return notOk(policyRefusal);\n\t\tconst checked = checkColumnRename(this.#target.tables(), this.#contract, rename);\n\t\tif (!checked.ok) return notOk(columnRenameRefused(statement, label, rename, checked.failure));\n\t\tconst planned = this.#emit(statement, label, {\n\t\t\t...tableLocation,\n\t\t\tcolumn: rename.from\n\t\t}, this.#target.renameColumnCall(rename));\n\t\tif (planned.ok) this.columnRenames.push(rename);\n\t\treturn planned;\n\t}\n};\n/**\n* Plans the statements in order against a target's working schema: each model rename becomes a\n* table rename and each field rename a column rename, computed against the schema earlier\n* statements left, then applied to it. The first statement that cannot be planned fails the whole\n* plan with a `statementRefused` conflict that carries the statement.\n*/\nfunction planStatements(input) {\n\tconst { fromContract } = input;\n\tconst [first] = input.statements;\n\tif (first === void 0) return ok({\n\t\tcalls: [],\n\t\ttableRenames: [],\n\t\tcolumnRenames: [],\n\t\tappliedStatements: []\n\t});\n\tif (fromContract === null) return notOk(statementRefused(first, \"Statements need an origin contract, and this plan has none\", \"A statement names models and fields of the origin contract, and this plan has none. Plan from a contract that has the old names, or leave out the statement.\", void 0));\n\tconst planner = new StatementPlanner({\n\t\t...input,\n\t\tfromContract\n\t});\n\tconst appliedStatements = [];\n\tfor (const statement of input.statements) {\n\t\tconst operationIndexes = planner.plan(statement);\n\t\tif (!operationIndexes.ok) return operationIndexes;\n\t\tappliedStatements.push({\n\t\t\tstatement,\n\t\t\toperationIndexes: operationIndexes.value\n\t\t});\n\t}\n\treturn ok({\n\t\tcalls: planner.calls,\n\t\ttableRenames: planner.tableRenames,\n\t\tcolumnRenames: planner.columnRenames,\n\t\tappliedStatements\n\t});\n}\n/**\n* The column of each field a convert or backfill statement names, as the destination contract\n* stores it. These statements rename nothing, so the strategies that plan a field's change read\n* them instead of the working schema. A field with no column has none to list.\n*/\nfunction fieldStatementColumns(statements, contract) {\n\tconst columnsOf = (kind) => statements.flatMap((statement) => {\n\t\tif (statement.kind !== kind) return [];\n\t\tconst table = modelTable(contract, statement.field);\n\t\tconst column = fieldColumn(contract, statement.field);\n\t\treturn table === void 0 || column === void 0 ? [] : [{\n\t\t\t...table,\n\t\t\tcolumn,\n\t\t\tfield: statement.field,\n\t\t\ttext: fieldStatementText(contract, statement.field)\n\t\t}];\n\t});\n\treturn {\n\t\tconvert: columnsOf(\"convert\"),\n\t\tbackfill: columnsOf(\"backfill\")\n\t};\n}\n/**\n* A conflict for the first backfill statement that names a field the origin model does not have and\n* whose column has a default: the default fills the existing rows when the column is added, so the\n* statement has nothing to fill. A field already in the origin keeps its backfill, since a default\n* does not fill the rows that hold NULL when the column becomes required.\n*/\nfunction backfillOfDefaultedField(statements, fromContract, contract) {\n\tfor (const statement of statements) {\n\t\tif (statement.kind !== \"backfill\" || fromContract === null) continue;\n\t\tconst originModel = sqlModelStorage(fromContract, statement.field);\n\t\tif (originModel === void 0 || Object.hasOwn(originModel.fields, statement.field.field)) continue;\n\t\tconst table = modelTable(contract, statement.field);\n\t\tconst column = fieldColumn(contract, statement.field);\n\t\tif (table === void 0 || column === void 0) continue;\n\t\tif ((contract.storage.namespaces[table.namespaceId]?.entries.table?.[table.table]?.columns[column])?.default === void 0) continue;\n\t\treturn statementRefused(statement, `${describeMigrationStatement(statement, fromContract, contract)}: the field is new and has a default`, \"The default fills the existing rows when the column is added, so there is nothing to backfill. Leave out the --backfill statement.\", {\n\t\t\tnamespaceId: table.namespaceId,\n\t\t\ttable: table.table,\n\t\t\tcolumn\n\t\t});\n\t}\n}\n/**\n* Every statement of a plan in the order given, with the operations it accounts for: a rename's\n* from `renames`, and none yet for any other statement.\n*/\nfunction appliedStatementsInOrder(statements, renames) {\n\treturn statements.map((statement) => renames.find((applied) => applied.statement === statement) ?? {\n\t\tstatement,\n\t\toperationIndexes: []\n\t});\n}\n//#endregion\n//#region src/core/migrations/field-of-column.ts\n/**\n* The field of `contract` that stores `column` of `table`, or undefined when no field stores it or\n* tables of two storage namespaces share the table's name.\n*/\nfunction fieldOfColumn(contract, table, column) {\n\tconst fields = Object.entries(contract.domain.namespaces).flatMap(([namespaceId, namespace]) => Object.entries(namespace.models).flatMap(([model, definition]) => {\n\t\tconst { storage } = definition;\n\t\tif (!isSqlModelStorage(storage) || storage.table !== table) return [];\n\t\tconst field = Object.entries(storage.fields).find(([, stored]) => stored.column === column);\n\t\tif (field === void 0) return [];\n\t\treturn [{\n\t\t\tstorageNamespace: storage.namespaceId,\n\t\t\tisRoot: definition.base === void 0,\n\t\t\tsubject: {\n\t\t\t\tkind: \"field\",\n\t\t\t\tnamespaceId: asNamespaceId(namespaceId),\n\t\t\t\tmodel,\n\t\t\t\tfield: field[0]\n\t\t\t}\n\t\t}];\n\t}));\n\tif (new Set(fields.map(({ storageNamespace }) => storageNamespace)).size !== 1) return void 0;\n\treturn (fields.find(({ isRoot }) => isRoot) ?? fields[0])?.subject;\n}\n//#endregion\n//#region src/core/migrations/operation-subjects.ts\n/** What a codec hook's call is about: the column of the field event it was returned for. */\nfunction fieldEventStorage(field) {\n\treturn {\n\t\tstorageName: [\n\t\t\t...field.namespaceId === UNBOUND_NAMESPACE_ID ? [] : [field.namespaceId],\n\t\t\tfield.tableName,\n\t\t\tfield.columnName\n\t\t].join(\".\"),\n\t\ttable: {\n\t\t\tnamespaceId: field.namespaceId,\n\t\t\ttable: field.tableName,\n\t\t\tcolumn: field.columnName\n\t\t}\n\t};\n}\n/**\n* Names for destructive calls a target cannot map to storage: each call's factory name, with a\n* `#n` ordinal when several calls of the plan share it, so each name picks out one call.\n*/\nfunction unknownCallNames(calls) {\n\tconst counts = /* @__PURE__ */ new Map();\n\tfor (const call of calls) counts.set(call.factoryName, (counts.get(call.factoryName) ?? 0) + 1);\n\tconst seen = /* @__PURE__ */ new Map();\n\treturn new Map(calls.map((call) => {\n\t\tconst ordinal = (seen.get(call.factoryName) ?? 0) + 1;\n\t\tseen.set(call.factoryName, ordinal);\n\t\treturn [call, (counts.get(call.factoryName) ?? 0) > 1 ? `${call.factoryName}#${ordinal}` : call.factoryName];\n\t}));\n}\nfunction originTable(context, namespaceId, table) {\n\tfor (const statement of context.statements) {\n\t\tif (statement.kind !== \"rename\" || statement.entity !== \"model\") continue;\n\t\tconst effect = modelRenameStorageEffect(statement, context.fromContract, context.contract);\n\t\tif (!effect.ok || effect.value.kind !== \"renameTable\") continue;\n\t\tconst { rename } = effect.value;\n\t\tif (rename.namespaceId === namespaceId && rename.to === table) return rename.from;\n\t}\n\treturn table;\n}\nfunction originColumn(context, namespaceId, table, column) {\n\tfor (const statement of context.statements) {\n\t\tif (statement.kind !== \"rename\" || statement.entity !== \"field\") continue;\n\t\tconst effect = fieldRenameStorageEffect(statement, context.fromContract, context.contract);\n\t\tif (!effect.ok || effect.value.kind !== \"renameColumn\") continue;\n\t\tconst rename = effect.value;\n\t\tif (rename.table.namespaceId === namespaceId && rename.table.table === table && rename.to === column) return rename.from;\n\t}\n\treturn column;\n}\n/** The models of `contract` that store `table`: a model and its variants share one. */\nfunction modelsStoring(contract, namespaceId, table) {\n\treturn Object.entries(contract.domain.namespaces).flatMap(([modelNamespace, namespace]) => Object.entries(namespace.models).flatMap(([model, definition]) => {\n\t\tconst { storage } = definition;\n\t\tif (!isSqlModelStorage(storage)) return [];\n\t\tif (storage.namespaceId !== namespaceId || storage.table !== table) return [];\n\t\treturn [{\n\t\t\tcoordinate: {\n\t\t\t\tnamespaceId: asNamespaceId(modelNamespace),\n\t\t\t\tmodel\n\t\t\t},\n\t\t\tisRoot: definition.base === void 0,\n\t\t\tfields: storage.fields\n\t\t}];\n\t}));\n}\nfunction subjectOf(target, context) {\n\tconst storage = {\n\t\tkind: \"storage\",\n\t\tname: target.storageName\n\t};\n\tconst { fromContract } = context;\n\tif (target.table === void 0 || fromContract === null) return storage;\n\tconst withOrigin = {\n\t\t...context,\n\t\tfromContract\n\t};\n\tconst { namespaceId } = target.table;\n\tconst table = originTable(withOrigin, namespaceId, target.table.table);\n\tconst models = modelsStoring(fromContract, namespaceId, table);\n\tif (target.table.column === void 0) {\n\t\tconst model = models.find(({ isRoot }) => isRoot) ?? models[0];\n\t\treturn model === void 0 ? storage : {\n\t\t\tkind: \"model\",\n\t\t\t...model.coordinate\n\t\t};\n\t}\n\tconst column = originColumn(withOrigin, namespaceId, table, target.table.column);\n\tfor (const model of [...models].sort((a, b) => Number(b.isRoot) - Number(a.isRoot))) {\n\t\tconst field = Object.entries(model.fields).find(([, stored]) => stored.column === column)?.[0];\n\t\tif (field !== void 0) return {\n\t\t\tkind: \"field\",\n\t\t\t...model.coordinate,\n\t\t\tfield\n\t\t};\n\t}\n\treturn storage;\n}\n/**\n* How to keep the rows of a dropped table whose model the destination keeps under the same name in\n* another table of the same namespace: no statement can rename that table, so the user renames it\n* by hand. None when the origin contract already stores a model in that table.\n*/\nfunction keepTableAdvice(target, subject, context) {\n\tif (subject.kind !== \"model\" || target.table === void 0 || context.fromContract === null) return;\n\tconst storage = context.contract.domain.namespaces[subject.namespaceId]?.models[subject.model]?.storage;\n\tif (storage === void 0 || !isSqlModelStorage(storage)) return void 0;\n\tconst { namespaceId, table: from } = target.table;\n\tif (storage.namespaceId !== namespaceId || storage.table === from) return void 0;\n\tif (modelsStoring(context.fromContract, namespaceId, storage.table).length > 0) return void 0;\n\tconst rename = {\n\t\tnamespaceId,\n\t\tfrom,\n\t\tto: storage.table\n\t};\n\treturn `To keep its rows, rename table \"${from}\" to \"${storage.table}\" instead; a statement cannot rename the table of a model that keeps its name. With db update, rename the table in the database yourself with ${context.byHand.tableRenameByHand(rename).join(\"; \")}, then run prisma db update. With migration plan, write the rename as a migration of its own instead: run prisma migration new --name <name> --from <hash of the migration the database is at>, add ${context.byHand.renderTableRename(rename)} to the operations of its migration.ts, run node on that migration.ts so it writes ops.json, then run prisma db migrate.`;\n}\n/**\n* The subject of each operation that loses data and each that widens access, at its position in\n* the plan. A subject is a model or a field of the origin contract when one stores it, found under\n* its origin name when a rename statement renamed its table or column earlier in the plan.\n*/\nfunction subjectsOfCalls(calls, context) {\n\tconst dataLoss = [];\n\tconst accessWidening = [];\n\tconst temporaryValues = [];\n\tlet operationIndex = 0;\n\tfor (const call of calls) {\n\t\tfor (const { table, column, value } of call.temporaryValues) temporaryValues.push({\n\t\t\toperationIndex,\n\t\t\tsubject: fieldOfColumn(context.contract, table, column) ?? {\n\t\t\t\tkind: \"storage\",\n\t\t\t\tname: `${table}.${column}`\n\t\t\t},\n\t\t\tvalue\n\t\t});\n\t\tfor (const target of call.dataLoss) {\n\t\t\tconst subject = subjectOf(target, context);\n\t\t\tdataLoss.push({\n\t\t\t\toperationIndex,\n\t\t\t\tsubject,\n\t\t\t\tloss: target.loss,\n\t\t\t\tlabel: call.label,\n\t\t\t\t...ifDefined(\"keepDataAdvice\", keepTableAdvice(target, subject, context))\n\t\t\t});\n\t\t}\n\t\tfor (const target of call.accessWidening) accessWidening.push({\n\t\t\toperationIndex,\n\t\t\tsubject: subjectOf(target, context),\n\t\t\twidens: target.widens\n\t\t});\n\t\toperationIndex += call.operationCount;\n\t}\n\treturn {\n\t\tdataLoss,\n\t\taccessWidening,\n\t\ttemporaryValues\n\t};\n}\n//#endregion\n//#region src/core/migrations/plan-helpers.ts\nconst readOnlyEmptyObject = Object.freeze({});\nfunction cloneRecord(value) {\n\tif (value === readOnlyEmptyObject) return value;\n\treturn blindCast(Object.freeze({ ...value }));\n}\nfunction freezeSteps(steps) {\n\tif (steps.length === 0) return Object.freeze([]);\n\treturn Object.freeze(steps.map((step) => Object.freeze({\n\t\tdescription: step.description,\n\t\tsql: step.sql,\n\t\t...step.params ? { params: Object.freeze([...step.params]) } : {},\n\t\t...step.meta ? { meta: cloneRecord(step.meta) } : {},\n\t\t...step.expectation ? { expectation: Object.freeze({ ...step.expectation }) } : {}\n\t})));\n}\nfunction freezeDetailsValue(value) {\n\tif (value === null || value === void 0) return value;\n\tif (typeof value !== \"object\") return value;\n\tif (Array.isArray(value)) return blindCast(Object.freeze([...value]));\n\treturn blindCast(Object.freeze({ ...value }));\n}\nfunction freezeTargetDetails(target) {\n\treturn Object.freeze({\n\t\tid: target.id,\n\t\t...target.details !== void 0 ? { details: freezeDetailsValue(target.details) } : {}\n\t});\n}\nfunction freezeOperation(operation) {\n\treturn Object.freeze({\n\t\tid: operation.id,\n\t\tlabel: operation.label,\n\t\t...operation.summary ? { summary: operation.summary } : {},\n\t\toperationClass: operation.operationClass,\n\t\t...operation.invariantId ? { invariantId: operation.invariantId } : {},\n\t\ttarget: freezeTargetDetails(operation.target),\n\t\tprecheck: freezeSteps(operation.precheck),\n\t\texecute: freezeSteps(operation.execute),\n\t\tpostcheck: freezeSteps(operation.postcheck),\n\t\t...operation.meta ? { meta: cloneRecord(operation.meta) } : {}\n\t});\n}\nfunction freezeOperations(operations) {\n\tif (operations.length === 0) return Object.freeze([]);\n\treturn Object.freeze(operations.map((operation) => freezeOperation(operation)));\n}\nfunction createMigrationPlan(options) {\n\treturn Object.freeze({\n\t\ttargetId: options.targetId,\n\t\tspaceId: options.spaceId,\n\t\t...options.origin !== void 0 ? { origin: options.origin ? Object.freeze({ ...options.origin }) : null } : {},\n\t\tdestination: Object.freeze({ ...options.destination }),\n\t\toperations: freezeOperations(options.operations),\n\t\tprovidedInvariants: Object.freeze([...options.providedInvariants]),\n\t\t...options.meta ? { meta: cloneRecord(options.meta) } : {}\n\t});\n}\nfunction plannerSuccess(plan, appliedStatements, subjects, warnings) {\n\treturn Object.freeze({\n\t\tkind: \"success\",\n\t\tplan,\n\t\tappliedStatements: Object.freeze([...appliedStatements]),\n\t\tdataLoss: Object.freeze([...subjects.dataLoss]),\n\t\taccessWidening: Object.freeze([...subjects.accessWidening]),\n\t\ttemporaryValues: Object.freeze([...subjects.temporaryValues]),\n\t\t...warnings && warnings.length > 0 ? { warnings: Object.freeze(warnings.map((conflict) => Object.freeze({\n\t\t\tkind: conflict.kind,\n\t\t\tsummary: conflict.summary,\n\t\t\t...conflict.why ? { why: conflict.why } : {},\n\t\t\t...conflict.location ? { location: Object.freeze({ ...conflict.location }) } : {},\n\t\t\t...conflict.refusedStatement ? { refusedStatement: conflict.refusedStatement } : {},\n\t\t\t...conflict.refusedOperationClass ? { refusedOperationClass: conflict.refusedOperationClass } : {},\n\t\t\t...conflict.meta ? { meta: cloneRecord(conflict.meta) } : {}\n\t\t}))) } : {}\n\t});\n}\nfunction plannerFailure(conflicts) {\n\treturn Object.freeze({\n\t\tkind: \"failure\",\n\t\tconflicts: Object.freeze(conflicts.map((conflict) => Object.freeze({\n\t\t\tkind: conflict.kind,\n\t\t\tsummary: conflict.summary,\n\t\t\t...conflict.why ? { why: conflict.why } : {},\n\t\t\t...conflict.location ? { location: Object.freeze({ ...conflict.location }) } : {},\n\t\t\t...conflict.refusedStatement ? { refusedStatement: conflict.refusedStatement } : {},\n\t\t\t...conflict.refusedOperationClass ? { refusedOperationClass: conflict.refusedOperationClass } : {},\n\t\t\t...conflict.meta ? { meta: cloneRecord(conflict.meta) } : {}\n\t\t})))\n\t});\n}\n/**\n* Creates a successful migration runner result.\n*/\nfunction runnerSuccess(value) {\n\treturn ok(Object.freeze({\n\t\toperationsPlanned: value.operationsPlanned,\n\t\toperationsExecuted: value.operationsExecuted\n\t}));\n}\n/**\n* Creates a failed migration runner result.\n*/\nfunction runnerFailure(code, summary, options) {\n\treturn notOk(migrationRunnerFailure(code, summary, options));\n}\n//#endregion\n//#region src/core/migrations/policies.ts\n/**\n* Policy used by `db init`: additive-only operations, no widening/destructive steps.\n*/\nconst INIT_ADDITIVE_POLICY = Object.freeze({ allowedOperationClasses: Object.freeze([\"additive\"]) });\n//#endregion\n//#region src/core/migrations/required-column.ts\nconst RequiredColumnMeta = type({ requiredColumn: {\n\ttable: \"string\",\n\tcolumn: \"string\",\n\treason: \"'nullValues' | 'newField' | 'backfillMissedRows'\"\n} });\n/**\n* The meta of a step that fails when rows have no value for a column that is to become required:\n* rows hold NULL in it, or, for a new column that can be added to an empty table only, the table\n* has rows. When the step fails, the runner counts those rows.\n*/\nfunction requiredColumnMeta(table, column, reason) {\n\treturn { requiredColumn: {\n\t\ttable,\n\t\tcolumn,\n\t\treason\n\t} };\n}\n/** The column a step checks before it becomes required, as {@link requiredColumnMeta} marks it. */\nfunction requiredColumnOf(step) {\n\tconst meta = RequiredColumnMeta(step.meta ?? {});\n\treturn meta instanceof type.errors ? void 0 : meta.requiredColumn;\n}\n/** What a runner failure says of the rows a column that is to become required has no value in. */\nfunction rowsWithoutValueSummary(required, rows) {\n\tconst { table, column } = required;\n\tif (required.reason === \"newField\") return `\"${table}\" has ${rows} ${rows === 1 ? \"row\" : \"rows\"}, so the new required column \"${column}\" cannot be added: it can be added to an empty table only.`;\n\tconst counted = `${rows} ${rows === 1 ? \"row\" : \"rows\"} of \"${table}\"`;\n\tif (required.reason === \"backfillMissedRows\") return `${counted} still ${rows === 1 ? \"holds\" : \"hold\"} NULL in \"${column}\" after its backfill step, so it cannot become required.`;\n\treturn `${counted} ${rows === 1 ? \"holds\" : \"hold\"} NULL in \"${column}\", so it cannot become required.`;\n}\nfunction migrationRange(edges, operationIndex, operationCount) {\n\tlet start = 0;\n\tfor (const edge of edges) {\n\t\tconst end = start + edge.operationCount;\n\t\tif (operationIndex < end) return {\n\t\t\tstart,\n\t\t\tend\n\t\t};\n\t\tstart = end;\n\t}\n\treturn {\n\t\tstart: 0,\n\t\tend: operationCount\n\t};\n}\n/**\n* The marks of the steps of `operations` that belong to the same migration as the operation at\n* `operationIndex`, in plan order: `edges` say how many operations each migration of the plan has.\n*/\nfunction requiredColumnsOfMigration(operations, edges, operationIndex) {\n\tconst { start, end } = migrationRange(edges, operationIndex, operations.length);\n\treturn operations.slice(start, end).flatMap((operation, offset) => [\n\t\t...operation.precheck,\n\t\t...operation.execute,\n\t\t...operation.postcheck\n\t].flatMap((step) => {\n\t\tconst required = requiredColumnOf(step);\n\t\treturn required === void 0 ? [] : [{\n\t\t\toperation,\n\t\t\toperationIndex: start + offset,\n\t\t\trequired\n\t\t}];\n\t}));\n}\n/**\n* A runner failure's summary and reports for the rows that columns becoming required have no value\n* in. The failed operation's marks are counted first, and the first of them with such rows is the\n* one the summary names; undefined when none has any. The other marks of the same migration are\n* counted after it, until a count fails, such as for a column an earlier operation adds, so that\n* the advice can name every field that needs a value.\n*/\nasync function rowsWithoutValueFailure(input) {\n\tconst report = (mark, rows) => ({\n\t\tfield: fieldOfColumn(input.contract, mark.required.table, mark.required.column),\n\t\treason: mark.required.reason,\n\t\trows,\n\t\toperationIndex: mark.operationIndex\n\t});\n\tfor (const mark of input.failed) {\n\t\tconst rows = await input.count(mark);\n\t\tif (rows === 0) continue;\n\t\tconst reports = [report(mark, rows)];\n\t\tfor (const other of input.others) {\n\t\t\tif (other.required.table === mark.required.table && other.required.column === mark.required.column) continue;\n\t\t\tlet otherRows;\n\t\t\ttry {\n\t\t\t\totherRows = await input.count(other);\n\t\t\t} catch {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (otherRows > 0) reports.push(report(other, otherRows));\n\t\t}\n\t\treturn {\n\t\t\tsummary: rowsWithoutValueSummary(mark.required, rows),\n\t\t\treports\n\t\t};\n\t}\n}\n//#endregion\n//#region src/core/migrations/sql-expression-text.ts\n/** Keywords that end an expression and continue the statement around it. */\nconst STATEMENT_KEYWORDS = /* @__PURE__ */ new Set([\n\t\"FROM\",\n\t\"WHERE\",\n\t\"UNION\",\n\t\"INTERSECT\",\n\t\"EXCEPT\",\n\t\"GROUP\",\n\t\"ORDER\",\n\t\"HAVING\",\n\t\"LIMIT\",\n\t\"RETURNING\",\n\t\"WINDOW\"\n]);\nconst WORD = /[A-Za-z_][A-Za-z0-9_$]*/y;\nconst DOLLAR_QUOTE = /\\$[A-Za-z_]*\\$/y;\nfunction quoteAt(text, index, quoting) {\n\treturn quoting.find((quote) => text.slice(index, index + quote.open.length).toUpperCase() === quote.open.toUpperCase());\n}\nfunction endOfQuote(text, start, quote) {\n\tlet index = start + quote.open.length;\n\twhile (index < text.length) {\n\t\tif (quote.backslashEscapes && text[index] === \"\\\\\") {\n\t\t\tindex += 2;\n\t\t\tcontinue;\n\t\t}\n\t\tif (text.startsWith(quote.close, index)) {\n\t\t\tconst after = index + quote.close.length;\n\t\t\tif (!quote.doubledCloseEscapes || !text.startsWith(quote.close, after)) return after;\n\t\t\tindex = after + quote.close.length;\n\t\t\tcontinue;\n\t\t}\n\t\tindex += 1;\n\t}\n}\n/**\n* Returns what in `text` could end or extend the statement a migration writes it into, such as the\n* conversion of an `ALTER COLUMN … USING` clause or a column of an `INSERT … SELECT` list, or\n* undefined when it finds nothing. Text inside the quotes of `quoting` may hold anything; outside\n* them the text may not hold a semicolon, a SQL comment, dollar quoting, or, outside parentheses\n* and brackets, a comma or a keyword that would end the expression. `FROM` directly after\n* `DISTINCT`, as in `IS DISTINCT FROM`, belongs to the expression. It checks for these mistakes\n* only; it does not parse the SQL.\n*/\nfunction checkSqlExpressionText(text, quoting) {\n\tlet depth = 0;\n\tlet index = 0;\n\tlet previousWord;\n\twhile (index < text.length) {\n\t\tconst character = text[index] ?? \"\";\n\t\tconst quote = quoteAt(text, index, quoting);\n\t\tif (quote !== void 0) {\n\t\t\tconst end = endOfQuote(text, index, quote);\n\t\t\tif (end === void 0) return \"a quote that is not closed\";\n\t\t\tindex = end;\n\t\t\tpreviousWord = void 0;\n\t\t\tcontinue;\n\t\t}\n\t\tif (character === \";\") return \"a semicolon outside a quoted literal\";\n\t\tif (text.startsWith(\"--\", index) || text.startsWith(\"/*\", index)) return \"a SQL comment\";\n\t\tDOLLAR_QUOTE.lastIndex = index;\n\t\tif (character === \"$\" && DOLLAR_QUOTE.test(text)) return \"dollar quoting\";\n\t\tif (character === \",\" && depth === 0) return \"a comma outside parentheses\";\n\t\tif (character === \"(\" || character === \"[\") depth += 1;\n\t\tif (character === \")\" || character === \"]\") {\n\t\t\tdepth -= 1;\n\t\t\tif (depth < 0) return \"parentheses that do not match\";\n\t\t}\n\t\tWORD.lastIndex = index;\n\t\tconst word = /[A-Za-z_]/.test(character) ? WORD.exec(text)?.[0].toUpperCase() : void 0;\n\t\tif (word !== void 0) {\n\t\t\tif (depth === 0 && STATEMENT_KEYWORDS.has(word) && !(word === \"FROM\" && previousWord === \"DISTINCT\")) return `the keyword ${word} outside parentheses`;\n\t\t\tpreviousWord = word;\n\t\t\tindex += word.length;\n\t\t\tcontinue;\n\t\t}\n\t\tif (!/\\s/.test(character)) previousWord = void 0;\n\t\tindex += 1;\n\t}\n\treturn depth === 0 ? void 0 : \"parentheses that do not match\";\n}\n//#endregion\n//#region src/core/migrations/sql-slot.ts\n/** Whether `slot` is a placeholder the user has not filled yet. */\nfunction isUnfilledSlot(slot) {\n\treturn slot?.kind === \"placeholder\";\n}\n/** The SQL of a written slot; undefined for an unfilled one or none. */\nfunction sqlOfSlot(slot) {\n\treturn slot?.kind === \"sql\" ? slot.sql : void 0;\n}\n/** The slot as `migration.ts` writes it: SQL text written through `sql`, or a `placeholder(...)` call. */\nfunction slotSource(slot, sql) {\n\treturn slot.kind === \"placeholder\" ? `placeholder(${jsonToTsSource(slot.slot)})` : sql.source(slot.sql);\n}\n//#endregion\n//#region src/core/migrations/sql-text-sources.ts\n/** `moduleSpecifier` is the module the generated file imports `sql` from. */\nfunction createSqlTextSources(moduleSpecifier) {\n\tlet usesTag = false;\n\treturn {\n\t\tsource(text) {\n\t\t\tconst written = tsTaggedTemplateSource(SQL_EXPRESSION_TAG, text);\n\t\t\tusesTag ||= written.usesTag;\n\t\t\treturn written.source;\n\t\t},\n\t\timports() {\n\t\t\treturn usesTag ? [{\n\t\t\t\tmoduleSpecifier,\n\t\t\t\tsymbol: SQL_EXPRESSION_TAG\n\t\t\t}] : [];\n\t\t}\n\t};\n}\n//#endregion\n//#region src/core/migrations/sql-type-lookups.ts\n/** The codecs and data types a set of composed components registers. */\nfunction sqlTypeLookupsOf(frameworkComponents) {\n\treturn {\n\t\tcodecLookup: extractCodecLookup(frameworkComponents),\n\t\tdataTypeLookup: assembleDataTypes(frameworkComponents).lookup\n\t};\n}\n//#endregion\n//#region src/core/migrations/table-name-case-guard.ts\nconst TABLE_NAME_CASE_CHANGED_CODE = \"MIGRATION.TABLE_NAME_CASE_CHANGED\";\nfunction lowerFirst(value) {\n\treturn value.charAt(0).toLowerCase() + value.slice(1);\n}\nfunction plannedTable(node, namespaceId) {\n\treturn {\n\t\tnamespaceId,\n\t\ttableName: node.name\n\t};\n}\nfunction renameNeedsNamespace(drop, dropped, contract, defaultNamespaceId) {\n\tif (drop.namespaceId !== UNBOUND_NAMESPACE_ID && drop.namespaceId !== defaultNamespaceId) return true;\n\tconst declaredElsewhere = (namespaceId, tableName) => namespaceId !== drop.namespaceId && tableName === drop.tableName;\n\treturn dropped.some((other) => declaredElsewhere(other.namespaceId, other.tableName)) || Object.values(contract.storage.namespaces).some((namespace) => Object.keys(namespace.entries.table ?? {}).some((tableName) => declaredElsewhere(namespace.id, tableName)));\n}\n/**\n* Finds every (drop `X`, create `Y`) pair in the same namespace where `X` is\n* `Y` with its first letter lowered. That shape is the signature of a schema\n* upgraded across the release in which a model with no `@@map` stopped\n* lowering the first letter of its table name: planning it would drop the\n* user's table and recreate it empty. Columns are deliberately not compared,\n* so a user who also changed a field in the same upgrade is still protected.\n*\n* Returns one conflict per pair, carrying `MIGRATION.TABLE_NAME_CASE_CHANGED`\n* in `meta.code`, or an empty array when the plan has no such pair.\n*/\nfunction detectTableNameCaseChanges(input) {\n\tconst dropped = [];\n\tconst created = [];\n\tfor (const issue of input.issues) {\n\t\tconst outcome = issueOutcome(issue);\n\t\tif (outcome === \"not-equal\") continue;\n\t\tconst table = input.tableOf(issue);\n\t\tif (table === void 0) continue;\n\t\t(outcome === \"not-expected\" ? dropped : created).push(plannedTable(table, input.namespaceIdOf(issue)));\n\t}\n\tconst conflicts = [];\n\tfor (const create of created) {\n\t\tconst drop = dropped.find((candidate) => candidate.namespaceId === create.namespaceId && candidate.tableName === lowerFirst(create.tableName));\n\t\tif (drop === void 0) continue;\n\t\tconst renameCall = input.renameTableCall({\n\t\t\tnamespaceId: renameNeedsNamespace(drop, dropped, input.contract, input.defaultNamespaceId) ? drop.namespaceId : void 0,\n\t\t\tfrom: drop.tableName,\n\t\t\tto: create.tableName\n\t\t});\n\t\tconflicts.push({\n\t\t\tkind: \"tableNameCaseChanged\",\n\t\t\tsummary: `${TABLE_NAME_CASE_CHANGED_CODE}: table \"${create.tableName}\" would be created and table \"${drop.tableName}\" dropped. Prisma 8 changed the default table name: a model with no @@map now names its table verbatim, so model ${create.tableName} points at \"${create.tableName}\" instead of \"${drop.tableName}\".`,\n\t\t\twhy: `To keep table \"${drop.tableName}\" and its rows, add @@map(\"${drop.tableName}\") to model ${create.tableName} (or run the add-model-map codemod over the schema) and plan again. To rename the table and keep its rows instead: in a project with migration history, make the rename its own schema change, create its migration with prisma migration new --from <hash of the migration the database is at>, and add ${renameCall} to the migration's operations, which renames the table and the objects named after it; in a project that uses db update, rename it by hand with ${input.renameByHandStatements({\n\t\t\t\tnamespaceId: create.namespaceId,\n\t\t\t\tfrom: drop.tableName,\n\t\t\t\tto: create.tableName\n\t\t\t}).join(\"; \")}, then run db update again.`,\n\t\t\tlocation: {\n\t\t\t\tnamespaceId: create.namespaceId,\n\t\t\t\tentityKind: \"table\",\n\t\t\t\tentityName: create.tableName\n\t\t\t},\n\t\t\tmeta: {\n\t\t\t\tcode: TABLE_NAME_CASE_CHANGED_CODE,\n\t\t\t\tdroppedTable: drop.tableName,\n\t\t\t\tcreatedTable: create.tableName\n\t\t\t}\n\t\t});\n\t}\n\treturn conflicts;\n}\n//#endregion\n//#region src/core/migrations/temporary-value.ts\n/**\n* Whether a required column the plan adds to a table with rows may take one temporary value in\n* every row. Not when it is in the primary key, a unique constraint or a foreign key, which one\n* value in every row would break, and not when its values come from a value set, since no one value\n* stands for every member. Such a column is added for an empty table only.\n*/\nfunction columnTakesTemporaryValue(table, column) {\n\treturn table.columns[column]?.valueSet === void 0 && !(table.primaryKey?.columns.includes(column) ?? false) && !table.uniques.some(({ columns }) => columns.includes(column)) && !table.foreignKeys.some(({ source }) => source.columns.includes(column));\n}\n//#endregion\n//#region src/core/migrations/unconverted-field.ts\nconst ConvertedColumnMeta = type({ convertedColumn: {\n\ttable: \"string\",\n\tcolumn: \"string\",\n\tby: \"'cast' | 'conversion'\"\n} });\n/**\n* The meta of a step that converts the values of `column` in `table` to the column's new type, or\n* checks that it did. When the step fails, the runner names the field that stores the column.\n*/\nfunction convertedColumnMeta(table, column, by) {\n\treturn { convertedColumn: {\n\t\ttable,\n\t\tcolumn,\n\t\tby\n\t} };\n}\n/** The column a step converts to its new type, as {@link convertedColumnMeta} marks it. */\nfunction convertedColumnOf(step) {\n\tconst meta = ConvertedColumnMeta(step.meta ?? {});\n\treturn meta instanceof type.errors ? void 0 : meta.convertedColumn;\n}\n/**\n* The field of `contract` whose column a failed step converts, or undefined when the step\n* converts no column, no field stores the column, or tables of two storage namespaces share its name.\n*/\nfunction unconvertedFieldOf(step, contract) {\n\tconst converted = convertedColumnOf(step);\n\treturn converted === void 0 ? void 0 : fieldOfColumn(contract, converted.table, converted.column);\n}\n//#endregion\n//#region src/core/reported-defaults.ts\n/** Reads a reported literal default with the column's codec. `raw` is the reported text, which a refusal quotes. */\nasync function readReportedDefault(codec, literal, raw) {\n\tconst unreadable = (error, element) => {\n\t\tif (isInternalError(error)) throw error;\n\t\tconst reason = error instanceof Error ? error.message : String(error);\n\t\treturn { defaultUnreadable: `The column codec ${codec.id} cannot read ${element}the default the database reports, ${raw}: ${reason}` };\n\t};\n\tif (literal.kind === \"value\") try {\n\t\tconst value = await readBody(codec, literal.body);\n\t\treturn {\n\t\t\tresolvedDefault: {\n\t\t\t\tkind: \"literal\",\n\t\t\t\tvalue: codec.dataType.toContract(value)\n\t\t\t},\n\t\t\tdefaultValue: value\n\t\t};\n\t} catch (error) {\n\t\treturn unreadable(error, \"\");\n\t}\n\tconst values = [];\n\tfor (const [index, body] of literal.elements.entries()) try {\n\t\tvalues.push(body === null ? null : await readBody(codec, body));\n\t} catch (error) {\n\t\treturn unreadable(error, `element ${index + 1} of `);\n\t}\n\treturn {\n\t\tresolvedDefault: {\n\t\t\tkind: \"literal\",\n\t\t\tvalue: values.map((value) => value === null ? null : codec.dataType.toContract(value))\n\t\t},\n\t\tdefaultValue: values\n\t};\n}\n/**\n* Reads a reported literal default with the column's codec, and, when the contract's default is an expression that writes a literal, that literal too, so the diff compares the two as values.\n*/\nasync function readColumnDefault(codec, reported, written) {\n\tconst read = await readReportedDefault(codec, reported.literal, reported.raw);\n\tif (written === void 0 || !(\"defaultValue\" in read)) return read;\n\tconst writtenRead = await readReportedDefault(codec, written.literal, written.expression);\n\treturn \"defaultValue\" in writtenRead ? {\n\t\t...read,\n\t\tdefaultExpressionValue: writtenRead.defaultValue\n\t} : read;\n}\nasync function readBody(codec, body) {\n\treturn codec.toDataTypeValue(await codec.fromWire(body, {}));\n}\nfunction isLoose(value) {\n\treturn typeof value === \"object\" && value !== null;\n}\nfunction child(value, key) {\n\tif (!isLoose(value)) return void 0;\n\tconst found = value[key];\n\treturn isLoose(found) ? found : void 0;\n}\n/**\n* The columns `contract` declares. `contract` is a contract, or the namespaces of several contract spaces merged with each space's contract under `contracts`, as multi-space introspection receives them.\n*/\nfunction contractColumns(contract) {\n\tconst contracts = isLoose(contract) && Array.isArray(contract[\"contracts\"]) ? contract[\"contracts\"] : [contract];\n\treturn { columnOf(namespaceIds, table, column) {\n\t\tfor (const space of contracts) {\n\t\t\tconst namespaces = child(child(space, \"storage\"), \"namespaces\");\n\t\t\tif (namespaces === void 0) continue;\n\t\t\tfor (const id of namespaceIds ?? Object.keys(namespaces)) {\n\t\t\t\tconst found = child(child(child(child(child(child(namespaces, id), \"entries\"), \"table\"), table), \"columns\"), column);\n\t\t\t\tconst codecId = found?.[\"codecId\"];\n\t\t\t\tif (found === void 0 || typeof codecId !== \"string\") continue;\n\t\t\t\tconst columnDefault = child(found, \"default\");\n\t\t\t\tconst expression = columnDefault?.[\"expression\"];\n\t\t\t\treturn {\n\t\t\t\t\tcodecRef: columnCodecRef(codecId, found),\n\t\t\t\t\tdefaultExpression: columnDefault?.[\"kind\"] === \"function\" && typeof expression === \"string\" ? expression : void 0\n\t\t\t\t};\n\t\t\t}\n\t\t}\n\t} };\n}\nfunction columnCodecRef(codecId, column) {\n\tconst params = nonEmptyTypeParams(child(column, \"typeParams\"));\n\tconst many = column[\"many\"];\n\treturn {\n\t\tcodecId,\n\t\t...ifDefined(\"typeParams\", params === void 0 ? void 0 : blindCast(params)),\n\t\t...ifDefined(\"many\", many !== void 0 && many !== false ? true : void 0)\n\t};\n}\n//#endregion\n//#region src/exports/control.ts\nvar control_default = new SqlFamilyDescriptor();\n//#endregion\nexport { COLUMN_RENAME_UNMATCHED_CODE, INIT_ADDITIVE_POLICY, TABLE_NAME_CASE_CHANGED_CODE, appliedStatementsInOrder, assembleAuthoringContributions, backfillOfDefaultedField, checkSqlDefaultText, checkSqlExpressionText, columnTakesTemporaryValue, contractColumns, contractNamespaceToSchemaIR, contractToSchemaIR, convertedColumnMeta, convertedColumnOf, createMigrationPlan, createSqlTextSources, control_default as default, detectDestructiveChanges, detectTableNameCaseChanges, extractCodecControlHooks, fieldEventStorage, fieldOfColumn, fieldRenameStorageEffect, fieldStatementColumns, isUnfilledSlot, modelRenameStorageEffect, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventCalls, planFieldEventOperations, planStatements, plannerFailure, plannerSuccess, readColumnDefault, readReportedDefault, requiredColumnMeta, requiredColumnOf, requiredColumnsOfMigration, resolveColumnRenameAgainst, resolveTableRenameAgainst, rowsWithoutValueFailure, rowsWithoutValueSummary, runnerFailure, runnerSuccess, slotSource, sqlDefaultFunctions, sqlOfSlot, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, unconvertedFieldOf, unknownCallNames, unmatchedColumnRename, unmatchedTableRename };\n\n//# sourceMappingURL=control.mjs.map"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,SAAS,SAAS,SAAS;CAC1B,OAAO,OAAO,QAAQ,QAAQ,UAAU,CAAC,CAAC,SAAS,CAAC,aAAa,eAAe,OAAO,QAAQ,UAAU,QAAQ,YAAY,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,WAAW,YAAY;EAC7J,MAAM,sBAAsB,YAAY,iBAAiB;EACzD;EACA;EACA,OAAO,UAAU,KAAK;CACvB,EAAE,CAAC;AACJ;AACA,SAAS,iBAAiB,SAAS,aAAa;CAC/C,OAAO,CAAC,GAAG,SAAS,OAAO,CAAC,CAAC,SAAS,EAAE,MAAM,YAAY,OAAO,QAAQ,MAAM,OAAO,CAAC,CAAC,KAAK,CAAC,YAAY,aAAa;EACtH,MAAM,GAAG,KAAK,WAAW;EACzB,SAAS,OAAO;EAChB,UAAU,OAAO;CAClB,EAAE,CAAC,GAAG,GAAG,OAAO,QAAQ,QAAQ,SAAS,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,UAAU,WAAW,sBAAsB,KAAK,IAAI,CAAC;EAC3G,MAAM,iBAAiB;EACvB,SAAS,MAAM;EACf,UAAU,MAAM;CACjB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,EAAE,MAAM,SAAS,eAAe;EAClD,MAAM,cAAc,YAAY,cAAc,OAAO,CAAC,EAAE;EACxD,IAAI,gBAAgB,KAAK,KAAK,gBAAgB,UAAU,OAAO,CAAC;EAChE,OAAO,CAAC,GAAG,KAAK,UAAU,QAAQ,cAAc,YAAY,QAAQ,UAAU;CAC/E,CAAC;AACF;;AAEA,SAAS,cAAc,MAAM,QAAQ;CACpC,IAAI,CAAC,cAAc,IAAI,GAAG,OAAO;CACjC,IAAI;EACH,sB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