@prisma/migrate 5.23.0-dev.12 → 5.23.0-dev.14
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 +13 -14
- package/dist/{chunk-T2L5YNPI.js → chunk-4OACEJL5.js} +7 -93
- package/dist/{chunk-XVL5RF2T.js → chunk-75AMGQ4R.js} +8 -8
- package/dist/{chunk-ZLGLVUFD.js → chunk-E2XKFV2C.js} +8 -8
- package/dist/{chunk-LLGEQ76N.js → chunk-O6RO4YUZ.js} +8 -8
- package/dist/{chunk-B6SEROKI.js → chunk-WKQT5TGV.js} +8 -866
- package/dist/{chunk-WIZM7TFT.js → chunk-YKUZUAXA.js} +443 -55
- package/dist/commands/DbSeed.js +4 -5
- package/dist/commands/MigrateDev.js +4 -5
- package/dist/commands/MigrateDiff.js +3 -4
- package/dist/commands/MigrateReset.js +4 -5
- package/dist/index.js +13 -14
- package/dist/internals/src/utils/isCurrentBinInstalledGlobally.d.ts +1 -1
- package/dist/utils/seed.js +6 -7
- package/package.json +6 -7
- package/dist/chunk-EFPE3Q7J.js +0 -424
- package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.d.ts +0 -9
package/dist/bin.js
CHANGED
@@ -34,7 +34,7 @@ __export(bin_exports, {
|
|
34
34
|
module.exports = __toCommonJS(bin_exports);
|
35
35
|
var import_chunk_JZ6FKTWG = require("./chunk-JZ6FKTWG.js");
|
36
36
|
var import_chunk_GJN3CSXW = require("./chunk-GJN3CSXW.js");
|
37
|
-
var
|
37
|
+
var import_chunk_75AMGQ4R = require("./chunk-75AMGQ4R.js");
|
38
38
|
var import_chunk_BAVMZZAR = require("./chunk-BAVMZZAR.js");
|
39
39
|
var import_chunk_SV5GANSI = require("./chunk-SV5GANSI.js");
|
40
40
|
var import_chunk_ZBOJAYON = require("./chunk-ZBOJAYON.js");
|
@@ -50,21 +50,20 @@ 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
52
|
var import_chunk_76XWADEV = require("./chunk-76XWADEV.js");
|
53
|
-
var
|
53
|
+
var import_chunk_E2XKFV2C = require("./chunk-E2XKFV2C.js");
|
54
54
|
var import_chunk_CK5VLKFM = require("./chunk-CK5VLKFM.js");
|
55
55
|
var import_chunk_UJWMQPUH = require("./chunk-UJWMQPUH.js");
|
56
|
-
var
|
56
|
+
var import_chunk_O6RO4YUZ = require("./chunk-O6RO4YUZ.js");
|
57
57
|
var import_chunk_IFCV5MY4 = require("./chunk-IFCV5MY4.js");
|
58
58
|
var import_chunk_SGCF5OHF = require("./chunk-SGCF5OHF.js");
|
59
|
-
var
|
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_WKQT5TGV = require("./chunk-WKQT5TGV.js");
|
64
64
|
var import_chunk_VWV2NY26 = require("./chunk-VWV2NY26.js");
|
65
65
|
var import_chunk_XRTNIFND = require("./chunk-XRTNIFND.js");
|
66
66
|
var import_chunk_TKAGMA5K = require("./chunk-TKAGMA5K.js");
|
67
|
-
var import_chunk_WIZM7TFT = require("./chunk-WIZM7TFT.js");
|
68
67
|
var import_chunk_MWEO3VUS = require("./chunk-MWEO3VUS.js");
|
69
68
|
var import_chunk_6C7ESGWY = require("./chunk-6C7ESGWY.js");
|
70
69
|
var import_chunk_J46BJQHT = require("./chunk-J46BJQHT.js");
|
@@ -90,12 +89,12 @@ var require_bin = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
90
89
|
(0, import_chunk_ZBOJAYON.init_DbExecute)();
|
91
90
|
(0, import_chunk_EXUBPCXZ.init_DbPull)();
|
92
91
|
(0, import_chunk_76XWADEV.init_DbPush)();
|
93
|
-
(0,
|
92
|
+
(0, import_chunk_E2XKFV2C.init_DbSeed)();
|
94
93
|
(0, import_chunk_CK5VLKFM.init_MigrateCommand)();
|
95
94
|
(0, import_chunk_UJWMQPUH.init_MigrateDeploy)();
|
96
|
-
(0,
|
97
|
-
(0,
|
98
|
-
(0,
|
95
|
+
(0, import_chunk_O6RO4YUZ.init_MigrateDev)();
|
96
|
+
(0, import_chunk_WKQT5TGV.init_MigrateDiff)();
|
97
|
+
(0, import_chunk_75AMGQ4R.init_MigrateReset)();
|
99
98
|
(0, import_chunk_BAVMZZAR.init_MigrateResolve)();
|
100
99
|
(0, import_chunk_SV5GANSI.init_MigrateStatus)();
|
101
100
|
(0, import_chunk_GJN3CSXW.init_getDatabaseVersionSafe)();
|
@@ -113,19 +112,19 @@ var require_bin = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
113
112
|
async function main() {
|
114
113
|
const cli = import_chunk_JZ6FKTWG.CLI.new({
|
115
114
|
migrate: import_chunk_CK5VLKFM.MigrateCommand.new({
|
116
|
-
dev:
|
115
|
+
dev: import_chunk_O6RO4YUZ.MigrateDev.new(),
|
117
116
|
status: import_chunk_SV5GANSI.MigrateStatus.new(),
|
118
117
|
resolve: import_chunk_BAVMZZAR.MigrateResolve.new(),
|
119
|
-
reset:
|
118
|
+
reset: import_chunk_75AMGQ4R.MigrateReset.new(),
|
120
119
|
deploy: import_chunk_UJWMQPUH.MigrateDeploy.new(),
|
121
|
-
diff:
|
120
|
+
diff: import_chunk_WKQT5TGV.MigrateDiff.new()
|
122
121
|
}),
|
123
122
|
db: import_chunk_NJUAN6V2.DbCommand.new({
|
124
123
|
execute: import_chunk_ZBOJAYON.DbExecute.new(),
|
125
124
|
pull: import_chunk_EXUBPCXZ.DbPull.new(),
|
126
125
|
push: import_chunk_76XWADEV.DbPush.new(),
|
127
126
|
// drop: DbDrop.new(),
|
128
|
-
seed:
|
127
|
+
seed: import_chunk_E2XKFV2C.DbSeed.new()
|
129
128
|
})
|
130
129
|
});
|
131
130
|
const result = await cli.parse(commandArray);
|
@@ -26,16 +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_4OACEJL5_exports = {};
|
30
|
+
__export(chunk_4OACEJL5_exports, {
|
31
31
|
MigrateDiff: () => MigrateDiff,
|
32
32
|
init_MigrateDiff: () => init_MigrateDiff
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_4OACEJL5_exports);
|
35
35
|
var import_chunk_VWV2NY26 = require("./chunk-VWV2NY26.js");
|
36
36
|
var import_chunk_XRTNIFND = require("./chunk-XRTNIFND.js");
|
37
37
|
var import_chunk_TKAGMA5K = require("./chunk-TKAGMA5K.js");
|
38
|
-
var import_chunk_WIZM7TFT = require("./chunk-WIZM7TFT.js");
|
39
38
|
var import_chunk_MWEO3VUS = require("./chunk-MWEO3VUS.js");
|
40
39
|
var import_chunk_LVFPGUOH = require("./chunk-LVFPGUOH.js");
|
41
40
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
@@ -10754,7 +10753,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
10754
10753
|
"../internals/package.json"(exports, module2) {
|
10755
10754
|
module2.exports = {
|
10756
10755
|
name: "@prisma/internals",
|
10757
|
-
version: "
|
10756
|
+
version: "0.0.0",
|
10758
10757
|
description: "This package is intended for Prisma's internal use",
|
10759
10758
|
main: "dist/index.js",
|
10760
10759
|
types: "dist/index.d.ts",
|
@@ -10839,7 +10838,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
10839
10838
|
"@prisma/fetch-engine": "workspace:*",
|
10840
10839
|
"@prisma/generator-helper": "workspace:*",
|
10841
10840
|
"@prisma/get-platform": "workspace:*",
|
10842
|
-
"@prisma/prisma-schema-wasm": "5.23.0-
|
10841
|
+
"@prisma/prisma-schema-wasm": "5.23.0-11.90c6eb338aab4ebc379a3dfb6d0130b1535db96c",
|
10843
10842
|
"@prisma/schema-files-loader": "workspace:*",
|
10844
10843
|
arg: "5.0.2",
|
10845
10844
|
prompts: "2.4.2"
|
@@ -11208,14 +11207,9 @@ async function getSchemaWithPathInternal(schemaPathFromArgs, { cwd, argumentName
|
|
11208
11207
|
if (defaultResult.ok) {
|
11209
11208
|
return defaultResult;
|
11210
11209
|
}
|
11211
|
-
const yarnResult = await getSchemaFromYarn1Workspace(cwd, defaultResult.error.failures);
|
11212
|
-
if (yarnResult.ok) {
|
11213
|
-
return yarnResult;
|
11214
|
-
}
|
11215
|
-
const finalError = yarnResult.error.kind === "Yarn1WorkspaceSchemaNotFound" ? defaultResult.error : yarnResult.error;
|
11216
11210
|
return {
|
11217
11211
|
ok: false,
|
11218
|
-
error:
|
11212
|
+
error: defaultResult.error
|
11219
11213
|
};
|
11220
11214
|
}
|
11221
11215
|
function renderLookupError(error) {
|
@@ -11290,47 +11284,6 @@ async function getSchemaFromPackageJson(cwd) {
|
|
11290
11284
|
}
|
11291
11285
|
return lookupResult;
|
11292
11286
|
}
|
11293
|
-
async function getSchemaFromYarn1Workspace(cwd, pastFailures) {
|
11294
|
-
if (!process.env.npm_config_user_agent?.includes("yarn")) {
|
11295
|
-
return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
|
11296
|
-
}
|
11297
|
-
let workspaces;
|
11298
|
-
try {
|
11299
|
-
const { stdout: version2 } = await import_execa.default.command("yarn --version", {
|
11300
|
-
cwd
|
11301
|
-
});
|
11302
|
-
if (version2.startsWith("2")) {
|
11303
|
-
return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
|
11304
|
-
}
|
11305
|
-
const { stdout } = await import_execa.default.command("yarn workspaces info --json", {
|
11306
|
-
cwd
|
11307
|
-
});
|
11308
|
-
const json = getJson(stdout);
|
11309
|
-
workspaces = Object.values(json);
|
11310
|
-
} catch {
|
11311
|
-
return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
|
11312
|
-
}
|
11313
|
-
const workspaceRootDir = await findWorkspaceRoot(cwd);
|
11314
|
-
if (!workspaceRootDir) {
|
11315
|
-
return { ok: false, error: { kind: "Yarn1WorkspaceSchemaNotFound" } };
|
11316
|
-
}
|
11317
|
-
for (const workspace of workspaces) {
|
11318
|
-
const workspacePath = import_path5.default.join(workspaceRootDir, workspace.location);
|
11319
|
-
const workspaceSchema = await tryWorkspacePath(workspacePath, pastFailures);
|
11320
|
-
if (workspaceSchema.ok) {
|
11321
|
-
return workspaceSchema;
|
11322
|
-
}
|
11323
|
-
}
|
11324
|
-
const rootPathSchema = await tryWorkspacePath(workspaceRootDir, pastFailures);
|
11325
|
-
return rootPathSchema;
|
11326
|
-
}
|
11327
|
-
async function tryWorkspacePath(cwd, pastFailures) {
|
11328
|
-
const pkgJson = await getSchemaFromPackageJson(cwd);
|
11329
|
-
if (pkgJson.ok) {
|
11330
|
-
return pkgJson;
|
11331
|
-
}
|
11332
|
-
return getDefaultSchema(cwd, pastFailures);
|
11333
|
-
}
|
11334
11287
|
async function getDefaultSchema(cwd, failures = []) {
|
11335
11288
|
const schemaPrisma = {
|
11336
11289
|
schemaPath: {
|
@@ -11395,50 +11348,11 @@ async function loadSchemaFromDefaultLocation(lookupPath) {
|
|
11395
11348
|
return readSchemaFromDirectory(lookupPath.path);
|
11396
11349
|
}
|
11397
11350
|
}
|
11398
|
-
|
11399
|
-
const firstCurly = stdout.indexOf("{");
|
11400
|
-
const lastCurly = stdout.lastIndexOf("}");
|
11401
|
-
const sliced = stdout.slice(firstCurly, lastCurly + 1);
|
11402
|
-
return JSON.parse(sliced);
|
11403
|
-
}
|
11404
|
-
function isPkgJsonWorkspaceRoot(pkgJson) {
|
11405
|
-
const workspaces = pkgJson.workspaces;
|
11406
|
-
if (!workspaces) {
|
11407
|
-
return false;
|
11408
|
-
}
|
11409
|
-
return Array.isArray(workspaces) || workspaces.packages !== void 0;
|
11410
|
-
}
|
11411
|
-
async function isNearestPkgJsonWorkspaceRoot(cwd) {
|
11412
|
-
const pkgJson = await readPackageUp({ cwd, normalize: false });
|
11413
|
-
if (!pkgJson) {
|
11414
|
-
return null;
|
11415
|
-
}
|
11416
|
-
return {
|
11417
|
-
isRoot: isPkgJsonWorkspaceRoot(pkgJson.packageJson),
|
11418
|
-
path: pkgJson.path
|
11419
|
-
};
|
11420
|
-
}
|
11421
|
-
async function findWorkspaceRoot(cwd) {
|
11422
|
-
let pkgJson = await isNearestPkgJsonWorkspaceRoot(cwd);
|
11423
|
-
if (!pkgJson) {
|
11424
|
-
return null;
|
11425
|
-
}
|
11426
|
-
if (pkgJson.isRoot === true) {
|
11427
|
-
return import_path5.default.dirname(pkgJson.path);
|
11428
|
-
}
|
11429
|
-
const pkgJsonParentDir = import_path5.default.dirname(import_path5.default.dirname(pkgJson.path));
|
11430
|
-
pkgJson = await isNearestPkgJsonWorkspaceRoot(pkgJsonParentDir);
|
11431
|
-
if (!pkgJson || pkgJson.isRoot === false) {
|
11432
|
-
return null;
|
11433
|
-
}
|
11434
|
-
return import_path5.default.dirname(pkgJson.path);
|
11435
|
-
}
|
11436
|
-
var import_schema_files_loader, import_execa, readFile, stat, debug2;
|
11351
|
+
var import_schema_files_loader, readFile, stat, debug2;
|
11437
11352
|
var init_getSchema = (0, import_chunk_WWAWV7DQ.__esm)({
|
11438
11353
|
"../internals/src/cli/getSchema.ts"() {
|
11439
11354
|
"use strict";
|
11440
11355
|
import_schema_files_loader = (0, import_chunk_WWAWV7DQ.__toESM)(require_dist());
|
11441
|
-
import_execa = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_WIZM7TFT.require_execa)());
|
11442
11356
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
11443
11357
|
init_read_package_up();
|
11444
11358
|
init_engine_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_75AMGQ4R_exports = {};
|
30
|
+
__export(chunk_75AMGQ4R_exports, {
|
31
31
|
MigrateReset: () => MigrateReset,
|
32
32
|
init_MigrateReset: () => init_MigrateReset
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
35
|
-
var
|
34
|
+
module.exports = __toCommonJS(chunk_75AMGQ4R_exports);
|
35
|
+
var import_chunk_YKUZUAXA = require("./chunk-YKUZUAXA.js");
|
36
36
|
var import_chunk_WOOPRG54 = require("./chunk-WOOPRG54.js");
|
37
37
|
var import_chunk_MWEO3VUS = require("./chunk-MWEO3VUS.js");
|
38
38
|
var import_chunk_U374EXYQ = require("./chunk-U374EXYQ.js");
|
@@ -53,7 +53,7 @@ var init_MigrateReset = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
53
53
|
(0, import_chunk_EYA6AFSF.init_getSchemaPathAndPrint)();
|
54
54
|
(0, import_chunk_Q7ACZDDT.init_printDatasource)();
|
55
55
|
(0, import_chunk_WOOPRG54.init_printFiles)();
|
56
|
-
(0,
|
56
|
+
(0, import_chunk_YKUZUAXA.init_seed)();
|
57
57
|
_MigrateReset = class _MigrateReset2 {
|
58
58
|
static new() {
|
59
59
|
return new _MigrateReset2();
|
@@ -128,10 +128,10 @@ ${(0, import_chunk_WOOPRG54.printFilesFromMigrationIds)("migrations", migrationI
|
|
128
128
|
await migrate.tryToRunGenerate();
|
129
129
|
}
|
130
130
|
if (!process.env.PRISMA_MIGRATE_SKIP_SEED && !args["--skip-seed"]) {
|
131
|
-
const seedCommandFromPkgJson = await (0,
|
131
|
+
const seedCommandFromPkgJson = await (0, import_chunk_YKUZUAXA.getSeedCommandFromPackageJson)(process.cwd());
|
132
132
|
if (seedCommandFromPkgJson) {
|
133
133
|
process.stdout.write("\n");
|
134
|
-
const successfulSeeding = await (0,
|
134
|
+
const successfulSeeding = await (0, import_chunk_YKUZUAXA.executeSeedCommand)({ commandFromConfig: seedCommandFromPkgJson });
|
135
135
|
if (successfulSeeding) {
|
136
136
|
process.stdout.write(`
|
137
137
|
${process.platform === "win32" ? "" : "\u{1F331} "}The seed command has been executed.
|
@@ -141,7 +141,7 @@ ${process.platform === "win32" ? "" : "\u{1F331} "}The seed command has been ex
|
|
141
141
|
}
|
142
142
|
} else {
|
143
143
|
const { schemaPath: schemaPath2 } = await (0, import_internals.getSchemaWithPath)(args["--schema"]);
|
144
|
-
await (0,
|
144
|
+
await (0, import_chunk_YKUZUAXA.verifySeedConfigAndReturnMessage)(schemaPath2);
|
145
145
|
}
|
146
146
|
}
|
147
147
|
return ``;
|
@@ -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_E2XKFV2C_exports = {};
|
20
|
+
__export(chunk_E2XKFV2C_exports, {
|
21
21
|
DbSeed: () => DbSeed,
|
22
22
|
init_DbSeed: () => init_DbSeed
|
23
23
|
});
|
24
|
-
module.exports = __toCommonJS(
|
25
|
-
var
|
24
|
+
module.exports = __toCommonJS(chunk_E2XKFV2C_exports);
|
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");
|
28
28
|
var import_internals = require("@prisma/internals");
|
@@ -174,7 +174,7 @@ var init_DbSeed = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
174
174
|
"src/commands/DbSeed.ts"() {
|
175
175
|
import_arg = (0, import_chunk_WWAWV7DQ.__toESM)(require_arg());
|
176
176
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
177
|
-
(0,
|
177
|
+
(0, import_chunk_YKUZUAXA.init_seed)();
|
178
178
|
_DbSeed = class _DbSeed2 {
|
179
179
|
static new() {
|
180
180
|
return new _DbSeed2();
|
@@ -202,17 +202,17 @@ ${(0, import_chunk_6TE2RIPN.dim)("$")} prisma db seed -- --arg1 value1 --arg2 va
|
|
202
202
|
return this.help();
|
203
203
|
}
|
204
204
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
|
205
|
-
const seedCommandFromPkgJson = await (0,
|
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"]);
|
208
|
-
const message = await (0,
|
208
|
+
const message = await (0, import_chunk_YKUZUAXA.verifySeedConfigAndReturnMessage)(schemaResult?.schemaPath ?? null);
|
209
209
|
if (message) {
|
210
210
|
throw new Error(message);
|
211
211
|
}
|
212
212
|
return ``;
|
213
213
|
}
|
214
214
|
const extraArgs = args._.join(" ");
|
215
|
-
const successfulSeeding = await (0,
|
215
|
+
const successfulSeeding = await (0, import_chunk_YKUZUAXA.executeSeedCommand)({ commandFromConfig: seedCommandFromPkgJson, extraArgs });
|
216
216
|
if (successfulSeeding) {
|
217
217
|
return `
|
218
218
|
${process.platform === "win32" ? "" : "\u{1F331} "}The seed command has been executed.`;
|
@@ -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_O6RO4YUZ_exports = {};
|
30
|
+
__export(chunk_O6RO4YUZ_exports, {
|
31
31
|
MigrateDev: () => MigrateDev,
|
32
32
|
init_MigrateDev: () => init_MigrateDev
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_O6RO4YUZ_exports);
|
35
35
|
var import_chunk_IFCV5MY4 = require("./chunk-IFCV5MY4.js");
|
36
36
|
var import_chunk_SGCF5OHF = require("./chunk-SGCF5OHF.js");
|
37
|
-
var
|
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
40
|
var import_chunk_MWEO3VUS = require("./chunk-MWEO3VUS.js");
|
@@ -60,7 +60,7 @@ var init_MigrateDev = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
60
60
|
(0, import_chunk_WOOPRG54.init_printFiles)();
|
61
61
|
(0, import_chunk_6QFE3AWR.init_printMigrationId)();
|
62
62
|
(0, import_chunk_IFCV5MY4.init_promptForMigrationName)();
|
63
|
-
(0,
|
63
|
+
(0, import_chunk_YKUZUAXA.init_seed)();
|
64
64
|
debug = (0, import_debug.default)("prisma:migrate:dev");
|
65
65
|
_MigrateDev = class _MigrateDev2 {
|
66
66
|
static new() {
|
@@ -268,10 +268,10 @@ ${(0, import_chunk_6TE2RIPN.green)("Your database is now in sync with your schem
|
|
268
268
|
}
|
269
269
|
if ((wasDbCreated || devDiagnostic.action.tag === "reset") && !process.env.PRISMA_MIGRATE_SKIP_SEED && !args["--skip-seed"]) {
|
270
270
|
try {
|
271
|
-
const seedCommandFromPkgJson = await (0,
|
271
|
+
const seedCommandFromPkgJson = await (0, import_chunk_YKUZUAXA.getSeedCommandFromPackageJson)(process.cwd());
|
272
272
|
if (seedCommandFromPkgJson) {
|
273
273
|
process.stdout.write("\n");
|
274
|
-
const successfulSeeding = await (0,
|
274
|
+
const successfulSeeding = await (0, import_chunk_YKUZUAXA.executeSeedCommand)({ commandFromConfig: seedCommandFromPkgJson });
|
275
275
|
if (successfulSeeding) {
|
276
276
|
process.stdout.write(`
|
277
277
|
${process.platform === "win32" ? "" : "\u{1F331} "}The seed command has been executed.
|
@@ -281,7 +281,7 @@ ${process.platform === "win32" ? "" : "\u{1F331} "}The seed command has been ex
|
|
281
281
|
}
|
282
282
|
} else {
|
283
283
|
const { schemaPath: schemaPath2 } = await (0, import_internals.getSchemaWithPath)(args["--schema"]);
|
284
|
-
await (0,
|
284
|
+
await (0, import_chunk_YKUZUAXA.verifySeedConfigAndReturnMessage)(schemaPath2);
|
285
285
|
}
|
286
286
|
} catch (e) {
|
287
287
|
console.error(e);
|