@prisma/orm-target-postgres 8.0.0-rc.21-dev.5 → 8.0.0-rc.21-dev.6
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/{adapter-BIWKN0d7-HfXFH4vy.mjs → adapter-BIWKN0d7-B2BpKdVy.mjs} +3 -3
- package/dist/{adapter-BIWKN0d7-HfXFH4vy.mjs.map → adapter-BIWKN0d7-B2BpKdVy.mjs.map} +1 -1
- package/dist/{adapter-BNZo-LwN.d.mts → adapter-CGBZvb_8.d.mts} +3 -3
- package/dist/{adapter-BNZo-LwN.d.mts.map → adapter-CGBZvb_8.d.mts.map} +1 -1
- package/dist/adapter.d.mts +7 -7
- package/dist/adapter.mjs +3 -3
- package/dist/adapter__adapter.d.mts +1 -1
- package/dist/adapter__adapter.mjs +2 -2
- package/dist/adapter__control.d.mts +2 -2
- package/dist/adapter__control.mjs +3 -3
- package/dist/adapter__runtime.d.mts +1 -1
- package/dist/adapter__runtime.mjs +4 -4
- package/dist/adapter__sql-renderer.d.mts +1 -1
- package/dist/adapter__types.d.mts +3 -3
- package/dist/{authoring-BYl9graG-BTI-XfEW.mjs → authoring-DOlbnTzz-BWXtiq9i.mjs} +3 -3
- package/dist/{authoring-BYl9graG-BTI-XfEW.mjs.map → authoring-DOlbnTzz-BWXtiq9i.mjs.map} +1 -1
- package/dist/check-expressions-BLd3bGf1-CwtBWbN3.d.mts +21 -0
- package/dist/check-expressions-BLd3bGf1-CwtBWbN3.d.mts.map +1 -0
- package/dist/check-expressions-CCFJKC7N-DHEJIG2S.mjs +118 -0
- package/dist/check-expressions-CCFJKC7N-DHEJIG2S.mjs.map +1 -0
- package/dist/{codec-descriptor-DoR-cTFZ-BlG5Gj-X.mjs → codec-descriptor-DBeD0UlS-BfvrE-KZ.mjs} +6 -3
- package/dist/codec-descriptor-DBeD0UlS-BfvrE-KZ.mjs.map +1 -0
- package/dist/codec-descriptor-Dp3lP7Rc.d.mts +1 -0
- package/dist/{codec-descriptor-d1ByNBEk-DhrtS_5y.d.mts → codec-descriptor-nXA2rkO1-DyArG-p2.d.mts} +12 -4
- package/dist/codec-descriptor-nXA2rkO1-DyArG-p2.d.mts.map +1 -0
- package/dist/{codec-registry-D8Nsfksc-B5zXDblI.mjs → codec-registry-qdVGkdp_-DCI2nWSt.mjs} +4 -4
- package/dist/{codec-registry-D8Nsfksc-B5zXDblI.mjs.map → codec-registry-qdVGkdp_-DCI2nWSt.mjs.map} +1 -1
- package/dist/{codec-type-map-CIZ7LbPA-CeMPxEAm.d.mts → codec-type-map-DSuWVp-n-Cp4c9JWN.d.mts} +4 -4
- package/dist/{codec-type-map-CIZ7LbPA-CeMPxEAm.d.mts.map → codec-type-map-DSuWVp-n-Cp4c9JWN.d.mts.map} +1 -1
- package/dist/codec-types-BioRVnRb.d.mts +2 -0
- package/dist/{codec-types-C7E42vTO-CGX0m6Mb.d.mts → codec-types-xBRj9sIm-atN8rfl1.d.mts} +4 -4
- package/dist/{codec-types-C7E42vTO-CGX0m6Mb.d.mts.map → codec-types-xBRj9sIm-atN8rfl1.d.mts.map} +1 -1
- package/dist/{codecs-BVyoUeNy-DZw_7n3P.mjs → codecs-BcYLh1iB-Dxi2UgkJ.mjs} +41 -3
- package/dist/codecs-BcYLh1iB-Dxi2UgkJ.mjs.map +1 -0
- package/dist/{codecs-DulR4oG1.d.mts → codecs-DCtBjmAW.d.mts} +3 -3
- package/dist/{codecs-DulR4oG1.d.mts.map → codecs-DCtBjmAW.d.mts.map} +1 -1
- package/dist/{codecs-BJBFipkV-CVMp939Z.d.mts → codecs-qCAX5T6T-sg3NIKfN.d.mts} +40 -3
- package/dist/codecs-qCAX5T6T-sg3NIKfN.d.mts.map +1 -0
- package/dist/{contract-contributions-DTGGTwRZ-DUokY6NT.mjs → contract-contributions-DTGGTwRZ-BmYIo6M5.mjs} +3 -3
- package/dist/{contract-contributions-DTGGTwRZ-DUokY6NT.mjs.map → contract-contributions-DTGGTwRZ-BmYIo6M5.mjs.map} +1 -1
- package/dist/{control-nSGzcTXc.d.mts → control-CCetIiFG.d.mts} +3 -3
- package/dist/{control-nSGzcTXc.d.mts.map → control-CCetIiFG.d.mts.map} +1 -1
- package/dist/{control-policy-D9yEV-XI-CCDB2v5g.mjs → control-policy-B1Zvw6VN-DN4QDwpc.mjs} +3 -3
- package/dist/{control-policy-D9yEV-XI-CCDB2v5g.mjs.map → control-policy-B1Zvw6VN-DN4QDwpc.mjs.map} +1 -1
- package/dist/{date-time-now-generators-DsGxTwjo-DTb5oTHX.mjs → date-time-now-generators-BrJ1cMzo-CxURsw2O.mjs} +3 -3
- package/dist/{date-time-now-generators-DsGxTwjo-DTb5oTHX.mjs.map → date-time-now-generators-BrJ1cMzo-CxURsw2O.mjs.map} +1 -1
- package/dist/{descriptor-meta-RxUflZY0-BNMenVO8.mjs → descriptor-meta-CGRsMMdO-tQxNSE_j.mjs} +6 -6
- package/dist/{descriptor-meta-RxUflZY0-BNMenVO8.mjs.map → descriptor-meta-CGRsMMdO-tQxNSE_j.mjs.map} +1 -1
- package/dist/{descriptor-meta-I7Ih-0hE-BzEpKpQF.mjs → descriptor-meta-I7Ih-0hE-CrOjEir4.mjs} +3 -3
- package/dist/{descriptor-meta-I7Ih-0hE-BzEpKpQF.mjs.map → descriptor-meta-I7Ih-0hE-CrOjEir4.mjs.map} +1 -1
- package/dist/{diff-database-schema-j18Gm75j-CNAELOTU.mjs → diff-database-schema-ASDRsuei-3Yro3-Tw.mjs} +3 -3
- package/dist/{diff-database-schema-j18Gm75j-CNAELOTU.mjs.map → diff-database-schema-ASDRsuei-3Yro3-Tw.mjs.map} +1 -1
- package/dist/{full-text-collection-method-DHuJr46z-Bndk11cK.d.mts → full-text-collection-method-DvmPrdZL-B1FlBM0E.d.mts} +4 -4
- package/dist/full-text-collection-method-DvmPrdZL-B1FlBM0E.d.mts.map +1 -0
- package/dist/{full-text-xZIrFi7x.d.mts → full-text-k_9J-JPd.d.mts} +3 -3
- package/dist/{full-text-xZIrFi7x.d.mts.map → full-text-k_9J-JPd.d.mts.map} +1 -1
- package/dist/{infer-psl-contract-DnTNOWZT-BwBxvl_y.mjs → infer-psl-contract-BZnLgJj6-EjqMFHxE.mjs} +11 -9
- package/dist/infer-psl-contract-BZnLgJj6-EjqMFHxE.mjs.map +1 -0
- package/dist/migration-Be_iuIpn.mjs.map +1 -1
- package/dist/{op-factory-call-DI5rMe0F-Cvj8LzGR.mjs → op-factory-call-CUu2s6l7-CaAVzTwP.mjs} +7 -4
- package/dist/op-factory-call-CUu2s6l7-CaAVzTwP.mjs.map +1 -0
- package/dist/operation-types-ByVoHU_s.d.mts +1 -0
- package/dist/{operation-types-BlaAPrew-BkZiJwPy.d.mts → operation-types-DfWYI0Cn-fXs3p9mN.d.mts} +3 -3
- package/dist/{operation-types-BlaAPrew-BkZiJwPy.d.mts.map → operation-types-DfWYI0Cn-fXs3p9mN.d.mts.map} +1 -1
- package/dist/{pack-BSTwDeu2.d.mts → pack-DKR4BRIY.d.mts} +5 -5
- package/dist/{pack-BSTwDeu2.d.mts.map → pack-DKR4BRIY.d.mts.map} +1 -1
- package/dist/{planner-Bhde2uHk-CSZF9ODS.mjs → planner-C69ALB15-CasiGSdJ.mjs} +7 -7
- package/dist/{planner-Bhde2uHk-CSZF9ODS.mjs.map → planner-C69ALB15-CasiGSdJ.mjs.map} +1 -1
- package/dist/{planner-produced-postgres-migration-CT7o4vF9-DHyGaSfZ.mjs → planner-produced-postgres-migration-BGo--l2b-ww24WTkY.mjs} +4 -4
- package/dist/{planner-produced-postgres-migration-CT7o4vF9-DHyGaSfZ.mjs.map → planner-produced-postgres-migration-BGo--l2b-ww24WTkY.mjs.map} +1 -1
- package/dist/{postgres-codec-traits-BfhOLlQK-BqSX5cGp.mjs → postgres-codec-traits-Cpq3LqzZ-D_WitJjX.mjs} +3 -3
- package/dist/{postgres-codec-traits-BfhOLlQK-BqSX5cGp.mjs.map → postgres-codec-traits-Cpq3LqzZ-D_WitJjX.mjs.map} +1 -1
- package/dist/{postgres-contract-view-d_EYkS83-Busf8EFd.mjs → postgres-contract-view-CvoOn_Xj-Dr0DQlVT.mjs} +5 -5
- package/dist/{postgres-contract-view-d_EYkS83-Busf8EFd.mjs.map → postgres-contract-view-CvoOn_Xj-Dr0DQlVT.mjs.map} +1 -1
- package/dist/{postgres-migration-CRKs0heQ-BE95T3ql.mjs → postgres-migration-69O9MUBt-BQ1_mj4S.mjs} +6 -6
- package/dist/{postgres-migration-CRKs0heQ-BE95T3ql.mjs.map → postgres-migration-69O9MUBt-BQ1_mj4S.mjs.map} +1 -1
- package/dist/{prisma7-binding-BwJtshLc.mjs → prisma7-binding-CcrXBBbM.mjs} +5 -5
- package/dist/{prisma7-binding-BwJtshLc.mjs.map → prisma7-binding-CcrXBBbM.mjs.map} +1 -1
- package/dist/{prisma7-binding-CQXZgPCd.d.mts → prisma7-binding-DFb9yHdO.d.mts} +5 -5
- package/dist/{prisma7-binding-CQXZgPCd.d.mts.map → prisma7-binding-DFb9yHdO.d.mts.map} +1 -1
- package/dist/{render-ops-CSWpAFQI-CqyjJlzM.mjs → render-ops-Dr6RDk6z-CSGJsR6N.mjs} +3 -3
- package/dist/{render-ops-CSWpAFQI-CqyjJlzM.mjs.map → render-ops-Dr6RDk6z-CSGJsR6N.mjs.map} +1 -1
- package/dist/{runtime-BjS3N8LM.d.mts → runtime-DGgnFCG7.d.mts} +2 -2
- package/dist/{runtime-BjS3N8LM.d.mts.map → runtime-DGgnFCG7.d.mts.map} +1 -1
- package/dist/{runtime-DtjW0GP_.d.mts → runtime-R_BCXCp_.d.mts} +2 -2
- package/dist/{runtime-DtjW0GP_.d.mts.map → runtime-R_BCXCp_.d.mts.map} +1 -1
- package/dist/{sql-renderer-BiBhge7D.d.mts → sql-renderer-BnO2fkSf.d.mts} +4 -4
- package/dist/{sql-renderer-BiBhge7D.d.mts.map → sql-renderer-BnO2fkSf.d.mts.map} +1 -1
- package/dist/target.d.mts +16 -16
- package/dist/target.mjs +16 -16
- package/dist/target__codec-descriptor.d.mts +2 -2
- package/dist/target__codec-descriptor.mjs +1 -1
- package/dist/target__codec-types.d.mts +3 -3
- package/dist/target__codecs.d.mts +2 -2
- package/dist/target__codecs.mjs +2 -2
- package/dist/target__control.mjs +141 -34
- package/dist/target__control.mjs.map +1 -1
- package/dist/target__diff-database-schema.mjs +1 -1
- package/dist/target__full-text-index-authoring.mjs +1 -1
- package/dist/target__full-text.d.mts +3 -3
- package/dist/target__issue-planner.mjs +1 -1
- package/dist/target__migration.mjs +2 -2
- package/dist/target__op-factory-call.mjs +1 -1
- package/dist/target__operation-types.d.mts +2 -2
- package/dist/target__pack.d.mts +2 -2
- package/dist/target__pack.mjs +1 -1
- package/dist/target__planner-produced-postgres-migration.mjs +1 -1
- package/dist/target__planner.mjs +2 -2
- package/dist/target__prisma7-binding.d.mts +1 -1
- package/dist/target__prisma7-binding.mjs +1 -1
- package/dist/target__render-ops.mjs +1 -1
- package/dist/target__runtime.d.mts +2 -2
- package/dist/target__runtime.mjs +3 -3
- package/dist/target__runtime.mjs.map +1 -1
- package/dist/target__types.d.mts +3 -3
- package/dist/target__types.mjs +1 -1
- package/dist/types-CuFeRfUn.d.mts +2 -0
- package/dist/{types-DOmgp_12.d.mts → types-D-U10Lyo.d.mts} +2 -2
- package/dist/{types-DOmgp_12.d.mts.map → types-D-U10Lyo.d.mts.map} +1 -1
- package/dist/{types-D6lgKhE5-D1J9YJnd.d.mts → types-D6lgKhE5-BrgAgVCq.d.mts} +4 -4
- package/dist/{types-D6lgKhE5-D1J9YJnd.d.mts.map → types-D6lgKhE5-BrgAgVCq.d.mts.map} +1 -1
- package/package.json +9 -9
- package/dist/check-expressions-BPrbjEKM-CEIP4jTS.mjs +0 -48
- package/dist/check-expressions-BPrbjEKM-CEIP4jTS.mjs.map +0 -1
- package/dist/check-expressions-CtTzM58x-LloO-5Vf.d.mts +0 -55
- package/dist/check-expressions-CtTzM58x-LloO-5Vf.d.mts.map +0 -1
- package/dist/codec-descriptor-DoR-cTFZ-BlG5Gj-X.mjs.map +0 -1
- package/dist/codec-descriptor-Fb3UoQGb.d.mts +0 -1
- package/dist/codec-descriptor-d1ByNBEk-DhrtS_5y.d.mts.map +0 -1
- package/dist/codec-types-CiEHACsD.d.mts +0 -2
- package/dist/codecs-BJBFipkV-CVMp939Z.d.mts.map +0 -1
- package/dist/codecs-BVyoUeNy-DZw_7n3P.mjs.map +0 -1
- package/dist/full-text-collection-method-DHuJr46z-Bndk11cK.d.mts.map +0 -1
- package/dist/infer-psl-contract-DnTNOWZT-BwBxvl_y.mjs.map +0 -1
- package/dist/op-factory-call-DI5rMe0F-Cvj8LzGR.mjs.map +0 -1
- package/dist/operation-types-Bz8xX2oY.d.mts +0 -1
- package/dist/types-BZ2l9Q5i.d.mts +0 -2
package/dist/target__control.mjs
CHANGED
|
@@ -3,24 +3,24 @@ import { l as postgresError } from "./errors-Di_apgWJ-BLXRTfFj.mjs";
|
|
|
3
3
|
import { i as quoteIdentifier } from "./sql-utils-0j_6QstU-DAfnt5Mu.mjs";
|
|
4
4
|
import { t as DEFAULT_NAMESPACE_ID } from "./namespace-ids-xtp_ZY86-Cxc0dBbO.mjs";
|
|
5
5
|
import { t as PostgresNativeEnum } from "./postgres-native-enum-CdP3b_-R-DgG3pi5p.mjs";
|
|
6
|
-
import { H as setFallbackTemporal, c as decodePostgresListText, u as parsePostgresListText } from "./codecs-
|
|
6
|
+
import { H as setFallbackTemporal, c as decodePostgresListText, u as parsePostgresListText } from "./codecs-BcYLh1iB-Dxi2UgkJ.mjs";
|
|
7
7
|
import { s as fullTextIndexDefinitionOf } from "./full-text-index-definition-B0kQDs_M-8N6Slj3l.mjs";
|
|
8
8
|
import { i as PostgresRlsPolicy, n as PostgresRlsEnablement, o as PostgresRole } from "./postgres-schema-CNNW8eA3-CwosQz5e.mjs";
|
|
9
9
|
import { r as computeContentHash } from "./canonicalize-RdxoUHao-FTTkizfe.mjs";
|
|
10
|
-
import { c as postgresScalarAndNativeTypeConstructors, l as postgresScalarAuthoringTypes, s as postgresNativeAuthoringTypes, t as POLICY_BLOCK_KEYWORDS } from "./authoring-
|
|
11
|
-
import { t as postgresRenderCheckExpressions } from "./check-expressions-
|
|
12
|
-
import { u as postgresNowGeneratorControlDescriptors } from "./date-time-now-generators-
|
|
13
|
-
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-
|
|
10
|
+
import { c as postgresScalarAndNativeTypeConstructors, l as postgresScalarAuthoringTypes, s as postgresNativeAuthoringTypes, t as POLICY_BLOCK_KEYWORDS } from "./authoring-DOlbnTzz-BWXtiq9i.mjs";
|
|
11
|
+
import { t as postgresRenderCheckExpressions } from "./check-expressions-CCFJKC7N-DHEJIG2S.mjs";
|
|
12
|
+
import { u as postgresNowGeneratorControlDescriptors } from "./date-time-now-generators-BrJ1cMzo-CxURsw2O.mjs";
|
|
13
|
+
import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-CGRsMMdO-tQxNSE_j.mjs";
|
|
14
14
|
import { a as postgresDiffSubjectGranularity, i as postgresDiffSubjectEntityKind } from "./postgres-table-schema-node-BBkitBQh-Dll8iaZT.mjs";
|
|
15
15
|
import { t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-B8Z5i5D--BzOKm4N1.mjs";
|
|
16
16
|
import { i as qualifyTableName } from "./planner-sql-checks-Dhx-R5GJ-GyHfROia.mjs";
|
|
17
|
-
import {
|
|
18
|
-
import { r as diffPostgresSchema } from "./diff-database-schema-
|
|
19
|
-
import { t as PostgresContractSerializer } from "./postgres-contract-view-
|
|
20
|
-
import { o as postgresContractToSchema } from "./postgres-migration-
|
|
21
|
-
import { n as keepRowsEdit, t as createPostgresMigrationPlanner } from "./planner-
|
|
17
|
+
import { G as dropCheckConstraintId, Q as schemaObjectsSummary, R as SCHEMA_OBJECTS_SQL, X as schemaBlockingObjects, Z as schemaContentsOf } from "./op-factory-call-CUu2s6l7-CaAVzTwP.mjs";
|
|
18
|
+
import { r as diffPostgresSchema } from "./diff-database-schema-ASDRsuei-3Yro3-Tw.mjs";
|
|
19
|
+
import { t as PostgresContractSerializer } from "./postgres-contract-view-CvoOn_Xj-Dr0DQlVT.mjs";
|
|
20
|
+
import { o as postgresContractToSchema } from "./postgres-migration-69O9MUBt-BQ1_mj4S.mjs";
|
|
21
|
+
import { n as keepRowsEdit, t as createPostgresMigrationPlanner } from "./planner-C69ALB15-CasiGSdJ.mjs";
|
|
22
22
|
import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-DFc1Tfv5-BkBKBRE3.mjs";
|
|
23
|
-
import { a as buildIndexAttribute, c as buildNativeEnumBlock, d as inferPostgresPslContract, f as namedArg, g as positionalArg, h as parseDefaultAttributeString, i as buildFullTextIndexAttribute, n as buildAttribute, o as buildMapAttribute, r as buildCheckAttribute, s as buildModelConstraintAttribute, t as SYNTHETIC_SPAN } from "./infer-psl-contract-
|
|
23
|
+
import { a as buildIndexAttribute, c as buildNativeEnumBlock, d as inferPostgresPslContract, f as namedArg, g as positionalArg, h as parseDefaultAttributeString, i as buildFullTextIndexAttribute, n as buildAttribute, o as buildMapAttribute, r as buildCheckAttribute, s as buildModelConstraintAttribute, t as SYNTHETIC_SPAN } from "./infer-psl-contract-BZnLgJj6-EjqMFHxE.mjs";
|
|
24
24
|
import { dataTypeParams, requiredParamKeys, validateCodecTypeParams } from "@prisma/orm-framework/components/codec";
|
|
25
25
|
import { blindCast } from "@prisma/orm-framework/utils/casts";
|
|
26
26
|
import { InternalError } from "@prisma/orm-framework/utils/internal-error";
|
|
@@ -30,7 +30,7 @@ import { StorageColumn, nonEmptyTypeParams } from "@prisma/orm-family-sql/contra
|
|
|
30
30
|
import { ifDefined } from "@prisma/orm-framework/utils/defined";
|
|
31
31
|
import { APP_SPACE_ID, failedPostcheckWhy, failedPrecheckWhy, schemaCheckWhy, withDatabaseUnchanged, withFailingSpace } from "@prisma/orm-framework/components/control";
|
|
32
32
|
import { assertDefined, invariant } from "@prisma/orm-framework/utils/assertions";
|
|
33
|
-
import { composeCheckWirePrefix, computeCheckContentHash, computeIndexContentHash, formatWireName, parseNaming } from "@prisma/orm-family-sql/schema-ir/naming";
|
|
33
|
+
import { CHECK_KINDS, composeCheckWirePrefix, computeCheckContentHash, computeIndexContentHash, formatWireName, parseNaming, parseWireName } from "@prisma/orm-family-sql/schema-ir/naming";
|
|
34
34
|
import { authoringTypeConstructorArguments, findAuthoringTypeConstructorCall, getAuthoringTypeConstructor } from "@prisma/orm-framework/components/authoring";
|
|
35
35
|
import { NAME_THE_PSL_SOURCE_LOSES, isPslIdentifier } from "@prisma/orm-framework/psl-parser";
|
|
36
36
|
import { printSqlExpressionLiteral, sqlTextsReadBack } from "@prisma/orm-family-sql/contract/sql-expression";
|
|
@@ -43,6 +43,7 @@ import { UNBOUND_PSL_NAMESPACE_NAME, UNSPECIFIED_PSL_NAMESPACE_ID, makePslNamesp
|
|
|
43
43
|
import { escapePslString } from "@prisma/orm-family-sql/contract/data-type-support";
|
|
44
44
|
import { Temporal } from "temporal-polyfill/full/implementation";
|
|
45
45
|
import { SqlConnectionError, SqlQueryError } from "@prisma/orm-family-sql/errors";
|
|
46
|
+
import { discriminatorValueSet, resolveColumnValueObject } from "@prisma/orm-family-sql/contract/check-expressions";
|
|
46
47
|
import { canonicalizeJson } from "@prisma/orm-framework/components/utils";
|
|
47
48
|
import { pslFieldMapName, pslModelMapName } from "@prisma/orm-family-sql/contract-psl/map-names";
|
|
48
49
|
import { defaultForeignKeyIndex } from "@prisma/orm-family-sql/contract/foreign-key-materialization";
|
|
@@ -92,6 +93,45 @@ function dependentsSummary(details, label, dependents) {
|
|
|
92
93
|
return details.objectType === "table" && details.table === void 0 ? `Table "${details.schema}"."${details.name}" cannot be dropped while ${named} ${depend} on it.` : `${label} cannot run while ${named} ${depend} on what it changes.`;
|
|
93
94
|
}
|
|
94
95
|
/**
|
|
96
|
+
* The existing rows that the check `operation` adds refuses, when `constraint`, the check the
|
|
97
|
+
* database names in its `check_violation`, is that check and the contract declares it.
|
|
98
|
+
*/
|
|
99
|
+
function rowsFailingCheckOf(input) {
|
|
100
|
+
const details = input.operation.target.details;
|
|
101
|
+
const table = details?.table;
|
|
102
|
+
if (details?.objectType !== "checkConstraint" || table === void 0) return void 0;
|
|
103
|
+
if (input.constraint !== details.name) return void 0;
|
|
104
|
+
const declared = declaredCheck(input.storage, table, details.name);
|
|
105
|
+
if (declared === void 0) return void 0;
|
|
106
|
+
const { prefix, expression } = declared.check;
|
|
107
|
+
const column = prefix === void 0 ? void 0 : declared.columns.find((name) => CHECK_KINDS.some((kind) => composeCheckWirePrefix(table, name, kind) === prefix));
|
|
108
|
+
const replacedCheck = prefix === void 0 ? void 0 : input.operations.slice(0, input.operationIndex).reverse().map(({ id, target }) => target.details === void 0 ? void 0 : {
|
|
109
|
+
id,
|
|
110
|
+
...target.details
|
|
111
|
+
}).find((dropped) => dropped !== void 0 && dropped.id === dropCheckConstraintId(table, dropped.name) && parseWireName(dropped.name)?.prefix === prefix)?.name;
|
|
112
|
+
const query = `SELECT * FROM ${qualifyTableName(details.schema, table)} WHERE NOT (${expression})`;
|
|
113
|
+
const onColumn = column === void 0 ? "" : ` on column "${column}"`;
|
|
114
|
+
return {
|
|
115
|
+
summary: `Rows of table "${table}" fail check "${details.name}"${onColumn}, so the check cannot be added.`,
|
|
116
|
+
why: `Find them with \`${query}\`.`,
|
|
117
|
+
fact: {
|
|
118
|
+
check: details.name,
|
|
119
|
+
...ifDefined("replacedCheck", replacedCheck),
|
|
120
|
+
operationIndex: input.operationIndex
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
function declaredCheck(storage, table, name) {
|
|
125
|
+
for (const namespace of Object.values(storage.namespaces)) {
|
|
126
|
+
const declared = namespace.entries.table?.[table];
|
|
127
|
+
const check = declared?.checks?.find((candidate) => candidate.name === name);
|
|
128
|
+
if (declared !== void 0 && check !== void 0) return {
|
|
129
|
+
check,
|
|
130
|
+
columns: Object.keys(declared.columns)
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
95
135
|
* Deep clones and freezes a record object to prevent mutation.
|
|
96
136
|
* Recursively clones nested objects and arrays to ensure complete isolation.
|
|
97
137
|
*/
|
|
@@ -433,6 +473,24 @@ var PostgresMigrationRunner = class {
|
|
|
433
473
|
}
|
|
434
474
|
});
|
|
435
475
|
if (SqlQueryError.is(error)) {
|
|
476
|
+
const failingCheck = error.sqlState === "23514" ? rowsFailingCheckOf({
|
|
477
|
+
operation,
|
|
478
|
+
constraint: error.constraint,
|
|
479
|
+
storage: plan.contract.storage,
|
|
480
|
+
operations: plan.operations,
|
|
481
|
+
operationIndex: plan.operationIndex
|
|
482
|
+
}) : void 0;
|
|
483
|
+
if (failingCheck !== void 0) return runnerFailure("MIGRATION.EXECUTION_FAILED", failingCheck.summary, {
|
|
484
|
+
why: failingCheck.why,
|
|
485
|
+
meta: {
|
|
486
|
+
rowsFailingCheck: failingCheck.fact,
|
|
487
|
+
operationId: operation.id,
|
|
488
|
+
stepDescription: step.description,
|
|
489
|
+
sqlState: error.sqlState,
|
|
490
|
+
constraint: error.constraint,
|
|
491
|
+
table: error.table
|
|
492
|
+
}
|
|
493
|
+
});
|
|
436
494
|
const dependents = error.sqlState === "2BP01" ? dependentsOf(error.detail) : [];
|
|
437
495
|
const details = operation.target.details;
|
|
438
496
|
return runnerFailure("MIGRATION.EXECUTION_FAILED", dependents.length > 0 && details !== void 0 ? dependentsSummary(details, operation.label, dependents) : `Operation ${operation.id} failed during execution: ${step.description}`, {
|
|
@@ -686,6 +744,17 @@ function isVariantLinkForeignKey(fk, variant) {
|
|
|
686
744
|
const baseKey = canonicalizeJson(variant.base.table.primaryKey?.columns ?? []);
|
|
687
745
|
return fk.target.namespaceId === variant.base.namespaceId && fk.target.tableName === variant.base.tableName && fk.target.spaceId === void 0 && canonicalizeJson(fk.source.columns) === baseKey && canonicalizeJson(fk.target.columns) === baseKey && fk.name === void 0 && fk.onDelete === "cascade" && fk.onUpdate === void 0;
|
|
688
746
|
}
|
|
747
|
+
/**
|
|
748
|
+
* The value set the PSL source writes for a discriminator, keyed `<Base>.<field>` and holding the variants' values, sorted. A discriminator an enum types keeps the enum's value set, so it writes none.
|
|
749
|
+
*/
|
|
750
|
+
function discriminatorValueSetOf(entry) {
|
|
751
|
+
const { discriminator, variants } = entry.model;
|
|
752
|
+
if (discriminator === void 0 || variants === void 0) return void 0;
|
|
753
|
+
const derived = discriminatorValueSet(entry.name, discriminator.field, Object.keys(variants));
|
|
754
|
+
const columnName = entry.storage.fields[discriminator.field]?.column;
|
|
755
|
+
const valueSet = columnName === void 0 ? void 0 : entry.table.columns[columnName]?.valueSet;
|
|
756
|
+
return valueSet?.entityName === derived.name && valueSet.namespaceId === entry.namespaceId ? derived : void 0;
|
|
757
|
+
}
|
|
689
758
|
const KEEP_SOURCE = "Keep authoring this contract in its current source.";
|
|
690
759
|
function unsupported(message, why, fix, meta) {
|
|
691
760
|
return postgresError("CONTRACT.PRINT_UNSUPPORTED", `contract print: ${message}`, {
|
|
@@ -843,8 +912,8 @@ function refuseUnderivedMemberValueSet(input) {
|
|
|
843
912
|
const { valueSet } = field;
|
|
844
913
|
if (valueSet === void 0) return;
|
|
845
914
|
const domainEnum = input.domainEnums[valueSet.entityName];
|
|
846
|
-
if (sameJson(valueSet, derivedValueSetRefs(valueSet.entityName).
|
|
847
|
-
throw unsupported(`value-object member ${coordinate} carries a value set other than an enum of the default namespace with that enum's codec and no type parameters, which cannot be written in Prisma 8 PSL.`, "PSL types the member by the enum name, and the PSL source then points the member at that enum in the default namespace and gives it the enum's codec.", KEEP_SOURCE, { coordinate });
|
|
915
|
+
if (sameJson(valueSet, derivedValueSetRefs(valueSet.entityName).storage) && domainEnum?.codecId === type.codecId && type.typeParams === void 0) return;
|
|
916
|
+
throw unsupported(`value-object member ${coordinate} carries a value set other than the value set of an enum of the default namespace, with that enum's codec and no type parameters, which cannot be written in Prisma 8 PSL.`, "PSL types the member by the enum name, and the PSL source then points the member at that enum's value set in the default namespace and gives it the enum's codec.", KEEP_SOURCE, { coordinate });
|
|
848
917
|
}
|
|
849
918
|
function refuseMemberCodecWithoutNativeType(codecId, coordinate) {
|
|
850
919
|
throw unsupported(`value-object member ${coordinate} uses codec "${codecId}", which no Postgres codec in the configured stack names a native type for.`, "A value-object member has no storage column, so its PSL type is derived from the native type its codec names.", KEEP_SOURCE, {
|
|
@@ -969,7 +1038,7 @@ function refuseEnumsOutsideDefaultNamespace(contract) {
|
|
|
969
1038
|
}
|
|
970
1039
|
/** The PSL source reads every `type` block into the default namespace. */
|
|
971
1040
|
function refuseValueObjectsOutsideDefaultNamespace(contract, namespaceId) {
|
|
972
|
-
const names = Object.keys(contract.
|
|
1041
|
+
const names = Object.keys(contract.storage.namespaces[namespaceId]?.entries.valueObject ?? {});
|
|
973
1042
|
if (namespaceId === "public" || names.length === 0) return;
|
|
974
1043
|
throw unsupported(`namespace "${namespaceId}" declares the value object${names.length === 1 ? "" : "s"} ${names.join(", ")}, which cannot be written in Prisma 8 PSL: the PSL source reads every value object into the default namespace.`, "A `type` block written in any namespace reads back into the default namespace, so the value object would move.", "Move the value object to the default namespace, or keep authoring this contract in its current source.", {
|
|
975
1044
|
namespaceId,
|
|
@@ -999,7 +1068,7 @@ function refuseUnderivedChecks(entry, derived) {
|
|
|
999
1068
|
for (const [name, expected] of derived) {
|
|
1000
1069
|
const check = checks.get(name);
|
|
1001
1070
|
if (check?.prefix === expected.prefix && check.expression === expected.expression) continue;
|
|
1002
|
-
throw unsupported(`table "${entry.namespaceId}"."${entry.tableName}" ${check === void 0 ? "lacks" : "changes"} the check "${name}" the PSL source derives, so it cannot be written in Prisma 8 PSL.`, "The PSL source derives a membership check for each column
|
|
1071
|
+
throw unsupported(`table "${entry.namespaceId}"."${entry.tableName}" ${check === void 0 ? "lacks" : "changes"} the check "${name}" the PSL source derives, so it cannot be written in Prisma 8 PSL.`, "The PSL source derives, on a managed table, a membership check for each column typed by an enum and for a discriminator column, an element-not-null check for each list column whose elements are not nullable, and a value object check for each column that holds a value object.", KEEP_SOURCE, {
|
|
1003
1072
|
namespaceId: entry.namespaceId,
|
|
1004
1073
|
table: entry.tableName,
|
|
1005
1074
|
name
|
|
@@ -1160,7 +1229,7 @@ function refuseUnwrittenNamespaces(input) {
|
|
|
1160
1229
|
const storageNamespaces = /* @__PURE__ */ new Set([DEFAULT_NAMESPACE_ID, ...input.writtenStorageNamespaces]);
|
|
1161
1230
|
const defaultDomain = contract.domain.namespaces[DEFAULT_NAMESPACE_ID];
|
|
1162
1231
|
const domainNamespaces = new Set(input.models.map((entry) => entry.namespaceId));
|
|
1163
|
-
if (domainNamespaces.size === 0 || Object.keys(defaultDomain?.
|
|
1232
|
+
if (domainNamespaces.size === 0 || Object.keys(defaultDomain?.enum ?? {}).length > 0) domainNamespaces.add(DEFAULT_NAMESPACE_ID);
|
|
1164
1233
|
const planes = [{
|
|
1165
1234
|
plane: "storage",
|
|
1166
1235
|
expected: storageNamespaces,
|
|
@@ -1311,6 +1380,7 @@ function refuseUnwritableName(kind, name) {
|
|
|
1311
1380
|
const PRINTED_ENTRY_KINDS = /* @__PURE__ */ new Set([
|
|
1312
1381
|
"table",
|
|
1313
1382
|
"valueSet",
|
|
1383
|
+
"valueObject",
|
|
1314
1384
|
"native_enum",
|
|
1315
1385
|
"rls",
|
|
1316
1386
|
"policy",
|
|
@@ -1321,7 +1391,7 @@ function refuseUnprintedEntryKinds(namespaceId, entries) {
|
|
|
1321
1391
|
if (PRINTED_ENTRY_KINDS.has(kind)) continue;
|
|
1322
1392
|
const names = Object.keys(entities ?? {});
|
|
1323
1393
|
if (names.length === 0) continue;
|
|
1324
|
-
throw unsupported(`namespace "${namespaceId}" declares ${names.length} "${kind}" ${names.length === 1 ? "entity" : "entities"} (${names.join(", ")}), which the Postgres printer cannot write.`, "The printer writes tables, value sets, native enums, row-level security settings, policies and roles, and no other entity kind.", KEEP_SOURCE, {
|
|
1394
|
+
throw unsupported(`namespace "${namespaceId}" declares ${names.length} "${kind}" ${names.length === 1 ? "entity" : "entities"} (${names.join(", ")}), which the Postgres printer cannot write.`, "The printer writes tables, value sets, value objects, native enums, row-level security settings, policies and roles, and no other entity kind.", KEEP_SOURCE, {
|
|
1325
1395
|
namespaceId,
|
|
1326
1396
|
kind,
|
|
1327
1397
|
names
|
|
@@ -1429,7 +1499,7 @@ function buildMemberType(input) {
|
|
|
1429
1499
|
const { type } = field;
|
|
1430
1500
|
if (type.kind === "valueObject") return {
|
|
1431
1501
|
kind: "valueObject",
|
|
1432
|
-
typeName: type.
|
|
1502
|
+
typeName: type.entityName
|
|
1433
1503
|
};
|
|
1434
1504
|
refuseUnderivedMemberValueSet({
|
|
1435
1505
|
field,
|
|
@@ -1456,10 +1526,10 @@ function buildMemberType(input) {
|
|
|
1456
1526
|
coordinate
|
|
1457
1527
|
});
|
|
1458
1528
|
}
|
|
1459
|
-
/** The `type` blocks of one namespace, one per value object
|
|
1529
|
+
/** The `type` blocks of one namespace, one per value object its storage holds. */
|
|
1460
1530
|
function buildCompositeTypes(input) {
|
|
1461
1531
|
refuseValueObjectsOutsideDefaultNamespace(input.contract, input.namespaceId);
|
|
1462
|
-
const valueObjects = input.contract.
|
|
1532
|
+
const valueObjects = input.contract.storage.namespaces[input.namespaceId]?.entries.valueObject ?? {};
|
|
1463
1533
|
return Object.entries(valueObjects).map(([name, valueObject]) => {
|
|
1464
1534
|
refuseUnwritableName("value object", name);
|
|
1465
1535
|
return {
|
|
@@ -1601,20 +1671,22 @@ function buildNativeEnumBlocksForNamespace(input) {
|
|
|
1601
1671
|
* The checks the PSL source derives itself for a table, keyed by name, so
|
|
1602
1672
|
* they are not also written as `@@check`. A table that is not managed derives
|
|
1603
1673
|
* none. A managed one derives a membership check for each column typed by a
|
|
1604
|
-
* domain enum and an element-not-null check for
|
|
1605
|
-
* elements are not nullable
|
|
1674
|
+
* domain enum and for a discriminator column, an element-not-null check for
|
|
1675
|
+
* each list column whose elements are not nullable, and a value object check
|
|
1676
|
+
* for each column that holds a value object.
|
|
1606
1677
|
*/
|
|
1607
1678
|
function derivedChecks(input) {
|
|
1608
1679
|
const checks = /* @__PURE__ */ new Map();
|
|
1609
1680
|
if (!input.managed) return checks;
|
|
1610
1681
|
for (const [columnName, column] of Object.entries(input.table.columns)) {
|
|
1611
|
-
const
|
|
1612
|
-
const memberValues =
|
|
1682
|
+
const setValues = column.codecId === "pg/enum@1" || column.valueSet === void 0 ? void 0 : input.memberValueSets.get(column.valueSet.entityName);
|
|
1683
|
+
const memberValues = setValues?.filter((value) => typeof value === "string" || typeof value === "number");
|
|
1613
1684
|
for (const candidate of postgresRenderCheckExpressions({
|
|
1614
1685
|
tableName: input.tableName,
|
|
1615
1686
|
columnName,
|
|
1616
1687
|
many: column.many,
|
|
1617
|
-
memberValues: memberValues?.length ===
|
|
1688
|
+
memberValues: memberValues?.length === setValues?.length ? memberValues : void 0,
|
|
1689
|
+
valueObject: input.columnValueObjects.get(columnName)
|
|
1618
1690
|
})) {
|
|
1619
1691
|
const prefix = composeCheckWirePrefix(input.tableName, columnName, candidate.kind);
|
|
1620
1692
|
checks.set(formatWireName(prefix, computeCheckContentHash(candidate.expression)), {
|
|
@@ -2236,10 +2308,12 @@ function buildScalarFields(input) {
|
|
|
2236
2308
|
const { entry, variant, enums, domainEnums, inferredConstructors, context, executionDefaults } = input;
|
|
2237
2309
|
const primaryKeyColumns = variant === void 0 ? entry.table.primaryKey?.columns ?? [] : [];
|
|
2238
2310
|
const fields = [];
|
|
2311
|
+
const discriminatorField = discriminatorValueSetOf(entry) === void 0 ? void 0 : entry.model.discriminator?.field;
|
|
2239
2312
|
for (const [fieldName, fieldStorage] of Object.entries(entry.storage.fields)) {
|
|
2240
2313
|
const columnName = fieldStorage.column;
|
|
2241
2314
|
const coordinate = `"${entry.namespaceId}"."${entry.tableName}"."${columnName}"`;
|
|
2242
|
-
const
|
|
2315
|
+
const storedColumn = entry.table.columns[columnName];
|
|
2316
|
+
const column = fieldName === discriminatorField && storedColumn !== void 0 ? withoutValueSet(storedColumn) : storedColumn;
|
|
2243
2317
|
const field = entry.model.fields[fieldName];
|
|
2244
2318
|
assertDefined(column, `column ${coordinate} is not declared by its table`);
|
|
2245
2319
|
if (field === void 0) refuseStorageOfUndeclaredField({
|
|
@@ -2261,7 +2335,7 @@ function buildScalarFields(input) {
|
|
|
2261
2335
|
});
|
|
2262
2336
|
const columnType = field.type.kind === "valueObject" ? {
|
|
2263
2337
|
kind: "valueObject",
|
|
2264
|
-
typeName: field.type.
|
|
2338
|
+
typeName: field.type.entityName
|
|
2265
2339
|
} : buildColumnType({
|
|
2266
2340
|
column,
|
|
2267
2341
|
inferredConstructors,
|
|
@@ -2312,6 +2386,18 @@ function buildScalarFields(input) {
|
|
|
2312
2386
|
}
|
|
2313
2387
|
return fields;
|
|
2314
2388
|
}
|
|
2389
|
+
/** A discriminator column without the value set the PSL source writes for it from the variants, so it is written as the plain column it is declared as. */
|
|
2390
|
+
function withoutValueSet(column) {
|
|
2391
|
+
return new StorageColumn({
|
|
2392
|
+
dataType: column.dataType,
|
|
2393
|
+
codecId: column.codecId,
|
|
2394
|
+
nullable: column.nullable,
|
|
2395
|
+
many: column.many,
|
|
2396
|
+
...ifDefined("typeParams", column.typeParams),
|
|
2397
|
+
...ifDefined("default", column.default),
|
|
2398
|
+
...ifDefined("control", column.control)
|
|
2399
|
+
});
|
|
2400
|
+
}
|
|
2315
2401
|
/** The native enums of one namespace, keyed as the contract keys them. */
|
|
2316
2402
|
function nativeEnumsOf(namespaceId, entries) {
|
|
2317
2403
|
const nativeEnums = /* @__PURE__ */ new Map();
|
|
@@ -2321,9 +2407,28 @@ function nativeEnumsOf(namespaceId, entries) {
|
|
|
2321
2407
|
}
|
|
2322
2408
|
return nativeEnums;
|
|
2323
2409
|
}
|
|
2324
|
-
/** The value
|
|
2325
|
-
function
|
|
2410
|
+
/** The value object each column of a table holds, over the fields of every model the table stores. Nullability comes from the column, as in the build: a variant that shares its base table has a nullable column. */
|
|
2411
|
+
function columnValueObjectsOf(contract, entries, codecLookup) {
|
|
2412
|
+
const columnValueObjects = /* @__PURE__ */ new Map();
|
|
2413
|
+
for (const entry of entries) for (const [fieldName, field] of Object.entries(entry.model.fields)) {
|
|
2414
|
+
const columnName = entry.storage.fields[fieldName]?.column;
|
|
2415
|
+
const column = columnName === void 0 ? void 0 : entry.table.columns[columnName];
|
|
2416
|
+
if (field.type.kind !== "valueObject" || columnName === void 0 || column === void 0) continue;
|
|
2417
|
+
columnValueObjects.set(columnName, resolveColumnValueObject(contract.storage, {
|
|
2418
|
+
reference: field.type,
|
|
2419
|
+
nullable: column.nullable,
|
|
2420
|
+
many: field.many ?? false
|
|
2421
|
+
}, codecLookup));
|
|
2422
|
+
}
|
|
2423
|
+
return columnValueObjects;
|
|
2424
|
+
}
|
|
2425
|
+
/** The value sets the PSL source derives for a namespace from the enum blocks written for it and from its discriminators. */
|
|
2426
|
+
function derivedValueSetsOf(namespaceId, enums, defaultDomainEnums, namespaceModels) {
|
|
2326
2427
|
const derived = new Map(enums.derivedValueSets);
|
|
2428
|
+
for (const entry of namespaceModels) {
|
|
2429
|
+
const valueSet = discriminatorValueSetOf(entry);
|
|
2430
|
+
if (valueSet !== void 0) derived.set(valueSet.name, valueSet.values);
|
|
2431
|
+
}
|
|
2327
2432
|
if (namespaceId !== "public") return derived;
|
|
2328
2433
|
for (const [name, domainEnum] of Object.entries(defaultDomainEnums)) {
|
|
2329
2434
|
if (derived.has(name)) refuseEnumAndNativeEnumSharingName(namespaceId, name);
|
|
@@ -2364,11 +2469,13 @@ function buildModel(all, entry, enums, rlsTables) {
|
|
|
2364
2469
|
if (fk !== void 0) travelledForeignKeys.add(fk);
|
|
2365
2470
|
}
|
|
2366
2471
|
refuseUntravelledForeignKeys(entry, variant, travelledForeignKeys);
|
|
2472
|
+
const discriminatorValueSet = discriminatorValueSetOf(entry);
|
|
2367
2473
|
const checks = derivedChecks({
|
|
2368
2474
|
table: entry.table,
|
|
2369
2475
|
tableName: entry.tableName,
|
|
2370
2476
|
managed: effectiveControlPolicy(entry.table.control, all.contract.defaultControlPolicy) === "managed",
|
|
2371
|
-
domainEnumValues: all.domainEnumValues
|
|
2477
|
+
memberValueSets: discriminatorValueSet === void 0 ? all.domainEnumValues : new Map([...all.domainEnumValues, [discriminatorValueSet.name, discriminatorValueSet.values]]),
|
|
2478
|
+
columnValueObjects: columnValueObjectsOf(all.contract, [entry, ...singleTableVariants], all.context.codecLookup)
|
|
2372
2479
|
});
|
|
2373
2480
|
if (variant?.singleTable !== true) refuseUnderivedChecks(entry, checks);
|
|
2374
2481
|
return {
|
|
@@ -2402,10 +2509,8 @@ function buildNamespace(all, namespaceId, namespace) {
|
|
|
2402
2509
|
refuseUnderivedValueSets({
|
|
2403
2510
|
namespaceId,
|
|
2404
2511
|
actual: valueSets,
|
|
2405
|
-
derived: derivedValueSetsOf(namespaceId, enums, all.defaultDomainEnums)
|
|
2512
|
+
derived: derivedValueSetsOf(namespaceId, enums, all.defaultDomainEnums, models.filter((entry) => entry.namespaceId === namespaceId))
|
|
2406
2513
|
});
|
|
2407
|
-
const rlsTables = rlsEnabledTables(namespaceId, namespace.entries["rls"]);
|
|
2408
|
-
const namespaceModels = models.filter((entry) => entry.namespaceId === namespaceId).map((entry) => buildModel(all, entry, enums, rlsTables));
|
|
2409
2514
|
const compositeTypes = buildCompositeTypes({
|
|
2410
2515
|
contract,
|
|
2411
2516
|
namespaceId,
|
|
@@ -2414,6 +2519,8 @@ function buildNamespace(all, namespaceId, namespace) {
|
|
|
2414
2519
|
enumBlockNames: enums.blockNamesByTypeName,
|
|
2415
2520
|
domainEnums: all.defaultDomainEnums
|
|
2416
2521
|
});
|
|
2522
|
+
const rlsTables = rlsEnabledTables(namespaceId, namespace.entries["rls"]);
|
|
2523
|
+
const namespaceModels = models.filter((entry) => entry.namespaceId === namespaceId).map((entry) => buildModel(all, entry, enums, rlsTables));
|
|
2417
2524
|
const modelNameForTable = (tableName) => models.find((entry) => entry.namespaceId === namespaceId && entry.tableName === tableName && variants.get(entry)?.singleTable !== true)?.name;
|
|
2418
2525
|
for (const tableName of rlsTables) if (modelNameForTable(tableName) === void 0) refuseRlsWithoutModel(namespaceId, tableName);
|
|
2419
2526
|
const blocks = [
|