@prisma/migrate 6.4.0-dev.5 → 6.4.0-dev.51
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 +4 -4
- package/dist/SchemaEngine.js +4 -4
- package/dist/bin.js +61 -47
- package/dist/{chunk-XVXYNQ6H.js → chunk-6MPIO773.js} +40 -36
- package/dist/{chunk-AMRGQNRR.js → chunk-75EIHNAH.js} +6 -6
- package/dist/{chunk-Q3SQU7C6.js → chunk-7S3Q4MCN.js} +4 -4
- package/dist/{chunk-NKQGJ3AE.js → chunk-A6PMXMMT.js} +29 -15
- package/dist/{chunk-7S3QTEWV.js → chunk-B7HCYFRO.js} +41 -37
- package/dist/{chunk-GRGGAY6L.js → chunk-CUDKD32S.js} +159 -5
- package/dist/{chunk-7QAR4NT3.js → chunk-EDQWDMXR.js} +9 -8
- package/dist/{chunk-43RWRQLU.js → chunk-FM4XJBEM.js} +9 -8
- package/dist/{chunk-JESW2ENL.js → chunk-JYXY3OJ6.js} +9 -8
- package/dist/{chunk-77RYI3ZW.js → chunk-KW5YM5ZK.js} +9 -8
- package/dist/{chunk-NJUAN6V2.js → chunk-L5WSTNST.js} +6 -6
- package/dist/{chunk-HAJNCOW7.js → chunk-LPSZG4BL.js} +22 -21
- package/dist/{chunk-JZ6FKTWG.js → chunk-MWDR5RWF.js} +5 -6
- package/dist/{chunk-G66QFMM5.js → chunk-N3AT4GUM.js} +11 -10
- package/dist/{chunk-CK5VLKFM.js → chunk-NGDFNKHZ.js} +6 -6
- package/dist/{chunk-E2XKFV2C.js → chunk-QV7SOU3V.js} +6 -5
- package/dist/{chunk-CSUAUCRR.js → chunk-REKABZBY.js} +9 -8
- package/dist/{chunk-I63N54YI.js → chunk-T6Y2635A.js} +10 -9
- package/dist/{chunk-ZKWJDQMB.js → chunk-UVNSK22K.js} +7 -7
- package/dist/{chunk-WJT3IOMB.js → chunk-VGYN2FAS.js} +6 -5
- package/dist/{chunk-JTNVQIRB.js → chunk-YWWOSXMY.js} +6 -6
- package/dist/commands/DbCommand.js +3 -3
- package/dist/commands/DbDrop.js +2 -2
- package/dist/commands/DbExecute.js +5 -5
- package/dist/commands/DbPull.js +5 -5
- package/dist/commands/DbPush.js +5 -5
- package/dist/commands/DbSeed.js +3 -3
- package/dist/commands/MigrateCommand.js +3 -3
- package/dist/commands/MigrateDeploy.js +5 -5
- package/dist/commands/MigrateDev.js +5 -5
- package/dist/commands/MigrateDiff.js +6 -6
- package/dist/commands/MigrateReset.js +5 -5
- package/dist/commands/MigrateResolve.js +5 -5
- package/dist/commands/MigrateStatus.js +5 -5
- package/dist/index.js +51 -51
- package/dist/internals/src/cli/getSchema.d.ts +1 -39
- package/dist/internals/src/cli/types.d.ts +2 -1
- package/dist/internals/src/index.d.ts +2 -1
- package/dist/internals/src/utils/loadEnvFile.d.ts +4 -2
- package/dist/internals/src/utils/toSchemasContainer.d.ts +1 -1
- 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/migrate/src/utils/setupPostgres.d.ts +1 -1
- package/dist/utils/getDatabaseVersionSafe.js +4 -4
- package/dist/utils/introspectSql.js +3 -3
- package/dist/utils/setupMSSQL.js +72 -73
- package/dist/utils/setupPostgres.js +4 -8
- package/dist/utils/spinner.js +3 -3
- package/package.json +7 -6
|
@@ -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_LPSZG4BL_exports = {};
|
|
30
|
+
__export(chunk_LPSZG4BL_exports, {
|
|
31
31
|
DbPull: () => DbPull,
|
|
32
32
|
init_DbPull: () => init_DbPull
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_LPSZG4BL_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");
|
|
@@ -40,7 +40,7 @@ var import_chunk_V7DE6JTG = require("./chunk-V7DE6JTG.js");
|
|
|
40
40
|
var import_chunk_QBK5XTJE = require("./chunk-QBK5XTJE.js");
|
|
41
41
|
var import_chunk_INC2OACE = require("./chunk-INC2OACE.js");
|
|
42
42
|
var import_chunk_GN5BY5N2 = require("./chunk-GN5BY5N2.js");
|
|
43
|
-
var
|
|
43
|
+
var import_chunk_7S3Q4MCN = require("./chunk-7S3Q4MCN.js");
|
|
44
44
|
var import_chunk_CQQQ436N = require("./chunk-CQQQ436N.js");
|
|
45
45
|
var import_chunk_U374EXYQ = require("./chunk-U374EXYQ.js");
|
|
46
46
|
var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
|
|
@@ -55,7 +55,7 @@ var init_DbPull = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
55
55
|
"src/commands/DbPull.ts"() {
|
|
56
56
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
|
57
57
|
(0, import_chunk_CQQQ436N.init_dist)();
|
|
58
|
-
(0,
|
|
58
|
+
(0, import_chunk_7S3Q4MCN.init_SchemaEngine)();
|
|
59
59
|
(0, import_chunk_GN5BY5N2.init_countModelsAndTypes)();
|
|
60
60
|
(0, import_chunk_XJQP3B4W.init_ensureDatabaseExists)();
|
|
61
61
|
(0, import_chunk_U374EXYQ.init_errors)();
|
|
@@ -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) {
|
|
@@ -217,7 +217,7 @@ Some information will be lost (relations, comments, mapped fields, @ignore...),
|
|
|
217
217
|
)} for more info.`);
|
|
218
218
|
}
|
|
219
219
|
}
|
|
220
|
-
const engine = new
|
|
220
|
+
const engine = new import_chunk_7S3Q4MCN.SchemaEngine({
|
|
221
221
|
schemaPath: schemaPath ?? void 0
|
|
222
222
|
});
|
|
223
223
|
const basedOn = !args["--url"] && schemaPath ? ` based on datasource defined in ${(0, import_chunk_6TE2RIPN.underline)(import_path.default.relative(process.cwd(), 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
|
|
@@ -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
|
}
|
|
@@ -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_N3AT4GUM_exports = {};
|
|
30
|
+
__export(chunk_N3AT4GUM_exports, {
|
|
31
31
|
DbExecute: () => DbExecute,
|
|
32
32
|
init_DbExecute: () => init_DbExecute
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_N3AT4GUM_exports);
|
|
35
|
+
var import_chunk_UVNSK22K = require("./chunk-UVNSK22K.js");
|
|
36
36
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
|
37
37
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
38
38
|
var import_internals = require("@prisma/internals");
|
|
@@ -72,7 +72,7 @@ var init_DbExecute = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
72
72
|
"src/commands/DbExecute.ts"() {
|
|
73
73
|
import_get_stdin = (0, import_chunk_WWAWV7DQ.__toESM)(require_get_stdin());
|
|
74
74
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
|
75
|
-
(0,
|
|
75
|
+
(0, import_chunk_UVNSK22K.init_Migrate)();
|
|
76
76
|
helpOptions = (0, import_internals.format)(
|
|
77
77
|
`${(0, import_chunk_6TE2RIPN.bold)("Usage")}
|
|
78
78
|
|
|
@@ -81,6 +81,7 @@ ${(0, import_chunk_6TE2RIPN.dim)("$")} prisma db execute [options]
|
|
|
81
81
|
${(0, import_chunk_6TE2RIPN.bold)("Options")}
|
|
82
82
|
|
|
83
83
|
-h, --help Display this help message
|
|
84
|
+
--config Custom path to your Prisma config file
|
|
84
85
|
|
|
85
86
|
${(0, import_chunk_6TE2RIPN.italic)("Datasource input, only 1 must be provided:")}
|
|
86
87
|
--url URL of the datasource to run the command on
|
|
@@ -97,7 +98,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
97
98
|
static new() {
|
|
98
99
|
return new _DbExecute2();
|
|
99
100
|
}
|
|
100
|
-
async parse(argv) {
|
|
101
|
+
async parse(argv, config) {
|
|
101
102
|
const args = (0, import_internals.arg)(
|
|
102
103
|
argv,
|
|
103
104
|
{
|
|
@@ -118,7 +119,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
118
119
|
if (args["--help"]) {
|
|
119
120
|
return this.help();
|
|
120
121
|
}
|
|
121
|
-
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: false });
|
|
122
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: false, config });
|
|
122
123
|
if (args["--stdin"] && args["--file"]) {
|
|
123
124
|
throw new Error(
|
|
124
125
|
`--stdin and --file cannot be used at the same time. Only 1 must be provided.
|
|
@@ -165,13 +166,13 @@ See \`${(0, import_chunk_6TE2RIPN.green)((0, import_internals.getCommandWithExec
|
|
|
165
166
|
};
|
|
166
167
|
} else {
|
|
167
168
|
const schemaWithPath = await (0, import_internals.getSchemaWithPath)(args["--schema"]);
|
|
168
|
-
const
|
|
169
|
+
const config2 = await (0, import_internals.getConfig)({ datamodel: schemaWithPath.schemas });
|
|
169
170
|
datasourceType = {
|
|
170
171
|
tag: "schema",
|
|
171
|
-
...(0, import_internals.toSchemasWithConfigDir)(schemaWithPath,
|
|
172
|
+
...(0, import_internals.toSchemasWithConfigDir)(schemaWithPath, config2)
|
|
172
173
|
};
|
|
173
174
|
}
|
|
174
|
-
const migrate = new
|
|
175
|
+
const migrate = new import_chunk_UVNSK22K.Migrate();
|
|
175
176
|
try {
|
|
176
177
|
await migrate.engine.dbExecute({
|
|
177
178
|
script,
|
|
@@ -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")}
|
|
@@ -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
|
|
|
@@ -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_REKABZBY_exports = {};
|
|
30
|
+
__export(chunk_REKABZBY_exports, {
|
|
31
31
|
MigrateDev: () => MigrateDev,
|
|
32
32
|
init_MigrateDev: () => init_MigrateDev
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_REKABZBY_exports);
|
|
35
35
|
var import_chunk_IFCV5MY4 = require("./chunk-IFCV5MY4.js");
|
|
36
36
|
var import_chunk_SGCF5OHF = require("./chunk-SGCF5OHF.js");
|
|
37
37
|
var import_chunk_YKUZUAXA = require("./chunk-YKUZUAXA.js");
|
|
38
38
|
var import_chunk_WOOPRG54 = require("./chunk-WOOPRG54.js");
|
|
39
39
|
var import_chunk_6QFE3AWR = require("./chunk-6QFE3AWR.js");
|
|
40
|
-
var
|
|
40
|
+
var import_chunk_UVNSK22K = require("./chunk-UVNSK22K.js");
|
|
41
41
|
var import_chunk_U374EXYQ = require("./chunk-U374EXYQ.js");
|
|
42
42
|
var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
|
|
43
43
|
var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
|
|
@@ -51,7 +51,7 @@ var debug, _MigrateDev, MigrateDev;
|
|
|
51
51
|
var init_MigrateDev = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
52
52
|
"src/commands/MigrateDev.ts"() {
|
|
53
53
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
|
54
|
-
(0,
|
|
54
|
+
(0, import_chunk_UVNSK22K.init_Migrate)();
|
|
55
55
|
(0, import_chunk_XJQP3B4W.init_ensureDatabaseExists)();
|
|
56
56
|
(0, import_chunk_U374EXYQ.init_errors)();
|
|
57
57
|
(0, import_chunk_EYA6AFSF.init_getSchemaPathAndPrint)();
|
|
@@ -66,7 +66,7 @@ var init_MigrateDev = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
66
66
|
static new() {
|
|
67
67
|
return new _MigrateDev2();
|
|
68
68
|
}
|
|
69
|
-
async parse(argv) {
|
|
69
|
+
async parse(argv, config) {
|
|
70
70
|
const args = (0, import_internals.arg)(argv, {
|
|
71
71
|
"--help": Boolean,
|
|
72
72
|
"-h": "--help",
|
|
@@ -87,7 +87,7 @@ var init_MigrateDev = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
87
87
|
if (args["--help"]) {
|
|
88
88
|
return this.help();
|
|
89
89
|
}
|
|
90
|
-
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
|
|
90
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
91
91
|
const { schemaPath, schemas } = await (0, import_chunk_EYA6AFSF.getSchemaPathAndPrint)(args["--schema"]);
|
|
92
92
|
const datasourceInfo = await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath });
|
|
93
93
|
(0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo });
|
|
@@ -103,7 +103,7 @@ var init_MigrateDev = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
103
103
|
if (wasDbCreated) {
|
|
104
104
|
process.stdout.write(wasDbCreated + "\n\n");
|
|
105
105
|
}
|
|
106
|
-
const migrate = new
|
|
106
|
+
const migrate = new import_chunk_UVNSK22K.Migrate(schemaPath);
|
|
107
107
|
let devDiagnostic;
|
|
108
108
|
try {
|
|
109
109
|
devDiagnostic = await migrate.devDiagnostic();
|
|
@@ -340,6 +340,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Usage")}
|
|
|
340
340
|
${(0, import_chunk_6TE2RIPN.bold)("Options")}
|
|
341
341
|
|
|
342
342
|
-h, --help Display this help message
|
|
343
|
+
--config Custom path to your Prisma config file
|
|
343
344
|
--schema Custom path to your Prisma schema
|
|
344
345
|
-n, --name Name the migration
|
|
345
346
|
--create-only Create a new migration but do not apply it
|
|
@@ -16,13 +16,13 @@ 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_T6Y2635A_exports = {};
|
|
20
|
+
__export(chunk_T6Y2635A_exports, {
|
|
21
21
|
MigrateResolve: () => MigrateResolve,
|
|
22
22
|
init_MigrateResolve: () => init_MigrateResolve
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
25
|
-
var
|
|
24
|
+
module.exports = __toCommonJS(chunk_T6Y2635A_exports);
|
|
25
|
+
var import_chunk_UVNSK22K = require("./chunk-UVNSK22K.js");
|
|
26
26
|
var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
|
|
27
27
|
var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
|
|
28
28
|
var import_chunk_XJQP3B4W = require("./chunk-XJQP3B4W.js");
|
|
@@ -33,7 +33,7 @@ var _MigrateResolve, MigrateResolve;
|
|
|
33
33
|
var init_MigrateResolve = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
34
34
|
"src/commands/MigrateResolve.ts"() {
|
|
35
35
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
|
36
|
-
(0,
|
|
36
|
+
(0, import_chunk_UVNSK22K.init_Migrate)();
|
|
37
37
|
(0, import_chunk_XJQP3B4W.init_ensureDatabaseExists)();
|
|
38
38
|
(0, import_chunk_EYA6AFSF.init_getSchemaPathAndPrint)();
|
|
39
39
|
(0, import_chunk_Q7ACZDDT.init_printDatasource)();
|
|
@@ -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"]) {
|
|
@@ -82,7 +82,7 @@ ${(0, import_chunk_6TE2RIPN.bold)((0, import_chunk_6TE2RIPN.green)((0, import_in
|
|
|
82
82
|
);
|
|
83
83
|
}
|
|
84
84
|
await (0, import_chunk_XJQP3B4W.ensureCanConnectToDatabase)(schemaPath);
|
|
85
|
-
const migrate = new
|
|
85
|
+
const migrate = new import_chunk_UVNSK22K.Migrate(schemaPath);
|
|
86
86
|
try {
|
|
87
87
|
await migrate.markMigrationApplied({
|
|
88
88
|
migrationId: args["--applied"]
|
|
@@ -103,7 +103,7 @@ Migration ${args["--applied"]} marked as applied.
|
|
|
103
103
|
);
|
|
104
104
|
}
|
|
105
105
|
await (0, import_chunk_XJQP3B4W.ensureCanConnectToDatabase)(schemaPath);
|
|
106
|
-
const migrate = new
|
|
106
|
+
const migrate = new import_chunk_UVNSK22K.Migrate(schemaPath);
|
|
107
107
|
try {
|
|
108
108
|
await migrate.markMigrationRolledBack({
|
|
109
109
|
migrationId: 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,14 +26,14 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_UVNSK22K_exports = {};
|
|
30
|
+
__export(chunk_UVNSK22K_exports, {
|
|
31
31
|
Migrate: () => Migrate,
|
|
32
32
|
init_Migrate: () => init_Migrate
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_UVNSK22K_exports);
|
|
35
35
|
var import_chunk_6C7ESGWY = require("./chunk-6C7ESGWY.js");
|
|
36
|
-
var
|
|
36
|
+
var import_chunk_7S3Q4MCN = require("./chunk-7S3Q4MCN.js");
|
|
37
37
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
|
38
38
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
39
39
|
var import_engines_version = require("@prisma/engines-version");
|
|
@@ -543,19 +543,19 @@ var init_Migrate = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
543
543
|
"src/Migrate.ts"() {
|
|
544
544
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
|
545
545
|
import_log_update = (0, import_chunk_WWAWV7DQ.__toESM)(require_log_update());
|
|
546
|
-
(0,
|
|
546
|
+
(0, import_chunk_7S3Q4MCN.init_SchemaEngine)();
|
|
547
547
|
packageJson = eval(`require('../package.json')`);
|
|
548
548
|
Migrate = class {
|
|
549
549
|
constructor(schemaPath, enabledPreviewFeatures) {
|
|
550
550
|
if (schemaPath) {
|
|
551
551
|
this.schemaPath = import_path.default.resolve(process.cwd(), schemaPath);
|
|
552
552
|
this.migrationsDirectoryPath = import_path.default.join(import_path.default.dirname(this.schemaPath), "migrations");
|
|
553
|
-
this.engine = new
|
|
553
|
+
this.engine = new import_chunk_7S3Q4MCN.SchemaEngine({
|
|
554
554
|
schemaPath: this.schemaPath,
|
|
555
555
|
enabledPreviewFeatures
|
|
556
556
|
});
|
|
557
557
|
} else {
|
|
558
|
-
this.engine = new
|
|
558
|
+
this.engine = new import_chunk_7S3Q4MCN.SchemaEngine({
|
|
559
559
|
enabledPreviewFeatures
|
|
560
560
|
});
|
|
561
561
|
}
|
|
@@ -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,20 +26,20 @@ 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_YWWOSXMY_exports = {};
|
|
30
|
+
__export(chunk_YWWOSXMY_exports, {
|
|
31
31
|
getDatabaseVersionSafe: () => getDatabaseVersionSafe,
|
|
32
32
|
init_getDatabaseVersionSafe: () => init_getDatabaseVersionSafe
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_YWWOSXMY_exports);
|
|
35
|
+
var import_chunk_7S3Q4MCN = require("./chunk-7S3Q4MCN.js");
|
|
36
36
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
37
37
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
38
38
|
async function getDatabaseVersionSafe(args) {
|
|
39
39
|
let engine;
|
|
40
40
|
let dbVersion;
|
|
41
41
|
try {
|
|
42
|
-
engine = new
|
|
42
|
+
engine = new import_chunk_7S3Q4MCN.SchemaEngine({});
|
|
43
43
|
dbVersion = await engine.getDatabaseVersion(args);
|
|
44
44
|
} catch (e) {
|
|
45
45
|
debug(e);
|
|
@@ -53,7 +53,7 @@ async function getDatabaseVersionSafe(args) {
|
|
|
53
53
|
var debug;
|
|
54
54
|
var init_getDatabaseVersionSafe = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
55
55
|
"src/utils/getDatabaseVersionSafe.ts"() {
|
|
56
|
-
(0,
|
|
56
|
+
(0, import_chunk_7S3Q4MCN.init_SchemaEngine)();
|
|
57
57
|
debug = (0, import_debug.default)("prisma:cli");
|
|
58
58
|
}
|
|
59
59
|
});
|
|
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var DbCommand_exports = {};
|
|
20
20
|
__export(DbCommand_exports, {
|
|
21
|
-
DbCommand: () =>
|
|
21
|
+
DbCommand: () => import_chunk_L5WSTNST.DbCommand
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(DbCommand_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_L5WSTNST = require("../chunk-L5WSTNST.js");
|
|
25
25
|
var import_chunk_6TE2RIPN = require("../chunk-6TE2RIPN.js");
|
|
26
26
|
var import_chunk_WWAWV7DQ = require("../chunk-WWAWV7DQ.js");
|
|
27
|
-
(0,
|
|
27
|
+
(0, import_chunk_L5WSTNST.init_DbCommand)();
|