@prisma/migrate 6.6.0-dev.5 → 6.6.0-dev.52

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 (140) hide show
  1. package/dist/CLI.js +3 -3
  2. package/dist/Migrate.js +8 -6
  3. package/dist/SchemaEngine.js +5 -5
  4. package/dist/bin.js +47 -46
  5. package/dist/chunk-23DZXSTI.js +62 -0
  6. package/dist/{chunk-WWAWV7DQ.js → chunk-2ESYSVXG.js} +3 -27
  7. package/dist/{chunk-LKTTJWFT.js → chunk-2R6DII47.js} +5 -5
  8. package/dist/chunk-33LPBNDX.js +1399 -0
  9. package/dist/{chunk-GG54LOYV.js → chunk-3PIR4R46.js} +45 -44
  10. package/dist/{chunk-UG7FMNDT.js → chunk-3VPUKOUG.js} +365 -518
  11. package/dist/{chunk-A6PMXMMT.js → chunk-4RKCE4QB.js} +95 -13
  12. package/dist/{chunk-V3ZMNXZC.js → chunk-5LKIRKDL.js} +307 -382
  13. package/dist/{chunk-IR55GBON.js → chunk-5LTDMS3H.js} +18 -18
  14. package/dist/{chunk-LOGAFLCN.js → chunk-5R44VVVX.js} +29 -29
  15. package/dist/{chunk-DJMFXNR4.js → chunk-74LUB4XX.js} +56 -57
  16. package/dist/{chunk-RP2N6UXA.js → chunk-AI6DH66U.js} +6 -6
  17. package/dist/{chunk-G2XUUMKH.js → chunk-B4SUSDC2.js} +31 -39
  18. package/dist/{chunk-Q3ZLC44N.js → chunk-CKRN45WP.js} +57 -66
  19. package/dist/{chunk-ZOEKRXDP.js → chunk-D2DGSPW6.js} +29 -55
  20. package/dist/{chunk-XE57D2AO.js → chunk-DAPW4IMN.js} +366 -519
  21. package/dist/{chunk-W2SZNLK4.js → chunk-EJG7GKM7.js} +37 -39
  22. package/dist/{chunk-5PSO7BDO.js → chunk-EJUXYFV3.js} +15 -15
  23. package/dist/{chunk-N3KYWSX2.js → chunk-GAKKKF5T.js} +55 -49
  24. package/dist/{chunk-N4XTKFY6.js → chunk-GKHRL6AR.js} +39 -38
  25. package/dist/{chunk-CQZFVAXC.js → chunk-HHVLUI3H.js} +42 -41
  26. package/dist/{chunk-MCWCB2AX.js → chunk-IINN7QUV.js} +170 -643
  27. package/dist/{chunk-HCBZB4XC.js → chunk-KN2W5IP7.js} +53 -52
  28. package/dist/{chunk-255BRND3.js → chunk-KRQEFTDT.js} +6 -6
  29. package/dist/{chunk-VVKOFN3Y.js → chunk-LLO7YF56.js} +44 -46
  30. package/dist/{chunk-VZ23KD5C.js → chunk-NGQA5JTN.js} +8 -10
  31. package/dist/{chunk-MKK3GSDF.js → chunk-NIKXBMZL.js} +5 -5
  32. package/dist/{chunk-KS7IEA6Z.js → chunk-O723A5JE.js} +50 -52
  33. package/dist/{chunk-MATFO4ZW.js → chunk-OEWQACEH.js} +38 -39
  34. package/dist/chunk-PDCXVUV3.js +883 -0
  35. package/dist/{chunk-EGPJABTW.js → chunk-QVMYNWAN.js} +257 -103
  36. package/dist/{chunk-V5TUSOJX.js → chunk-SQKGZVG3.js} +45 -45
  37. package/dist/chunk-URKH6SE2.js +479 -0
  38. package/dist/chunk-V6PVGSDJ.js +76 -0
  39. package/dist/{chunk-DLLXDCI2.js → chunk-VAJ4VX67.js} +5 -6
  40. package/dist/{chunk-OCQGHQED.js → chunk-YBX7R3MT.js} +12 -12
  41. package/dist/{chunk-WI2A2TQE.js → chunk-ZJ4IDCRR.js} +90 -91
  42. package/dist/commands/DbCommand.js +3 -3
  43. package/dist/commands/DbDrop.js +4 -5
  44. package/dist/commands/DbExecute.js +9 -7
  45. package/dist/commands/DbPull.js +11 -10
  46. package/dist/commands/DbPush.js +10 -9
  47. package/dist/commands/DbSeed.js +4 -5
  48. package/dist/commands/MigrateCommand.js +3 -3
  49. package/dist/commands/MigrateDeploy.js +12 -11
  50. package/dist/commands/MigrateDev.js +14 -13
  51. package/dist/commands/MigrateDiff.js +12 -10
  52. package/dist/commands/MigrateReset.js +13 -12
  53. package/dist/commands/MigrateResolve.js +10 -9
  54. package/dist/commands/MigrateStatus.js +10 -9
  55. package/dist/index.js +50 -51
  56. package/dist/internals/src/Generator.d.ts +1 -1
  57. package/dist/internals/src/cli/checkUnsupportedDataProxy.d.ts +12 -17
  58. package/dist/internals/src/cli/directoryConfig.d.ts +7 -0
  59. package/dist/internals/src/cli/getSchema.d.ts +3 -28
  60. package/dist/internals/src/cli/hashes.d.ts +1 -2
  61. package/dist/internals/src/cli/schemaContext.d.ts +59 -0
  62. package/dist/internals/src/client/getClientEngineType.d.ts +1 -1
  63. package/dist/internals/src/convertCredentials.d.ts +1 -1
  64. package/dist/internals/src/engine-commands/getConfig.d.ts +1 -5
  65. package/dist/internals/src/engine-commands/getDmmf.d.ts +3 -6
  66. package/dist/internals/src/engine-commands/lintSchema.d.ts +1 -1
  67. package/dist/internals/src/errorReporting.d.ts +0 -1
  68. package/dist/internals/src/get-generators/getGenerators.d.ts +8 -4
  69. package/dist/internals/src/get-generators/utils/binaryTypeToEngineType.d.ts +1 -1
  70. package/dist/internals/src/get-generators/utils/engineTypeToBinaryType.d.ts +1 -1
  71. package/dist/internals/src/get-generators/utils/fixBinaryTargets.d.ts +1 -1
  72. package/dist/internals/src/get-generators/utils/getBinaryPathsByVersion.d.ts +1 -1
  73. package/dist/internals/src/get-generators/utils/getEngineVersionForGenerator.d.ts +1 -1
  74. package/dist/internals/src/get-generators/utils/printGeneratorConfig.d.ts +1 -1
  75. package/dist/internals/src/index.d.ts +5 -3
  76. package/dist/internals/src/migrateTypes.d.ts +63 -0
  77. package/dist/internals/src/panic.d.ts +1 -4
  78. package/dist/internals/src/types.d.ts +1 -1
  79. package/dist/internals/src/utils/extractPreviewFeatures.d.ts +2 -2
  80. package/dist/internals/src/utils/getEnvPaths.d.ts +1 -1
  81. package/dist/internals/src/utils/parseEnvValue.d.ts +1 -1
  82. package/dist/internals/src/utils/schemaFileInput.d.ts +0 -4
  83. package/dist/internals/src/utils/toSchemasContainer.d.ts +2 -3
  84. package/dist/migrate/src/Migrate.d.ts +7 -5
  85. package/dist/migrate/src/SchemaEngine.d.ts +5 -9
  86. package/dist/migrate/src/index.d.ts +0 -1
  87. package/dist/migrate/src/types.d.ts +14 -10
  88. package/dist/migrate/src/utils/createMigration.d.ts +21 -0
  89. package/dist/migrate/src/utils/ensureDatabaseExists.d.ts +4 -6
  90. package/dist/migrate/src/utils/introspectSql.d.ts +3 -2
  91. package/dist/migrate/src/utils/listMigrations.d.ts +9 -0
  92. package/dist/migrate/src/utils/printDatasources.d.ts +1 -1
  93. package/dist/migrate/src/utils/seed.d.ts +0 -2
  94. package/dist/migrate/src/views/handleViewsIO.d.ts +2 -2
  95. package/dist/{multipart-parser-54WEFGGN-NLZG56KM.js → multipart-parser-ASKQAOL4-WZ47HU6G.js} +92 -125
  96. package/dist/{multipart-parser-NDLECNMN.js → multipart-parser-QCI3Y5IB.js} +66 -68
  97. package/dist/types.js +1 -1
  98. package/dist/{typescript-WN4QH2CP.js → typescript-2LKASCMC.js} +33 -33
  99. package/dist/{typescript-AILDXN3I.js → typescript-H3AVJ6KX.js} +32 -32
  100. package/dist/utils/byline.js +1 -1
  101. package/dist/utils/captureStdout.js +3 -3
  102. package/dist/utils/countModelsAndTypes.js +1 -1
  103. package/dist/utils/{getSchemaPathAndPrint.js → createMigration.js} +8 -8
  104. package/dist/utils/customColors.js +1 -1
  105. package/dist/utils/ensureDatabaseExists.js +7 -7
  106. package/dist/utils/errors.js +1 -1
  107. package/dist/utils/flagErrors.js +1 -1
  108. package/dist/utils/getDatabaseVersionSafe.js +5 -5
  109. package/dist/utils/handleEvaluateDataloss.js +1 -1
  110. package/dist/utils/introspectSql.js +5 -5
  111. package/dist/utils/isSchemaEmpty.js +1 -1
  112. package/dist/utils/listMigrations.js +25 -0
  113. package/dist/utils/now.js +1 -1
  114. package/dist/utils/printDatasource.js +1 -1
  115. package/dist/utils/printDatasources.js +5 -5
  116. package/dist/utils/printFiles.js +5 -5
  117. package/dist/utils/printIntrospectedSchema.js +1 -1
  118. package/dist/utils/printMigrationId.js +1 -1
  119. package/dist/utils/promptForMigrationName.js +3 -3
  120. package/dist/utils/removeSchemaFiles.js +1 -1
  121. package/dist/utils/replaceOrAddDatasource.js +1 -1
  122. package/dist/utils/replaceOrAddDatasource.test.js +1 -1
  123. package/dist/utils/saveSchemaFiles.js +1 -1
  124. package/dist/utils/seed.js +4 -7
  125. package/dist/utils/setupCockroach.js +3 -3
  126. package/dist/utils/setupMSSQL.js +1487 -707
  127. package/dist/utils/setupMongo.js +552 -552
  128. package/dist/utils/setupMysql.js +508 -563
  129. package/dist/utils/setupPostgres.js +3 -3
  130. package/dist/utils/spinner.js +4 -3
  131. package/dist/utils/test-handlePanic.js +1 -30
  132. package/dist/utils/unixSocket.js +1 -1
  133. package/dist/views/handleViewsIO.js +3 -3
  134. package/package.json +10 -11
  135. package/dist/chunk-GKDFIHM2.js +0 -45
  136. package/dist/chunk-J46BJQHT.js +0 -268
  137. package/dist/chunk-KOF4LGTS.js +0 -1817
  138. package/dist/chunk-YYPMC5FN.js +0 -1407
  139. package/dist/internals/src/get-generators/utils/check-feature-flags/checkFeatureFlags.d.ts +0 -8
  140. package/dist/migrate/src/utils/getSchemaPathAndPrint.d.ts +0 -10
@@ -16,11 +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_A6PMXMMT_exports = {};
20
- __export(chunk_A6PMXMMT_exports, {
19
+ var chunk_4RKCE4QB_exports = {};
20
+ __export(chunk_4RKCE4QB_exports, {
21
21
  require_clean: () => require_clean,
22
22
  require_constants: () => require_constants,
23
23
  require_debug: () => require_debug,
24
+ require_function_bind: () => require_function_bind,
24
25
  require_identifiers: () => require_identifiers,
25
26
  require_parse: () => require_parse,
26
27
  require_parse_options: () => require_parse_options,
@@ -28,9 +29,9 @@ __export(chunk_A6PMXMMT_exports, {
28
29
  require_semver: () => require_semver,
29
30
  require_valid: () => require_valid
30
31
  });
31
- module.exports = __toCommonJS(chunk_A6PMXMMT_exports);
32
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
33
- var require_debug = (0, import_chunk_WWAWV7DQ.__commonJS)({
32
+ module.exports = __toCommonJS(chunk_4RKCE4QB_exports);
33
+ var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
34
+ var require_debug = (0, import_chunk_2ESYSVXG.__commonJS)({
34
35
  "../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/internal/debug.js"(exports, module2) {
35
36
  "use strict";
36
37
  var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
@@ -38,7 +39,7 @@ var require_debug = (0, import_chunk_WWAWV7DQ.__commonJS)({
38
39
  module2.exports = debug;
39
40
  }
40
41
  });
41
- var require_constants = (0, import_chunk_WWAWV7DQ.__commonJS)({
42
+ var require_constants = (0, import_chunk_2ESYSVXG.__commonJS)({
42
43
  "../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/internal/constants.js"(exports, module2) {
43
44
  "use strict";
44
45
  var SEMVER_SPEC_VERSION = "2.0.0";
@@ -68,7 +69,7 @@ var require_constants = (0, import_chunk_WWAWV7DQ.__commonJS)({
68
69
  };
69
70
  }
70
71
  });
71
- var require_re = (0, import_chunk_WWAWV7DQ.__commonJS)({
72
+ var require_re = (0, import_chunk_2ESYSVXG.__commonJS)({
72
73
  "../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/internal/re.js"(exports, module2) {
73
74
  "use strict";
74
75
  var {
@@ -152,7 +153,7 @@ var require_re = (0, import_chunk_WWAWV7DQ.__commonJS)({
152
153
  createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
153
154
  }
154
155
  });
155
- var require_parse_options = (0, import_chunk_WWAWV7DQ.__commonJS)({
156
+ var require_parse_options = (0, import_chunk_2ESYSVXG.__commonJS)({
156
157
  "../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/internal/parse-options.js"(exports, module2) {
157
158
  "use strict";
158
159
  var looseOption = Object.freeze({ loose: true });
@@ -169,7 +170,7 @@ var require_parse_options = (0, import_chunk_WWAWV7DQ.__commonJS)({
169
170
  module2.exports = parseOptions;
170
171
  }
171
172
  });
172
- var require_identifiers = (0, import_chunk_WWAWV7DQ.__commonJS)({
173
+ var require_identifiers = (0, import_chunk_2ESYSVXG.__commonJS)({
173
174
  "../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/internal/identifiers.js"(exports, module2) {
174
175
  "use strict";
175
176
  var numeric = /^[0-9]+$/;
@@ -189,7 +190,7 @@ var require_identifiers = (0, import_chunk_WWAWV7DQ.__commonJS)({
189
190
  };
190
191
  }
191
192
  });
192
- var require_semver = (0, import_chunk_WWAWV7DQ.__commonJS)({
193
+ var require_semver = (0, import_chunk_2ESYSVXG.__commonJS)({
193
194
  "../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/classes/semver.js"(exports, module2) {
194
195
  "use strict";
195
196
  var debug = require_debug();
@@ -448,7 +449,7 @@ var require_semver = (0, import_chunk_WWAWV7DQ.__commonJS)({
448
449
  module2.exports = SemVer;
449
450
  }
450
451
  });
451
- var require_parse = (0, import_chunk_WWAWV7DQ.__commonJS)({
452
+ var require_parse = (0, import_chunk_2ESYSVXG.__commonJS)({
452
453
  "../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/functions/parse.js"(exports, module2) {
453
454
  "use strict";
454
455
  var SemVer = require_semver();
@@ -468,7 +469,7 @@ var require_parse = (0, import_chunk_WWAWV7DQ.__commonJS)({
468
469
  module2.exports = parse;
469
470
  }
470
471
  });
471
- var require_valid = (0, import_chunk_WWAWV7DQ.__commonJS)({
472
+ var require_valid = (0, import_chunk_2ESYSVXG.__commonJS)({
472
473
  "../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/functions/valid.js"(exports, module2) {
473
474
  "use strict";
474
475
  var parse = require_parse();
@@ -479,7 +480,7 @@ var require_valid = (0, import_chunk_WWAWV7DQ.__commonJS)({
479
480
  module2.exports = valid;
480
481
  }
481
482
  });
482
- var require_clean = (0, import_chunk_WWAWV7DQ.__commonJS)({
483
+ var require_clean = (0, import_chunk_2ESYSVXG.__commonJS)({
483
484
  "../../node_modules/.pnpm/semver@7.7.0/node_modules/semver/functions/clean.js"(exports, module2) {
484
485
  "use strict";
485
486
  var parse = require_parse();
@@ -490,3 +491,84 @@ var require_clean = (0, import_chunk_WWAWV7DQ.__commonJS)({
490
491
  module2.exports = clean;
491
492
  }
492
493
  });
494
+ var require_implementation = (0, import_chunk_2ESYSVXG.__commonJS)({
495
+ "../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/implementation.js"(exports, module2) {
496
+ "use strict";
497
+ var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
498
+ var toStr = Object.prototype.toString;
499
+ var max = Math.max;
500
+ var funcType = "[object Function]";
501
+ var concatty = function concatty2(a, b) {
502
+ var arr = [];
503
+ for (var i = 0; i < a.length; i += 1) {
504
+ arr[i] = a[i];
505
+ }
506
+ for (var j = 0; j < b.length; j += 1) {
507
+ arr[j + a.length] = b[j];
508
+ }
509
+ return arr;
510
+ };
511
+ var slicy = function slicy2(arrLike, offset) {
512
+ var arr = [];
513
+ for (var i = offset || 0, j = 0; i < arrLike.length; i += 1, j += 1) {
514
+ arr[j] = arrLike[i];
515
+ }
516
+ return arr;
517
+ };
518
+ var joiny = function(arr, joiner) {
519
+ var str = "";
520
+ for (var i = 0; i < arr.length; i += 1) {
521
+ str += arr[i];
522
+ if (i + 1 < arr.length) {
523
+ str += joiner;
524
+ }
525
+ }
526
+ return str;
527
+ };
528
+ module2.exports = function bind(that) {
529
+ var target = this;
530
+ if (typeof target !== "function" || toStr.apply(target) !== funcType) {
531
+ throw new TypeError(ERROR_MESSAGE + target);
532
+ }
533
+ var args = slicy(arguments, 1);
534
+ var bound;
535
+ var binder = function() {
536
+ if (this instanceof bound) {
537
+ var result = target.apply(
538
+ this,
539
+ concatty(args, arguments)
540
+ );
541
+ if (Object(result) === result) {
542
+ return result;
543
+ }
544
+ return this;
545
+ }
546
+ return target.apply(
547
+ that,
548
+ concatty(args, arguments)
549
+ );
550
+ };
551
+ var boundLength = max(0, target.length - args.length);
552
+ var boundArgs = [];
553
+ for (var i = 0; i < boundLength; i++) {
554
+ boundArgs[i] = "$" + i;
555
+ }
556
+ bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
557
+ if (target.prototype) {
558
+ var Empty = function Empty2() {
559
+ };
560
+ Empty.prototype = target.prototype;
561
+ bound.prototype = new Empty();
562
+ Empty.prototype = null;
563
+ }
564
+ return bound;
565
+ };
566
+ }
567
+ });
568
+ var require_function_bind = (0, import_chunk_2ESYSVXG.__commonJS)({
569
+ "../../node_modules/.pnpm/function-bind@1.1.2/node_modules/function-bind/index.js"(exports, module2) {
570
+ "use strict";
571
+ var implementation = require_implementation();
572
+ module2.exports = Function.prototype.bind || implementation;
573
+ }
574
+ });