@prisma/orm-target-postgres 8.0.0-rc.22-dev.8 → 8.0.0-rc.22-dev.9
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-Bp0horgW.d.mts → adapter-B52C9G6y.d.mts} +11 -11
- package/dist/{adapter-Bp0horgW.d.mts.map → adapter-B52C9G6y.d.mts.map} +1 -1
- package/dist/adapter.d.mts +1 -1
- package/dist/adapter__adapter.d.mts +1 -1
- package/dist/{aggregates-0EfVySBb.d.mts → aggregates-CCEULCRK.d.mts} +11 -11
- package/dist/{aggregates-0EfVySBb.d.mts.map → aggregates-CCEULCRK.d.mts.map} +1 -1
- package/dist/{control-policy-RIiGtzLL-dMGUsj7L.mjs → control-policy-K52VpMX0-CateWffI.mjs} +7 -3
- package/dist/control-policy-K52VpMX0-CateWffI.mjs.map +1 -0
- package/dist/{diff-database-schema-CvA43-eB-BVodpxgx.mjs → diff-database-schema-D_vOsC7_-CtLt0OwZ.mjs} +3 -3
- package/dist/{diff-database-schema-CvA43-eB-BVodpxgx.mjs.map → diff-database-schema-D_vOsC7_-CtLt0OwZ.mjs.map} +1 -1
- package/dist/{issue-planner-BUo9S9Ge.d.mts → issue-planner-CbixMGS1.d.mts} +2 -2
- package/dist/{issue-planner-BUo9S9Ge.d.mts.map → issue-planner-CbixMGS1.d.mts.map} +1 -1
- package/dist/migration-Be_iuIpn.mjs.map +1 -1
- package/dist/{migration-Drs_EeiM.d.mts → migration-XqRvlRWn.d.mts} +2 -2
- package/dist/{migration-Drs_EeiM.d.mts.map → migration-XqRvlRWn.d.mts.map} +1 -1
- package/dist/op-factory-call-DO-2Ul_8.d.mts +1 -0
- package/dist/{op-factory-call-Ek2u4dEh-CIUcdOdr.mjs → op-factory-call-DQW9c0ec-C3qv_STE.mjs} +478 -38
- package/dist/op-factory-call-DQW9c0ec-C3qv_STE.mjs.map +1 -0
- package/dist/{op-factory-call-L1gqYhhk-DMnspvjf.d.mts → op-factory-call-fPC4Yzy6-B6JHyh7J.d.mts} +80 -9
- package/dist/op-factory-call-fPC4Yzy6-B6JHyh7J.d.mts.map +1 -0
- package/dist/{pack-vCp-QG0L.d.mts → pack-BhLR51a_.d.mts} +3 -3
- package/dist/{pack-vCp-QG0L.d.mts.map → pack-BhLR51a_.d.mts.map} +1 -1
- package/dist/{planner-CXGxEHRs-DnblCRvf.mjs → planner-BsSEbzfm-BrBEb_M1.mjs} +87 -68
- package/dist/planner-BsSEbzfm-BrBEb_M1.mjs.map +1 -0
- package/dist/{planner-Bl3kIyMG.d.mts → planner-Cw5KV0_B.d.mts} +2 -2
- package/dist/{planner-Bl3kIyMG.d.mts.map → planner-Cw5KV0_B.d.mts.map} +1 -1
- package/dist/planner-produced-postgres-migration-CoX6OBqo.d.mts +1 -0
- package/dist/{planner-produced-postgres-migration-Cx9bERx3-DRNnR16E.d.mts → planner-produced-postgres-migration-DgUtdqVh-DEhVIDmO.d.mts} +3 -3
- package/dist/planner-produced-postgres-migration-DgUtdqVh-DEhVIDmO.d.mts.map +1 -0
- package/dist/{planner-produced-postgres-migration-rvb49AcU-Cg2CikBV.mjs → planner-produced-postgres-migration-bn60skNP-CKjpb3S_.mjs} +4 -4
- package/dist/{planner-produced-postgres-migration-rvb49AcU-Cg2CikBV.mjs.map → planner-produced-postgres-migration-bn60skNP-CKjpb3S_.mjs.map} +1 -1
- package/dist/{postgres-migration-D0tEWVZ9-tr0Nt3a2.mjs → postgres-migration-CVWCygKt-DEXT0FE_.mjs} +48 -8
- package/dist/postgres-migration-CVWCygKt-DEXT0FE_.mjs.map +1 -0
- package/dist/{postgres-migration-DNnmFBsR-BJU9865a.d.mts → postgres-migration-MVAsm-Co-CcN0UJd7.d.mts} +53 -3
- package/dist/postgres-migration-MVAsm-Co-CcN0UJd7.d.mts.map +1 -0
- package/dist/{prisma7-binding-bhu33wEo.d.mts → prisma7-binding-DixgLN05.d.mts} +3 -3
- package/dist/{prisma7-binding-bhu33wEo.d.mts.map → prisma7-binding-DixgLN05.d.mts.map} +1 -1
- package/dist/{render-ops-B0eNPFAw-BgUftmhY.mjs → render-ops-BKDfKgOJ-DmoHztdY.mjs} +3 -3
- package/dist/{render-ops-B0eNPFAw-BgUftmhY.mjs.map → render-ops-BKDfKgOJ-DmoHztdY.mjs.map} +1 -1
- package/dist/target.d.mts +12 -12
- package/dist/target.mjs +8 -8
- package/dist/target__aggregates.d.mts +1 -1
- package/dist/target__control.mjs +30 -32
- package/dist/target__control.mjs.map +1 -1
- package/dist/target__diff-database-schema.mjs +1 -1
- package/dist/target__issue-planner.d.mts +1 -1
- package/dist/target__issue-planner.mjs +1 -1
- package/dist/target__migration.d.mts +2 -2
- package/dist/target__migration.mjs +2 -2
- package/dist/target__op-factory-call.d.mts +3 -3
- package/dist/target__op-factory-call.mjs +2 -2
- package/dist/target__pack.d.mts +1 -1
- package/dist/target__planner-produced-postgres-migration.d.mts +2 -2
- package/dist/target__planner-produced-postgres-migration.mjs +1 -1
- package/dist/target__planner.d.mts +1 -1
- package/dist/target__planner.mjs +2 -2
- package/dist/target__prisma7-binding.d.mts +1 -1
- package/dist/target__render-ops.mjs +1 -1
- package/package.json +10 -10
- package/dist/control-policy-RIiGtzLL-dMGUsj7L.mjs.map +0 -1
- package/dist/op-factory-call-D2HXLJQJ.d.mts +0 -1
- package/dist/op-factory-call-Ek2u4dEh-CIUcdOdr.mjs.map +0 -1
- package/dist/op-factory-call-L1gqYhhk-DMnspvjf.d.mts.map +0 -1
- package/dist/planner-CXGxEHRs-DnblCRvf.mjs.map +0 -1
- package/dist/planner-produced-postgres-migration-Cx9bERx3-DRNnR16E.d.mts.map +0 -1
- package/dist/planner-produced-postgres-migration-DRPVY4iL.d.mts +0 -1
- package/dist/postgres-migration-D0tEWVZ9-tr0Nt3a2.mjs.map +0 -1
- package/dist/postgres-migration-DNnmFBsR-BJU9865a.d.mts.map +0 -1
package/dist/target.mjs
CHANGED
|
@@ -25,18 +25,18 @@ import { n as readPostgresDefault, t as postgresResolveDefault } from "./default
|
|
|
25
25
|
import { n as renderFullTextIndexDocument } from "./full-text-search-document-Ceg9d2K0-DJ4MklAU.mjs";
|
|
26
26
|
import { r as resolveDdlSchemaForNamespaceStorage } from "./resolve-ddl-schema-BZzteXH1-C57Iavtu.mjs";
|
|
27
27
|
import { a as stackDataTypes, i as qualifyTableName, t as alterTypeCheck } from "./planner-sql-checks-RKQqd_b5-CesTHuGH.mjs";
|
|
28
|
-
import { A as
|
|
28
|
+
import { A as EnableRowLevelSecurityCall, B as RenameStoredKeyCall, C as DropExtensionCall, D as DropPostgresRlsPolicyCall, E as DropNotNullCall, F as RenameColumnCall, G as SetExtensionSchemaCall, H as ReplaceStoredValueCall, I as RenameConstraintCall, K as SetNotNullCall, L as RenameIndexCall, M as RawSqlCall, N as RemoveStoredKeyCall, O as DropSchemaCall, P as RemoveStoredValueCall, R as RenamePostgresRlsPolicyCall, S as DropDefaultCall, T as DropNativeEnumTypeCall, V as RenameTableCall, W as SetDefaultCall, X as createExtension, _ as DeleteRowsCall, a as AddNativeEnumValueCall, b as DropColumnCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddForeignKeyCall, j as FillStoredKeyCall, k as DropTableCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddPrimaryKeyCall, p as CreatePostgresRlsPolicyCall, q as SetTableSchemaCall, r as AddColumnWithTemporaryDefaultCall, s as AddRequiredColumnToEmptyTableCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DisableRowLevelSecurityCall, w as DropIndexCall, x as DropConstraintCall, y as DropCheckConstraintCall, z as RenameSchemaCall } from "./op-factory-call-DQW9c0ec-C3qv_STE.mjs";
|
|
29
29
|
import { t as buildColumnTypeSql } from "./planner-ddl-builders-B1gra_GO-gl5gnaqr.mjs";
|
|
30
30
|
import { n as resolveIdentityValue, t as buildBuiltinIdentityValue } from "./planner-identity-values-CAnifzzT-D1ncWy3d.mjs";
|
|
31
|
-
import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-
|
|
32
|
-
import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-
|
|
31
|
+
import { a as planIssues, t as coalesceSubtreeIssues } from "./control-policy-K52VpMX0-CateWffI.mjs";
|
|
32
|
+
import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-D_vOsC7_-CtLt0OwZ.mjs";
|
|
33
33
|
import { n as PostgresContractView, t as PostgresContractSerializer } from "./postgres-contract-view-pS-iTnm--BIKbQbBd.mjs";
|
|
34
34
|
import { t as dataTransform } from "./data-transform-h9agBu_c-RlC5A7aY.mjs";
|
|
35
|
-
import { t as PostgresMigration } from "./postgres-migration-
|
|
36
|
-
import { t as renderOps } from "./render-ops-
|
|
35
|
+
import { t as PostgresMigration } from "./postgres-migration-CVWCygKt-DEXT0FE_.mjs";
|
|
36
|
+
import { t as renderOps } from "./render-ops-BKDfKgOJ-DmoHztdY.mjs";
|
|
37
37
|
import { t as renderCallsToTypeScript } from "./render-typescript-Dqp1Spgn-B4mJhuVr.mjs";
|
|
38
|
-
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-
|
|
39
|
-
import { t as createPostgresMigrationPlanner } from "./planner-
|
|
38
|
+
import { t as TypeScriptRenderablePostgresMigration } from "./planner-produced-postgres-migration-bn60skNP-CKjpb3S_.mjs";
|
|
39
|
+
import { t as createPostgresMigrationPlanner } from "./planner-BsSEbzfm-BrBEb_M1.mjs";
|
|
40
40
|
import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-DFc1Tfv5-BkBKBRE3.mjs";
|
|
41
41
|
import { c as toTsquery, l as websearchToTsquery, n as fullTextDocument, o as phrasetoTsquery, s as plaintoTsquery, t as FullTextDocument } from "./full-text-parsers-DIfNR9AQ-tVmTju-Y.mjs";
|
|
42
42
|
import { t as tsquery } from "./full-text-B9mXDcsJ.mjs";
|
|
@@ -44,4 +44,4 @@ import { a as foreignKey, c as primaryKey, d as unique, i as fn, l as rawSql, n
|
|
|
44
44
|
import { t as introspectedTypeText } from "./native-type-normalizer-DEN9YgA5.mjs";
|
|
45
45
|
import { i as hasUniqueConstraint, n as hasForeignKey, r as hasIndex, t as buildSchemaLookupMap } from "./planner-schema-lookup-BbUY9oVy.mjs";
|
|
46
46
|
import { t as prisma7PostgresBinding } from "./prisma7-binding-BexVc6RM.mjs";
|
|
47
|
-
export { AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddColumnWithTemporaryDefaultCall, AddConstraintAction, AddForeignKeyCall, AddNativeEnumValueCall, AddPrimaryKeyCall, AddRequiredColumnToEmptyTableCall, AddUniqueCall, AlterColumnTypeAction, AlterColumnTypeCall, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, DataTransformCall, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropExtensionCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropSchemaCall, DropTableCall, EnableRowLevelSecurityCall, FULL_TEXT_INDEX_TYPE, FullTextDocument, MARKER_LOCK_KEY, MARKER_LOCK_SQL, PostgresMigration as Migration, MigrationCLI, PG_BIT_CODEC_ID, PG_BOOL_CODEC_ID, PG_BYTEA_CODEC_ID, PG_CHAR_CODEC_ID, PG_DATE_STRING_CODEC_ID, PG_DATE_TEMPORAL_CODEC_ID, PG_ENUM_CODEC_ID, PG_FLOAT4_CODEC_ID, PG_FLOAT8_CODEC_ID, PG_FLOAT_CODEC_ID, PG_INET_CODEC_ID, PG_INT2_CODEC_ID, PG_INT4_CODEC_ID, PG_INT8_CODEC_ID, PG_INT8_NUMBER_CODEC_ID, PG_INTERVAL_CODEC_ID, PG_INTERVAL_STRING_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_MONEY_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_OID_CODEC_ID, PG_TEXT_ARRAY_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_DATE_CODEC_ID, PG_TIMESTAMPTZ_STRING_CODEC_ID, PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, PG_TIMESTAMP_DATE_CODEC_ID, PG_TIMESTAMP_INSTANT_CODEC_ID, PG_TIMESTAMP_STRING_CODEC_ID, PG_TIMESTAMP_TEMPORAL_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_STRING_CODEC_ID, PG_TIME_TEMPORAL_CODEC_ID, PG_TSQUERY_CODEC_ID, PG_UNBOUNDED_INT_CODEC_ID, PG_UUID_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, PG_XML_CODEC_ID, POLICY_COMMAND_SQL, POLICY_OPERATION_PREDICATES, PgIntervalStringCodec, PgIntervalStringDescriptor, PgTimestampDateCodec, PgTimestampDateDescriptor, PgTimestamptzDateCodec, PgTimestamptzDateDescriptor, PostgresAlterIndexRename, PostgresAlterPolicyRename, PostgresAlterSchemaRename, PostgresAlterTable, PostgresAlterTableSetSchema, PostgresCodecDescriptor, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, PostgresDdlNode, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropSchema, PostgresDropType, PostgresExtension, PostgresExtensionSchemaNode, PostgresNamespaceSchemaNode, PostgresNativeEnum, PostgresNativeEnumSchemaNode, PostgresPolicySchemaNode, PostgresRlsEnablement, PostgresRlsPolicy, PostgresRole, PostgresRoleSchemaNode, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, PostgresTableSource, PostgresUnboundSchema, RawSqlCall, RemoveStoredValueCall, RenameColumnCall, RenameConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, RenameSchemaCall, RenameTableCall, ReplaceStoredValueCall, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_RAW_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SetDefaultCall, SetExtensionSchemaCall, SetNotNullCall, SetTableSchemaCall, TypeScriptRenderablePostgresMigration, addColumnAction, addConstraintAction, alterColumnTypeAction, alterTable, alterTypeCheck, assemblePostgresCodecRegistry, assemblePostgresCodecRegistryWithBuiltins, buildBuiltinIdentityValue, buildColumnTypeSql, buildControlTableBootstrapQueries, buildPostgresCodecDescriptorRegistry, buildPostgresPlanDiff, buildSchemaLookupMap, buildSignMarkerBootstrapQueries, checkExpression, coalesceSubtreeIssues, col, columnDefaultAst, columnDefaultSequenceAst, columnExistsAst, columnNullabilityAst, columnTypeAst, computeContentHash, constraintExistsAst, contractToPostgresDatabaseSchemaNode, createExtension, createPostgresBuiltinCodecLookup, createPostgresBuiltinDataTypeLookup, createPostgresCodecRegistryWithBuiltins, createPostgresMigrationPlanner, createSchema, createTable, dataTransform, decodePostgresListText, definePostgresCodecs, describeFullTextIndexProblem, dropDefaultAction, errorPostgresMigrationStackMissing, escapeLiteral, extensionExistsAst, extensionInSchemaAst, fn, foreignKey, fullTextDocument, fullTextIndexProblems, hasForeignKey, hasIndex, hasUniqueConstraint, indexExistsAst, inlineLiteral, int4, int8, introspectedTypeText, isPgEnumParams, isPgOid, isPostgresCodecDescriptor, isPostgresSchema, jsonb, lit, moneyTextOfCents, noNullValuesAst, parsePostgresListText, pgBit, pgBitColumn, pgBitLengthParams, pgBool, pgBoolColumn, pgBytea, pgChar, pgCharColumn, pgCharacterLengthParams, pgDate, pgDateStoredText, pgEnum, pgEnumDescriptor, pgEnumParams, pgFloat4, pgFloat4Column, pgFloat8, pgFloat8Column, pgFloatColumn, pgInet, pgInetColumn, pgInt2, pgInt2Column, pgInt4, pgInt4Column, pgInt8, pgInt8Column, pgInt8NumberColumn, pgIntColumn, pgInterval, pgIntervalColumn, pgIntervalStringColumn, pgIntervalStringDescriptor, pgJson, pgJsonColumn, pgJsonb, pgJsonbColumn, pgJsonbEnumRefusal, pgMoney, pgMoneyColumn, pgMoneyStoredText, pgNumeric, pgNumericColumn, pgNumericParams, pgOid, pgOidColumn, pgPrecisionParams, pgTable, pgText, pgTextArray, pgTextColumn, pgTime, pgTimeStoredText, pgTimestamp, pgTimestampDateColumn, pgTimestampDateDescriptor, pgTimestampStoredText, pgTimestamptz, pgTimestamptzDateColumn, pgTimestamptzDateDescriptor, pgTimestamptzStoredText, pgTimetz, pgTimetzColumn, pgTimetzStoredText, pgTsquery, pgUnboundedIntColumn, pgUuid, pgUuidColumn, pgVarbit, pgVarbitColumn, pgVarchar, pgVarcharColumn, pgXml, pgXmlColumn, phrasetoTsquery, placeholder, plaintoTsquery, planIssues, policyInputFromSerialized, policyRoleList, postgresAggregateDescriptors, postgresCodec, postgresCodecDescriptorRegistry, postgresCodecRegistry, postgresCodecTraitsOf, postgresCreateNamespace, postgresDataTypeEntries, postgresDataTypes, postgresError, postgresNativeAuthoringTypes, postgresNowGeneratorControlDescriptors, postgresNowGenerators, postgresRenderCheckExpressions, postgresResolveDefault, postgresScalarAndNativeTypeConstructors, postgresScalarAuthoringTypes, postgresTextDataTypes, primaryKey, prisma7PostgresBinding, qualifiedEnumName, qualifyName, qualifyTableName, quoteIdentifier, quoteQualifiedName, rawSql, readPostgresDefault, renderCallsToTypeScript, renderFullTextIndexDocument, renderOps, resolveDdlSchemaForNamespaceStorage, resolveIdentityValue, rlsEnabledAst, rlsPolicyExistsAst, sequenceNameAvailableAst, sql, stackDataTypes, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass, toTsquery, tsquery, unique, validateEnumValueLength, websearchToTsquery, weightGroupsOf };
|
|
47
|
+
export { AddCheckConstraintCall, AddColumnAction, AddColumnCall, AddColumnWithTemporaryDefaultCall, AddConstraintAction, AddForeignKeyCall, AddNativeEnumValueCall, AddPrimaryKeyCall, AddRequiredColumnToEmptyTableCall, AddUniqueCall, AlterColumnTypeAction, AlterColumnTypeCall, CreateExtensionCall, CreateIndexCall, CreateNativeEnumTypeCall, CreatePostgresRlsPolicyCall, CreateSchemaCall, CreateTableCall, DEFAULT_FULL_TEXT_SEARCH_LANGUAGE, DataTransformCall, DeleteRowsCall, DisableRowLevelSecurityCall, DropCheckConstraintCall, DropColumnCall, DropConstraintCall, DropDefaultAction, DropDefaultCall, DropExtensionCall, DropIndexCall, DropNativeEnumTypeCall, DropNotNullCall, DropPostgresRlsPolicyCall, DropSchemaCall, DropTableCall, EnableRowLevelSecurityCall, FULL_TEXT_INDEX_TYPE, FillStoredKeyCall, FullTextDocument, MARKER_LOCK_KEY, MARKER_LOCK_SQL, PostgresMigration as Migration, MigrationCLI, PG_BIT_CODEC_ID, PG_BOOL_CODEC_ID, PG_BYTEA_CODEC_ID, PG_CHAR_CODEC_ID, PG_DATE_STRING_CODEC_ID, PG_DATE_TEMPORAL_CODEC_ID, PG_ENUM_CODEC_ID, PG_FLOAT4_CODEC_ID, PG_FLOAT8_CODEC_ID, PG_FLOAT_CODEC_ID, PG_INET_CODEC_ID, PG_INT2_CODEC_ID, PG_INT4_CODEC_ID, PG_INT8_CODEC_ID, PG_INT8_NUMBER_CODEC_ID, PG_INTERVAL_CODEC_ID, PG_INTERVAL_STRING_CODEC_ID, PG_INT_CODEC_ID, PG_JSONB_CODEC_ID, PG_JSON_CODEC_ID, PG_MONEY_CODEC_ID, PG_NUMERIC_CODEC_ID, PG_OID_CODEC_ID, PG_TEXT_ARRAY_CODEC_ID, PG_TEXT_CODEC_ID, PG_TIMESTAMPTZ_DATE_CODEC_ID, PG_TIMESTAMPTZ_STRING_CODEC_ID, PG_TIMESTAMPTZ_TEMPORAL_CODEC_ID, PG_TIMESTAMP_DATE_CODEC_ID, PG_TIMESTAMP_INSTANT_CODEC_ID, PG_TIMESTAMP_STRING_CODEC_ID, PG_TIMESTAMP_TEMPORAL_CODEC_ID, PG_TIMETZ_CODEC_ID, PG_TIME_STRING_CODEC_ID, PG_TIME_TEMPORAL_CODEC_ID, PG_TSQUERY_CODEC_ID, PG_UNBOUNDED_INT_CODEC_ID, PG_UUID_CODEC_ID, PG_VARBIT_CODEC_ID, PG_VARCHAR_CODEC_ID, PG_XML_CODEC_ID, POLICY_COMMAND_SQL, POLICY_OPERATION_PREDICATES, PgIntervalStringCodec, PgIntervalStringDescriptor, PgTimestampDateCodec, PgTimestampDateDescriptor, PgTimestamptzDateCodec, PgTimestamptzDateDescriptor, PostgresAlterIndexRename, PostgresAlterPolicyRename, PostgresAlterSchemaRename, PostgresAlterTable, PostgresAlterTableSetSchema, PostgresCodecDescriptor, PostgresContractSerializer, PostgresContractView, PostgresCreateIndex, PostgresCreatePolicy, PostgresCreateSchema, PostgresCreateTable, PostgresCreateType, PostgresDatabaseSchemaNode, PostgresDdlNode, PostgresDisableRowLevelSecurity, PostgresDropIndex, PostgresDropPolicy, PostgresDropSchema, PostgresDropType, PostgresExtension, PostgresExtensionSchemaNode, PostgresNamespaceSchemaNode, PostgresNativeEnum, PostgresNativeEnumSchemaNode, PostgresPolicySchemaNode, PostgresRlsEnablement, PostgresRlsPolicy, PostgresRole, PostgresRoleSchemaNode, PostgresSchema, PostgresSchemaNodeKind, PostgresTableSchemaNode, PostgresTableSource, PostgresUnboundSchema, RawSqlCall, RemoveStoredKeyCall, RemoveStoredValueCall, RenameColumnCall, RenameConstraintCall, RenameIndexCall, RenamePostgresRlsPolicyCall, RenameSchemaCall, RenameStoredKeyCall, RenameTableCall, ReplaceStoredValueCall, SQL_CHAR_CODEC_ID, SQL_FLOAT_CODEC_ID, SQL_INT_CODEC_ID, SQL_RAW_CODEC_ID, SQL_TEXT_CODEC_ID, SQL_VARCHAR_CODEC_ID, SetDefaultCall, SetExtensionSchemaCall, SetNotNullCall, SetTableSchemaCall, TypeScriptRenderablePostgresMigration, addColumnAction, addConstraintAction, alterColumnTypeAction, alterTable, alterTypeCheck, assemblePostgresCodecRegistry, assemblePostgresCodecRegistryWithBuiltins, buildBuiltinIdentityValue, buildColumnTypeSql, buildControlTableBootstrapQueries, buildPostgresCodecDescriptorRegistry, buildPostgresPlanDiff, buildSchemaLookupMap, buildSignMarkerBootstrapQueries, checkExpression, coalesceSubtreeIssues, col, columnDefaultAst, columnDefaultSequenceAst, columnExistsAst, columnNullabilityAst, columnTypeAst, computeContentHash, constraintExistsAst, contractToPostgresDatabaseSchemaNode, createExtension, createPostgresBuiltinCodecLookup, createPostgresBuiltinDataTypeLookup, createPostgresCodecRegistryWithBuiltins, createPostgresMigrationPlanner, createSchema, createTable, dataTransform, decodePostgresListText, definePostgresCodecs, describeFullTextIndexProblem, dropDefaultAction, errorPostgresMigrationStackMissing, escapeLiteral, extensionExistsAst, extensionInSchemaAst, fn, foreignKey, fullTextDocument, fullTextIndexProblems, hasForeignKey, hasIndex, hasUniqueConstraint, indexExistsAst, inlineLiteral, int4, int8, introspectedTypeText, isPgEnumParams, isPgOid, isPostgresCodecDescriptor, isPostgresSchema, jsonb, lit, moneyTextOfCents, noNullValuesAst, parsePostgresListText, pgBit, pgBitColumn, pgBitLengthParams, pgBool, pgBoolColumn, pgBytea, pgChar, pgCharColumn, pgCharacterLengthParams, pgDate, pgDateStoredText, pgEnum, pgEnumDescriptor, pgEnumParams, pgFloat4, pgFloat4Column, pgFloat8, pgFloat8Column, pgFloatColumn, pgInet, pgInetColumn, pgInt2, pgInt2Column, pgInt4, pgInt4Column, pgInt8, pgInt8Column, pgInt8NumberColumn, pgIntColumn, pgInterval, pgIntervalColumn, pgIntervalStringColumn, pgIntervalStringDescriptor, pgJson, pgJsonColumn, pgJsonb, pgJsonbColumn, pgJsonbEnumRefusal, pgMoney, pgMoneyColumn, pgMoneyStoredText, pgNumeric, pgNumericColumn, pgNumericParams, pgOid, pgOidColumn, pgPrecisionParams, pgTable, pgText, pgTextArray, pgTextColumn, pgTime, pgTimeStoredText, pgTimestamp, pgTimestampDateColumn, pgTimestampDateDescriptor, pgTimestampStoredText, pgTimestamptz, pgTimestamptzDateColumn, pgTimestamptzDateDescriptor, pgTimestamptzStoredText, pgTimetz, pgTimetzColumn, pgTimetzStoredText, pgTsquery, pgUnboundedIntColumn, pgUuid, pgUuidColumn, pgVarbit, pgVarbitColumn, pgVarchar, pgVarcharColumn, pgXml, pgXmlColumn, phrasetoTsquery, placeholder, plaintoTsquery, planIssues, policyInputFromSerialized, policyRoleList, postgresAggregateDescriptors, postgresCodec, postgresCodecDescriptorRegistry, postgresCodecRegistry, postgresCodecTraitsOf, postgresCreateNamespace, postgresDataTypeEntries, postgresDataTypes, postgresError, postgresNativeAuthoringTypes, postgresNowGeneratorControlDescriptors, postgresNowGenerators, postgresRenderCheckExpressions, postgresResolveDefault, postgresScalarAndNativeTypeConstructors, postgresScalarAuthoringTypes, postgresTextDataTypes, primaryKey, prisma7PostgresBinding, qualifiedEnumName, qualifyName, qualifyTableName, quoteIdentifier, quoteQualifiedName, rawSql, readPostgresDefault, renderCallsToTypeScript, renderFullTextIndexDocument, renderOps, resolveDdlSchemaForNamespaceStorage, resolveIdentityValue, rlsEnabledAst, rlsPolicyExistsAst, sequenceNameAvailableAst, sql, stackDataTypes, tableExistsAst, tableIsEmptyAst, tablePrimaryKeyAst, text, textArray, timestamptz, timestamptzJsDate, toRegclass, toTsquery, tsquery, unique, validateEnumValueLength, websearchToTsquery, weightGroupsOf };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as postgresAggregateDescriptors } from "./aggregates-
|
|
1
|
+
import { t as postgresAggregateDescriptors } from "./aggregates-CCEULCRK.mjs";
|
|
2
2
|
export { postgresAggregateDescriptors };
|
package/dist/target__control.mjs
CHANGED
|
@@ -14,11 +14,11 @@ import { t as postgresTargetDescriptorMeta } from "./descriptor-meta-DDydgB82-Cv
|
|
|
14
14
|
import { a as postgresDiffSubjectEntityKind, o as postgresDiffSubjectGranularity } from "./postgres-table-schema-node-nY6II-Uv-Bj-lgmSi.mjs";
|
|
15
15
|
import { t as PostgresDatabaseSchemaNode } from "./postgres-role-schema-node-DuljIQWp-D6Q5JyEs.mjs";
|
|
16
16
|
import { i as qualifyTableName } from "./planner-sql-checks-RKQqd_b5-CesTHuGH.mjs";
|
|
17
|
-
import {
|
|
18
|
-
import { r as diffPostgresSchema } from "./diff-database-schema-
|
|
17
|
+
import { Q as holdingStoredValue, U as SCHEMA_OBJECTS_SQL, Z as dropCheckConstraintId, at as schemaObjectsSummary, it as schemaContentsOf, rt as schemaBlockingObjects } from "./op-factory-call-DQW9c0ec-C3qv_STE.mjs";
|
|
18
|
+
import { r as diffPostgresSchema } from "./diff-database-schema-D_vOsC7_-CtLt0OwZ.mjs";
|
|
19
19
|
import { t as PostgresContractSerializer } from "./postgres-contract-view-pS-iTnm--BIKbQbBd.mjs";
|
|
20
|
-
import { o as postgresContractToSchema } from "./postgres-migration-
|
|
21
|
-
import { n as
|
|
20
|
+
import { o as postgresContractToSchema } from "./postgres-migration-CVWCygKt-DEXT0FE_.mjs";
|
|
21
|
+
import { n as postgresMarkedRemoval, r as postgresStoredValueCallClasses, t as createPostgresMigrationPlanner } from "./planner-BsSEbzfm-BrBEb_M1.mjs";
|
|
22
22
|
import { n as MARKER_LOCK_SQL, t as MARKER_LOCK_KEY } from "./marker-lock-DFc1Tfv5-BkBKBRE3.mjs";
|
|
23
23
|
import { _ as positionalArg, a as buildFullTextIndexAttribute, c as buildModelConstraintAttribute, f as inferPostgresPslContract, g as parseDefaultAttributeString, i as buildExtensionBlock, l as buildNativeEnumBlock, n as buildAttribute, o as buildIndexAttribute, p as namedArg, r as buildCheckAttribute, s as buildMapAttribute, t as SYNTHETIC_SPAN, v as typeArgument } from "./infer-psl-contract-Bn0Qzy4d-D9RlEL5y.mjs";
|
|
24
24
|
import { dataTypeParams, requiredParamKeys, validateCodecTypeParams } from "@prisma/orm-framework/components/codec";
|
|
@@ -36,7 +36,7 @@ import { authoringTypeConstructorArguments, findAuthoringTypeConstructorCall, ge
|
|
|
36
36
|
import { NAME_THE_PSL_SOURCE_LOSES, isPslIdentifier } from "@prisma/orm-framework/psl-parser";
|
|
37
37
|
import { printSqlExpressionLiteral, sqlTextsReadBack } from "@prisma/orm-family-sql/contract/sql-expression";
|
|
38
38
|
import { generatorCallsFor, inferredTypeConstructors, mapDefault, writtenTypeChoiceCall } from "@prisma/orm-family-sql/family/psl-build";
|
|
39
|
-
import { convertedColumnOf, requiredColumnOf, requiredColumnsOfMigration,
|
|
39
|
+
import { convertedColumnOf, keepRowsEdit, removalsOfMigration, requiredColumnOf, requiredColumnsOfMigration, rowsHoldingValueFailure, rowsHoldingValueOf, rowsWithoutValueFailure, runnerFailure, runnerSuccess, unconvertedFieldOf } from "@prisma/orm-family-sql/family/control";
|
|
40
40
|
import { notOk, ok, okVoid } from "@prisma/orm-framework/utils/result";
|
|
41
41
|
import { SqlSchemaVerifierBase } from "@prisma/orm-family-sql/family/ir";
|
|
42
42
|
import { effectiveControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
@@ -387,12 +387,12 @@ var PostgresMigrationRunner = class {
|
|
|
387
387
|
description: step.description,
|
|
388
388
|
...ifDefined("expectation", step.expectation)
|
|
389
389
|
};
|
|
390
|
-
const holding = phase === "precheck" ? await this.rowsHoldingValue(driver, step, operation, plan
|
|
390
|
+
const holding = phase === "precheck" ? await this.rowsHoldingValue(driver, step, operation, plan) : void 0;
|
|
391
391
|
if (holding !== void 0) return runnerFailure(code, holding.summary, {
|
|
392
392
|
why: failed,
|
|
393
393
|
meta: {
|
|
394
394
|
failedCheck,
|
|
395
|
-
rowsHoldingValue: holding.
|
|
395
|
+
rowsHoldingValue: holding.reports
|
|
396
396
|
}
|
|
397
397
|
});
|
|
398
398
|
return runnerFailure(code, rowsWithoutValue?.summary ?? failed, {
|
|
@@ -408,34 +408,32 @@ var PostgresMigrationRunner = class {
|
|
|
408
408
|
}
|
|
409
409
|
/**
|
|
410
410
|
* Counts the rows that hold the stored value a removal check guards, as `rowsHoldingValueMeta`
|
|
411
|
-
* marks the check
|
|
411
|
+
* marks the check, then those of every other removal of its migration whose check fails. A count
|
|
412
|
+
* of the failed check that fails leaves the failure without it.
|
|
412
413
|
*/
|
|
413
|
-
|
|
414
|
+
rowsHoldingValue(driver, step, operation, plan) {
|
|
414
415
|
const mark = rowsHoldingValueOf(step);
|
|
415
|
-
|
|
416
|
-
const
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
let rows;
|
|
421
|
-
try {
|
|
422
|
-
rows = (await driver.query(`SELECT COUNT(*)::int AS rows FROM ${qualifyTableName(details.schema, table)} WHERE ${quoteIdentifier(details.name)} = $1`, [stored])).rows[0]?.rows ?? 0;
|
|
423
|
-
} catch {
|
|
424
|
-
return;
|
|
425
|
-
}
|
|
426
|
-
return {
|
|
427
|
-
summary: rowsHoldingValueSummary(table, details.name, stored, rows),
|
|
428
|
-
report: {
|
|
429
|
-
enumValue: mark.enumValue,
|
|
430
|
-
value: stored,
|
|
431
|
-
rows,
|
|
432
|
-
operationIndex,
|
|
433
|
-
keepDataEdit: keepRowsEdit({
|
|
434
|
-
...details,
|
|
435
|
-
table
|
|
436
|
-
}, mark)
|
|
437
|
-
}
|
|
416
|
+
if (mark === void 0) return Promise.resolve(void 0);
|
|
417
|
+
const schemaOf = (marked) => {
|
|
418
|
+
const schema = marked.target.details?.schema;
|
|
419
|
+
if (schema === void 0) throw new InternalError("A stored value removal names the schema of its table");
|
|
420
|
+
return schema;
|
|
438
421
|
};
|
|
422
|
+
return rowsHoldingValueFailure({
|
|
423
|
+
failed: {
|
|
424
|
+
operation,
|
|
425
|
+
operationIndex: plan.operationIndex,
|
|
426
|
+
check: step,
|
|
427
|
+
mark
|
|
428
|
+
},
|
|
429
|
+
others: removalsOfMigration(plan.operations, plan.edges, plan.operationIndex),
|
|
430
|
+
checkFails: async ({ check }) => !this.stepResultIsTrue((await driver.query(check.sql, check.params ?? [])).rows),
|
|
431
|
+
count: async ({ operation: counted, mark: { table, column, storedValue, path } }) => {
|
|
432
|
+
const holding = holdingStoredValue(column, storedValue, path);
|
|
433
|
+
return (await driver.query(`SELECT COUNT(*)::int AS rows FROM ${qualifyTableName(schemaOf(counted), table)} WHERE ${holding.condition}`, holding.params)).rows[0]?.rows ?? 0;
|
|
434
|
+
},
|
|
435
|
+
keepDataEdit: ({ operation: kept, mark: keptMark }) => keepRowsEdit(postgresMarkedRemoval(schemaOf(kept), keptMark), keptMark, postgresStoredValueCallClasses)
|
|
436
|
+
});
|
|
439
437
|
}
|
|
440
438
|
/**
|
|
441
439
|
* Counts the rows the failed step's column has no value in, then those of every other column the
|