@prisma-next/family-sql 0.13.0-dev.2 → 0.13.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/authoring-type-constructors-CN60DEWb.mjs +342 -0
- package/dist/authoring-type-constructors-CN60DEWb.mjs.map +1 -0
- package/dist/{control-adapter-CgIL9Vtx.d.mts → control-adapter-B_s-UMXg.d.mts} +13 -14
- package/dist/control-adapter-B_s-UMXg.d.mts.map +1 -0
- package/dist/control-adapter.d.mts +2 -2
- package/dist/control.d.mts +36 -34
- package/dist/control.d.mts.map +1 -1
- package/dist/control.mjs +14 -11
- package/dist/control.mjs.map +1 -1
- package/dist/ir.mjs +1 -1
- package/dist/migration.d.mts +1 -1
- package/dist/migration.d.mts.map +1 -1
- package/dist/migration.mjs +2 -1
- package/dist/migration.mjs.map +1 -1
- package/dist/pack.d.mts +16 -3
- package/dist/pack.d.mts.map +1 -1
- package/dist/pack.mjs +4 -2
- package/dist/pack.mjs.map +1 -1
- package/dist/schema-verify.mjs +1 -1
- package/dist/{sql-contract-serializer-CY7qnms7.mjs → sql-contract-serializer-DlmNUCRw.mjs} +2 -2
- package/dist/{sql-contract-serializer-CY7qnms7.mjs.map → sql-contract-serializer-DlmNUCRw.mjs.map} +1 -1
- package/dist/{types-CbwQCzXY.d.mts → types-BR5vHjvX.d.mts} +5 -5
- package/dist/types-BR5vHjvX.d.mts.map +1 -0
- package/dist/{verify-sql-schema-DlAgBiT_.mjs → verify-sql-schema-Dj8GrEZ-.mjs} +27 -13
- package/dist/verify-sql-schema-Dj8GrEZ-.mjs.map +1 -0
- package/package.json +21 -21
- package/src/core/authoring-entity-types.ts +178 -0
- package/src/core/authoring-field-presets.ts +8 -3
- package/src/core/control-adapter.ts +16 -12
- package/src/core/control-descriptor.ts +3 -0
- package/src/core/control-instance.ts +11 -5
- package/src/core/migrations/contract-to-schema-ir.ts +61 -47
- package/src/core/migrations/types.ts +4 -1
- package/src/core/psl-contract-infer/postgres-type-map.ts +18 -9
- package/src/core/sql-migration.ts +5 -1
- package/src/exports/control-adapter.ts +1 -0
- package/src/exports/control.ts +1 -1
- package/src/exports/pack.ts +3 -0
- package/dist/authoring-type-constructors-D4lQ-qpj.mjs +0 -192
- package/dist/authoring-type-constructors-D4lQ-qpj.mjs.map +0 -1
- package/dist/control-adapter-CgIL9Vtx.d.mts.map +0 -1
- package/dist/types-CbwQCzXY.d.mts.map +0 -1
- package/dist/verify-sql-schema-DlAgBiT_.mjs.map +0 -1
|
@@ -17,6 +17,7 @@ import type {
|
|
|
17
17
|
DdlNode,
|
|
18
18
|
LoweredStatement,
|
|
19
19
|
LowererContext,
|
|
20
|
+
SqlExecuteRequest,
|
|
20
21
|
} from '@prisma-next/sql-relational-core/ast';
|
|
21
22
|
import type { SqlSchemaIR } from '@prisma-next/sql-schema-ir/types';
|
|
22
23
|
import type { DefaultNormalizer, NativeTypeNormalizer } from './schema-verify/verify-sql-schema';
|
|
@@ -32,6 +33,19 @@ export interface Lowerer {
|
|
|
32
33
|
lower(ast: AnyQueryAst | DdlNode, context: LowererContext<unknown>): LoweredStatement;
|
|
33
34
|
}
|
|
34
35
|
|
|
36
|
+
/**
|
|
37
|
+
* Extends {@link Lowerer} with async codec-routed DDL lowering. Control
|
|
38
|
+
* adapters implement this; the planner's `CreateTableCall.toOp` and
|
|
39
|
+
* `CreateSchemaCall.toOp` accept it to produce executable DDL statements
|
|
40
|
+
* with literal defaults encoded through their codec.
|
|
41
|
+
*/
|
|
42
|
+
export interface ExecuteRequestLowerer extends Lowerer {
|
|
43
|
+
lowerToExecuteRequest(
|
|
44
|
+
ast: AnyQueryAst | DdlNode,
|
|
45
|
+
context?: LowererContext<unknown>,
|
|
46
|
+
): Promise<SqlExecuteRequest>;
|
|
47
|
+
}
|
|
48
|
+
|
|
35
49
|
/**
|
|
36
50
|
* SQL control adapter interface for control-plane operations.
|
|
37
51
|
* Implemented by target-specific adapters (e.g., Postgres, MySQL).
|
|
@@ -39,7 +53,8 @@ export interface Lowerer {
|
|
|
39
53
|
* @template TTarget - The target ID (e.g., 'postgres', 'mysql')
|
|
40
54
|
*/
|
|
41
55
|
export interface SqlControlAdapter<TTarget extends string = string>
|
|
42
|
-
extends ControlAdapterInstance<'sql', TTarget
|
|
56
|
+
extends ControlAdapterInstance<'sql', TTarget>,
|
|
57
|
+
ExecuteRequestLowerer {
|
|
43
58
|
/**
|
|
44
59
|
* Reads the contract marker for `space` from the database, returning
|
|
45
60
|
* `null` if no marker row exists for that space (or if the marker
|
|
@@ -219,17 +234,6 @@ export interface SqlControlAdapter<TTarget extends string = string>
|
|
|
219
234
|
* `sign` — excludes the ledger table.
|
|
220
235
|
*/
|
|
221
236
|
bootstrapSignMarkerQueries(): readonly DdlNode[];
|
|
222
|
-
|
|
223
|
-
/**
|
|
224
|
-
* Lower a SQL query AST into a target-flavored `{ sql, params }` payload.
|
|
225
|
-
*
|
|
226
|
-
* Migration tooling (e.g. the `dataTransform` operation) needs to materialize
|
|
227
|
-
* SQL at emit/plan time without instantiating the runtime adapter. The control
|
|
228
|
-
* adapter's `lower` is byte-equivalent to the runtime adapter's `lower` for the
|
|
229
|
-
* same AST and contract, ensuring planned SQL matches what the runtime would
|
|
230
|
-
* emit.
|
|
231
|
-
*/
|
|
232
|
-
lower(ast: AnyQueryAst | DdlNode, context: LowererContext<unknown>): LoweredStatement;
|
|
233
237
|
}
|
|
234
238
|
|
|
235
239
|
/**
|
|
@@ -4,6 +4,7 @@ import type {
|
|
|
4
4
|
} from '@prisma-next/framework-components/control';
|
|
5
5
|
import type { EmissionSpi } from '@prisma-next/framework-components/emission';
|
|
6
6
|
import { sqlEmission } from '@prisma-next/sql-contract-emitter';
|
|
7
|
+
import { sqlFamilyEntityTypes, sqlFamilyPslBlockDescriptors } from './authoring-entity-types';
|
|
7
8
|
import { sqlFamilyAuthoringFieldPresets } from './authoring-field-presets';
|
|
8
9
|
import { sqlFamilyAuthoringTypes } from './authoring-type-constructors';
|
|
9
10
|
import { createSqlFamilyInstance, type SqlControlFamilyInstance } from './control-instance';
|
|
@@ -19,6 +20,8 @@ export class SqlFamilyDescriptor
|
|
|
19
20
|
readonly authoring = {
|
|
20
21
|
field: sqlFamilyAuthoringFieldPresets,
|
|
21
22
|
type: sqlFamilyAuthoringTypes,
|
|
23
|
+
entityTypes: sqlFamilyEntityTypes,
|
|
24
|
+
pslBlockDescriptors: sqlFamilyPslBlockDescriptors,
|
|
22
25
|
} as const;
|
|
23
26
|
|
|
24
27
|
create<TTargetId extends string>(
|
|
@@ -35,8 +35,8 @@ import type { SqlControlDriverInstance, SqlStorage } from '@prisma-next/sql-cont
|
|
|
35
35
|
import type {
|
|
36
36
|
AnyQueryAst,
|
|
37
37
|
DdlNode,
|
|
38
|
-
LoweredStatement,
|
|
39
38
|
LowererContext,
|
|
39
|
+
SqlExecuteRequest,
|
|
40
40
|
} from '@prisma-next/sql-relational-core/ast';
|
|
41
41
|
import { defaultIndexName } from '@prisma-next/sql-schema-ir/naming';
|
|
42
42
|
import type { SqlSchemaIR, SqlTableIR } from '@prisma-next/sql-schema-ir/types';
|
|
@@ -240,7 +240,10 @@ export interface SqlControlFamilyInstance
|
|
|
240
240
|
|
|
241
241
|
inferPslContract(schemaIR: SqlSchemaIR): PslDocumentAst;
|
|
242
242
|
|
|
243
|
-
lowerAst(
|
|
243
|
+
lowerAst(
|
|
244
|
+
ast: AnyQueryAst | DdlNode,
|
|
245
|
+
context: LowererContext<unknown>,
|
|
246
|
+
): Promise<SqlExecuteRequest>;
|
|
244
247
|
|
|
245
248
|
/**
|
|
246
249
|
* Inserts the initial marker row for `space` (upsert on `space`).
|
|
@@ -707,7 +710,7 @@ export function createSqlFamilyInstance<TTargetId extends string>(
|
|
|
707
710
|
const controlAdapter = getControlAdapter();
|
|
708
711
|
const lowererContext = { contract };
|
|
709
712
|
for (const query of controlAdapter.bootstrapSignMarkerQueries()) {
|
|
710
|
-
const lowered = controlAdapter.
|
|
713
|
+
const lowered = await controlAdapter.lowerToExecuteRequest(query, lowererContext);
|
|
711
714
|
await driver.query(lowered.sql, lowered.params);
|
|
712
715
|
}
|
|
713
716
|
|
|
@@ -857,8 +860,11 @@ export function createSqlFamilyInstance<TTargetId extends string>(
|
|
|
857
860
|
return sqlSchemaIrToPslAst(schemaIR);
|
|
858
861
|
},
|
|
859
862
|
|
|
860
|
-
lowerAst(
|
|
861
|
-
|
|
863
|
+
lowerAst(
|
|
864
|
+
ast: AnyQueryAst | DdlNode,
|
|
865
|
+
context: LowererContext<unknown>,
|
|
866
|
+
): Promise<SqlExecuteRequest> {
|
|
867
|
+
return getControlAdapter().lowerToExecuteRequest(ast, context);
|
|
862
868
|
},
|
|
863
869
|
|
|
864
870
|
bootstrapControlTableQueries(): readonly DdlNode[] {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ColumnDefault, Contract } from '@prisma-next/contract/types';
|
|
1
|
+
import type { ColumnDefault, Contract, JsonValue } from '@prisma-next/contract/types';
|
|
2
2
|
import type { MigrationPlannerConflict } from '@prisma-next/framework-components/control';
|
|
3
3
|
import { UNBOUND_NAMESPACE_ID } from '@prisma-next/framework-components/ir';
|
|
4
4
|
import {
|
|
@@ -57,24 +57,19 @@ export type NativeTypeExpander = (input: {
|
|
|
57
57
|
export type DefaultRenderer = (def: ColumnDefault, column: StorageColumn) => string;
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
|
-
* Target-supplied callback that
|
|
61
|
-
*
|
|
60
|
+
* Target-supplied callback that resolves a contract namespace to the live
|
|
61
|
+
* database schema its enums are stored under.
|
|
62
62
|
*
|
|
63
|
-
*
|
|
64
|
-
* namespaces holding an enum with
|
|
65
|
-
* native type
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
70
|
-
* target
|
|
71
|
-
* still emits keys that match the target's read side exactly.
|
|
63
|
+
* The projected enum annotations are nested by schema
|
|
64
|
+
* (`storageTypes[schema][nativeType]`) so two namespaces holding an enum with
|
|
65
|
+
* the same native type resolve to distinct live-database types. Mapping a
|
|
66
|
+
* namespace to its DDL schema is target-specific (Postgres schemas;
|
|
67
|
+
* SQLite/MySQL differ), so the target injects it here rather than the family
|
|
68
|
+
* importing a concrete `ddlSchemaName`. This keeps the family layer
|
|
69
|
+
* target-agnostic while the projection nests under the same schema the
|
|
70
|
+
* target's read side (`readExistingEnumValues`) looks up.
|
|
72
71
|
*/
|
|
73
|
-
export type
|
|
74
|
-
storage: SqlStorage,
|
|
75
|
-
namespaceId: string,
|
|
76
|
-
nativeType: string,
|
|
77
|
-
) => string;
|
|
72
|
+
export type EnumNamespaceSchemaResolver = (storage: SqlStorage, namespaceId: string) => string;
|
|
78
73
|
|
|
79
74
|
function convertColumn(
|
|
80
75
|
name: string,
|
|
@@ -164,8 +159,12 @@ function resolveColumnTypeMetadata(
|
|
|
164
159
|
* `checkConstraintPlanCallStrategy` (migration planning) so all three agree on
|
|
165
160
|
* the resolved values and the error behavior on a missing reference.
|
|
166
161
|
*/
|
|
162
|
+
function allStrings(values: readonly JsonValue[]): values is readonly string[] {
|
|
163
|
+
return values.every((value) => typeof value === 'string');
|
|
164
|
+
}
|
|
165
|
+
|
|
167
166
|
export function resolveValueSetValues(
|
|
168
|
-
ref: { readonly namespaceId: string; readonly
|
|
167
|
+
ref: { readonly namespaceId: string; readonly entityName: string },
|
|
169
168
|
storage: SqlStorage,
|
|
170
169
|
contextLabel: string,
|
|
171
170
|
): readonly string[] {
|
|
@@ -175,13 +174,22 @@ export function resolveValueSetValues(
|
|
|
175
174
|
`resolveValueSetValues: namespace "${ref.namespaceId}" not found in storage (${contextLabel})`,
|
|
176
175
|
);
|
|
177
176
|
}
|
|
178
|
-
const valueSet = ns.entries.valueSet?.[ref.
|
|
177
|
+
const valueSet = ns.entries.valueSet?.[ref.entityName];
|
|
179
178
|
if (!valueSet) {
|
|
180
179
|
throw new Error(
|
|
181
|
-
`resolveValueSetValues: value-set "${ref.
|
|
180
|
+
`resolveValueSetValues: value-set "${ref.entityName}" not found in namespace "${ref.namespaceId}" (${contextLabel})`,
|
|
181
|
+
);
|
|
182
|
+
}
|
|
183
|
+
// Only TEXT enums ship a CHECK-constraint round-trip in this slice. A
|
|
184
|
+
// non-string value-set is a numeric enum, whose CHECK rendering/verification
|
|
185
|
+
// is future work; fail loudly rather than emit a wrong numeric-as-text check.
|
|
186
|
+
const values = valueSet.values;
|
|
187
|
+
if (!allStrings(values)) {
|
|
188
|
+
throw new Error(
|
|
189
|
+
`resolveValueSetValues: value-set "${ref.entityName}" in namespace "${ref.namespaceId}" has a non-string value; numeric-enum CHECK constraints are not yet supported (${contextLabel})`,
|
|
182
190
|
);
|
|
183
191
|
}
|
|
184
|
-
return
|
|
192
|
+
return values;
|
|
185
193
|
}
|
|
186
194
|
|
|
187
195
|
/**
|
|
@@ -349,13 +357,13 @@ export interface ContractToSchemaIROptions {
|
|
|
349
357
|
readonly expandNativeType?: NativeTypeExpander;
|
|
350
358
|
readonly renderDefault?: DefaultRenderer;
|
|
351
359
|
/**
|
|
352
|
-
* Target-supplied resolver
|
|
353
|
-
*
|
|
354
|
-
*
|
|
355
|
-
* `readExistingEnumValues` lookup. Targets without
|
|
356
|
-
* storage (SQLite) omit it; enums are absent there.
|
|
360
|
+
* Target-supplied resolver mapping a namespace to the live database schema
|
|
361
|
+
* its enums are stored under. When provided (Postgres), namespace-scoped
|
|
362
|
+
* enums are nested by that schema in `enumTypes` so the projection matches
|
|
363
|
+
* the target's `readExistingEnumValues` lookup. Targets without
|
|
364
|
+
* schema-scoped enum storage (SQLite) omit it; enums are absent there.
|
|
357
365
|
*/
|
|
358
|
-
readonly
|
|
366
|
+
readonly resolveEnumNamespaceSchema?: EnumNamespaceSchemaResolver;
|
|
359
367
|
}
|
|
360
368
|
|
|
361
369
|
/**
|
|
@@ -428,7 +436,7 @@ export function contractToSchemaIR(
|
|
|
428
436
|
const annotations = deriveAnnotations(
|
|
429
437
|
storage,
|
|
430
438
|
options.annotationNamespace,
|
|
431
|
-
options.
|
|
439
|
+
options.resolveEnumNamespaceSchema,
|
|
432
440
|
);
|
|
433
441
|
|
|
434
442
|
return {
|
|
@@ -455,21 +463,26 @@ function normalizeEnumAnnotation(entry: PostgresEnumStorageEntry): StorageTypeIn
|
|
|
455
463
|
function deriveAnnotations(
|
|
456
464
|
storage: SqlStorage,
|
|
457
465
|
annotationNamespace: string,
|
|
458
|
-
|
|
466
|
+
resolveEnumNamespaceSchema: EnumNamespaceSchemaResolver | undefined,
|
|
459
467
|
): SqlAnnotations | undefined {
|
|
460
468
|
const storageTypes: Record<string, StorageTypeInstance> = {};
|
|
469
|
+
const enumTypes: Record<string, Record<string, StorageTypeInstance>> = {};
|
|
470
|
+
|
|
471
|
+
const addEnum = (namespaceId: string, entry: PostgresEnumStorageEntry): void => {
|
|
472
|
+
const schemaName = resolveEnumNamespaceSchema
|
|
473
|
+
? resolveEnumNamespaceSchema(storage, namespaceId)
|
|
474
|
+
: 'public';
|
|
475
|
+
const bySchema = enumTypes[schemaName] ?? {};
|
|
476
|
+
bySchema[entry.nativeType] = normalizeEnumAnnotation(entry);
|
|
477
|
+
enumTypes[schemaName] = bySchema;
|
|
478
|
+
};
|
|
461
479
|
|
|
462
|
-
// Top-level `storage.types`:
|
|
463
|
-
// by bare `nativeType
|
|
464
|
-
//
|
|
465
|
-
// namespace/schema-qualified via the resolver under the unbound coordinate
|
|
466
|
-
// so it never collides on a bare name.
|
|
480
|
+
// Top-level `storage.types`: non-enum codec entries (vector, decimal, …) keyed
|
|
481
|
+
// by bare `nativeType`. Post-S1.B enums live in `namespaces[*].entries.type`;
|
|
482
|
+
// a defensive top-level enum is nested under the unbound coordinate's schema.
|
|
467
483
|
for (const typeInstance of Object.values((storage.types ?? {}) as ResolvedStorageTypes)) {
|
|
468
484
|
if (isPostgresEnumStorageEntry(typeInstance)) {
|
|
469
|
-
|
|
470
|
-
? resolveEnumStorageKey(storage, UNBOUND_NAMESPACE_ID, typeInstance.nativeType)
|
|
471
|
-
: typeInstance.nativeType;
|
|
472
|
-
storageTypes[key] = normalizeEnumAnnotation(typeInstance);
|
|
485
|
+
addEnum(UNBOUND_NAMESPACE_ID, typeInstance);
|
|
473
486
|
continue;
|
|
474
487
|
}
|
|
475
488
|
if (isStorageTypeInstance(typeInstance)) {
|
|
@@ -477,21 +490,22 @@ function deriveAnnotations(
|
|
|
477
490
|
}
|
|
478
491
|
}
|
|
479
492
|
|
|
480
|
-
// Namespace-scoped enums: schema
|
|
481
|
-
//
|
|
482
|
-
//
|
|
493
|
+
// Namespace-scoped enums: nested by live schema so two namespaces sharing a
|
|
494
|
+
// native type resolve to distinct live-database types, matching the target's
|
|
495
|
+
// `readExistingEnumValues` read side (`enumTypes[schema][nativeType]`).
|
|
483
496
|
for (const [namespaceId, ns] of Object.entries(storage.namespaces)) {
|
|
484
497
|
const nsEnums = ns.entries['type'];
|
|
485
498
|
if (!nsEnums) continue;
|
|
486
499
|
for (const entry of Object.values(nsEnums)) {
|
|
487
500
|
if (!isPostgresEnumStorageEntry(entry)) continue;
|
|
488
|
-
|
|
489
|
-
? resolveEnumStorageKey(storage, namespaceId, entry.nativeType)
|
|
490
|
-
: entry.nativeType;
|
|
491
|
-
storageTypes[key] = normalizeEnumAnnotation(entry);
|
|
501
|
+
addEnum(namespaceId, entry);
|
|
492
502
|
}
|
|
493
503
|
}
|
|
494
504
|
|
|
495
|
-
|
|
496
|
-
|
|
505
|
+
const envelope = {
|
|
506
|
+
...(Object.keys(storageTypes).length > 0 ? { storageTypes } : {}),
|
|
507
|
+
...(Object.keys(enumTypes).length > 0 ? { enumTypes } : {}),
|
|
508
|
+
};
|
|
509
|
+
if (Object.keys(envelope).length === 0) return undefined;
|
|
510
|
+
return { [annotationNamespace]: envelope };
|
|
497
511
|
}
|
|
@@ -251,7 +251,10 @@ export interface SqlMigrationPlan<TTargetDetails> extends MigrationPlan {
|
|
|
251
251
|
* Destination contract identity that the plan intends to reach.
|
|
252
252
|
*/
|
|
253
253
|
readonly destination: SqlMigrationPlanContractInfo;
|
|
254
|
-
readonly operations: readonly
|
|
254
|
+
readonly operations: readonly (
|
|
255
|
+
| SqlMigrationPlanOperation<TTargetDetails>
|
|
256
|
+
| Promise<SqlMigrationPlanOperation<TTargetDetails>>
|
|
257
|
+
)[];
|
|
255
258
|
/**
|
|
256
259
|
* Sorted, deduplicated invariant ids declared by this plan's data-transform
|
|
257
260
|
* ops. Required at the SQL-family layer (the SQL runners consume this as
|
|
@@ -132,20 +132,29 @@ export function createPostgresTypeMap(enumTypeNames?: ReadonlySet<string>): PslT
|
|
|
132
132
|
|
|
133
133
|
export function extractEnumInfo(annotations?: Record<string, unknown>): EnumInfo {
|
|
134
134
|
const pgAnnotations = annotations?.['pg'] as Record<string, unknown> | undefined;
|
|
135
|
-
const
|
|
136
|
-
| Record<
|
|
135
|
+
const enumTypes = pgAnnotations?.['enumTypes'] as
|
|
136
|
+
| Record<
|
|
137
|
+
string,
|
|
138
|
+
Record<
|
|
139
|
+
string,
|
|
140
|
+
{ codecId: string; nativeType: string; typeParams?: Record<string, unknown> }
|
|
141
|
+
>
|
|
142
|
+
>
|
|
137
143
|
| undefined;
|
|
138
144
|
|
|
139
145
|
const typeNames = new Set<string>();
|
|
140
146
|
const definitions = new Map<string, readonly string[]>();
|
|
141
147
|
|
|
142
|
-
if (
|
|
143
|
-
for (const
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
if (enumTypes) {
|
|
149
|
+
for (const bySchema of Object.values(enumTypes)) {
|
|
150
|
+
for (const typeInstance of Object.values(bySchema)) {
|
|
151
|
+
if (typeInstance.codecId === ENUM_CODEC_ID) {
|
|
152
|
+
const nativeType = typeInstance.nativeType;
|
|
153
|
+
typeNames.add(nativeType);
|
|
154
|
+
const values = typeInstance.typeParams?.['values'];
|
|
155
|
+
if (Array.isArray(values) && values.every((v): v is string => typeof v === 'string')) {
|
|
156
|
+
definitions.set(nativeType, values);
|
|
157
|
+
}
|
|
149
158
|
}
|
|
150
159
|
}
|
|
151
160
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { deriveProvidedInvariants } from '@prisma-next/migration-tools/invariants';
|
|
2
2
|
import { Migration } from '@prisma-next/migration-tools/migration';
|
|
3
|
+
import { isThenable } from '@prisma-next/utils/promise';
|
|
3
4
|
import type { SqlMigrationPlanOperation, SqlPlanTargetDetails } from './migrations/types';
|
|
4
5
|
|
|
5
6
|
/**
|
|
@@ -31,6 +32,9 @@ export abstract class SqlMigration<
|
|
|
31
32
|
* `MigrationPlan.providedInvariants?` stays optional.
|
|
32
33
|
*/
|
|
33
34
|
get providedInvariants(): readonly string[] {
|
|
34
|
-
|
|
35
|
+
const ops = this.operations.filter(
|
|
36
|
+
(op): op is SqlMigrationPlanOperation<TDetails> => !isThenable(op),
|
|
37
|
+
);
|
|
38
|
+
return deriveProvidedInvariants(ops);
|
|
35
39
|
}
|
|
36
40
|
}
|
package/src/exports/control.ts
CHANGED
|
@@ -17,7 +17,7 @@ export type { SqlControlFamilyInstance } from '../core/control-instance';
|
|
|
17
17
|
export type {
|
|
18
18
|
ContractToSchemaIROptions,
|
|
19
19
|
DefaultRenderer,
|
|
20
|
-
|
|
20
|
+
EnumNamespaceSchemaResolver,
|
|
21
21
|
NativeTypeExpander,
|
|
22
22
|
} from '../core/migrations/contract-to-schema-ir';
|
|
23
23
|
// Contract → SchemaIR conversion for offline migration planning
|
package/src/exports/pack.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { FamilyPackRef } from '@prisma-next/framework-components/components';
|
|
2
|
+
import { sqlFamilyEntityTypes, sqlFamilyPslBlockDescriptors } from '../core/authoring-entity-types';
|
|
2
3
|
import { sqlFamilyAuthoringFieldPresets } from '../core/authoring-field-presets';
|
|
3
4
|
import { sqlFamilyAuthoringTypes } from '../core/authoring-type-constructors';
|
|
4
5
|
|
|
@@ -10,6 +11,8 @@ const sqlFamilyPack = {
|
|
|
10
11
|
authoring: {
|
|
11
12
|
field: sqlFamilyAuthoringFieldPresets,
|
|
12
13
|
type: sqlFamilyAuthoringTypes,
|
|
14
|
+
entityTypes: sqlFamilyEntityTypes,
|
|
15
|
+
pslBlockDescriptors: sqlFamilyPslBlockDescriptors,
|
|
13
16
|
},
|
|
14
17
|
} as const satisfies FamilyPackRef<'sql'>;
|
|
15
18
|
|
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
//#region src/core/authoring-field-presets.ts
|
|
2
|
-
/**
|
|
3
|
-
* Family-level SQL authoring field presets.
|
|
4
|
-
*
|
|
5
|
-
* Only presets whose codec IDs align with the ID generator metadata live here
|
|
6
|
-
* (see `@prisma-next/ids`). These presets are target-agnostic because the
|
|
7
|
-
* generator metadata fixes their codec/native-type to `sql/char@1`
|
|
8
|
-
* (`character`) regardless of target, and the PSL interpreter lets the
|
|
9
|
-
* generator override the scalar descriptor.
|
|
10
|
-
*
|
|
11
|
-
* Scalar presets that map to target-specific codecs (e.g. `text`, `int`,
|
|
12
|
-
* `boolean`, `dateTime`) are contributed by the target pack (see
|
|
13
|
-
* `postgresAuthoringFieldPresets` in `@prisma-next/target-postgres`) so the
|
|
14
|
-
* TS callback surface and the PSL scalar surface lower to byte-identical
|
|
15
|
-
* contracts for the active target.
|
|
16
|
-
*/
|
|
17
|
-
const CHARACTER_CODEC_ID = "sql/char@1";
|
|
18
|
-
const CHARACTER_NATIVE_TYPE = "character";
|
|
19
|
-
const nanoidOptionsArgument = {
|
|
20
|
-
kind: "object",
|
|
21
|
-
optional: true,
|
|
22
|
-
properties: { size: {
|
|
23
|
-
kind: "number",
|
|
24
|
-
optional: true,
|
|
25
|
-
integer: true,
|
|
26
|
-
minimum: 2,
|
|
27
|
-
maximum: 255
|
|
28
|
-
} }
|
|
29
|
-
};
|
|
30
|
-
const sqlFamilyAuthoringFieldPresets = {
|
|
31
|
-
uuid: {
|
|
32
|
-
kind: "fieldPreset",
|
|
33
|
-
output: {
|
|
34
|
-
codecId: CHARACTER_CODEC_ID,
|
|
35
|
-
nativeType: CHARACTER_NATIVE_TYPE,
|
|
36
|
-
typeParams: { length: 36 }
|
|
37
|
-
}
|
|
38
|
-
},
|
|
39
|
-
ulid: {
|
|
40
|
-
kind: "fieldPreset",
|
|
41
|
-
output: {
|
|
42
|
-
codecId: CHARACTER_CODEC_ID,
|
|
43
|
-
nativeType: CHARACTER_NATIVE_TYPE,
|
|
44
|
-
typeParams: { length: 26 }
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
nanoid: {
|
|
48
|
-
kind: "fieldPreset",
|
|
49
|
-
args: [nanoidOptionsArgument],
|
|
50
|
-
output: {
|
|
51
|
-
codecId: CHARACTER_CODEC_ID,
|
|
52
|
-
nativeType: CHARACTER_NATIVE_TYPE,
|
|
53
|
-
typeParams: { length: {
|
|
54
|
-
kind: "arg",
|
|
55
|
-
index: 0,
|
|
56
|
-
path: ["size"],
|
|
57
|
-
default: 21
|
|
58
|
-
} }
|
|
59
|
-
}
|
|
60
|
-
},
|
|
61
|
-
cuid2: {
|
|
62
|
-
kind: "fieldPreset",
|
|
63
|
-
output: {
|
|
64
|
-
codecId: CHARACTER_CODEC_ID,
|
|
65
|
-
nativeType: CHARACTER_NATIVE_TYPE,
|
|
66
|
-
typeParams: { length: 24 }
|
|
67
|
-
}
|
|
68
|
-
},
|
|
69
|
-
ksuid: {
|
|
70
|
-
kind: "fieldPreset",
|
|
71
|
-
output: {
|
|
72
|
-
codecId: CHARACTER_CODEC_ID,
|
|
73
|
-
nativeType: CHARACTER_NATIVE_TYPE,
|
|
74
|
-
typeParams: { length: 27 }
|
|
75
|
-
}
|
|
76
|
-
},
|
|
77
|
-
id: {
|
|
78
|
-
uuidv4: {
|
|
79
|
-
kind: "fieldPreset",
|
|
80
|
-
output: {
|
|
81
|
-
codecId: CHARACTER_CODEC_ID,
|
|
82
|
-
nativeType: CHARACTER_NATIVE_TYPE,
|
|
83
|
-
typeParams: { length: 36 },
|
|
84
|
-
executionDefaults: { onCreate: {
|
|
85
|
-
kind: "generator",
|
|
86
|
-
id: "uuidv4"
|
|
87
|
-
} },
|
|
88
|
-
id: true
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
uuidv7: {
|
|
92
|
-
kind: "fieldPreset",
|
|
93
|
-
output: {
|
|
94
|
-
codecId: CHARACTER_CODEC_ID,
|
|
95
|
-
nativeType: CHARACTER_NATIVE_TYPE,
|
|
96
|
-
typeParams: { length: 36 },
|
|
97
|
-
executionDefaults: { onCreate: {
|
|
98
|
-
kind: "generator",
|
|
99
|
-
id: "uuidv7"
|
|
100
|
-
} },
|
|
101
|
-
id: true
|
|
102
|
-
}
|
|
103
|
-
},
|
|
104
|
-
ulid: {
|
|
105
|
-
kind: "fieldPreset",
|
|
106
|
-
output: {
|
|
107
|
-
codecId: CHARACTER_CODEC_ID,
|
|
108
|
-
nativeType: CHARACTER_NATIVE_TYPE,
|
|
109
|
-
typeParams: { length: 26 },
|
|
110
|
-
executionDefaults: { onCreate: {
|
|
111
|
-
kind: "generator",
|
|
112
|
-
id: "ulid"
|
|
113
|
-
} },
|
|
114
|
-
id: true
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
nanoid: {
|
|
118
|
-
kind: "fieldPreset",
|
|
119
|
-
args: [nanoidOptionsArgument],
|
|
120
|
-
output: {
|
|
121
|
-
codecId: CHARACTER_CODEC_ID,
|
|
122
|
-
nativeType: CHARACTER_NATIVE_TYPE,
|
|
123
|
-
typeParams: { length: {
|
|
124
|
-
kind: "arg",
|
|
125
|
-
index: 0,
|
|
126
|
-
path: ["size"],
|
|
127
|
-
default: 21
|
|
128
|
-
} },
|
|
129
|
-
executionDefaults: { onCreate: {
|
|
130
|
-
kind: "generator",
|
|
131
|
-
id: "nanoid",
|
|
132
|
-
params: { size: {
|
|
133
|
-
kind: "arg",
|
|
134
|
-
index: 0,
|
|
135
|
-
path: ["size"]
|
|
136
|
-
} }
|
|
137
|
-
} },
|
|
138
|
-
id: true
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
cuid2: {
|
|
142
|
-
kind: "fieldPreset",
|
|
143
|
-
output: {
|
|
144
|
-
codecId: CHARACTER_CODEC_ID,
|
|
145
|
-
nativeType: CHARACTER_NATIVE_TYPE,
|
|
146
|
-
typeParams: { length: 24 },
|
|
147
|
-
executionDefaults: { onCreate: {
|
|
148
|
-
kind: "generator",
|
|
149
|
-
id: "cuid2"
|
|
150
|
-
} },
|
|
151
|
-
id: true
|
|
152
|
-
}
|
|
153
|
-
},
|
|
154
|
-
ksuid: {
|
|
155
|
-
kind: "fieldPreset",
|
|
156
|
-
output: {
|
|
157
|
-
codecId: CHARACTER_CODEC_ID,
|
|
158
|
-
nativeType: CHARACTER_NATIVE_TYPE,
|
|
159
|
-
typeParams: { length: 27 },
|
|
160
|
-
executionDefaults: { onCreate: {
|
|
161
|
-
kind: "generator",
|
|
162
|
-
id: "ksuid"
|
|
163
|
-
} },
|
|
164
|
-
id: true
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
};
|
|
169
|
-
//#endregion
|
|
170
|
-
//#region src/core/authoring-type-constructors.ts
|
|
171
|
-
const sqlFamilyAuthoringTypes = { sql: { String: {
|
|
172
|
-
kind: "typeConstructor",
|
|
173
|
-
args: [{
|
|
174
|
-
kind: "number",
|
|
175
|
-
name: "length",
|
|
176
|
-
integer: true,
|
|
177
|
-
minimum: 1,
|
|
178
|
-
maximum: 10485760
|
|
179
|
-
}],
|
|
180
|
-
output: {
|
|
181
|
-
codecId: "sql/varchar@1",
|
|
182
|
-
nativeType: "character varying",
|
|
183
|
-
typeParams: { length: {
|
|
184
|
-
kind: "arg",
|
|
185
|
-
index: 0
|
|
186
|
-
} }
|
|
187
|
-
}
|
|
188
|
-
} } };
|
|
189
|
-
//#endregion
|
|
190
|
-
export { sqlFamilyAuthoringFieldPresets as n, sqlFamilyAuthoringTypes as t };
|
|
191
|
-
|
|
192
|
-
//# sourceMappingURL=authoring-type-constructors-D4lQ-qpj.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authoring-type-constructors-D4lQ-qpj.mjs","names":[],"sources":["../src/core/authoring-field-presets.ts","../src/core/authoring-type-constructors.ts"],"sourcesContent":["import type { AuthoringFieldNamespace } from '@prisma-next/framework-components/authoring';\n\n/**\n * Family-level SQL authoring field presets.\n *\n * Only presets whose codec IDs align with the ID generator metadata live here\n * (see `@prisma-next/ids`). These presets are target-agnostic because the\n * generator metadata fixes their codec/native-type to `sql/char@1`\n * (`character`) regardless of target, and the PSL interpreter lets the\n * generator override the scalar descriptor.\n *\n * Scalar presets that map to target-specific codecs (e.g. `text`, `int`,\n * `boolean`, `dateTime`) are contributed by the target pack (see\n * `postgresAuthoringFieldPresets` in `@prisma-next/target-postgres`) so the\n * TS callback surface and the PSL scalar surface lower to byte-identical\n * contracts for the active target.\n */\n\nconst CHARACTER_CODEC_ID = 'sql/char@1';\nconst CHARACTER_NATIVE_TYPE = 'character';\n\nconst nanoidOptionsArgument = {\n kind: 'object',\n optional: true,\n properties: {\n size: {\n kind: 'number',\n optional: true,\n integer: true,\n minimum: 2,\n maximum: 255,\n },\n },\n} as const;\n\nexport const sqlFamilyAuthoringFieldPresets = {\n uuid: {\n kind: 'fieldPreset',\n output: {\n codecId: CHARACTER_CODEC_ID,\n nativeType: CHARACTER_NATIVE_TYPE,\n typeParams: {\n length: 36,\n },\n },\n },\n ulid: {\n kind: 'fieldPreset',\n output: {\n codecId: CHARACTER_CODEC_ID,\n nativeType: CHARACTER_NATIVE_TYPE,\n typeParams: {\n length: 26,\n },\n },\n },\n nanoid: {\n kind: 'fieldPreset',\n args: [nanoidOptionsArgument],\n output: {\n codecId: CHARACTER_CODEC_ID,\n nativeType: CHARACTER_NATIVE_TYPE,\n typeParams: {\n length: {\n kind: 'arg',\n index: 0,\n path: ['size'],\n default: 21,\n },\n },\n },\n },\n cuid2: {\n kind: 'fieldPreset',\n output: {\n codecId: CHARACTER_CODEC_ID,\n nativeType: CHARACTER_NATIVE_TYPE,\n typeParams: {\n length: 24,\n },\n },\n },\n ksuid: {\n kind: 'fieldPreset',\n output: {\n codecId: CHARACTER_CODEC_ID,\n nativeType: CHARACTER_NATIVE_TYPE,\n typeParams: {\n length: 27,\n },\n },\n },\n id: {\n uuidv4: {\n kind: 'fieldPreset',\n output: {\n codecId: CHARACTER_CODEC_ID,\n nativeType: CHARACTER_NATIVE_TYPE,\n typeParams: {\n length: 36,\n },\n executionDefaults: {\n onCreate: {\n kind: 'generator',\n id: 'uuidv4',\n },\n },\n id: true,\n },\n },\n uuidv7: {\n kind: 'fieldPreset',\n output: {\n codecId: CHARACTER_CODEC_ID,\n nativeType: CHARACTER_NATIVE_TYPE,\n typeParams: {\n length: 36,\n },\n executionDefaults: {\n onCreate: {\n kind: 'generator',\n id: 'uuidv7',\n },\n },\n id: true,\n },\n },\n ulid: {\n kind: 'fieldPreset',\n output: {\n codecId: CHARACTER_CODEC_ID,\n nativeType: CHARACTER_NATIVE_TYPE,\n typeParams: {\n length: 26,\n },\n executionDefaults: {\n onCreate: {\n kind: 'generator',\n id: 'ulid',\n },\n },\n id: true,\n },\n },\n nanoid: {\n kind: 'fieldPreset',\n args: [nanoidOptionsArgument],\n output: {\n codecId: CHARACTER_CODEC_ID,\n nativeType: CHARACTER_NATIVE_TYPE,\n typeParams: {\n length: {\n kind: 'arg',\n index: 0,\n path: ['size'],\n default: 21,\n },\n },\n executionDefaults: {\n onCreate: {\n kind: 'generator',\n id: 'nanoid',\n params: {\n size: {\n kind: 'arg',\n index: 0,\n path: ['size'],\n },\n },\n },\n },\n id: true,\n },\n },\n cuid2: {\n kind: 'fieldPreset',\n output: {\n codecId: CHARACTER_CODEC_ID,\n nativeType: CHARACTER_NATIVE_TYPE,\n typeParams: {\n length: 24,\n },\n executionDefaults: {\n onCreate: {\n kind: 'generator',\n id: 'cuid2',\n },\n },\n id: true,\n },\n },\n ksuid: {\n kind: 'fieldPreset',\n output: {\n codecId: CHARACTER_CODEC_ID,\n nativeType: CHARACTER_NATIVE_TYPE,\n typeParams: {\n length: 27,\n },\n executionDefaults: {\n onCreate: {\n kind: 'generator',\n id: 'ksuid',\n },\n },\n id: true,\n },\n },\n },\n} as const satisfies AuthoringFieldNamespace;\n","import type { AuthoringTypeNamespace } from '@prisma-next/framework-components/authoring';\n\nexport const sqlFamilyAuthoringTypes = {\n sql: {\n String: {\n kind: 'typeConstructor',\n args: [{ kind: 'number', name: 'length', integer: true, minimum: 1, maximum: 10485760 }],\n output: {\n codecId: 'sql/varchar@1',\n nativeType: 'character varying',\n typeParams: {\n length: { kind: 'arg', index: 0 },\n },\n },\n },\n },\n} as const satisfies AuthoringTypeNamespace;\n"],"mappings":";;;;;;;;;;;;;;;;AAkBA,MAAM,qBAAqB;AAC3B,MAAM,wBAAwB;AAE9B,MAAM,wBAAwB;CAC5B,MAAM;CACN,UAAU;CACV,YAAY,EACV,MAAM;EACJ,MAAM;EACN,UAAU;EACV,SAAS;EACT,SAAS;EACT,SAAS;CACX,EACF;AACF;AAEA,MAAa,iCAAiC;CAC5C,MAAM;EACJ,MAAM;EACN,QAAQ;GACN,SAAS;GACT,YAAY;GACZ,YAAY,EACV,QAAQ,GACV;EACF;CACF;CACA,MAAM;EACJ,MAAM;EACN,QAAQ;GACN,SAAS;GACT,YAAY;GACZ,YAAY,EACV,QAAQ,GACV;EACF;CACF;CACA,QAAQ;EACN,MAAM;EACN,MAAM,CAAC,qBAAqB;EAC5B,QAAQ;GACN,SAAS;GACT,YAAY;GACZ,YAAY,EACV,QAAQ;IACN,MAAM;IACN,OAAO;IACP,MAAM,CAAC,MAAM;IACb,SAAS;GACX,EACF;EACF;CACF;CACA,OAAO;EACL,MAAM;EACN,QAAQ;GACN,SAAS;GACT,YAAY;GACZ,YAAY,EACV,QAAQ,GACV;EACF;CACF;CACA,OAAO;EACL,MAAM;EACN,QAAQ;GACN,SAAS;GACT,YAAY;GACZ,YAAY,EACV,QAAQ,GACV;EACF;CACF;CACA,IAAI;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