@prisma/migrate 6.5.0-dev.6 → 6.5.0-dev.60

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.
Files changed (53) hide show
  1. package/dist/CLI.js +2 -2
  2. package/dist/Migrate.js +3 -3
  3. package/dist/SchemaEngine.js +3 -3
  4. package/dist/bin.js +35 -35
  5. package/dist/{chunk-CHBE43L6.js → chunk-3V3ZGR72.js} +464 -1335
  6. package/dist/{chunk-J77IRNPE.js → chunk-5VDXAE53.js} +45 -31
  7. package/dist/{chunk-PSYS5XVH.js → chunk-A4BCLP6K.js} +23 -32
  8. package/dist/{chunk-CTPONE6G.js → chunk-DLLXDCI2.js} +6 -3
  9. package/dist/{chunk-4EV2RVXY.js → chunk-E7OXHCDR.js} +31 -37
  10. package/dist/{chunk-73OPZA7N.js → chunk-EGPJABTW.js} +136 -81
  11. package/dist/{chunk-TM3ETZES.js → chunk-EX2UWGES.js} +11 -10
  12. package/dist/{chunk-FRTPDRF2.js → chunk-G2XUUMKH.js} +5 -5
  13. package/dist/{chunk-6DFJIBJX.js → chunk-GKDFIHM2.js} +3 -3
  14. package/dist/{chunk-2NMFKGXM.js → chunk-IR55GBON.js} +5 -5
  15. package/dist/{chunk-DDHPSYC4.js → chunk-KXMACMQC.js} +9 -6
  16. package/dist/{chunk-I4EY55DC.js → chunk-LZOZZRHB.js} +10 -9
  17. package/dist/{chunk-4JQIX6O7.js → chunk-MKK3GSDF.js} +5 -5
  18. package/dist/{chunk-D74DU52C.js → chunk-QBA7W2BT.js} +463 -1334
  19. package/dist/{chunk-LVLRGTYH.js → chunk-TPJISPJ5.js} +10 -9
  20. package/dist/{chunk-YZVZCC3I.js → chunk-V5TUSOJX.js} +8 -7
  21. package/dist/{chunk-WNH2ACJS.js → chunk-VVKOFN3Y.js} +6 -5
  22. package/dist/{chunk-QTAIWPLH.js → chunk-VZ23KD5C.js} +5 -4
  23. package/dist/{chunk-HIFVDK2U.js → chunk-W2SZNLK4.js} +6 -5
  24. package/dist/{chunk-WLPX3672.js → chunk-X5N72JHI.js} +8 -7
  25. package/dist/{chunk-RQFGRXJI.js → chunk-X6KW7BYP.js} +10 -9
  26. package/dist/{chunk-XRTNIFND.js → chunk-YYPMC5FN.js} +203 -108
  27. package/dist/{chunk-ORL3LJOT.js → chunk-ZOEKRXDP.js} +16 -7
  28. package/dist/{chunk-J5FHVALZ.js → chunk-ZQ3OWSVS.js} +10 -9
  29. package/dist/commands/DbCommand.js +2 -2
  30. package/dist/commands/DbDrop.js +3 -3
  31. package/dist/commands/DbExecute.js +4 -4
  32. package/dist/commands/DbPull.js +3 -3
  33. package/dist/commands/DbPush.js +5 -5
  34. package/dist/commands/DbSeed.js +2 -2
  35. package/dist/commands/MigrateCommand.js +2 -2
  36. package/dist/commands/MigrateDeploy.js +5 -5
  37. package/dist/commands/MigrateDev.js +5 -5
  38. package/dist/commands/MigrateDiff.js +6 -6
  39. package/dist/commands/MigrateReset.js +5 -5
  40. package/dist/commands/MigrateResolve.js +5 -5
  41. package/dist/commands/MigrateStatus.js +5 -5
  42. package/dist/index.js +39 -39
  43. package/dist/internals/src/errorReporting.d.ts +1 -0
  44. package/dist/utils/captureStdout.js +2 -2
  45. package/dist/utils/getDatabaseVersionSafe.js +3 -3
  46. package/dist/utils/getSchemaPathAndPrint.js +3 -3
  47. package/dist/utils/introspectSql.js +3 -3
  48. package/dist/utils/setupCockroach.js +2 -2
  49. package/dist/utils/setupMSSQL.js +13 -13
  50. package/dist/utils/setupMongo.js +3 -3
  51. package/dist/utils/setupMysql.js +231 -99
  52. package/dist/utils/setupPostgres.js +2 -2
  53. package/package.json +14 -14
@@ -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 chunk_J77IRNPE_exports = {};
20
- __export(chunk_J77IRNPE_exports, {
19
+ var chunk_5VDXAE53_exports = {};
20
+ __export(chunk_5VDXAE53_exports, {
21
21
  require_ms: () => require_ms,
22
22
  require_src: () => require_src
23
23
  });
24
- module.exports = __toCommonJS(chunk_J77IRNPE_exports);
24
+ module.exports = __toCommonJS(chunk_5VDXAE53_exports);
25
25
  var import_chunk_RM5LJIEV = require("./chunk-RM5LJIEV.js");
26
26
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
27
27
  var require_ms = (0, import_chunk_WWAWV7DQ.__commonJS)({
@@ -140,7 +140,7 @@ var require_ms = (0, import_chunk_WWAWV7DQ.__commonJS)({
140
140
  }
141
141
  });
142
142
  var require_common = (0, import_chunk_WWAWV7DQ.__commonJS)({
143
- "../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/common.js"(exports, module2) {
143
+ "../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/common.js"(exports, module2) {
144
144
  "use strict";
145
145
  function setup(env) {
146
146
  createDebug.debug = createDebug;
@@ -242,50 +242,64 @@ var require_common = (0, import_chunk_WWAWV7DQ.__commonJS)({
242
242
  createDebug.namespaces = namespaces;
243
243
  createDebug.names = [];
244
244
  createDebug.skips = [];
245
- let i;
246
- const split = (typeof namespaces === "string" ? namespaces : "").split(/[\s,]+/);
247
- const len = split.length;
248
- for (i = 0; i < len; i++) {
249
- if (!split[i]) {
250
- continue;
245
+ const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(" ", ",").split(",").filter(Boolean);
246
+ for (const ns of split) {
247
+ if (ns[0] === "-") {
248
+ createDebug.skips.push(ns.slice(1));
249
+ } else {
250
+ createDebug.names.push(ns);
251
251
  }
252
- namespaces = split[i].replace(/\*/g, ".*?");
253
- if (namespaces[0] === "-") {
254
- createDebug.skips.push(new RegExp("^" + namespaces.slice(1) + "$"));
252
+ }
253
+ }
254
+ function matchesTemplate(search, template) {
255
+ let searchIndex = 0;
256
+ let templateIndex = 0;
257
+ let starIndex = -1;
258
+ let matchIndex = 0;
259
+ while (searchIndex < search.length) {
260
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
261
+ if (template[templateIndex] === "*") {
262
+ starIndex = templateIndex;
263
+ matchIndex = searchIndex;
264
+ templateIndex++;
265
+ } else {
266
+ searchIndex++;
267
+ templateIndex++;
268
+ }
269
+ } else if (starIndex !== -1) {
270
+ templateIndex = starIndex + 1;
271
+ matchIndex++;
272
+ searchIndex = matchIndex;
255
273
  } else {
256
- createDebug.names.push(new RegExp("^" + namespaces + "$"));
274
+ return false;
257
275
  }
258
276
  }
277
+ while (templateIndex < template.length && template[templateIndex] === "*") {
278
+ templateIndex++;
279
+ }
280
+ return templateIndex === template.length;
259
281
  }
260
282
  function disable() {
261
283
  const namespaces = [
262
- ...createDebug.names.map(toNamespace),
263
- ...createDebug.skips.map(toNamespace).map((namespace) => "-" + namespace)
284
+ ...createDebug.names,
285
+ ...createDebug.skips.map((namespace) => "-" + namespace)
264
286
  ].join(",");
265
287
  createDebug.enable("");
266
288
  return namespaces;
267
289
  }
268
290
  function enabled(name) {
269
- if (name[name.length - 1] === "*") {
270
- return true;
271
- }
272
- let i;
273
- let len;
274
- for (i = 0, len = createDebug.skips.length; i < len; i++) {
275
- if (createDebug.skips[i].test(name)) {
291
+ for (const skip of createDebug.skips) {
292
+ if (matchesTemplate(name, skip)) {
276
293
  return false;
277
294
  }
278
295
  }
279
- for (i = 0, len = createDebug.names.length; i < len; i++) {
280
- if (createDebug.names[i].test(name)) {
296
+ for (const ns of createDebug.names) {
297
+ if (matchesTemplate(name, ns)) {
281
298
  return true;
282
299
  }
283
300
  }
284
301
  return false;
285
302
  }
286
- function toNamespace(regexp) {
287
- return regexp.toString().substring(2, regexp.toString().length - 2).replace(/\.\*\?$/, "*");
288
- }
289
303
  function coerce(val) {
290
304
  if (val instanceof Error) {
291
305
  return val.stack || val.message;
@@ -302,7 +316,7 @@ var require_common = (0, import_chunk_WWAWV7DQ.__commonJS)({
302
316
  }
303
317
  });
304
318
  var require_browser = (0, import_chunk_WWAWV7DQ.__commonJS)({
305
- "../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/browser.js"(exports, module2) {
319
+ "../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/browser.js"(exports, module2) {
306
320
  "use strict";
307
321
  exports.formatArgs = formatArgs;
308
322
  exports.save = save;
@@ -583,7 +597,7 @@ var require_supports_color = (0, import_chunk_WWAWV7DQ.__commonJS)({
583
597
  }
584
598
  });
585
599
  var require_node = (0, import_chunk_WWAWV7DQ.__commonJS)({
586
- "../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/node.js"(exports, module2) {
600
+ "../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/node.js"(exports, module2) {
587
601
  "use strict";
588
602
  var tty = (0, import_chunk_WWAWV7DQ.__require)("tty");
589
603
  var util = (0, import_chunk_WWAWV7DQ.__require)("util");
@@ -756,7 +770,7 @@ var require_node = (0, import_chunk_WWAWV7DQ.__commonJS)({
756
770
  }
757
771
  });
758
772
  var require_src = (0, import_chunk_WWAWV7DQ.__commonJS)({
759
- "../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/index.js"(exports, module2) {
773
+ "../../node_modules/.pnpm/debug@4.4.0/node_modules/debug/src/index.js"(exports, module2) {
760
774
  "use strict";
761
775
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
762
776
  module2.exports = require_browser();
@@ -26,22 +26,23 @@ 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 chunk_PSYS5XVH_exports = {};
30
- __export(chunk_PSYS5XVH_exports, {
29
+ var chunk_A4BCLP6K_exports = {};
30
+ __export(chunk_A4BCLP6K_exports, {
31
31
  MigrateDev: () => MigrateDev
32
32
  });
33
- module.exports = __toCommonJS(chunk_PSYS5XVH_exports);
33
+ module.exports = __toCommonJS(chunk_A4BCLP6K_exports);
34
34
  var import_chunk_OCQGHQED = require("./chunk-OCQGHQED.js");
35
35
  var import_chunk_7CQBDP4H = require("./chunk-7CQBDP4H.js");
36
36
  var import_chunk_V3ZMNXZC = require("./chunk-V3ZMNXZC.js");
37
37
  var import_chunk_255BRND3 = require("./chunk-255BRND3.js");
38
38
  var import_chunk_UP6FVCDK = require("./chunk-UP6FVCDK.js");
39
- var import_chunk_DDHPSYC4 = require("./chunk-DDHPSYC4.js");
39
+ var import_chunk_KXMACMQC = require("./chunk-KXMACMQC.js");
40
40
  var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
41
- var import_chunk_6DFJIBJX = require("./chunk-6DFJIBJX.js");
41
+ var import_chunk_GKDFIHM2 = require("./chunk-GKDFIHM2.js");
42
42
  var import_chunk_QOPTDDIH = require("./chunk-QOPTDDIH.js");
43
43
  var import_chunk_DJMFXNR4 = require("./chunk-DJMFXNR4.js");
44
44
  var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
45
+ var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
45
46
  var import_debug = __toESM(require("@prisma/debug"));
46
47
  var import_internals = require("@prisma/internals");
47
48
  var import_prompts = __toESM(require("prompts"));
@@ -63,8 +64,7 @@ var _MigrateDev = class _MigrateDev2 {
63
64
  "--config": String,
64
65
  "--skip-generate": Boolean,
65
66
  "--skip-seed": Boolean,
66
- "--telemetry-information": String,
67
- "--allow-reset": Boolean
67
+ "--telemetry-information": String
68
68
  });
69
69
  if ((0, import_internals.isError)(args)) {
70
70
  return this.help(args.message);
@@ -74,7 +74,7 @@ var _MigrateDev = class _MigrateDev2 {
74
74
  return this.help();
75
75
  }
76
76
  await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
77
- const { schemaPath, schemas } = await (0, import_chunk_6DFJIBJX.getSchemaPathAndPrint)(args["--schema"], config.schema);
77
+ const { schemaPath, schemas } = await (0, import_chunk_GKDFIHM2.getSchemaPathAndPrint)(args["--schema"], config.schema);
78
78
  const datasourceInfo = await (0, import_chunk_DJMFXNR4.getDatasourceInfo)({ schemaPath });
79
79
  (0, import_chunk_QOPTDDIH.printDatasource)({ datasourceInfo });
80
80
  process.stdout.write("\n");
@@ -89,7 +89,7 @@ var _MigrateDev = class _MigrateDev2 {
89
89
  if (wasDbCreated) {
90
90
  process.stdout.write(wasDbCreated + "\n\n");
91
91
  }
92
- const migrate = new import_chunk_DDHPSYC4.Migrate(schemaPath);
92
+ const migrate = new import_chunk_KXMACMQC.Migrate(schemaPath);
93
93
  let devDiagnostic;
94
94
  try {
95
95
  devDiagnostic = await migrate.devDiagnostic();
@@ -104,22 +104,14 @@ var _MigrateDev = class _MigrateDev2 {
104
104
  datasourceInfo,
105
105
  reason: devDiagnostic.action.reason
106
106
  });
107
- if (!args["--allow-reset"]) {
108
- process.stdout.write(
109
- `
110
- You may use --allow-reset to drop the database. ${(0, import_chunk_SKRR5WT4.bold)((0, import_chunk_SKRR5WT4.red)("All data will be lost."))}
107
+ process.stdout.write(
108
+ `
109
+ You may use ${(0, import_chunk_SKRR5WT4.red)("prisma migrate reset")} to drop the development database.
110
+ ${(0, import_chunk_SKRR5WT4.bold)((0, import_chunk_SKRR5WT4.red)("All data will be lost."))}
111
111
  `
112
- );
113
- migrate.stop();
114
- process.exit(130);
115
- }
116
- process.stdout.write("\nReceived --allow-reset, dropping the database. All data is lost.\n\n");
117
- try {
118
- await migrate.reset();
119
- } catch (e) {
120
- migrate.stop();
121
- throw e;
122
- }
112
+ );
113
+ migrate.stop();
114
+ process.exit(130);
123
115
  }
124
116
  try {
125
117
  const { appliedMigrationNames } = await migrate.applyMigrations();
@@ -160,10 +152,6 @@ ${(0, import_chunk_255BRND3.printFilesFromMigrationIds)(
160
152
  throw new Error(unexecutableStepsError);
161
153
  }
162
154
  if (evaluateDataLossResult.warnings && evaluateDataLossResult.warnings.length > 0) {
163
- if (!(0, import_internals.canPrompt)()) {
164
- migrate.stop();
165
- throw new import_chunk_3WC4XD74.MigrateDevEnvNonInteractiveError();
166
- }
167
155
  process.stdout.write((0, import_chunk_SKRR5WT4.bold)(`
168
156
  \u26A0\uFE0F Warnings for the current datasource:
169
157
 
@@ -174,6 +162,10 @@ ${(0, import_chunk_255BRND3.printFilesFromMigrationIds)(
174
162
  }
175
163
  process.stdout.write("\n");
176
164
  if (!args["--force"]) {
165
+ if (!(0, import_internals.canPrompt)()) {
166
+ migrate.stop();
167
+ throw new import_chunk_3WC4XD74.MigrateDevEnvNonInteractiveError();
168
+ }
177
169
  const message = args["--create-only"] ? "Are you sure you want to create this migration?" : "Are you sure you want to create and apply this migration?";
178
170
  const confirmation = await (0, import_prompts.default)({
179
171
  type: "confirm",
@@ -250,7 +242,7 @@ ${(0, import_chunk_SKRR5WT4.green)("Your database is now in sync with your schem
250
242
  await migrate.tryToRunGenerate(datasourceInfo);
251
243
  process.stdout.write("\n");
252
244
  }
253
- if ((wasDbCreated || devDiagnostic.action.tag === "reset") && !process.env.PRISMA_MIGRATE_SKIP_SEED && !args["--skip-seed"]) {
245
+ if (wasDbCreated && !process.env.PRISMA_MIGRATE_SKIP_SEED && !args["--skip-seed"]) {
254
246
  try {
255
247
  const seedCommandFromPkgJson = await (0, import_chunk_V3ZMNXZC.getSeedCommandFromPackageJson)(process.cwd());
256
248
  if (seedCommandFromPkgJson) {
@@ -302,7 +294,7 @@ ${_MigrateDev2.help}`);
302
294
  return _MigrateDev2.help;
303
295
  }
304
296
  };
305
- _MigrateDev.help = (0, import_internals.format)(`
297
+ (0, import_chunk_WWAWV7DQ.__publicField)(_MigrateDev, "help", (0, import_internals.format)(`
306
298
  ${process.platform === "win32" ? "" : "\u{1F3CB}\uFE0F "}Create a migration from changes in Prisma schema, apply it to the database, trigger generators (e.g. Prisma Client)
307
299
 
308
300
  ${(0, import_chunk_SKRR5WT4.bold)("Usage")}
@@ -319,7 +311,6 @@ ${(0, import_chunk_SKRR5WT4.bold)("Options")}
319
311
  The migration will be empty if there are no changes in Prisma schema
320
312
  --skip-generate Skip triggering generators (e.g. Prisma Client)
321
313
  --skip-seed Skip triggering seed
322
- --allow-reset Allow resetting the database on incompatible schema change (accept data loss)
323
314
 
324
315
  ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
325
316
 
@@ -331,5 +322,5 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
331
322
 
332
323
  Create a migration without applying it
333
324
  ${(0, import_chunk_SKRR5WT4.dim)("$")} prisma migrate dev --create-only
334
- `);
325
+ `));
335
326
  var MigrateDev = _MigrateDev;
@@ -16,13 +16,16 @@ 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 chunk_CTPONE6G_exports = {};
20
- __export(chunk_CTPONE6G_exports, {
19
+ var chunk_DLLXDCI2_exports = {};
20
+ __export(chunk_DLLXDCI2_exports, {
21
21
  CaptureStdout: () => CaptureStdout
22
22
  });
23
- module.exports = __toCommonJS(chunk_CTPONE6G_exports);
23
+ module.exports = __toCommonJS(chunk_DLLXDCI2_exports);
24
+ var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
24
25
  var CaptureStdout = class {
25
26
  constructor() {
27
+ (0, import_chunk_WWAWV7DQ.__publicField)(this, "_capturedText");
28
+ (0, import_chunk_WWAWV7DQ.__publicField)(this, "_orig_stdout_write");
26
29
  this._capturedText = [];
27
30
  this._orig_stdout_write = null;
28
31
  }
@@ -26,47 +26,41 @@ 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 chunk_4EV2RVXY_exports = {};
30
- __export(chunk_4EV2RVXY_exports, {
29
+ var chunk_E7OXHCDR_exports = {};
30
+ __export(chunk_E7OXHCDR_exports, {
31
31
  DbExecute: () => DbExecute
32
32
  });
33
- module.exports = __toCommonJS(chunk_4EV2RVXY_exports);
34
- var import_chunk_DDHPSYC4 = require("./chunk-DDHPSYC4.js");
33
+ module.exports = __toCommonJS(chunk_E7OXHCDR_exports);
34
+ var import_chunk_KXMACMQC = require("./chunk-KXMACMQC.js");
35
35
  var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
36
36
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
37
37
  var import_internals = require("@prisma/internals");
38
38
  var import_fs = __toESM(require("fs"));
39
39
  var import_path = __toESM(require("path"));
40
- var require_get_stdin = (0, import_chunk_WWAWV7DQ.__commonJS)({
41
- "../../node_modules/.pnpm/get-stdin@8.0.0/node_modules/get-stdin/index.js"(exports, module2) {
42
- "use strict";
43
- var { stdin } = process;
44
- module2.exports = async () => {
45
- let result = "";
46
- if (stdin.isTTY) {
47
- return result;
48
- }
49
- stdin.setEncoding("utf8");
50
- for await (const chunk of stdin) {
51
- result += chunk;
52
- }
53
- return result;
54
- };
55
- module2.exports.buffer = async () => {
56
- const result = [];
57
- let length = 0;
58
- if (stdin.isTTY) {
59
- return Buffer.concat([]);
60
- }
61
- for await (const chunk of stdin) {
62
- result.push(chunk);
63
- length += chunk.length;
64
- }
65
- return Buffer.concat(result, length);
66
- };
40
+ var { stdin } = process;
41
+ async function getStdin() {
42
+ let result = "";
43
+ if (stdin.isTTY) {
44
+ return result;
67
45
  }
68
- });
69
- var import_get_stdin = (0, import_chunk_WWAWV7DQ.__toESM)(require_get_stdin());
46
+ stdin.setEncoding("utf8");
47
+ for await (const chunk of stdin) {
48
+ result += chunk;
49
+ }
50
+ return result;
51
+ }
52
+ getStdin.buffer = async () => {
53
+ const result = [];
54
+ let length = 0;
55
+ if (stdin.isTTY) {
56
+ return Buffer.concat([]);
57
+ }
58
+ for await (const chunk of stdin) {
59
+ result.push(chunk);
60
+ length += chunk.length;
61
+ }
62
+ return Buffer.concat(result, length);
63
+ };
70
64
  var helpOptions = (0, import_internals.format)(
71
65
  `${(0, import_chunk_SKRR5WT4.bold)("Usage")}
72
66
 
@@ -151,7 +145,7 @@ See \`${(0, import_chunk_SKRR5WT4.green)((0, import_internals.getCommandWithExec
151
145
  }
152
146
  }
153
147
  if (args["--stdin"]) {
154
- script = await (0, import_get_stdin.default)();
148
+ script = await getStdin();
155
149
  }
156
150
  let datasourceType;
157
151
  if (args["--url"]) {
@@ -167,7 +161,7 @@ See \`${(0, import_chunk_SKRR5WT4.green)((0, import_internals.getCommandWithExec
167
161
  ...(0, import_internals.toSchemasWithConfigDir)(schemaWithPath, engineConfig)
168
162
  };
169
163
  }
170
- const migrate = new import_chunk_DDHPSYC4.Migrate();
164
+ const migrate = new import_chunk_KXMACMQC.Migrate();
171
165
  try {
172
166
  await migrate.engine.dbExecute({
173
167
  script,
@@ -188,7 +182,7 @@ ${helpOptions}`);
188
182
  return _DbExecute2.help;
189
183
  }
190
184
  };
191
- _DbExecute.help = (0, import_internals.format)(`
185
+ (0, import_chunk_WWAWV7DQ.__publicField)(_DbExecute, "help", (0, import_internals.format)(`
192
186
  ${process.platform === "win32" ? "" : "\u{1F4DD} "}Execute native commands to your database
193
187
 
194
188
  This command takes as input a datasource, using ${(0, import_chunk_SKRR5WT4.green)(`--url`)} or ${(0, import_chunk_SKRR5WT4.green)(`--schema`)} and a script, using ${(0, import_chunk_SKRR5WT4.green)(
@@ -222,5 +216,5 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
222
216
  prisma db execute \\
223
217
  --stdin \\
224
218
  --url="mysql://root:root@localhost/mydb"
225
- `);
219
+ `));
226
220
  var DbExecute = _DbExecute;