@prisma/migrate 6.3.0-dev.3 → 6.3.0-dev.30

Sign up to get free protection for your applications and to get access to all the features.
Files changed (43) hide show
  1. package/dist/Migrate.js +5 -5
  2. package/dist/SchemaEngine.js +5 -5
  3. package/dist/bin.js +34 -34
  4. package/dist/{chunk-BQXAMKF7.js → chunk-43RWRQLU.js} +10 -10
  5. package/dist/{chunk-IO3DSAWB.js → chunk-5OBIVXLU.js} +46 -24
  6. package/dist/{chunk-HW2KUGEI.js → chunk-5RFF75YK.js} +47 -25
  7. package/dist/{chunk-KX5GI2BM.js → chunk-77RYI3ZW.js} +10 -10
  8. package/dist/{chunk-4NDZU7KV.js → chunk-7QAR4NT3.js} +12 -11
  9. package/dist/{chunk-XQJTDY7A.js → chunk-AMRGQNRR.js} +6 -6
  10. package/dist/{chunk-E3UZYEGF.js → chunk-CQQQ436N.js} +4 -4
  11. package/dist/{chunk-3EBHV6P7.js → chunk-CSUAUCRR.js} +11 -11
  12. package/dist/{chunk-UI76O6B2.js → chunk-G66QFMM5.js} +6 -6
  13. package/dist/{chunk-MBLWML5Q.js → chunk-HAJNCOW7.js} +12 -12
  14. package/dist/{chunk-RCPXHNHW.js → chunk-I63N54YI.js} +12 -12
  15. package/dist/{chunk-ET2H4E2O.js → chunk-JESW2ENL.js} +11 -11
  16. package/dist/{chunk-AOCCG7RR.js → chunk-JTNVQIRB.js} +6 -6
  17. package/dist/{chunk-7MUF3HLX.js → chunk-Q3SQU7C6.js} +6 -6
  18. package/dist/{chunk-RYWEOVLN.js → chunk-WJT3IOMB.js} +6 -6
  19. package/dist/{chunk-KEBB7UIB.js → chunk-XJQP3B4W.js} +5 -3
  20. package/dist/{chunk-NCDRH4BH.js → chunk-ZKWJDQMB.js} +11 -9
  21. package/dist/commands/DbDrop.js +3 -3
  22. package/dist/commands/DbExecute.js +6 -6
  23. package/dist/commands/DbPull.js +6 -6
  24. package/dist/commands/DbPush.js +7 -7
  25. package/dist/commands/MigrateDeploy.js +7 -7
  26. package/dist/commands/MigrateDev.js +7 -7
  27. package/dist/commands/MigrateDiff.js +6 -6
  28. package/dist/commands/MigrateReset.js +7 -7
  29. package/dist/commands/MigrateResolve.js +7 -7
  30. package/dist/commands/MigrateStatus.js +7 -7
  31. package/dist/index.js +45 -45
  32. package/dist/internals/src/client/getClientEngineType.d.ts +2 -1
  33. package/dist/internals/src/index.d.ts +1 -0
  34. package/dist/internals/src/utils/prismaPostgres.d.ts +3 -0
  35. package/dist/migrate/src/Migrate.d.ts +2 -1
  36. package/dist/migrate/src/utils/ensureDatabaseExists.d.ts +1 -1
  37. package/dist/migrate/src/utils/printDatasources.d.ts +2 -1
  38. package/dist/utils/ensureDatabaseExists.js +7 -7
  39. package/dist/utils/getDatabaseVersionSafe.js +5 -5
  40. package/dist/utils/introspectSql.js +4 -4
  41. package/dist/utils/setupMongo.js +792 -732
  42. package/dist/views/handleViewsIO.js +3 -3
  43. package/package.json +10 -10
@@ -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_HW2KUGEI_exports = {};
30
- __export(chunk_HW2KUGEI_exports, {
29
+ var chunk_5RFF75YK_exports = {};
30
+ __export(chunk_5RFF75YK_exports, {
31
31
  MigrateDiff: () => MigrateDiff,
32
32
  init_MigrateDiff: () => init_MigrateDiff
33
33
  });
34
- module.exports = __toCommonJS(chunk_HW2KUGEI_exports);
34
+ module.exports = __toCommonJS(chunk_5RFF75YK_exports);
35
35
  var import_chunk_NKQGJ3AE = require("./chunk-NKQGJ3AE.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_NCDRH4BH = require("./chunk-NCDRH4BH.js");
39
- var import_chunk_E3UZYEGF = require("./chunk-E3UZYEGF.js");
38
+ var import_chunk_ZKWJDQMB = require("./chunk-ZKWJDQMB.js");
39
+ var import_chunk_CQQQ436N = require("./chunk-CQQQ436N.js");
40
40
  var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
41
41
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
42
42
  var import_node_process = __toESM(require("node:process"));
@@ -6160,8 +6160,8 @@ var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
6160
6160
  mod
6161
6161
  ));
6162
6162
  var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
6163
- var src_exports = {};
6164
- __export2(src_exports, {
6163
+ var index_exports = {};
6164
+ __export2(index_exports, {
6165
6165
  CompositeFilesResolver: () => CompositeFilesResolver,
6166
6166
  InMemoryFilesResolver: () => InMemoryFilesResolver,
6167
6167
  loadRelatedSchemaFiles: () => loadRelatedSchemaFiles,
@@ -6169,7 +6169,7 @@ var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
6169
6169
  realFsResolver: () => realFsResolver,
6170
6170
  usesPrismaSchemaFolder: () => usesPrismaSchemaFolder2
6171
6171
  });
6172
- module2.exports = __toCommonJS2(src_exports);
6172
+ module2.exports = __toCommonJS2(index_exports);
6173
6173
  var import_node_path22 = __toESM22((0, import_chunk_WWAWV7DQ.__require)("node:path"));
6174
6174
  var import_prisma_schema_wasm2 = (0, import_chunk_WWAWV7DQ.__require)("@prisma/prisma-schema-wasm");
6175
6175
  var import_node_path5 = __toESM22((0, import_chunk_WWAWV7DQ.__require)("node:path"));
@@ -8544,7 +8544,7 @@ ${codeFrame}
8544
8544
  }
8545
8545
  });
8546
8546
  var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
8547
- "../../node_modules/.pnpm/spdx-license-ids@3.0.20/node_modules/spdx-license-ids/index.json"(exports, module2) {
8547
+ "../../node_modules/.pnpm/spdx-license-ids@3.0.21/node_modules/spdx-license-ids/index.json"(exports, module2) {
8548
8548
  module2.exports = [
8549
8549
  "0BSD",
8550
8550
  "3D-Slicer-1.0",
@@ -8636,6 +8636,7 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
8636
8636
  "Bitstream-Vera",
8637
8637
  "BlueOak-1.0.0",
8638
8638
  "Boehm-GC",
8639
+ "Boehm-GC-without-fee",
8639
8640
  "Borceux",
8640
8641
  "Brian-Gladman-2-Clause",
8641
8642
  "Brian-Gladman-3-Clause",
@@ -8695,6 +8696,8 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
8695
8696
  "CC-BY-SA-3.0-IGO",
8696
8697
  "CC-BY-SA-4.0",
8697
8698
  "CC-PDDC",
8699
+ "CC-PDM-1.0",
8700
+ "CC-SA-1.0",
8698
8701
  "CC0-1.0",
8699
8702
  "CDDL-1.0",
8700
8703
  "CDDL-1.1",
@@ -8745,6 +8748,7 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
8745
8748
  "DRL-1.1",
8746
8749
  "DSDP",
8747
8750
  "DocBook-Schema",
8751
+ "DocBook-Stylesheet",
8748
8752
  "DocBook-XML",
8749
8753
  "Dotseqn",
8750
8754
  "ECL-1.0",
@@ -8852,6 +8856,7 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
8852
8856
  "Imlib2",
8853
8857
  "Info-ZIP",
8854
8858
  "Inner-Net-2.0",
8859
+ "InnoSetup",
8855
8860
  "Intel",
8856
8861
  "Intel-ACPI",
8857
8862
  "Interbase-1.0",
@@ -8896,9 +8901,11 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
8896
8901
  "Linux-man-pages-copyleft-2-para",
8897
8902
  "Linux-man-pages-copyleft-var",
8898
8903
  "Lucida-Bitmap-Fonts",
8904
+ "MIPS",
8899
8905
  "MIT",
8900
8906
  "MIT-0",
8901
8907
  "MIT-CMU",
8908
+ "MIT-Click",
8902
8909
  "MIT-Festival",
8903
8910
  "MIT-Khronos-old",
8904
8911
  "MIT-Modern-Variant",
@@ -9049,6 +9056,7 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
9049
9056
  "SISSL",
9050
9057
  "SISSL-1.2",
9051
9058
  "SL",
9059
+ "SMAIL-GPL",
9052
9060
  "SMLNJ",
9053
9061
  "SMPPL",
9054
9062
  "SNIA",
@@ -9062,6 +9070,7 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
9062
9070
  "SchemeReport",
9063
9071
  "Sendmail",
9064
9072
  "Sendmail-8.23",
9073
+ "Sendmail-Open-Source-1.1",
9065
9074
  "SimPL-2.0",
9066
9075
  "Sleepycat",
9067
9076
  "Soundex",
@@ -9087,6 +9096,8 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
9087
9096
  "TU-Berlin-1.0",
9088
9097
  "TU-Berlin-2.0",
9089
9098
  "TermReadKey",
9099
+ "ThirdEye",
9100
+ "TrustedQSL",
9090
9101
  "UCAR",
9091
9102
  "UCL-1.0",
9092
9103
  "UMich-Merit",
@@ -9130,6 +9141,7 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
9130
9141
  "Zimbra-1.4",
9131
9142
  "Zlib",
9132
9143
  "any-OSI",
9144
+ "any-OSI-perl-modules",
9133
9145
  "bcrypt-Solar-Designer",
9134
9146
  "blessing",
9135
9147
  "bzip2-1.0.6",
@@ -9146,6 +9158,7 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
9146
9158
  "etalab-2.0",
9147
9159
  "fwlw",
9148
9160
  "gSOAP-1.3b",
9161
+ "generic-xts",
9149
9162
  "gnuplot",
9150
9163
  "gtkbook",
9151
9164
  "hdparm",
@@ -9174,6 +9187,7 @@ var require_spdx_license_ids = (0, import_chunk_WWAWV7DQ.__commonJS)({
9174
9187
  "threeparttable",
9175
9188
  "ulem",
9176
9189
  "w3m",
9190
+ "wwl",
9177
9191
  "xinetd",
9178
9192
  "xkeyboard-config-Zinoviev",
9179
9193
  "xlock",
@@ -11529,7 +11543,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
11529
11543
  "../internals/package.json"(exports, module2) {
11530
11544
  module2.exports = {
11531
11545
  name: "@prisma/internals",
11532
- version: "6.3.0-dev.3",
11546
+ version: "6.3.0-dev.30",
11533
11547
  description: "This package is intended for Prisma's internal use",
11534
11548
  main: "dist/index.js",
11535
11549
  types: "dist/index.d.ts",
@@ -11569,10 +11583,10 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
11569
11583
  "checkpoint-client": "1.1.33",
11570
11584
  "cli-truncate": "2.1.0",
11571
11585
  dotenv: "16.4.7",
11572
- esbuild: "0.24.0",
11586
+ esbuild: "0.24.2",
11573
11587
  "escape-string-regexp": "4.0.0",
11574
11588
  execa: "5.1.1",
11575
- "fast-glob": "3.3.2",
11589
+ "fast-glob": "3.3.3",
11576
11590
  "find-up": "5.0.0",
11577
11591
  "fp-ts": "2.16.9",
11578
11592
  "fs-extra": "11.1.1",
@@ -11594,7 +11608,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
11594
11608
  "p-map": "4.0.0",
11595
11609
  "read-package-up": "11.0.0",
11596
11610
  "replace-string": "3.1.0",
11597
- resolve: "1.22.8",
11611
+ resolve: "1.22.10",
11598
11612
  "string-width": "4.2.3",
11599
11613
  "strip-ansi": "6.0.1",
11600
11614
  "strip-indent": "3.0.0",
@@ -11603,7 +11617,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
11603
11617
  "terminal-link": "2.1.1",
11604
11618
  tmp: "0.2.3",
11605
11619
  "ts-node": "10.9.2",
11606
- "ts-pattern": "5.6.0",
11620
+ "ts-pattern": "5.6.2",
11607
11621
  "ts-toolbelt": "9.6.0",
11608
11622
  typescript: "5.4.5",
11609
11623
  yarn: "1.22.22"
@@ -11614,11 +11628,19 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
11614
11628
  "@prisma/fetch-engine": "workspace:*",
11615
11629
  "@prisma/generator-helper": "workspace:*",
11616
11630
  "@prisma/get-platform": "workspace:*",
11617
- "@prisma/prisma-schema-wasm": "6.3.0-4.66ff51574f705989a0e2c8bf6f1659bee5eb9517",
11631
+ "@prisma/prisma-schema-wasm": "6.3.0-17.acc0b9dd43eb689cbd20c9470515d719db10d0b0",
11618
11632
  "@prisma/schema-files-loader": "workspace:*",
11619
11633
  arg: "5.0.2",
11620
11634
  prompts: "2.4.2"
11621
11635
  },
11636
+ peerDependencies: {
11637
+ typescript: ">=5.1.0"
11638
+ },
11639
+ peerDependenciesMeta: {
11640
+ typescript: {
11641
+ optional: true
11642
+ }
11643
+ },
11622
11644
  sideEffects: false
11623
11645
  };
11624
11646
  }
@@ -11692,12 +11714,12 @@ function parseQueryEngineError({ errorOutput, reason }) {
11692
11714
  ),
11693
11715
  map((errorOutputAsJSON) => {
11694
11716
  const defaultMessage = (0, import_chunk_6TE2RIPN.red)((0, import_chunk_6TE2RIPN.bold)(relativizePathInPSLError(errorOutputAsJSON.message)));
11695
- const getConfigErrorInit = (0, import_chunk_E3UZYEGF.z)(errorOutputAsJSON).with({ error_code: "P1012" }, (eJSON) => {
11717
+ const getConfigErrorInit = (0, import_chunk_CQQQ436N.z)(errorOutputAsJSON).with({ error_code: "P1012" }, (eJSON) => {
11696
11718
  return {
11697
11719
  reason: createSchemaValidationError(reason),
11698
11720
  errorCode: eJSON.error_code
11699
11721
  };
11700
- }).with({ error_code: import_chunk_E3UZYEGF.N.string }, (eJSON) => {
11722
+ }).with({ error_code: import_chunk_CQQQ436N.N.string }, (eJSON) => {
11701
11723
  return {
11702
11724
  reason,
11703
11725
  errorCode: eJSON.error_code
@@ -11718,9 +11740,9 @@ var init_queryEngineCommons = (0, import_chunk_WWAWV7DQ.__esm)({
11718
11740
  "../internals/src/engine-commands/queryEngineCommons.ts"() {
11719
11741
  "use strict";
11720
11742
  init_Either();
11721
- import_function2 = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_E3UZYEGF.require_function)());
11743
+ import_function2 = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_CQQQ436N.require_function)());
11722
11744
  (0, import_chunk_6TE2RIPN.init_colors)();
11723
- (0, import_chunk_E3UZYEGF.init_dist)();
11745
+ (0, import_chunk_CQQQ436N.init_dist)();
11724
11746
  init_relativizePathInPSLError();
11725
11747
  createDebugErrorType = (debug4, fnName) => ({ type, reason, error }) => {
11726
11748
  debug4(`error of type "${type}" in ${fnName}:
@@ -11786,7 +11808,7 @@ async function getConfig(options) {
11786
11808
  }
11787
11809
  return Promise.resolve(data);
11788
11810
  }
11789
- const error = (0, import_chunk_E3UZYEGF.z)(configEither.left).with({ type: "wasm-error" }, (e) => {
11811
+ const error = (0, import_chunk_CQQQ436N.z)(configEither.left).with({ type: "wasm-error" }, (e) => {
11790
11812
  debugErrorType(e);
11791
11813
  if (isWasmPanic(e.error)) {
11792
11814
  const { message, stack } = getWasmError(e.error);
@@ -11851,9 +11873,9 @@ var init_getConfig = (0, import_chunk_WWAWV7DQ.__esm)({
11851
11873
  "../internals/src/engine-commands/getConfig.ts"() {
11852
11874
  "use strict";
11853
11875
  init_Either();
11854
- import_function3 = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_E3UZYEGF.require_function)());
11876
+ import_function3 = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_CQQQ436N.require_function)());
11855
11877
  (0, import_chunk_6TE2RIPN.init_colors)();
11856
- (0, import_chunk_E3UZYEGF.init_dist)();
11878
+ (0, import_chunk_CQQQ436N.init_dist)();
11857
11879
  init_panic();
11858
11880
  init_schemaFileInput();
11859
11881
  init_wasm();
@@ -11864,7 +11886,7 @@ var init_getConfig = (0, import_chunk_WWAWV7DQ.__esm)({
11864
11886
  SCHEMA_VALIDATION_ERROR_CODE = "P1012";
11865
11887
  GetConfigError = class extends Error {
11866
11888
  constructor(params) {
11867
- const constructedErrorMessage = (0, import_chunk_E3UZYEGF.z)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
11889
+ const constructedErrorMessage = (0, import_chunk_CQQQ436N.z)(params).with({ _tag: "parsed" }, ({ errorCode, message, reason }) => {
11868
11890
  const errorCodeMessage = errorCode ? `Error code: ${errorCode}` : "";
11869
11891
  return `${reason}
11870
11892
  ${errorCodeMessage}
@@ -12143,7 +12165,7 @@ var init_MigrateDiff = (0, import_chunk_WWAWV7DQ.__esm)({
12143
12165
  import_fs_jetpack = (0, import_chunk_WWAWV7DQ.__toESM)(require_main());
12144
12166
  (0, import_chunk_6TE2RIPN.init_colors)();
12145
12167
  init_getSchema();
12146
- (0, import_chunk_NCDRH4BH.init_Migrate)();
12168
+ (0, import_chunk_ZKWJDQMB.init_Migrate)();
12147
12169
  (0, import_chunk_TKAGMA5K.init_captureStdout)();
12148
12170
  debug3 = (0, import_debug3.default)("prisma:migrate:diff");
12149
12171
  helpOptions = (0, import_internals.format)(
@@ -12321,7 +12343,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
12321
12343
  url: `file:${d1Database}`
12322
12344
  };
12323
12345
  }
12324
- const migrate = new import_chunk_NCDRH4BH.Migrate();
12346
+ const migrate = new import_chunk_ZKWJDQMB.Migrate();
12325
12347
  const captureStdout = new import_chunk_TKAGMA5K.CaptureStdout();
12326
12348
  const outputPath = args["--output"];
12327
12349
  const isOutputDefined = Boolean(outputPath);
@@ -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 chunk_KX5GI2BM_exports = {};
30
- __export(chunk_KX5GI2BM_exports, {
29
+ var chunk_77RYI3ZW_exports = {};
30
+ __export(chunk_77RYI3ZW_exports, {
31
31
  MigrateStatus: () => MigrateStatus,
32
32
  init_MigrateStatus: () => init_MigrateStatus
33
33
  });
34
- module.exports = __toCommonJS(chunk_KX5GI2BM_exports);
35
- var import_chunk_NCDRH4BH = require("./chunk-NCDRH4BH.js");
34
+ module.exports = __toCommonJS(chunk_77RYI3ZW_exports);
35
+ var import_chunk_ZKWJDQMB = require("./chunk-ZKWJDQMB.js");
36
36
  var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
37
37
  var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
38
- var import_chunk_KEBB7UIB = require("./chunk-KEBB7UIB.js");
38
+ var import_chunk_XJQP3B4W = require("./chunk-XJQP3B4W.js");
39
39
  var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
40
40
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
41
41
  var import_debug = __toESM(require("@prisma/debug"));
@@ -44,8 +44,8 @@ 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_NCDRH4BH.init_Migrate)();
48
- (0, import_chunk_KEBB7UIB.init_ensureDatabaseExists)();
47
+ (0, import_chunk_ZKWJDQMB.init_Migrate)();
48
+ (0, import_chunk_XJQP3B4W.init_ensureDatabaseExists)();
49
49
  (0, import_chunk_EYA6AFSF.init_getSchemaPathAndPrint)();
50
50
  (0, import_chunk_Q7ACZDDT.init_printDatasource)();
51
51
  debug = (0, import_debug.default)("prisma:migrate:status");
@@ -73,9 +73,9 @@ var init_MigrateStatus = (0, import_chunk_WWAWV7DQ.__esm)({
73
73
  }
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
- (0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0, import_chunk_KEBB7UIB.getDatasourceInfo)({ schemaPath }) });
77
- const migrate = new import_chunk_NCDRH4BH.Migrate(schemaPath);
78
- await (0, import_chunk_KEBB7UIB.ensureCanConnectToDatabase)(schemaPath);
76
+ (0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath }) });
77
+ const migrate = new import_chunk_ZKWJDQMB.Migrate(schemaPath);
78
+ await (0, import_chunk_XJQP3B4W.ensureCanConnectToDatabase)(schemaPath);
79
79
  let diagnoseResult;
80
80
  let listMigrationDirectoriesResult;
81
81
  try {
@@ -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 chunk_4NDZU7KV_exports = {};
30
- __export(chunk_4NDZU7KV_exports, {
29
+ var chunk_7QAR4NT3_exports = {};
30
+ __export(chunk_7QAR4NT3_exports, {
31
31
  MigrateReset: () => MigrateReset,
32
32
  init_MigrateReset: () => init_MigrateReset
33
33
  });
34
- module.exports = __toCommonJS(chunk_4NDZU7KV_exports);
34
+ module.exports = __toCommonJS(chunk_7QAR4NT3_exports);
35
35
  var import_chunk_YKUZUAXA = require("./chunk-YKUZUAXA.js");
36
36
  var import_chunk_WOOPRG54 = require("./chunk-WOOPRG54.js");
37
- var import_chunk_NCDRH4BH = require("./chunk-NCDRH4BH.js");
37
+ var import_chunk_ZKWJDQMB = require("./chunk-ZKWJDQMB.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");
41
- var import_chunk_KEBB7UIB = require("./chunk-KEBB7UIB.js");
41
+ var import_chunk_XJQP3B4W = require("./chunk-XJQP3B4W.js");
42
42
  var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
43
43
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
44
44
  var import_internals = require("@prisma/internals");
@@ -47,8 +47,8 @@ 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_NCDRH4BH.init_Migrate)();
51
- (0, import_chunk_KEBB7UIB.init_ensureDatabaseExists)();
50
+ (0, import_chunk_ZKWJDQMB.init_Migrate)();
51
+ (0, import_chunk_XJQP3B4W.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)();
@@ -78,8 +78,9 @@ var init_MigrateReset = (0, import_chunk_WWAWV7DQ.__esm)({
78
78
  }
79
79
  await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
80
80
  const { schemaPath } = await (0, import_chunk_EYA6AFSF.getSchemaPathAndPrint)(args["--schema"]);
81
- (0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0, import_chunk_KEBB7UIB.getDatasourceInfo)({ schemaPath }) });
82
- const wasDbCreated = await (0, import_chunk_KEBB7UIB.ensureDatabaseExists)("create", schemaPath);
81
+ const datasourceInfo = await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath });
82
+ (0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo });
83
+ const wasDbCreated = await (0, import_chunk_XJQP3B4W.ensureDatabaseExists)("create", schemaPath);
83
84
  if (wasDbCreated) {
84
85
  process.stdout.write("\n" + wasDbCreated + "\n");
85
86
  }
@@ -99,7 +100,7 @@ var init_MigrateReset = (0, import_chunk_WWAWV7DQ.__esm)({
99
100
  process.exit(130);
100
101
  }
101
102
  }
102
- const migrate = new import_chunk_NCDRH4BH.Migrate(schemaPath);
103
+ const migrate = new import_chunk_ZKWJDQMB.Migrate(schemaPath);
103
104
  let migrationIds;
104
105
  try {
105
106
  await migrate.reset();
@@ -125,7 +126,7 @@ ${(0, import_chunk_WOOPRG54.printFilesFromMigrationIds)("migrations", migrationI
125
126
  );
126
127
  }
127
128
  if (!process.env.PRISMA_MIGRATE_SKIP_GENERATE && !args["--skip-generate"]) {
128
- await migrate.tryToRunGenerate();
129
+ await migrate.tryToRunGenerate(datasourceInfo);
129
130
  }
130
131
  if (!process.env.PRISMA_MIGRATE_SKIP_SEED && !args["--skip-seed"]) {
131
132
  const seedCommandFromPkgJson = await (0, import_chunk_YKUZUAXA.getSeedCommandFromPackageJson)(process.cwd());
@@ -16,14 +16,14 @@ 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_XQJTDY7A_exports = {};
20
- __export(chunk_XQJTDY7A_exports, {
19
+ var chunk_AMRGQNRR_exports = {};
20
+ __export(chunk_AMRGQNRR_exports, {
21
21
  introspectSql: () => introspectSql
22
22
  });
23
- module.exports = __toCommonJS(chunk_XQJTDY7A_exports);
24
- var import_chunk_7MUF3HLX = require("./chunk-7MUF3HLX.js");
23
+ module.exports = __toCommonJS(chunk_AMRGQNRR_exports);
24
+ var import_chunk_Q3SQU7C6 = require("./chunk-Q3SQU7C6.js");
25
25
  var import_internals = require("@prisma/internals");
26
- (0, import_chunk_7MUF3HLX.init_SchemaEngine)();
26
+ (0, import_chunk_Q3SQU7C6.init_SchemaEngine)();
27
27
  var supportedProviders = ["postgresql", "cockroachdb", "mysql", "sqlite"];
28
28
  async function introspectSql(schemaPath, queries) {
29
29
  const schema = await (0, import_internals.getSchemaWithPath)(schemaPath);
@@ -42,7 +42,7 @@ async function introspectSql(schemaPath, queries) {
42
42
  if (!url) {
43
43
  throw new Error(`Could not get url from datasource ${firstDatasource.name} in ${schema.schemaPath}`);
44
44
  }
45
- const schemaEngine = new import_chunk_7MUF3HLX.SchemaEngine({ schemaPath: schema.schemaPath });
45
+ const schemaEngine = new import_chunk_Q3SQU7C6.SchemaEngine({ schemaPath: schema.schemaPath });
46
46
  const results = [];
47
47
  const errors = [];
48
48
  try {
@@ -26,8 +26,8 @@ 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_E3UZYEGF_exports = {};
30
- __export(chunk_E3UZYEGF_exports, {
29
+ var chunk_CQQQ436N_exports = {};
30
+ __export(chunk_CQQQ436N_exports, {
31
31
  N: () => N,
32
32
  handleViewsIO: () => handleViewsIO,
33
33
  init_dist: () => init_dist,
@@ -35,7 +35,7 @@ __export(chunk_E3UZYEGF_exports, {
35
35
  require_function: () => require_function,
36
36
  z: () => z
37
37
  });
38
- module.exports = __toCommonJS(chunk_E3UZYEGF_exports);
38
+ module.exports = __toCommonJS(chunk_CQQQ436N_exports);
39
39
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
40
40
  var import_internals = require("@prisma/internals");
41
41
  var import_path = __toESM(require("path"));
@@ -4332,7 +4332,7 @@ function z(t2) {
4332
4332
  }
4333
4333
  var t, e, n, r, i, s, o, c, f, g, S, O, j, K, x, E, A, P, T, B, _, k, N, W, $, I;
4334
4334
  var init_dist = (0, import_chunk_WWAWV7DQ.__esm)({
4335
- "../../node_modules/.pnpm/ts-pattern@5.6.0/node_modules/ts-pattern/dist/index.js"() {
4335
+ "../../node_modules/.pnpm/ts-pattern@5.6.2/node_modules/ts-pattern/dist/index.js"() {
4336
4336
  "use strict";
4337
4337
  t = Symbol.for("@ts-pattern/matcher");
4338
4338
  e = Symbol.for("@ts-pattern/isVariadic");
@@ -26,22 +26,22 @@ 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_3EBHV6P7_exports = {};
30
- __export(chunk_3EBHV6P7_exports, {
29
+ var chunk_CSUAUCRR_exports = {};
30
+ __export(chunk_CSUAUCRR_exports, {
31
31
  MigrateDev: () => MigrateDev,
32
32
  init_MigrateDev: () => init_MigrateDev
33
33
  });
34
- module.exports = __toCommonJS(chunk_3EBHV6P7_exports);
34
+ module.exports = __toCommonJS(chunk_CSUAUCRR_exports);
35
35
  var import_chunk_IFCV5MY4 = require("./chunk-IFCV5MY4.js");
36
36
  var import_chunk_SGCF5OHF = require("./chunk-SGCF5OHF.js");
37
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_NCDRH4BH = require("./chunk-NCDRH4BH.js");
40
+ var import_chunk_ZKWJDQMB = require("./chunk-ZKWJDQMB.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");
44
- var import_chunk_KEBB7UIB = require("./chunk-KEBB7UIB.js");
44
+ var import_chunk_XJQP3B4W = require("./chunk-XJQP3B4W.js");
45
45
  var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
46
46
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
47
47
  var import_debug = __toESM(require("@prisma/debug"));
@@ -51,8 +51,8 @@ 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_NCDRH4BH.init_Migrate)();
55
- (0, import_chunk_KEBB7UIB.init_ensureDatabaseExists)();
54
+ (0, import_chunk_ZKWJDQMB.init_Migrate)();
55
+ (0, import_chunk_XJQP3B4W.init_ensureDatabaseExists)();
56
56
  (0, import_chunk_U374EXYQ.init_errors)();
57
57
  (0, import_chunk_EYA6AFSF.init_getSchemaPathAndPrint)();
58
58
  (0, import_chunk_SGCF5OHF.init_handleEvaluateDataloss)();
@@ -89,7 +89,7 @@ var init_MigrateDev = (0, import_chunk_WWAWV7DQ.__esm)({
89
89
  }
90
90
  await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
91
91
  const { schemaPath, schemas } = await (0, import_chunk_EYA6AFSF.getSchemaPathAndPrint)(args["--schema"]);
92
- const datasourceInfo = await (0, import_chunk_KEBB7UIB.getDatasourceInfo)({ schemaPath });
92
+ const datasourceInfo = await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath });
93
93
  (0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo });
94
94
  process.stdout.write("\n");
95
95
  (0, import_internals.validate)({
@@ -99,11 +99,11 @@ var init_MigrateDev = (0, import_chunk_WWAWV7DQ.__esm)({
99
99
  datamodel: schemas,
100
100
  ignoreEnvVarErrors: false
101
101
  });
102
- const wasDbCreated = await (0, import_chunk_KEBB7UIB.ensureDatabaseExists)("create", schemaPath);
102
+ const wasDbCreated = await (0, import_chunk_XJQP3B4W.ensureDatabaseExists)("create", schemaPath);
103
103
  if (wasDbCreated) {
104
104
  process.stdout.write(wasDbCreated + "\n\n");
105
105
  }
106
- const migrate = new import_chunk_NCDRH4BH.Migrate(schemaPath);
106
+ const migrate = new import_chunk_ZKWJDQMB.Migrate(schemaPath);
107
107
  let devDiagnostic;
108
108
  try {
109
109
  devDiagnostic = await migrate.devDiagnostic();
@@ -263,7 +263,7 @@ ${(0, import_chunk_6TE2RIPN.green)("Your database is now in sync with your schem
263
263
  );
264
264
  }
265
265
  if (!process.env.PRISMA_MIGRATE_SKIP_GENERATE && !args["--skip-generate"]) {
266
- await migrate.tryToRunGenerate();
266
+ await migrate.tryToRunGenerate(datasourceInfo);
267
267
  process.stdout.write("\n");
268
268
  }
269
269
  if ((wasDbCreated || devDiagnostic.action.tag === "reset") && !process.env.PRISMA_MIGRATE_SKIP_SEED && !args["--skip-seed"]) {
@@ -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_UI76O6B2_exports = {};
30
- __export(chunk_UI76O6B2_exports, {
29
+ var chunk_G66QFMM5_exports = {};
30
+ __export(chunk_G66QFMM5_exports, {
31
31
  DbExecute: () => DbExecute,
32
32
  init_DbExecute: () => init_DbExecute
33
33
  });
34
- module.exports = __toCommonJS(chunk_UI76O6B2_exports);
35
- var import_chunk_NCDRH4BH = require("./chunk-NCDRH4BH.js");
34
+ module.exports = __toCommonJS(chunk_G66QFMM5_exports);
35
+ var import_chunk_ZKWJDQMB = require("./chunk-ZKWJDQMB.js");
36
36
  var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
37
37
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
38
38
  var import_internals = require("@prisma/internals");
@@ -72,7 +72,7 @@ var init_DbExecute = (0, import_chunk_WWAWV7DQ.__esm)({
72
72
  "src/commands/DbExecute.ts"() {
73
73
  import_get_stdin = (0, import_chunk_WWAWV7DQ.__toESM)(require_get_stdin());
74
74
  (0, import_chunk_6TE2RIPN.init_colors)();
75
- (0, import_chunk_NCDRH4BH.init_Migrate)();
75
+ (0, import_chunk_ZKWJDQMB.init_Migrate)();
76
76
  helpOptions = (0, import_internals.format)(
77
77
  `${(0, import_chunk_6TE2RIPN.bold)("Usage")}
78
78
 
@@ -171,7 +171,7 @@ See \`${(0, import_chunk_6TE2RIPN.green)((0, import_internals.getCommandWithExec
171
171
  ...(0, import_internals.toSchemasWithConfigDir)(schemaWithPath, config)
172
172
  };
173
173
  }
174
- const migrate = new import_chunk_NCDRH4BH.Migrate();
174
+ const migrate = new import_chunk_ZKWJDQMB.Migrate();
175
175
  try {
176
176
  await migrate.engine.dbExecute({
177
177
  script,
@@ -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_MBLWML5Q_exports = {};
30
- __export(chunk_MBLWML5Q_exports, {
29
+ var chunk_HAJNCOW7_exports = {};
30
+ __export(chunk_HAJNCOW7_exports, {
31
31
  DbPull: () => DbPull,
32
32
  init_DbPull: () => init_DbPull
33
33
  });
34
- module.exports = __toCommonJS(chunk_MBLWML5Q_exports);
34
+ module.exports = __toCommonJS(chunk_HAJNCOW7_exports);
35
35
  var import_chunk_GRGGAY6L = require("./chunk-GRGGAY6L.js");
36
36
  var import_chunk_ILJRJJ3S = require("./chunk-ILJRJJ3S.js");
37
37
  var import_chunk_35LAJN5S = require("./chunk-35LAJN5S.js");
@@ -40,11 +40,11 @@ var import_chunk_V7DE6JTG = require("./chunk-V7DE6JTG.js");
40
40
  var import_chunk_QBK5XTJE = require("./chunk-QBK5XTJE.js");
41
41
  var import_chunk_INC2OACE = require("./chunk-INC2OACE.js");
42
42
  var import_chunk_GN5BY5N2 = require("./chunk-GN5BY5N2.js");
43
- var import_chunk_7MUF3HLX = require("./chunk-7MUF3HLX.js");
44
- var import_chunk_E3UZYEGF = require("./chunk-E3UZYEGF.js");
43
+ var import_chunk_Q3SQU7C6 = require("./chunk-Q3SQU7C6.js");
44
+ var import_chunk_CQQQ436N = require("./chunk-CQQQ436N.js");
45
45
  var import_chunk_U374EXYQ = require("./chunk-U374EXYQ.js");
46
46
  var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
47
- var import_chunk_KEBB7UIB = require("./chunk-KEBB7UIB.js");
47
+ var import_chunk_XJQP3B4W = require("./chunk-XJQP3B4W.js");
48
48
  var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
49
49
  var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
50
50
  var import_debug = __toESM(require("@prisma/debug"));
@@ -54,10 +54,10 @@ var debug, _DbPull, DbPull;
54
54
  var init_DbPull = (0, import_chunk_WWAWV7DQ.__esm)({
55
55
  "src/commands/DbPull.ts"() {
56
56
  (0, import_chunk_6TE2RIPN.init_colors)();
57
- (0, import_chunk_E3UZYEGF.init_dist)();
58
- (0, import_chunk_7MUF3HLX.init_SchemaEngine)();
57
+ (0, import_chunk_CQQQ436N.init_dist)();
58
+ (0, import_chunk_Q3SQU7C6.init_SchemaEngine)();
59
59
  (0, import_chunk_GN5BY5N2.init_countModelsAndTypes)();
60
- (0, import_chunk_KEBB7UIB.init_ensureDatabaseExists)();
60
+ (0, import_chunk_XJQP3B4W.init_ensureDatabaseExists)();
61
61
  (0, import_chunk_U374EXYQ.init_errors)();
62
62
  (0, import_chunk_INC2OACE.init_isSchemaEmpty)();
63
63
  (0, import_chunk_Q7ACZDDT.init_printDatasource)();
@@ -113,7 +113,7 @@ var init_DbPull = (0, import_chunk_WWAWV7DQ.__esm)({
113
113
  if (schemaPath && !args["--print"]) {
114
114
  process.stdout.write((0, import_chunk_6TE2RIPN.dim)(`Prisma schema loaded from ${import_path.default.relative(process.cwd(), schemaPath)}`) + "\n");
115
115
  await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
116
- (0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0, import_chunk_KEBB7UIB.getDatasourceInfo)({ schemaPath }) });
116
+ (0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath }) });
117
117
  } else {
118
118
  await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: false });
119
119
  }
@@ -121,7 +121,7 @@ var init_DbPull = (0, import_chunk_WWAWV7DQ.__esm)({
121
121
  if (!url && !schemaPath && !fromD1) {
122
122
  throw new import_chunk_U374EXYQ.NoSchemaFoundError();
123
123
  }
124
- const { firstDatasource, schema, validationWarning } = await (0, import_chunk_E3UZYEGF.z)({ url, schemaPath, fromD1 }).when(
124
+ const { firstDatasource, schema, validationWarning } = await (0, import_chunk_CQQQ436N.z)({ url, schemaPath, fromD1 }).when(
125
125
  (input) => input.schemaPath !== null,
126
126
  async (input) => {
127
127
  const rawSchema = await (0, import_internals.getSchema)(input.schemaPath);
@@ -217,7 +217,7 @@ Some information will be lost (relations, comments, mapped fields, @ignore...),
217
217
  )} for more info.`);
218
218
  }
219
219
  }
220
- const engine = new import_chunk_7MUF3HLX.SchemaEngine({
220
+ const engine = new import_chunk_Q3SQU7C6.SchemaEngine({
221
221
  schemaPath: schemaPath ?? void 0
222
222
  });
223
223
  const basedOn = !args["--url"] && schemaPath ? ` based on datasource defined in ${(0, import_chunk_6TE2RIPN.underline)(import_path.default.relative(process.cwd(), schemaPath))}` : "";