@prisma/orm-family-sql 8.0.0-rc.18-dev.17 → 8.0.0-rc.18-dev.19
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-0Iv2zdwS-MFIpJ4fA.mjs → authoring-type-constructors-0Iv2zdwS-BJjO5EnA.mjs} +2 -2
- package/dist/{authoring-type-constructors-0Iv2zdwS-MFIpJ4fA.mjs.map → authoring-type-constructors-0Iv2zdwS-BJjO5EnA.mjs.map} +1 -1
- package/dist/{config-types-ComQZUlA.mjs → config-types-DopEiXtk.mjs} +2 -2
- package/dist/{config-types-ComQZUlA.mjs.map → config-types-DopEiXtk.mjs.map} +1 -1
- package/dist/{contract-builder-fQ3gkIR5.mjs → contract-builder-C1X8KoEM.mjs} +3 -3
- package/dist/{contract-builder-fQ3gkIR5.mjs.map → contract-builder-C1X8KoEM.mjs.map} +1 -1
- package/dist/contract-prisma7__provider.d.mts +3 -3
- package/dist/contract-prisma7__provider.d.mts.map +1 -1
- package/dist/contract-prisma7__provider.mjs +19 -47
- package/dist/contract-prisma7__provider.mjs.map +1 -1
- package/dist/contract-psl.mjs +1 -1
- package/dist/contract-psl__attribute-specs.mjs +1 -1
- package/dist/contract-psl__provider.mjs +2 -2
- package/dist/contract-psl__provider.mjs.map +1 -1
- package/dist/contract-ts.mjs +3 -3
- package/dist/contract-ts__config-types.mjs +1 -1
- package/dist/contract-ts__contract-builder.mjs +2 -2
- package/dist/contract.d.mts +2 -2
- package/dist/contract.mjs +3 -3
- package/dist/contract__data-type.d.mts +1 -1
- package/dist/contract__foreign-key-materialization.d.mts +1 -1
- package/dist/contract__foreign-key-materialization.mjs +2 -2
- package/dist/contract__validators.mjs +1 -1
- package/dist/{control-mpACqp72.d.mts → control-BqS5MMDh.d.mts} +21 -12
- package/dist/control-BqS5MMDh.d.mts.map +1 -0
- package/dist/{control-ClahTAD-.mjs → control-C7MNvu5Q.mjs} +27 -13
- package/dist/control-C7MNvu5Q.mjs.map +1 -0
- package/dist/{control-adapter-BCopdpsT-DIHCWbq_.d.mts → control-adapter-BCopdpsT-Bou0wWLF.d.mts} +3 -3
- package/dist/{control-adapter-BCopdpsT-DIHCWbq_.d.mts.map → control-adapter-BCopdpsT-Bou0wWLF.d.mts.map} +1 -1
- package/dist/control-adapter-CUwBiImd.d.mts +1 -0
- package/dist/{data-type-B8N33s-_.d.mts → data-type-DuzmTpzK.d.mts} +3 -3
- package/dist/{data-type-B8N33s-_.d.mts.map → data-type-DuzmTpzK.d.mts.map} +1 -1
- package/dist/{derived-checks-CrvMQTJF-DlxFFtNM.mjs → derived-checks-sRZp_gTF-UGwFWkVX.mjs} +7 -20
- package/dist/derived-checks-sRZp_gTF-UGwFWkVX.mjs.map +1 -0
- package/dist/{diff-Bd9ILpZL.d.mts → diff-D6PbCUWL.d.mts} +5 -5
- package/dist/{diff-Bd9ILpZL.d.mts.map → diff-D6PbCUWL.d.mts.map} +1 -1
- package/dist/exports-DVsHk8HP-DrH_2a-H.mjs +2371 -0
- package/dist/exports-DVsHk8HP-DrH_2a-H.mjs.map +1 -0
- package/dist/family.d.mts +10 -10
- package/dist/family.mjs +6 -6
- package/dist/family__control-adapter.d.mts +2 -2
- package/dist/family__control.d.mts +3 -3
- package/dist/family__control.mjs +2 -2
- package/dist/family__diff.d.mts +1 -1
- package/dist/family__ir.mjs +1 -1
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__pack.mjs +2 -2
- package/dist/family__psl-build.d.mts +2 -2
- package/dist/family__psl-build.mjs +2 -2
- package/dist/family__psl-infer.d.mts +1 -1
- package/dist/family__psl-infer.mjs +1 -1
- package/dist/{foreign-key-materialization-DfNPQL9G.mjs → foreign-key-materialization-BIvQTfz8.mjs} +2 -2
- package/dist/{foreign-key-materialization-DfNPQL9G.mjs.map → foreign-key-materialization-BIvQTfz8.mjs.map} +1 -1
- package/dist/{foreign-key-materialization-DCaDnUs-.d.mts → foreign-key-materialization-BiWTp2vi.d.mts} +3 -3
- package/dist/{foreign-key-materialization-DCaDnUs-.d.mts.map → foreign-key-materialization-BiWTp2vi.d.mts.map} +1 -1
- package/dist/{index-DWNoqFzr.d.mts → index-BxlXOVeT.d.mts} +14 -7
- package/dist/{index-DWNoqFzr.d.mts.map → index-BxlXOVeT.d.mts.map} +1 -1
- package/dist/{index-equivalence-DswCiq5l-BsphajRC.mjs → index-equivalence-DswCiq5l-Cp2V5nhL.mjs} +2 -2
- package/dist/{index-equivalence-DswCiq5l-BsphajRC.mjs.map → index-equivalence-DswCiq5l-Cp2V5nhL.mjs.map} +1 -1
- package/dist/{interpreter-CFj2aTEP-BHL3TOqk.mjs → interpreter-B9wNACvu-CjrIm-Jo.mjs} +5 -5
- package/dist/{interpreter-CFj2aTEP-BHL3TOqk.mjs.map → interpreter-B9wNACvu-CjrIm-Jo.mjs.map} +1 -1
- package/dist/{migration-lg_VgP_F.d.mts → migration-CJ0xK_7n.d.mts} +2 -2
- package/dist/{migration-lg_VgP_F.d.mts.map → migration-CJ0xK_7n.d.mts.map} +1 -1
- package/dist/orm-client.d.mts +12 -44
- package/dist/orm-client.d.mts.map +1 -1
- package/dist/orm-client.mjs +505 -187
- package/dist/orm-client.mjs.map +1 -1
- package/dist/psl-build-ClY62mZM.d.mts +157 -0
- package/dist/psl-build-ClY62mZM.d.mts.map +1 -0
- package/dist/{psl-build-BsJ6eChh.mjs → psl-build-pU0gKdVI.mjs} +146 -7
- package/dist/psl-build-pU0gKdVI.mjs.map +1 -0
- package/dist/{psl-field-resolution-o9sXqIlE-BJnlxQ4z.mjs → psl-field-resolution-BOJPyV5I-0zJJ0fOo.mjs} +20 -14
- package/dist/{psl-field-resolution-o9sXqIlE-BJnlxQ4z.mjs.map → psl-field-resolution-BOJPyV5I-0zJJ0fOo.mjs.map} +1 -1
- package/dist/{psl-infer-B6iemK9i.d.mts → psl-infer-1C9FqGO2.d.mts} +3 -3
- package/dist/{psl-infer-B6iemK9i.d.mts.map → psl-infer-1C9FqGO2.d.mts.map} +1 -1
- package/dist/{psl-infer-HPi_YMeE.mjs → psl-infer-CvUWefHM.mjs} +2 -2
- package/dist/{psl-infer-HPi_YMeE.mjs.map → psl-infer-CvUWefHM.mjs.map} +1 -1
- package/dist/runtime.d.mts +2 -2
- package/dist/runtime.mjs +1 -2289
- package/dist/{schema-differ-DmP74bB8-BGA6fzOv.d.mts → schema-differ-DmP74bB8-GfOUaGGy.d.mts} +3 -3
- package/dist/{schema-differ-DmP74bB8-BGA6fzOv.d.mts.map → schema-differ-DmP74bB8-GfOUaGGy.d.mts.map} +1 -1
- package/dist/schema-ir.d.mts +2 -2
- package/dist/schema-ir.mjs +1 -1
- package/dist/schema-ir__types.d.mts +3 -3
- package/dist/schema-ir__types.mjs +1 -1
- package/dist/{sql-contract-serializer-sMY3prTx-C8IEwSsf.mjs → sql-contract-serializer-sMY3prTx-BKQ4Yh-n.mjs} +2 -2
- package/dist/{sql-contract-serializer-sMY3prTx-C8IEwSsf.mjs.map → sql-contract-serializer-sMY3prTx-BKQ4Yh-n.mjs.map} +1 -1
- package/dist/{types-c1iIhJep-DdMj6TNl.d.mts → types-Bqe0AXuw-xqQnkIj4.d.mts} +25 -6
- package/dist/types-Bqe0AXuw-xqQnkIj4.d.mts.map +1 -0
- package/dist/types-CTdsm45r.d.mts +1 -0
- package/dist/{types-CaVn_xxe-D9WdU3Iy.mjs → types-CfPB-Kz_-ByWDfwMj.mjs} +31 -6
- package/dist/types-CfPB-Kz_-ByWDfwMj.mjs.map +1 -0
- package/dist/{types-DaYtBAYT-B22gkh5z.d.mts → types-DaYtBAYT-DbsbDMTk.d.mts} +4 -4
- package/dist/{types-DaYtBAYT-B22gkh5z.d.mts.map → types-DaYtBAYT-DbsbDMTk.d.mts.map} +1 -1
- package/dist/{validators-Bvfk0aN7.mjs → validators-V8vN9R85.mjs} +2 -2
- package/dist/{validators-Bvfk0aN7.mjs.map → validators-V8vN9R85.mjs.map} +1 -1
- package/package.json +18 -18
- package/dist/control-ClahTAD-.mjs.map +0 -1
- package/dist/control-adapter-BsSf5pqM.d.mts +0 -1
- package/dist/control-mpACqp72.d.mts.map +0 -1
- package/dist/derived-checks-CrvMQTJF-DlxFFtNM.mjs.map +0 -1
- package/dist/psl-build-BHQfP1_C.d.mts +0 -73
- package/dist/psl-build-BHQfP1_C.d.mts.map +0 -1
- package/dist/psl-build-BsJ6eChh.mjs.map +0 -1
- package/dist/runtime.mjs.map +0 -1
- package/dist/types-BLyhYk6B.d.mts +0 -1
- package/dist/types-CaVn_xxe-D9WdU3Iy.mjs.map +0 -1
- package/dist/types-c1iIhJep-DdMj6TNl.d.mts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { a as SqlNamespaceBase, c as SqlNamespaceInput } from "./sql-storage-tZhB8nS5-8NSWT0TW.mjs";
|
|
2
2
|
import "./types-DMfBh16_.mjs";
|
|
3
|
-
import { ControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
3
|
+
import { ControlPolicy, ExecutionMutationDefaultValue } from "@prisma/orm-framework/contract/types";
|
|
4
4
|
import { TargetPackRef } from "@prisma/orm-framework/components/components";
|
|
5
5
|
import { ContractConfig } from "@prisma/orm-framework/config/config-types";
|
|
6
6
|
//#region ../../../2-sql/2-authoring/contract-prisma7/dist/provider.d.mts
|
|
@@ -79,8 +79,8 @@ interface Prisma7TargetBinding {
|
|
|
79
79
|
* reads as it will after the database is inferred.
|
|
80
80
|
*/
|
|
81
81
|
readonly junctionRelationFieldNames: (tableA: string, tableB: string) => readonly [string, string];
|
|
82
|
-
/** The "now" generator `@updatedAt` lowers to for a column
|
|
83
|
-
readonly
|
|
82
|
+
/** The "now" generator `@updatedAt` lowers to for a column of this type, with its params; `undefined` when the target has none. */
|
|
83
|
+
readonly updatedAtGenerator: (column: Pick<Prisma7ColumnType, 'codecId' | 'typeParams'>) => ExecutionMutationDefaultValue | undefined;
|
|
84
84
|
/** How a literal `@default` on the column is read; `undefined` when the codec takes the written value. */
|
|
85
85
|
readonly literalDefaultForm: (column: Prisma7ColumnType) => Prisma7LiteralDefaultForm | undefined;
|
|
86
86
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contract-prisma7__provider.d.mts","names":[],"sources":["../../../../2-sql/2-authoring/contract-prisma7/dist/provider.d.mts"],"mappings":";;;;;;;;;;;;UAUU;WACC;WACA;;UAED;;WAEC,SAAS,SAAS,eAAe;;;;;WAKjC,aAAa,SAAS,eAAe;;;;UAItC;WACC;;WAEA;WACA,aAAa,SAAS;;;KAG5B;;;WAGM;;;;WAIA;WACA;;WAEA,OAAO;;WAEP,mBAAmB,iBAAiB;;;UAGrC;WACC;WACA;;;UAGD;WACC,QAAQ;WACR,kBAAkB,OAAO,sBAAsB;;WAE/C;;WAEA,SAAS;;WAET;aACE;aACA;;;WAGF,YAAY,SAAS;;WAErB;;WAEA;aACE,aAAa;aACb,aAAa,mBAAmB;;;;;;;WAOlC,6BAA6B,gBAAgB;;WAE7C,
|
|
1
|
+
{"version":3,"file":"contract-prisma7__provider.d.mts","names":[],"sources":["../../../../2-sql/2-authoring/contract-prisma7/dist/provider.d.mts"],"mappings":";;;;;;;;;;;;UAUU;WACC;WACA;;UAED;;WAEC,SAAS,SAAS,eAAe;;;;;WAKjC,aAAa,SAAS,eAAe;;;;UAItC;WACC;;WAEA;WACA,aAAa,SAAS;;;KAG5B;;;WAGM;;;;WAIA;WACA;;WAEA,OAAO;;WAEP,mBAAmB,iBAAiB;;;UAGrC;WACC;WACA;;;UAGD;WACC,QAAQ;WACR,kBAAkB,OAAO,sBAAsB;;WAE/C;;WAEA,SAAS;;WAET;aACE;aACA;;;WAGF,YAAY,SAAS;;WAErB;;WAEA;aACE,aAAa;aACb,aAAa,mBAAmB;;;;;;;WAOlC,6BAA6B,gBAAgB;;WAE7C,qBAAqB,QAAQ,KAAK,iDAAiD;;WAEnF,qBAAqB,QAAQ,sBAAsB;;;;UAIpD;WACC,SAAS;WACT;WACA,uBAAuB;;iBAEjB,gBAAgB,oBAAoB,SAAS,yBAAyB"}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { r as lowerAuthoredIndex } from "./index-naming-BOcJT1B3-18gQUduD.mjs";
|
|
2
|
-
import { l as sqlDataTypeOfCodec
|
|
3
|
-
import { n as declaredBackingObjectName, r as declaredIndexesServeForeignKey } from "./foreign-key-materialization-
|
|
4
|
-
import { p as validateSqlStorageConsistency, u as validateModelStorageReferences } from "./validators-
|
|
2
|
+
import { l as sqlDataTypeOfCodec } from "./sql-data-type-Dabuwxet-BljsNjBu.mjs";
|
|
3
|
+
import { n as declaredBackingObjectName, r as declaredIndexesServeForeignKey } from "./foreign-key-materialization-BIvQTfz8.mjs";
|
|
4
|
+
import { p as validateSqlStorageConsistency, u as validateModelStorageReferences } from "./validators-V8vN9R85.mjs";
|
|
5
5
|
import { t as deriveValueSetFromEntity } from "./value-set-derivation-hook-Di9JZ0X7.mjs";
|
|
6
|
-
import { n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from "./derived-checks-
|
|
7
|
-
import { c as instantiateFieldTypeConstructor, h as readDataTypeDefault } from "./psl-field-resolution-
|
|
8
|
-
import { a as normalizeReferentialAction, n as buildEntityTypesByDiscriminator, r as indexFkRelations, t as applyBackrelationCandidates } from "./interpreter-
|
|
6
|
+
import { n as buildSqlContractFromDefinition, t as applySqlSpecifierControlPolicy } from "./derived-checks-sRZp_gTF-UGwFWkVX.mjs";
|
|
7
|
+
import { c as instantiateFieldTypeConstructor, h as readDataTypeDefault } from "./psl-field-resolution-BOJPyV5I-0zJJ0fOo.mjs";
|
|
8
|
+
import { a as normalizeReferentialAction, n as buildEntityTypesByDiscriminator, r as indexFkRelations, t as applyBackrelationCandidates } from "./interpreter-B9wNACvu-CjrIm-Jo.mjs";
|
|
9
9
|
import { isStructuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
10
10
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
11
11
|
import { entryForTag, getAuthoringTypeConstructor, instantiateAuthoringEntityType } from "@prisma/orm-framework/components/authoring";
|
|
@@ -161,21 +161,6 @@ function checkStatedConstraintNameLength(input) {
|
|
|
161
161
|
const spelling = `${attribute.node instanceof ModelAttributeAst ? "@@" : "@"}${attribute.name}`;
|
|
162
162
|
input.diagnostics.push(prisma7Diagnostic("PSL.PRISMA7_CONSTRAINT_NAME_TOO_LONG", `${input.owner}: the name "${name}" in the map argument of ${spelling} is ${bytes} bytes, longer than the ${maxBytes} bytes the database keeps. Shorten the map to ${maxBytes} bytes or fewer; Prisma 7 refuses this name too.`, input.sourceId, mapArgument.span));
|
|
163
163
|
}
|
|
164
|
-
const CLIENT_SIDE_GENERATORS = /* @__PURE__ */ new Set([
|
|
165
|
-
"uuid",
|
|
166
|
-
"cuid",
|
|
167
|
-
"ulid",
|
|
168
|
-
"nanoid"
|
|
169
|
-
]);
|
|
170
|
-
function givesColumnDefault(attribute) {
|
|
171
|
-
const expression = attribute?.args.find((arg) => arg.kind === "positional")?.expression;
|
|
172
|
-
if (expression === void 0) return false;
|
|
173
|
-
const call = FunctionCallAst.cast(expression.syntax);
|
|
174
|
-
if (call === void 0) return true;
|
|
175
|
-
const fn = call.path().join(".");
|
|
176
|
-
if (CLIENT_SIDE_GENERATORS.has(fn)) return false;
|
|
177
|
-
return fn !== "dbgenerated" || [...call.args()].length > 0;
|
|
178
|
-
}
|
|
179
164
|
/** Positional argument keys per Prisma 7 default function, matching the target registry's signatures. */
|
|
180
165
|
const FUNCTION_ARGUMENT_KEYS = {
|
|
181
166
|
uuid: ["version"],
|
|
@@ -1018,10 +1003,6 @@ function synthesizeJunction(requester, partner, naming, diagnostics) {
|
|
|
1018
1003
|
};
|
|
1019
1004
|
}
|
|
1020
1005
|
const SUMMARY = "Prisma 7 schema interpretation failed";
|
|
1021
|
-
function attributeText(attribute) {
|
|
1022
|
-
const args = attribute.args.map((arg) => arg.kind === "named" ? `${arg.name}: ${arg.value}` : arg.value);
|
|
1023
|
-
return args.length === 0 ? `@${attribute.name}` : `@${attribute.name}(${args.join(", ")})`;
|
|
1024
|
-
}
|
|
1025
1006
|
function stringArgument(attribute) {
|
|
1026
1007
|
const expression = (attribute.args.find((arg) => arg.kind === "positional") ?? attribute.args.find((arg) => arg.name === "name"))?.expression;
|
|
1027
1008
|
if (expression === void 0) return void 0;
|
|
@@ -1633,6 +1614,14 @@ function readField(args) {
|
|
|
1633
1614
|
});
|
|
1634
1615
|
return;
|
|
1635
1616
|
}
|
|
1617
|
+
if (updatedAt !== void 0 && field.typeName !== "DateTime") {
|
|
1618
|
+
diagnostics.push(prisma7Diagnostic("PSL.PRISMA7_UPDATED_AT_FIELD_INVALID", `${label} has type "${field.typeName}", but @updatedAt is only allowed on a DateTime field. Prisma 7 refuses this schema too: "Fields that are marked with @updatedAt must be of type DateTime." Remove @updatedAt, or change the field's type to DateTime.`, sourceId, updatedAt.span));
|
|
1619
|
+
return;
|
|
1620
|
+
}
|
|
1621
|
+
if (updatedAt !== void 0 && field.list) {
|
|
1622
|
+
diagnostics.push(prisma7Diagnostic("PSL.PRISMA7_UPDATED_AT_FIELD_INVALID", `${label} is a list, but @updatedAt is not allowed on a list field. Prisma 7 refuses this schema too: "Fields that are marked with @updatedAt cannot be lists." Remove @updatedAt, or make the field a single DateTime.`, sourceId, updatedAt.span));
|
|
1623
|
+
return;
|
|
1624
|
+
}
|
|
1636
1625
|
const enumDeclaration = args.enums.get(field.typeName);
|
|
1637
1626
|
let call;
|
|
1638
1627
|
if (enumDeclaration !== void 0) {
|
|
@@ -1698,16 +1687,10 @@ function readField(args) {
|
|
|
1698
1687
|
codecLookup: input.codecLookup,
|
|
1699
1688
|
dataTypeLookup: input.dataTypes.lookup
|
|
1700
1689
|
};
|
|
1701
|
-
const
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
diagnostics.push(prisma7Diagnostic("PSL.PRISMA7_UPDATED_AT_TYPE_UNSUPPORTED", `${label}: @updatedAt is not supported on this column, because Prisma 8 has no generator for column type "${columnTypeName}" yet. Remove @updatedAt: Prisma 7's next migration is empty${withoutUpdatedAt}`, sourceId, updatedAt.span));
|
|
1706
|
-
return;
|
|
1707
|
-
}
|
|
1708
|
-
if (updatedAt !== void 0 && !ignored && defaultAttribute !== void 0) {
|
|
1709
|
-
const written = attributeText(defaultAttribute);
|
|
1710
|
-
diagnostics.push(prisma7Diagnostic("PSL.PRISMA7_UPDATED_AT_WITH_DEFAULT_UNSUPPORTED", `${label} combines @updatedAt with ${written}, which Prisma 8 cannot express yet. Remove ${written}: @updatedAt still sets the value on create and on update, and Prisma 7's next migration removes the column default.`, sourceId, defaultAttribute.span));
|
|
1690
|
+
const updatedAtGenerator = updatedAt === void 0 || ignored ? void 0 : binding.updatedAtGenerator(resolved.descriptor);
|
|
1691
|
+
if (updatedAt !== void 0 && !ignored && updatedAtGenerator === void 0) {
|
|
1692
|
+
if (nativeType === void 0) throw new InternalError(`The Prisma 7 target binding has no "now" generator for codec "${resolved.descriptor.codecId}", which the DateTime scalar maps to.`);
|
|
1693
|
+
diagnostics.push(prisma7Diagnostic("PSL.PRISMA7_UPDATED_AT_FIELD_INVALID", `${label} has @updatedAt, but "@db.${nativeType.name}" makes it a column that is not a date or time, so @updatedAt cannot set it. Prisma 7 refuses this schema too: "Native type ${nativeType.name} is not compatible with declared field type DateTime". Remove @updatedAt, or use a date or time native type such as @db.Timestamp.`, sourceId, nativeType.attribute.span));
|
|
1711
1694
|
return;
|
|
1712
1695
|
}
|
|
1713
1696
|
const lowered = defaultAttribute === void 0 ? void 0 : lowerPrisma7Default({
|
|
@@ -1741,21 +1724,10 @@ function readField(args) {
|
|
|
1741
1724
|
build.ignoredColumns.set(field.name, column);
|
|
1742
1725
|
return;
|
|
1743
1726
|
}
|
|
1744
|
-
const updatedAtGenerator = updatedAtGeneratorId === void 0 ? void 0 : {
|
|
1745
|
-
kind: "generator",
|
|
1746
|
-
id: updatedAtGeneratorId
|
|
1747
|
-
};
|
|
1748
|
-
const generator = updatedAtGenerator ?? lowered?.onCreate;
|
|
1749
|
-
const generatingAttribute = updatedAt ?? defaultAttribute;
|
|
1750
|
-
if (generator !== void 0 && generatingAttribute !== void 0 && field.optional) {
|
|
1751
|
-
const written = attributeText(generatingAttribute);
|
|
1752
|
-
diagnostics.push(prisma7Diagnostic("PSL.PRISMA7_OPTIONAL_GENERATED_FIELD_UNSUPPORTED", `${label} is optional and its value comes from ${written}, which Prisma 8 cannot express on an optional field yet. Remove ${written} and keep the "?": the database does not change, and both clients then stop filling the value.`, sourceId, generatingAttribute.span));
|
|
1753
|
-
return;
|
|
1754
|
-
}
|
|
1755
1727
|
const executionDefaults = updatedAtGenerator !== void 0 ? {
|
|
1756
1728
|
onCreate: updatedAtGenerator,
|
|
1757
1729
|
onUpdate: updatedAtGenerator
|
|
1758
|
-
} :
|
|
1730
|
+
} : lowered?.onCreate !== void 0 ? { onCreate: lowered.onCreate } : void 0;
|
|
1759
1731
|
build.columns.set(field.name, {
|
|
1760
1732
|
fieldName: field.name,
|
|
1761
1733
|
...column,
|