@prisma/migrate 6.4.1 → 6.5.0-dev.10
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 -4
- package/dist/Migrate.js +6 -7
- package/dist/SchemaEngine.js +6 -7
- package/dist/bin.js +116 -146
- package/dist/{chunk-WOOPRG54.js → chunk-255BRND3.js} +7 -14
- package/dist/{chunk-75EIHNAH.js → chunk-2NMFKGXM.js} +5 -6
- package/dist/chunk-3WC4XD74.js +98 -0
- package/dist/chunk-4EV2RVXY.js +226 -0
- package/dist/{chunk-YWWOSXMY.js → chunk-4JQIX6O7.js} +7 -15
- package/dist/{chunk-J77IRNPE.js → chunk-5VDXAE53.js} +45 -31
- package/dist/{chunk-M5YNQ2NP.js → chunk-6DFJIBJX.js} +5 -12
- package/dist/{chunk-SGCF5OHF.js → chunk-7CQBDP4H.js} +6 -13
- package/dist/{chunk-7IT2ZO3D.js → chunk-AHJ2N6BJ.js} +3 -9
- package/dist/chunk-CTPONE6G.js +65 -0
- package/dist/{chunk-DUCG3NRP.js → chunk-D74DU52C.js} +633 -806
- package/dist/{chunk-UVNSK22K.js → chunk-DDHPSYC4.js} +122 -130
- package/dist/{chunk-CUDKD32S.js → chunk-DIAO4W7O.js} +11 -17
- package/dist/{chunk-XJQP3B4W.js → chunk-DJMFXNR4.js} +7 -15
- package/dist/{chunk-YD7GG4WS.js → chunk-FRTPDRF2.js} +66 -74
- package/dist/chunk-HIFVDK2U.js +96 -0
- package/dist/chunk-I4EY55DC.js +195 -0
- package/dist/{chunk-WLJHGKMK.js → chunk-IHDN3L3R.js} +7 -8
- package/dist/chunk-J5FHVALZ.js +230 -0
- package/dist/{chunk-INC2OACE.js → chunk-JFKDSUIE.js} +3 -9
- package/dist/{chunk-V7DE6JTG.js → chunk-JZ75RIMZ.js} +3 -9
- package/dist/{chunk-AAATUOV6.js → chunk-L6KOIJJ5.js} +53 -59
- package/dist/{chunk-GN5BY5N2.js → chunk-LGYRZ6CV.js} +4 -10
- package/dist/chunk-LVLRGTYH.js +148 -0
- package/dist/{chunk-CQQQ436N.js → chunk-MATFO4ZW.js} +186 -200
- package/dist/{chunk-WZT5FFN4.js → chunk-NB4NJGMY.js} +634 -807
- package/dist/{chunk-IFCV5MY4.js → chunk-OCQGHQED.js} +5 -11
- package/dist/chunk-ORL3LJOT.js +470 -0
- package/dist/chunk-PSYS5XVH.js +335 -0
- package/dist/{chunk-Q7ACZDDT.js → chunk-QOPTDDIH.js} +5 -12
- package/dist/chunk-QTAIWPLH.js +78 -0
- package/dist/{chunk-35LAJN5S.js → chunk-RP2N6UXA.js} +23 -29
- package/dist/chunk-RQFGRXJI.js +174 -0
- package/dist/{chunk-QBK5XTJE.js → chunk-RR6BKMNO.js} +3 -9
- package/dist/{chunk-ILJRJJ3S.js → chunk-RTGQXNX6.js} +3 -9
- package/dist/chunk-SKRR5WT4.js +76 -0
- package/dist/chunk-TM3ETZES.js +153 -0
- package/dist/{chunk-KPUNMK5W.js → chunk-TWPTG4XS.js} +5 -12
- package/dist/{chunk-6QFE3AWR.js → chunk-UP6FVCDK.js} +6 -13
- package/dist/{chunk-YKUZUAXA.js → chunk-V3ZMNXZC.js} +16 -23
- package/dist/chunk-WLPX3672.js +365 -0
- package/dist/chunk-WNH2ACJS.js +122 -0
- package/dist/{chunk-X6XGFLEF.js → chunk-YZVZCC3I.js} +25 -30
- package/dist/commands/DbCommand.js +3 -4
- package/dist/commands/DbDrop.js +9 -9
- package/dist/commands/DbExecute.js +7 -8
- package/dist/commands/DbPull.js +18 -19
- package/dist/commands/DbPush.js +12 -13
- package/dist/commands/DbSeed.js +4 -5
- package/dist/commands/MigrateCommand.js +3 -4
- package/dist/commands/MigrateDeploy.js +13 -14
- package/dist/commands/MigrateDev.js +17 -18
- package/dist/commands/MigrateDiff.js +8 -9
- package/dist/commands/MigrateReset.js +15 -16
- package/dist/commands/MigrateResolve.js +11 -12
- package/dist/commands/MigrateStatus.js +11 -12
- package/dist/index.js +60 -77
- package/dist/migrate/src/commands/MigrateDev.d.ts +1 -1
- package/dist/{multipart-parser-73VM3J4A.js → multipart-parser-NDLECNMN.js} +527 -561
- package/dist/utils/byline.js +5 -6
- package/dist/utils/captureStdout.js +2 -3
- package/dist/utils/countModelsAndTypes.js +2 -3
- package/dist/utils/ensureDatabaseExists.js +8 -9
- package/dist/utils/errors.js +8 -9
- package/dist/utils/flagErrors.js +5 -5
- package/dist/utils/getDatabaseVersionSafe.js +6 -7
- package/dist/utils/getSchemaPathAndPrint.js +4 -5
- package/dist/utils/handleEvaluateDataloss.js +3 -4
- package/dist/utils/introspectSql.js +6 -6
- package/dist/utils/isSchemaEmpty.js +2 -3
- package/dist/utils/printDatasource.js +3 -4
- package/dist/utils/printDatasources.js +3 -4
- package/dist/utils/printFiles.js +5 -6
- package/dist/utils/printIntrospectedSchema.js +2 -3
- package/dist/utils/printMigrationId.js +4 -5
- package/dist/utils/promptForMigrationName.js +2 -3
- package/dist/utils/removeSchemaFiles.js +2 -3
- package/dist/utils/replaceOrAddDatasource.js +2 -3
- package/dist/utils/replaceOrAddDatasource.test.js +7 -8
- package/dist/utils/saveSchemaFiles.js +2 -3
- package/dist/utils/seed.js +6 -7
- package/dist/utils/setupMSSQL.js +13 -13
- package/dist/utils/setupMongo.js +3 -3
- package/dist/utils/spinner.js +2 -3
- package/dist/utils/unixSocket.js +2 -3
- package/dist/views/handleViewsIO.js +2 -3
- package/package.json +7 -7
- package/dist/chunk-26XQQ4AG.js +0 -386
- package/dist/chunk-2RSEPJFX.js +0 -165
- package/dist/chunk-4B2LXK4R.js +0 -207
- package/dist/chunk-4UJBOCZJ.js +0 -130
- package/dist/chunk-5HZLCY6X.js +0 -161
- package/dist/chunk-6TE2RIPN.js +0 -80
- package/dist/chunk-7S3Q4MCN.js +0 -480
- package/dist/chunk-AOX7CJAS.js +0 -234
- package/dist/chunk-FF3526PX.js +0 -279
- package/dist/chunk-FUSFURVP.js +0 -86
- package/dist/chunk-GCTCQLOF.js +0 -365
- package/dist/chunk-K44VNAFW.js +0 -189
- package/dist/chunk-O4BT6W33.js +0 -104
- package/dist/chunk-TKAGMA5K.js +0 -72
- package/dist/chunk-U374EXYQ.js +0 -106
package/dist/chunk-TKAGMA5K.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var chunk_TKAGMA5K_exports = {};
|
|
20
|
-
__export(chunk_TKAGMA5K_exports, {
|
|
21
|
-
CaptureStdout: () => CaptureStdout,
|
|
22
|
-
init_captureStdout: () => init_captureStdout
|
|
23
|
-
});
|
|
24
|
-
module.exports = __toCommonJS(chunk_TKAGMA5K_exports);
|
|
25
|
-
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
26
|
-
var CaptureStdout;
|
|
27
|
-
var init_captureStdout = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
28
|
-
"src/utils/captureStdout.ts"() {
|
|
29
|
-
CaptureStdout = class {
|
|
30
|
-
constructor() {
|
|
31
|
-
this._capturedText = [];
|
|
32
|
-
this._orig_stdout_write = null;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Starts capturing the writes to process.stdout
|
|
36
|
-
*/
|
|
37
|
-
startCapture() {
|
|
38
|
-
this._orig_stdout_write = process.stdout.write;
|
|
39
|
-
process.stdout.write = this._writeCapture.bind(this);
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Stops capturing the writes to process.stdout.
|
|
43
|
-
*/
|
|
44
|
-
stopCapture() {
|
|
45
|
-
if (this._orig_stdout_write) {
|
|
46
|
-
process.stdout.write = this._orig_stdout_write;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Private method that is used as the replacement write function for process.stdout
|
|
51
|
-
* @param string
|
|
52
|
-
* @private
|
|
53
|
-
*/
|
|
54
|
-
_writeCapture(string) {
|
|
55
|
-
this._capturedText.push(string);
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Retrieve the text that has been captured since creation or since the last clear call
|
|
59
|
-
* @returns {Array} of Strings
|
|
60
|
-
*/
|
|
61
|
-
getCapturedText() {
|
|
62
|
-
return this._capturedText;
|
|
63
|
-
}
|
|
64
|
-
/**
|
|
65
|
-
* Clears all of the captured text
|
|
66
|
-
*/
|
|
67
|
-
clearCaptureText() {
|
|
68
|
-
this._capturedText = [];
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
}
|
|
72
|
-
});
|
package/dist/chunk-U374EXYQ.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
var chunk_U374EXYQ_exports = {};
|
|
20
|
-
__export(chunk_U374EXYQ_exports, {
|
|
21
|
-
DbDropNeedsForceError: () => DbDropNeedsForceError,
|
|
22
|
-
DbPushIgnoreWarningsWithFlagError: () => DbPushIgnoreWarningsWithFlagError,
|
|
23
|
-
MigrateDevEnvNonInteractiveError: () => MigrateDevEnvNonInteractiveError,
|
|
24
|
-
MigrateNeedsForceError: () => MigrateNeedsForceError,
|
|
25
|
-
MigrateResetEnvNonInteractiveError: () => MigrateResetEnvNonInteractiveError,
|
|
26
|
-
NoSchemaFoundError: () => NoSchemaFoundError,
|
|
27
|
-
init_errors: () => init_errors
|
|
28
|
-
});
|
|
29
|
-
module.exports = __toCommonJS(chunk_U374EXYQ_exports);
|
|
30
|
-
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
|
31
|
-
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
32
|
-
var import_internals = require("@prisma/internals");
|
|
33
|
-
var NoSchemaFoundError, DbPushIgnoreWarningsWithFlagError, MigrateNeedsForceError, MigrateResetEnvNonInteractiveError, MigrateDevEnvNonInteractiveError, DbDropNeedsForceError;
|
|
34
|
-
var init_errors = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
35
|
-
"src/utils/errors.ts"() {
|
|
36
|
-
(0, import_chunk_6TE2RIPN.init_colors)();
|
|
37
|
-
NoSchemaFoundError = class extends Error {
|
|
38
|
-
constructor() {
|
|
39
|
-
super(
|
|
40
|
-
`Could not find a ${(0, import_chunk_6TE2RIPN.bold)(
|
|
41
|
-
"schema.prisma"
|
|
42
|
-
)} file that is required for this command.
|
|
43
|
-
You can either provide it with ${(0, import_chunk_6TE2RIPN.green)(
|
|
44
|
-
"--schema"
|
|
45
|
-
)}, set it as \`prisma.schema\` in your package.json or put it into the default location ${(0, import_chunk_6TE2RIPN.green)(
|
|
46
|
-
"./prisma/schema.prisma"
|
|
47
|
-
)} ${(0, import_internals.link)("https://pris.ly/d/prisma-schema-location")}`
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
};
|
|
51
|
-
(0, import_internals.setClassName)(NoSchemaFoundError, "NoSchemaFoundError");
|
|
52
|
-
DbPushIgnoreWarningsWithFlagError = class extends Error {
|
|
53
|
-
constructor() {
|
|
54
|
-
super(
|
|
55
|
-
`Use the --accept-data-loss flag to ignore the data loss warnings like ${(0, import_chunk_6TE2RIPN.bold)(
|
|
56
|
-
(0, import_chunk_6TE2RIPN.green)((0, import_internals.getCommandWithExecutor)("prisma db push --accept-data-loss"))
|
|
57
|
-
)}`
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
(0, import_internals.setClassName)(DbPushIgnoreWarningsWithFlagError, "DbPushIgnoreWarningsWithFlagError");
|
|
62
|
-
MigrateNeedsForceError = class extends Error {
|
|
63
|
-
constructor(subcommand) {
|
|
64
|
-
super(
|
|
65
|
-
`Use the --force flag to use the ${subcommand} command in an unattended environment like ${(0, import_chunk_6TE2RIPN.bold)(
|
|
66
|
-
(0, import_chunk_6TE2RIPN.green)((0, import_internals.getCommandWithExecutor)(`prisma migrate ${subcommand} --force`))
|
|
67
|
-
)}`
|
|
68
|
-
);
|
|
69
|
-
}
|
|
70
|
-
};
|
|
71
|
-
(0, import_internals.setClassName)(MigrateNeedsForceError, "MigrateNeedsForceError");
|
|
72
|
-
MigrateResetEnvNonInteractiveError = class extends Error {
|
|
73
|
-
constructor() {
|
|
74
|
-
super(
|
|
75
|
-
`Prisma Migrate has detected that the environment is non-interactive. It is recommended to run this command in an interactive environment.
|
|
76
|
-
|
|
77
|
-
Use ${(0, import_chunk_6TE2RIPN.bold)((0, import_chunk_6TE2RIPN.green)(`--force`))} to run this command without user interaction.
|
|
78
|
-
See ${(0, import_internals.link)("https://www.prisma.io/docs/reference/api-reference/command-reference#migrate-reset")}`
|
|
79
|
-
);
|
|
80
|
-
}
|
|
81
|
-
};
|
|
82
|
-
(0, import_internals.setClassName)(MigrateResetEnvNonInteractiveError, "MigrateResetEnvNonInteractiveError");
|
|
83
|
-
MigrateDevEnvNonInteractiveError = class extends Error {
|
|
84
|
-
constructor() {
|
|
85
|
-
super(
|
|
86
|
-
`Prisma Migrate has detected that the environment is non-interactive, which is not supported.
|
|
87
|
-
|
|
88
|
-
\`prisma migrate dev\` is an interactive command designed to create new migrations and evolve the database in development.
|
|
89
|
-
To apply existing migrations in deployments, use ${(0, import_chunk_6TE2RIPN.bold)((0, import_chunk_6TE2RIPN.green)(`prisma migrate deploy`))}.
|
|
90
|
-
See ${(0, import_internals.link)("https://www.prisma.io/docs/reference/api-reference/command-reference#migrate-deploy")}`
|
|
91
|
-
);
|
|
92
|
-
}
|
|
93
|
-
};
|
|
94
|
-
(0, import_internals.setClassName)(MigrateDevEnvNonInteractiveError, "MigrateDevEnvNonInteractiveError");
|
|
95
|
-
DbDropNeedsForceError = class extends Error {
|
|
96
|
-
constructor(subcommand) {
|
|
97
|
-
super(
|
|
98
|
-
`Use the --force flag to use the ${subcommand} command in an unattended environment like ${(0, import_chunk_6TE2RIPN.bold)(
|
|
99
|
-
(0, import_chunk_6TE2RIPN.green)((0, import_internals.getCommandWithExecutor)(`prisma db ${subcommand} --force --preview-feature`))
|
|
100
|
-
)}`
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
};
|
|
104
|
-
(0, import_internals.setClassName)(DbDropNeedsForceError, "DbDropNeedsForceError");
|
|
105
|
-
}
|
|
106
|
-
});
|