@prisma/migrate 6.6.0-dev.24 → 6.6.0-dev.26
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 +6 -6
- package/dist/SchemaEngine.js +5 -5
- package/dist/bin.js +43 -43
- package/dist/{chunk-WWAWV7DQ.js → chunk-2ESYSVXG.js} +3 -27
- package/dist/{chunk-LKTTJWFT.js → chunk-2R6DII47.js} +5 -5
- package/dist/{chunk-J4DAOTRR.js → chunk-324Z6HS7.js} +41 -43
- package/dist/chunk-33LPBNDX.js +1399 -0
- package/dist/{chunk-3WTXX6CQ.js → chunk-5LKIRKDL.js} +60 -60
- package/dist/{chunk-LOGAFLCN.js → chunk-5R44VVVX.js} +29 -29
- package/dist/{chunk-RP2N6UXA.js → chunk-AI6DH66U.js} +6 -6
- package/dist/{chunk-F62CN63F.js → chunk-B4SUSDC2.js} +30 -31
- package/dist/{chunk-ODH7XYW7.js → chunk-BURHAP6O.js} +46 -48
- package/dist/{chunk-7X4MPZIO.js → chunk-DQMYH4YE.js} +323 -337
- package/dist/{chunk-W2SZNLK4.js → chunk-EJG7GKM7.js} +37 -39
- package/dist/{chunk-5PSO7BDO.js → chunk-EJUXYFV3.js} +15 -15
- package/dist/{chunk-MREGRQDD.js → chunk-FBWTUBJC.js} +46 -45
- package/dist/{chunk-MATFO4ZW.js → chunk-G7PJKEOV.js} +33 -33
- package/dist/{chunk-PW3LNSDM.js → chunk-GPNGRJAR.js} +33 -35
- package/dist/{chunk-NAXFX7K7.js → chunk-HJFSTAJX.js} +30 -32
- package/dist/{chunk-4ZFVT4RS.js → chunk-IINN7QUV.js} +165 -190
- package/dist/{chunk-IR55GBON.js → chunk-IWC5MH4R.js} +5 -5
- package/dist/{chunk-ZOEKRXDP.js → chunk-K43RXWQY.js} +21 -18
- package/dist/{chunk-LQO5JIBW.js → chunk-KBAYLL3V.js} +324 -338
- package/dist/{chunk-3OQIC7NW.js → chunk-KMHFSDY6.js} +43 -45
- package/dist/{chunk-255BRND3.js → chunk-KRQEFTDT.js} +6 -6
- package/dist/{chunk-VVKOFN3Y.js → chunk-LLO7YF56.js} +44 -46
- package/dist/{chunk-MKK3GSDF.js → chunk-MKS2ZJJ5.js} +5 -5
- package/dist/{chunk-VZ23KD5C.js → chunk-NGQA5JTN.js} +8 -10
- package/dist/{chunk-IY67YUOD.js → chunk-NJYZPNB4.js} +54 -56
- package/dist/{chunk-EGPJABTW.js → chunk-TGV6QGEF.js} +69 -69
- package/dist/{chunk-3VFKYWQZ.js → chunk-URKH6SE2.js} +73 -80
- package/dist/{chunk-DLLXDCI2.js → chunk-VAJ4VX67.js} +5 -6
- package/dist/{chunk-N5UBDQRA.js → chunk-VVP3QZ7Q.js} +21 -21
- package/dist/{chunk-DAYMMAJB.js → chunk-YBNDKPPO.js} +36 -38
- package/dist/{chunk-OCQGHQED.js → chunk-YBX7R3MT.js} +12 -12
- package/dist/{chunk-A6PMXMMT.js → chunk-ZB5NPOJW.js} +13 -13
- package/dist/{chunk-V5TUSOJX.js → chunk-ZGR2WQ62.js} +38 -40
- package/dist/commands/DbCommand.js +3 -3
- package/dist/commands/DbDrop.js +3 -3
- package/dist/commands/DbExecute.js +7 -7
- package/dist/commands/DbPull.js +9 -9
- package/dist/commands/DbPush.js +7 -7
- package/dist/commands/DbSeed.js +4 -4
- package/dist/commands/MigrateCommand.js +3 -3
- package/dist/commands/MigrateDeploy.js +9 -9
- package/dist/commands/MigrateDev.js +11 -11
- package/dist/commands/MigrateDiff.js +10 -10
- package/dist/commands/MigrateReset.js +10 -10
- package/dist/commands/MigrateResolve.js +7 -7
- package/dist/commands/MigrateStatus.js +7 -7
- package/dist/index.js +46 -46
- 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/customColors.js +1 -1
- package/dist/utils/ensureDatabaseExists.js +1 -1
- 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/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 -4
- 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 -4
- package/dist/utils/unixSocket.js +1 -1
- package/dist/views/handleViewsIO.js +3 -3
- package/package.json +7 -7
- package/dist/chunk-YYPMC5FN.js +0 -1407
|
@@ -16,52 +16,21 @@ 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_EJG7GKM7_exports = {};
|
|
20
|
+
__export(chunk_EJG7GKM7_exports, {
|
|
21
21
|
DbCommand: () => DbCommand
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_EJG7GKM7_exports);
|
|
24
24
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
25
|
-
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
26
25
|
var import_internals = require("@prisma/internals");
|
|
27
|
-
var
|
|
26
|
+
var DbCommand = class _DbCommand {
|
|
28
27
|
constructor(cmds) {
|
|
29
28
|
this.cmds = cmds;
|
|
30
29
|
}
|
|
31
30
|
static new(cmds) {
|
|
32
|
-
return new
|
|
31
|
+
return new _DbCommand(cmds);
|
|
33
32
|
}
|
|
34
|
-
|
|
35
|
-
const args = (0, import_internals.arg)(argv, {
|
|
36
|
-
"--help": Boolean,
|
|
37
|
-
"-h": "--help",
|
|
38
|
-
"--config": String,
|
|
39
|
-
"--preview-feature": Boolean,
|
|
40
|
-
"--telemetry-information": String
|
|
41
|
-
});
|
|
42
|
-
if ((0, import_internals.isError)(args)) {
|
|
43
|
-
return this.help(args.message);
|
|
44
|
-
}
|
|
45
|
-
if (args._.length === 0 || args["--help"]) {
|
|
46
|
-
return this.help();
|
|
47
|
-
}
|
|
48
|
-
const cmd = this.cmds[args._[0]];
|
|
49
|
-
if (cmd) {
|
|
50
|
-
const argsForCmd = args["--preview-feature"] ? [...args._.slice(1), `--preview-feature`] : args._.slice(1);
|
|
51
|
-
return cmd.parse(argsForCmd, config);
|
|
52
|
-
}
|
|
53
|
-
return (0, import_internals.unknownCommand)(_DbCommand2.help, args._[0]);
|
|
54
|
-
}
|
|
55
|
-
help(error) {
|
|
56
|
-
if (error) {
|
|
57
|
-
return new import_internals.HelpError(`
|
|
58
|
-
${(0, import_chunk_SKRR5WT4.bold)((0, import_chunk_SKRR5WT4.red)(`!`))} ${error}
|
|
59
|
-
${_DbCommand2.help}`);
|
|
60
|
-
}
|
|
61
|
-
return _DbCommand2.help;
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(_DbCommand, "help", (0, import_internals.format)(`
|
|
33
|
+
static help = (0, import_internals.format)(`
|
|
65
34
|
${process.platform === "win32" ? "" : "\u{1F3CB}\uFE0F "}Manage your database schema and lifecycle during development.
|
|
66
35
|
|
|
67
36
|
${(0, import_chunk_SKRR5WT4.bold)("Usage")}
|
|
@@ -93,5 +62,34 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
93
62
|
|
|
94
63
|
Run \`prisma db execute\`
|
|
95
64
|
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db execute
|
|
96
|
-
`)
|
|
97
|
-
|
|
65
|
+
`);
|
|
66
|
+
async parse(argv, config) {
|
|
67
|
+
const args = (0, import_internals.arg)(argv, {
|
|
68
|
+
"--help": Boolean,
|
|
69
|
+
"-h": "--help",
|
|
70
|
+
"--config": String,
|
|
71
|
+
"--preview-feature": Boolean,
|
|
72
|
+
"--telemetry-information": String
|
|
73
|
+
});
|
|
74
|
+
if ((0, import_internals.isError)(args)) {
|
|
75
|
+
return this.help(args.message);
|
|
76
|
+
}
|
|
77
|
+
if (args._.length === 0 || args["--help"]) {
|
|
78
|
+
return this.help();
|
|
79
|
+
}
|
|
80
|
+
const cmd = this.cmds[args._[0]];
|
|
81
|
+
if (cmd) {
|
|
82
|
+
const argsForCmd = args["--preview-feature"] ? [...args._.slice(1), `--preview-feature`] : args._.slice(1);
|
|
83
|
+
return cmd.parse(argsForCmd, config);
|
|
84
|
+
}
|
|
85
|
+
return (0, import_internals.unknownCommand)(_DbCommand.help, args._[0]);
|
|
86
|
+
}
|
|
87
|
+
help(error) {
|
|
88
|
+
if (error) {
|
|
89
|
+
return new import_internals.HelpError(`
|
|
90
|
+
${(0, import_chunk_SKRR5WT4.bold)((0, import_chunk_SKRR5WT4.red)(`!`))} ${error}
|
|
91
|
+
${_DbCommand.help}`);
|
|
92
|
+
}
|
|
93
|
+
return _DbCommand.help;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
@@ -16,14 +16,14 @@ 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_EJUXYFV3_exports = {};
|
|
20
|
+
__export(chunk_EJUXYFV3_exports, {
|
|
21
21
|
require_ms: () => require_ms,
|
|
22
22
|
require_src: () => require_src
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
25
|
-
var
|
|
26
|
-
var require_ms = (0,
|
|
24
|
+
module.exports = __toCommonJS(chunk_EJUXYFV3_exports);
|
|
25
|
+
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
|
26
|
+
var require_ms = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
27
27
|
"../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports, module2) {
|
|
28
28
|
"use strict";
|
|
29
29
|
var s = 1e3;
|
|
@@ -138,7 +138,7 @@ var require_ms = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
140
|
});
|
|
141
|
-
var require_common = (0,
|
|
141
|
+
var require_common = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
142
142
|
"../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/common.js"(exports, module2) {
|
|
143
143
|
"use strict";
|
|
144
144
|
function setup(env) {
|
|
@@ -314,7 +314,7 @@ var require_common = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
314
314
|
module2.exports = setup;
|
|
315
315
|
}
|
|
316
316
|
});
|
|
317
|
-
var require_browser = (0,
|
|
317
|
+
var require_browser = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
318
318
|
"../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/browser.js"(exports, module2) {
|
|
319
319
|
"use strict";
|
|
320
320
|
exports.formatArgs = formatArgs;
|
|
@@ -483,7 +483,7 @@ var require_browser = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
483
483
|
};
|
|
484
484
|
}
|
|
485
485
|
});
|
|
486
|
-
var require_has_flag = (0,
|
|
486
|
+
var require_has_flag = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
487
487
|
"../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module2) {
|
|
488
488
|
"use strict";
|
|
489
489
|
module2.exports = (flag, argv = process.argv) => {
|
|
@@ -494,11 +494,11 @@ var require_has_flag = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
494
494
|
};
|
|
495
495
|
}
|
|
496
496
|
});
|
|
497
|
-
var require_supports_color = (0,
|
|
497
|
+
var require_supports_color = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
498
498
|
"../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js"(exports, module2) {
|
|
499
499
|
"use strict";
|
|
500
|
-
var os = (0,
|
|
501
|
-
var tty = (0,
|
|
500
|
+
var os = (0, import_chunk_2ESYSVXG.__require)("os");
|
|
501
|
+
var tty = (0, import_chunk_2ESYSVXG.__require)("tty");
|
|
502
502
|
var hasFlag = require_has_flag();
|
|
503
503
|
var { env } = process;
|
|
504
504
|
var flagForceColor;
|
|
@@ -606,11 +606,11 @@ var require_supports_color = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
606
606
|
};
|
|
607
607
|
}
|
|
608
608
|
});
|
|
609
|
-
var require_node = (0,
|
|
609
|
+
var require_node = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
610
610
|
"../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/node.js"(exports, module2) {
|
|
611
611
|
"use strict";
|
|
612
|
-
var tty = (0,
|
|
613
|
-
var util = (0,
|
|
612
|
+
var tty = (0, import_chunk_2ESYSVXG.__require)("tty");
|
|
613
|
+
var util = (0, import_chunk_2ESYSVXG.__require)("util");
|
|
614
614
|
exports.init = init;
|
|
615
615
|
exports.log = log;
|
|
616
616
|
exports.formatArgs = formatArgs;
|
|
@@ -779,7 +779,7 @@ var require_node = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
779
779
|
};
|
|
780
780
|
}
|
|
781
781
|
});
|
|
782
|
-
var require_src = (0,
|
|
782
|
+
var require_src = (0, import_chunk_2ESYSVXG.__commonJS)({
|
|
783
783
|
"../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/index.js"(exports, module2) {
|
|
784
784
|
"use strict";
|
|
785
785
|
if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
|
|
@@ -26,14 +26,13 @@ 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_FBWTUBJC_exports = {};
|
|
30
|
+
__export(chunk_FBWTUBJC_exports, {
|
|
31
31
|
DbExecute: () => DbExecute
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(chunk_FBWTUBJC_exports);
|
|
34
|
+
var import_chunk_VVP3QZ7Q = require("./chunk-VVP3QZ7Q.js");
|
|
35
35
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
36
|
-
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
37
36
|
var import_internals = require("@prisma/internals");
|
|
38
37
|
var import_fs = __toESM(require("fs"));
|
|
39
38
|
var import_path = __toESM(require("path"));
|
|
@@ -82,10 +81,48 @@ ${(0, import_chunk_SKRR5WT4.bold)("Flags")}
|
|
|
82
81
|
|
|
83
82
|
--stdin Use the terminal standard input as the script to be executed`
|
|
84
83
|
);
|
|
85
|
-
var
|
|
84
|
+
var DbExecute = class _DbExecute {
|
|
86
85
|
static new() {
|
|
87
|
-
return new
|
|
86
|
+
return new _DbExecute();
|
|
88
87
|
}
|
|
88
|
+
// TODO: This command needs to get proper support for `prisma.config.ts` eventually. Not just taking the schema path
|
|
89
|
+
// from prisma.config.ts but likely to support driver adapters, too?
|
|
90
|
+
// See https://linear.app/prisma-company/issue/ORM-639/prisma-db-execute-support-prismaconfigts-and-driver-adapters
|
|
91
|
+
static help = (0, import_internals.format)(`
|
|
92
|
+
${process.platform === "win32" ? "" : "\u{1F4DD} "}Execute native commands to your database
|
|
93
|
+
|
|
94
|
+
This command takes as input a datasource, using ${(0, import_chunk_SKRR5WT4.green)(`--url`)} or ${(0, import_chunk_SKRR5WT4.green)(`--schema`)} and a script, using ${(0, import_chunk_SKRR5WT4.green)(
|
|
95
|
+
`--stdin`
|
|
96
|
+
)} or ${(0, import_chunk_SKRR5WT4.green)(`--file`)}.
|
|
97
|
+
The input parameters are mutually exclusive, only 1 of each (datasource & script) must be provided.
|
|
98
|
+
|
|
99
|
+
The output of the command is connector-specific, and is not meant for returning data, but only to report success or failure.
|
|
100
|
+
|
|
101
|
+
On SQL databases, this command takes as input a SQL script.
|
|
102
|
+
The whole script will be sent as a single command to the database.
|
|
103
|
+
|
|
104
|
+
${(0, import_chunk_SKRR5WT4.italic)(`This command is currently not supported on MongoDB.`)}
|
|
105
|
+
|
|
106
|
+
${helpOptions}
|
|
107
|
+
${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
108
|
+
|
|
109
|
+
Execute the content of a SQL script file to the datasource URL taken from the schema
|
|
110
|
+
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db execute
|
|
111
|
+
--file ./script.sql \\
|
|
112
|
+
--schema schema.prisma
|
|
113
|
+
|
|
114
|
+
Execute the SQL script from stdin to the datasource URL specified via the \`DATABASE_URL\` environment variable
|
|
115
|
+
${(0, import_chunk_SKRR5WT4.dim)("$")} echo 'TRUNCATE TABLE dev;' | \\
|
|
116
|
+
prisma db execute \\
|
|
117
|
+
--stdin \\
|
|
118
|
+
--url="$DATABASE_URL"
|
|
119
|
+
|
|
120
|
+
Like previous example, but exposing the datasource url credentials to your terminal history
|
|
121
|
+
${(0, import_chunk_SKRR5WT4.dim)("$")} echo 'TRUNCATE TABLE dev;' | \\
|
|
122
|
+
prisma db execute \\
|
|
123
|
+
--stdin \\
|
|
124
|
+
--url="mysql://root:root@localhost/mydb"
|
|
125
|
+
`);
|
|
89
126
|
async parse(argv, config) {
|
|
90
127
|
const args = (0, import_internals.arg)(
|
|
91
128
|
argv,
|
|
@@ -161,7 +198,7 @@ See \`${(0, import_chunk_SKRR5WT4.green)((0, import_internals.getCommandWithExec
|
|
|
161
198
|
...(0, import_internals.toSchemasWithConfigDir)(schemaWithPath, engineConfig)
|
|
162
199
|
};
|
|
163
200
|
}
|
|
164
|
-
const migrate = new
|
|
201
|
+
const migrate = new import_chunk_VVP3QZ7Q.Migrate();
|
|
165
202
|
try {
|
|
166
203
|
await migrate.engine.dbExecute({
|
|
167
204
|
script,
|
|
@@ -179,42 +216,6 @@ ${error}
|
|
|
179
216
|
|
|
180
217
|
${helpOptions}`);
|
|
181
218
|
}
|
|
182
|
-
return
|
|
219
|
+
return _DbExecute.help;
|
|
183
220
|
}
|
|
184
221
|
};
|
|
185
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(_DbExecute, "help", (0, import_internals.format)(`
|
|
186
|
-
${process.platform === "win32" ? "" : "\u{1F4DD} "}Execute native commands to your database
|
|
187
|
-
|
|
188
|
-
This command takes as input a datasource, using ${(0, import_chunk_SKRR5WT4.green)(`--url`)} or ${(0, import_chunk_SKRR5WT4.green)(`--schema`)} and a script, using ${(0, import_chunk_SKRR5WT4.green)(
|
|
189
|
-
`--stdin`
|
|
190
|
-
)} or ${(0, import_chunk_SKRR5WT4.green)(`--file`)}.
|
|
191
|
-
The input parameters are mutually exclusive, only 1 of each (datasource & script) must be provided.
|
|
192
|
-
|
|
193
|
-
The output of the command is connector-specific, and is not meant for returning data, but only to report success or failure.
|
|
194
|
-
|
|
195
|
-
On SQL databases, this command takes as input a SQL script.
|
|
196
|
-
The whole script will be sent as a single command to the database.
|
|
197
|
-
|
|
198
|
-
${(0, import_chunk_SKRR5WT4.italic)(`This command is currently not supported on MongoDB.`)}
|
|
199
|
-
|
|
200
|
-
${helpOptions}
|
|
201
|
-
${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
202
|
-
|
|
203
|
-
Execute the content of a SQL script file to the datasource URL taken from the schema
|
|
204
|
-
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db execute
|
|
205
|
-
--file ./script.sql \\
|
|
206
|
-
--schema schema.prisma
|
|
207
|
-
|
|
208
|
-
Execute the SQL script from stdin to the datasource URL specified via the \`DATABASE_URL\` environment variable
|
|
209
|
-
${(0, import_chunk_SKRR5WT4.dim)("$")} echo 'TRUNCATE TABLE dev;' | \\
|
|
210
|
-
prisma db execute \\
|
|
211
|
-
--stdin \\
|
|
212
|
-
--url="$DATABASE_URL"
|
|
213
|
-
|
|
214
|
-
Like previous example, but exposing the datasource url credentials to your terminal history
|
|
215
|
-
${(0, import_chunk_SKRR5WT4.dim)("$")} echo 'TRUNCATE TABLE dev;' | \\
|
|
216
|
-
prisma db execute \\
|
|
217
|
-
--stdin \\
|
|
218
|
-
--url="mysql://root:root@localhost/mydb"
|
|
219
|
-
`));
|
|
220
|
-
var DbExecute = _DbExecute;
|
|
@@ -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,25 +26,46 @@ 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_GPNGRJAR_exports = {};
|
|
30
|
+
__export(chunk_GPNGRJAR_exports, {
|
|
31
31
|
MigrateDeploy: () => MigrateDeploy
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
35
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(chunk_GPNGRJAR_exports);
|
|
34
|
+
var import_chunk_KRQEFTDT = require("./chunk-KRQEFTDT.js");
|
|
35
|
+
var import_chunk_VVP3QZ7Q = require("./chunk-VVP3QZ7Q.js");
|
|
36
36
|
var import_chunk_GKDFIHM2 = require("./chunk-GKDFIHM2.js");
|
|
37
37
|
var import_chunk_QOPTDDIH = require("./chunk-QOPTDDIH.js");
|
|
38
38
|
var import_chunk_DJMFXNR4 = require("./chunk-DJMFXNR4.js");
|
|
39
39
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
40
|
-
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
41
40
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
42
41
|
var import_internals = require("@prisma/internals");
|
|
43
42
|
var debug = (0, import_debug.default)("prisma:migrate:deploy");
|
|
44
|
-
var
|
|
43
|
+
var MigrateDeploy = class _MigrateDeploy {
|
|
45
44
|
static new() {
|
|
46
|
-
return new
|
|
45
|
+
return new _MigrateDeploy();
|
|
47
46
|
}
|
|
47
|
+
static help = (0, import_internals.format)(`
|
|
48
|
+
Apply pending migrations to update the database schema in production/staging
|
|
49
|
+
|
|
50
|
+
${(0, import_chunk_SKRR5WT4.bold)("Usage")}
|
|
51
|
+
|
|
52
|
+
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma migrate deploy [options]
|
|
53
|
+
|
|
54
|
+
${(0, import_chunk_SKRR5WT4.bold)("Options")}
|
|
55
|
+
|
|
56
|
+
-h, --help Display this help message
|
|
57
|
+
--config Custom path to your Prisma config file
|
|
58
|
+
--schema Custom path to your Prisma schema
|
|
59
|
+
|
|
60
|
+
${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
61
|
+
|
|
62
|
+
Deploy your pending migrations to your production/staging database
|
|
63
|
+
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma migrate deploy
|
|
64
|
+
|
|
65
|
+
Specify a schema
|
|
66
|
+
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma migrate deploy --schema=./schema.prisma
|
|
67
|
+
|
|
68
|
+
`);
|
|
48
69
|
async parse(argv, config) {
|
|
49
70
|
const args = (0, import_internals.arg)(
|
|
50
71
|
argv,
|
|
@@ -67,7 +88,7 @@ var _MigrateDeploy = class _MigrateDeploy2 {
|
|
|
67
88
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
68
89
|
const { schemaPath } = await (0, import_chunk_GKDFIHM2.getSchemaPathAndPrint)(args["--schema"], config.schema);
|
|
69
90
|
(0, import_chunk_QOPTDDIH.printDatasource)({ datasourceInfo: await (0, import_chunk_DJMFXNR4.getDatasourceInfo)({ schemaPath }) });
|
|
70
|
-
const migrate = new
|
|
91
|
+
const migrate = new import_chunk_VVP3QZ7Q.Migrate(schemaPath);
|
|
71
92
|
try {
|
|
72
93
|
const wasDbCreated = await (0, import_chunk_DJMFXNR4.ensureDatabaseExists)("apply", schemaPath);
|
|
73
94
|
if (wasDbCreated) {
|
|
@@ -104,7 +125,7 @@ var _MigrateDeploy = class _MigrateDeploy2 {
|
|
|
104
125
|
} else {
|
|
105
126
|
return `The following migration(s) have been applied:
|
|
106
127
|
|
|
107
|
-
${(0,
|
|
128
|
+
${(0, import_chunk_KRQEFTDT.printFilesFromMigrationIds)(
|
|
108
129
|
"migrations",
|
|
109
130
|
migrationIds,
|
|
110
131
|
{
|
|
@@ -119,31 +140,8 @@ ${(0, import_chunk_SKRR5WT4.green)("All migrations have been successfully applie
|
|
|
119
140
|
if (error) {
|
|
120
141
|
return new import_internals.HelpError(`
|
|
121
142
|
${(0, import_chunk_SKRR5WT4.bold)((0, import_chunk_SKRR5WT4.red)(`!`))} ${error}
|
|
122
|
-
${
|
|
143
|
+
${_MigrateDeploy.help}`);
|
|
123
144
|
}
|
|
124
|
-
return
|
|
145
|
+
return _MigrateDeploy.help;
|
|
125
146
|
}
|
|
126
147
|
};
|
|
127
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(_MigrateDeploy, "help", (0, import_internals.format)(`
|
|
128
|
-
Apply pending migrations to update the database schema in production/staging
|
|
129
|
-
|
|
130
|
-
${(0, import_chunk_SKRR5WT4.bold)("Usage")}
|
|
131
|
-
|
|
132
|
-
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma migrate deploy [options]
|
|
133
|
-
|
|
134
|
-
${(0, import_chunk_SKRR5WT4.bold)("Options")}
|
|
135
|
-
|
|
136
|
-
-h, --help Display this help message
|
|
137
|
-
--config Custom path to your Prisma config file
|
|
138
|
-
--schema Custom path to your Prisma schema
|
|
139
|
-
|
|
140
|
-
${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
141
|
-
|
|
142
|
-
Deploy your pending migrations to your production/staging database
|
|
143
|
-
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma migrate deploy
|
|
144
|
-
|
|
145
|
-
Specify a schema
|
|
146
|
-
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma migrate deploy --schema=./schema.prisma
|
|
147
|
-
|
|
148
|
-
`));
|
|
149
|
-
var MigrateDeploy = _MigrateDeploy;
|