@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.
Files changed (68) hide show
  1. package/dist/{adapter-Bp0horgW.d.mts → adapter-B52C9G6y.d.mts} +11 -11
  2. package/dist/{adapter-Bp0horgW.d.mts.map → adapter-B52C9G6y.d.mts.map} +1 -1
  3. package/dist/adapter.d.mts +1 -1
  4. package/dist/adapter__adapter.d.mts +1 -1
  5. package/dist/{aggregates-0EfVySBb.d.mts → aggregates-CCEULCRK.d.mts} +11 -11
  6. package/dist/{aggregates-0EfVySBb.d.mts.map → aggregates-CCEULCRK.d.mts.map} +1 -1
  7. package/dist/{control-policy-RIiGtzLL-dMGUsj7L.mjs → control-policy-K52VpMX0-CateWffI.mjs} +7 -3
  8. package/dist/control-policy-K52VpMX0-CateWffI.mjs.map +1 -0
  9. package/dist/{diff-database-schema-CvA43-eB-BVodpxgx.mjs → diff-database-schema-D_vOsC7_-CtLt0OwZ.mjs} +3 -3
  10. package/dist/{diff-database-schema-CvA43-eB-BVodpxgx.mjs.map → diff-database-schema-D_vOsC7_-CtLt0OwZ.mjs.map} +1 -1
  11. package/dist/{issue-planner-BUo9S9Ge.d.mts → issue-planner-CbixMGS1.d.mts} +2 -2
  12. package/dist/{issue-planner-BUo9S9Ge.d.mts.map → issue-planner-CbixMGS1.d.mts.map} +1 -1
  13. package/dist/migration-Be_iuIpn.mjs.map +1 -1
  14. package/dist/{migration-Drs_EeiM.d.mts → migration-XqRvlRWn.d.mts} +2 -2
  15. package/dist/{migration-Drs_EeiM.d.mts.map → migration-XqRvlRWn.d.mts.map} +1 -1
  16. package/dist/op-factory-call-DO-2Ul_8.d.mts +1 -0
  17. package/dist/{op-factory-call-Ek2u4dEh-CIUcdOdr.mjs → op-factory-call-DQW9c0ec-C3qv_STE.mjs} +478 -38
  18. package/dist/op-factory-call-DQW9c0ec-C3qv_STE.mjs.map +1 -0
  19. package/dist/{op-factory-call-L1gqYhhk-DMnspvjf.d.mts → op-factory-call-fPC4Yzy6-B6JHyh7J.d.mts} +80 -9
  20. package/dist/op-factory-call-fPC4Yzy6-B6JHyh7J.d.mts.map +1 -0
  21. package/dist/{pack-vCp-QG0L.d.mts → pack-BhLR51a_.d.mts} +3 -3
  22. package/dist/{pack-vCp-QG0L.d.mts.map → pack-BhLR51a_.d.mts.map} +1 -1
  23. package/dist/{planner-CXGxEHRs-DnblCRvf.mjs → planner-BsSEbzfm-BrBEb_M1.mjs} +87 -68
  24. package/dist/planner-BsSEbzfm-BrBEb_M1.mjs.map +1 -0
  25. package/dist/{planner-Bl3kIyMG.d.mts → planner-Cw5KV0_B.d.mts} +2 -2
  26. package/dist/{planner-Bl3kIyMG.d.mts.map → planner-Cw5KV0_B.d.mts.map} +1 -1
  27. package/dist/planner-produced-postgres-migration-CoX6OBqo.d.mts +1 -0
  28. package/dist/{planner-produced-postgres-migration-Cx9bERx3-DRNnR16E.d.mts → planner-produced-postgres-migration-DgUtdqVh-DEhVIDmO.d.mts} +3 -3
  29. package/dist/planner-produced-postgres-migration-DgUtdqVh-DEhVIDmO.d.mts.map +1 -0
  30. package/dist/{planner-produced-postgres-migration-rvb49AcU-Cg2CikBV.mjs → planner-produced-postgres-migration-bn60skNP-CKjpb3S_.mjs} +4 -4
  31. package/dist/{planner-produced-postgres-migration-rvb49AcU-Cg2CikBV.mjs.map → planner-produced-postgres-migration-bn60skNP-CKjpb3S_.mjs.map} +1 -1
  32. package/dist/{postgres-migration-D0tEWVZ9-tr0Nt3a2.mjs → postgres-migration-CVWCygKt-DEXT0FE_.mjs} +48 -8
  33. package/dist/postgres-migration-CVWCygKt-DEXT0FE_.mjs.map +1 -0
  34. package/dist/{postgres-migration-DNnmFBsR-BJU9865a.d.mts → postgres-migration-MVAsm-Co-CcN0UJd7.d.mts} +53 -3
  35. package/dist/postgres-migration-MVAsm-Co-CcN0UJd7.d.mts.map +1 -0
  36. package/dist/{prisma7-binding-bhu33wEo.d.mts → prisma7-binding-DixgLN05.d.mts} +3 -3
  37. package/dist/{prisma7-binding-bhu33wEo.d.mts.map → prisma7-binding-DixgLN05.d.mts.map} +1 -1
  38. package/dist/{render-ops-B0eNPFAw-BgUftmhY.mjs → render-ops-BKDfKgOJ-DmoHztdY.mjs} +3 -3
  39. package/dist/{render-ops-B0eNPFAw-BgUftmhY.mjs.map → render-ops-BKDfKgOJ-DmoHztdY.mjs.map} +1 -1
  40. package/dist/target.d.mts +12 -12
  41. package/dist/target.mjs +8 -8
  42. package/dist/target__aggregates.d.mts +1 -1
  43. package/dist/target__control.mjs +30 -32
  44. package/dist/target__control.mjs.map +1 -1
  45. package/dist/target__diff-database-schema.mjs +1 -1
  46. package/dist/target__issue-planner.d.mts +1 -1
  47. package/dist/target__issue-planner.mjs +1 -1
  48. package/dist/target__migration.d.mts +2 -2
  49. package/dist/target__migration.mjs +2 -2
  50. package/dist/target__op-factory-call.d.mts +3 -3
  51. package/dist/target__op-factory-call.mjs +2 -2
  52. package/dist/target__pack.d.mts +1 -1
  53. package/dist/target__planner-produced-postgres-migration.d.mts +2 -2
  54. package/dist/target__planner-produced-postgres-migration.mjs +1 -1
  55. package/dist/target__planner.d.mts +1 -1
  56. package/dist/target__planner.mjs +2 -2
  57. package/dist/target__prisma7-binding.d.mts +1 -1
  58. package/dist/target__render-ops.mjs +1 -1
  59. package/package.json +10 -10
  60. package/dist/control-policy-RIiGtzLL-dMGUsj7L.mjs.map +0 -1
  61. package/dist/op-factory-call-D2HXLJQJ.d.mts +0 -1
  62. package/dist/op-factory-call-Ek2u4dEh-CIUcdOdr.mjs.map +0 -1
  63. package/dist/op-factory-call-L1gqYhhk-DMnspvjf.d.mts.map +0 -1
  64. package/dist/planner-CXGxEHRs-DnblCRvf.mjs.map +0 -1
  65. package/dist/planner-produced-postgres-migration-Cx9bERx3-DRNnR16E.d.mts.map +0 -1
  66. package/dist/planner-produced-postgres-migration-DRPVY4iL.d.mts +0 -1
  67. package/dist/postgres-migration-D0tEWVZ9-tr0Nt3a2.mjs.map +0 -1
  68. 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 RawSqlCall, B as SetDefaultCall, C as DropIndexCall, D as DropSchemaCall, E as DropPostgresRlsPolicyCall, F as RenamePostgresRlsPolicyCall, H as SetNotNullCall, I as RenameSchemaCall, K as createExtension, L as RenameTableCall, M as RenameColumnCall, N as RenameConstraintCall, O as DropTableCall, P as RenameIndexCall, R as ReplaceStoredValueCall, S as DropExtensionCall, T as DropNotNullCall, U as SetTableSchemaCall, V as SetExtensionSchemaCall, _ as DisableRowLevelSecurityCall, a as AddNativeEnumValueCall, b as DropConstraintCall, c as AddUniqueCall, d as CreateIndexCall, f as CreateNativeEnumTypeCall, g as DataTransformCall, h as CreateTableCall, i as AddForeignKeyCall, j as RemoveStoredValueCall, k as EnableRowLevelSecurityCall, l as AlterColumnTypeCall, m as CreateSchemaCall, n as AddColumnCall, o as AddPrimaryKeyCall, p as CreatePostgresRlsPolicyCall, r as AddColumnWithTemporaryDefaultCall, s as AddRequiredColumnToEmptyTableCall, t as AddCheckConstraintCall, u as CreateExtensionCall, v as DropCheckConstraintCall, w as DropNativeEnumTypeCall, x as DropDefaultCall, y as DropColumnCall } from "./op-factory-call-Ek2u4dEh-CIUcdOdr.mjs";
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-RIiGtzLL-dMGUsj7L.mjs";
32
- import { n as contractToPostgresDatabaseSchemaNode, t as buildPostgresPlanDiff } from "./diff-database-schema-CvA43-eB-BVodpxgx.mjs";
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-D0tEWVZ9-tr0Nt3a2.mjs";
36
- import { t as renderOps } from "./render-ops-B0eNPFAw-BgUftmhY.mjs";
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-rvb49AcU-Cg2CikBV.mjs";
39
- import { t as createPostgresMigrationPlanner } from "./planner-CXGxEHRs-DnblCRvf.mjs";
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-0EfVySBb.mjs";
1
+ import { t as postgresAggregateDescriptors } from "./aggregates-CCEULCRK.mjs";
2
2
  export { postgresAggregateDescriptors };
@@ -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 { $ as schemaContentsOf, Q as schemaBlockingObjects, et as schemaObjectsSummary, q as dropCheckConstraintId, z as SCHEMA_OBJECTS_SQL } from "./op-factory-call-Ek2u4dEh-CIUcdOdr.mjs";
18
- import { r as diffPostgresSchema } from "./diff-database-schema-CvA43-eB-BVodpxgx.mjs";
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-D0tEWVZ9-tr0Nt3a2.mjs";
21
- import { n as keepRowsEdit, t as createPostgresMigrationPlanner } from "./planner-CXGxEHRs-DnblCRvf.mjs";
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, rowsHoldingValueOf, rowsHoldingValueSummary, rowsWithoutValueFailure, runnerFailure, runnerSuccess, unconvertedFieldOf } from "@prisma/orm-family-sql/family/control";
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.operationIndex) : void 0;
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.report
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. A count that fails leaves the failure without it.
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
- async rowsHoldingValue(driver, step, operation, operationIndex) {
414
+ rowsHoldingValue(driver, step, operation, plan) {
414
415
  const mark = rowsHoldingValueOf(step);
415
- const details = operation.target.details;
416
- const stored = step.params?.[0];
417
- if (mark === void 0 || details?.table === void 0) return void 0;
418
- if (typeof stored !== "string" && typeof stored !== "number") return void 0;
419
- const { table } = details;
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