@prisma/migrate 6.6.0-dev.2 → 6.6.0-dev.20

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 (40) hide show
  1. package/dist/Migrate.js +3 -4
  2. package/dist/bin.js +25 -28
  3. package/dist/{chunk-X6KW7BYP.js → chunk-2VSCT73F.js} +9 -9
  4. package/dist/{chunk-EX2UWGES.js → chunk-3OQIC7NW.js} +6 -6
  5. package/dist/chunk-3VFKYWQZ.js +486 -0
  6. package/dist/chunk-4ZFVT4RS.js +2590 -0
  7. package/dist/{chunk-5VDXAE53.js → chunk-5PSO7BDO.js} +15 -5
  8. package/dist/{chunk-Q7M5ANIE.js → chunk-BC7TR6DY.js} +9 -9
  9. package/dist/{chunk-ZQ3OWSVS.js → chunk-DAYMMAJB.js} +5 -5
  10. package/dist/{chunk-A4BCLP6K.js → chunk-DNOOU7FC.js} +9 -9
  11. package/dist/{chunk-X5N72JHI.js → chunk-IY67YUOD.js} +5 -5
  12. package/dist/{chunk-E7OXHCDR.js → chunk-MREGRQDD.js} +5 -5
  13. package/dist/chunk-N5UBDQRA.js +846 -0
  14. package/dist/{chunk-LZOZZRHB.js → chunk-NAXFX7K7.js} +5 -5
  15. package/dist/{chunk-AYOOPD2C.js → chunk-NJQFJTGG.js} +10 -10
  16. package/dist/{chunk-TPJISPJ5.js → chunk-PW3LNSDM.js} +5 -5
  17. package/dist/{chunk-G2XUUMKH.js → chunk-UKVQP5ES.js} +7 -7
  18. package/dist/{chunk-V3ZMNXZC.js → chunk-WG2SP5KE.js} +248 -6
  19. package/dist/commands/DbExecute.js +4 -5
  20. package/dist/commands/DbPull.js +4 -7
  21. package/dist/commands/DbPush.js +4 -5
  22. package/dist/commands/DbSeed.js +3 -4
  23. package/dist/commands/MigrateDeploy.js +4 -5
  24. package/dist/commands/MigrateDev.js +5 -6
  25. package/dist/commands/MigrateDiff.js +4 -5
  26. package/dist/commands/MigrateReset.js +5 -6
  27. package/dist/commands/MigrateResolve.js +4 -5
  28. package/dist/commands/MigrateStatus.js +4 -5
  29. package/dist/index.js +25 -28
  30. package/dist/utils/seed.js +5 -6
  31. package/dist/utils/setupMSSQL.js +123 -21
  32. package/dist/utils/setupMongo.js +3 -4
  33. package/dist/utils/spinner.js +3 -6
  34. package/package.json +10 -10
  35. package/dist/chunk-6C7ESGWY.js +0 -1184
  36. package/dist/chunk-DIAO4W7O.js +0 -5774
  37. package/dist/chunk-J46BJQHT.js +0 -268
  38. package/dist/chunk-KXMACMQC.js +0 -660
  39. package/dist/chunk-RM5LJIEV.js +0 -35
  40. package/dist/chunk-YUCPBDWV.js +0 -131
@@ -16,13 +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_5VDXAE53_exports = {};
20
- __export(chunk_5VDXAE53_exports, {
19
+ var chunk_5PSO7BDO_exports = {};
20
+ __export(chunk_5PSO7BDO_exports, {
21
21
  require_ms: () => require_ms,
22
22
  require_src: () => require_src
23
23
  });
24
- module.exports = __toCommonJS(chunk_5VDXAE53_exports);
25
- var import_chunk_RM5LJIEV = require("./chunk-RM5LJIEV.js");
24
+ module.exports = __toCommonJS(chunk_5PSO7BDO_exports);
26
25
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
27
26
  var require_ms = (0, import_chunk_WWAWV7DQ.__commonJS)({
28
27
  "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports, module2) {
@@ -484,12 +483,23 @@ var require_browser = (0, import_chunk_WWAWV7DQ.__commonJS)({
484
483
  };
485
484
  }
486
485
  });
486
+ var require_has_flag = (0, import_chunk_WWAWV7DQ.__commonJS)({
487
+ "../../node_modules/.pnpm/has-flag@4.0.0/node_modules/has-flag/index.js"(exports, module2) {
488
+ "use strict";
489
+ module2.exports = (flag, argv = process.argv) => {
490
+ const prefix = flag.startsWith("-") ? "" : flag.length === 1 ? "-" : "--";
491
+ const position = argv.indexOf(prefix + flag);
492
+ const terminatorPosition = argv.indexOf("--");
493
+ return position !== -1 && (terminatorPosition === -1 || position < terminatorPosition);
494
+ };
495
+ }
496
+ });
487
497
  var require_supports_color = (0, import_chunk_WWAWV7DQ.__commonJS)({
488
498
  "../../node_modules/.pnpm/supports-color@8.1.1/node_modules/supports-color/index.js"(exports, module2) {
489
499
  "use strict";
490
500
  var os = (0, import_chunk_WWAWV7DQ.__require)("os");
491
501
  var tty = (0, import_chunk_WWAWV7DQ.__require)("tty");
492
- var hasFlag = (0, import_chunk_RM5LJIEV.require_has_flag)();
502
+ var hasFlag = require_has_flag();
493
503
  var { env } = process;
494
504
  var flagForceColor;
495
505
  if (hasFlag("no-color") || hasFlag("no-colors") || hasFlag("color=false") || hasFlag("color=never")) {
@@ -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 chunk_Q7M5ANIE_exports = {};
30
- __export(chunk_Q7M5ANIE_exports, {
29
+ var chunk_BC7TR6DY_exports = {};
30
+ __export(chunk_BC7TR6DY_exports, {
31
31
  MigrateDiff: () => MigrateDiff
32
32
  });
33
- module.exports = __toCommonJS(chunk_Q7M5ANIE_exports);
33
+ module.exports = __toCommonJS(chunk_BC7TR6DY_exports);
34
34
  var import_chunk_A6PMXMMT = require("./chunk-A6PMXMMT.js");
35
35
  var import_chunk_YYPMC5FN = require("./chunk-YYPMC5FN.js");
36
36
  var import_chunk_DLLXDCI2 = require("./chunk-DLLXDCI2.js");
37
- var import_chunk_KXMACMQC = require("./chunk-KXMACMQC.js");
37
+ var import_chunk_N5UBDQRA = require("./chunk-N5UBDQRA.js");
38
38
  var import_chunk_MATFO4ZW = require("./chunk-MATFO4ZW.js");
39
39
  var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
40
40
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
@@ -10300,7 +10300,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
10300
10300
  "cli-truncate": "4.0.0",
10301
10301
  dotenv: "16.4.7",
10302
10302
  esbuild: "0.24.2",
10303
- "escape-string-regexp": "4.0.0",
10303
+ "escape-string-regexp": "5.0.0",
10304
10304
  execa: "5.1.1",
10305
10305
  "fast-glob": "3.3.3",
10306
10306
  "find-up": "7.0.0",
@@ -10324,9 +10324,9 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
10324
10324
  "p-map": "4.0.0",
10325
10325
  "read-package-up": "11.0.0",
10326
10326
  resolve: "1.22.10",
10327
- "string-width": "4.2.3",
10327
+ "string-width": "7.2.0",
10328
10328
  "strip-ansi": "6.0.1",
10329
- "strip-indent": "3.0.0",
10329
+ "strip-indent": "4.0.0",
10330
10330
  "temp-dir": "2.0.0",
10331
10331
  tempy: "1.0.1",
10332
10332
  "terminal-link": "2.1.1",
@@ -10344,7 +10344,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
10344
10344
  "@prisma/fetch-engine": "workspace:*",
10345
10345
  "@prisma/generator-helper": "workspace:*",
10346
10346
  "@prisma/get-platform": "workspace:*",
10347
- "@prisma/prisma-schema-wasm": "6.5.0-73.173f8d54f8d52e692c7e27e72a88314ec7aeff60",
10347
+ "@prisma/prisma-schema-wasm": "6.6.0-12.c30faa9515db5aee8774c0a87c7f95df91253fa9",
10348
10348
  "@prisma/schema-files-loader": "workspace:*",
10349
10349
  arg: "5.0.2",
10350
10350
  prompts: "2.4.2"
@@ -11335,7 +11335,7 @@ var _MigrateDiff = class _MigrateDiff2 {
11335
11335
  url: `file:${d1Database}`
11336
11336
  };
11337
11337
  }
11338
- const migrate = new import_chunk_KXMACMQC.Migrate();
11338
+ const migrate = new import_chunk_N5UBDQRA.Migrate();
11339
11339
  const captureStdout = new import_chunk_DLLXDCI2.CaptureStdout();
11340
11340
  const outputPath = args["--output"];
11341
11341
  const isOutputDefined = Boolean(outputPath);
@@ -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 chunk_ZQ3OWSVS_exports = {};
30
- __export(chunk_ZQ3OWSVS_exports, {
29
+ var chunk_DAYMMAJB_exports = {};
30
+ __export(chunk_DAYMMAJB_exports, {
31
31
  DbPush: () => DbPush
32
32
  });
33
- module.exports = __toCommonJS(chunk_ZQ3OWSVS_exports);
34
- var import_chunk_KXMACMQC = require("./chunk-KXMACMQC.js");
33
+ module.exports = __toCommonJS(chunk_DAYMMAJB_exports);
34
+ var import_chunk_N5UBDQRA = require("./chunk-N5UBDQRA.js");
35
35
  var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
36
36
  var import_chunk_GKDFIHM2 = require("./chunk-GKDFIHM2.js");
37
37
  var import_chunk_QOPTDDIH = require("./chunk-QOPTDDIH.js");
@@ -70,7 +70,7 @@ var _DbPush = class _DbPush2 {
70
70
  const { schemaPath } = await (0, import_chunk_GKDFIHM2.getSchemaPathAndPrint)(args["--schema"], config.schema);
71
71
  const datasourceInfo = await (0, import_chunk_DJMFXNR4.getDatasourceInfo)({ schemaPath });
72
72
  (0, import_chunk_QOPTDDIH.printDatasource)({ datasourceInfo });
73
- const migrate = new import_chunk_KXMACMQC.Migrate(schemaPath);
73
+ const migrate = new import_chunk_N5UBDQRA.Migrate(schemaPath);
74
74
  try {
75
75
  const wasDbCreated = await (0, import_chunk_DJMFXNR4.ensureDatabaseExists)("push", schemaPath);
76
76
  if (wasDbCreated) {
@@ -26,17 +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 chunk_A4BCLP6K_exports = {};
30
- __export(chunk_A4BCLP6K_exports, {
29
+ var chunk_DNOOU7FC_exports = {};
30
+ __export(chunk_DNOOU7FC_exports, {
31
31
  MigrateDev: () => MigrateDev
32
32
  });
33
- module.exports = __toCommonJS(chunk_A4BCLP6K_exports);
33
+ module.exports = __toCommonJS(chunk_DNOOU7FC_exports);
34
34
  var import_chunk_OCQGHQED = require("./chunk-OCQGHQED.js");
35
35
  var import_chunk_7CQBDP4H = require("./chunk-7CQBDP4H.js");
36
- var import_chunk_V3ZMNXZC = require("./chunk-V3ZMNXZC.js");
36
+ var import_chunk_WG2SP5KE = require("./chunk-WG2SP5KE.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_KXMACMQC = require("./chunk-KXMACMQC.js");
39
+ var import_chunk_N5UBDQRA = require("./chunk-N5UBDQRA.js");
40
40
  var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
41
41
  var import_chunk_GKDFIHM2 = require("./chunk-GKDFIHM2.js");
42
42
  var import_chunk_QOPTDDIH = require("./chunk-QOPTDDIH.js");
@@ -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_KXMACMQC.Migrate(schemaPath);
92
+ const migrate = new import_chunk_N5UBDQRA.Migrate(schemaPath);
93
93
  let devDiagnostic;
94
94
  try {
95
95
  devDiagnostic = await migrate.devDiagnostic();
@@ -244,10 +244,10 @@ ${(0, import_chunk_SKRR5WT4.green)("Your database is now in sync with your schem
244
244
  }
245
245
  if (wasDbCreated && !process.env.PRISMA_MIGRATE_SKIP_SEED && !args["--skip-seed"]) {
246
246
  try {
247
- const seedCommandFromPkgJson = await (0, import_chunk_V3ZMNXZC.getSeedCommandFromPackageJson)(process.cwd());
247
+ const seedCommandFromPkgJson = await (0, import_chunk_WG2SP5KE.getSeedCommandFromPackageJson)(process.cwd());
248
248
  if (seedCommandFromPkgJson) {
249
249
  process.stdout.write("\n");
250
- const successfulSeeding = await (0, import_chunk_V3ZMNXZC.executeSeedCommand)({ commandFromConfig: seedCommandFromPkgJson });
250
+ const successfulSeeding = await (0, import_chunk_WG2SP5KE.executeSeedCommand)({ commandFromConfig: seedCommandFromPkgJson });
251
251
  if (successfulSeeding) {
252
252
  process.stdout.write(`
253
253
  ${process.platform === "win32" ? "" : "\u{1F331} "}The seed command has been executed.
@@ -257,7 +257,7 @@ ${process.platform === "win32" ? "" : "\u{1F331} "}The seed command has been ex
257
257
  }
258
258
  } else {
259
259
  const { schemaPath: schemaPath2 } = await (0, import_internals.getSchemaWithPath)(args["--schema"], config.schema);
260
- await (0, import_chunk_V3ZMNXZC.verifySeedConfigAndReturnMessage)(schemaPath2);
260
+ await (0, import_chunk_WG2SP5KE.verifySeedConfigAndReturnMessage)(schemaPath2);
261
261
  }
262
262
  } catch (e) {
263
263
  console.error(e);
@@ -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 chunk_X5N72JHI_exports = {};
30
- __export(chunk_X5N72JHI_exports, {
29
+ var chunk_IY67YUOD_exports = {};
30
+ __export(chunk_IY67YUOD_exports, {
31
31
  DbPull: () => DbPull
32
32
  });
33
- module.exports = __toCommonJS(chunk_X5N72JHI_exports);
34
- var import_chunk_DIAO4W7O = require("./chunk-DIAO4W7O.js");
33
+ module.exports = __toCommonJS(chunk_IY67YUOD_exports);
34
+ var import_chunk_4ZFVT4RS = require("./chunk-4ZFVT4RS.js");
35
35
  var import_chunk_RTGQXNX6 = require("./chunk-RTGQXNX6.js");
36
36
  var import_chunk_RP2N6UXA = require("./chunk-RP2N6UXA.js");
37
37
  var import_chunk_AHJ2N6BJ = require("./chunk-AHJ2N6BJ.js");
@@ -80,7 +80,7 @@ var _DbPull = class _DbPull2 {
80
80
  "--local-d1": Boolean
81
81
  // optional, only on cloudflare D1
82
82
  });
83
- const spinnerFactory = (0, import_chunk_DIAO4W7O.createSpinner)(!args["--print"]);
83
+ const spinnerFactory = (0, import_chunk_4ZFVT4RS.createSpinner)(!args["--print"]);
84
84
  if (args instanceof Error) {
85
85
  return this.help(args.message);
86
86
  }
@@ -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 chunk_E7OXHCDR_exports = {};
30
- __export(chunk_E7OXHCDR_exports, {
29
+ var chunk_MREGRQDD_exports = {};
30
+ __export(chunk_MREGRQDD_exports, {
31
31
  DbExecute: () => DbExecute
32
32
  });
33
- module.exports = __toCommonJS(chunk_E7OXHCDR_exports);
34
- var import_chunk_KXMACMQC = require("./chunk-KXMACMQC.js");
33
+ module.exports = __toCommonJS(chunk_MREGRQDD_exports);
34
+ var import_chunk_N5UBDQRA = require("./chunk-N5UBDQRA.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");
@@ -161,7 +161,7 @@ See \`${(0, import_chunk_SKRR5WT4.green)((0, import_internals.getCommandWithExec
161
161
  ...(0, import_internals.toSchemasWithConfigDir)(schemaWithPath, engineConfig)
162
162
  };
163
163
  }
164
- const migrate = new import_chunk_KXMACMQC.Migrate();
164
+ const migrate = new import_chunk_N5UBDQRA.Migrate();
165
165
  try {
166
166
  await migrate.engine.dbExecute({
167
167
  script,