@prisma/migrate 6.4.0-dev.53 → 6.4.0-dev.55
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/bin.js +31 -31
- package/dist/{chunk-YCTXXWZO.js → chunk-44CQ6EM2.js} +41 -12
- package/dist/{chunk-VGYN2FAS.js → chunk-7VT3JAGL.js} +7 -7
- package/dist/{chunk-QV7SOU3V.js → chunk-A22PVITU.js} +4 -4
- package/dist/{chunk-FM4XJBEM.js → chunk-F7CBUAEF.js} +7 -7
- package/dist/{chunk-JYXY3OJ6.js → chunk-FYKYZQP6.js} +7 -7
- package/dist/{chunk-N3AT4GUM.js → chunk-I5HMDWUT.js} +7 -7
- package/dist/{chunk-DGMFIU5S.js → chunk-L7IZKRXP.js} +42 -13
- package/dist/{chunk-EYA6AFSF.js → chunk-M5YNQ2NP.js} +5 -5
- package/dist/{chunk-T6Y2635A.js → chunk-QJ24Y4KM.js} +7 -7
- package/dist/{chunk-EDQWDMXR.js → chunk-SVJJPONC.js} +8 -8
- package/dist/{chunk-REKABZBY.js → chunk-Y53OMBJY.js} +8 -8
- package/dist/{chunk-KW5YM5ZK.js → chunk-Z5IS6SF4.js} +7 -7
- package/dist/{chunk-LPSZG4BL.js → chunk-ZDMMWLNL.js} +12 -12
- package/dist/commands/DbDrop.js +3 -3
- package/dist/commands/DbExecute.js +3 -3
- package/dist/commands/DbPull.js +3 -3
- package/dist/commands/DbPush.js +4 -4
- package/dist/commands/DbSeed.js +3 -3
- package/dist/commands/MigrateDeploy.js +4 -4
- package/dist/commands/MigrateDev.js +4 -4
- package/dist/commands/MigrateDiff.js +3 -3
- package/dist/commands/MigrateReset.js +4 -4
- package/dist/commands/MigrateResolve.js +4 -4
- package/dist/commands/MigrateStatus.js +4 -4
- package/dist/index.js +36 -36
- package/dist/internals/src/cli/checkUnsupportedDataProxy.d.ts +2 -1
- package/dist/internals/src/cli/getSchema.d.ts +27 -6
- package/dist/internals/src/cli/hashes.d.ts +2 -1
- package/dist/internals/src/index.d.ts +1 -1
- package/dist/migrate/src/utils/getSchemaPathAndPrint.d.ts +3 -3
- package/dist/utils/getSchemaPathAndPrint.js +4 -4
- package/package.json +7 -7
package/dist/bin.js
CHANGED
|
@@ -34,11 +34,11 @@ __export(bin_exports, {
|
|
|
34
34
|
module.exports = __toCommonJS(bin_exports);
|
|
35
35
|
var import_chunk_MWDR5RWF = require("./chunk-MWDR5RWF.js");
|
|
36
36
|
var import_chunk_YWWOSXMY = require("./chunk-YWWOSXMY.js");
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
37
|
+
var import_chunk_SVJJPONC = require("./chunk-SVJJPONC.js");
|
|
38
|
+
var import_chunk_QJ24Y4KM = require("./chunk-QJ24Y4KM.js");
|
|
39
|
+
var import_chunk_Z5IS6SF4 = require("./chunk-Z5IS6SF4.js");
|
|
40
|
+
var import_chunk_I5HMDWUT = require("./chunk-I5HMDWUT.js");
|
|
41
|
+
var import_chunk_ZDMMWLNL = require("./chunk-ZDMMWLNL.js");
|
|
42
42
|
var import_chunk_CUDKD32S = require("./chunk-CUDKD32S.js");
|
|
43
43
|
var import_chunk_ILJRJJ3S = require("./chunk-ILJRJJ3S.js");
|
|
44
44
|
var import_chunk_YUCPBDWV = require("./chunk-YUCPBDWV.js");
|
|
@@ -49,18 +49,18 @@ var import_chunk_V7DE6JTG = require("./chunk-V7DE6JTG.js");
|
|
|
49
49
|
var import_chunk_QBK5XTJE = require("./chunk-QBK5XTJE.js");
|
|
50
50
|
var import_chunk_INC2OACE = require("./chunk-INC2OACE.js");
|
|
51
51
|
var import_chunk_GN5BY5N2 = require("./chunk-GN5BY5N2.js");
|
|
52
|
-
var
|
|
53
|
-
var
|
|
52
|
+
var import_chunk_FYKYZQP6 = require("./chunk-FYKYZQP6.js");
|
|
53
|
+
var import_chunk_A22PVITU = require("./chunk-A22PVITU.js");
|
|
54
54
|
var import_chunk_NGDFNKHZ = require("./chunk-NGDFNKHZ.js");
|
|
55
|
-
var
|
|
56
|
-
var
|
|
55
|
+
var import_chunk_F7CBUAEF = require("./chunk-F7CBUAEF.js");
|
|
56
|
+
var import_chunk_Y53OMBJY = require("./chunk-Y53OMBJY.js");
|
|
57
57
|
var import_chunk_IFCV5MY4 = require("./chunk-IFCV5MY4.js");
|
|
58
58
|
var import_chunk_SGCF5OHF = require("./chunk-SGCF5OHF.js");
|
|
59
59
|
var import_chunk_YKUZUAXA = require("./chunk-YKUZUAXA.js");
|
|
60
60
|
var import_chunk_WOOPRG54 = require("./chunk-WOOPRG54.js");
|
|
61
61
|
var import_chunk_6QFE3AWR = require("./chunk-6QFE3AWR.js");
|
|
62
62
|
var import_chunk_LKTTJWFT = require("./chunk-LKTTJWFT.js");
|
|
63
|
-
var
|
|
63
|
+
var import_chunk_L7IZKRXP = require("./chunk-L7IZKRXP.js");
|
|
64
64
|
var import_chunk_A6PMXMMT = require("./chunk-A6PMXMMT.js");
|
|
65
65
|
var import_chunk_XRTNIFND = require("./chunk-XRTNIFND.js");
|
|
66
66
|
var import_chunk_TKAGMA5K = require("./chunk-TKAGMA5K.js");
|
|
@@ -72,7 +72,7 @@ var import_chunk_CQQQ436N = require("./chunk-CQQQ436N.js");
|
|
|
72
72
|
var import_chunk_AAATUOV6 = require("./chunk-AAATUOV6.js");
|
|
73
73
|
var import_chunk_L5WSTNST = require("./chunk-L5WSTNST.js");
|
|
74
74
|
var import_chunk_U374EXYQ = require("./chunk-U374EXYQ.js");
|
|
75
|
-
var
|
|
75
|
+
var import_chunk_M5YNQ2NP = require("./chunk-M5YNQ2NP.js");
|
|
76
76
|
var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
|
|
77
77
|
var import_chunk_XJQP3B4W = require("./chunk-XJQP3B4W.js");
|
|
78
78
|
var import_chunk_KPUNMK5W = require("./chunk-KPUNMK5W.js");
|
|
@@ -87,17 +87,17 @@ var require_bin = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
87
87
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
|
88
88
|
(0, import_chunk_MWDR5RWF.init_CLI)();
|
|
89
89
|
(0, import_chunk_L5WSTNST.init_DbCommand)();
|
|
90
|
-
(0,
|
|
91
|
-
(0,
|
|
92
|
-
(0,
|
|
93
|
-
(0,
|
|
90
|
+
(0, import_chunk_I5HMDWUT.init_DbExecute)();
|
|
91
|
+
(0, import_chunk_ZDMMWLNL.init_DbPull)();
|
|
92
|
+
(0, import_chunk_FYKYZQP6.init_DbPush)();
|
|
93
|
+
(0, import_chunk_A22PVITU.init_DbSeed)();
|
|
94
94
|
(0, import_chunk_NGDFNKHZ.init_MigrateCommand)();
|
|
95
|
-
(0,
|
|
96
|
-
(0,
|
|
97
|
-
(0,
|
|
98
|
-
(0,
|
|
99
|
-
(0,
|
|
100
|
-
(0,
|
|
95
|
+
(0, import_chunk_F7CBUAEF.init_MigrateDeploy)();
|
|
96
|
+
(0, import_chunk_Y53OMBJY.init_MigrateDev)();
|
|
97
|
+
(0, import_chunk_L7IZKRXP.init_MigrateDiff)();
|
|
98
|
+
(0, import_chunk_SVJJPONC.init_MigrateReset)();
|
|
99
|
+
(0, import_chunk_QJ24Y4KM.init_MigrateResolve)();
|
|
100
|
+
(0, import_chunk_Z5IS6SF4.init_MigrateStatus)();
|
|
101
101
|
(0, import_chunk_YWWOSXMY.init_getDatabaseVersionSafe)();
|
|
102
102
|
process.on("uncaughtException", (e) => {
|
|
103
103
|
console.log(e);
|
|
@@ -121,19 +121,19 @@ var require_bin = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
121
121
|
async function main() {
|
|
122
122
|
const cli = import_chunk_MWDR5RWF.CLI.new({
|
|
123
123
|
migrate: import_chunk_NGDFNKHZ.MigrateCommand.new({
|
|
124
|
-
dev:
|
|
125
|
-
status:
|
|
126
|
-
resolve:
|
|
127
|
-
reset:
|
|
128
|
-
deploy:
|
|
129
|
-
diff:
|
|
124
|
+
dev: import_chunk_Y53OMBJY.MigrateDev.new(),
|
|
125
|
+
status: import_chunk_Z5IS6SF4.MigrateStatus.new(),
|
|
126
|
+
resolve: import_chunk_QJ24Y4KM.MigrateResolve.new(),
|
|
127
|
+
reset: import_chunk_SVJJPONC.MigrateReset.new(),
|
|
128
|
+
deploy: import_chunk_F7CBUAEF.MigrateDeploy.new(),
|
|
129
|
+
diff: import_chunk_L7IZKRXP.MigrateDiff.new()
|
|
130
130
|
}),
|
|
131
131
|
db: import_chunk_L5WSTNST.DbCommand.new({
|
|
132
|
-
execute:
|
|
133
|
-
pull:
|
|
134
|
-
push:
|
|
132
|
+
execute: import_chunk_I5HMDWUT.DbExecute.new(),
|
|
133
|
+
pull: import_chunk_ZDMMWLNL.DbPull.new(),
|
|
134
|
+
push: import_chunk_FYKYZQP6.DbPush.new(),
|
|
135
135
|
// drop: DbDrop.new(),
|
|
136
|
-
seed:
|
|
136
|
+
seed: import_chunk_A22PVITU.DbSeed.new()
|
|
137
137
|
})
|
|
138
138
|
});
|
|
139
139
|
const { config, error } = await (0, import_config.loadConfigFromFile)({ configFile: args["--config"] });
|
|
@@ -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_44CQ6EM2_exports = {};
|
|
30
|
+
__export(chunk_44CQ6EM2_exports, {
|
|
31
31
|
MigrateDiff: () => MigrateDiff,
|
|
32
32
|
init_MigrateDiff: () => init_MigrateDiff
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_44CQ6EM2_exports);
|
|
35
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");
|
|
@@ -11648,7 +11648,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
11648
11648
|
"@prisma/fetch-engine": "workspace:*",
|
|
11649
11649
|
"@prisma/generator-helper": "workspace:*",
|
|
11650
11650
|
"@prisma/get-platform": "workspace:*",
|
|
11651
|
-
"@prisma/prisma-schema-wasm": "6.4.0-
|
|
11651
|
+
"@prisma/prisma-schema-wasm": "6.4.0-26.7e7c9b8394a8c99732582d1f3b0646e95e351267",
|
|
11652
11652
|
"@prisma/schema-files-loader": "workspace:*",
|
|
11653
11653
|
arg: "5.0.2",
|
|
11654
11654
|
prompts: "2.4.2"
|
|
@@ -11930,8 +11930,8 @@ var init_engine_commands = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
11930
11930
|
init_getConfig();
|
|
11931
11931
|
}
|
|
11932
11932
|
});
|
|
11933
|
-
async function getSchemaWithPath(schemaPathFromArgs, { cwd = process.cwd(), argumentName = "--schema" } = {}) {
|
|
11934
|
-
const result = await getSchemaWithPathInternal(schemaPathFromArgs, { cwd, argumentName });
|
|
11933
|
+
async function getSchemaWithPath(schemaPathFromArgs, schemaPathFromConfig, { cwd = process.cwd(), argumentName = "--schema" } = {}) {
|
|
11934
|
+
const result = await getSchemaWithPathInternal(schemaPathFromArgs, schemaPathFromConfig, { cwd, argumentName });
|
|
11935
11935
|
if (result.ok) {
|
|
11936
11936
|
return result.schema;
|
|
11937
11937
|
}
|
|
@@ -11986,7 +11986,7 @@ async function readSchemaFromFileOrDirectory(schemaPath) {
|
|
|
11986
11986
|
}
|
|
11987
11987
|
return { ok: false, error: { kind: "WrongType", path: schemaPath, expectedTypes: ["file", "directory"] } };
|
|
11988
11988
|
}
|
|
11989
|
-
async function getSchemaWithPathInternal(schemaPathFromArgs, { cwd, argumentName }) {
|
|
11989
|
+
async function getSchemaWithPathInternal(schemaPathFromArgs, schemaPathFromConfig, { cwd, argumentName }) {
|
|
11990
11990
|
if (schemaPathFromArgs) {
|
|
11991
11991
|
const absPath = import_path.default.resolve(cwd, schemaPathFromArgs);
|
|
11992
11992
|
const customSchemaResult = await readSchemaFromFileOrDirectory(absPath);
|
|
@@ -12000,6 +12000,10 @@ async function getSchemaWithPathInternal(schemaPathFromArgs, { cwd, argumentName
|
|
|
12000
12000
|
}
|
|
12001
12001
|
return customSchemaResult;
|
|
12002
12002
|
}
|
|
12003
|
+
const prismaConfigResult = await readSchemaFromPrismaConfigBasedLocation(schemaPathFromConfig);
|
|
12004
|
+
if (prismaConfigResult.ok) {
|
|
12005
|
+
return prismaConfigResult;
|
|
12006
|
+
}
|
|
12003
12007
|
const pkgJsonResult = await getSchemaFromPackageJson(cwd);
|
|
12004
12008
|
if (pkgJsonResult.ok) {
|
|
12005
12009
|
return pkgJsonResult;
|
|
@@ -12055,6 +12059,31 @@ async function getPrismaConfigFromPackageJson(cwd) {
|
|
|
12055
12059
|
packagePath: pkgJson.path
|
|
12056
12060
|
};
|
|
12057
12061
|
}
|
|
12062
|
+
async function readSchemaFromPrismaConfigBasedLocation(schemaPathFromConfig) {
|
|
12063
|
+
if (!schemaPathFromConfig) {
|
|
12064
|
+
return {
|
|
12065
|
+
ok: false,
|
|
12066
|
+
error: { kind: "PrismaConfigNotConfigured" }
|
|
12067
|
+
};
|
|
12068
|
+
}
|
|
12069
|
+
let schemaResult;
|
|
12070
|
+
if (schemaPathFromConfig.kind === "single") {
|
|
12071
|
+
schemaResult = await readSchemaFromSingleFile(schemaPathFromConfig.filenamePath);
|
|
12072
|
+
if (!schemaResult.ok) {
|
|
12073
|
+
throw new Error(
|
|
12074
|
+
`Could not load schema from file \`${schemaPathFromConfig.filenamePath}\` provided by "prisma.config.ts" config\`: ${renderLookupError(schemaResult.error)}`
|
|
12075
|
+
);
|
|
12076
|
+
}
|
|
12077
|
+
} else {
|
|
12078
|
+
schemaResult = await readSchemaFromDirectory(schemaPathFromConfig.folder);
|
|
12079
|
+
if (!schemaResult.ok) {
|
|
12080
|
+
throw new Error(
|
|
12081
|
+
`Could not load schema from folder \`${schemaPathFromConfig.folder}\` provided by "prisma.config.ts" config\`: ${renderLookupError(schemaResult.error)}`
|
|
12082
|
+
);
|
|
12083
|
+
}
|
|
12084
|
+
}
|
|
12085
|
+
return schemaResult;
|
|
12086
|
+
}
|
|
12058
12087
|
async function getSchemaFromPackageJson(cwd) {
|
|
12059
12088
|
const prismaConfig = await getPrismaConfigFromPackageJson(cwd);
|
|
12060
12089
|
debug2("prismaConfig", prismaConfig);
|
|
@@ -12246,7 +12275,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12246
12275
|
if ((0, import_internals.isError)(args)) {
|
|
12247
12276
|
return this.help(args.message);
|
|
12248
12277
|
}
|
|
12249
|
-
await (0, import_internals.checkUnsupportedDataProxy)("migrate diff", args, false);
|
|
12278
|
+
await (0, import_internals.checkUnsupportedDataProxy)("migrate diff", args, config.schema, false);
|
|
12250
12279
|
if (args["--help"]) {
|
|
12251
12280
|
return this.help();
|
|
12252
12281
|
}
|
|
@@ -12274,7 +12303,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12274
12303
|
};
|
|
12275
12304
|
} else if (args["--from-schema-datasource"]) {
|
|
12276
12305
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--from-schema-datasource"], printMessage: false, config });
|
|
12277
|
-
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--from-schema-datasource"]), {
|
|
12306
|
+
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--from-schema-datasource"]), config.schema, {
|
|
12278
12307
|
argumentName: "--from-schema-datasource"
|
|
12279
12308
|
});
|
|
12280
12309
|
const engineConfig = await (0, import_internals.getConfig)({ datamodel: schema.schemas });
|
|
@@ -12283,7 +12312,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12283
12312
|
...(0, import_internals.toSchemasWithConfigDir)(schema, engineConfig)
|
|
12284
12313
|
};
|
|
12285
12314
|
} else if (args["--from-schema-datamodel"]) {
|
|
12286
|
-
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--from-schema-datamodel"]), {
|
|
12315
|
+
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--from-schema-datamodel"]), config.schema, {
|
|
12287
12316
|
argumentName: "--from-schema-datamodel"
|
|
12288
12317
|
});
|
|
12289
12318
|
from = {
|
|
@@ -12314,7 +12343,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12314
12343
|
};
|
|
12315
12344
|
} else if (args["--to-schema-datasource"]) {
|
|
12316
12345
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--to-schema-datasource"], printMessage: false, config });
|
|
12317
|
-
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--to-schema-datasource"]), {
|
|
12346
|
+
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--to-schema-datasource"]), config.schema, {
|
|
12318
12347
|
argumentName: "--to-schema-datasource"
|
|
12319
12348
|
});
|
|
12320
12349
|
const engineConfig = await (0, import_internals.getConfig)({ datamodel: schema.schemas });
|
|
@@ -12323,7 +12352,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12323
12352
|
...(0, import_internals.toSchemasWithConfigDir)(schema, engineConfig)
|
|
12324
12353
|
};
|
|
12325
12354
|
} else if (args["--to-schema-datamodel"]) {
|
|
12326
|
-
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--to-schema-datamodel"]), {
|
|
12355
|
+
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--to-schema-datamodel"]), config.schema, {
|
|
12327
12356
|
argumentName: "--to-schema-datamodel"
|
|
12328
12357
|
});
|
|
12329
12358
|
to = {
|
|
@@ -26,14 +26,14 @@ 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_7VT3JAGL_exports = {};
|
|
30
|
+
__export(chunk_7VT3JAGL_exports, {
|
|
31
31
|
DbDrop: () => DbDrop
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_7VT3JAGL_exports);
|
|
34
34
|
var import_chunk_WLJHGKMK = require("./chunk-WLJHGKMK.js");
|
|
35
35
|
var import_chunk_U374EXYQ = require("./chunk-U374EXYQ.js");
|
|
36
|
-
var
|
|
36
|
+
var import_chunk_M5YNQ2NP = require("./chunk-M5YNQ2NP.js");
|
|
37
37
|
var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
|
|
38
38
|
var import_chunk_XJQP3B4W = require("./chunk-XJQP3B4W.js");
|
|
39
39
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
|
@@ -42,7 +42,7 @@ var import_prompts = __toESM(require("prompts"));
|
|
|
42
42
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
|
43
43
|
(0, import_chunk_XJQP3B4W.init_ensureDatabaseExists)();
|
|
44
44
|
(0, import_chunk_U374EXYQ.init_errors)();
|
|
45
|
-
(0,
|
|
45
|
+
(0, import_chunk_M5YNQ2NP.init_getSchemaPathAndPrint)();
|
|
46
46
|
(0, import_chunk_Q7ACZDDT.init_printDatasource)();
|
|
47
47
|
var _DbDrop = class _DbDrop2 {
|
|
48
48
|
static new() {
|
|
@@ -61,7 +61,7 @@ var _DbDrop = class _DbDrop2 {
|
|
|
61
61
|
if ((0, import_internals.isError)(args)) {
|
|
62
62
|
return this.help(args.message);
|
|
63
63
|
}
|
|
64
|
-
await (0, import_internals.checkUnsupportedDataProxy)("db drop", args, true);
|
|
64
|
+
await (0, import_internals.checkUnsupportedDataProxy)("db drop", args, config.schema, true);
|
|
65
65
|
if (args["--help"]) {
|
|
66
66
|
return this.help();
|
|
67
67
|
}
|
|
@@ -69,7 +69,7 @@ var _DbDrop = class _DbDrop2 {
|
|
|
69
69
|
throw new import_chunk_WLJHGKMK.PreviewFlagError();
|
|
70
70
|
}
|
|
71
71
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
72
|
-
const { schemaPath } = await (0,
|
|
72
|
+
const { schemaPath } = await (0, import_chunk_M5YNQ2NP.getSchemaPathAndPrint)(args["--schema"], config.schema);
|
|
73
73
|
const datasourceInfo = await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath, throwIfEnvError: true });
|
|
74
74
|
(0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo });
|
|
75
75
|
process.stdout.write("\n");
|
|
@@ -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_A22PVITU_exports = {};
|
|
20
|
+
__export(chunk_A22PVITU_exports, {
|
|
21
21
|
DbSeed: () => DbSeed,
|
|
22
22
|
init_DbSeed: () => init_DbSeed
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_A22PVITU_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");
|
|
@@ -204,7 +204,7 @@ ${(0, import_chunk_6TE2RIPN.dim)("$")} prisma db seed -- --arg1 value1 --arg2 va
|
|
|
204
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
|
-
const schemaResult = await (0, import_internals.getSchemaWithPath)(args["--schema"]);
|
|
207
|
+
const schemaResult = await (0, import_internals.getSchemaWithPath)(args["--schema"], config.schema);
|
|
208
208
|
const message = await (0, import_chunk_YKUZUAXA.verifySeedConfigAndReturnMessage)(schemaResult?.schemaPath ?? null);
|
|
209
209
|
if (message) {
|
|
210
210
|
throw new Error(message);
|
|
@@ -26,15 +26,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_F7CBUAEF_exports = {};
|
|
30
|
+
__export(chunk_F7CBUAEF_exports, {
|
|
31
31
|
MigrateDeploy: () => MigrateDeploy,
|
|
32
32
|
init_MigrateDeploy: () => init_MigrateDeploy
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_F7CBUAEF_exports);
|
|
35
35
|
var import_chunk_WOOPRG54 = require("./chunk-WOOPRG54.js");
|
|
36
36
|
var import_chunk_UVNSK22K = require("./chunk-UVNSK22K.js");
|
|
37
|
-
var
|
|
37
|
+
var import_chunk_M5YNQ2NP = require("./chunk-M5YNQ2NP.js");
|
|
38
38
|
var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
|
|
39
39
|
var import_chunk_XJQP3B4W = require("./chunk-XJQP3B4W.js");
|
|
40
40
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
|
@@ -47,7 +47,7 @@ var init_MigrateDeploy = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
47
47
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
|
48
48
|
(0, import_chunk_UVNSK22K.init_Migrate)();
|
|
49
49
|
(0, import_chunk_XJQP3B4W.init_ensureDatabaseExists)();
|
|
50
|
-
(0,
|
|
50
|
+
(0, import_chunk_M5YNQ2NP.init_getSchemaPathAndPrint)();
|
|
51
51
|
(0, import_chunk_Q7ACZDDT.init_printDatasource)();
|
|
52
52
|
(0, import_chunk_WOOPRG54.init_printFiles)();
|
|
53
53
|
debug = (0, import_debug.default)("prisma:migrate:deploy");
|
|
@@ -69,12 +69,12 @@ var init_MigrateDeploy = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
69
69
|
if ((0, import_internals.isError)(args)) {
|
|
70
70
|
return this.help(args.message);
|
|
71
71
|
}
|
|
72
|
-
await (0, import_internals.checkUnsupportedDataProxy)("migrate deploy", args, true);
|
|
72
|
+
await (0, import_internals.checkUnsupportedDataProxy)("migrate deploy", args, config.schema, true);
|
|
73
73
|
if (args["--help"]) {
|
|
74
74
|
return this.help();
|
|
75
75
|
}
|
|
76
76
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
77
|
-
const { schemaPath } = await (0,
|
|
77
|
+
const { schemaPath } = await (0, import_chunk_M5YNQ2NP.getSchemaPathAndPrint)(args["--schema"], config.schema);
|
|
78
78
|
(0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath }) });
|
|
79
79
|
const migrate = new import_chunk_UVNSK22K.Migrate(schemaPath);
|
|
80
80
|
try {
|
|
@@ -26,15 +26,15 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
26
26
|
mod
|
|
27
27
|
));
|
|
28
28
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
29
|
-
var
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_FYKYZQP6_exports = {};
|
|
30
|
+
__export(chunk_FYKYZQP6_exports, {
|
|
31
31
|
DbPush: () => DbPush,
|
|
32
32
|
init_DbPush: () => init_DbPush
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_FYKYZQP6_exports);
|
|
35
35
|
var import_chunk_UVNSK22K = require("./chunk-UVNSK22K.js");
|
|
36
36
|
var import_chunk_U374EXYQ = require("./chunk-U374EXYQ.js");
|
|
37
|
-
var
|
|
37
|
+
var import_chunk_M5YNQ2NP = require("./chunk-M5YNQ2NP.js");
|
|
38
38
|
var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
|
|
39
39
|
var import_chunk_XJQP3B4W = require("./chunk-XJQP3B4W.js");
|
|
40
40
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
|
@@ -48,7 +48,7 @@ var init_DbPush = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
48
48
|
(0, import_chunk_UVNSK22K.init_Migrate)();
|
|
49
49
|
(0, import_chunk_XJQP3B4W.init_ensureDatabaseExists)();
|
|
50
50
|
(0, import_chunk_U374EXYQ.init_errors)();
|
|
51
|
-
(0,
|
|
51
|
+
(0, import_chunk_M5YNQ2NP.init_getSchemaPathAndPrint)();
|
|
52
52
|
(0, import_chunk_Q7ACZDDT.init_printDatasource)();
|
|
53
53
|
_DbPush = class _DbPush2 {
|
|
54
54
|
static new() {
|
|
@@ -71,12 +71,12 @@ var init_DbPush = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
71
71
|
if ((0, import_internals.isError)(args)) {
|
|
72
72
|
return this.help(args.message);
|
|
73
73
|
}
|
|
74
|
-
await (0, import_internals.checkUnsupportedDataProxy)("db push", args, true);
|
|
74
|
+
await (0, import_internals.checkUnsupportedDataProxy)("db push", args, config.schema, true);
|
|
75
75
|
if (args["--help"]) {
|
|
76
76
|
return this.help();
|
|
77
77
|
}
|
|
78
78
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
79
|
-
const { schemaPath } = await (0,
|
|
79
|
+
const { schemaPath } = await (0, import_chunk_M5YNQ2NP.getSchemaPathAndPrint)(args["--schema"], config.schema);
|
|
80
80
|
const datasourceInfo = await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath });
|
|
81
81
|
(0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo });
|
|
82
82
|
const migrate = new import_chunk_UVNSK22K.Migrate(schemaPath);
|
|
@@ -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_I5HMDWUT_exports = {};
|
|
30
|
+
__export(chunk_I5HMDWUT_exports, {
|
|
31
31
|
DbExecute: () => DbExecute,
|
|
32
32
|
init_DbExecute: () => init_DbExecute
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_I5HMDWUT_exports);
|
|
35
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");
|
|
@@ -115,7 +115,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
115
115
|
if ((0, import_internals.isError)(args)) {
|
|
116
116
|
return this.help(args.message);
|
|
117
117
|
}
|
|
118
|
-
await (0, import_internals.checkUnsupportedDataProxy)("db execute", args, !args["--url"]);
|
|
118
|
+
await (0, import_internals.checkUnsupportedDataProxy)("db execute", args, config.schema, !args["--url"]);
|
|
119
119
|
if (args["--help"]) {
|
|
120
120
|
return this.help();
|
|
121
121
|
}
|
|
@@ -165,11 +165,11 @@ See \`${(0, import_chunk_6TE2RIPN.green)((0, import_internals.getCommandWithExec
|
|
|
165
165
|
url: args["--url"]
|
|
166
166
|
};
|
|
167
167
|
} else {
|
|
168
|
-
const schemaWithPath = await (0, import_internals.getSchemaWithPath)(args["--schema"]);
|
|
169
|
-
const
|
|
168
|
+
const schemaWithPath = await (0, import_internals.getSchemaWithPath)(args["--schema"], config.schema);
|
|
169
|
+
const engineConfig = await (0, import_internals.getConfig)({ datamodel: schemaWithPath.schemas });
|
|
170
170
|
datasourceType = {
|
|
171
171
|
tag: "schema",
|
|
172
|
-
...(0, import_internals.toSchemasWithConfigDir)(schemaWithPath,
|
|
172
|
+
...(0, import_internals.toSchemasWithConfigDir)(schemaWithPath, engineConfig)
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
175
|
const migrate = new import_chunk_UVNSK22K.Migrate();
|
|
@@ -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_L7IZKRXP_exports = {};
|
|
30
|
+
__export(chunk_L7IZKRXP_exports, {
|
|
31
31
|
MigrateDiff: () => MigrateDiff,
|
|
32
32
|
init_MigrateDiff: () => init_MigrateDiff
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
34
|
+
module.exports = __toCommonJS(chunk_L7IZKRXP_exports);
|
|
35
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");
|
|
@@ -11562,7 +11562,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
11562
11562
|
"../internals/package.json"(exports, module2) {
|
|
11563
11563
|
module2.exports = {
|
|
11564
11564
|
name: "@prisma/internals",
|
|
11565
|
-
version: "6.4.0-dev.
|
|
11565
|
+
version: "6.4.0-dev.55",
|
|
11566
11566
|
description: "This package is intended for Prisma's internal use",
|
|
11567
11567
|
main: "dist/index.js",
|
|
11568
11568
|
types: "dist/index.d.ts",
|
|
@@ -11648,7 +11648,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
11648
11648
|
"@prisma/fetch-engine": "workspace:*",
|
|
11649
11649
|
"@prisma/generator-helper": "workspace:*",
|
|
11650
11650
|
"@prisma/get-platform": "workspace:*",
|
|
11651
|
-
"@prisma/prisma-schema-wasm": "6.4.0-
|
|
11651
|
+
"@prisma/prisma-schema-wasm": "6.4.0-26.7e7c9b8394a8c99732582d1f3b0646e95e351267",
|
|
11652
11652
|
"@prisma/schema-files-loader": "workspace:*",
|
|
11653
11653
|
arg: "5.0.2",
|
|
11654
11654
|
prompts: "2.4.2"
|
|
@@ -11930,8 +11930,8 @@ var init_engine_commands = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
11930
11930
|
init_getConfig();
|
|
11931
11931
|
}
|
|
11932
11932
|
});
|
|
11933
|
-
async function getSchemaWithPath(schemaPathFromArgs, { cwd = process.cwd(), argumentName = "--schema" } = {}) {
|
|
11934
|
-
const result = await getSchemaWithPathInternal(schemaPathFromArgs, { cwd, argumentName });
|
|
11933
|
+
async function getSchemaWithPath(schemaPathFromArgs, schemaPathFromConfig, { cwd = process.cwd(), argumentName = "--schema" } = {}) {
|
|
11934
|
+
const result = await getSchemaWithPathInternal(schemaPathFromArgs, schemaPathFromConfig, { cwd, argumentName });
|
|
11935
11935
|
if (result.ok) {
|
|
11936
11936
|
return result.schema;
|
|
11937
11937
|
}
|
|
@@ -11986,7 +11986,7 @@ async function readSchemaFromFileOrDirectory(schemaPath) {
|
|
|
11986
11986
|
}
|
|
11987
11987
|
return { ok: false, error: { kind: "WrongType", path: schemaPath, expectedTypes: ["file", "directory"] } };
|
|
11988
11988
|
}
|
|
11989
|
-
async function getSchemaWithPathInternal(schemaPathFromArgs, { cwd, argumentName }) {
|
|
11989
|
+
async function getSchemaWithPathInternal(schemaPathFromArgs, schemaPathFromConfig, { cwd, argumentName }) {
|
|
11990
11990
|
if (schemaPathFromArgs) {
|
|
11991
11991
|
const absPath = import_path.default.resolve(cwd, schemaPathFromArgs);
|
|
11992
11992
|
const customSchemaResult = await readSchemaFromFileOrDirectory(absPath);
|
|
@@ -12000,6 +12000,10 @@ async function getSchemaWithPathInternal(schemaPathFromArgs, { cwd, argumentName
|
|
|
12000
12000
|
}
|
|
12001
12001
|
return customSchemaResult;
|
|
12002
12002
|
}
|
|
12003
|
+
const prismaConfigResult = await readSchemaFromPrismaConfigBasedLocation(schemaPathFromConfig);
|
|
12004
|
+
if (prismaConfigResult.ok) {
|
|
12005
|
+
return prismaConfigResult;
|
|
12006
|
+
}
|
|
12003
12007
|
const pkgJsonResult = await getSchemaFromPackageJson(cwd);
|
|
12004
12008
|
if (pkgJsonResult.ok) {
|
|
12005
12009
|
return pkgJsonResult;
|
|
@@ -12055,6 +12059,31 @@ async function getPrismaConfigFromPackageJson(cwd) {
|
|
|
12055
12059
|
packagePath: pkgJson.path
|
|
12056
12060
|
};
|
|
12057
12061
|
}
|
|
12062
|
+
async function readSchemaFromPrismaConfigBasedLocation(schemaPathFromConfig) {
|
|
12063
|
+
if (!schemaPathFromConfig) {
|
|
12064
|
+
return {
|
|
12065
|
+
ok: false,
|
|
12066
|
+
error: { kind: "PrismaConfigNotConfigured" }
|
|
12067
|
+
};
|
|
12068
|
+
}
|
|
12069
|
+
let schemaResult;
|
|
12070
|
+
if (schemaPathFromConfig.kind === "single") {
|
|
12071
|
+
schemaResult = await readSchemaFromSingleFile(schemaPathFromConfig.filenamePath);
|
|
12072
|
+
if (!schemaResult.ok) {
|
|
12073
|
+
throw new Error(
|
|
12074
|
+
`Could not load schema from file \`${schemaPathFromConfig.filenamePath}\` provided by "prisma.config.ts" config\`: ${renderLookupError(schemaResult.error)}`
|
|
12075
|
+
);
|
|
12076
|
+
}
|
|
12077
|
+
} else {
|
|
12078
|
+
schemaResult = await readSchemaFromDirectory(schemaPathFromConfig.folder);
|
|
12079
|
+
if (!schemaResult.ok) {
|
|
12080
|
+
throw new Error(
|
|
12081
|
+
`Could not load schema from folder \`${schemaPathFromConfig.folder}\` provided by "prisma.config.ts" config\`: ${renderLookupError(schemaResult.error)}`
|
|
12082
|
+
);
|
|
12083
|
+
}
|
|
12084
|
+
}
|
|
12085
|
+
return schemaResult;
|
|
12086
|
+
}
|
|
12058
12087
|
async function getSchemaFromPackageJson(cwd) {
|
|
12059
12088
|
const prismaConfig = await getPrismaConfigFromPackageJson(cwd);
|
|
12060
12089
|
debug2("prismaConfig", prismaConfig);
|
|
@@ -12246,7 +12275,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12246
12275
|
if ((0, import_internals.isError)(args)) {
|
|
12247
12276
|
return this.help(args.message);
|
|
12248
12277
|
}
|
|
12249
|
-
await (0, import_internals.checkUnsupportedDataProxy)("migrate diff", args, false);
|
|
12278
|
+
await (0, import_internals.checkUnsupportedDataProxy)("migrate diff", args, config.schema, false);
|
|
12250
12279
|
if (args["--help"]) {
|
|
12251
12280
|
return this.help();
|
|
12252
12281
|
}
|
|
@@ -12274,7 +12303,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12274
12303
|
};
|
|
12275
12304
|
} else if (args["--from-schema-datasource"]) {
|
|
12276
12305
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--from-schema-datasource"], printMessage: false, config });
|
|
12277
|
-
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--from-schema-datasource"]), {
|
|
12306
|
+
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--from-schema-datasource"]), config.schema, {
|
|
12278
12307
|
argumentName: "--from-schema-datasource"
|
|
12279
12308
|
});
|
|
12280
12309
|
const engineConfig = await (0, import_internals.getConfig)({ datamodel: schema.schemas });
|
|
@@ -12283,7 +12312,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12283
12312
|
...(0, import_internals.toSchemasWithConfigDir)(schema, engineConfig)
|
|
12284
12313
|
};
|
|
12285
12314
|
} else if (args["--from-schema-datamodel"]) {
|
|
12286
|
-
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--from-schema-datamodel"]), {
|
|
12315
|
+
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--from-schema-datamodel"]), config.schema, {
|
|
12287
12316
|
argumentName: "--from-schema-datamodel"
|
|
12288
12317
|
});
|
|
12289
12318
|
from = {
|
|
@@ -12314,7 +12343,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12314
12343
|
};
|
|
12315
12344
|
} else if (args["--to-schema-datasource"]) {
|
|
12316
12345
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--to-schema-datasource"], printMessage: false, config });
|
|
12317
|
-
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--to-schema-datasource"]), {
|
|
12346
|
+
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--to-schema-datasource"]), config.schema, {
|
|
12318
12347
|
argumentName: "--to-schema-datasource"
|
|
12319
12348
|
});
|
|
12320
12349
|
const engineConfig = await (0, import_internals.getConfig)({ datamodel: schema.schemas });
|
|
@@ -12323,7 +12352,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12323
12352
|
...(0, import_internals.toSchemasWithConfigDir)(schema, engineConfig)
|
|
12324
12353
|
};
|
|
12325
12354
|
} else if (args["--to-schema-datamodel"]) {
|
|
12326
|
-
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--to-schema-datamodel"]), {
|
|
12355
|
+
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--to-schema-datamodel"]), config.schema, {
|
|
12327
12356
|
argumentName: "--to-schema-datamodel"
|
|
12328
12357
|
});
|
|
12329
12358
|
to = {
|
|
@@ -26,19 +26,19 @@ 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_M5YNQ2NP_exports = {};
|
|
30
|
+
__export(chunk_M5YNQ2NP_exports, {
|
|
31
31
|
getSchemaPathAndPrint: () => getSchemaPathAndPrint,
|
|
32
32
|
init_getSchemaPathAndPrint: () => init_getSchemaPathAndPrint,
|
|
33
33
|
printSchemaLoadedMessage: () => printSchemaLoadedMessage
|
|
34
34
|
});
|
|
35
|
-
module.exports = __toCommonJS(
|
|
35
|
+
module.exports = __toCommonJS(chunk_M5YNQ2NP_exports);
|
|
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");
|
|
39
39
|
var import_path = __toESM(require("path"));
|
|
40
|
-
async function getSchemaPathAndPrint(schemaPathProvided, options) {
|
|
41
|
-
const schemaPathResult = await (0, import_internals.getSchemaWithPath)(schemaPathProvided, options);
|
|
40
|
+
async function getSchemaPathAndPrint(schemaPathProvided, schemaPathFromConfig, options) {
|
|
41
|
+
const schemaPathResult = await (0, import_internals.getSchemaWithPath)(schemaPathProvided, schemaPathFromConfig, options);
|
|
42
42
|
printSchemaLoadedMessage(schemaPathResult.schemaPath);
|
|
43
43
|
return schemaPathResult;
|
|
44
44
|
}
|
|
@@ -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_QJ24Y4KM_exports = {};
|
|
20
|
+
__export(chunk_QJ24Y4KM_exports, {
|
|
21
21
|
MigrateResolve: () => MigrateResolve,
|
|
22
22
|
init_MigrateResolve: () => init_MigrateResolve
|
|
23
23
|
});
|
|
24
|
-
module.exports = __toCommonJS(
|
|
24
|
+
module.exports = __toCommonJS(chunk_QJ24Y4KM_exports);
|
|
25
25
|
var import_chunk_UVNSK22K = require("./chunk-UVNSK22K.js");
|
|
26
|
-
var
|
|
26
|
+
var import_chunk_M5YNQ2NP = require("./chunk-M5YNQ2NP.js");
|
|
27
27
|
var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
|
|
28
28
|
var import_chunk_XJQP3B4W = require("./chunk-XJQP3B4W.js");
|
|
29
29
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
|
@@ -35,7 +35,7 @@ var init_MigrateResolve = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
35
35
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
|
36
36
|
(0, import_chunk_UVNSK22K.init_Migrate)();
|
|
37
37
|
(0, import_chunk_XJQP3B4W.init_ensureDatabaseExists)();
|
|
38
|
-
(0,
|
|
38
|
+
(0, import_chunk_M5YNQ2NP.init_getSchemaPathAndPrint)();
|
|
39
39
|
(0, import_chunk_Q7ACZDDT.init_printDatasource)();
|
|
40
40
|
_MigrateResolve = class _MigrateResolve2 {
|
|
41
41
|
static new() {
|
|
@@ -57,12 +57,12 @@ var init_MigrateResolve = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
57
57
|
if ((0, import_internals.isError)(args)) {
|
|
58
58
|
return this.help(args.message);
|
|
59
59
|
}
|
|
60
|
-
await (0, import_internals.checkUnsupportedDataProxy)("migrate resolve", args, true);
|
|
60
|
+
await (0, import_internals.checkUnsupportedDataProxy)("migrate resolve", args, config.schema, true);
|
|
61
61
|
if (args["--help"]) {
|
|
62
62
|
return this.help();
|
|
63
63
|
}
|
|
64
64
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
65
|
-
const { schemaPath } = await (0,
|
|
65
|
+
const { schemaPath } = await (0, import_chunk_M5YNQ2NP.getSchemaPathAndPrint)(args["--schema"], config.schema);
|
|
66
66
|
(0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath }) });
|
|
67
67
|
if (!args["--applied"] && !args["--rolled-back"]) {
|
|
68
68
|
throw new Error(
|