@prisma-next/family-sql 0.12.0-dev.15 → 0.12.0-dev.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{control-adapter-BUxGX6zz.d.mts → control-adapter-8tV9WgWK.d.mts} +11 -2
- package/dist/control-adapter-8tV9WgWK.d.mts.map +1 -0
- package/dist/control-adapter.d.mts +1 -1
- package/dist/control.d.mts +2 -2
- package/dist/control.mjs +2 -1
- package/dist/control.mjs.map +1 -1
- package/dist/migration.d.mts +1 -1
- package/dist/schema-verify.d.mts +1 -1
- package/dist/schema-verify.d.mts.map +1 -1
- package/dist/schema-verify.mjs +1 -1
- package/dist/{types-UK6xRk8i.d.mts → types-BQiqw6kR.d.mts} +3 -3
- package/dist/{types-UK6xRk8i.d.mts.map → types-BQiqw6kR.d.mts.map} +1 -1
- package/dist/{verify-sql-schema-CYLsGCFO.mjs → verify-sql-schema-CXW_D9dW.mjs} +403 -310
- package/dist/verify-sql-schema-CXW_D9dW.mjs.map +1 -0
- package/dist/{verify-sql-schema-CN7pPoTC.d.mts → verify-sql-schema-Cj3c2t5Z.d.mts} +8 -2
- package/dist/verify-sql-schema-Cj3c2t5Z.d.mts.map +1 -0
- package/package.json +21 -21
- package/src/core/control-adapter.ts +15 -1
- package/src/core/control-instance.ts +1 -0
- package/src/core/schema-verify/control-verify-emit.ts +46 -0
- package/src/core/schema-verify/verifier-disposition.ts +53 -0
- package/src/core/schema-verify/verify-helpers.ts +151 -110
- package/src/core/schema-verify/verify-sql-schema.ts +291 -155
- package/dist/control-adapter-BUxGX6zz.d.mts.map +0 -1
- package/dist/verify-sql-schema-CN7pPoTC.d.mts.map +0 -1
- package/dist/verify-sql-schema-CYLsGCFO.mjs.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { n as NativeTypeNormalizer, t as
|
|
1
|
+
import { n as DefaultNormalizer, r as NativeTypeNormalizer, t as ColumnsCompatible } from "./verify-sql-schema-Cj3c2t5Z.mjs";
|
|
2
2
|
import { ControlAdapterInstance, ControlDriverInstance, ControlStack } from "@prisma-next/framework-components/control";
|
|
3
3
|
import { PostgresEnumStorageEntry, SqlStorage } from "@prisma-next/sql-contract/types";
|
|
4
4
|
import { Contract, ContractMarkerRecord, LedgerEntryRecord } from "@prisma-next/contract/types";
|
|
@@ -68,6 +68,15 @@ interface SqlControlAdapter<TTarget extends string = string> extends ControlAdap
|
|
|
68
68
|
* before comparison with contract native types during schema verification.
|
|
69
69
|
*/
|
|
70
70
|
readonly normalizeNativeType?: NativeTypeNormalizer;
|
|
71
|
+
/**
|
|
72
|
+
* Optional target-supplied compatible-shape relation for column native types.
|
|
73
|
+
* When provided, schema verification uses it under the `external` control
|
|
74
|
+
* policy to decide whether a declared column type is compatible with the
|
|
75
|
+
* live type (instead of exact equality). Threading the same relation the
|
|
76
|
+
* migration planner/runner use keeps runtime verify and migration verify in
|
|
77
|
+
* agreement; when omitted, verification falls back to exact equality.
|
|
78
|
+
*/
|
|
79
|
+
readonly columnsCompatible?: ColumnsCompatible;
|
|
71
80
|
/**
|
|
72
81
|
* Optional bridging adapter for resolving the existing values of a
|
|
73
82
|
* native enum type from the introspected schema IR. Targets supply
|
|
@@ -122,4 +131,4 @@ interface SqlControlAdapterDescriptor<TTarget extends string = string> {
|
|
|
122
131
|
}
|
|
123
132
|
//#endregion
|
|
124
133
|
export { SqlControlAdapterDescriptor as n, SqlControlAdapter as t };
|
|
125
|
-
//# sourceMappingURL=control-adapter-
|
|
134
|
+
//# sourceMappingURL=control-adapter-8tV9WgWK.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-adapter-8tV9WgWK.d.mts","names":[],"sources":["../src/core/control-adapter.ts"],"mappings":";;;;;;;;;;AA8BA;;;;UAAiB,iBAAA,0CACP,sBAAA,QAA8B,OAAA;EAiB5B;;;;;;;;;;;;;;;EADV,UAAA,CACE,MAAA,EAAQ,qBAAA,QAA6B,OAAA,GACrC,KAAA,WACC,OAAA,CAAQ,oBAAA;EA8CiB;;;;;;;EArC5B,cAAA,CACE,MAAA,EAAQ,qBAAA,QAA6B,OAAA,IACpC,OAAA,CAAQ,WAAA,SAAoB,oBAAA;EA6EnB;;;;;EAtEZ,UAAA,CACE,MAAA,EAAQ,qBAAA,QAA6B,OAAA,GACrC,KAAA,WACC,OAAA,UAAiB,iBAAA;EA4FiD;;;;;;;;;;;;EA9ErE,UAAA,CACE,MAAA,EAAQ,qBAAA,QAA6B,OAAA,GACrC,QAAA,YACA,MAAA,YACC,OAAA,CAAQ,WAAA;EAvCA;;;;;EAAA,SA8CF,gBAAA,GAAmB,iBAAA;EAnCjB;;;;;EAAA,SA0CF,mBAAA,GAAsB,oBAAA;EAjC7B;;;;;;;;EAAA,SA2CO,iBAAA,GAAoB,iBAAA;EAxB1B;;;;;;;;EAAA,SAkCM,yBAAA,IACP,MAAA,EAAQ,WAAA,EACR,QAAA,EAAU,wBAAA,EACV,WAAA;EAFQ;;;;;;EAAA,SAUD,oCAAA,IACP,QAAA,EAAU,QAAA,CAAS,UAAA,OAEnB,MAAA,EAAQ,WAAA,EACR,QAAA,EAAU,wBAAA,EACV,WAAA;EAJmB;;;;EAWrB,4BAAA,aAAyC,OAAA;EARvC;;;;EAcF,0BAAA,aAAuC,OAAA;EAAA;;;;;;;;;EAWvC,KAAA,CAAM,GAAA,EAAK,WAAA,GAAc,OAAA,EAAS,OAAA,EAAS,cAAA,YAA0B,gBAAA;AAAA;;;;;;;UAStD,2BAAA;EAO+C;;;;;;EAA9D,MAAA,CAAO,KAAA,EAAO,YAAA,QAAoB,OAAA,IAAW,iBAAA,CAAkB,OAAA;AAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as SqlControlAdapterDescriptor, t as SqlControlAdapter } from "./control-adapter-
|
|
1
|
+
import { n as SqlControlAdapterDescriptor, t as SqlControlAdapter } from "./control-adapter-8tV9WgWK.mjs";
|
|
2
2
|
export { type SqlControlAdapter, type SqlControlAdapterDescriptor };
|
package/dist/control.d.mts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { A as SqlPlannerResult, C as SqlMigrationRunnerResult, D as SqlPlannerConflictKind, E as SqlPlannerConflict, M as StorageTypePlanResult, N as SqlControlFamilyInstance, O as SqlPlannerConflictLocation, S as SqlMigrationRunnerFailure, T as SqlPlanTargetDetails, _ as SqlMigrationPlannerPlanOptions, a as FieldEvent, b as SqlMigrationRunnerExecuteCallbacks, c as SqlControlAdapterDescriptor, d as SqlMigrationPlan, f as SqlMigrationPlanContractInfo, g as SqlMigrationPlanner, h as SqlMigrationPlanOperationTarget, i as ExpandNativeTypeInput, j as SqlPlannerSuccessResult, k as SqlPlannerFailureResult, l as SqlControlExtensionDescriptor, m as SqlMigrationPlanOperationStep, n as CodecControlHooks, o as FieldEventContext, p as SqlMigrationPlanOperation, r as CreateSqlMigrationPlanOptions, s as ResolveIdentityValueInput, t as AnyRecord, u as SqlControlTargetDescriptor, v as SqlMigrationRunner, w as SqlMigrationRunnerSuccessValue, x as SqlMigrationRunnerExecuteOptions, y as SqlMigrationRunnerErrorCode } from "./types-
|
|
1
|
+
import { A as SqlPlannerResult, C as SqlMigrationRunnerResult, D as SqlPlannerConflictKind, E as SqlPlannerConflict, M as StorageTypePlanResult, N as SqlControlFamilyInstance, O as SqlPlannerConflictLocation, S as SqlMigrationRunnerFailure, T as SqlPlanTargetDetails, _ as SqlMigrationPlannerPlanOptions, a as FieldEvent, b as SqlMigrationRunnerExecuteCallbacks, c as SqlControlAdapterDescriptor, d as SqlMigrationPlan, f as SqlMigrationPlanContractInfo, g as SqlMigrationPlanner, h as SqlMigrationPlanOperationTarget, i as ExpandNativeTypeInput, j as SqlPlannerSuccessResult, k as SqlPlannerFailureResult, l as SqlControlExtensionDescriptor, m as SqlMigrationPlanOperationStep, n as CodecControlHooks, o as FieldEventContext, p as SqlMigrationPlanOperation, r as CreateSqlMigrationPlanOptions, s as ResolveIdentityValueInput, t as AnyRecord, u as SqlControlTargetDescriptor, v as SqlMigrationRunner, w as SqlMigrationRunnerSuccessValue, x as SqlMigrationRunnerExecuteOptions, y as SqlMigrationRunnerErrorCode } from "./types-BQiqw6kR.mjs";
|
|
2
2
|
import { ControlFamilyDescriptor, ControlStack, MigrationOperationClass, MigrationOperationPolicy, MigrationOperationPolicy as MigrationOperationPolicy$1, MigrationPlan, MigrationPlanOperation, MigrationPlanner, MigrationPlannerConflict, MigrationPlannerConflict as MigrationPlannerConflict$1, MigrationPlannerResult, MutationDefaultGeneratorDescriptor, OpFactoryCall, TargetMigrationsCapability, assembleAuthoringContributions } from "@prisma-next/framework-components/control";
|
|
3
3
|
import { SqlStorage, StorageColumn } from "@prisma-next/sql-contract/types";
|
|
4
|
-
import { NotOk, Ok } from "@prisma-next/utils/result";
|
|
5
4
|
import { ColumnDefault, Contract } from "@prisma-next/contract/types";
|
|
5
|
+
import { NotOk, Ok } from "@prisma-next/utils/result";
|
|
6
6
|
import { SqlSchemaIR } from "@prisma-next/sql-schema-ir/types";
|
|
7
7
|
import { TargetBoundComponentDescriptor } from "@prisma-next/framework-components/components";
|
|
8
8
|
import { EmissionSpi } from "@prisma-next/framework-components/emission";
|
package/dist/control.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { n as sqlFamilyAuthoringFieldPresets, t as sqlFamilyAuthoringTypes } from "./authoring-type-constructors-F4JpCJl7.mjs";
|
|
2
2
|
import { t as SqlContractSerializer } from "./sql-contract-serializer-8axtK4lg.mjs";
|
|
3
|
-
import { a as extractCodecControlHooks, t as verifySqlSchema } from "./verify-sql-schema-
|
|
3
|
+
import { a as extractCodecControlHooks, t as verifySqlSchema } from "./verify-sql-schema-CXW_D9dW.mjs";
|
|
4
4
|
import { t as collectSupportedCodecTypeIds } from "./verify-Crewz6hG.mjs";
|
|
5
5
|
import { n as temporalAuthoringPresets, r as timestampNowControlDescriptor } from "./timestamp-now-generator-BkjCQIde.mjs";
|
|
6
6
|
import { sqlEmission } from "@prisma-next/sql-contract-emitter";
|
|
@@ -1216,6 +1216,7 @@ function createSqlFamilyInstance(stack) {
|
|
|
1216
1216
|
frameworkComponents: options.frameworkComponents,
|
|
1217
1217
|
...ifDefined("normalizeDefault", controlAdapter.normalizeDefault),
|
|
1218
1218
|
...ifDefined("normalizeNativeType", controlAdapter.normalizeNativeType),
|
|
1219
|
+
...ifDefined("columnsCompatible", controlAdapter.columnsCompatible),
|
|
1219
1220
|
...ifDefined("resolveExistingEnumValues", resolveExistingEnumValues)
|
|
1220
1221
|
});
|
|
1221
1222
|
},
|