@prisma/migrate 6.20.0-dev.8 → 6.20.0-dev.9
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 +2 -2
- package/dist/Migrate.js +4 -8
- package/dist/SchemaEngineCLI.js +4 -4
- package/dist/SchemaEngineWasm.js +4 -4
- package/dist/bin.js +71 -74
- package/dist/chunk-3MCWUFUJ.js +169 -0
- package/dist/{chunk-O35BTK6Y.js → chunk-7BNYLV6P.js} +7 -14
- package/dist/{chunk-F2XCBEZ4.js → chunk-AIUUIREM.js} +27 -53
- package/dist/{chunk-74LUB4XX.js → chunk-BRPS327A.js} +23 -45
- package/dist/{chunk-7TVX3D4W.js → chunk-CQ6GMT2G.js} +23 -69
- package/dist/{chunk-EJG7GKM7.js → chunk-DCXZOUQV.js} +5 -5
- package/dist/{chunk-LLO7YF56.js → chunk-DYXUXG3K.js} +7 -7
- package/dist/{chunk-GSX25HRL.js → chunk-ENVEA7LT.js} +10 -13
- package/dist/{chunk-6ORQRJLP.js → chunk-FEUKQ7J3.js} +38 -132
- package/dist/{chunk-BHJMJSM4.js → chunk-IQWOR45L.js} +28 -24
- package/dist/{chunk-R4IWP35Z.js → chunk-IVL273O6.js} +20 -20
- package/dist/{chunk-PHXLQVPT.js → chunk-L7EZFBB4.js} +40 -68
- package/dist/{chunk-3AKRTEIK.js → chunk-N4SBKLAB.js} +24 -23
- package/dist/{chunk-NGQA5JTN.js → chunk-OAHBNV3B.js} +5 -5
- package/dist/{chunk-22YP3RXZ.js → chunk-OZ26HKM7.js} +7 -7
- package/dist/{chunk-AXR7LS2N.js → chunk-PEUHUCS4.js} +4 -5
- package/dist/{chunk-TW22Y3AA.js → chunk-QAOWTYGM.js} +31 -32
- package/dist/{chunk-2FXU5NZQ.js → chunk-QOPTDDIH.js} +5 -10
- package/dist/{chunk-J33EXHZB.js → chunk-S4LY555Z.js} +26 -46
- package/dist/{chunk-NB4FRYRQ.js → chunk-TLHUBVSH.js} +6 -6
- package/dist/{chunk-Z27SI4AV.js → chunk-TRUKHPCA.js} +20 -15
- package/dist/{chunk-D4TRX77Y.js → chunk-WF7UXKO5.js} +6 -9
- package/dist/{chunk-ZTIS675B.js → chunk-XFASRSQR.js} +81 -172
- package/dist/{chunk-3WC4XD74.js → chunk-XGTVKL4L.js} +11 -4
- package/dist/{chunk-VU5BLQUI.js → chunk-ZOT2HSX5.js} +218 -22
- package/dist/commands/DbCommand.js +2 -2
- package/dist/commands/DbDrop.js +5 -5
- package/dist/commands/DbExecute.js +5 -9
- package/dist/commands/DbPull.js +10 -16
- package/dist/commands/DbPush.js +8 -12
- package/dist/commands/DbSeed.js +3 -3
- package/dist/commands/MigrateCommand.js +2 -2
- package/dist/commands/MigrateDeploy.js +7 -11
- package/dist/commands/MigrateDev.js +8 -13
- package/dist/commands/MigrateDiff.js +6 -9
- package/dist/commands/MigrateReset.js +8 -13
- package/dist/commands/MigrateResolve.js +7 -11
- package/dist/commands/MigrateStatus.js +7 -11
- package/dist/index.js +44 -48
- package/dist/internals/src/cli/getSchema.d.ts +1 -15
- package/dist/migrate/src/CLI.d.ts +1 -1
- package/dist/migrate/src/Migrate.d.ts +2 -3
- package/dist/migrate/src/SchemaEngineCLI.d.ts +4 -3
- package/dist/migrate/src/commands/DbCommand.d.ts +1 -1
- package/dist/migrate/src/commands/DbDrop.d.ts +1 -1
- package/dist/migrate/src/commands/DbExecute.d.ts +1 -1
- package/dist/migrate/src/commands/DbPull.d.ts +1 -2
- package/dist/migrate/src/commands/DbPush.d.ts +1 -1
- package/dist/migrate/src/commands/MigrateCommand.d.ts +1 -1
- package/dist/migrate/src/commands/MigrateDeploy.d.ts +1 -1
- package/dist/migrate/src/commands/MigrateDev.d.ts +1 -1
- package/dist/migrate/src/commands/MigrateDiff.d.ts +2 -1
- package/dist/migrate/src/commands/MigrateReset.d.ts +1 -1
- package/dist/migrate/src/commands/MigrateResolve.d.ts +1 -1
- package/dist/migrate/src/commands/MigrateStatus.d.ts +1 -1
- package/dist/migrate/src/utils/ensureDatabaseExists.d.ts +9 -5
- package/dist/migrate/src/utils/errors.d.ts +3 -0
- package/dist/migrate/src/utils/getDatabaseVersionSafe.d.ts +2 -1
- package/dist/migrate/src/utils/introspectSql.d.ts +2 -2
- package/dist/migrate/src/utils/printDatasource.d.ts +1 -3
- package/dist/migrate/src/utils/seed.d.ts +0 -6
- package/dist/utils/ensureDatabaseExists.js +6 -6
- package/dist/utils/errors.js +8 -7
- package/dist/utils/getDatabaseVersionSafe.js +5 -9
- package/dist/utils/introspectSql.js +5 -9
- package/dist/utils/printDatasource.js +2 -2
- package/dist/utils/printDatasources.js +31 -3
- package/dist/utils/seed.js +2 -3
- package/dist/utils/setupMSSQL.js +18 -3
- package/dist/utils/spinner.js +2 -3
- package/dist/views/handleViewsIO.js +2 -2
- package/package.json +11 -11
- package/dist/chunk-AI6DH66U.js +0 -55
- package/dist/chunk-D6LYHB65.js +0 -905
- package/dist/chunk-RR6BKMNO.js +0 -80
- package/dist/chunk-T64SUJ5L.js +0 -46
- package/dist/chunk-VV4M6AN7.js +0 -233
- package/dist/migrate/src/utils/replaceOrAddDatasource.d.ts +0 -2
- package/dist/migrate/src/utils/replaceOrAddDatasource.test.d.ts +0 -1
- package/dist/migrate/src/utils/warnDatasourceDriverAdapter.d.ts +0 -2
- package/dist/utils/replaceOrAddDatasource.js +0 -25
- package/dist/utils/replaceOrAddDatasource.test.js +0 -207
- package/dist/utils/warnDatasourceDriverAdapter.js +0 -25
|
@@ -26,18 +26,17 @@ 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_S4LY555Z_exports = {};
|
|
30
|
+
__export(chunk_S4LY555Z_exports, {
|
|
31
31
|
MigrateReset: () => MigrateReset
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_S4LY555Z_exports);
|
|
34
34
|
var import_chunk_KRQEFTDT = require("./chunk-KRQEFTDT.js");
|
|
35
35
|
var import_chunk_FBDQVK4W = require("./chunk-FBDQVK4W.js");
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var import_chunk_D6LYHB65 = require("./chunk-D6LYHB65.js");
|
|
36
|
+
var import_chunk_XGTVKL4L = require("./chunk-XGTVKL4L.js");
|
|
37
|
+
var import_chunk_QOPTDDIH = require("./chunk-QOPTDDIH.js");
|
|
38
|
+
var import_chunk_BRPS327A = require("./chunk-BRPS327A.js");
|
|
39
|
+
var import_chunk_3MCWUFUJ = require("./chunk-3MCWUFUJ.js");
|
|
41
40
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
42
41
|
var import_internals = require("@prisma/internals");
|
|
43
42
|
var import_prompts = __toESM(require("prompts"));
|
|
@@ -52,13 +51,13 @@ ${(0, import_chunk_SKRR5WT4.bold)("Usage")}
|
|
|
52
51
|
|
|
53
52
|
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma migrate reset [options]
|
|
54
53
|
|
|
54
|
+
The datasource URL configuration is read from the Prisma config file (e.g., ${(0, import_chunk_SKRR5WT4.italic)("prisma.config.ts")}).
|
|
55
|
+
|
|
55
56
|
${(0, import_chunk_SKRR5WT4.bold)("Options")}
|
|
56
57
|
|
|
57
58
|
-h, --help Display this help message
|
|
58
59
|
--config Custom path to your Prisma config file
|
|
59
60
|
--schema Custom path to your Prisma schema
|
|
60
|
-
--skip-generate Skip triggering generators (e.g. Prisma Client)
|
|
61
|
-
--skip-seed Skip triggering seed
|
|
62
61
|
-f, --force Skip the confirmation prompt
|
|
63
62
|
|
|
64
63
|
${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
@@ -72,14 +71,12 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
72
71
|
Use --force to skip the confirmation prompt
|
|
73
72
|
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma migrate reset --force
|
|
74
73
|
`);
|
|
75
|
-
async parse(argv, config) {
|
|
74
|
+
async parse(argv, config, configDir) {
|
|
76
75
|
const args = (0, import_internals.arg)(argv, {
|
|
77
76
|
"--help": Boolean,
|
|
78
77
|
"-h": "--help",
|
|
79
78
|
"--force": Boolean,
|
|
80
79
|
"-f": "--force",
|
|
81
|
-
"--skip-generate": Boolean,
|
|
82
|
-
"--skip-seed": Boolean,
|
|
83
80
|
"--schema": String,
|
|
84
81
|
"--config": String,
|
|
85
82
|
"--telemetry-information": String
|
|
@@ -90,27 +87,28 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
90
87
|
if (args["--help"]) {
|
|
91
88
|
return this.help();
|
|
92
89
|
}
|
|
93
|
-
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
94
90
|
const schemaContext = await (0, import_internals.loadSchemaContext)({
|
|
95
91
|
schemaPathFromArg: args["--schema"],
|
|
96
|
-
schemaPathFromConfig: config.schema
|
|
97
|
-
schemaEngineConfig: config
|
|
92
|
+
schemaPathFromConfig: config.schema
|
|
98
93
|
});
|
|
94
|
+
const cmd = "migrate reset";
|
|
95
|
+
const validatedConfig = (0, import_internals.validatePrismaConfigWithDatasource)({ config, cmd });
|
|
99
96
|
const { migrationsDirPath } = (0, import_internals.inferDirectoryConfig)(schemaContext, config);
|
|
100
|
-
const datasourceInfo = (0,
|
|
101
|
-
|
|
102
|
-
(0,
|
|
103
|
-
(0,
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
97
|
+
const datasourceInfo = (0, import_chunk_BRPS327A.parseDatasourceInfo)(schemaContext.primaryDatasource, validatedConfig);
|
|
98
|
+
(0, import_chunk_QOPTDDIH.printDatasource)({ datasourceInfo });
|
|
99
|
+
(0, import_internals.checkUnsupportedDataProxy)({ cmd, validatedConfig });
|
|
100
|
+
const successMessage = await (0, import_chunk_BRPS327A.ensureDatabaseExists)(
|
|
101
|
+
configDir,
|
|
102
|
+
(0, import_internals.getSchemaDatasourceProvider)(schemaContext),
|
|
103
|
+
validatedConfig
|
|
104
|
+
);
|
|
105
|
+
if (successMessage) {
|
|
106
|
+
process.stdout.write("\n" + successMessage + "\n");
|
|
109
107
|
}
|
|
110
108
|
process.stdout.write("\n");
|
|
111
109
|
if (!args["--force"]) {
|
|
112
110
|
if (!(0, import_internals.canPrompt)()) {
|
|
113
|
-
throw new
|
|
111
|
+
throw new import_chunk_XGTVKL4L.MigrateResetEnvNonInteractiveError();
|
|
114
112
|
}
|
|
115
113
|
const confirmation = await (0, import_prompts.default)({
|
|
116
114
|
type: "confirm",
|
|
@@ -128,8 +126,9 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
128
126
|
externalTables: config.tables?.external ?? [],
|
|
129
127
|
externalEnums: config.enums?.external ?? []
|
|
130
128
|
};
|
|
131
|
-
const migrate = await
|
|
129
|
+
const migrate = await import_chunk_3MCWUFUJ.Migrate.setup({
|
|
132
130
|
schemaEngineConfig: config,
|
|
131
|
+
configDir,
|
|
133
132
|
migrationsDirPath,
|
|
134
133
|
schemaContext,
|
|
135
134
|
schemaFilter,
|
|
@@ -159,25 +158,6 @@ ${(0, import_chunk_KRQEFTDT.printFilesFromMigrationIds)("migrations", migrationI
|
|
|
159
158
|
`
|
|
160
159
|
);
|
|
161
160
|
}
|
|
162
|
-
if (!process.env.PRISMA_MIGRATE_SKIP_GENERATE && !args["--skip-generate"]) {
|
|
163
|
-
await migrate.tryToRunGenerate(datasourceInfo);
|
|
164
|
-
}
|
|
165
|
-
if (!process.env.PRISMA_MIGRATE_SKIP_SEED && !args["--skip-seed"]) {
|
|
166
|
-
const seedCommandFromPrismaConfig = config.migrations?.seed;
|
|
167
|
-
const seedCommandFromPkgJson = await (0, import_chunk_PHXLQVPT.getSeedCommandFromPackageJson)(process.cwd());
|
|
168
|
-
const seedCommand = seedCommandFromPrismaConfig ?? seedCommandFromPkgJson;
|
|
169
|
-
if (seedCommand) {
|
|
170
|
-
process.stdout.write("\n");
|
|
171
|
-
const successfulSeeding = await (0, import_chunk_PHXLQVPT.executeSeedCommand)({ commandFromConfig: seedCommand });
|
|
172
|
-
if (successfulSeeding) {
|
|
173
|
-
process.stdout.write(`
|
|
174
|
-
${process.platform === "win32" ? "" : "\u{1F331} "}The seed command has been executed.
|
|
175
|
-
`);
|
|
176
|
-
} else {
|
|
177
|
-
process.exit(1);
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
161
|
return ``;
|
|
182
162
|
}
|
|
183
163
|
help(error) {
|
|
@@ -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_TLHUBVSH_exports = {};
|
|
30
|
+
__export(chunk_TLHUBVSH_exports, {
|
|
31
31
|
getDatabaseVersionSafe: () => getDatabaseVersionSafe
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
34
|
-
var
|
|
33
|
+
module.exports = __toCommonJS(chunk_TLHUBVSH_exports);
|
|
34
|
+
var import_chunk_3MCWUFUJ = require("./chunk-3MCWUFUJ.js");
|
|
35
35
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
36
36
|
var debug = (0, import_debug.default)("prisma:cli");
|
|
37
|
-
async function getDatabaseVersionSafe(args) {
|
|
37
|
+
async function getDatabaseVersionSafe(args, config, configDir) {
|
|
38
38
|
let migrate;
|
|
39
39
|
let dbVersion;
|
|
40
40
|
try {
|
|
41
|
-
migrate = await
|
|
41
|
+
migrate = await import_chunk_3MCWUFUJ.Migrate.setup({ schemaEngineConfig: config, configDir });
|
|
42
42
|
dbVersion = await migrate.engine.getDatabaseVersion(args);
|
|
43
43
|
} catch (e) {
|
|
44
44
|
debug(e);
|
|
@@ -26,16 +26,16 @@ 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_TRUKHPCA_exports = {};
|
|
30
|
+
__export(chunk_TRUKHPCA_exports, {
|
|
31
31
|
DbDrop: () => DbDrop
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_TRUKHPCA_exports);
|
|
34
34
|
var import_chunk_IHDN3L3R = require("./chunk-IHDN3L3R.js");
|
|
35
35
|
var import_chunk_FBDQVK4W = require("./chunk-FBDQVK4W.js");
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
36
|
+
var import_chunk_XGTVKL4L = require("./chunk-XGTVKL4L.js");
|
|
37
|
+
var import_chunk_QOPTDDIH = require("./chunk-QOPTDDIH.js");
|
|
38
|
+
var import_chunk_BRPS327A = require("./chunk-BRPS327A.js");
|
|
39
39
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
40
40
|
var import_internals = require("@prisma/internals");
|
|
41
41
|
var import_prompts = __toESM(require("prompts"));
|
|
@@ -56,6 +56,8 @@ ${(0, import_chunk_SKRR5WT4.bold)("Usage")}
|
|
|
56
56
|
|
|
57
57
|
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db drop [options] --preview-feature
|
|
58
58
|
|
|
59
|
+
The datasource URL configuration is read from the Prisma config file (e.g., ${(0, import_chunk_SKRR5WT4.italic)("prisma.config.ts")}).
|
|
60
|
+
|
|
59
61
|
${(0, import_chunk_SKRR5WT4.bold)("Options")}
|
|
60
62
|
|
|
61
63
|
-h, --help Display this help message
|
|
@@ -74,7 +76,7 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
74
76
|
Use --force to skip the confirmation prompt
|
|
75
77
|
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db drop --preview-feature --force
|
|
76
78
|
`);
|
|
77
|
-
async parse(argv, config) {
|
|
79
|
+
async parse(argv, config, configDir) {
|
|
78
80
|
const args = (0, import_internals.arg)(argv, {
|
|
79
81
|
"--help": Boolean,
|
|
80
82
|
"-h": "--help",
|
|
@@ -94,19 +96,19 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
94
96
|
if (!args["--preview-feature"]) {
|
|
95
97
|
throw new import_chunk_IHDN3L3R.PreviewFlagError();
|
|
96
98
|
}
|
|
97
|
-
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
98
99
|
const schemaContext = await (0, import_internals.loadSchemaContext)({
|
|
99
100
|
schemaPathFromArg: args["--schema"],
|
|
100
|
-
schemaPathFromConfig: config.schema
|
|
101
|
-
schemaEngineConfig: config
|
|
101
|
+
schemaPathFromConfig: config.schema
|
|
102
102
|
});
|
|
103
|
-
|
|
104
|
-
const
|
|
105
|
-
(0,
|
|
103
|
+
const cmd = "db drop";
|
|
104
|
+
const validatedConfig = (0, import_internals.validatePrismaConfigWithDatasource)({ config, cmd });
|
|
105
|
+
(0, import_internals.checkUnsupportedDataProxy)({ cmd, validatedConfig });
|
|
106
|
+
const datasourceInfo = (0, import_chunk_BRPS327A.parseDatasourceInfo)(schemaContext.primaryDatasource, validatedConfig);
|
|
107
|
+
(0, import_chunk_QOPTDDIH.printDatasource)({ datasourceInfo });
|
|
106
108
|
process.stdout.write("\n");
|
|
107
109
|
if (!args["--force"]) {
|
|
108
110
|
if (!(0, import_internals.canPrompt)()) {
|
|
109
|
-
throw new
|
|
111
|
+
throw new import_chunk_XGTVKL4L.DbDropNeedsForceError("drop");
|
|
110
112
|
}
|
|
111
113
|
const confirmation = await (0, import_prompts.default)({
|
|
112
114
|
type: "text",
|
|
@@ -124,7 +126,10 @@ ${(0, import_chunk_SKRR5WT4.red)("All data will be lost")}.`
|
|
|
124
126
|
}
|
|
125
127
|
}
|
|
126
128
|
(0, import_chunk_FBDQVK4W.aiAgentConfirmationCheckpoint)();
|
|
127
|
-
if (
|
|
129
|
+
if (datasourceInfo.url === void 0) {
|
|
130
|
+
throw new Error("Datasource URL is undefined");
|
|
131
|
+
}
|
|
132
|
+
if (await (0, import_internals.dropDatabase)(datasourceInfo.url, configDir)) {
|
|
128
133
|
return `${process.platform === "win32" ? "" : "\u{1F680} "}The ${datasourceInfo.prettyProvider} database "${datasourceInfo.dbName}" from "${datasourceInfo.dbLocation}" was successfully dropped.
|
|
129
134
|
`;
|
|
130
135
|
} else {
|
|
@@ -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_WF7UXKO5_exports = {};
|
|
20
|
+
__export(chunk_WF7UXKO5_exports, {
|
|
21
21
|
DbSeed: () => DbSeed
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_WF7UXKO5_exports);
|
|
24
|
+
var import_chunk_L7EZFBB4 = require("./chunk-L7EZFBB4.js");
|
|
25
25
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
26
26
|
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
|
27
27
|
var import_internals = require("@prisma/internals");
|
|
@@ -213,13 +213,10 @@ ${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db seed -- --arg1 value1 --arg2 va
|
|
|
213
213
|
if (args["--help"]) {
|
|
214
214
|
return this.help();
|
|
215
215
|
}
|
|
216
|
-
|
|
217
|
-
const seedCommandFromPrismaConfig = config.migrations?.seed;
|
|
218
|
-
const seedCommandFromPkgJson = await (0, import_chunk_PHXLQVPT.getSeedCommandFromPackageJson)(process.cwd());
|
|
219
|
-
const seedCommand = seedCommandFromPrismaConfig ?? seedCommandFromPkgJson;
|
|
216
|
+
const seedCommand = config.migrations?.seed;
|
|
220
217
|
if (!seedCommand) return ``;
|
|
221
218
|
const extraArgs = args._.join(" ");
|
|
222
|
-
const successfulSeeding = await (0,
|
|
219
|
+
const successfulSeeding = await (0, import_chunk_L7EZFBB4.executeSeedCommand)({ commandFromConfig: seedCommand, extraArgs });
|
|
223
220
|
if (successfulSeeding) {
|
|
224
221
|
return `
|
|
225
222
|
${process.platform === "win32" ? "" : "\u{1F331} "}The seed command has been executed.`;
|