@prisma/migrate 5.23.0-dev.3 → 5.23.0-dev.31

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 (48) hide show
  1. package/dist/Migrate.js +4 -4
  2. package/dist/SchemaEngine.js +4 -4
  3. package/dist/bin.js +39 -40
  4. package/dist/{chunk-EXUBPCXZ.js → chunk-3H4RLVCQ.js} +12 -12
  5. package/dist/{chunk-R3YJSFEV.js → chunk-AT457M2T.js} +64 -146
  6. package/dist/{chunk-NIFQA5SB.js → chunk-DXR4D3UN.js} +224 -1078
  7. package/dist/{chunk-ZLGLVUFD.js → chunk-E2XKFV2C.js} +8 -8
  8. package/dist/{chunk-XVL5RF2T.js → chunk-GUBDW6S7.js} +11 -11
  9. package/dist/{chunk-BAVMZZAR.js → chunk-HODZFC64.js} +7 -7
  10. package/dist/{chunk-BAFPAACN.js → chunk-ILJRJJ3S.js} +4 -4
  11. package/dist/{chunk-LLGEQ76N.js → chunk-ILQWQHQO.js} +11 -11
  12. package/dist/{chunk-E3KHFUFQ.js → chunk-J77IRNPE.js} +9 -124
  13. package/dist/{chunk-76XWADEV.js → chunk-KEPR65SW.js} +6 -6
  14. package/dist/{chunk-MWEO3VUS.js → chunk-LJOMIPJW.js} +7 -7
  15. package/dist/{chunk-GJN3CSXW.js → chunk-NKL64AIB.js} +6 -6
  16. package/dist/{chunk-VWV2NY26.js → chunk-NKQGJ3AE.js} +7 -3
  17. package/dist/{chunk-XLLUFIQK.js → chunk-PCJYN6LT.js} +6 -5
  18. package/dist/{chunk-SV5GANSI.js → chunk-PFEH6ILG.js} +6 -6
  19. package/dist/{chunk-ZBOJAYON.js → chunk-PNBMPQYH.js} +6 -6
  20. package/dist/{chunk-W3ROQKBN.js → chunk-V7DE6JTG.js} +4 -4
  21. package/dist/{chunk-UJWMQPUH.js → chunk-X6GGREJW.js} +6 -6
  22. package/dist/{chunk-WIZM7TFT.js → chunk-YKUZUAXA.js} +443 -55
  23. package/dist/{chunk-YOW3VBYS.js → chunk-Z4OLB2H4.js} +6 -6
  24. package/dist/commands/DbExecute.js +5 -5
  25. package/dist/commands/DbPull.js +6 -6
  26. package/dist/commands/DbPush.js +5 -5
  27. package/dist/commands/DbSeed.js +4 -5
  28. package/dist/commands/MigrateDeploy.js +5 -5
  29. package/dist/commands/MigrateDev.js +6 -7
  30. package/dist/commands/MigrateDiff.js +6 -7
  31. package/dist/commands/MigrateReset.js +6 -7
  32. package/dist/commands/MigrateResolve.js +5 -5
  33. package/dist/commands/MigrateStatus.js +5 -5
  34. package/dist/index.js +45 -46
  35. package/dist/internals/src/utils/isCurrentBinInstalledGlobally.d.ts +1 -1
  36. package/dist/{multipart-parser-KKECAI5D.js → multipart-parser-73VM3J4A.js} +10 -7
  37. package/dist/{multipart-parser-47FFAP42-P3F6TPHJ.js → multipart-parser-ITART6UP-FFJAMHWE.js} +25 -22
  38. package/dist/utils/getDatabaseVersionSafe.js +4 -4
  39. package/dist/utils/introspectSql.js +3 -3
  40. package/dist/utils/removeSchemaFiles.js +3 -3
  41. package/dist/utils/saveSchemaFiles.js +3 -3
  42. package/dist/utils/seed.js +6 -7
  43. package/dist/utils/setupMSSQL.js +62 -59
  44. package/dist/utils/setupMongo.js +23084 -21202
  45. package/dist/utils/setupMysql.js +45 -0
  46. package/package.json +12 -13
  47. package/dist/chunk-EFPE3Q7J.js +0 -424
  48. package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.d.ts +0 -9
@@ -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 chunk_ZLGLVUFD_exports = {};
20
- __export(chunk_ZLGLVUFD_exports, {
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(chunk_ZLGLVUFD_exports);
25
- var import_chunk_EFPE3Q7J = require("./chunk-EFPE3Q7J.js");
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, import_chunk_EFPE3Q7J.init_seed)();
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, import_chunk_EFPE3Q7J.getSeedCommandFromPackageJson)(process.cwd());
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, import_chunk_EFPE3Q7J.verifySeedConfigAndReturnMessage)(schemaResult?.schemaPath ?? null);
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, import_chunk_EFPE3Q7J.executeSeedCommand)({ commandFromConfig: seedCommandFromPkgJson, extraArgs });
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 chunk_XVL5RF2T_exports = {};
30
- __export(chunk_XVL5RF2T_exports, {
29
+ var chunk_GUBDW6S7_exports = {};
30
+ __export(chunk_GUBDW6S7_exports, {
31
31
  MigrateReset: () => MigrateReset,
32
32
  init_MigrateReset: () => init_MigrateReset
33
33
  });
34
- module.exports = __toCommonJS(chunk_XVL5RF2T_exports);
35
- var import_chunk_EFPE3Q7J = require("./chunk-EFPE3Q7J.js");
34
+ module.exports = __toCommonJS(chunk_GUBDW6S7_exports);
35
+ var import_chunk_YKUZUAXA = require("./chunk-YKUZUAXA.js");
36
36
  var import_chunk_WOOPRG54 = require("./chunk-WOOPRG54.js");
37
- var import_chunk_MWEO3VUS = require("./chunk-MWEO3VUS.js");
37
+ var import_chunk_LJOMIPJW = require("./chunk-LJOMIPJW.js");
38
38
  var import_chunk_U374EXYQ = require("./chunk-U374EXYQ.js");
39
39
  var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
40
40
  var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
@@ -47,13 +47,13 @@ var _MigrateReset, MigrateReset;
47
47
  var init_MigrateReset = (0, import_chunk_WWAWV7DQ.__esm)({
48
48
  "src/commands/MigrateReset.ts"() {
49
49
  (0, import_chunk_6TE2RIPN.init_colors)();
50
- (0, import_chunk_MWEO3VUS.init_Migrate)();
50
+ (0, import_chunk_LJOMIPJW.init_Migrate)();
51
51
  (0, import_chunk_KEBB7UIB.init_ensureDatabaseExists)();
52
52
  (0, import_chunk_U374EXYQ.init_errors)();
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, import_chunk_EFPE3Q7J.init_seed)();
56
+ (0, import_chunk_YKUZUAXA.init_seed)();
57
57
  _MigrateReset = class _MigrateReset2 {
58
58
  static new() {
59
59
  return new _MigrateReset2();
@@ -99,7 +99,7 @@ var init_MigrateReset = (0, import_chunk_WWAWV7DQ.__esm)({
99
99
  process.exit(130);
100
100
  }
101
101
  }
102
- const migrate = new import_chunk_MWEO3VUS.Migrate(schemaPath);
102
+ const migrate = new import_chunk_LJOMIPJW.Migrate(schemaPath);
103
103
  let migrationIds;
104
104
  try {
105
105
  await migrate.reset();
@@ -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, import_chunk_EFPE3Q7J.getSeedCommandFromPackageJson)(process.cwd());
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, import_chunk_EFPE3Q7J.executeSeedCommand)({ commandFromConfig: seedCommandFromPkgJson });
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, import_chunk_EFPE3Q7J.verifySeedConfigAndReturnMessage)(schemaPath2);
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 chunk_BAVMZZAR_exports = {};
20
- __export(chunk_BAVMZZAR_exports, {
19
+ var chunk_HODZFC64_exports = {};
20
+ __export(chunk_HODZFC64_exports, {
21
21
  MigrateResolve: () => MigrateResolve,
22
22
  init_MigrateResolve: () => init_MigrateResolve
23
23
  });
24
- module.exports = __toCommonJS(chunk_BAVMZZAR_exports);
25
- var import_chunk_MWEO3VUS = require("./chunk-MWEO3VUS.js");
24
+ module.exports = __toCommonJS(chunk_HODZFC64_exports);
25
+ var import_chunk_LJOMIPJW = require("./chunk-LJOMIPJW.js");
26
26
  var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
27
27
  var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
28
28
  var import_chunk_KEBB7UIB = require("./chunk-KEBB7UIB.js");
@@ -33,7 +33,7 @@ var _MigrateResolve, MigrateResolve;
33
33
  var init_MigrateResolve = (0, import_chunk_WWAWV7DQ.__esm)({
34
34
  "src/commands/MigrateResolve.ts"() {
35
35
  (0, import_chunk_6TE2RIPN.init_colors)();
36
- (0, import_chunk_MWEO3VUS.init_Migrate)();
36
+ (0, import_chunk_LJOMIPJW.init_Migrate)();
37
37
  (0, import_chunk_KEBB7UIB.init_ensureDatabaseExists)();
38
38
  (0, import_chunk_EYA6AFSF.init_getSchemaPathAndPrint)();
39
39
  (0, import_chunk_Q7ACZDDT.init_printDatasource)();
@@ -82,7 +82,7 @@ ${(0, import_chunk_6TE2RIPN.bold)((0, import_chunk_6TE2RIPN.green)((0, import_in
82
82
  );
83
83
  }
84
84
  await (0, import_chunk_KEBB7UIB.ensureCanConnectToDatabase)(schemaPath);
85
- const migrate = new import_chunk_MWEO3VUS.Migrate(schemaPath);
85
+ const migrate = new import_chunk_LJOMIPJW.Migrate(schemaPath);
86
86
  try {
87
87
  await migrate.markMigrationApplied({
88
88
  migrationId: args["--applied"]
@@ -103,7 +103,7 @@ Migration ${args["--applied"]} marked as applied.
103
103
  );
104
104
  }
105
105
  await (0, import_chunk_KEBB7UIB.ensureCanConnectToDatabase)(schemaPath);
106
- const migrate = new import_chunk_MWEO3VUS.Migrate(schemaPath);
106
+ const migrate = new import_chunk_LJOMIPJW.Migrate(schemaPath);
107
107
  try {
108
108
  await migrate.markMigrationRolledBack({
109
109
  migrationId: args["--rolled-back"]
@@ -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 chunk_BAFPAACN_exports = {};
30
- __export(chunk_BAFPAACN_exports, {
29
+ var chunk_ILJRJJ3S_exports = {};
30
+ __export(chunk_ILJRJJ3S_exports, {
31
31
  init_saveSchemaFiles: () => init_saveSchemaFiles,
32
32
  saveSchemaFiles: () => saveSchemaFiles
33
33
  });
34
- module.exports = __toCommonJS(chunk_BAFPAACN_exports);
34
+ module.exports = __toCommonJS(chunk_ILJRJJ3S_exports);
35
35
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
36
- var import_promises = __toESM(require("fs/promises"));
36
+ var import_promises = __toESM(require("node:fs/promises"));
37
37
  async function saveSchemaFiles(schemas) {
38
38
  await Promise.all(schemas.files.map((file) => import_promises.default.writeFile(file.path, file.content, "utf8")));
39
39
  }
@@ -26,18 +26,18 @@ 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_LLGEQ76N_exports = {};
30
- __export(chunk_LLGEQ76N_exports, {
29
+ var chunk_ILQWQHQO_exports = {};
30
+ __export(chunk_ILQWQHQO_exports, {
31
31
  MigrateDev: () => MigrateDev,
32
32
  init_MigrateDev: () => init_MigrateDev
33
33
  });
34
- module.exports = __toCommonJS(chunk_LLGEQ76N_exports);
34
+ module.exports = __toCommonJS(chunk_ILQWQHQO_exports);
35
35
  var import_chunk_IFCV5MY4 = require("./chunk-IFCV5MY4.js");
36
36
  var import_chunk_SGCF5OHF = require("./chunk-SGCF5OHF.js");
37
- var import_chunk_EFPE3Q7J = require("./chunk-EFPE3Q7J.js");
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
- var import_chunk_MWEO3VUS = require("./chunk-MWEO3VUS.js");
40
+ var import_chunk_LJOMIPJW = require("./chunk-LJOMIPJW.js");
41
41
  var import_chunk_U374EXYQ = require("./chunk-U374EXYQ.js");
42
42
  var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
43
43
  var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
@@ -51,7 +51,7 @@ var debug, _MigrateDev, MigrateDev;
51
51
  var init_MigrateDev = (0, import_chunk_WWAWV7DQ.__esm)({
52
52
  "src/commands/MigrateDev.ts"() {
53
53
  (0, import_chunk_6TE2RIPN.init_colors)();
54
- (0, import_chunk_MWEO3VUS.init_Migrate)();
54
+ (0, import_chunk_LJOMIPJW.init_Migrate)();
55
55
  (0, import_chunk_KEBB7UIB.init_ensureDatabaseExists)();
56
56
  (0, import_chunk_U374EXYQ.init_errors)();
57
57
  (0, import_chunk_EYA6AFSF.init_getSchemaPathAndPrint)();
@@ -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, import_chunk_EFPE3Q7J.init_seed)();
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() {
@@ -103,7 +103,7 @@ var init_MigrateDev = (0, import_chunk_WWAWV7DQ.__esm)({
103
103
  if (wasDbCreated) {
104
104
  process.stdout.write(wasDbCreated + "\n\n");
105
105
  }
106
- const migrate = new import_chunk_MWEO3VUS.Migrate(schemaPath);
106
+ const migrate = new import_chunk_LJOMIPJW.Migrate(schemaPath);
107
107
  let devDiagnostic;
108
108
  try {
109
109
  devDiagnostic = await migrate.devDiagnostic();
@@ -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, import_chunk_EFPE3Q7J.getSeedCommandFromPackageJson)(process.cwd());
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, import_chunk_EFPE3Q7J.executeSeedCommand)({ commandFromConfig: seedCommandFromPkgJson });
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, import_chunk_EFPE3Q7J.verifySeedConfigAndReturnMessage)(schemaPath2);
284
+ await (0, import_chunk_YKUZUAXA.verifySeedConfigAndReturnMessage)(schemaPath2);
285
285
  }
286
286
  } catch (e) {
287
287
  console.error(e);
@@ -16,16 +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_E3KHFUFQ_exports = {};
20
- __export(chunk_E3KHFUFQ_exports, {
21
- require_ms: () => require_ms2,
19
+ var chunk_J77IRNPE_exports = {};
20
+ __export(chunk_J77IRNPE_exports, {
21
+ require_ms: () => require_ms,
22
22
  require_src: () => require_src
23
23
  });
24
- module.exports = __toCommonJS(chunk_E3KHFUFQ_exports);
24
+ module.exports = __toCommonJS(chunk_J77IRNPE_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)({
28
- "../../node_modules/.pnpm/ms@2.1.2/node_modules/ms/index.js"(exports, module2) {
28
+ "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports, module2) {
29
29
  "use strict";
30
30
  var s = 1e3;
31
31
  var m = s * 60;
@@ -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.6/node_modules/debug/src/common.js"(exports, module2) {
143
+ "../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/common.js"(exports, module2) {
144
144
  "use strict";
145
145
  function setup(env) {
146
146
  createDebug.debug = createDebug;
@@ -302,7 +302,7 @@ var require_common = (0, import_chunk_WWAWV7DQ.__commonJS)({
302
302
  }
303
303
  });
304
304
  var require_browser = (0, import_chunk_WWAWV7DQ.__commonJS)({
305
- "../../node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/browser.js"(exports, module2) {
305
+ "../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/browser.js"(exports, module2) {
306
306
  "use strict";
307
307
  exports.formatArgs = formatArgs;
308
308
  exports.save = save;
@@ -583,7 +583,7 @@ var require_supports_color = (0, import_chunk_WWAWV7DQ.__commonJS)({
583
583
  }
584
584
  });
585
585
  var require_node = (0, import_chunk_WWAWV7DQ.__commonJS)({
586
- "../../node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/node.js"(exports, module2) {
586
+ "../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/node.js"(exports, module2) {
587
587
  "use strict";
588
588
  var tty = (0, import_chunk_WWAWV7DQ.__require)("tty");
589
589
  var util = (0, import_chunk_WWAWV7DQ.__require)("util");
@@ -756,7 +756,7 @@ var require_node = (0, import_chunk_WWAWV7DQ.__commonJS)({
756
756
  }
757
757
  });
758
758
  var require_src = (0, import_chunk_WWAWV7DQ.__commonJS)({
759
- "../../node_modules/.pnpm/debug@4.3.6/node_modules/debug/src/index.js"(exports, module2) {
759
+ "../../node_modules/.pnpm/debug@4.3.7/node_modules/debug/src/index.js"(exports, module2) {
760
760
  "use strict";
761
761
  if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
762
762
  module2.exports = require_browser();
@@ -765,118 +765,3 @@ var require_src = (0, import_chunk_WWAWV7DQ.__commonJS)({
765
765
  }
766
766
  }
767
767
  });
768
- var require_ms2 = (0, import_chunk_WWAWV7DQ.__commonJS)({
769
- "../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js"(exports, module2) {
770
- "use strict";
771
- var s = 1e3;
772
- var m = s * 60;
773
- var h = m * 60;
774
- var d = h * 24;
775
- var w = d * 7;
776
- var y = d * 365.25;
777
- module2.exports = function(val, options) {
778
- options = options || {};
779
- var type = typeof val;
780
- if (type === "string" && val.length > 0) {
781
- return parse(val);
782
- } else if (type === "number" && isFinite(val)) {
783
- return options.long ? fmtLong(val) : fmtShort(val);
784
- }
785
- throw new Error(
786
- "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
787
- );
788
- };
789
- function parse(str) {
790
- str = String(str);
791
- if (str.length > 100) {
792
- return;
793
- }
794
- var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
795
- str
796
- );
797
- if (!match) {
798
- return;
799
- }
800
- var n = parseFloat(match[1]);
801
- var type = (match[2] || "ms").toLowerCase();
802
- switch (type) {
803
- case "years":
804
- case "year":
805
- case "yrs":
806
- case "yr":
807
- case "y":
808
- return n * y;
809
- case "weeks":
810
- case "week":
811
- case "w":
812
- return n * w;
813
- case "days":
814
- case "day":
815
- case "d":
816
- return n * d;
817
- case "hours":
818
- case "hour":
819
- case "hrs":
820
- case "hr":
821
- case "h":
822
- return n * h;
823
- case "minutes":
824
- case "minute":
825
- case "mins":
826
- case "min":
827
- case "m":
828
- return n * m;
829
- case "seconds":
830
- case "second":
831
- case "secs":
832
- case "sec":
833
- case "s":
834
- return n * s;
835
- case "milliseconds":
836
- case "millisecond":
837
- case "msecs":
838
- case "msec":
839
- case "ms":
840
- return n;
841
- default:
842
- return void 0;
843
- }
844
- }
845
- function fmtShort(ms) {
846
- var msAbs = Math.abs(ms);
847
- if (msAbs >= d) {
848
- return Math.round(ms / d) + "d";
849
- }
850
- if (msAbs >= h) {
851
- return Math.round(ms / h) + "h";
852
- }
853
- if (msAbs >= m) {
854
- return Math.round(ms / m) + "m";
855
- }
856
- if (msAbs >= s) {
857
- return Math.round(ms / s) + "s";
858
- }
859
- return ms + "ms";
860
- }
861
- function fmtLong(ms) {
862
- var msAbs = Math.abs(ms);
863
- if (msAbs >= d) {
864
- return plural(ms, msAbs, d, "day");
865
- }
866
- if (msAbs >= h) {
867
- return plural(ms, msAbs, h, "hour");
868
- }
869
- if (msAbs >= m) {
870
- return plural(ms, msAbs, m, "minute");
871
- }
872
- if (msAbs >= s) {
873
- return plural(ms, msAbs, s, "second");
874
- }
875
- return ms + " ms";
876
- }
877
- function plural(ms, msAbs, n, name) {
878
- var isPlural = msAbs >= n * 1.5;
879
- return Math.round(ms / n) + " " + name + (isPlural ? "s" : "");
880
- }
881
- }
882
- });
@@ -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 chunk_76XWADEV_exports = {};
30
- __export(chunk_76XWADEV_exports, {
29
+ var chunk_KEPR65SW_exports = {};
30
+ __export(chunk_KEPR65SW_exports, {
31
31
  DbPush: () => DbPush,
32
32
  init_DbPush: () => init_DbPush
33
33
  });
34
- module.exports = __toCommonJS(chunk_76XWADEV_exports);
35
- var import_chunk_MWEO3VUS = require("./chunk-MWEO3VUS.js");
34
+ module.exports = __toCommonJS(chunk_KEPR65SW_exports);
35
+ var import_chunk_LJOMIPJW = require("./chunk-LJOMIPJW.js");
36
36
  var import_chunk_U374EXYQ = require("./chunk-U374EXYQ.js");
37
37
  var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
38
38
  var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
@@ -45,7 +45,7 @@ var _DbPush, DbPush;
45
45
  var init_DbPush = (0, import_chunk_WWAWV7DQ.__esm)({
46
46
  "src/commands/DbPush.ts"() {
47
47
  (0, import_chunk_6TE2RIPN.init_colors)();
48
- (0, import_chunk_MWEO3VUS.init_Migrate)();
48
+ (0, import_chunk_LJOMIPJW.init_Migrate)();
49
49
  (0, import_chunk_KEBB7UIB.init_ensureDatabaseExists)();
50
50
  (0, import_chunk_U374EXYQ.init_errors)();
51
51
  (0, import_chunk_EYA6AFSF.init_getSchemaPathAndPrint)();
@@ -79,7 +79,7 @@ var init_DbPush = (0, import_chunk_WWAWV7DQ.__esm)({
79
79
  const { schemaPath } = await (0, import_chunk_EYA6AFSF.getSchemaPathAndPrint)(args["--schema"]);
80
80
  const datasourceInfo = await (0, import_chunk_KEBB7UIB.getDatasourceInfo)({ schemaPath });
81
81
  (0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo });
82
- const migrate = new import_chunk_MWEO3VUS.Migrate(schemaPath);
82
+ const migrate = new import_chunk_LJOMIPJW.Migrate(schemaPath);
83
83
  try {
84
84
  const wasDbCreated = await (0, import_chunk_KEBB7UIB.ensureDatabaseExists)("push", schemaPath);
85
85
  if (wasDbCreated) {
@@ -26,14 +26,14 @@ var __toESM2 = (mod, isNodeMode, target) => (target = mod != null ? __create(__g
26
26
  mod
27
27
  ));
28
28
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
- var chunk_MWEO3VUS_exports = {};
30
- __export(chunk_MWEO3VUS_exports, {
29
+ var chunk_LJOMIPJW_exports = {};
30
+ __export(chunk_LJOMIPJW_exports, {
31
31
  Migrate: () => Migrate,
32
32
  init_Migrate: () => init_Migrate
33
33
  });
34
- module.exports = __toCommonJS(chunk_MWEO3VUS_exports);
34
+ module.exports = __toCommonJS(chunk_LJOMIPJW_exports);
35
35
  var import_chunk_6C7ESGWY = require("./chunk-6C7ESGWY.js");
36
- var import_chunk_XLLUFIQK = require("./chunk-XLLUFIQK.js");
36
+ var import_chunk_PCJYN6LT = require("./chunk-PCJYN6LT.js");
37
37
  var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
38
38
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
39
39
  var import_engines_version = require("@prisma/engines-version");
@@ -543,19 +543,19 @@ var init_Migrate = (0, import_chunk_WWAWV7DQ.__esm)({
543
543
  "src/Migrate.ts"() {
544
544
  (0, import_chunk_6TE2RIPN.init_colors)();
545
545
  import_log_update = (0, import_chunk_WWAWV7DQ.__toESM)(require_log_update());
546
- (0, import_chunk_XLLUFIQK.init_SchemaEngine)();
546
+ (0, import_chunk_PCJYN6LT.init_SchemaEngine)();
547
547
  packageJson = eval(`require('../package.json')`);
548
548
  Migrate = class {
549
549
  constructor(schemaPath, enabledPreviewFeatures) {
550
550
  if (schemaPath) {
551
551
  this.schemaPath = import_path.default.resolve(process.cwd(), schemaPath);
552
552
  this.migrationsDirectoryPath = import_path.default.join(import_path.default.dirname(this.schemaPath), "migrations");
553
- this.engine = new import_chunk_XLLUFIQK.SchemaEngine({
553
+ this.engine = new import_chunk_PCJYN6LT.SchemaEngine({
554
554
  schemaPath: this.schemaPath,
555
555
  enabledPreviewFeatures
556
556
  });
557
557
  } else {
558
- this.engine = new import_chunk_XLLUFIQK.SchemaEngine({
558
+ this.engine = new import_chunk_PCJYN6LT.SchemaEngine({
559
559
  enabledPreviewFeatures
560
560
  });
561
561
  }
@@ -26,20 +26,20 @@ 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_GJN3CSXW_exports = {};
30
- __export(chunk_GJN3CSXW_exports, {
29
+ var chunk_NKL64AIB_exports = {};
30
+ __export(chunk_NKL64AIB_exports, {
31
31
  getDatabaseVersionSafe: () => getDatabaseVersionSafe,
32
32
  init_getDatabaseVersionSafe: () => init_getDatabaseVersionSafe
33
33
  });
34
- module.exports = __toCommonJS(chunk_GJN3CSXW_exports);
35
- var import_chunk_XLLUFIQK = require("./chunk-XLLUFIQK.js");
34
+ module.exports = __toCommonJS(chunk_NKL64AIB_exports);
35
+ var import_chunk_PCJYN6LT = require("./chunk-PCJYN6LT.js");
36
36
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
37
37
  var import_debug = __toESM(require("@prisma/debug"));
38
38
  async function getDatabaseVersionSafe(args) {
39
39
  let engine;
40
40
  let dbVersion;
41
41
  try {
42
- engine = new import_chunk_XLLUFIQK.SchemaEngine({});
42
+ engine = new import_chunk_PCJYN6LT.SchemaEngine({});
43
43
  dbVersion = await engine.getDatabaseVersion(args);
44
44
  } catch (e) {
45
45
  debug(e);
@@ -53,7 +53,7 @@ async function getDatabaseVersionSafe(args) {
53
53
  var debug;
54
54
  var init_getDatabaseVersionSafe = (0, import_chunk_WWAWV7DQ.__esm)({
55
55
  "src/utils/getDatabaseVersionSafe.ts"() {
56
- (0, import_chunk_XLLUFIQK.init_SchemaEngine)();
56
+ (0, import_chunk_PCJYN6LT.init_SchemaEngine)();
57
57
  debug = (0, import_debug.default)("prisma:cli");
58
58
  }
59
59
  });
@@ -16,8 +16,8 @@ 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_VWV2NY26_exports = {};
20
- __export(chunk_VWV2NY26_exports, {
19
+ var chunk_NKQGJ3AE_exports = {};
20
+ __export(chunk_NKQGJ3AE_exports, {
21
21
  require_clean: () => require_clean,
22
22
  require_constants: () => require_constants,
23
23
  require_debug: () => require_debug,
@@ -28,7 +28,7 @@ __export(chunk_VWV2NY26_exports, {
28
28
  require_semver: () => require_semver,
29
29
  require_valid: () => require_valid
30
30
  });
31
- module.exports = __toCommonJS(chunk_VWV2NY26_exports);
31
+ module.exports = __toCommonJS(chunk_NKQGJ3AE_exports);
32
32
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
33
33
  var require_debug = (0, import_chunk_WWAWV7DQ.__commonJS)({
34
34
  "../../node_modules/.pnpm/semver@7.6.3/node_modules/semver/internal/debug.js"(exports, module2) {
@@ -353,6 +353,8 @@ var require_semver = (0, import_chunk_WWAWV7DQ.__commonJS)({
353
353
  this.inc("patch", identifier, identifierBase);
354
354
  this.inc("pre", identifier, identifierBase);
355
355
  break;
356
+ // If the input is a non-prerelease version, this acts the same as
357
+ // prepatch.
356
358
  case "prerelease":
357
359
  if (this.prerelease.length === 0) {
358
360
  this.inc("patch", identifier, identifierBase);
@@ -380,6 +382,8 @@ var require_semver = (0, import_chunk_WWAWV7DQ.__commonJS)({
380
382
  }
381
383
  this.prerelease = [];
382
384
  break;
385
+ // This probably shouldn't be used publicly.
386
+ // 1.0.0 'pre' would become 1.0.0-0 which is the wrong direction.
383
387
  case "pre": {
384
388
  const base = Number(identifierBase) ? 1 : 0;
385
389
  if (!identifier && identifierBase === false) {
@@ -26,18 +26,18 @@ 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_XLLUFIQK_exports = {};
30
- __export(chunk_XLLUFIQK_exports, {
29
+ var chunk_PCJYN6LT_exports = {};
30
+ __export(chunk_PCJYN6LT_exports, {
31
31
  EngineError: () => EngineError,
32
32
  SchemaEngine: () => SchemaEngine,
33
33
  init_SchemaEngine: () => init_SchemaEngine
34
34
  });
35
- module.exports = __toCommonJS(chunk_XLLUFIQK_exports);
35
+ module.exports = __toCommonJS(chunk_PCJYN6LT_exports);
36
36
  var import_chunk_LVFPGUOH = require("./chunk-LVFPGUOH.js");
37
37
  var import_chunk_AAATUOV6 = require("./chunk-AAATUOV6.js");
38
38
  var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
39
39
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
40
- var import_path = __toESM(require("path"));
40
+ var import_node_path = __toESM(require("node:path"));
41
41
  var import_debug = __toESM(require("@prisma/debug"));
42
42
  var import_internals = require("@prisma/internals");
43
43
  var import_child_process = require("child_process");
@@ -174,7 +174,7 @@ var init_SchemaEngine = (0, import_chunk_WWAWV7DQ.__esm)({
174
174
  );
175
175
  const { views } = introspectResult;
176
176
  if (views) {
177
- const schemaPath = this.schemaPath ?? import_path.default.join(process.cwd(), "prisma");
177
+ const schemaPath = this.schemaPath ?? import_node_path.default.join(process.cwd(), "prisma");
178
178
  await (0, import_chunk_LVFPGUOH.handleViewsIO)({ views, schemaPath });
179
179
  }
180
180
  return introspectResult;
@@ -360,6 +360,7 @@ ${this.lastError?.backtrace ?? ""}`;
360
360
  case import_internals.SchemaEngineExitCode.Panic:
361
361
  handlePanic();
362
362
  break;
363
+ // treat unknown error codes as panics
363
364
  default:
364
365
  handlePanic();
365
366
  }
@@ -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 chunk_SV5GANSI_exports = {};
30
- __export(chunk_SV5GANSI_exports, {
29
+ var chunk_PFEH6ILG_exports = {};
30
+ __export(chunk_PFEH6ILG_exports, {
31
31
  MigrateStatus: () => MigrateStatus,
32
32
  init_MigrateStatus: () => init_MigrateStatus
33
33
  });
34
- module.exports = __toCommonJS(chunk_SV5GANSI_exports);
35
- var import_chunk_MWEO3VUS = require("./chunk-MWEO3VUS.js");
34
+ module.exports = __toCommonJS(chunk_PFEH6ILG_exports);
35
+ var import_chunk_LJOMIPJW = require("./chunk-LJOMIPJW.js");
36
36
  var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
37
37
  var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
38
38
  var import_chunk_KEBB7UIB = require("./chunk-KEBB7UIB.js");
@@ -44,7 +44,7 @@ var debug, _MigrateStatus, MigrateStatus;
44
44
  var init_MigrateStatus = (0, import_chunk_WWAWV7DQ.__esm)({
45
45
  "src/commands/MigrateStatus.ts"() {
46
46
  (0, import_chunk_6TE2RIPN.init_colors)();
47
- (0, import_chunk_MWEO3VUS.init_Migrate)();
47
+ (0, import_chunk_LJOMIPJW.init_Migrate)();
48
48
  (0, import_chunk_KEBB7UIB.init_ensureDatabaseExists)();
49
49
  (0, import_chunk_EYA6AFSF.init_getSchemaPathAndPrint)();
50
50
  (0, import_chunk_Q7ACZDDT.init_printDatasource)();
@@ -74,7 +74,7 @@ var init_MigrateStatus = (0, import_chunk_WWAWV7DQ.__esm)({
74
74
  await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
75
75
  const { schemaPath } = await (0, import_chunk_EYA6AFSF.getSchemaPathAndPrint)(args["--schema"]);
76
76
  (0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0, import_chunk_KEBB7UIB.getDatasourceInfo)({ schemaPath }) });
77
- const migrate = new import_chunk_MWEO3VUS.Migrate(schemaPath);
77
+ const migrate = new import_chunk_LJOMIPJW.Migrate(schemaPath);
78
78
  await (0, import_chunk_KEBB7UIB.ensureCanConnectToDatabase)(schemaPath);
79
79
  let diagnoseResult;
80
80
  let listMigrationDirectoriesResult;