@prisma-next/family-sql 0.12.0-dev.2 → 0.12.0-dev.21
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-8tV9WgWK.d.mts +134 -0
- package/dist/control-adapter-8tV9WgWK.d.mts.map +1 -0
- package/dist/control-adapter.d.mts +2 -109
- package/dist/control.d.mts +31 -3
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs +62 -14
- package/dist/control.mjs.map +1 -1
- package/dist/migration.d.mts +1 -1
- package/dist/runtime.d.mts +3 -1
- package/dist/runtime.d.mts.map +1 -1
- package/dist/runtime.mjs +3 -1
- package/dist/runtime.mjs.map +1 -1
- package/dist/schema-verify.d.mts +2 -1
- package/dist/schema-verify.d.mts.map +1 -1
- package/dist/schema-verify.mjs +1 -1
- package/dist/{types-CeeCStqw.d.mts → types-BQiqw6kR.d.mts} +14 -5
- package/dist/types-BQiqw6kR.d.mts.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/dist/{verify-sql-schema-CYLsGCFO.mjs → verify-sql-schema-fljAiO-C.mjs} +403 -310
- package/dist/verify-sql-schema-fljAiO-C.mjs.map +1 -0
- package/package.json +21 -21
- package/src/core/control-adapter.ts +44 -3
- package/src/core/control-instance.ts +40 -41
- package/src/core/default-namespace.ts +9 -0
- package/src/core/migrations/control-policy.ts +89 -0
- package/src/core/migrations/types.ts +8 -1
- 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/src/exports/control.ts +2 -0
- package/src/exports/runtime.ts +7 -0
- package/dist/control-adapter.d.mts.map +0 -1
- package/dist/types-CeeCStqw.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
package/dist/migration.d.mts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { T as SqlPlanTargetDetails, p as SqlMigrationPlanOperation } from "./types-
|
|
1
|
+
import { T as SqlPlanTargetDetails, p as SqlMigrationPlanOperation } from "./types-BQiqw6kR.mjs";
|
|
2
2
|
import { Migration } from "@prisma-next/migration-tools/migration";
|
|
3
3
|
|
|
4
4
|
//#region src/core/sql-migration.d.ts
|
package/dist/runtime.d.mts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { RuntimeMutationDefaultGenerator } from "@prisma-next/sql-runtime";
|
|
2
|
+
import { ResolvedDomainModel, UNBOUND_DOMAIN_NAMESPACE_ID, resolveDomainModel } from "@prisma-next/contract/types";
|
|
3
|
+
import { ResolvedStorageTable, resolveStorageTable } from "@prisma-next/sql-contract/resolve-storage-table";
|
|
2
4
|
import { RuntimeFamilyDescriptor, RuntimeFamilyInstance } from "@prisma-next/framework-components/execution";
|
|
3
5
|
|
|
4
6
|
//#region src/core/runtime-instance.d.ts
|
|
@@ -40,5 +42,5 @@ declare const sqlRuntimeFamilyDescriptor: RuntimeFamilyDescriptor<'sql', SqlRunt
|
|
|
40
42
|
*/
|
|
41
43
|
declare function timestampNowRuntimeGenerator(): RuntimeMutationDefaultGenerator;
|
|
42
44
|
//#endregion
|
|
43
|
-
export { sqlRuntimeFamilyDescriptor as default, timestampNowRuntimeGenerator };
|
|
45
|
+
export { type ResolvedDomainModel, type ResolvedStorageTable, UNBOUND_DOMAIN_NAMESPACE_ID, sqlRuntimeFamilyDescriptor as default, resolveDomainModel, resolveStorageTable, timestampNowRuntimeGenerator };
|
|
44
46
|
//# sourceMappingURL=runtime.d.mts.map
|
package/dist/runtime.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.mts","names":[],"sources":["../src/core/runtime-instance.ts","../src/core/runtime-descriptor.ts","../src/core/timestamp-now-runtime-generator.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime.d.mts","names":[],"sources":["../src/core/runtime-instance.ts","../src/core/runtime-descriptor.ts","../src/core/timestamp-now-runtime-generator.ts"],"mappings":";;;;;;;;;;;AAUA;;;UAAiB,wBAAA,SAAiC,qBAAqB;;;;;;;AAAvE;;;;cCCa,0BAAA,EAA4B,uBAAuB,QAAQ,wBAAA;;;;;;;;ADDxE;;;;AAAuE;;;;ACCvE;iBCMgB,4BAAA,CAAA,GAAgC,+BAA+B"}
|
package/dist/runtime.mjs
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { t as TIMESTAMP_NOW_GENERATOR_ID } from "./timestamp-now-generator-BkjCQIde.mjs";
|
|
2
|
+
import { UNBOUND_DOMAIN_NAMESPACE_ID, resolveDomainModel } from "@prisma-next/contract/types";
|
|
3
|
+
import { resolveStorageTable } from "@prisma-next/sql-contract/resolve-storage-table";
|
|
2
4
|
//#region src/core/runtime-instance.ts
|
|
3
5
|
/**
|
|
4
6
|
* Creates a SQL execution-plane family instance.
|
|
@@ -55,6 +57,6 @@ function timestampNowRuntimeGenerator() {
|
|
|
55
57
|
//#region src/exports/runtime.ts
|
|
56
58
|
var runtime_default = sqlRuntimeFamilyDescriptor;
|
|
57
59
|
//#endregion
|
|
58
|
-
export { runtime_default as default, timestampNowRuntimeGenerator };
|
|
60
|
+
export { UNBOUND_DOMAIN_NAMESPACE_ID, runtime_default as default, resolveDomainModel, resolveStorageTable, timestampNowRuntimeGenerator };
|
|
59
61
|
|
|
60
62
|
//# sourceMappingURL=runtime.mjs.map
|
package/dist/runtime.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.mjs","names":[],"sources":["../src/core/runtime-instance.ts","../src/core/runtime-descriptor.ts","../src/core/timestamp-now-runtime-generator.ts","../src/exports/runtime.ts"],"sourcesContent":["import type { RuntimeFamilyInstance } from '@prisma-next/framework-components/execution';\n\n/**\n * SQL execution-plane family instance interface.\n *\n * Note: this is currently named `SqlRuntimeFamilyInstance` because the execution plane\n * framework types are still using the `Runtime*` naming (`RuntimeFamilyInstance`, etc.).\n *\n * This will be renamed to `SqlExecutionFamilyInstance` as part of `TML-1842`.\n */\nexport interface SqlRuntimeFamilyInstance extends RuntimeFamilyInstance<'sql'> {}\n\n/**\n * Creates a SQL execution-plane family instance.\n *\n * This will be renamed to `createSqlExecutionFamilyInstance()` as part of `TML-1842`.\n */\nexport function createSqlRuntimeFamilyInstance(): SqlRuntimeFamilyInstance {\n return {\n familyId: 'sql' as const,\n };\n}\n","import type { RuntimeFamilyDescriptor } from '@prisma-next/framework-components/execution';\nimport { createSqlRuntimeFamilyInstance, type SqlRuntimeFamilyInstance } from './runtime-instance';\n\n/**\n * SQL execution-plane family descriptor.\n *\n * Note: this is currently named `sqlRuntimeFamilyDescriptor` because the execution plane\n * framework types are still using the `Runtime*` naming (`RuntimeFamilyDescriptor`, etc.).\n *\n * This will be renamed to `sqlExecutionFamilyDescriptor` as part of `TML-1842`.\n */\nexport const sqlRuntimeFamilyDescriptor: RuntimeFamilyDescriptor<'sql', SqlRuntimeFamilyInstance> =\n {\n kind: 'family',\n id: 'sql',\n familyId: 'sql',\n version: '0.0.1',\n create() {\n return createSqlRuntimeFamilyInstance();\n },\n };\n\nObject.freeze(sqlRuntimeFamilyDescriptor);\n","import type { RuntimeMutationDefaultGenerator } from '@prisma-next/sql-runtime';\nimport { TIMESTAMP_NOW_GENERATOR_ID } from './timestamp-now-generator';\n\n/**\n * Builds the canonical runtime-plane generator for the wall-clock-now\n * mutation default. Returns `new Date()`; semantics are target-agnostic\n * so all SQL targets share this single implementation.\n *\n * Declares `stability: 'query'` so a single ORM bulk operation\n * (e.g. `createAll([...])`) shares one timestamp across every row and\n * every timestamp-defaulted column. Matches Prisma 6's `@updatedAt`\n * semantics: one `new Date()` per lowered mutation, not per row.\n *\n * Lives in a runtime-plane-only module so the control-plane\n * `timestamp-now-generator.ts` (descriptor + authoring presets) stays\n * free of `@prisma-next/sql-runtime` imports.\n */\nexport function timestampNowRuntimeGenerator(): RuntimeMutationDefaultGenerator {\n return {\n id: TIMESTAMP_NOW_GENERATOR_ID,\n generate: () => new Date(),\n stability: 'query',\n };\n}\n","import { sqlRuntimeFamilyDescriptor } from '../core/runtime-descriptor';\n\nexport { timestampNowRuntimeGenerator } from '../core/timestamp-now-runtime-generator';\n\nexport default sqlRuntimeFamilyDescriptor;\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"runtime.mjs","names":[],"sources":["../src/core/runtime-instance.ts","../src/core/runtime-descriptor.ts","../src/core/timestamp-now-runtime-generator.ts","../src/exports/runtime.ts"],"sourcesContent":["import type { RuntimeFamilyInstance } from '@prisma-next/framework-components/execution';\n\n/**\n * SQL execution-plane family instance interface.\n *\n * Note: this is currently named `SqlRuntimeFamilyInstance` because the execution plane\n * framework types are still using the `Runtime*` naming (`RuntimeFamilyInstance`, etc.).\n *\n * This will be renamed to `SqlExecutionFamilyInstance` as part of `TML-1842`.\n */\nexport interface SqlRuntimeFamilyInstance extends RuntimeFamilyInstance<'sql'> {}\n\n/**\n * Creates a SQL execution-plane family instance.\n *\n * This will be renamed to `createSqlExecutionFamilyInstance()` as part of `TML-1842`.\n */\nexport function createSqlRuntimeFamilyInstance(): SqlRuntimeFamilyInstance {\n return {\n familyId: 'sql' as const,\n };\n}\n","import type { RuntimeFamilyDescriptor } from '@prisma-next/framework-components/execution';\nimport { createSqlRuntimeFamilyInstance, type SqlRuntimeFamilyInstance } from './runtime-instance';\n\n/**\n * SQL execution-plane family descriptor.\n *\n * Note: this is currently named `sqlRuntimeFamilyDescriptor` because the execution plane\n * framework types are still using the `Runtime*` naming (`RuntimeFamilyDescriptor`, etc.).\n *\n * This will be renamed to `sqlExecutionFamilyDescriptor` as part of `TML-1842`.\n */\nexport const sqlRuntimeFamilyDescriptor: RuntimeFamilyDescriptor<'sql', SqlRuntimeFamilyInstance> =\n {\n kind: 'family',\n id: 'sql',\n familyId: 'sql',\n version: '0.0.1',\n create() {\n return createSqlRuntimeFamilyInstance();\n },\n };\n\nObject.freeze(sqlRuntimeFamilyDescriptor);\n","import type { RuntimeMutationDefaultGenerator } from '@prisma-next/sql-runtime';\nimport { TIMESTAMP_NOW_GENERATOR_ID } from './timestamp-now-generator';\n\n/**\n * Builds the canonical runtime-plane generator for the wall-clock-now\n * mutation default. Returns `new Date()`; semantics are target-agnostic\n * so all SQL targets share this single implementation.\n *\n * Declares `stability: 'query'` so a single ORM bulk operation\n * (e.g. `createAll([...])`) shares one timestamp across every row and\n * every timestamp-defaulted column. Matches Prisma 6's `@updatedAt`\n * semantics: one `new Date()` per lowered mutation, not per row.\n *\n * Lives in a runtime-plane-only module so the control-plane\n * `timestamp-now-generator.ts` (descriptor + authoring presets) stays\n * free of `@prisma-next/sql-runtime` imports.\n */\nexport function timestampNowRuntimeGenerator(): RuntimeMutationDefaultGenerator {\n return {\n id: TIMESTAMP_NOW_GENERATOR_ID,\n generate: () => new Date(),\n stability: 'query',\n };\n}\n","import { sqlRuntimeFamilyDescriptor } from '../core/runtime-descriptor';\n\nexport {\n type ResolvedDomainModel,\n type ResolvedStorageTable,\n resolveDomainModel,\n resolveStorageTable,\n UNBOUND_DOMAIN_NAMESPACE_ID,\n} from '../core/default-namespace';\nexport { timestampNowRuntimeGenerator } from '../core/timestamp-now-runtime-generator';\n\nexport default sqlRuntimeFamilyDescriptor;\n"],"mappings":";;;;;;;;;AAiBA,SAAgB,iCAA2D;CACzE,OAAO,EACL,UAAU,MACZ;AACF;;;;;;;;;;;ACVA,MAAa,6BACX;CACE,MAAM;CACN,IAAI;CACJ,UAAU;CACV,SAAS;CACT,SAAS;EACP,OAAO,+BAA+B;CACxC;AACF;AAEF,OAAO,OAAO,0BAA0B;;;;;;;;;;;;;;;;;ACLxC,SAAgB,+BAAgE;CAC9E,OAAO;EACL,IAAI;EACJ,gCAAgB,IAAI,KAAK;EACzB,WAAW;CACb;AACF;;;ACZA,IAAA,kBAAe"}
|
package/dist/schema-verify.d.mts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { a as verifySqlSchema, i as VerifySqlSchemaOptions, r as NativeTypeNormalizer } from "./verify-sql-schema-Cj3c2t5Z.mjs";
|
|
2
2
|
import { SchemaIssue } from "@prisma-next/framework-components/control";
|
|
3
|
+
import { ControlPolicy } from "@prisma-next/contract/types";
|
|
3
4
|
import { SqlIndexIR, SqlUniqueIR } from "@prisma-next/sql-schema-ir/types";
|
|
4
5
|
|
|
5
6
|
//#region src/core/schema-verify/verify-helpers.d.ts
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-verify.d.mts","names":[],"sources":["../src/core/schema-verify/verify-helpers.ts"],"mappings":"
|
|
1
|
+
{"version":3,"file":"schema-verify.d.mts","names":[],"sources":["../src/core/schema-verify/verify-helpers.ts"],"mappings":";;;;;;;;;iBA2DgB,WAAA,CAAY,CAAA,qBAAsB,CAAoB;AA+BtE;;;;;;;;;;AAG4B;AAuB5B;AA1BA,iBAAgB,2BAAA,CACd,OAAA,WAAkB,WAAA,IAClB,OAAA,WAAkB,UAAU,IAC5B,OAAA;;;;;;;;;AA0B0B;;;;iBAHZ,gBAAA,CACd,OAAA,WAAkB,UAAA,IAClB,OAAA,WAAkB,WAAW,IAC7B,OAAA"}
|
package/dist/schema-verify.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as isUniqueConstraintSatisfied, n as arraysEqual, r as isIndexSatisfied, t as verifySqlSchema } from "./verify-sql-schema-
|
|
1
|
+
import { i as isUniqueConstraintSatisfied, n as arraysEqual, r as isIndexSatisfied, t as verifySqlSchema } from "./verify-sql-schema-fljAiO-C.mjs";
|
|
2
2
|
export { arraysEqual, isIndexSatisfied, isUniqueConstraintSatisfied, verifySqlSchema };
|
|
@@ -1,12 +1,14 @@
|
|
|
1
|
+
import { t as SqlControlAdapter } from "./control-adapter-8tV9WgWK.mjs";
|
|
1
2
|
import { ContractSerializer, ContractSpace, ControlAdapterDescriptor, ControlDriverInstance, ControlExtensionDescriptor, ControlFamilyInstance, ControlStack, MigratableTargetDescriptor, MigrationOperationPolicy, MigrationPlan, MigrationPlanOperation, MigrationPlannerConflict, MigrationPlannerFailureResult, MigrationPlannerSuccessResult, MigrationRunnerExecutionChecks, MigrationRunnerFailure, MigrationRunnerPerSpaceSuccessValue, MigrationRunnerResult, OpFactoryCall, OperationContext, OperationPreview, OperationPreviewCapable, PslContractInferCapable, SchemaIssue, SchemaVerifier, SchemaViewCapable, SignDatabaseResult, VerifyDatabaseResult, VerifyDatabaseSchemaResult } from "@prisma-next/framework-components/control";
|
|
2
3
|
import { SqlStorage, StorageColumn, StorageTable, StorageTypeInstance } from "@prisma-next/sql-contract/types";
|
|
3
4
|
import { PslDocumentAst } from "@prisma-next/framework-components/psl-ast";
|
|
4
|
-
import { Result } from "@prisma-next/utils/result";
|
|
5
5
|
import { Contract } from "@prisma-next/contract/types";
|
|
6
|
-
import {
|
|
6
|
+
import { Result } from "@prisma-next/utils/result";
|
|
7
|
+
import { AnyQueryAst, DdlNode, LoweredStatement, LowererContext } from "@prisma-next/sql-relational-core/ast";
|
|
7
8
|
import { SqlSchemaIR } from "@prisma-next/sql-schema-ir/types";
|
|
8
9
|
import { TargetBoundComponentDescriptor } from "@prisma-next/framework-components/components";
|
|
9
10
|
import { TypesImportSpec } from "@prisma-next/framework-components/emission";
|
|
11
|
+
import { AggregateMigrationEdgeRef } from "@prisma-next/migration-tools/aggregate";
|
|
10
12
|
import { SqlOperationDescriptors } from "@prisma-next/sql-operations";
|
|
11
13
|
|
|
12
14
|
//#region src/core/control-instance.d.ts
|
|
@@ -66,7 +68,9 @@ interface SqlControlFamilyInstance extends ControlFamilyInstance<'sql', SqlSchem
|
|
|
66
68
|
readonly contract?: unknown;
|
|
67
69
|
}): Promise<SqlSchemaIR>;
|
|
68
70
|
inferPslContract(schemaIR: SqlSchemaIR): PslDocumentAst;
|
|
69
|
-
lowerAst(ast: AnyQueryAst, context: LowererContext<unknown>): LoweredStatement;
|
|
71
|
+
lowerAst(ast: AnyQueryAst | DdlNode, context: LowererContext<unknown>): LoweredStatement;
|
|
72
|
+
bootstrapControlTableQueries(): readonly DdlNode[];
|
|
73
|
+
bootstrapSignMarkerQueries(): readonly DdlNode[];
|
|
70
74
|
toOperationPreview(operations: readonly MigrationPlanOperation[]): OperationPreview;
|
|
71
75
|
}
|
|
72
76
|
//#endregion
|
|
@@ -202,7 +206,7 @@ interface SqlControlExtensionDescriptor<TTargetId extends string> extends Contro
|
|
|
202
206
|
*/
|
|
203
207
|
readonly contractSpace?: ContractSpace<Contract<SqlStorage>>;
|
|
204
208
|
}
|
|
205
|
-
interface SqlControlAdapterDescriptor<TTargetId extends string> extends ControlAdapterDescriptor<'sql', TTargetId
|
|
209
|
+
interface SqlControlAdapterDescriptor<TTargetId extends string> extends ControlAdapterDescriptor<'sql', TTargetId, SqlControlAdapter<TTargetId>> {
|
|
206
210
|
readonly queryOperations?: () => SqlOperationDescriptors;
|
|
207
211
|
}
|
|
208
212
|
interface SqlMigrationPlanOperationStep {
|
|
@@ -387,6 +391,11 @@ interface SqlMigrationRunnerExecuteOptions<TTargetDetails> {
|
|
|
387
391
|
* All components must have matching familyId ('sql') and targetId.
|
|
388
392
|
*/
|
|
389
393
|
readonly frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<'sql', string>>;
|
|
394
|
+
/**
|
|
395
|
+
* Per-edge breakdown from graph-walk planning. When present, the runner
|
|
396
|
+
* writes one ledger row per edge instead of one collapsed row per apply.
|
|
397
|
+
*/
|
|
398
|
+
readonly migrationEdges: readonly AggregateMigrationEdgeRef[];
|
|
390
399
|
}
|
|
391
400
|
type SqlMigrationRunnerErrorCode = 'DESTINATION_CONTRACT_MISMATCH' | 'LEGACY_MARKER_SHAPE' | 'MARKER_ORIGIN_MISMATCH' | 'POLICY_VIOLATION' | 'PRECHECK_FAILED' | 'POSTCHECK_FAILED' | 'SCHEMA_VERIFY_FAILED' | 'FOREIGN_KEY_VIOLATION' | 'EXECUTION_FAILED';
|
|
392
401
|
interface SqlMigrationRunnerFailure extends MigrationRunnerFailure {
|
|
@@ -463,4 +472,4 @@ interface CreateSqlMigrationPlanOptions<TTargetDetails> {
|
|
|
463
472
|
}
|
|
464
473
|
//#endregion
|
|
465
474
|
export { SqlPlannerResult as A, SqlMigrationRunnerResult as C, SqlPlannerConflictKind as D, SqlPlannerConflict as E, StorageTypePlanResult as M, SqlControlFamilyInstance as N, SqlPlannerConflictLocation as O, SqlMigrationRunnerFailure as S, SqlPlanTargetDetails as T, SqlMigrationPlannerPlanOptions as _, FieldEvent as a, SqlMigrationRunnerExecuteCallbacks as b, SqlControlAdapterDescriptor as c, SqlMigrationPlan as d, SqlMigrationPlanContractInfo as f, SqlMigrationPlanner as g, SqlMigrationPlanOperationTarget as h, ExpandNativeTypeInput as i, SqlPlannerSuccessResult as j, SqlPlannerFailureResult as k, SqlControlExtensionDescriptor as l, SqlMigrationPlanOperationStep as m, CodecControlHooks as n, FieldEventContext as o, SqlMigrationPlanOperation as p, CreateSqlMigrationPlanOptions as r, ResolveIdentityValueInput as s, AnyRecord as t, SqlControlTargetDescriptor as u, SqlMigrationRunner as v, SqlMigrationRunnerSuccessValue as w, SqlMigrationRunnerExecuteOptions as x, SqlMigrationRunnerErrorCode as y };
|
|
466
|
-
//# sourceMappingURL=types-
|
|
475
|
+
//# sourceMappingURL=types-BQiqw6kR.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-BQiqw6kR.d.mts","names":[],"sources":["../src/core/control-instance.ts","../src/core/migrations/types.ts"],"mappings":";;;;;;;;;;;;;;UA8KU,eAAA;EAAA,SACC,MAAA;EAAA,SACA,QAAA;EAAA,SACA,QAAA;EAAA,SACA,UAAA;AAAA;AAAA,KAGN,uBAAA,GAA0B,GAAG,SA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SACN,QAAA;EArOS;;;EAAA,SAyOT,OAAA;EAAA,SACA,MAAA,GAAS,4BAAA;EAAA,SACT,WAAA,EAAa,4BAAA;EAAA,SACb,UAAA,WAAqB,yBAAA,CAA0B,cAAA;EAhQa;;;;;EAAA,SAsQ5D,kBAAA;EAAA,SACA,IAAA,GAAO,SAAA;AAAA"}
|
|
@@ -5,6 +5,7 @@ import { SqlSchemaIR } from "@prisma-next/sql-schema-ir/types";
|
|
|
5
5
|
import { TargetBoundComponentDescriptor } from "@prisma-next/framework-components/components";
|
|
6
6
|
|
|
7
7
|
//#region src/core/schema-verify/verify-sql-schema.d.ts
|
|
8
|
+
type ColumnsCompatible = (declared: string, live: string) => boolean;
|
|
8
9
|
/**
|
|
9
10
|
* Function type for normalizing raw database default expressions into ColumnDefault.
|
|
10
11
|
* Target-specific implementations handle database dialect differences.
|
|
@@ -61,6 +62,11 @@ interface VerifySqlSchemaOptions {
|
|
|
61
62
|
* value-set comparison against the contract's `PostgresEnumStorageEntry.values`.
|
|
62
63
|
*/
|
|
63
64
|
readonly resolveExistingEnumValues?: (schema: SqlSchemaIR, enumType: PostgresEnumStorageEntry, namespaceId: string) => readonly string[] | null;
|
|
65
|
+
/**
|
|
66
|
+
* Target-supplied compatible-shape relation for `external` column type checks.
|
|
67
|
+
* Defaults to exact string equality when omitted.
|
|
68
|
+
*/
|
|
69
|
+
readonly columnsCompatible?: ColumnsCompatible;
|
|
64
70
|
}
|
|
65
71
|
/**
|
|
66
72
|
* Verifies that a SqlSchemaIR matches a Contract.
|
|
@@ -74,5 +80,5 @@ interface VerifySqlSchemaOptions {
|
|
|
74
80
|
*/
|
|
75
81
|
declare function verifySqlSchema(options: VerifySqlSchemaOptions): VerifyDatabaseSchemaResult;
|
|
76
82
|
//#endregion
|
|
77
|
-
export { verifySqlSchema as i,
|
|
78
|
-
//# sourceMappingURL=verify-sql-schema-
|
|
83
|
+
export { verifySqlSchema as a, VerifySqlSchemaOptions as i, DefaultNormalizer as n, NativeTypeNormalizer as r, ColumnsCompatible as t };
|
|
84
|
+
//# sourceMappingURL=verify-sql-schema-Cj3c2t5Z.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"verify-sql-schema-Cj3c2t5Z.d.mts","names":[],"sources":["../src/core/schema-verify/verify-sql-schema.ts"],"mappings":";;;;;;;KA4CY,iBAAA,IAAqB,QAAA,UAAkB,IAAY;;;;;KAMnD,iBAAA,IACV,UAAA,UACA,UAAA,aACG,aAAa;;;AAAA;AAOlB;;KAAY,oBAAA,IAAwB,UAAkB;;AAAA;AAKtD;UAAiB,sBAAA;;WAEN,QAAA,EAAU,QAAA,CAAS,UAAA;EAAT;EAAA,SAEV,MAAA,EAAQ,WAAA;EAIE;EAAA,SAFV,MAAA;EASmC;EAAA,SAPnC,OAAA,GAAU,gBAAA;EAaS;EAAA,SAXnB,oBAAA,EAAsB,WAAA;IAAsB,UAAA;EAAA;EAsCxB;;;;EAAA,SAjCpB,mBAAA,EAAqB,aAAA,CAAc,8BAAA;EAbhB;;;;;EAAA,SAmBnB,gBAAA,GAAmB,iBAAA;EAXnB;;;;;EAAA,SAiBA,mBAAA,GAAsB,oBAAA;EANtB;;;;;;;;;;;EAAA,SAkBA,yBAAA,IACP,MAAA,EAAQ,WAAA,EACR,QAAA,EAAU,wBAAA,EACV,WAAA;EAM4C;AAAA;AAahD;;EAbgD,SAArC,iBAAA,GAAoB,iBAAA;AAAA;;;;;AAa6D;;;;;;iBAA5E,eAAA,CAAgB,OAAA,EAAS,sBAAA,GAAyB,0BAA0B"}
|