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

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 (108) 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 +48 -47
  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-V3ZMNXZC.js → chunk-5LKIRKDL.js} +307 -382
  10. package/dist/chunk-5Q5BJS5B.js +889 -0
  11. package/dist/{chunk-LOGAFLCN.js → chunk-5R44VVVX.js} +29 -29
  12. package/dist/{chunk-GG54LOYV.js → chunk-63ZT25OL.js} +43 -43
  13. package/dist/{chunk-DJMFXNR4.js → chunk-74LUB4XX.js} +56 -57
  14. package/dist/{chunk-IR55GBON.js → chunk-ABQZ5J74.js} +5 -5
  15. package/dist/{chunk-RP2N6UXA.js → chunk-AI6DH66U.js} +6 -6
  16. package/dist/{chunk-KS7IEA6Z.js → chunk-AM7BRZFD.js} +48 -51
  17. package/dist/{chunk-G2XUUMKH.js → chunk-B4SUSDC2.js} +31 -39
  18. package/dist/{chunk-N4XTKFY6.js → chunk-BUAYZ4KA.js} +37 -37
  19. package/dist/{chunk-W2SZNLK4.js → chunk-EJG7GKM7.js} +37 -39
  20. package/dist/{chunk-5PSO7BDO.js → chunk-EJUXYFV3.js} +15 -15
  21. package/dist/{chunk-MATFO4ZW.js → chunk-G7PJKEOV.js} +33 -33
  22. package/dist/{chunk-ZOEKRXDP.js → chunk-GHZAN2PG.js} +21 -24
  23. package/dist/{chunk-V5TUSOJX.js → chunk-HPT54KSO.js} +44 -44
  24. package/dist/{chunk-HCBZB4XC.js → chunk-HQJ7FIWN.js} +51 -51
  25. package/dist/{chunk-MCWCB2AX.js → chunk-IINN7QUV.js} +170 -643
  26. package/dist/{chunk-CQZFVAXC.js → chunk-IRYXRMQC.js} +40 -40
  27. package/dist/{chunk-255BRND3.js → chunk-KRQEFTDT.js} +6 -6
  28. package/dist/{chunk-N3KYWSX2.js → chunk-LAEOX7QH.js} +53 -48
  29. package/dist/{chunk-VVKOFN3Y.js → chunk-LLO7YF56.js} +44 -46
  30. package/dist/{chunk-MKK3GSDF.js → chunk-MTJFLQI4.js} +5 -5
  31. package/dist/{chunk-VZ23KD5C.js → chunk-NGQA5JTN.js} +8 -10
  32. package/dist/{chunk-WI2A2TQE.js → chunk-SCH55BRJ.js} +84 -87
  33. package/dist/{chunk-EGPJABTW.js → chunk-TGV6QGEF.js} +69 -69
  34. package/dist/chunk-URKH6SE2.js +479 -0
  35. package/dist/chunk-V6PVGSDJ.js +76 -0
  36. package/dist/{chunk-DLLXDCI2.js → chunk-VAJ4VX67.js} +5 -6
  37. package/dist/{chunk-4RDVKU5F.js → chunk-VZVF5FOX.js} +331 -344
  38. package/dist/{chunk-OWIFBVPC.js → chunk-WJ6HO7L7.js} +330 -343
  39. package/dist/{chunk-OCQGHQED.js → chunk-YBX7R3MT.js} +12 -12
  40. package/dist/{chunk-A6PMXMMT.js → chunk-ZB5NPOJW.js} +13 -13
  41. package/dist/{chunk-Q3ZLC44N.js → chunk-ZCR4PTT3.js} +54 -64
  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 +12 -11
  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 +52 -50
  56. package/dist/internals/src/cli/schemaContext.d.ts +43 -0
  57. package/dist/internals/src/index.d.ts +1 -0
  58. package/dist/internals/src/migrateTypes.d.ts +63 -0
  59. package/dist/migrate/src/Migrate.d.ts +3 -1
  60. package/dist/migrate/src/SchemaEngine.d.ts +0 -4
  61. package/dist/migrate/src/types.d.ts +13 -10
  62. package/dist/migrate/src/utils/createMigration.d.ts +21 -0
  63. package/dist/migrate/src/utils/ensureDatabaseExists.d.ts +4 -6
  64. package/dist/migrate/src/utils/listMigrations.d.ts +9 -0
  65. package/dist/migrate/src/utils/seed.d.ts +0 -2
  66. package/dist/{multipart-parser-54WEFGGN-NLZG56KM.js → multipart-parser-ASKQAOL4-WZ47HU6G.js} +92 -125
  67. package/dist/{multipart-parser-NDLECNMN.js → multipart-parser-QCI3Y5IB.js} +66 -68
  68. package/dist/types.js +1 -1
  69. package/dist/{typescript-WN4QH2CP.js → typescript-2LKASCMC.js} +33 -33
  70. package/dist/{typescript-AILDXN3I.js → typescript-H3AVJ6KX.js} +32 -32
  71. package/dist/utils/byline.js +1 -1
  72. package/dist/utils/captureStdout.js +3 -3
  73. package/dist/utils/countModelsAndTypes.js +1 -1
  74. package/dist/utils/createMigration.js +27 -0
  75. package/dist/utils/customColors.js +1 -1
  76. package/dist/utils/ensureDatabaseExists.js +7 -7
  77. package/dist/utils/errors.js +1 -1
  78. package/dist/utils/flagErrors.js +1 -1
  79. package/dist/utils/getDatabaseVersionSafe.js +5 -5
  80. package/dist/utils/getSchemaPathAndPrint.js +1 -1
  81. package/dist/utils/handleEvaluateDataloss.js +1 -1
  82. package/dist/utils/introspectSql.js +5 -5
  83. package/dist/utils/isSchemaEmpty.js +1 -1
  84. package/dist/utils/listMigrations.js +25 -0
  85. package/dist/utils/now.js +1 -1
  86. package/dist/utils/printDatasource.js +1 -1
  87. package/dist/utils/printDatasources.js +5 -5
  88. package/dist/utils/printFiles.js +5 -5
  89. package/dist/utils/printIntrospectedSchema.js +1 -1
  90. package/dist/utils/printMigrationId.js +1 -1
  91. package/dist/utils/promptForMigrationName.js +3 -3
  92. package/dist/utils/removeSchemaFiles.js +1 -1
  93. package/dist/utils/replaceOrAddDatasource.js +1 -1
  94. package/dist/utils/replaceOrAddDatasource.test.js +1 -1
  95. package/dist/utils/saveSchemaFiles.js +1 -1
  96. package/dist/utils/seed.js +4 -7
  97. package/dist/utils/setupCockroach.js +3 -3
  98. package/dist/utils/setupMSSQL.js +759 -675
  99. package/dist/utils/setupMongo.js +552 -552
  100. package/dist/utils/setupMysql.js +508 -563
  101. package/dist/utils/setupPostgres.js +3 -3
  102. package/dist/utils/spinner.js +4 -3
  103. package/dist/utils/unixSocket.js +1 -1
  104. package/dist/views/handleViewsIO.js +3 -3
  105. package/package.json +9 -9
  106. package/dist/chunk-J46BJQHT.js +0 -268
  107. package/dist/chunk-KOF4LGTS.js +0 -1817
  108. package/dist/chunk-YYPMC5FN.js +0 -1407
@@ -33,12 +33,12 @@ __export(setupPostgres_exports, {
33
33
  tearDownPostgres: () => tearDownPostgres
34
34
  });
35
35
  module.exports = __toCommonJS(setupPostgres_exports);
36
- var import_chunk_EGPJABTW = require("../chunk-EGPJABTW.js");
37
- var import_chunk_WWAWV7DQ = require("../chunk-WWAWV7DQ.js");
36
+ var import_chunk_TGV6QGEF = require("../chunk-TGV6QGEF.js");
37
+ var import_chunk_2ESYSVXG = require("../chunk-2ESYSVXG.js");
38
38
  var import_promises = __toESM(require("node:fs/promises"));
39
39
  var import_node_path = __toESM(require("node:path"));
40
40
  var import_internals = require("@prisma/internals");
41
- var import_pg = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_EGPJABTW.require_lib)());
41
+ var import_pg = (0, import_chunk_2ESYSVXG.__toESM)((0, import_chunk_TGV6QGEF.require_lib)());
42
42
  async function setupPostgres(options) {
43
43
  const { connectionString } = options;
44
44
  const { dirname } = options;
@@ -18,8 +18,9 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var spinner_exports = {};
20
20
  __export(spinner_exports, {
21
- createSpinner: () => import_chunk_MCWCB2AX.createSpinner
21
+ createSpinner: () => import_chunk_IINN7QUV.createSpinner
22
22
  });
23
23
  module.exports = __toCommonJS(spinner_exports);
24
- var import_chunk_MCWCB2AX = require("../chunk-MCWCB2AX.js");
25
- var import_chunk_WWAWV7DQ = require("../chunk-WWAWV7DQ.js");
24
+ var import_chunk_IINN7QUV = require("../chunk-IINN7QUV.js");
25
+ var import_chunk_URKH6SE2 = require("../chunk-URKH6SE2.js");
26
+ var import_chunk_2ESYSVXG = require("../chunk-2ESYSVXG.js");
@@ -22,4 +22,4 @@ __export(unixSocket_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(unixSocket_exports);
24
24
  var import_chunk_TWPTG4XS = require("../chunk-TWPTG4XS.js");
25
- var import_chunk_WWAWV7DQ = require("../chunk-WWAWV7DQ.js");
25
+ var import_chunk_2ESYSVXG = require("../chunk-2ESYSVXG.js");
@@ -18,8 +18,8 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var handleViewsIO_exports = {};
20
20
  __export(handleViewsIO_exports, {
21
- handleViewsIO: () => import_chunk_MATFO4ZW.handleViewsIO
21
+ handleViewsIO: () => import_chunk_G7PJKEOV.handleViewsIO
22
22
  });
23
23
  module.exports = __toCommonJS(handleViewsIO_exports);
24
- var import_chunk_MATFO4ZW = require("../chunk-MATFO4ZW.js");
25
- var import_chunk_WWAWV7DQ = require("../chunk-WWAWV7DQ.js");
24
+ var import_chunk_G7PJKEOV = require("../chunk-G7PJKEOV.js");
25
+ var import_chunk_2ESYSVXG = require("../chunk-2ESYSVXG.js");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@prisma/migrate",
3
- "version": "6.6.0-dev.3",
3
+ "version": "6.6.0-dev.30",
4
4
  "description": "This package is intended for Prisma's internal use",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/migrate/src/index.d.ts",
@@ -35,7 +35,7 @@
35
35
  "jest": "29.7.0",
36
36
  "jest-junit": "16.0.0",
37
37
  "kleur": "4.1.5",
38
- "log-update": "4.0.0",
38
+ "log-update": "6.1.0",
39
39
  "mariadb": "3.4.0",
40
40
  "mock-stdin": "1.0.0",
41
41
  "mongoose": "8.12.1",
@@ -44,7 +44,7 @@
44
44
  "pg": "8.13.3",
45
45
  "pkg-up": "3.1.0",
46
46
  "strip-ansi": "6.0.1",
47
- "strip-indent": "3.0.0",
47
+ "strip-indent": "4.0.0",
48
48
  "tempy": "1.0.1",
49
49
  "ts-pattern": "5.6.2",
50
50
  "typescript": "5.4.5",
@@ -55,13 +55,13 @@
55
55
  "@prisma/internals": "*"
56
56
  },
57
57
  "dependencies": {
58
- "@prisma/engines-version": "6.5.0-73.173f8d54f8d52e692c7e27e72a88314ec7aeff60",
58
+ "@prisma/engines-version": "6.6.0-21.d1dbe8880430b6f753dffc4264de1a7f39e4a15a",
59
59
  "prompts": "2.4.2",
60
- "@prisma/debug": "6.6.0-dev.3",
61
- "@prisma/config": "6.6.0-dev.3",
62
- "@prisma/generator-helper": "6.6.0-dev.3",
63
- "@prisma/get-platform": "6.6.0-dev.3",
64
- "@prisma/internals": "6.6.0-dev.3"
60
+ "@prisma/config": "6.6.0-dev.30",
61
+ "@prisma/generator-helper": "6.6.0-dev.30",
62
+ "@prisma/get-platform": "6.6.0-dev.30",
63
+ "@prisma/internals": "6.6.0-dev.30",
64
+ "@prisma/debug": "6.6.0-dev.30"
65
65
  },
66
66
  "files": [
67
67
  "README.md",
@@ -1,268 +0,0 @@
1
- "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
- var chunk_J46BJQHT_exports = {};
20
- __export(chunk_J46BJQHT_exports, {
21
- require_onetime: () => require_onetime,
22
- require_signal_exit: () => require_signal_exit
23
- });
24
- module.exports = __toCommonJS(chunk_J46BJQHT_exports);
25
- var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
26
- var require_mimic_fn = (0, import_chunk_WWAWV7DQ.__commonJS)({
27
- "../../node_modules/.pnpm/mimic-fn@2.1.0/node_modules/mimic-fn/index.js"(exports, module2) {
28
- "use strict";
29
- var mimicFn = (to, from) => {
30
- for (const prop of Reflect.ownKeys(from)) {
31
- Object.defineProperty(to, prop, Object.getOwnPropertyDescriptor(from, prop));
32
- }
33
- return to;
34
- };
35
- module2.exports = mimicFn;
36
- module2.exports.default = mimicFn;
37
- }
38
- });
39
- var require_onetime = (0, import_chunk_WWAWV7DQ.__commonJS)({
40
- "../../node_modules/.pnpm/onetime@5.1.2/node_modules/onetime/index.js"(exports, module2) {
41
- "use strict";
42
- var mimicFn = require_mimic_fn();
43
- var calledFunctions = /* @__PURE__ */ new WeakMap();
44
- var onetime = (function_, options = {}) => {
45
- if (typeof function_ !== "function") {
46
- throw new TypeError("Expected a function");
47
- }
48
- let returnValue;
49
- let callCount = 0;
50
- const functionName = function_.displayName || function_.name || "<anonymous>";
51
- const onetime2 = function(...arguments_) {
52
- calledFunctions.set(onetime2, ++callCount);
53
- if (callCount === 1) {
54
- returnValue = function_.apply(this, arguments_);
55
- function_ = null;
56
- } else if (options.throw === true) {
57
- throw new Error(`Function \`${functionName}\` can only be called once`);
58
- }
59
- return returnValue;
60
- };
61
- mimicFn(onetime2, function_);
62
- calledFunctions.set(onetime2, callCount);
63
- return onetime2;
64
- };
65
- module2.exports = onetime;
66
- module2.exports.default = onetime;
67
- module2.exports.callCount = (function_) => {
68
- if (!calledFunctions.has(function_)) {
69
- throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
70
- }
71
- return calledFunctions.get(function_);
72
- };
73
- }
74
- });
75
- var require_signals = (0, import_chunk_WWAWV7DQ.__commonJS)({
76
- "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports, module2) {
77
- "use strict";
78
- module2.exports = [
79
- "SIGABRT",
80
- "SIGALRM",
81
- "SIGHUP",
82
- "SIGINT",
83
- "SIGTERM"
84
- ];
85
- if (process.platform !== "win32") {
86
- module2.exports.push(
87
- "SIGVTALRM",
88
- "SIGXCPU",
89
- "SIGXFSZ",
90
- "SIGUSR2",
91
- "SIGTRAP",
92
- "SIGSYS",
93
- "SIGQUIT",
94
- "SIGIOT"
95
- // should detect profiler and enable/disable accordingly.
96
- // see #21
97
- // 'SIGPROF'
98
- );
99
- }
100
- if (process.platform === "linux") {
101
- module2.exports.push(
102
- "SIGIO",
103
- "SIGPOLL",
104
- "SIGPWR",
105
- "SIGSTKFLT",
106
- "SIGUNUSED"
107
- );
108
- }
109
- }
110
- });
111
- var require_signal_exit = (0, import_chunk_WWAWV7DQ.__commonJS)({
112
- "../../node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module2) {
113
- "use strict";
114
- var process2 = global.process;
115
- var processOk = function(process3) {
116
- return process3 && typeof process3 === "object" && typeof process3.removeListener === "function" && typeof process3.emit === "function" && typeof process3.reallyExit === "function" && typeof process3.listeners === "function" && typeof process3.kill === "function" && typeof process3.pid === "number" && typeof process3.on === "function";
117
- };
118
- if (!processOk(process2)) {
119
- module2.exports = function() {
120
- return function() {
121
- };
122
- };
123
- } else {
124
- assert = (0, import_chunk_WWAWV7DQ.__require)("assert");
125
- signals = require_signals();
126
- isWin = /^win/i.test(process2.platform);
127
- EE = (0, import_chunk_WWAWV7DQ.__require)("events");
128
- if (typeof EE !== "function") {
129
- EE = EE.EventEmitter;
130
- }
131
- if (process2.__signal_exit_emitter__) {
132
- emitter = process2.__signal_exit_emitter__;
133
- } else {
134
- emitter = process2.__signal_exit_emitter__ = new EE();
135
- emitter.count = 0;
136
- emitter.emitted = {};
137
- }
138
- if (!emitter.infinite) {
139
- emitter.setMaxListeners(Infinity);
140
- emitter.infinite = true;
141
- }
142
- module2.exports = function(cb, opts) {
143
- if (!processOk(global.process)) {
144
- return function() {
145
- };
146
- }
147
- assert.equal(typeof cb, "function", "a callback must be provided for exit handler");
148
- if (loaded === false) {
149
- load();
150
- }
151
- var ev = "exit";
152
- if (opts && opts.alwaysLast) {
153
- ev = "afterexit";
154
- }
155
- var remove = function() {
156
- emitter.removeListener(ev, cb);
157
- if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
158
- unload();
159
- }
160
- };
161
- emitter.on(ev, cb);
162
- return remove;
163
- };
164
- unload = function unload2() {
165
- if (!loaded || !processOk(global.process)) {
166
- return;
167
- }
168
- loaded = false;
169
- signals.forEach(function(sig) {
170
- try {
171
- process2.removeListener(sig, sigListeners[sig]);
172
- } catch (er) {
173
- }
174
- });
175
- process2.emit = originalProcessEmit;
176
- process2.reallyExit = originalProcessReallyExit;
177
- emitter.count -= 1;
178
- };
179
- module2.exports.unload = unload;
180
- emit = function emit2(event, code, signal) {
181
- if (emitter.emitted[event]) {
182
- return;
183
- }
184
- emitter.emitted[event] = true;
185
- emitter.emit(event, code, signal);
186
- };
187
- sigListeners = {};
188
- signals.forEach(function(sig) {
189
- sigListeners[sig] = function listener() {
190
- if (!processOk(global.process)) {
191
- return;
192
- }
193
- var listeners = process2.listeners(sig);
194
- if (listeners.length === emitter.count) {
195
- unload();
196
- emit("exit", null, sig);
197
- emit("afterexit", null, sig);
198
- if (isWin && sig === "SIGHUP") {
199
- sig = "SIGINT";
200
- }
201
- process2.kill(process2.pid, sig);
202
- }
203
- };
204
- });
205
- module2.exports.signals = function() {
206
- return signals;
207
- };
208
- loaded = false;
209
- load = function load2() {
210
- if (loaded || !processOk(global.process)) {
211
- return;
212
- }
213
- loaded = true;
214
- emitter.count += 1;
215
- signals = signals.filter(function(sig) {
216
- try {
217
- process2.on(sig, sigListeners[sig]);
218
- return true;
219
- } catch (er) {
220
- return false;
221
- }
222
- });
223
- process2.emit = processEmit;
224
- process2.reallyExit = processReallyExit;
225
- };
226
- module2.exports.load = load;
227
- originalProcessReallyExit = process2.reallyExit;
228
- processReallyExit = function processReallyExit2(code) {
229
- if (!processOk(global.process)) {
230
- return;
231
- }
232
- process2.exitCode = code || /* istanbul ignore next */
233
- 0;
234
- emit("exit", process2.exitCode, null);
235
- emit("afterexit", process2.exitCode, null);
236
- originalProcessReallyExit.call(process2, process2.exitCode);
237
- };
238
- originalProcessEmit = process2.emit;
239
- processEmit = function processEmit2(ev, arg) {
240
- if (ev === "exit" && processOk(global.process)) {
241
- if (arg !== void 0) {
242
- process2.exitCode = arg;
243
- }
244
- var ret = originalProcessEmit.apply(this, arguments);
245
- emit("exit", process2.exitCode, null);
246
- emit("afterexit", process2.exitCode, null);
247
- return ret;
248
- } else {
249
- return originalProcessEmit.apply(this, arguments);
250
- }
251
- };
252
- }
253
- var assert;
254
- var signals;
255
- var isWin;
256
- var EE;
257
- var emitter;
258
- var unload;
259
- var emit;
260
- var sigListeners;
261
- var loaded;
262
- var load;
263
- var originalProcessReallyExit;
264
- var processReallyExit;
265
- var originalProcessEmit;
266
- var processEmit;
267
- }
268
- });