@prisma/migrate 6.4.0-dev.4 → 6.4.0-dev.41
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/bin.js +56 -42
- package/dist/{chunk-CSUAUCRR.js → chunk-5Z62IFXC.js} +6 -5
- package/dist/{chunk-7QAR4NT3.js → chunk-62TCLCPV.js} +6 -5
- package/dist/{chunk-NKQGJ3AE.js → chunk-A6PMXMMT.js} +29 -15
- package/dist/{chunk-G66QFMM5.js → chunk-COGVXKKS.js} +8 -7
- package/dist/{chunk-GRGGAY6L.js → chunk-CUDKD32S.js} +159 -5
- package/dist/{chunk-77RYI3ZW.js → chunk-HK47ZTH2.js} +6 -5
- package/dist/{chunk-NJUAN6V2.js → chunk-L5WSTNST.js} +6 -6
- package/dist/{chunk-HAJNCOW7.js → chunk-LEODRY55.js} +19 -18
- package/dist/{chunk-43RWRQLU.js → chunk-LRSJQHJE.js} +6 -5
- package/dist/{chunk-JZ6FKTWG.js → chunk-MWDR5RWF.js} +5 -6
- package/dist/{chunk-CK5VLKFM.js → chunk-NGDFNKHZ.js} +6 -6
- package/dist/{chunk-JESW2ENL.js → chunk-OKNTDCKF.js} +6 -5
- package/dist/{chunk-E2XKFV2C.js → chunk-QV7SOU3V.js} +6 -5
- package/dist/{chunk-I63N54YI.js → chunk-RR4VDHNZ.js} +6 -5
- package/dist/{chunk-WJT3IOMB.js → chunk-VGYN2FAS.js} +6 -5
- package/dist/{chunk-S6MPG3R3.js → chunk-WZSBTF6I.js} +17 -15
- package/dist/{chunk-SDB56MUM.js → chunk-XKAJB3OJ.js} +16 -14
- package/dist/commands/DbCommand.js +3 -3
- package/dist/commands/DbDrop.js +2 -2
- package/dist/commands/DbExecute.js +3 -3
- package/dist/commands/DbPull.js +4 -4
- package/dist/commands/DbPush.js +3 -3
- package/dist/commands/DbSeed.js +3 -3
- package/dist/commands/MigrateCommand.js +3 -3
- package/dist/commands/MigrateDeploy.js +3 -3
- package/dist/commands/MigrateDev.js +3 -3
- package/dist/commands/MigrateDiff.js +4 -4
- package/dist/commands/MigrateReset.js +3 -3
- package/dist/commands/MigrateResolve.js +3 -3
- package/dist/commands/MigrateStatus.js +3 -3
- package/dist/index.js +40 -40
- package/dist/internals/src/cli/types.d.ts +2 -1
- package/dist/internals/src/utils/loadEnvFile.d.ts +4 -2
- package/dist/migrate/src/CLI.d.ts +2 -1
- package/dist/migrate/src/commands/DbCommand.d.ts +2 -1
- package/dist/migrate/src/commands/DbDrop.d.ts +2 -1
- package/dist/migrate/src/commands/DbExecute.d.ts +2 -1
- package/dist/migrate/src/commands/DbPull.d.ts +2 -1
- package/dist/migrate/src/commands/DbPush.d.ts +2 -1
- package/dist/migrate/src/commands/DbSeed.d.ts +2 -1
- package/dist/migrate/src/commands/MigrateCommand.d.ts +2 -1
- package/dist/migrate/src/commands/MigrateDeploy.d.ts +2 -1
- package/dist/migrate/src/commands/MigrateDev.d.ts +2 -1
- package/dist/migrate/src/commands/MigrateDiff.d.ts +2 -1
- package/dist/migrate/src/commands/MigrateReset.d.ts +2 -1
- package/dist/migrate/src/commands/MigrateResolve.d.ts +2 -1
- package/dist/migrate/src/commands/MigrateStatus.d.ts +2 -1
- package/dist/utils/setupMSSQL.js +72 -73
- package/dist/utils/spinner.js +3 -3
- package/package.json +7 -6
|
@@ -26,12 +26,12 @@ 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_HK47ZTH2_exports = {};
|
|
30
|
+
__export(chunk_HK47ZTH2_exports, {
|
|
31
31
|
MigrateStatus: () => MigrateStatus,
|
|
32
32
|
init_MigrateStatus: () => init_MigrateStatus
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_HK47ZTH2_exports);
|
|
35
35
|
var import_chunk_ZKWJDQMB = require("./chunk-ZKWJDQMB.js");
|
|
36
36
|
var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
|
|
37
37
|
var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
|
|
@@ -53,7 +53,7 @@ var init_MigrateStatus = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
53
53
|
static new() {
|
|
54
54
|
return new _MigrateStatus2();
|
|
55
55
|
}
|
|
56
|
-
async parse(argv) {
|
|
56
|
+
async parse(argv, config) {
|
|
57
57
|
const args = (0, import_internals.arg)(
|
|
58
58
|
argv,
|
|
59
59
|
{
|
|
@@ -71,7 +71,7 @@ var init_MigrateStatus = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
71
71
|
if (args["--help"]) {
|
|
72
72
|
return this.help();
|
|
73
73
|
}
|
|
74
|
-
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
|
|
74
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
75
75
|
const { schemaPath } = await (0, import_chunk_EYA6AFSF.getSchemaPathAndPrint)(args["--schema"]);
|
|
76
76
|
(0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath }) });
|
|
77
77
|
const migrate = new import_chunk_ZKWJDQMB.Migrate(schemaPath);
|
|
@@ -190,6 +190,7 @@ Check the status of your database migrations
|
|
|
190
190
|
${(0, import_chunk_6TE2RIPN.bold)("Options")}
|
|
191
191
|
|
|
192
192
|
-h, --help Display this help message
|
|
193
|
+
--config Custom path to your Prisma config file
|
|
193
194
|
--schema Custom path to your Prisma schema
|
|
194
195
|
|
|
195
196
|
${(0, import_chunk_6TE2RIPN.bold)("Examples")}
|
|
@@ -16,12 +16,12 @@ 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_L5WSTNST_exports = {};
|
|
20
|
+
__export(chunk_L5WSTNST_exports, {
|
|
21
21
|
DbCommand: () => DbCommand,
|
|
22
22
|
init_DbCommand: () => init_DbCommand
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_L5WSTNST_exports);
|
|
25
25
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
|
26
26
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
27
27
|
var import_internals = require("@prisma/internals");
|
|
@@ -36,8 +36,7 @@ var init_DbCommand = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
36
36
|
static new(cmds) {
|
|
37
37
|
return new _DbCommand2(cmds);
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
async parse(argv) {
|
|
39
|
+
async parse(argv, config) {
|
|
41
40
|
const args = (0, import_internals.arg)(argv, {
|
|
42
41
|
"--help": Boolean,
|
|
43
42
|
"-h": "--help",
|
|
@@ -53,7 +52,7 @@ var init_DbCommand = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
53
52
|
const cmd = this.cmds[args._[0]];
|
|
54
53
|
if (cmd) {
|
|
55
54
|
const argsForCmd = args["--preview-feature"] ? [...args._.slice(1), `--preview-feature`] : args._.slice(1);
|
|
56
|
-
return cmd.parse(argsForCmd);
|
|
55
|
+
return cmd.parse(argsForCmd, config);
|
|
57
56
|
}
|
|
58
57
|
return (0, import_internals.unknownCommand)(_DbCommand2.help, args._[0]);
|
|
59
58
|
}
|
|
@@ -76,6 +75,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Usage")}
|
|
|
76
75
|
${(0, import_chunk_6TE2RIPN.bold)("Options")}
|
|
77
76
|
|
|
78
77
|
-h, --help Display this help message
|
|
78
|
+
--config Custom path to your Prisma config file
|
|
79
79
|
--schema Custom path to your Prisma schema
|
|
80
80
|
|
|
81
81
|
${(0, import_chunk_6TE2RIPN.bold)("Commands")}
|
|
@@ -26,13 +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_LEODRY55_exports = {};
|
|
30
|
+
__export(chunk_LEODRY55_exports, {
|
|
31
31
|
DbPull: () => DbPull,
|
|
32
32
|
init_DbPull: () => init_DbPull
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_LEODRY55_exports);
|
|
35
|
+
var import_chunk_CUDKD32S = require("./chunk-CUDKD32S.js");
|
|
36
36
|
var import_chunk_ILJRJJ3S = require("./chunk-ILJRJJ3S.js");
|
|
37
37
|
var import_chunk_35LAJN5S = require("./chunk-35LAJN5S.js");
|
|
38
38
|
var import_chunk_7IT2ZO3D = require("./chunk-7IT2ZO3D.js");
|
|
@@ -66,7 +66,7 @@ var init_DbPull = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
66
66
|
(0, import_chunk_V7DE6JTG.init_removeSchemaFiles)();
|
|
67
67
|
(0, import_chunk_QBK5XTJE.init_replaceOrAddDatasource)();
|
|
68
68
|
(0, import_chunk_ILJRJJ3S.init_saveSchemaFiles)();
|
|
69
|
-
(0,
|
|
69
|
+
(0, import_chunk_CUDKD32S.init_spinner)();
|
|
70
70
|
debug = (0, import_debug.default)("prisma:db:pull");
|
|
71
71
|
_DbPull = class _DbPull2 {
|
|
72
72
|
static new() {
|
|
@@ -83,7 +83,7 @@ var init_DbPull = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
83
83
|
}
|
|
84
84
|
]);
|
|
85
85
|
}
|
|
86
|
-
async parse(argv) {
|
|
86
|
+
async parse(argv, config) {
|
|
87
87
|
const args = (0, import_internals.arg)(argv, {
|
|
88
88
|
"--help": Boolean,
|
|
89
89
|
"-h": "--help",
|
|
@@ -97,7 +97,7 @@ var init_DbPull = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
97
97
|
"--local-d1": Boolean
|
|
98
98
|
// optional, only on cloudflare D1
|
|
99
99
|
});
|
|
100
|
-
const spinnerFactory = (0,
|
|
100
|
+
const spinnerFactory = (0, import_chunk_CUDKD32S.createSpinner)(!args["--print"]);
|
|
101
101
|
if (args instanceof Error) {
|
|
102
102
|
return this.help(args.message);
|
|
103
103
|
}
|
|
@@ -112,10 +112,10 @@ var init_DbPull = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
112
112
|
debug("schemaPathResult", schemaPathResult);
|
|
113
113
|
if (schemaPath && !args["--print"]) {
|
|
114
114
|
process.stdout.write((0, import_chunk_6TE2RIPN.dim)(`Prisma schema loaded from ${import_path.default.relative(process.cwd(), schemaPath)}`) + "\n");
|
|
115
|
-
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
|
|
115
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
116
116
|
(0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath }) });
|
|
117
117
|
} else {
|
|
118
|
-
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: false });
|
|
118
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: false, config });
|
|
119
119
|
}
|
|
120
120
|
const fromD1 = Boolean(args["--local-d1"]);
|
|
121
121
|
if (!url && !schemaPath && !fromD1) {
|
|
@@ -125,12 +125,12 @@ var init_DbPull = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
125
125
|
(input) => input.schemaPath !== null,
|
|
126
126
|
async (input) => {
|
|
127
127
|
const rawSchema = await (0, import_internals.getSchema)(input.schemaPath);
|
|
128
|
-
const
|
|
128
|
+
const config2 = await (0, import_internals.getConfig)({
|
|
129
129
|
datamodel: rawSchema,
|
|
130
130
|
ignoreEnvVarErrors: true
|
|
131
131
|
});
|
|
132
|
-
const previewFeatures =
|
|
133
|
-
const firstDatasource2 =
|
|
132
|
+
const previewFeatures = config2.generators.find(({ name }) => name === "client")?.previewFeatures;
|
|
133
|
+
const firstDatasource2 = config2.datasources[0] ? config2.datasources[0] : void 0;
|
|
134
134
|
if (input.url) {
|
|
135
135
|
let providerFromSchema = firstDatasource2?.provider;
|
|
136
136
|
if (providerFromSchema === "postgres") {
|
|
@@ -150,11 +150,11 @@ var init_DbPull = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
150
150
|
const schema2 = [
|
|
151
151
|
["schema.prisma", this.urlToDatasource(`file:${pathToSQLiteFile}`, "sqlite")]
|
|
152
152
|
];
|
|
153
|
-
const
|
|
153
|
+
const config3 = await (0, import_internals.getConfig)({
|
|
154
154
|
datamodel: schema2,
|
|
155
155
|
ignoreEnvVarErrors: true
|
|
156
156
|
});
|
|
157
|
-
const result = { firstDatasource:
|
|
157
|
+
const result = { firstDatasource: config3.datasources[0], schema: schema2, validationWarning: void 0 };
|
|
158
158
|
const hasDriverAdaptersPreviewFeature = (previewFeatures || []).includes("driverAdapters");
|
|
159
159
|
const validationWarning2 = `Without the ${(0, import_chunk_6TE2RIPN.bold)(
|
|
160
160
|
"driverAdapters"
|
|
@@ -185,22 +185,22 @@ var init_DbPull = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
185
185
|
}
|
|
186
186
|
${this.urlToDatasource(`file:${pathToSQLiteFile}`, "sqlite")}`;
|
|
187
187
|
const schema2 = [["schema.prisma", schemaContent]];
|
|
188
|
-
const
|
|
188
|
+
const config2 = await (0, import_internals.getConfig)({
|
|
189
189
|
datamodel: schema2,
|
|
190
190
|
ignoreEnvVarErrors: true
|
|
191
191
|
});
|
|
192
|
-
return { firstDatasource:
|
|
192
|
+
return { firstDatasource: config2.datasources[0], schema: schema2, validationWarning: void 0 };
|
|
193
193
|
}
|
|
194
194
|
).when(
|
|
195
195
|
(input) => input.url !== void 0,
|
|
196
196
|
async (input) => {
|
|
197
197
|
(0, import_internals.protocolToConnectorType)(`${input.url.split(":")[0]}:`);
|
|
198
198
|
const schema2 = [["schema.prisma", this.urlToDatasource(input.url)]];
|
|
199
|
-
const
|
|
199
|
+
const config2 = await (0, import_internals.getConfig)({
|
|
200
200
|
datamodel: schema2,
|
|
201
201
|
ignoreEnvVarErrors: true
|
|
202
202
|
});
|
|
203
|
-
return { firstDatasource:
|
|
203
|
+
return { firstDatasource: config2.datasources[0], schema: schema2, validationWarning: void 0 };
|
|
204
204
|
}
|
|
205
205
|
).run();
|
|
206
206
|
if (schemaPath) {
|
|
@@ -356,6 +356,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
356
356
|
|
|
357
357
|
${(0, import_chunk_6TE2RIPN.bold)("Options")}
|
|
358
358
|
|
|
359
|
+
--config Custom path to your Prisma config file
|
|
359
360
|
--schema Custom path to your Prisma schema
|
|
360
361
|
--composite-type-depth Specify the depth for introspecting composite types (e.g. Embedded Documents in MongoDB)
|
|
361
362
|
Number, default is -1 for infinite depth, 0 = off
|
|
@@ -26,12 +26,12 @@ 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_LRSJQHJE_exports = {};
|
|
30
|
+
__export(chunk_LRSJQHJE_exports, {
|
|
31
31
|
MigrateDeploy: () => MigrateDeploy,
|
|
32
32
|
init_MigrateDeploy: () => init_MigrateDeploy
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_LRSJQHJE_exports);
|
|
35
35
|
var import_chunk_WOOPRG54 = require("./chunk-WOOPRG54.js");
|
|
36
36
|
var import_chunk_ZKWJDQMB = require("./chunk-ZKWJDQMB.js");
|
|
37
37
|
var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
|
|
@@ -55,7 +55,7 @@ var init_MigrateDeploy = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
55
55
|
static new() {
|
|
56
56
|
return new _MigrateDeploy2();
|
|
57
57
|
}
|
|
58
|
-
async parse(argv) {
|
|
58
|
+
async parse(argv, config) {
|
|
59
59
|
const args = (0, import_internals.arg)(
|
|
60
60
|
argv,
|
|
61
61
|
{
|
|
@@ -73,7 +73,7 @@ var init_MigrateDeploy = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
73
73
|
if (args["--help"]) {
|
|
74
74
|
return this.help();
|
|
75
75
|
}
|
|
76
|
-
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
|
|
76
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
77
77
|
const { schemaPath } = await (0, import_chunk_EYA6AFSF.getSchemaPathAndPrint)(args["--schema"]);
|
|
78
78
|
(0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath }) });
|
|
79
79
|
const migrate = new import_chunk_ZKWJDQMB.Migrate(schemaPath);
|
|
@@ -143,6 +143,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Usage")}
|
|
|
143
143
|
${(0, import_chunk_6TE2RIPN.bold)("Options")}
|
|
144
144
|
|
|
145
145
|
-h, --help Display this help message
|
|
146
|
+
--config Custom path to your Prisma config file
|
|
146
147
|
--schema Custom path to your Prisma schema
|
|
147
148
|
|
|
148
149
|
${(0, import_chunk_6TE2RIPN.bold)("Examples")}
|
|
@@ -16,12 +16,12 @@ 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_MWDR5RWF_exports = {};
|
|
20
|
+
__export(chunk_MWDR5RWF_exports, {
|
|
21
21
|
CLI: () => CLI,
|
|
22
22
|
init_CLI: () => init_CLI
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_MWDR5RWF_exports);
|
|
25
25
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
|
26
26
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
27
27
|
var import_internals = require("@prisma/internals");
|
|
@@ -36,8 +36,7 @@ var init_CLI = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
36
36
|
static new(cmds) {
|
|
37
37
|
return new _CLI2(cmds);
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
async parse(argv) {
|
|
39
|
+
async parse(argv, config) {
|
|
41
40
|
const args = (0, import_internals.arg)(argv, {
|
|
42
41
|
"--help": Boolean,
|
|
43
42
|
"-h": "--help",
|
|
@@ -67,7 +66,7 @@ var init_CLI = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
67
66
|
} else {
|
|
68
67
|
argsForCmd = args._.slice(1);
|
|
69
68
|
}
|
|
70
|
-
return cmd.parse(argsForCmd);
|
|
69
|
+
return cmd.parse(argsForCmd, config);
|
|
71
70
|
}
|
|
72
71
|
return (0, import_internals.unknownCommand)(this.help(), args._[0]);
|
|
73
72
|
}
|
|
@@ -16,12 +16,12 @@ 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_NGDFNKHZ_exports = {};
|
|
20
|
+
__export(chunk_NGDFNKHZ_exports, {
|
|
21
21
|
MigrateCommand: () => MigrateCommand,
|
|
22
22
|
init_MigrateCommand: () => init_MigrateCommand
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_NGDFNKHZ_exports);
|
|
25
25
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
|
26
26
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
27
27
|
var import_internals = require("@prisma/internals");
|
|
@@ -36,8 +36,7 @@ var init_MigrateCommand = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
36
36
|
static new(cmds) {
|
|
37
37
|
return new _MigrateCommand2(cmds);
|
|
38
38
|
}
|
|
39
|
-
|
|
40
|
-
async parse(argv) {
|
|
39
|
+
async parse(argv, config) {
|
|
41
40
|
const args = (0, import_internals.arg)(argv, {
|
|
42
41
|
"--help": Boolean,
|
|
43
42
|
"-h": "--help",
|
|
@@ -60,7 +59,7 @@ var init_MigrateCommand = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
60
59
|
const filteredArgs = args._.filter((item) => item !== "--preview-feature");
|
|
61
60
|
argsForCmd = filteredArgs.slice(1);
|
|
62
61
|
}
|
|
63
|
-
return cmd.parse(argsForCmd);
|
|
62
|
+
return cmd.parse(argsForCmd, config);
|
|
64
63
|
}
|
|
65
64
|
return (0, import_internals.unknownCommand)(_MigrateCommand2.help, commandName);
|
|
66
65
|
}
|
|
@@ -99,6 +98,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Command for any stage")}
|
|
|
99
98
|
${(0, import_chunk_6TE2RIPN.bold)("Options")}
|
|
100
99
|
|
|
101
100
|
-h, --help Display this help message
|
|
101
|
+
--config Custom path to your Prisma config file
|
|
102
102
|
--schema Custom path to your Prisma schema
|
|
103
103
|
|
|
104
104
|
${(0, import_chunk_6TE2RIPN.bold)("Examples")}
|
|
@@ -26,12 +26,12 @@ 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_OKNTDCKF_exports = {};
|
|
30
|
+
__export(chunk_OKNTDCKF_exports, {
|
|
31
31
|
DbPush: () => DbPush,
|
|
32
32
|
init_DbPush: () => init_DbPush
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_OKNTDCKF_exports);
|
|
35
35
|
var import_chunk_ZKWJDQMB = require("./chunk-ZKWJDQMB.js");
|
|
36
36
|
var import_chunk_U374EXYQ = require("./chunk-U374EXYQ.js");
|
|
37
37
|
var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
|
|
@@ -54,7 +54,7 @@ var init_DbPush = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
54
54
|
static new() {
|
|
55
55
|
return new _DbPush2();
|
|
56
56
|
}
|
|
57
|
-
async parse(argv) {
|
|
57
|
+
async parse(argv, config) {
|
|
58
58
|
const args = (0, import_internals.arg)(
|
|
59
59
|
argv,
|
|
60
60
|
{
|
|
@@ -75,7 +75,7 @@ var init_DbPush = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
75
75
|
if (args["--help"]) {
|
|
76
76
|
return this.help();
|
|
77
77
|
}
|
|
78
|
-
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
|
|
78
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
79
79
|
const { schemaPath } = await (0, import_chunk_EYA6AFSF.getSchemaPathAndPrint)(args["--schema"]);
|
|
80
80
|
const datasourceInfo = await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath });
|
|
81
81
|
(0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo });
|
|
@@ -256,6 +256,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Usage")}
|
|
|
256
256
|
${(0, import_chunk_6TE2RIPN.bold)("Options")}
|
|
257
257
|
|
|
258
258
|
-h, --help Display this help message
|
|
259
|
+
--config Custom path to your Prisma config file
|
|
259
260
|
--schema Custom path to your Prisma schema
|
|
260
261
|
--accept-data-loss Ignore data loss warnings
|
|
261
262
|
--force-reset Force a reset of the database before push
|
|
@@ -16,12 +16,12 @@ 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_QV7SOU3V_exports = {};
|
|
20
|
+
__export(chunk_QV7SOU3V_exports, {
|
|
21
21
|
DbSeed: () => DbSeed,
|
|
22
22
|
init_DbSeed: () => init_DbSeed
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_QV7SOU3V_exports);
|
|
25
25
|
var import_chunk_YKUZUAXA = require("./chunk-YKUZUAXA.js");
|
|
26
26
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
|
27
27
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
@@ -179,7 +179,7 @@ var init_DbSeed = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
179
179
|
static new() {
|
|
180
180
|
return new _DbSeed2();
|
|
181
181
|
}
|
|
182
|
-
async parse(argv) {
|
|
182
|
+
async parse(argv, config) {
|
|
183
183
|
const args = (0, import_internals.arg)(
|
|
184
184
|
argv,
|
|
185
185
|
{
|
|
@@ -201,7 +201,7 @@ ${(0, import_chunk_6TE2RIPN.dim)("$")} prisma db seed -- --arg1 value1 --arg2 va
|
|
|
201
201
|
if (args["--help"]) {
|
|
202
202
|
return this.help();
|
|
203
203
|
}
|
|
204
|
-
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
|
|
204
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
205
205
|
const seedCommandFromPkgJson = await (0, import_chunk_YKUZUAXA.getSeedCommandFromPackageJson)(process.cwd());
|
|
206
206
|
if (!seedCommandFromPkgJson) {
|
|
207
207
|
const schemaResult = await (0, import_internals.getSchemaWithPath)(args["--schema"]);
|
|
@@ -239,6 +239,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Usage")}
|
|
|
239
239
|
${(0, import_chunk_6TE2RIPN.bold)("Options")}
|
|
240
240
|
|
|
241
241
|
-h, --help Display this help message
|
|
242
|
+
--config Custom path to your Prisma config file
|
|
242
243
|
|
|
243
244
|
${(0, import_chunk_6TE2RIPN.bold)("Examples")}
|
|
244
245
|
|
|
@@ -16,12 +16,12 @@ 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_RR4VDHNZ_exports = {};
|
|
20
|
+
__export(chunk_RR4VDHNZ_exports, {
|
|
21
21
|
MigrateResolve: () => MigrateResolve,
|
|
22
22
|
init_MigrateResolve: () => init_MigrateResolve
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_RR4VDHNZ_exports);
|
|
25
25
|
var import_chunk_ZKWJDQMB = require("./chunk-ZKWJDQMB.js");
|
|
26
26
|
var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
|
|
27
27
|
var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
|
|
@@ -41,7 +41,7 @@ var init_MigrateResolve = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
41
41
|
static new() {
|
|
42
42
|
return new _MigrateResolve2();
|
|
43
43
|
}
|
|
44
|
-
async parse(argv) {
|
|
44
|
+
async parse(argv, config) {
|
|
45
45
|
const args = (0, import_internals.arg)(
|
|
46
46
|
argv,
|
|
47
47
|
{
|
|
@@ -61,7 +61,7 @@ var init_MigrateResolve = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
61
61
|
if (args["--help"]) {
|
|
62
62
|
return this.help();
|
|
63
63
|
}
|
|
64
|
-
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
|
|
64
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
65
65
|
const { schemaPath } = await (0, import_chunk_EYA6AFSF.getSchemaPathAndPrint)(args["--schema"]);
|
|
66
66
|
(0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath }) });
|
|
67
67
|
if (!args["--applied"] && !args["--rolled-back"]) {
|
|
@@ -143,6 +143,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Usage")}
|
|
|
143
143
|
${(0, import_chunk_6TE2RIPN.bold)("Options")}
|
|
144
144
|
|
|
145
145
|
-h, --help Display this help message
|
|
146
|
+
--config Custom path to your Prisma config file
|
|
146
147
|
--schema Custom path to your Prisma schema
|
|
147
148
|
--applied Record a specific migration as applied
|
|
148
149
|
--rolled-back Record a specific migration as rolled back
|
|
@@ -26,11 +26,11 @@ 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_VGYN2FAS_exports = {};
|
|
30
|
+
__export(chunk_VGYN2FAS_exports, {
|
|
31
31
|
DbDrop: () => DbDrop
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_VGYN2FAS_exports);
|
|
34
34
|
var import_chunk_WLJHGKMK = require("./chunk-WLJHGKMK.js");
|
|
35
35
|
var import_chunk_U374EXYQ = require("./chunk-U374EXYQ.js");
|
|
36
36
|
var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
|
|
@@ -48,7 +48,7 @@ var _DbDrop = class _DbDrop2 {
|
|
|
48
48
|
static new() {
|
|
49
49
|
return new _DbDrop2();
|
|
50
50
|
}
|
|
51
|
-
async parse(argv) {
|
|
51
|
+
async parse(argv, config) {
|
|
52
52
|
const args = (0, import_internals.arg)(argv, {
|
|
53
53
|
"--help": Boolean,
|
|
54
54
|
"-h": "--help",
|
|
@@ -68,7 +68,7 @@ var _DbDrop = class _DbDrop2 {
|
|
|
68
68
|
if (!args["--preview-feature"]) {
|
|
69
69
|
throw new import_chunk_WLJHGKMK.PreviewFlagError();
|
|
70
70
|
}
|
|
71
|
-
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
|
|
71
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
72
72
|
const { schemaPath } = await (0, import_chunk_EYA6AFSF.getSchemaPathAndPrint)(args["--schema"]);
|
|
73
73
|
const datasourceInfo = await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath, throwIfEnvError: true });
|
|
74
74
|
(0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo });
|
|
@@ -124,6 +124,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Usage")}
|
|
|
124
124
|
${(0, import_chunk_6TE2RIPN.bold)("Options")}
|
|
125
125
|
|
|
126
126
|
-h, --help Display this help message
|
|
127
|
+
--config Custom path to your Prisma config file
|
|
127
128
|
--schema Custom path to your Prisma schema
|
|
128
129
|
-f, --force Skip the confirmation prompt
|
|
129
130
|
|
|
@@ -26,13 +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_WZSBTF6I_exports = {};
|
|
30
|
+
__export(chunk_WZSBTF6I_exports, {
|
|
31
31
|
MigrateDiff: () => MigrateDiff,
|
|
32
32
|
init_MigrateDiff: () => init_MigrateDiff
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_WZSBTF6I_exports);
|
|
35
|
+
var import_chunk_A6PMXMMT = require("./chunk-A6PMXMMT.js");
|
|
36
36
|
var import_chunk_XRTNIFND = require("./chunk-XRTNIFND.js");
|
|
37
37
|
var import_chunk_TKAGMA5K = require("./chunk-TKAGMA5K.js");
|
|
38
38
|
var import_chunk_ZKWJDQMB = require("./chunk-ZKWJDQMB.js");
|
|
@@ -10706,8 +10706,8 @@ var require_typos = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
10706
10706
|
var require_fixer = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
10707
10707
|
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/fixer.js"(exports, module2) {
|
|
10708
10708
|
"use strict";
|
|
10709
|
-
var isValidSemver = (0,
|
|
10710
|
-
var cleanSemver = (0,
|
|
10709
|
+
var isValidSemver = (0, import_chunk_A6PMXMMT.require_valid)();
|
|
10710
|
+
var cleanSemver = (0, import_chunk_A6PMXMMT.require_clean)();
|
|
10711
10711
|
var validateLicense = require_validate_npm_package_license();
|
|
10712
10712
|
var hostedGitInfo = require_lib5();
|
|
10713
10713
|
var isBuiltinModule = require_is_core_module();
|
|
@@ -11543,7 +11543,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
11543
11543
|
"../internals/package.json"(exports, module2) {
|
|
11544
11544
|
module2.exports = {
|
|
11545
11545
|
name: "@prisma/internals",
|
|
11546
|
-
version: "6.4.0-dev.
|
|
11546
|
+
version: "6.4.0-dev.41",
|
|
11547
11547
|
description: "This package is intended for Prisma's internal use",
|
|
11548
11548
|
main: "dist/index.js",
|
|
11549
11549
|
types: "dist/index.d.ts",
|
|
@@ -11623,12 +11623,13 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
11623
11623
|
yarn: "1.22.22"
|
|
11624
11624
|
},
|
|
11625
11625
|
dependencies: {
|
|
11626
|
+
"@prisma/config": "workspace:*",
|
|
11626
11627
|
"@prisma/debug": "workspace:*",
|
|
11627
11628
|
"@prisma/engines": "workspace:*",
|
|
11628
11629
|
"@prisma/fetch-engine": "workspace:*",
|
|
11629
11630
|
"@prisma/generator-helper": "workspace:*",
|
|
11630
11631
|
"@prisma/get-platform": "workspace:*",
|
|
11631
|
-
"@prisma/prisma-schema-wasm": "6.4.0-
|
|
11632
|
+
"@prisma/prisma-schema-wasm": "6.4.0-22.6b762f68259116818698cc00c29790aebfc0e55e",
|
|
11632
11633
|
"@prisma/schema-files-loader": "workspace:*",
|
|
11633
11634
|
arg: "5.0.2",
|
|
11634
11635
|
prompts: "2.4.2"
|
|
@@ -12176,6 +12177,7 @@ var init_MigrateDiff = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
12176
12177
|
${(0, import_chunk_6TE2RIPN.bold)("Options")}
|
|
12177
12178
|
|
|
12178
12179
|
-h, --help Display this help message
|
|
12180
|
+
--config Custom path to your Prisma config file
|
|
12179
12181
|
-o, --output Writes to a file instead of stdout
|
|
12180
12182
|
|
|
12181
12183
|
${(0, import_chunk_6TE2RIPN.italic)("From and To inputs (1 `--from-...` and 1 `--to-...` must be provided):")}
|
|
@@ -12209,7 +12211,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12209
12211
|
static new() {
|
|
12210
12212
|
return new _MigrateDiff2();
|
|
12211
12213
|
}
|
|
12212
|
-
async parse(argv) {
|
|
12214
|
+
async parse(argv, config) {
|
|
12213
12215
|
const args = (0, import_internals.arg)(
|
|
12214
12216
|
argv,
|
|
12215
12217
|
{
|
|
@@ -12269,14 +12271,14 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12269
12271
|
tag: "empty"
|
|
12270
12272
|
};
|
|
12271
12273
|
} else if (args["--from-schema-datasource"]) {
|
|
12272
|
-
await (0, import_internals.loadEnvFile)({ schemaPath: args["--from-schema-datasource"], printMessage: false });
|
|
12274
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--from-schema-datasource"], printMessage: false, config });
|
|
12273
12275
|
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--from-schema-datasource"]), {
|
|
12274
12276
|
argumentName: "--from-schema-datasource"
|
|
12275
12277
|
});
|
|
12276
|
-
const
|
|
12278
|
+
const engineConfig = await (0, import_internals.getConfig)({ datamodel: schema.schemas });
|
|
12277
12279
|
from = {
|
|
12278
12280
|
tag: "schemaDatasource",
|
|
12279
|
-
...(0, import_internals.toSchemasWithConfigDir)(schema,
|
|
12281
|
+
...(0, import_internals.toSchemasWithConfigDir)(schema, engineConfig)
|
|
12280
12282
|
};
|
|
12281
12283
|
} else if (args["--from-schema-datamodel"]) {
|
|
12282
12284
|
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--from-schema-datamodel"]), {
|
|
@@ -12309,14 +12311,14 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12309
12311
|
tag: "empty"
|
|
12310
12312
|
};
|
|
12311
12313
|
} else if (args["--to-schema-datasource"]) {
|
|
12312
|
-
await (0, import_internals.loadEnvFile)({ schemaPath: args["--to-schema-datasource"], printMessage: false });
|
|
12314
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--to-schema-datasource"], printMessage: false, config });
|
|
12313
12315
|
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--to-schema-datasource"]), {
|
|
12314
12316
|
argumentName: "--to-schema-datasource"
|
|
12315
12317
|
});
|
|
12316
|
-
const
|
|
12318
|
+
const engineConfig = await (0, import_internals.getConfig)({ datamodel: schema.schemas });
|
|
12317
12319
|
to = {
|
|
12318
12320
|
tag: "schemaDatasource",
|
|
12319
|
-
...(0, import_internals.toSchemasWithConfigDir)(schema,
|
|
12321
|
+
...(0, import_internals.toSchemasWithConfigDir)(schema, engineConfig)
|
|
12320
12322
|
};
|
|
12321
12323
|
} else if (args["--to-schema-datamodel"]) {
|
|
12322
12324
|
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--to-schema-datamodel"]), {
|