@prisma/migrate 6.6.0-dev.3 → 6.6.0-dev.30
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/CLI.js +3 -3
- package/dist/Migrate.js +8 -6
- package/dist/SchemaEngine.js +5 -5
- package/dist/bin.js +48 -47
- package/dist/chunk-23DZXSTI.js +62 -0
- package/dist/{chunk-WWAWV7DQ.js → chunk-2ESYSVXG.js} +3 -27
- package/dist/{chunk-LKTTJWFT.js → chunk-2R6DII47.js} +5 -5
- package/dist/chunk-33LPBNDX.js +1399 -0
- package/dist/{chunk-V3ZMNXZC.js → chunk-5LKIRKDL.js} +307 -382
- package/dist/chunk-5Q5BJS5B.js +889 -0
- package/dist/{chunk-LOGAFLCN.js → chunk-5R44VVVX.js} +29 -29
- package/dist/{chunk-GG54LOYV.js → chunk-63ZT25OL.js} +43 -43
- package/dist/{chunk-DJMFXNR4.js → chunk-74LUB4XX.js} +56 -57
- package/dist/{chunk-IR55GBON.js → chunk-ABQZ5J74.js} +5 -5
- package/dist/{chunk-RP2N6UXA.js → chunk-AI6DH66U.js} +6 -6
- package/dist/{chunk-KS7IEA6Z.js → chunk-AM7BRZFD.js} +48 -51
- package/dist/{chunk-G2XUUMKH.js → chunk-B4SUSDC2.js} +31 -39
- package/dist/{chunk-N4XTKFY6.js → chunk-BUAYZ4KA.js} +37 -37
- package/dist/{chunk-W2SZNLK4.js → chunk-EJG7GKM7.js} +37 -39
- package/dist/{chunk-5PSO7BDO.js → chunk-EJUXYFV3.js} +15 -15
- package/dist/{chunk-MATFO4ZW.js → chunk-G7PJKEOV.js} +33 -33
- package/dist/{chunk-ZOEKRXDP.js → chunk-GHZAN2PG.js} +21 -24
- package/dist/{chunk-V5TUSOJX.js → chunk-HPT54KSO.js} +44 -44
- package/dist/{chunk-HCBZB4XC.js → chunk-HQJ7FIWN.js} +51 -51
- package/dist/{chunk-MCWCB2AX.js → chunk-IINN7QUV.js} +170 -643
- package/dist/{chunk-CQZFVAXC.js → chunk-IRYXRMQC.js} +40 -40
- package/dist/{chunk-255BRND3.js → chunk-KRQEFTDT.js} +6 -6
- package/dist/{chunk-N3KYWSX2.js → chunk-LAEOX7QH.js} +53 -48
- package/dist/{chunk-VVKOFN3Y.js → chunk-LLO7YF56.js} +44 -46
- package/dist/{chunk-MKK3GSDF.js → chunk-MTJFLQI4.js} +5 -5
- package/dist/{chunk-VZ23KD5C.js → chunk-NGQA5JTN.js} +8 -10
- package/dist/{chunk-WI2A2TQE.js → chunk-SCH55BRJ.js} +84 -87
- package/dist/{chunk-EGPJABTW.js → chunk-TGV6QGEF.js} +69 -69
- package/dist/chunk-URKH6SE2.js +479 -0
- package/dist/chunk-V6PVGSDJ.js +76 -0
- package/dist/{chunk-DLLXDCI2.js → chunk-VAJ4VX67.js} +5 -6
- package/dist/{chunk-4RDVKU5F.js → chunk-VZVF5FOX.js} +331 -344
- package/dist/{chunk-OWIFBVPC.js → chunk-WJ6HO7L7.js} +330 -343
- package/dist/{chunk-OCQGHQED.js → chunk-YBX7R3MT.js} +12 -12
- package/dist/{chunk-A6PMXMMT.js → chunk-ZB5NPOJW.js} +13 -13
- package/dist/{chunk-Q3ZLC44N.js → chunk-ZCR4PTT3.js} +54 -64
- package/dist/commands/DbCommand.js +3 -3
- package/dist/commands/DbDrop.js +4 -5
- package/dist/commands/DbExecute.js +9 -7
- package/dist/commands/DbPull.js +12 -11
- package/dist/commands/DbPush.js +10 -9
- package/dist/commands/DbSeed.js +4 -5
- package/dist/commands/MigrateCommand.js +3 -3
- package/dist/commands/MigrateDeploy.js +12 -11
- package/dist/commands/MigrateDev.js +14 -13
- package/dist/commands/MigrateDiff.js +12 -10
- package/dist/commands/MigrateReset.js +13 -12
- package/dist/commands/MigrateResolve.js +10 -9
- package/dist/commands/MigrateStatus.js +10 -9
- package/dist/index.js +52 -50
- package/dist/internals/src/cli/schemaContext.d.ts +43 -0
- package/dist/internals/src/index.d.ts +1 -0
- package/dist/internals/src/migrateTypes.d.ts +63 -0
- package/dist/migrate/src/Migrate.d.ts +3 -1
- package/dist/migrate/src/SchemaEngine.d.ts +0 -4
- package/dist/migrate/src/types.d.ts +13 -10
- package/dist/migrate/src/utils/createMigration.d.ts +21 -0
- package/dist/migrate/src/utils/ensureDatabaseExists.d.ts +4 -6
- package/dist/migrate/src/utils/listMigrations.d.ts +9 -0
- package/dist/migrate/src/utils/seed.d.ts +0 -2
- package/dist/{multipart-parser-54WEFGGN-NLZG56KM.js → multipart-parser-ASKQAOL4-WZ47HU6G.js} +92 -125
- package/dist/{multipart-parser-NDLECNMN.js → multipart-parser-QCI3Y5IB.js} +66 -68
- package/dist/types.js +1 -1
- package/dist/{typescript-WN4QH2CP.js → typescript-2LKASCMC.js} +33 -33
- package/dist/{typescript-AILDXN3I.js → typescript-H3AVJ6KX.js} +32 -32
- package/dist/utils/byline.js +1 -1
- package/dist/utils/captureStdout.js +3 -3
- package/dist/utils/countModelsAndTypes.js +1 -1
- package/dist/utils/createMigration.js +27 -0
- package/dist/utils/customColors.js +1 -1
- package/dist/utils/ensureDatabaseExists.js +7 -7
- package/dist/utils/errors.js +1 -1
- package/dist/utils/flagErrors.js +1 -1
- package/dist/utils/getDatabaseVersionSafe.js +5 -5
- package/dist/utils/getSchemaPathAndPrint.js +1 -1
- package/dist/utils/handleEvaluateDataloss.js +1 -1
- package/dist/utils/introspectSql.js +5 -5
- package/dist/utils/isSchemaEmpty.js +1 -1
- package/dist/utils/listMigrations.js +25 -0
- package/dist/utils/now.js +1 -1
- package/dist/utils/printDatasource.js +1 -1
- package/dist/utils/printDatasources.js +5 -5
- package/dist/utils/printFiles.js +5 -5
- package/dist/utils/printIntrospectedSchema.js +1 -1
- package/dist/utils/printMigrationId.js +1 -1
- package/dist/utils/promptForMigrationName.js +3 -3
- package/dist/utils/removeSchemaFiles.js +1 -1
- package/dist/utils/replaceOrAddDatasource.js +1 -1
- package/dist/utils/replaceOrAddDatasource.test.js +1 -1
- package/dist/utils/saveSchemaFiles.js +1 -1
- package/dist/utils/seed.js +4 -7
- package/dist/utils/setupCockroach.js +3 -3
- package/dist/utils/setupMSSQL.js +759 -675
- package/dist/utils/setupMongo.js +552 -552
- package/dist/utils/setupMysql.js +508 -563
- package/dist/utils/setupPostgres.js +3 -3
- package/dist/utils/spinner.js +4 -3
- package/dist/utils/unixSocket.js +1 -1
- package/dist/views/handleViewsIO.js +3 -3
- package/package.json +9 -9
- package/dist/chunk-J46BJQHT.js +0 -268
- package/dist/chunk-KOF4LGTS.js +0 -1817
- package/dist/chunk-YYPMC5FN.js +0 -1407
|
@@ -26,18 +26,18 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_G7PJKEOV_exports = {};
|
|
30
|
+
__export(chunk_G7PJKEOV_exports, {
|
|
31
31
|
N: () => N,
|
|
32
32
|
handleViewsIO: () => handleViewsIO,
|
|
33
33
|
require_function: () => require_function,
|
|
34
34
|
z: () => z
|
|
35
35
|
});
|
|
36
|
-
module.exports = __toCommonJS(
|
|
37
|
-
var
|
|
36
|
+
module.exports = __toCommonJS(chunk_G7PJKEOV_exports);
|
|
37
|
+
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
|
38
38
|
var import_internals = require("@prisma/internals");
|
|
39
39
|
var import_path = __toESM(require("path"));
|
|
40
|
-
var require_function = (0,
|
|
40
|
+
var require_function = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
41
41
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/function.js"(exports) {
|
|
42
42
|
"use strict";
|
|
43
43
|
var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
|
|
@@ -324,7 +324,7 @@ var require_function = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
324
324
|
exports.dual = dual;
|
|
325
325
|
}
|
|
326
326
|
});
|
|
327
|
-
var require_internal = (0,
|
|
327
|
+
var require_internal = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
328
328
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/internal.js"(exports) {
|
|
329
329
|
"use strict";
|
|
330
330
|
var __spreadArray = exports && exports.__spreadArray || function(to, from, pack) {
|
|
@@ -463,7 +463,7 @@ var require_internal = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
463
463
|
exports.flatMapReader = flatMapReader;
|
|
464
464
|
}
|
|
465
465
|
});
|
|
466
|
-
var require_Apply = (0,
|
|
466
|
+
var require_Apply = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
467
467
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Apply.js"(exports) {
|
|
468
468
|
"use strict";
|
|
469
469
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -705,7 +705,7 @@ var require_Apply = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
705
705
|
}
|
|
706
706
|
}
|
|
707
707
|
});
|
|
708
|
-
var require_Functor = (0,
|
|
708
|
+
var require_Functor = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
709
709
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Functor.js"(exports) {
|
|
710
710
|
"use strict";
|
|
711
711
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -778,7 +778,7 @@ var require_Functor = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
778
778
|
}
|
|
779
779
|
}
|
|
780
780
|
});
|
|
781
|
-
var require_Applicative = (0,
|
|
781
|
+
var require_Applicative = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
782
782
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Applicative.js"(exports) {
|
|
783
783
|
"use strict";
|
|
784
784
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -811,7 +811,7 @@ var require_Applicative = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
813
|
});
|
|
814
|
-
var require_Chain = (0,
|
|
814
|
+
var require_Chain = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
815
815
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Chain.js"(exports) {
|
|
816
816
|
"use strict";
|
|
817
817
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -849,7 +849,7 @@ var require_Chain = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
849
849
|
}
|
|
850
850
|
}
|
|
851
851
|
});
|
|
852
|
-
var require_ChainRec = (0,
|
|
852
|
+
var require_ChainRec = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
853
853
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/ChainRec.js"(exports) {
|
|
854
854
|
"use strict";
|
|
855
855
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -864,7 +864,7 @@ var require_ChainRec = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
864
864
|
exports.tailRec = tailRec;
|
|
865
865
|
}
|
|
866
866
|
});
|
|
867
|
-
var require_FromEither = (0,
|
|
867
|
+
var require_FromEither = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
868
868
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/FromEither.js"(exports) {
|
|
869
869
|
"use strict";
|
|
870
870
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -980,7 +980,7 @@ var require_FromEither = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
980
980
|
}
|
|
981
981
|
}
|
|
982
982
|
});
|
|
983
|
-
var require_Separated = (0,
|
|
983
|
+
var require_Separated = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
984
984
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Separated.js"(exports) {
|
|
985
985
|
"use strict";
|
|
986
986
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1039,7 +1039,7 @@ var require_Separated = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
1039
1039
|
exports.right = right;
|
|
1040
1040
|
}
|
|
1041
1041
|
});
|
|
1042
|
-
var require_Witherable = (0,
|
|
1042
|
+
var require_Witherable = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
1043
1043
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Witherable.js"(exports) {
|
|
1044
1044
|
"use strict";
|
|
1045
1045
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -1106,7 +1106,7 @@ var require_Witherable = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
1106
1106
|
}
|
|
1107
1107
|
}
|
|
1108
1108
|
});
|
|
1109
|
-
var require_Either = (0,
|
|
1109
|
+
var require_Either = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
1110
1110
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Either.js"(exports) {
|
|
1111
1111
|
"use strict";
|
|
1112
1112
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -1714,7 +1714,7 @@ var require_Either = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
1714
1714
|
}
|
|
1715
1715
|
}
|
|
1716
1716
|
});
|
|
1717
|
-
var require_FromIO = (0,
|
|
1717
|
+
var require_FromIO = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
1718
1718
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/FromIO.js"(exports) {
|
|
1719
1719
|
"use strict";
|
|
1720
1720
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -1753,7 +1753,7 @@ var require_FromIO = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
1753
1753
|
}
|
|
1754
1754
|
}
|
|
1755
1755
|
});
|
|
1756
|
-
var require_Task = (0,
|
|
1756
|
+
var require_Task = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
1757
1757
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Task.js"(exports) {
|
|
1758
1758
|
"use strict";
|
|
1759
1759
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -2048,7 +2048,7 @@ var require_Task = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
2048
2048
|
exports.getMonoid = (0, Applicative_1.getApplicativeMonoid)(exports.ApplicativeSeq);
|
|
2049
2049
|
}
|
|
2050
2050
|
});
|
|
2051
|
-
var require_Predicate = (0,
|
|
2051
|
+
var require_Predicate = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2052
2052
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Predicate.js"(exports) {
|
|
2053
2053
|
"use strict";
|
|
2054
2054
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -2122,7 +2122,7 @@ var require_Predicate = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
2122
2122
|
exports.and = and;
|
|
2123
2123
|
}
|
|
2124
2124
|
});
|
|
2125
|
-
var require_Magma = (0,
|
|
2125
|
+
var require_Magma = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2126
2126
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Magma.js"(exports) {
|
|
2127
2127
|
"use strict";
|
|
2128
2128
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -2177,7 +2177,7 @@ var require_Magma = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
2177
2177
|
exports.concatAll = concatAll;
|
|
2178
2178
|
}
|
|
2179
2179
|
});
|
|
2180
|
-
var require_Eq = (0,
|
|
2180
|
+
var require_Eq = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2181
2181
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Eq.js"(exports) {
|
|
2182
2182
|
"use strict";
|
|
2183
2183
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -2271,7 +2271,7 @@ var require_Eq = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
2271
2271
|
};
|
|
2272
2272
|
}
|
|
2273
2273
|
});
|
|
2274
|
-
var require_Ord = (0,
|
|
2274
|
+
var require_Ord = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2275
2275
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Ord.js"(exports) {
|
|
2276
2276
|
"use strict";
|
|
2277
2277
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -2441,7 +2441,7 @@ var require_Ord = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
2441
2441
|
);
|
|
2442
2442
|
}
|
|
2443
2443
|
});
|
|
2444
|
-
var require_Semigroup = (0,
|
|
2444
|
+
var require_Semigroup = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2445
2445
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Semigroup.js"(exports) {
|
|
2446
2446
|
"use strict";
|
|
2447
2447
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -2599,7 +2599,7 @@ var require_Semigroup = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
2599
2599
|
};
|
|
2600
2600
|
}
|
|
2601
2601
|
});
|
|
2602
|
-
var require_Zero = (0,
|
|
2602
|
+
var require_Zero = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2603
2603
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Zero.js"(exports) {
|
|
2604
2604
|
"use strict";
|
|
2605
2605
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -2611,7 +2611,7 @@ var require_Zero = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
2611
2611
|
}
|
|
2612
2612
|
}
|
|
2613
2613
|
});
|
|
2614
|
-
var require_Option = (0,
|
|
2614
|
+
var require_Option = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
2615
2615
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Option.js"(exports) {
|
|
2616
2616
|
"use strict";
|
|
2617
2617
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -3153,7 +3153,7 @@ var require_Option = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
3153
3153
|
exports.getLastMonoid = getLastMonoid;
|
|
3154
3154
|
}
|
|
3155
3155
|
});
|
|
3156
|
-
var require_Compactable = (0,
|
|
3156
|
+
var require_Compactable = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
3157
3157
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Compactable.js"(exports) {
|
|
3158
3158
|
"use strict";
|
|
3159
3159
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -3213,7 +3213,7 @@ var require_Compactable = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
3213
3213
|
}
|
|
3214
3214
|
}
|
|
3215
3215
|
});
|
|
3216
|
-
var require_EitherT = (0,
|
|
3216
|
+
var require_EitherT = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
3217
3217
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/EitherT.js"(exports) {
|
|
3218
3218
|
"use strict";
|
|
3219
3219
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -3498,7 +3498,7 @@ var require_EitherT = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
3498
3498
|
}
|
|
3499
3499
|
}
|
|
3500
3500
|
});
|
|
3501
|
-
var require_Filterable = (0,
|
|
3501
|
+
var require_Filterable = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
3502
3502
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/Filterable.js"(exports) {
|
|
3503
3503
|
"use strict";
|
|
3504
3504
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -3581,7 +3581,7 @@ var require_Filterable = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
3581
3581
|
}
|
|
3582
3582
|
}
|
|
3583
3583
|
});
|
|
3584
|
-
var require_FromTask = (0,
|
|
3584
|
+
var require_FromTask = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
3585
3585
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/FromTask.js"(exports) {
|
|
3586
3586
|
"use strict";
|
|
3587
3587
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -3620,7 +3620,7 @@ var require_FromTask = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
3620
3620
|
}
|
|
3621
3621
|
}
|
|
3622
3622
|
});
|
|
3623
|
-
var require_TaskEither = (0,
|
|
3623
|
+
var require_TaskEither = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
3624
3624
|
"../../node_modules/.pnpm/fp-ts@2.16.9/node_modules/fp-ts/lib/TaskEither.js"(exports) {
|
|
3625
3625
|
"use strict";
|
|
3626
3626
|
var __createBinding = exports && exports.__createBinding || (Object.create ? function(o2, m2, k2, k22) {
|
|
@@ -4251,10 +4251,10 @@ var require_TaskEither = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
4251
4251
|
}
|
|
4252
4252
|
}
|
|
4253
4253
|
});
|
|
4254
|
-
var E2 = (0,
|
|
4255
|
-
var import_function = (0,
|
|
4256
|
-
var T2 = (0,
|
|
4257
|
-
var TE = (0,
|
|
4254
|
+
var E2 = (0, import_chunk_2ESYSVXG.__toESM)(require_Either());
|
|
4255
|
+
var import_function = (0, import_chunk_2ESYSVXG.__toESM)(require_function());
|
|
4256
|
+
var T2 = (0, import_chunk_2ESYSVXG.__toESM)(require_Task());
|
|
4257
|
+
var TE = (0, import_chunk_2ESYSVXG.__toESM)(require_TaskEither());
|
|
4258
4258
|
var t = Symbol.for("@ts-pattern/matcher");
|
|
4259
4259
|
var e = Symbol.for("@ts-pattern/isVariadic");
|
|
4260
4260
|
var n = "@ts-pattern/anonymous-select-key";
|
|
@@ -26,16 +26,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_GHZAN2PG_exports = {};
|
|
30
|
+
__export(chunk_GHZAN2PG_exports, {
|
|
31
31
|
EngineError: () => EngineError,
|
|
32
32
|
SchemaEngine: () => SchemaEngine
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_GHZAN2PG_exports);
|
|
35
|
+
var import_chunk_G7PJKEOV = require("./chunk-G7PJKEOV.js");
|
|
36
36
|
var import_chunk_L6KOIJJ5 = require("./chunk-L6KOIJJ5.js");
|
|
37
37
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
38
|
-
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
39
38
|
var import_node_path = __toESM(require("node:path"));
|
|
40
39
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
41
40
|
var import_internals = require("@prisma/internals");
|
|
@@ -44,27 +43,31 @@ var debugRpc = (0, import_debug.default)("prisma:schemaEngine:rpc");
|
|
|
44
43
|
var debugStderr = (0, import_debug.default)("prisma:schemaEngine:stderr");
|
|
45
44
|
var debugStdin = (0, import_debug.default)("prisma:schemaEngine:stdin");
|
|
46
45
|
var EngineError = class extends Error {
|
|
46
|
+
code;
|
|
47
47
|
constructor(message, code) {
|
|
48
48
|
super(message);
|
|
49
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "code");
|
|
50
49
|
this.code = code;
|
|
51
50
|
}
|
|
52
51
|
};
|
|
53
52
|
(0, import_internals.setClassName)(EngineError, "EngineError");
|
|
54
53
|
var messageId = 1;
|
|
55
54
|
var SchemaEngine = class {
|
|
55
|
+
debug;
|
|
56
|
+
child;
|
|
57
|
+
schemaPath;
|
|
58
|
+
listeners = {};
|
|
59
|
+
/** _All_ the logs from the engine process. */
|
|
60
|
+
messages = [];
|
|
61
|
+
lastRequest;
|
|
62
|
+
/** The fields of the last engine log event with an `ERROR` level. */
|
|
63
|
+
lastError = null;
|
|
64
|
+
initPromise;
|
|
65
|
+
enabledPreviewFeatures;
|
|
66
|
+
// `latestSchema` is set to the latest schema that was used in `introspect()`
|
|
67
|
+
latestSchema;
|
|
68
|
+
// `isRunning` is set to true when the engine is initialized, and set to false when the engine is stopped
|
|
69
|
+
isRunning = false;
|
|
56
70
|
constructor({ debug = false, schemaPath, enabledPreviewFeatures }) {
|
|
57
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "debug");
|
|
58
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "child");
|
|
59
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "schemaPath");
|
|
60
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "listeners", {});
|
|
61
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "messages", []);
|
|
62
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "lastRequest");
|
|
63
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "lastError", null);
|
|
64
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "initPromise");
|
|
65
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "enabledPreviewFeatures");
|
|
66
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "latestSchema");
|
|
67
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "isRunning", false);
|
|
68
71
|
this.schemaPath = schemaPath;
|
|
69
72
|
if (debug) {
|
|
70
73
|
import_debug.default.enable("SchemaEngine*");
|
|
@@ -172,7 +175,7 @@ var SchemaEngine = class {
|
|
|
172
175
|
const { views } = introspectResult;
|
|
173
176
|
if (views) {
|
|
174
177
|
const schemaPath = this.schemaPath ?? import_node_path.default.join(process.cwd(), "prisma");
|
|
175
|
-
await (0,
|
|
178
|
+
await (0, import_chunk_G7PJKEOV.handleViewsIO)({ views, schemaPath });
|
|
176
179
|
}
|
|
177
180
|
return introspectResult;
|
|
178
181
|
} finally {
|
|
@@ -191,12 +194,6 @@ var SchemaEngine = class {
|
|
|
191
194
|
migrateDiff(args) {
|
|
192
195
|
return this.runCommand(this.getRPCPayload("diff", args));
|
|
193
196
|
}
|
|
194
|
-
/**
|
|
195
|
-
* List the names of the migrations in the migrations directory.
|
|
196
|
-
*/
|
|
197
|
-
listMigrationDirectories(args) {
|
|
198
|
-
return this.runCommand(this.getRPCPayload("listMigrationDirectories", args));
|
|
199
|
-
}
|
|
200
197
|
/**
|
|
201
198
|
* Mark a migration as applied in the migrations table.
|
|
202
199
|
* There are two possible outcomes:
|
|
@@ -26,24 +26,53 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_HPT54KSO_exports = {};
|
|
30
|
+
__export(chunk_HPT54KSO_exports, {
|
|
31
31
|
DbDrop: () => DbDrop
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_HPT54KSO_exports);
|
|
34
34
|
var import_chunk_IHDN3L3R = require("./chunk-IHDN3L3R.js");
|
|
35
35
|
var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
|
|
36
|
-
var import_chunk_GKDFIHM2 = require("./chunk-GKDFIHM2.js");
|
|
37
36
|
var import_chunk_QOPTDDIH = require("./chunk-QOPTDDIH.js");
|
|
38
|
-
var
|
|
37
|
+
var import_chunk_74LUB4XX = require("./chunk-74LUB4XX.js");
|
|
39
38
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
40
|
-
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
41
39
|
var import_internals = require("@prisma/internals");
|
|
42
40
|
var import_prompts = __toESM(require("prompts"));
|
|
43
|
-
var
|
|
41
|
+
var DbDrop = class _DbDrop {
|
|
44
42
|
static new() {
|
|
45
|
-
return new
|
|
43
|
+
return new _DbDrop();
|
|
46
44
|
}
|
|
45
|
+
static help = (0, import_internals.format)(`
|
|
46
|
+
${process.platform === "win32" ? "" : "\u{1F4A3} "}Drop the database
|
|
47
|
+
|
|
48
|
+
${(0, import_chunk_SKRR5WT4.bold)((0, import_chunk_SKRR5WT4.yellow)("WARNING"))} ${(0, import_chunk_SKRR5WT4.bold)(
|
|
49
|
+
`Prisma db drop is currently in Preview (${(0, import_internals.link)("https://pris.ly/d/preview")}).
|
|
50
|
+
There may be bugs and it's not recommended to use it in production environments.`
|
|
51
|
+
)}
|
|
52
|
+
${(0, import_chunk_SKRR5WT4.dim)("When using any of the subcommands below you need to explicitly opt-in via the --preview-feature flag.")}
|
|
53
|
+
|
|
54
|
+
${(0, import_chunk_SKRR5WT4.bold)("Usage")}
|
|
55
|
+
|
|
56
|
+
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db drop [options] --preview-feature
|
|
57
|
+
|
|
58
|
+
${(0, import_chunk_SKRR5WT4.bold)("Options")}
|
|
59
|
+
|
|
60
|
+
-h, --help Display this help message
|
|
61
|
+
--config Custom path to your Prisma config file
|
|
62
|
+
--schema Custom path to your Prisma schema
|
|
63
|
+
-f, --force Skip the confirmation prompt
|
|
64
|
+
|
|
65
|
+
${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
66
|
+
|
|
67
|
+
Drop the database
|
|
68
|
+
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db drop --preview-feature
|
|
69
|
+
|
|
70
|
+
Specify a schema
|
|
71
|
+
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db drop --preview-feature --schema=./schema.prisma
|
|
72
|
+
|
|
73
|
+
Use --force to skip the confirmation prompt
|
|
74
|
+
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db drop --preview-feature --force
|
|
75
|
+
`);
|
|
47
76
|
async parse(argv, config) {
|
|
48
77
|
const args = (0, import_internals.arg)(argv, {
|
|
49
78
|
"--help": Boolean,
|
|
@@ -66,8 +95,11 @@ var _DbDrop = class _DbDrop2 {
|
|
|
66
95
|
throw new import_chunk_IHDN3L3R.PreviewFlagError();
|
|
67
96
|
}
|
|
68
97
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
69
|
-
const {
|
|
70
|
-
|
|
98
|
+
const { primaryDatasource } = await (0, import_internals.loadSchemaContext)({
|
|
99
|
+
schemaPathFromArg: args["--schema"],
|
|
100
|
+
schemaPathFromConfig: config.schema
|
|
101
|
+
});
|
|
102
|
+
const datasourceInfo = (0, import_chunk_74LUB4XX.parseDatasourceInfo)(primaryDatasource);
|
|
71
103
|
(0, import_chunk_QOPTDDIH.printDatasource)({ datasourceInfo });
|
|
72
104
|
process.stdout.write("\n");
|
|
73
105
|
if (!args["--force"]) {
|
|
@@ -100,40 +132,8 @@ ${(0, import_chunk_SKRR5WT4.red)("All data will be lost")}.`
|
|
|
100
132
|
if (error) {
|
|
101
133
|
return new import_internals.HelpError(`
|
|
102
134
|
${(0, import_chunk_SKRR5WT4.bold)((0, import_chunk_SKRR5WT4.red)(`!`))} ${error}
|
|
103
|
-
${
|
|
135
|
+
${_DbDrop.help}`);
|
|
104
136
|
}
|
|
105
|
-
return
|
|
137
|
+
return _DbDrop.help;
|
|
106
138
|
}
|
|
107
139
|
};
|
|
108
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(_DbDrop, "help", (0, import_internals.format)(`
|
|
109
|
-
${process.platform === "win32" ? "" : "\u{1F4A3} "}Drop the database
|
|
110
|
-
|
|
111
|
-
${(0, import_chunk_SKRR5WT4.bold)((0, import_chunk_SKRR5WT4.yellow)("WARNING"))} ${(0, import_chunk_SKRR5WT4.bold)(
|
|
112
|
-
`Prisma db drop is currently in Preview (${(0, import_internals.link)("https://pris.ly/d/preview")}).
|
|
113
|
-
There may be bugs and it's not recommended to use it in production environments.`
|
|
114
|
-
)}
|
|
115
|
-
${(0, import_chunk_SKRR5WT4.dim)("When using any of the subcommands below you need to explicitly opt-in via the --preview-feature flag.")}
|
|
116
|
-
|
|
117
|
-
${(0, import_chunk_SKRR5WT4.bold)("Usage")}
|
|
118
|
-
|
|
119
|
-
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db drop [options] --preview-feature
|
|
120
|
-
|
|
121
|
-
${(0, import_chunk_SKRR5WT4.bold)("Options")}
|
|
122
|
-
|
|
123
|
-
-h, --help Display this help message
|
|
124
|
-
--config Custom path to your Prisma config file
|
|
125
|
-
--schema Custom path to your Prisma schema
|
|
126
|
-
-f, --force Skip the confirmation prompt
|
|
127
|
-
|
|
128
|
-
${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
129
|
-
|
|
130
|
-
Drop the database
|
|
131
|
-
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db drop --preview-feature
|
|
132
|
-
|
|
133
|
-
Specify a schema
|
|
134
|
-
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db drop --preview-feature --schema=./schema.prisma
|
|
135
|
-
|
|
136
|
-
Use --force to skip the confirmation prompt
|
|
137
|
-
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db drop --preview-feature --force
|
|
138
|
-
`));
|
|
139
|
-
var DbDrop = _DbDrop;
|
|
@@ -16,22 +16,53 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
16
16
|
return to;
|
|
17
17
|
};
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_HQJ7FIWN_exports = {};
|
|
20
|
+
__export(chunk_HQJ7FIWN_exports, {
|
|
21
21
|
MigrateResolve: () => MigrateResolve
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
25
|
-
var import_chunk_GKDFIHM2 = require("./chunk-GKDFIHM2.js");
|
|
23
|
+
module.exports = __toCommonJS(chunk_HQJ7FIWN_exports);
|
|
24
|
+
var import_chunk_5Q5BJS5B = require("./chunk-5Q5BJS5B.js");
|
|
26
25
|
var import_chunk_QOPTDDIH = require("./chunk-QOPTDDIH.js");
|
|
27
|
-
var
|
|
26
|
+
var import_chunk_74LUB4XX = require("./chunk-74LUB4XX.js");
|
|
28
27
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
29
|
-
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
30
28
|
var import_internals = require("@prisma/internals");
|
|
31
|
-
var
|
|
29
|
+
var MigrateResolve = class _MigrateResolve {
|
|
32
30
|
static new() {
|
|
33
|
-
return new
|
|
31
|
+
return new _MigrateResolve();
|
|
34
32
|
}
|
|
33
|
+
static help = (0, import_internals.format)(`
|
|
34
|
+
Resolve issues with database migrations in deployment databases:
|
|
35
|
+
- recover from failed migrations
|
|
36
|
+
- baseline databases when starting to use Prisma Migrate on existing databases
|
|
37
|
+
- reconcile hotfixes done manually on databases with your migration history
|
|
38
|
+
|
|
39
|
+
Run "prisma migrate status" to identify if you need to use resolve.
|
|
40
|
+
|
|
41
|
+
Read more about resolving migration history issues: ${(0, import_internals.link)("https://pris.ly/d/migrate-resolve")}
|
|
42
|
+
|
|
43
|
+
${(0, import_chunk_SKRR5WT4.bold)("Usage")}
|
|
44
|
+
|
|
45
|
+
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma migrate resolve [options]
|
|
46
|
+
|
|
47
|
+
${(0, import_chunk_SKRR5WT4.bold)("Options")}
|
|
48
|
+
|
|
49
|
+
-h, --help Display this help message
|
|
50
|
+
--config Custom path to your Prisma config file
|
|
51
|
+
--schema Custom path to your Prisma schema
|
|
52
|
+
--applied Record a specific migration as applied
|
|
53
|
+
--rolled-back Record a specific migration as rolled back
|
|
54
|
+
|
|
55
|
+
${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
56
|
+
|
|
57
|
+
Update migrations table, recording a specific migration as applied
|
|
58
|
+
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma migrate resolve --applied 20201231000000_add_users_table
|
|
59
|
+
|
|
60
|
+
Update migrations table, recording a specific migration as rolled back
|
|
61
|
+
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma migrate resolve --rolled-back 20201231000000_add_users_table
|
|
62
|
+
|
|
63
|
+
Specify a schema
|
|
64
|
+
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma migrate resolve --rolled-back 20201231000000_add_users_table --schema=./schema.prisma
|
|
65
|
+
`);
|
|
35
66
|
async parse(argv, config) {
|
|
36
67
|
const args = (0, import_internals.arg)(
|
|
37
68
|
argv,
|
|
@@ -54,8 +85,11 @@ var _MigrateResolve = class _MigrateResolve2 {
|
|
|
54
85
|
return this.help();
|
|
55
86
|
}
|
|
56
87
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
57
|
-
const
|
|
58
|
-
|
|
88
|
+
const schemaContext = await (0, import_internals.loadSchemaContext)({
|
|
89
|
+
schemaPathFromArg: args["--schema"],
|
|
90
|
+
schemaPathFromConfig: config.schema
|
|
91
|
+
});
|
|
92
|
+
(0, import_chunk_QOPTDDIH.printDatasource)({ datasourceInfo: (0, import_chunk_74LUB4XX.parseDatasourceInfo)(schemaContext.primaryDatasource) });
|
|
59
93
|
if (!args["--applied"] && !args["--rolled-back"]) {
|
|
60
94
|
throw new Error(
|
|
61
95
|
`--applied or --rolled-back must be part of the command like:
|
|
@@ -73,8 +107,8 @@ ${(0, import_chunk_SKRR5WT4.bold)((0, import_chunk_SKRR5WT4.green)((0, import_in
|
|
|
73
107
|
)}`
|
|
74
108
|
);
|
|
75
109
|
}
|
|
76
|
-
await (0,
|
|
77
|
-
const migrate = new
|
|
110
|
+
await (0, import_chunk_74LUB4XX.ensureCanConnectToDatabase)(schemaContext.primaryDatasource);
|
|
111
|
+
const migrate = new import_chunk_5Q5BJS5B.Migrate(schemaContext.schemaPath);
|
|
78
112
|
try {
|
|
79
113
|
await migrate.markMigrationApplied({
|
|
80
114
|
migrationId: args["--applied"]
|
|
@@ -94,8 +128,8 @@ Migration ${args["--applied"]} marked as applied.
|
|
|
94
128
|
)}`
|
|
95
129
|
);
|
|
96
130
|
}
|
|
97
|
-
await (0,
|
|
98
|
-
const migrate = new
|
|
131
|
+
await (0, import_chunk_74LUB4XX.ensureCanConnectToDatabase)(schemaContext.primaryDatasource);
|
|
132
|
+
const migrate = new import_chunk_5Q5BJS5B.Migrate(schemaContext.schemaPath);
|
|
99
133
|
try {
|
|
100
134
|
await migrate.markMigrationRolledBack({
|
|
101
135
|
migrationId: args["--rolled-back"]
|
|
@@ -113,42 +147,8 @@ Migration ${args["--rolled-back"]} marked as rolled back.
|
|
|
113
147
|
if (error) {
|
|
114
148
|
return new import_internals.HelpError(`
|
|
115
149
|
${(0, import_chunk_SKRR5WT4.bold)((0, import_chunk_SKRR5WT4.red)(`!`))} ${error}
|
|
116
|
-
${
|
|
150
|
+
${_MigrateResolve.help}`);
|
|
117
151
|
}
|
|
118
|
-
return
|
|
152
|
+
return _MigrateResolve.help;
|
|
119
153
|
}
|
|
120
154
|
};
|
|
121
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(_MigrateResolve, "help", (0, import_internals.format)(`
|
|
122
|
-
Resolve issues with database migrations in deployment databases:
|
|
123
|
-
- recover from failed migrations
|
|
124
|
-
- baseline databases when starting to use Prisma Migrate on existing databases
|
|
125
|
-
- reconcile hotfixes done manually on databases with your migration history
|
|
126
|
-
|
|
127
|
-
Run "prisma migrate status" to identify if you need to use resolve.
|
|
128
|
-
|
|
129
|
-
Read more about resolving migration history issues: ${(0, import_internals.link)("https://pris.ly/d/migrate-resolve")}
|
|
130
|
-
|
|
131
|
-
${(0, import_chunk_SKRR5WT4.bold)("Usage")}
|
|
132
|
-
|
|
133
|
-
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma migrate resolve [options]
|
|
134
|
-
|
|
135
|
-
${(0, import_chunk_SKRR5WT4.bold)("Options")}
|
|
136
|
-
|
|
137
|
-
-h, --help Display this help message
|
|
138
|
-
--config Custom path to your Prisma config file
|
|
139
|
-
--schema Custom path to your Prisma schema
|
|
140
|
-
--applied Record a specific migration as applied
|
|
141
|
-
--rolled-back Record a specific migration as rolled back
|
|
142
|
-
|
|
143
|
-
${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
144
|
-
|
|
145
|
-
Update migrations table, recording a specific migration as applied
|
|
146
|
-
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma migrate resolve --applied 20201231000000_add_users_table
|
|
147
|
-
|
|
148
|
-
Update migrations table, recording a specific migration as rolled back
|
|
149
|
-
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma migrate resolve --rolled-back 20201231000000_add_users_table
|
|
150
|
-
|
|
151
|
-
Specify a schema
|
|
152
|
-
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma migrate resolve --rolled-back 20201231000000_add_users_table --schema=./schema.prisma
|
|
153
|
-
`));
|
|
154
|
-
var MigrateResolve = _MigrateResolve;
|