@prisma/orm-family-sql 8.0.0-rc.16-dev.6 → 8.0.0-rc.16-dev.8
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/{control-DxvOSmwF.mjs → control-BRbds4vn.mjs} +627 -123
- package/dist/control-BRbds4vn.mjs.map +1 -0
- package/dist/{control-DCt08EpW.d.mts → control-BkyDhucB.d.mts} +262 -56
- package/dist/control-BkyDhucB.d.mts.map +1 -0
- package/dist/{diff-3tfqwWS7.d.mts → diff-DMOqiT2h.d.mts} +2 -2
- package/dist/{diff-3tfqwWS7.d.mts.map → diff-DMOqiT2h.d.mts.map} +1 -1
- package/dist/family.d.mts +5 -5
- package/dist/family.mjs +3 -3
- package/dist/family__control.d.mts +3 -3
- package/dist/family__control.mjs +2 -2
- package/dist/family__diff.d.mts +1 -1
- package/dist/family__migration.d.mts +1 -1
- package/dist/family__migration.mjs +1 -1
- package/dist/{migration-D6NJlA6-.d.mts → migration-C5HGygKM.d.mts} +3 -3
- package/dist/{migration-D6NJlA6-.d.mts.map → migration-C5HGygKM.d.mts.map} +1 -1
- package/dist/{migration-CK4oePIo.mjs → migration-Dy_4Wmiy.mjs} +3 -3
- package/dist/{migration-CK4oePIo.mjs.map → migration-Dy_4Wmiy.mjs.map} +1 -1
- package/dist/orm-client.d.mts +120 -120
- package/dist/orm-client.d.mts.map +1 -1
- package/dist/orm-client.mjs +1268 -1268
- package/dist/orm-client.mjs.map +1 -1
- package/dist/{types-CvuS68sy-ReNXbgpE.d.mts → types-CzxOObSY-CNWyrf87.d.mts} +12 -8
- package/dist/{types-CvuS68sy-ReNXbgpE.d.mts.map → types-CzxOObSY-CNWyrf87.d.mts.map} +1 -1
- package/package.json +18 -18
- package/dist/control-DCt08EpW.d.mts.map +0 -1
- package/dist/control-DxvOSmwF.mjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as StorageColumn } from "./storage-table-BBcKoAuF-CssyCQhM.mjs";
|
|
2
|
-
import { l as SqlStorage
|
|
2
|
+
import { l as SqlStorage } from "./sql-storage-DSnnRQAf-DaHPnley.mjs";
|
|
3
3
|
import { O as SqlControlDriverInstance } from "./types-DV040Uuq-Bu8CnbMa.mjs";
|
|
4
4
|
import "./types-DkOYK86-.mjs";
|
|
5
5
|
import { r as SqlOperationDescriptors } from "./index-qOLTnfYz.mjs";
|
|
@@ -14,14 +14,14 @@ import { _ as SqlSchemaIR, y as SqlSchemaIRNode } from "./types-CLsPsUiw-Db1BsN9
|
|
|
14
14
|
import "./types-D6XuABFQ.mjs";
|
|
15
15
|
import { r as SqlControlAdapter } from "./control-adapter-CkFfBVei-Ba9JNrCN.mjs";
|
|
16
16
|
import { t as sqlFamilyEnumSpec } from "./authoring-entity-types-CZ-vdwYS-Bq3LXsCn.mjs";
|
|
17
|
-
import { D as SqlPlannerFailureResult, S as SqlMigrationRunnerSuccessValue, _ as SqlMigrationRunnerErrorCode, b as SqlMigrationRunnerFailure, g as SqlMigrationRunner, k as SqlPlannerSuccessResult, l as SqlMigrationPlan, m as SqlMigrationPlanner, n as CodecControlHooks, r as CreateSqlMigrationPlanOptions, t as AnyRecord, w as SqlPlannerConflict } from "./types-
|
|
17
|
+
import { D as SqlPlannerFailureResult, S as SqlMigrationRunnerSuccessValue, _ as SqlMigrationRunnerErrorCode, b as SqlMigrationRunnerFailure, g as SqlMigrationRunner, k as SqlPlannerSuccessResult, l as SqlMigrationPlan, m as SqlMigrationPlanner, n as CodecControlHooks, r as CreateSqlMigrationPlanOptions, t as AnyRecord, w as SqlPlannerConflict } from "./types-CzxOObSY-CNWyrf87.mjs";
|
|
18
18
|
import { t as SqlSchemaDiffFn } from "./schema-differ-CqWOkoW9--uxNOini.mjs";
|
|
19
19
|
import { StructuredError } from "@prisma/orm-framework/utils/structured-error";
|
|
20
20
|
import { DataTypeSupport, PresetStorageTemplate, TIMESTAMP_NOW_GENERATOR_ID } from "@prisma/orm-framework/components/authoring";
|
|
21
21
|
import { CodecLookupWithDescriptors, DataType } from "@prisma/orm-framework/components/codec";
|
|
22
|
-
import { ColumnDefault, Contract, ControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
22
|
+
import { ColumnDefault, Contract, ContractWithDomain, ControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
23
23
|
import { TargetBoundComponentDescriptor } from "@prisma/orm-framework/components/components";
|
|
24
|
-
import { AssembledAuthoringContributions, ContractSerializer, ControlFamilyDescriptor, ControlFamilyInstance, ControlStack, DiffSubjectGranularity, MigratableTargetDescriptor, MigrationOperationClass, MigrationOperationPolicy, MigrationOperationPolicy as MigrationOperationPolicy$1, MigrationPlan as MigrationPlan$1, MigrationPlanOperation, MigrationPlanOperation as MigrationPlanOperation$1, MigrationPlanner, MigrationPlannerConflict, MigrationPlannerConflict as MigrationPlannerConflict$1, MigrationPlannerResult, OpFactoryCall, OperationPreview, OperationPreviewCapable, PslContractBuildCapable, PslContractInferCapable, SchemaDiffIssue, SchemaVerifier, SchemaViewCapable, TargetMigrationsCapability, VerifyDatabaseResult, VerifyDatabaseSchemaResult, assembleAuthoringContributions } from "@prisma/orm-framework/components/control";
|
|
24
|
+
import { AppliedMigrationStatement, AssembledAuthoringContributions, ContractSerializer, ControlFamilyDescriptor, ControlFamilyInstance, ControlStack, DiffSubjectGranularity, MigratableTargetDescriptor, MigrationOperationClass, MigrationOperationClass as MigrationOperationClass$1, MigrationOperationPolicy, MigrationOperationPolicy as MigrationOperationPolicy$1, MigrationPlan as MigrationPlan$1, MigrationPlanOperation, MigrationPlanOperation as MigrationPlanOperation$1, MigrationPlanSubjects, MigrationPlanner, MigrationPlannerConflict, MigrationPlannerConflict as MigrationPlannerConflict$1, MigrationPlannerResult, ModelCoordinate, OpFactoryCall, OperationPreview, OperationPreviewCapable, PslContractBuildCapable, PslContractInferCapable, ResolvedFieldRenameStatement, ResolvedMigrationStatement, ResolvedModelRenameStatement, SchemaDiffIssue, SchemaVerifier, SchemaViewCapable, TargetMigrationsCapability, VerifyDatabaseResult, VerifyDatabaseSchemaResult, assembleAuthoringContributions } from "@prisma/orm-framework/components/control";
|
|
25
25
|
import { NotOk, Ok, Result } from "@prisma/orm-framework/utils/result";
|
|
26
26
|
import { PslDocumentAst } from "@prisma/orm-framework/components/psl-ast";
|
|
27
27
|
import { EmissionSpi, TypesImportSpec } from "@prisma/orm-framework/components/emission";
|
|
@@ -134,6 +134,7 @@ interface SqlControlFamilyInstance extends ControlFamilyInstance<'sql', SqlSchem
|
|
|
134
134
|
}): Promise<void>;
|
|
135
135
|
bootstrapControlTableQueries(): readonly DdlNode[];
|
|
136
136
|
toOperationPreview(operations: readonly MigrationPlanOperation[]): OperationPreview;
|
|
137
|
+
storageNameOf(operation: MigrationPlanOperation): string;
|
|
137
138
|
}
|
|
138
139
|
//#endregion
|
|
139
140
|
//#region src/core/control-descriptor.d.ts
|
|
@@ -543,41 +544,6 @@ interface SqlControlTargetDescriptor<TTargetId extends string, TTargetDetails, T
|
|
|
543
544
|
createRunner(family: SqlControlFamilyInstance): SqlMigrationRunner<TTargetDetails>;
|
|
544
545
|
}
|
|
545
546
|
//#endregion
|
|
546
|
-
//#region src/core/migrations/apply-table-rename.d.ts
|
|
547
|
-
/** A table a migration renames: `namespaceId` is `undefined` when the migration leaves the namespace to the contracts. */
|
|
548
|
-
interface TableRename {
|
|
549
|
-
readonly namespaceId: string | undefined;
|
|
550
|
-
readonly from: string;
|
|
551
|
-
readonly to: string;
|
|
552
|
-
}
|
|
553
|
-
/** A rename after its table was found in the start contract. */
|
|
554
|
-
interface ResolvedTableRename {
|
|
555
|
-
readonly namespaceId: string;
|
|
556
|
-
readonly from: string;
|
|
557
|
-
readonly to: string;
|
|
558
|
-
}
|
|
559
|
-
/**
|
|
560
|
-
* Renames a target's own references to a renamed table inside one namespace's entries: entity kinds the family does not know, such as a target's row-level-security markers, that name a table.
|
|
561
|
-
*/
|
|
562
|
-
type RenameTableReferences = (entries: SqlNamespaceEntries, rename: ResolvedTableRename) => SqlNamespaceEntries;
|
|
563
|
-
interface ApplyTableRenameInput {
|
|
564
|
-
readonly startContract: Contract<SqlStorage> | null;
|
|
565
|
-
readonly endContract: Contract<SqlStorage>;
|
|
566
|
-
readonly rename: TableRename;
|
|
567
|
-
readonly renameTableReferences: RenameTableReferences | undefined;
|
|
568
|
-
}
|
|
569
|
-
interface AppliedTableRename {
|
|
570
|
-
/** The start contract with the table under its new name. */
|
|
571
|
-
readonly contract: Contract<SqlStorage>;
|
|
572
|
-
readonly rename: ResolvedTableRename;
|
|
573
|
-
}
|
|
574
|
-
/**
|
|
575
|
-
* Resolves the table a migration renames against its start and end contracts and returns the start contract with that table under its new name, so a diff against the end contract sees the table under one name. The table must exist in the start contract (in exactly one namespace when the namespace is not given), and the new name must exist in the end contract and not in the start contract; otherwise the rename is refused with `MIGRATION.TABLE_RENAME_UNMATCHED`.
|
|
576
|
-
*
|
|
577
|
-
* Foreign keys that name the renamed table on either side are retargeted. Index, unique, check and primary-key names are carried unchanged. Target entity kinds that name the table are renamed by the target's `renameTableReferences`.
|
|
578
|
-
*/
|
|
579
|
-
declare function applyTableRename(input: ApplyTableRenameInput): Result<AppliedTableRename, StructuredError>;
|
|
580
|
-
//#endregion
|
|
581
547
|
//#region src/core/migrations/contract-to-schema-ir.d.ts
|
|
582
548
|
/**
|
|
583
549
|
* Target-specific callback that renders a `ColumnDefault` into the raw SQL literal
|
|
@@ -780,6 +746,84 @@ declare function partitionIssuesByControlPolicy<TIssue>(options: {
|
|
|
780
746
|
readonly suppressions: readonly SuppressionRecord[];
|
|
781
747
|
};
|
|
782
748
|
//#endregion
|
|
749
|
+
//#region src/core/migrations/schema-tables.d.ts
|
|
750
|
+
/**
|
|
751
|
+
* The tables a schema has, addressed by the contract's namespace ids: the schema a plan starts
|
|
752
|
+
* from, or the schema a migration's earlier renames leave behind.
|
|
753
|
+
*/
|
|
754
|
+
interface SchemaTables {
|
|
755
|
+
hasTable(namespaceId: string, table: string): boolean;
|
|
756
|
+
hasColumn(namespaceId: string, table: string, column: string): boolean;
|
|
757
|
+
/**
|
|
758
|
+
* The namespace's tables the database takes for `table`: the table itself where names compare
|
|
759
|
+
* exactly, and every table whose name differs only in case where the database ignores case.
|
|
760
|
+
*/
|
|
761
|
+
tablesNamed(namespaceId: string, table: string): readonly string[];
|
|
762
|
+
/**
|
|
763
|
+
* The table's columns the database takes for `column`: the column itself where names compare
|
|
764
|
+
* exactly, and every column whose name differs only in case where the database ignores case.
|
|
765
|
+
*/
|
|
766
|
+
columnsNamed(namespaceId: string, table: string, column: string): readonly string[];
|
|
767
|
+
namespacesWithTable(table: string): readonly string[];
|
|
768
|
+
}
|
|
769
|
+
//#endregion
|
|
770
|
+
//#region src/core/migrations/resolve-column-rename.d.ts
|
|
771
|
+
declare const COLUMN_RENAME_UNMATCHED_CODE = "MIGRATION.COLUMN_RENAME_UNMATCHED";
|
|
772
|
+
/**
|
|
773
|
+
* A column rename as a `renameColumn` call states it: `namespaceId` is `undefined` when the
|
|
774
|
+
* namespace is left to the contracts.
|
|
775
|
+
*/
|
|
776
|
+
interface ColumnRenameRequest {
|
|
777
|
+
readonly namespaceId: string | undefined;
|
|
778
|
+
readonly table: string;
|
|
779
|
+
readonly from: string;
|
|
780
|
+
readonly to: string;
|
|
781
|
+
}
|
|
782
|
+
/** A column rename on a table in a known namespace. */
|
|
783
|
+
interface ColumnRename {
|
|
784
|
+
readonly namespaceId: string;
|
|
785
|
+
readonly table: string;
|
|
786
|
+
readonly from: string;
|
|
787
|
+
readonly to: string;
|
|
788
|
+
}
|
|
789
|
+
/**
|
|
790
|
+
* Refuses a `renameColumn` call that does not match the migration's contracts, with
|
|
791
|
+
* `MIGRATION.COLUMN_RENAME_UNMATCHED`.
|
|
792
|
+
*/
|
|
793
|
+
declare function unmatchedColumnRename(rename: ColumnRenameRequest, reason: string): StructuredError;
|
|
794
|
+
/**
|
|
795
|
+
* Resolves a column a migration renames with {@link checkColumnRename}, refusing a mismatch with
|
|
796
|
+
* `MIGRATION.COLUMN_RENAME_UNMATCHED`.
|
|
797
|
+
*/
|
|
798
|
+
declare function resolveColumnRenameAgainst(previous: SchemaTables, endContract: Contract<SqlStorage>, rename: ColumnRenameRequest): Result<ColumnRename, StructuredError>;
|
|
799
|
+
//#endregion
|
|
800
|
+
//#region src/core/migrations/resolve-table-rename.d.ts
|
|
801
|
+
/**
|
|
802
|
+
* A table rename as a `renameTable` call or a guard's advice states it: `namespaceId` is
|
|
803
|
+
* `undefined` when the namespace is left to the contracts.
|
|
804
|
+
*/
|
|
805
|
+
interface TableRenameRequest {
|
|
806
|
+
readonly namespaceId: string | undefined;
|
|
807
|
+
readonly from: string;
|
|
808
|
+
readonly to: string;
|
|
809
|
+
}
|
|
810
|
+
/** A table rename in a known namespace. */
|
|
811
|
+
interface TableRename {
|
|
812
|
+
readonly namespaceId: string;
|
|
813
|
+
readonly from: string;
|
|
814
|
+
readonly to: string;
|
|
815
|
+
}
|
|
816
|
+
/**
|
|
817
|
+
* Refuses a `renameTable` call that does not match the migration's contracts, with
|
|
818
|
+
* `MIGRATION.TABLE_RENAME_UNMATCHED`.
|
|
819
|
+
*/
|
|
820
|
+
declare function unmatchedTableRename(rename: TableRenameRequest, reason: string): StructuredError;
|
|
821
|
+
/**
|
|
822
|
+
* Resolves a table a migration renames with {@link checkTableRename}, refusing a mismatch with
|
|
823
|
+
* `MIGRATION.TABLE_RENAME_UNMATCHED`.
|
|
824
|
+
*/
|
|
825
|
+
declare function resolveTableRenameAgainst(previous: SchemaTables, endContract: Contract<SqlStorage>, rename: TableRenameRequest): Result<TableRename, StructuredError>;
|
|
826
|
+
//#endregion
|
|
783
827
|
//#region src/core/migrations/field-event-planner.d.ts
|
|
784
828
|
interface PlanFieldEventOperationsOptions {
|
|
785
829
|
/**
|
|
@@ -801,12 +845,90 @@ interface PlanFieldEventOperationsOptions {
|
|
|
801
845
|
* `RawSqlCall`.
|
|
802
846
|
*/
|
|
803
847
|
readonly codecHooks: ReadonlyMap<string, CodecControlHooks>;
|
|
848
|
+
/**
|
|
849
|
+
* The table renames the plan applies. A column under a renamed table's old name is the same
|
|
850
|
+
* column under its new name, so a rename alone fires no event.
|
|
851
|
+
*/
|
|
852
|
+
readonly tableRenames: readonly TableRename[];
|
|
853
|
+
/**
|
|
854
|
+
* The column renames the plan applies, each on the table under the name it has after the table
|
|
855
|
+
* renames. A column under its old name is the same column under its new name.
|
|
856
|
+
*/
|
|
857
|
+
readonly columnRenames: readonly ColumnRename[];
|
|
858
|
+
}
|
|
859
|
+
/** A call a codec hook returned, with the column of the field event it was returned for. */
|
|
860
|
+
interface FieldEventCall {
|
|
861
|
+
readonly call: OpFactoryCall;
|
|
862
|
+
readonly namespaceId: string;
|
|
863
|
+
/** The table and column as the new contract names them. */
|
|
864
|
+
readonly tableName: string;
|
|
865
|
+
readonly columnName: string;
|
|
804
866
|
}
|
|
805
867
|
declare function planFieldEventOperations(options: PlanFieldEventOperationsOptions): readonly OpFactoryCall[];
|
|
868
|
+
/** The calls the codec hooks return, each with the field event's column. */
|
|
869
|
+
declare function planFieldEventCalls(options: PlanFieldEventOperationsOptions): readonly FieldEventCall[];
|
|
870
|
+
//#endregion
|
|
871
|
+
//#region src/core/migrations/operation-storage-name.d.ts
|
|
872
|
+
/**
|
|
873
|
+
* The name the database knows an operation's object by, read from the operation's target
|
|
874
|
+
* details: `schema.table.column` for a column, `schema.name` for anything else, without the
|
|
875
|
+
* schema in the unbound namespace. An operation without details is named by its id.
|
|
876
|
+
*/
|
|
877
|
+
declare function storageNameOfOperation(operation: MigrationPlanOperation): string;
|
|
878
|
+
//#endregion
|
|
879
|
+
//#region src/core/migrations/operation-subjects.d.ts
|
|
880
|
+
/**
|
|
881
|
+
* What an operation is about, as the plan names it after its rename statements: a table, or a
|
|
882
|
+
* column of one, in a storage namespace, or neither, such as a type. `storageName` names the
|
|
883
|
+
* subject when no model of the origin contract stores it.
|
|
884
|
+
*/
|
|
885
|
+
interface SubjectStorage {
|
|
886
|
+
readonly storageName: string;
|
|
887
|
+
readonly table: {
|
|
888
|
+
readonly namespaceId: string;
|
|
889
|
+
readonly table: string;
|
|
890
|
+
readonly column: string | undefined;
|
|
891
|
+
} | undefined;
|
|
892
|
+
}
|
|
893
|
+
/** What a codec hook's call is about: the column of the field event it was returned for. */
|
|
894
|
+
declare function fieldEventStorage(field: {
|
|
895
|
+
readonly namespaceId: string;
|
|
896
|
+
readonly tableName: string;
|
|
897
|
+
readonly columnName: string;
|
|
898
|
+
}): SubjectStorage;
|
|
899
|
+
/**
|
|
900
|
+
* Names for destructive calls a target cannot map to storage: each call's factory name, with a
|
|
901
|
+
* `#n` ordinal when several calls of the plan share it, so each name picks out one call.
|
|
902
|
+
*/
|
|
903
|
+
declare function unknownCallNames<TCall extends {
|
|
904
|
+
readonly factoryName: string;
|
|
905
|
+
}>(calls: readonly TCall[]): ReadonlyMap<TCall, string>;
|
|
906
|
+
/** A call of a plan: how many operations it lowers to, and what the first of them is about. */
|
|
907
|
+
interface CallSubjects {
|
|
908
|
+
readonly operationCount: number;
|
|
909
|
+
/** What the call's operation loses, one entry per model, field or storage name. */
|
|
910
|
+
readonly dataLoss: readonly SubjectStorage[];
|
|
911
|
+
/** What the call's operation changes access to, and whether it widens it. */
|
|
912
|
+
readonly accessWidening: readonly (SubjectStorage & {
|
|
913
|
+
readonly widens: boolean;
|
|
914
|
+
})[];
|
|
915
|
+
}
|
|
916
|
+
interface SubjectContext {
|
|
917
|
+
readonly fromContract: ContractWithDomain | null;
|
|
918
|
+
readonly contract: ContractWithDomain;
|
|
919
|
+
/** The rename statements the plan applied, whose renames a target names the new way. */
|
|
920
|
+
readonly statements: readonly ResolvedMigrationStatement[];
|
|
921
|
+
}
|
|
922
|
+
/**
|
|
923
|
+
* The subject of each operation that loses data and each that widens access, at its position in
|
|
924
|
+
* the plan. A subject is a model or a field of the origin contract when one stores it, found under
|
|
925
|
+
* its origin name when a rename statement renamed its table or column earlier in the plan.
|
|
926
|
+
*/
|
|
927
|
+
declare function subjectsOfCalls(calls: readonly CallSubjects[], context: SubjectContext): MigrationPlanSubjects;
|
|
806
928
|
//#endregion
|
|
807
929
|
//#region src/core/migrations/plan-helpers.d.ts
|
|
808
930
|
declare function createMigrationPlan<TTargetDetails>(options: CreateSqlMigrationPlanOptions<TTargetDetails>): SqlMigrationPlan<TTargetDetails>;
|
|
809
|
-
declare function plannerSuccess<TTargetDetails>(plan: SqlMigrationPlan<TTargetDetails>, warnings?: readonly SqlPlannerConflict[]): SqlPlannerSuccessResult<TTargetDetails>;
|
|
931
|
+
declare function plannerSuccess<TTargetDetails>(plan: SqlMigrationPlan<TTargetDetails>, appliedStatements: readonly AppliedMigrationStatement[], subjects: MigrationPlanSubjects, warnings?: readonly SqlPlannerConflict[]): SqlPlannerSuccessResult<TTargetDetails>;
|
|
810
932
|
declare function plannerFailure(conflicts: readonly SqlPlannerConflict[]): SqlPlannerFailureResult;
|
|
811
933
|
/**
|
|
812
934
|
* Creates a successful migration runner result.
|
|
@@ -833,24 +955,108 @@ declare const INIT_ADDITIVE_POLICY: MigrationOperationPolicy;
|
|
|
833
955
|
/** The codecs and data types a set of composed components registers. */
|
|
834
956
|
declare function sqlTypeLookupsOf(frameworkComponents: ReadonlyArray<TargetBoundComponentDescriptor<'sql', string>>): SqlTypeLookups;
|
|
835
957
|
//#endregion
|
|
958
|
+
//#region src/core/migrations/statement-planning.d.ts
|
|
959
|
+
/** Where a model's rows live: a table in a storage namespace. */
|
|
960
|
+
interface ModelTable {
|
|
961
|
+
readonly namespaceId: string;
|
|
962
|
+
readonly table: string;
|
|
963
|
+
}
|
|
964
|
+
/** What a model rename does to storage. */
|
|
965
|
+
type ModelStorageEffect = {
|
|
966
|
+
readonly kind: 'unchanged';
|
|
967
|
+
} | {
|
|
968
|
+
readonly kind: 'renameTable';
|
|
969
|
+
readonly rename: TableRename;
|
|
970
|
+
} | {
|
|
971
|
+
readonly kind: 'moveNamespace';
|
|
972
|
+
readonly from: ModelTable;
|
|
973
|
+
readonly to: ModelTable;
|
|
974
|
+
};
|
|
975
|
+
/** What a field rename does to storage. */
|
|
976
|
+
type FieldStorageEffect = {
|
|
977
|
+
readonly kind: 'unchanged';
|
|
978
|
+
} | {
|
|
979
|
+
readonly kind: 'renameColumn';
|
|
980
|
+
/** The origin model's table, as the origin contract names it. */
|
|
981
|
+
readonly table: ModelTable;
|
|
982
|
+
readonly from: string;
|
|
983
|
+
readonly to: string;
|
|
984
|
+
};
|
|
985
|
+
/** A model the contract stores in no table, so a statement on it has no storage effect. */
|
|
986
|
+
interface NoTable {
|
|
987
|
+
readonly kind: 'noTable';
|
|
988
|
+
readonly model: ModelCoordinate;
|
|
989
|
+
}
|
|
990
|
+
/** A field stored in a column on one side of a statement only, which no rename can map. */
|
|
991
|
+
interface ColumnOnOneSide {
|
|
992
|
+
readonly kind: 'columnOnOneSide';
|
|
993
|
+
}
|
|
994
|
+
/**
|
|
995
|
+
* The storage effect of a model rename: the origin model's table compared with the destination
|
|
996
|
+
* model's. Equal tables mean the rename needs no storage change.
|
|
997
|
+
*/
|
|
998
|
+
declare function modelRenameStorageEffect(statement: ResolvedModelRenameStatement, fromContract: ContractWithDomain, contract: ContractWithDomain): Result<ModelStorageEffect, NoTable>;
|
|
999
|
+
/**
|
|
1000
|
+
* The storage effect of a field rename: the origin field's column compared with the destination
|
|
1001
|
+
* field's. A relation field has no column on either side, and equal columns need no change.
|
|
1002
|
+
*/
|
|
1003
|
+
declare function fieldRenameStorageEffect(statement: ResolvedFieldRenameStatement, fromContract: ContractWithDomain, contract: ContractWithDomain): Result<FieldStorageEffect, NoTable | ColumnOnOneSide>;
|
|
1004
|
+
/** A call that lowers to one operation, such as a companion of a rename. */
|
|
1005
|
+
interface SingleOperationCall {
|
|
1006
|
+
readonly operationClass: MigrationOperationClass;
|
|
1007
|
+
}
|
|
1008
|
+
/**
|
|
1009
|
+
* A call that lowers to its own operation, then each companion's, in that order: a table or column
|
|
1010
|
+
* rename, whether a statement plans it or a hand-written migration calls it.
|
|
1011
|
+
*/
|
|
1012
|
+
interface CallWithCompanions extends SingleOperationCall {
|
|
1013
|
+
readonly companions: readonly SingleOperationCall[];
|
|
1014
|
+
}
|
|
1015
|
+
/** What a target supplies for planning statements against its working schema. */
|
|
1016
|
+
interface StatementPlanningTarget<TCall extends CallWithCompanions> {
|
|
1017
|
+
/** The tables of the working schema as earlier statements have left it. */
|
|
1018
|
+
tables(): SchemaTables;
|
|
1019
|
+
/** The call that renames a table, with its companions, computed against the working schema. */
|
|
1020
|
+
renameTableCall(rename: TableRename): TCall;
|
|
1021
|
+
/** The call that renames a column, with its companions, computed against the working schema. */
|
|
1022
|
+
renameColumnCall(rename: ColumnRename): TCall;
|
|
1023
|
+
/** Applies a call to the working schema. */
|
|
1024
|
+
apply(call: TCall): void;
|
|
1025
|
+
/** The `renameTable` call a user writes in `migration.ts` to make `rename` by hand. */
|
|
1026
|
+
renderTableRename(rename: TableRename): string;
|
|
1027
|
+
/** The SQL statements a user runs against the database to make `rename` by hand. */
|
|
1028
|
+
tableRenameByHand(rename: TableRename): readonly string[];
|
|
1029
|
+
}
|
|
1030
|
+
interface PlannedStatements<TCall extends CallWithCompanions> {
|
|
1031
|
+
/**
|
|
1032
|
+
* The calls, which a target puts first in its plan: each statement's `operationIndexes` count
|
|
1033
|
+
* from the first operation of the first call.
|
|
1034
|
+
*/
|
|
1035
|
+
readonly calls: readonly TCall[];
|
|
1036
|
+
readonly tableRenames: readonly TableRename[];
|
|
1037
|
+
readonly columnRenames: readonly ColumnRename[];
|
|
1038
|
+
readonly appliedStatements: readonly AppliedMigrationStatement[];
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
* Plans the statements in order against a target's working schema: each model rename becomes a
|
|
1042
|
+
* table rename and each field rename a column rename, computed against the schema earlier
|
|
1043
|
+
* statements left, then applied to it. The first statement that cannot be planned fails the whole
|
|
1044
|
+
* plan with a `statementRefused` conflict that carries the statement.
|
|
1045
|
+
*/
|
|
1046
|
+
declare function planStatements<TCall extends CallWithCompanions>(input: {
|
|
1047
|
+
readonly statements: readonly ResolvedMigrationStatement[];
|
|
1048
|
+
readonly fromContract: Contract<SqlStorage> | null;
|
|
1049
|
+
readonly contract: Contract<SqlStorage>;
|
|
1050
|
+
readonly policy: MigrationOperationPolicy;
|
|
1051
|
+
readonly target: StatementPlanningTarget<TCall>;
|
|
1052
|
+
}): Result<PlannedStatements<TCall>, SqlPlannerConflict>;
|
|
1053
|
+
//#endregion
|
|
836
1054
|
//#region src/core/migrations/table-name-case-guard.d.ts
|
|
837
1055
|
declare const TABLE_NAME_CASE_CHANGED_CODE = "MIGRATION.TABLE_NAME_CASE_CHANGED";
|
|
838
1056
|
/** The one fact the guard needs about a table the plan would drop or create. */
|
|
839
1057
|
interface TableNameCaseGuardTable {
|
|
840
1058
|
readonly name: string;
|
|
841
1059
|
}
|
|
842
|
-
/** A table rename the operator performs by hand, for the target to write the statements of. */
|
|
843
|
-
interface TableRenameByHand {
|
|
844
|
-
readonly namespaceId: string;
|
|
845
|
-
readonly from: string;
|
|
846
|
-
readonly to: string;
|
|
847
|
-
}
|
|
848
|
-
/** A table rename to write as a migration call; `namespaceId` is `undefined` when the call does not need to name the namespace. */
|
|
849
|
-
interface TableRenameInMigration {
|
|
850
|
-
readonly namespaceId: string | undefined;
|
|
851
|
-
readonly from: string;
|
|
852
|
-
readonly to: string;
|
|
853
|
-
}
|
|
854
1060
|
/**
|
|
855
1061
|
* Finds every (drop `X`, create `Y`) pair in the same namespace where `X` is
|
|
856
1062
|
* `Y` with its first letter lowered. That shape is the signature of a schema
|
|
@@ -866,8 +1072,8 @@ declare function detectTableNameCaseChanges(input: {
|
|
|
866
1072
|
readonly issues: readonly SchemaDiffIssue[];
|
|
867
1073
|
readonly tableOf: (issue: SchemaDiffIssue) => TableNameCaseGuardTable | undefined;
|
|
868
1074
|
readonly namespaceIdOf: (issue: SchemaDiffIssue) => string;
|
|
869
|
-
readonly renameByHandStatements: (rename:
|
|
870
|
-
readonly renameTableCall: (rename:
|
|
1075
|
+
readonly renameByHandStatements: (rename: TableRename) => readonly string[];
|
|
1076
|
+
readonly renameTableCall: (rename: TableRenameRequest) => string;
|
|
871
1077
|
readonly contract: Contract<SqlStorage>;
|
|
872
1078
|
readonly defaultNamespaceId: string;
|
|
873
1079
|
}): SqlPlannerConflict[];
|
|
@@ -973,5 +1179,5 @@ declare function temporalCodecPresetWithPrecision<const CodecId extends string,
|
|
|
973
1179
|
//#region src/exports/control.d.ts
|
|
974
1180
|
declare const _default: SqlFamilyDescriptor;
|
|
975
1181
|
//#endregion
|
|
976
|
-
export {
|
|
977
|
-
//# sourceMappingURL=control-
|
|
1182
|
+
export { partitionIssuesByControlPolicy as $, SqlDescribedContractSpace as A, _default as B, NoTable as C, SingleOperationCall as D, SchemaTables as E, TABLE_NAME_CASE_CHANGED_CODE as F, createMigrationPlan as G, contractNamespaceToSchemaIR as H, TableNameCaseGuardTable as I, extractCodecControlHooks as J, detectDestructiveChanges as K, TableRename as L, StatementPlanningTarget as M, SubjectStorage as N, SqlControlFamilyInstance as O, SuppressionRecord as P, partitionCallsByControlPolicy as Q, TableRenameRequest as R, ModelTable as S, PlannedStatements as T, contractToSchemaIR as U, assembleAuthoringContributions as V, controlPolicyForCall as W, fieldRenameStorageEffect as X, fieldEventStorage as Y, modelRenameStorageEffect as Z, MigrationPlanOperation$1 as _, ColumnRename as a, resolveColumnRenameAgainst as at, MigrationPlannerResult as b, ControlPolicySubject as c, runnerSuccess as ct, FieldEventCall as d, subjectsOfCalls as dt, planFieldEventCalls as et, FieldStorageEffect as f, temporalCodecPresetWithPrecision as ft, MigrationPlan$1 as g, unmatchedTableRename as gt, MigrationOperationPolicy$1 as h, unmatchedColumnRename as ht, ColumnOnOneSide as i, plannerSuccess as it, SqlPslBuildContext as j, SqlControlTargetDescriptor as k, DefaultRenderer as l, sqlTypeLookupsOf as lt, MigrationOperationClass$1 as m, unknownCallNames as mt, CallSubjects as n, planStatements as nt, ColumnRenameRequest as o, resolveTableRenameAgainst as ot, INIT_ADDITIVE_POLICY as p, temporalStringAuthoringPresets as pt, detectTableNameCaseChanges as q, CallWithCompanions as r, plannerFailure as rt, ContractToSchemaIROptions as s, runnerFailure as st, COLUMN_RENAME_UNMATCHED_CODE as t, planFieldEventOperations as tt, DefaultResolver as u, storageNameOfOperation as ut, MigrationPlanner as v, PlanFieldEventOperationsOptions as w, ModelStorageEffect as x, MigrationPlannerConflict$1 as y, TargetMigrationsCapability as z };
|
|
1183
|
+
//# sourceMappingURL=control-BkyDhucB.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"control-BkyDhucB.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/control.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;UAqBU;WACC,kBAAkB,cAAc;WAChC,cAAc;;UAEf,iCAAiC,6BAA6B,kBAAkB,kBAAkB,kBAAkB,wBAAwB,kBAAkB,wBAAwB,SAAS,cAAc,yBAAyB;;;;;;;;;EAS9O,oBAAoB,wBAAwB;EAC5C,OAAO;aACI,QAAQ;aACR;aACA;aACA;aACA;MACP,QAAQ;;;;;;;;;;EAUZ,aAAa;aACF;aACA,QAAQ;aACR;aACA,qBAAqB,cAAc;MAC1C;;;;;;;;;;EAUJ,2BAA2B,OAAO,kBAAkB;;;;;;;;EAQpD,mBAAmB,OAAO;EAC1B,WAAW;aACA,QAAQ;aACR;MACP,QAAQ;EACZ,iBAAiB,UAAU,kBAAkB;EAC7C,SAAS,KAAK,cAAc,SAAS,SAAS,0BAA0B,QAAQ;;;;;;EAMhF,WAAW;aACA,QAAQ;aACR;aACA;eACE;eACA;eACA;;MAET;;;;;EAKJ,aAAa;aACF,QAAQ;aACR;aACA;aACA;eACE;eACA;eACA;;MAET;;;;;EAKJ,iBAAiB;aACN,QAAQ;aACR;aACA;eACE;eACA;eACA;eACA;eACA;eACA;eACA;;MAET;EACJ,yCAAyC;EACzC,mBAAmB,qBAAqB,2BAA6B;EACrE,cAAc,WAAW;;;;cAIb,+BAA+B,+BAA+B;WACjE;WACA;WACA;WACA;WACA,UAAU;WACV,oBAAoB;WACpB;aACE;eACE;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;mBACA;qBACE;uBACE;uBACA;uBACA;uBACA;uBACA;;;;iBAIN;mBACE;mBACA;qBACE;uBACE;uBACA;uBACA;uBACA;;;;;eAKR;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;iBACA;mBACE;mBACA;qBACE;;;;eAIN;iBACE;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;qBACA;uBACE;yBACE;yBACA;yBACA;yBACA;yBACA;;;;mBAIN;qBACE;qBACA;uBACE;yBACE;yBACA;yBACA;yBACA;;;qBAGJ;uBACE;yBACE;yBACA;yBACA;2BACE;6BACE;6BACA;6BACA;;;;;qBAKR;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;iBAGJ;mBACE;mBACA;qBACE;qBACA;uBACE;;qBAEF;uBACE;yBACE;yBACA;;;qBAGJ;;;;;aAKR;eACE;iBACE;mBACE;mBACA;mBACA;qBACE;qBACA;qBACA;;mBAEF;qBACE;qBACA;uBACE;yBACE;yBACA;;;;;;;aAOZ,gEAAgE;aAChE;eACE;QACP;QACA;QACA;QACA;QACA;UACE;;QAEF,aAAa;QACb;UACE,2CAA2C;YACzC;4CACgC;;;;aAI/B;eACE;iBACE,0CAA0C;UACjD;0CACgC;iBACzB,yCAAyC;UAChD;mBACS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;eACE;iBACE;iBACA;;;aAGJ;eACE;iBACE;iBACA;iBACA;mBACE;qBACE;qBACA,qBAAqB;;;;eAI3B;iBACE;iBACA;iBACA;mBACE;qBACE;qBACA,qBAAqB;;;;;;;;;cAS5B,UAAU"}
|
|
@@ -3,7 +3,7 @@ import "./types-DkOYK86-.mjs";
|
|
|
3
3
|
import { y as SqlSchemaIRNode } from "./types-CLsPsUiw-Db1BsN9R.mjs";
|
|
4
4
|
import "./types-D6XuABFQ.mjs";
|
|
5
5
|
import "./control-adapter-CkFfBVei-Ba9JNrCN.mjs";
|
|
6
|
-
import { n as CodecControlHooks } from "./types-
|
|
6
|
+
import { n as CodecControlHooks } from "./types-CzxOObSY-CNWyrf87.mjs";
|
|
7
7
|
import { t as SqlSchemaDiffFn } from "./schema-differ-CqWOkoW9--uxNOini.mjs";
|
|
8
8
|
import { Contract, ControlPolicy } from "@prisma/orm-framework/contract/types";
|
|
9
9
|
import { TargetBoundComponentDescriptor } from "@prisma/orm-framework/components/components";
|
|
@@ -101,4 +101,4 @@ interface VerifySqlSchemaByDiffInput {
|
|
|
101
101
|
declare function verifySqlSchemaByDiff(input: VerifySqlSchemaByDiffInput): VerifyDatabaseSchemaResult;
|
|
102
102
|
//#endregion
|
|
103
103
|
export { VerifySqlSchemaByDiffInput as a, computeSqlDiffVerdict as c, StorageTypeVerdictInput as i, computeStorageTypeVerdict as l, SqlDiffVerdictInput as n, classifyDiffSubjectGranularity as o, StorageTypeVerdict as r, classifySqlDiffIssue as s, SqlDiffVerdict as t, verifySqlSchemaByDiff as u };
|
|
104
|
-
//# sourceMappingURL=diff-
|
|
104
|
+
//# sourceMappingURL=diff-DMOqiT2h.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diff-
|
|
1
|
+
{"version":3,"file":"diff-DMOqiT2h.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/diff.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;iBAmBiB,+BAA+B,OAAO,iBAAiB,gBAAgB,qBAAqB,yBAAyB;;;;;;;;;;;;;iBAarH,qBAAqB,OAAO,iBAAiB,gBAAgB,qBAAqB,yBAAyB;UAClH;;WAEC,iBAAiB;;WAEjB,uBAAuB,OAAO,oBAAoB;WAClD;WACA,sBAAsB;;WAEtB,gBAAgB,qBAAqB;;UAEtC;WACC,mBAAmB;WACnB,mBAAmB;;;;;;;;;iBASb,sBAAsB,OAAO,sBAAsB;UAC1D;WACC,UAAU,SAAS;;;;;;;WAOnB,gBAAgB;aACd,QAAQ;;WAEV,YAAY,oBAAoB;;;;;;;;;UASjC;WACC,mBAAmB;WACnB,mBAAmB;;iBAEb,0BAA0B,OAAO,0BAA0B;UAClE;WACC,UAAU,SAAS;WACnB,QAAQ;WACR;WACA,qBAAqB,cAAc;;WAEnC,YAAY;;WAEZ,gBAAgB,qBAAqB;;;;;;;;;iBAS/B,sBAAsB,OAAO,6BAA6B"}
|
package/dist/family.d.mts
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { n as resolveStorageTable, t as ResolvedStorageTable } from "./resolve-storage-table-Ba33K41A.mjs";
|
|
2
2
|
import { h as checkSqlDefaultText } from "./validators-BAa0JKuB.mjs";
|
|
3
3
|
import { a as arraysEqual, n as Lowerer, r as SqlControlAdapter, t as ExecuteRequestLowerer } from "./control-adapter-CkFfBVei-Ba9JNrCN.mjs";
|
|
4
|
-
import { A as StorageTypePlanResult, C as SqlPlanTargetDetails, D as SqlPlannerFailureResult, E as SqlPlannerConflictLocation, O as SqlPlannerResult, S as SqlMigrationRunnerSuccessValue, T as SqlPlannerConflictKind, _ as SqlMigrationRunnerErrorCode, a as FieldEventContext, b as SqlMigrationRunnerFailure, c as SqlControlExtensionDescriptor, d as SqlMigrationPlanOperation, f as SqlMigrationPlanOperationStep, g as SqlMigrationRunner, h as SqlMigrationPlannerPlanOptions, i as FieldEvent, k as SqlPlannerSuccessResult, l as SqlMigrationPlan, m as SqlMigrationPlanner, n as CodecControlHooks, o as ResolveIdentityValueInput, p as SqlMigrationPlanOperationTarget, r as CreateSqlMigrationPlanOptions, s as SqlControlAdapterDescriptor, u as SqlMigrationPlanContractInfo, v as SqlMigrationRunnerExecuteCallbacks, w as SqlPlannerConflict, x as SqlMigrationRunnerResult, y as SqlMigrationRunnerExecuteOptions } from "./types-
|
|
4
|
+
import { A as StorageTypePlanResult, C as SqlPlanTargetDetails, D as SqlPlannerFailureResult, E as SqlPlannerConflictLocation, O as SqlPlannerResult, S as SqlMigrationRunnerSuccessValue, T as SqlPlannerConflictKind, _ as SqlMigrationRunnerErrorCode, a as FieldEventContext, b as SqlMigrationRunnerFailure, c as SqlControlExtensionDescriptor, d as SqlMigrationPlanOperation, f as SqlMigrationPlanOperationStep, g as SqlMigrationRunner, h as SqlMigrationPlannerPlanOptions, i as FieldEvent, k as SqlPlannerSuccessResult, l as SqlMigrationPlan, m as SqlMigrationPlanner, n as CodecControlHooks, o as ResolveIdentityValueInput, p as SqlMigrationPlanOperationTarget, r as CreateSqlMigrationPlanOptions, s as SqlControlAdapterDescriptor, u as SqlMigrationPlanContractInfo, v as SqlMigrationRunnerExecuteCallbacks, w as SqlPlannerConflict, x as SqlMigrationRunnerResult, y as SqlMigrationRunnerExecuteOptions } from "./types-CzxOObSY-CNWyrf87.mjs";
|
|
5
5
|
import { n as SqlSchemaDiffInput, r as SqlSchemaDiffResult, t as SqlSchemaDiffFn } from "./schema-differ-CqWOkoW9--uxNOini.mjs";
|
|
6
|
-
import {
|
|
6
|
+
import { $ as partitionIssuesByControlPolicy, A as SqlDescribedContractSpace, C as NoTable, D as SingleOperationCall, E as SchemaTables, F as TABLE_NAME_CASE_CHANGED_CODE, G as createMigrationPlan, H as contractNamespaceToSchemaIR, I as TableNameCaseGuardTable, J as extractCodecControlHooks, K as detectDestructiveChanges, L as TableRename, M as StatementPlanningTarget, N as SubjectStorage, O as SqlControlFamilyInstance, P as SuppressionRecord, Q as partitionCallsByControlPolicy, R as TableRenameRequest, S as ModelTable, T as PlannedStatements, U as contractToSchemaIR, V as assembleAuthoringContributions, W as controlPolicyForCall, X as fieldRenameStorageEffect, Y as fieldEventStorage, Z as modelRenameStorageEffect, _ as MigrationPlanOperation, a as ColumnRename, at as resolveColumnRenameAgainst, b as MigrationPlannerResult, c as ControlPolicySubject, ct as runnerSuccess, d as FieldEventCall, dt as subjectsOfCalls, et as planFieldEventCalls, f as FieldStorageEffect, ft as temporalCodecPresetWithPrecision, g as MigrationPlan, gt as unmatchedTableRename, h as MigrationOperationPolicy, ht as unmatchedColumnRename, i as ColumnOnOneSide, it as plannerSuccess, j as SqlPslBuildContext, k as SqlControlTargetDescriptor, l as DefaultRenderer, lt as sqlTypeLookupsOf, m as MigrationOperationClass, mt as unknownCallNames, n as CallSubjects, nt as planStatements, o as ColumnRenameRequest, ot as resolveTableRenameAgainst, p as INIT_ADDITIVE_POLICY, pt as temporalStringAuthoringPresets, q as detectTableNameCaseChanges, r as CallWithCompanions, rt as plannerFailure, s as ContractToSchemaIROptions, st as runnerFailure, t as COLUMN_RENAME_UNMATCHED_CODE, tt as planFieldEventOperations, u as DefaultResolver, ut as storageNameOfOperation, v as MigrationPlanner, w as PlanFieldEventOperationsOptions, x as ModelStorageEffect, y as MigrationPlannerConflict, z as TargetMigrationsCapability } from "./control-BkyDhucB.mjs";
|
|
7
7
|
import "./control-adapter-CD_gz6TI.mjs";
|
|
8
|
-
import { a as VerifySqlSchemaByDiffInput, c as computeSqlDiffVerdict, i as StorageTypeVerdictInput, l as computeStorageTypeVerdict, n as SqlDiffVerdictInput, o as classifyDiffSubjectGranularity, r as StorageTypeVerdict, s as classifySqlDiffIssue, t as SqlDiffVerdict, u as verifySqlSchemaByDiff } from "./diff-
|
|
8
|
+
import { a as VerifySqlSchemaByDiffInput, c as computeSqlDiffVerdict, i as StorageTypeVerdictInput, l as computeStorageTypeVerdict, n as SqlDiffVerdictInput, o as classifyDiffSubjectGranularity, r as StorageTypeVerdict, s as classifySqlDiffIssue, t as SqlDiffVerdict, u as verifySqlSchemaByDiff } from "./diff-DMOqiT2h.mjs";
|
|
9
9
|
import { i as SqlSchemaVerifierBase, n as SqlContractSerializerBase, r as SqlEntityHydrationFactory, t as SqlContractSerializer } from "./ir-BYHqe2mj.mjs";
|
|
10
|
-
import { t as SqlMigration } from "./migration-
|
|
10
|
+
import { t as SqlMigration } from "./migration-C5HGygKM.mjs";
|
|
11
11
|
import "./pack-l0vLQrO8.mjs";
|
|
12
12
|
import { a as PslTypeResolution, i as PslTypeReference, n as DefaultMappingResult, o as mapDefault, r as PslTypeMap, t as DefaultMappingOptions } from "./type-map-3w0ieDAb-DiMpKEc2.mjs";
|
|
13
13
|
import { t as toEnumMemberName } from "./psl-build-C_n5uPZH.mjs";
|
|
14
14
|
import { a as buildChildRelationField, c as inferRelations, d as toFieldName, f as toModelName, i as RelationField, l as pluralize, n as InferredRelations, o as deriveBackRelationFieldName, r as PslPrinterOptions, s as deriveRelationFieldName, t as EnumInfo, u as toEnumName } from "./psl-infer-Cm7eDSA-.mjs";
|
|
15
15
|
import { a as timestampNowRuntimeGenerator, n as UNBOUND_DOMAIN_NAMESPACE_ID, r as resolveDomainModel, t as ResolvedDomainModel } from "./runtime-BUemUdMk.mjs";
|
|
16
16
|
import { n as parseContractMarkerRow, t as ContractMarkerRow } from "./verify-zDRnw0Rn.mjs";
|
|
17
|
-
export { type
|
|
17
|
+
export { COLUMN_RENAME_UNMATCHED_CODE, type CallSubjects, type CallWithCompanions, type CodecControlHooks, type ColumnOnOneSide, type ColumnRename, type ColumnRenameRequest, type ContractMarkerRow, type ContractToSchemaIROptions, type ControlPolicySubject, type CreateSqlMigrationPlanOptions, type DefaultMappingOptions, type DefaultMappingResult, type DefaultRenderer, type DefaultResolver, type EnumInfo, type ExecuteRequestLowerer, type FieldEvent, type FieldEventCall, type FieldEventContext, type FieldStorageEffect, INIT_ADDITIVE_POLICY, type InferredRelations, type Lowerer, SqlMigration as Migration, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerResult, type ModelStorageEffect, type ModelTable, type NoTable, type PlanFieldEventOperationsOptions, type PlannedStatements, type PslPrinterOptions, type PslTypeMap, type PslTypeReference, type PslTypeResolution, type RelationField, type ResolveIdentityValueInput, type ResolvedDomainModel, type ResolvedStorageTable, type SchemaTables, type SingleOperationCall, SqlContractSerializer, SqlContractSerializerBase, type SqlControlAdapter, type SqlControlExtensionDescriptor, type SqlControlFamilyInstance, type SqlControlTargetDescriptor, type SqlDescribedContractSpace, type SqlDiffVerdict, type SqlDiffVerdictInput, type SqlEntityHydrationFactory, type SqlMigrationPlan, type SqlMigrationPlanContractInfo, type SqlMigrationPlanOperation, type SqlMigrationPlanOperationStep, type SqlMigrationPlanOperationTarget, type SqlMigrationPlanner, type SqlMigrationPlannerPlanOptions, type SqlMigrationRunner, type SqlMigrationRunnerErrorCode, type SqlMigrationRunnerExecuteCallbacks, type SqlMigrationRunnerExecuteOptions, type SqlMigrationRunnerFailure, type SqlMigrationRunnerResult, type SqlMigrationRunnerSuccessValue, type SqlPlanTargetDetails, type SqlPlannerConflict, type SqlPlannerConflictKind, type SqlPlannerConflictLocation, type SqlPlannerFailureResult, type SqlPlannerResult, type SqlPlannerSuccessResult, type SqlPslBuildContext, type SqlSchemaDiffFn, type SqlSchemaDiffInput, type SqlSchemaDiffResult, SqlSchemaVerifierBase, type StatementPlanningTarget, type StorageTypePlanResult, type StorageTypeVerdict, type StorageTypeVerdictInput, type SubjectStorage, type SuppressionRecord, TABLE_NAME_CASE_CHANGED_CODE, type TableNameCaseGuardTable, type TableRename, type TableRenameRequest, type TargetMigrationsCapability, UNBOUND_DOMAIN_NAMESPACE_ID, type VerifySqlSchemaByDiffInput, arraysEqual, assembleAuthoringContributions, buildChildRelationField, checkSqlDefaultText, classifyDiffSubjectGranularity, classifySqlDiffIssue, computeSqlDiffVerdict, computeStorageTypeVerdict, contractNamespaceToSchemaIR, contractToSchemaIR, controlPolicyForCall, createMigrationPlan, deriveBackRelationFieldName, deriveRelationFieldName, detectDestructiveChanges, detectTableNameCaseChanges, extractCodecControlHooks, fieldEventStorage, fieldRenameStorageEffect, inferRelations, mapDefault, modelRenameStorageEffect, parseContractMarkerRow, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventCalls, planFieldEventOperations, planStatements, plannerFailure, plannerSuccess, pluralize, resolveColumnRenameAgainst, resolveDomainModel, resolveStorageTable, resolveTableRenameAgainst, runnerFailure, runnerSuccess, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, temporalCodecPresetWithPrecision, temporalStringAuthoringPresets, timestampNowRuntimeGenerator, toEnumMemberName, toEnumName, toFieldName, toModelName, unknownCallNames, unmatchedColumnRename, unmatchedTableRename, verifySqlSchemaByDiff };
|
package/dist/family.mjs
CHANGED
|
@@ -3,12 +3,12 @@ import { n as checkSqlDefaultText } from "./validators-Xx-TKcx3.mjs";
|
|
|
3
3
|
import { a as computeStorageTypeVerdict, c as verifySqlSchemaByDiff, i as computeSqlDiffVerdict, n as classifyDiffSubjectGranularity, r as classifySqlDiffIssue, s as extractCodecControlHooks } from "./schema-verify-DIfHSB4I-CjYnmUuD.mjs";
|
|
4
4
|
import { n as SqlContractSerializerBase, t as SqlContractSerializer } from "./sql-contract-serializer-DDaAVCQr-CLDkZLXO.mjs";
|
|
5
5
|
import { n as parseContractMarkerRow } from "./verify-BVk5bjdH-dq5M4iIh.mjs";
|
|
6
|
-
import { _ as
|
|
6
|
+
import { A as temporalStringAuthoringPresets, C as resolveTableRenameAgainst, D as storageNameOfOperation, E as sqlTypeLookupsOf, M as unmatchedColumnRename, N as unmatchedTableRename, O as subjectsOfCalls, S as resolveColumnRenameAgainst, T as runnerSuccess, _ as planFieldEventCalls, a as contractNamespaceToSchemaIR, b as plannerFailure, d as detectTableNameCaseChanges, f as fieldEventStorage, g as partitionIssuesByControlPolicy, h as partitionCallsByControlPolicy, i as assembleAuthoringContributions, j as unknownCallNames, k as temporalCodecPresetWithPrecision, l as createMigrationPlan, m as modelRenameStorageEffect, n as INIT_ADDITIVE_POLICY, o as contractToSchemaIR, p as fieldRenameStorageEffect, r as TABLE_NAME_CASE_CHANGED_CODE, s as controlPolicyForCall, t as COLUMN_RENAME_UNMATCHED_CODE, u as detectDestructiveChanges, v as planFieldEventOperations, w as runnerFailure, x as plannerSuccess, y as planStatements } from "./control-BRbds4vn.mjs";
|
|
7
7
|
import { t as arraysEqual } from "./diff-B16bL_IR.mjs";
|
|
8
8
|
import { t as SqlSchemaVerifierBase } from "./ir-I-xciGUH.mjs";
|
|
9
|
-
import { t as SqlMigration } from "./migration-
|
|
9
|
+
import { t as SqlMigration } from "./migration-Dy_4Wmiy.mjs";
|
|
10
10
|
import { s as toEnumMemberName } from "./psl-names-C3cwe0rg-CsuHOV7E.mjs";
|
|
11
11
|
import { t as mapDefault } from "./psl-build-Di-cBOCv.mjs";
|
|
12
12
|
import { a as pluralize, c as toModelName, i as inferRelations, n as deriveBackRelationFieldName, o as toEnumName, r as deriveRelationFieldName, s as toFieldName, t as buildChildRelationField } from "./psl-infer-fU7LRjTx.mjs";
|
|
13
13
|
import { i as timestampNowRuntimeGenerator, n as resolveDomainModel, t as UNBOUND_DOMAIN_NAMESPACE_ID } from "./runtime-Z3nD7ix1.mjs";
|
|
14
|
-
export { INIT_ADDITIVE_POLICY, SqlMigration as Migration, SqlContractSerializer, SqlContractSerializerBase, SqlSchemaVerifierBase, TABLE_NAME_CASE_CHANGED_CODE, UNBOUND_DOMAIN_NAMESPACE_ID,
|
|
14
|
+
export { COLUMN_RENAME_UNMATCHED_CODE, INIT_ADDITIVE_POLICY, SqlMigration as Migration, SqlContractSerializer, SqlContractSerializerBase, SqlSchemaVerifierBase, TABLE_NAME_CASE_CHANGED_CODE, UNBOUND_DOMAIN_NAMESPACE_ID, arraysEqual, assembleAuthoringContributions, buildChildRelationField, checkSqlDefaultText, classifyDiffSubjectGranularity, classifySqlDiffIssue, computeSqlDiffVerdict, computeStorageTypeVerdict, contractNamespaceToSchemaIR, contractToSchemaIR, controlPolicyForCall, createMigrationPlan, deriveBackRelationFieldName, deriveRelationFieldName, detectDestructiveChanges, detectTableNameCaseChanges, extractCodecControlHooks, fieldEventStorage, fieldRenameStorageEffect, inferRelations, mapDefault, modelRenameStorageEffect, parseContractMarkerRow, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventCalls, planFieldEventOperations, planStatements, plannerFailure, plannerSuccess, pluralize, resolveColumnRenameAgainst, resolveDomainModel, resolveStorageTable, resolveTableRenameAgainst, runnerFailure, runnerSuccess, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, temporalCodecPresetWithPrecision, temporalStringAuthoringPresets, timestampNowRuntimeGenerator, toEnumMemberName, toEnumName, toFieldName, toModelName, unknownCallNames, unmatchedColumnRename, unmatchedTableRename, verifySqlSchemaByDiff };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h as checkSqlDefaultText } from "./validators-BAa0JKuB.mjs";
|
|
2
|
-
import { A as StorageTypePlanResult, C as SqlPlanTargetDetails, D as SqlPlannerFailureResult, E as SqlPlannerConflictLocation, O as SqlPlannerResult, S as SqlMigrationRunnerSuccessValue, T as SqlPlannerConflictKind, _ as SqlMigrationRunnerErrorCode, a as FieldEventContext, b as SqlMigrationRunnerFailure, c as SqlControlExtensionDescriptor, d as SqlMigrationPlanOperation, f as SqlMigrationPlanOperationStep, g as SqlMigrationRunner, h as SqlMigrationPlannerPlanOptions, i as FieldEvent, k as SqlPlannerSuccessResult, l as SqlMigrationPlan, m as SqlMigrationPlanner, n as CodecControlHooks, o as ResolveIdentityValueInput, p as SqlMigrationPlanOperationTarget, r as CreateSqlMigrationPlanOptions, s as SqlControlAdapterDescriptor, u as SqlMigrationPlanContractInfo, v as SqlMigrationRunnerExecuteCallbacks, w as SqlPlannerConflict, x as SqlMigrationRunnerResult, y as SqlMigrationRunnerExecuteOptions } from "./types-
|
|
2
|
+
import { A as StorageTypePlanResult, C as SqlPlanTargetDetails, D as SqlPlannerFailureResult, E as SqlPlannerConflictLocation, O as SqlPlannerResult, S as SqlMigrationRunnerSuccessValue, T as SqlPlannerConflictKind, _ as SqlMigrationRunnerErrorCode, a as FieldEventContext, b as SqlMigrationRunnerFailure, c as SqlControlExtensionDescriptor, d as SqlMigrationPlanOperation, f as SqlMigrationPlanOperationStep, g as SqlMigrationRunner, h as SqlMigrationPlannerPlanOptions, i as FieldEvent, k as SqlPlannerSuccessResult, l as SqlMigrationPlan, m as SqlMigrationPlanner, n as CodecControlHooks, o as ResolveIdentityValueInput, p as SqlMigrationPlanOperationTarget, r as CreateSqlMigrationPlanOptions, s as SqlControlAdapterDescriptor, u as SqlMigrationPlanContractInfo, v as SqlMigrationRunnerExecuteCallbacks, w as SqlPlannerConflict, x as SqlMigrationRunnerResult, y as SqlMigrationRunnerExecuteOptions } from "./types-CzxOObSY-CNWyrf87.mjs";
|
|
3
3
|
import { n as SqlSchemaDiffInput, r as SqlSchemaDiffResult, t as SqlSchemaDiffFn } from "./schema-differ-CqWOkoW9--uxNOini.mjs";
|
|
4
|
-
import { A as
|
|
5
|
-
export { type
|
|
4
|
+
import { $ as partitionIssuesByControlPolicy, A as SqlDescribedContractSpace, B as _default, C as NoTable, D as SingleOperationCall, E as SchemaTables, F as TABLE_NAME_CASE_CHANGED_CODE, G as createMigrationPlan, H as contractNamespaceToSchemaIR, I as TableNameCaseGuardTable, J as extractCodecControlHooks, K as detectDestructiveChanges, L as TableRename, M as StatementPlanningTarget, N as SubjectStorage, O as SqlControlFamilyInstance, P as SuppressionRecord, Q as partitionCallsByControlPolicy, R as TableRenameRequest, S as ModelTable, T as PlannedStatements, U as contractToSchemaIR, V as assembleAuthoringContributions, W as controlPolicyForCall, X as fieldRenameStorageEffect, Y as fieldEventStorage, Z as modelRenameStorageEffect, _ as MigrationPlanOperation, a as ColumnRename, at as resolveColumnRenameAgainst, b as MigrationPlannerResult, c as ControlPolicySubject, ct as runnerSuccess, d as FieldEventCall, dt as subjectsOfCalls, et as planFieldEventCalls, f as FieldStorageEffect, ft as temporalCodecPresetWithPrecision, g as MigrationPlan, gt as unmatchedTableRename, h as MigrationOperationPolicy, ht as unmatchedColumnRename, i as ColumnOnOneSide, it as plannerSuccess, j as SqlPslBuildContext, k as SqlControlTargetDescriptor, l as DefaultRenderer, lt as sqlTypeLookupsOf, m as MigrationOperationClass, mt as unknownCallNames, n as CallSubjects, nt as planStatements, o as ColumnRenameRequest, ot as resolveTableRenameAgainst, p as INIT_ADDITIVE_POLICY, pt as temporalStringAuthoringPresets, q as detectTableNameCaseChanges, r as CallWithCompanions, rt as plannerFailure, s as ContractToSchemaIROptions, st as runnerFailure, t as COLUMN_RENAME_UNMATCHED_CODE, tt as planFieldEventOperations, u as DefaultResolver, ut as storageNameOfOperation, v as MigrationPlanner, w as PlanFieldEventOperationsOptions, x as ModelStorageEffect, y as MigrationPlannerConflict, z as TargetMigrationsCapability } from "./control-BkyDhucB.mjs";
|
|
5
|
+
export { COLUMN_RENAME_UNMATCHED_CODE, type CallSubjects, type CallWithCompanions, type CodecControlHooks, type ColumnOnOneSide, type ColumnRename, type ColumnRenameRequest, type ContractToSchemaIROptions, type ControlPolicySubject, type CreateSqlMigrationPlanOptions, type DefaultRenderer, type DefaultResolver, type FieldEvent, type FieldEventCall, type FieldEventContext, type FieldStorageEffect, INIT_ADDITIVE_POLICY, type MigrationOperationClass, type MigrationOperationPolicy, type MigrationPlan, type MigrationPlanOperation, type MigrationPlanner, type MigrationPlannerConflict, type MigrationPlannerResult, type ModelStorageEffect, type ModelTable, type NoTable, type PlanFieldEventOperationsOptions, type PlannedStatements, type ResolveIdentityValueInput, type SchemaTables, type SingleOperationCall, type SqlControlAdapterDescriptor, type SqlControlExtensionDescriptor, type SqlControlFamilyInstance, type SqlControlTargetDescriptor, type SqlDescribedContractSpace, type SqlMigrationPlan, type SqlMigrationPlanContractInfo, type SqlMigrationPlanOperation, type SqlMigrationPlanOperationStep, type SqlMigrationPlanOperationTarget, type SqlMigrationPlanner, type SqlMigrationPlannerPlanOptions, type SqlMigrationRunner, type SqlMigrationRunnerErrorCode, type SqlMigrationRunnerExecuteCallbacks, type SqlMigrationRunnerExecuteOptions, type SqlMigrationRunnerFailure, type SqlMigrationRunnerResult, type SqlMigrationRunnerSuccessValue, type SqlPlanTargetDetails, type SqlPlannerConflict, type SqlPlannerConflictKind, type SqlPlannerConflictLocation, type SqlPlannerFailureResult, type SqlPlannerResult, type SqlPlannerSuccessResult, type SqlPslBuildContext, type SqlSchemaDiffFn, type SqlSchemaDiffInput, type SqlSchemaDiffResult, type StatementPlanningTarget, type StorageTypePlanResult, type SubjectStorage, type SuppressionRecord, TABLE_NAME_CASE_CHANGED_CODE, type TableNameCaseGuardTable, type TableRename, type TableRenameRequest, type TargetMigrationsCapability, assembleAuthoringContributions, checkSqlDefaultText, contractNamespaceToSchemaIR, contractToSchemaIR, controlPolicyForCall, createMigrationPlan, _default as default, detectDestructiveChanges, detectTableNameCaseChanges, extractCodecControlHooks, fieldEventStorage, fieldRenameStorageEffect, modelRenameStorageEffect, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventCalls, planFieldEventOperations, planStatements, plannerFailure, plannerSuccess, resolveColumnRenameAgainst, resolveTableRenameAgainst, runnerFailure, runnerSuccess, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, temporalCodecPresetWithPrecision, temporalStringAuthoringPresets, unknownCallNames, unmatchedColumnRename, unmatchedTableRename };
|
package/dist/family__control.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { n as checkSqlDefaultText } from "./validators-Xx-TKcx3.mjs";
|
|
2
2
|
import { s as extractCodecControlHooks } from "./schema-verify-DIfHSB4I-CjYnmUuD.mjs";
|
|
3
|
-
import { _ as
|
|
4
|
-
export { INIT_ADDITIVE_POLICY, TABLE_NAME_CASE_CHANGED_CODE,
|
|
3
|
+
import { A as temporalStringAuthoringPresets, C as resolveTableRenameAgainst, D as storageNameOfOperation, E as sqlTypeLookupsOf, M as unmatchedColumnRename, N as unmatchedTableRename, O as subjectsOfCalls, S as resolveColumnRenameAgainst, T as runnerSuccess, _ as planFieldEventCalls, a as contractNamespaceToSchemaIR, b as plannerFailure, c as control_default, d as detectTableNameCaseChanges, f as fieldEventStorage, g as partitionIssuesByControlPolicy, h as partitionCallsByControlPolicy, i as assembleAuthoringContributions, j as unknownCallNames, k as temporalCodecPresetWithPrecision, l as createMigrationPlan, m as modelRenameStorageEffect, n as INIT_ADDITIVE_POLICY, o as contractToSchemaIR, p as fieldRenameStorageEffect, r as TABLE_NAME_CASE_CHANGED_CODE, s as controlPolicyForCall, t as COLUMN_RENAME_UNMATCHED_CODE, u as detectDestructiveChanges, v as planFieldEventOperations, w as runnerFailure, x as plannerSuccess, y as planStatements } from "./control-BRbds4vn.mjs";
|
|
4
|
+
export { COLUMN_RENAME_UNMATCHED_CODE, INIT_ADDITIVE_POLICY, TABLE_NAME_CASE_CHANGED_CODE, assembleAuthoringContributions, checkSqlDefaultText, contractNamespaceToSchemaIR, contractToSchemaIR, controlPolicyForCall, createMigrationPlan, control_default as default, detectDestructiveChanges, detectTableNameCaseChanges, extractCodecControlHooks, fieldEventStorage, fieldRenameStorageEffect, modelRenameStorageEffect, partitionCallsByControlPolicy, partitionIssuesByControlPolicy, planFieldEventCalls, planFieldEventOperations, planStatements, plannerFailure, plannerSuccess, resolveColumnRenameAgainst, resolveTableRenameAgainst, runnerFailure, runnerSuccess, sqlTypeLookupsOf, storageNameOfOperation, subjectsOfCalls, temporalCodecPresetWithPrecision, temporalStringAuthoringPresets, unknownCallNames, unmatchedColumnRename, unmatchedTableRename };
|
package/dist/family__diff.d.mts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { a as arraysEqual } from "./control-adapter-CkFfBVei-Ba9JNrCN.mjs";
|
|
2
|
-
import { a as VerifySqlSchemaByDiffInput, c as computeSqlDiffVerdict, i as StorageTypeVerdictInput, l as computeStorageTypeVerdict, n as SqlDiffVerdictInput, o as classifyDiffSubjectGranularity, r as StorageTypeVerdict, s as classifySqlDiffIssue, t as SqlDiffVerdict, u as verifySqlSchemaByDiff } from "./diff-
|
|
2
|
+
import { a as VerifySqlSchemaByDiffInput, c as computeSqlDiffVerdict, i as StorageTypeVerdictInput, l as computeStorageTypeVerdict, n as SqlDiffVerdictInput, o as classifyDiffSubjectGranularity, r as StorageTypeVerdict, s as classifySqlDiffIssue, t as SqlDiffVerdict, u as verifySqlSchemaByDiff } from "./diff-DMOqiT2h.mjs";
|
|
3
3
|
export { type SqlDiffVerdict, type SqlDiffVerdictInput, type StorageTypeVerdict, type StorageTypeVerdictInput, type VerifySqlSchemaByDiffInput, arraysEqual, classifyDiffSubjectGranularity, classifySqlDiffIssue, computeSqlDiffVerdict, computeStorageTypeVerdict, verifySqlSchemaByDiff };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SqlMigration } from "./migration-
|
|
1
|
+
import { t as SqlMigration } from "./migration-C5HGygKM.mjs";
|
|
2
2
|
export { SqlMigration as Migration };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as SqlMigration } from "./migration-
|
|
1
|
+
import { t as SqlMigration } from "./migration-Dy_4Wmiy.mjs";
|
|
2
2
|
export { SqlMigration as Migration };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { l as SqlStorage } from "./sql-storage-DSnnRQAf-DaHPnley.mjs";
|
|
2
2
|
import "./types-DkOYK86-.mjs";
|
|
3
|
-
import { C as SqlPlanTargetDetails, d as SqlMigrationPlanOperation } from "./types-
|
|
3
|
+
import { C as SqlPlanTargetDetails, d as SqlMigrationPlanOperation } from "./types-CzxOObSY-CNWyrf87.mjs";
|
|
4
4
|
import { Contract } from "@prisma/orm-framework/contract/types";
|
|
5
5
|
import { Migration } from "@prisma/orm-toolchain/migration-tools/migration";
|
|
6
6
|
//#region ../../../2-sql/9-family/dist/migration.d.mts
|
|
@@ -29,7 +29,7 @@ import { Migration } from "@prisma/orm-toolchain/migration-tools/migration";
|
|
|
29
29
|
declare abstract class SqlMigration<TDetails extends SqlPlanTargetDetails, TTargetId extends string = string, Start extends Contract<SqlStorage> = Contract<SqlStorage>, End extends Contract<SqlStorage> = Contract<SqlStorage>> extends Migration<SqlMigrationPlanOperation<TDetails>, 'sql', TTargetId, Start, End> {
|
|
30
30
|
/**
|
|
31
31
|
* Sorted, deduplicated invariant ids declared by this migration's
|
|
32
|
-
* data-transform ops. Derived from `
|
|
32
|
+
* data-transform ops. Derived from a fresh read of the operations (`Migration.readOperations`) so the field remains
|
|
33
33
|
* consistent with the operation list — planner-built plans (`db init`,
|
|
34
34
|
* `db update`) yield `[]` because they emit no data-transform ops.
|
|
35
35
|
*
|
|
@@ -41,4 +41,4 @@ declare abstract class SqlMigration<TDetails extends SqlPlanTargetDetails, TTarg
|
|
|
41
41
|
}
|
|
42
42
|
//#endregion
|
|
43
43
|
export { SqlMigration as t };
|
|
44
|
-
//# sourceMappingURL=migration-
|
|
44
|
+
//# sourceMappingURL=migration-C5HGygKM.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"migration-
|
|
1
|
+
{"version":3,"file":"migration-C5HGygKM.d.mts","names":[],"sources":["../../../../2-sql/9-family/dist/migration.d.mts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;uBA0BuB,aAAa,iBAAiB,sBAAsB,mCAAmC,cAAc,SAAS,cAAc,SAAS,aAAa,YAAY,SAAS,cAAc,SAAS,qBAAqB,UAAU,0BAA0B,kBAAkB,WAAW,OAAO;;;;;;;;;;;MAW5S"}
|