@prisma/migrate 6.6.0-dev.24 → 6.6.0-dev.26
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.
- package/dist/CLI.js +3 -3
- package/dist/Migrate.js +6 -6
- package/dist/SchemaEngine.js +5 -5
- package/dist/bin.js +43 -43
- package/dist/{chunk-WWAWV7DQ.js → chunk-2ESYSVXG.js} +3 -27
- package/dist/{chunk-LKTTJWFT.js → chunk-2R6DII47.js} +5 -5
- package/dist/{chunk-J4DAOTRR.js → chunk-324Z6HS7.js} +41 -43
- package/dist/chunk-33LPBNDX.js +1399 -0
- package/dist/{chunk-3WTXX6CQ.js → chunk-5LKIRKDL.js} +60 -60
- package/dist/{chunk-LOGAFLCN.js → chunk-5R44VVVX.js} +29 -29
- package/dist/{chunk-RP2N6UXA.js → chunk-AI6DH66U.js} +6 -6
- package/dist/{chunk-F62CN63F.js → chunk-B4SUSDC2.js} +30 -31
- package/dist/{chunk-ODH7XYW7.js → chunk-BURHAP6O.js} +46 -48
- package/dist/{chunk-7X4MPZIO.js → chunk-DQMYH4YE.js} +323 -337
- package/dist/{chunk-W2SZNLK4.js → chunk-EJG7GKM7.js} +37 -39
- package/dist/{chunk-5PSO7BDO.js → chunk-EJUXYFV3.js} +15 -15
- package/dist/{chunk-MREGRQDD.js → chunk-FBWTUBJC.js} +46 -45
- package/dist/{chunk-MATFO4ZW.js → chunk-G7PJKEOV.js} +33 -33
- package/dist/{chunk-PW3LNSDM.js → chunk-GPNGRJAR.js} +33 -35
- package/dist/{chunk-NAXFX7K7.js → chunk-HJFSTAJX.js} +30 -32
- package/dist/{chunk-4ZFVT4RS.js → chunk-IINN7QUV.js} +165 -190
- package/dist/{chunk-IR55GBON.js → chunk-IWC5MH4R.js} +5 -5
- package/dist/{chunk-ZOEKRXDP.js → chunk-K43RXWQY.js} +21 -18
- package/dist/{chunk-LQO5JIBW.js → chunk-KBAYLL3V.js} +324 -338
- package/dist/{chunk-3OQIC7NW.js → chunk-KMHFSDY6.js} +43 -45
- package/dist/{chunk-255BRND3.js → chunk-KRQEFTDT.js} +6 -6
- package/dist/{chunk-VVKOFN3Y.js → chunk-LLO7YF56.js} +44 -46
- package/dist/{chunk-MKK3GSDF.js → chunk-MKS2ZJJ5.js} +5 -5
- package/dist/{chunk-VZ23KD5C.js → chunk-NGQA5JTN.js} +8 -10
- package/dist/{chunk-IY67YUOD.js → chunk-NJYZPNB4.js} +54 -56
- package/dist/{chunk-EGPJABTW.js → chunk-TGV6QGEF.js} +69 -69
- package/dist/{chunk-3VFKYWQZ.js → chunk-URKH6SE2.js} +73 -80
- package/dist/{chunk-DLLXDCI2.js → chunk-VAJ4VX67.js} +5 -6
- package/dist/{chunk-N5UBDQRA.js → chunk-VVP3QZ7Q.js} +21 -21
- package/dist/{chunk-DAYMMAJB.js → chunk-YBNDKPPO.js} +36 -38
- package/dist/{chunk-OCQGHQED.js → chunk-YBX7R3MT.js} +12 -12
- package/dist/{chunk-A6PMXMMT.js → chunk-ZB5NPOJW.js} +13 -13
- package/dist/{chunk-V5TUSOJX.js → chunk-ZGR2WQ62.js} +38 -40
- package/dist/commands/DbCommand.js +3 -3
- package/dist/commands/DbDrop.js +3 -3
- package/dist/commands/DbExecute.js +7 -7
- package/dist/commands/DbPull.js +9 -9
- package/dist/commands/DbPush.js +7 -7
- package/dist/commands/DbSeed.js +4 -4
- package/dist/commands/MigrateCommand.js +3 -3
- package/dist/commands/MigrateDeploy.js +9 -9
- package/dist/commands/MigrateDev.js +11 -11
- package/dist/commands/MigrateDiff.js +10 -10
- package/dist/commands/MigrateReset.js +10 -10
- package/dist/commands/MigrateResolve.js +7 -7
- package/dist/commands/MigrateStatus.js +7 -7
- package/dist/index.js +46 -46
- package/dist/{multipart-parser-54WEFGGN-NLZG56KM.js → multipart-parser-ASKQAOL4-WZ47HU6G.js} +92 -125
- package/dist/{multipart-parser-NDLECNMN.js → multipart-parser-QCI3Y5IB.js} +66 -68
- package/dist/types.js +1 -1
- package/dist/{typescript-WN4QH2CP.js → typescript-2LKASCMC.js} +33 -33
- package/dist/{typescript-AILDXN3I.js → typescript-H3AVJ6KX.js} +32 -32
- package/dist/utils/byline.js +1 -1
- package/dist/utils/captureStdout.js +3 -3
- package/dist/utils/countModelsAndTypes.js +1 -1
- package/dist/utils/customColors.js +1 -1
- package/dist/utils/ensureDatabaseExists.js +1 -1
- package/dist/utils/errors.js +1 -1
- package/dist/utils/flagErrors.js +1 -1
- package/dist/utils/getDatabaseVersionSafe.js +5 -5
- package/dist/utils/getSchemaPathAndPrint.js +1 -1
- package/dist/utils/handleEvaluateDataloss.js +1 -1
- package/dist/utils/introspectSql.js +5 -5
- package/dist/utils/isSchemaEmpty.js +1 -1
- package/dist/utils/now.js +1 -1
- package/dist/utils/printDatasource.js +1 -1
- package/dist/utils/printDatasources.js +5 -5
- package/dist/utils/printFiles.js +5 -5
- package/dist/utils/printIntrospectedSchema.js +1 -1
- package/dist/utils/printMigrationId.js +1 -1
- package/dist/utils/promptForMigrationName.js +3 -3
- package/dist/utils/removeSchemaFiles.js +1 -1
- package/dist/utils/replaceOrAddDatasource.js +1 -1
- package/dist/utils/replaceOrAddDatasource.test.js +1 -1
- package/dist/utils/saveSchemaFiles.js +1 -1
- package/dist/utils/seed.js +4 -4
- package/dist/utils/setupCockroach.js +3 -3
- package/dist/utils/setupMSSQL.js +759 -675
- package/dist/utils/setupMongo.js +552 -552
- package/dist/utils/setupMysql.js +508 -563
- package/dist/utils/setupPostgres.js +3 -3
- package/dist/utils/spinner.js +4 -4
- package/dist/utils/unixSocket.js +1 -1
- package/dist/views/handleViewsIO.js +3 -3
- package/package.json +7 -7
- package/dist/chunk-YYPMC5FN.js +0 -1407
|
@@ -16,12 +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
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_IWC5MH4R_exports = {};
|
|
20
|
+
__export(chunk_IWC5MH4R_exports, {
|
|
21
21
|
introspectSql: () => introspectSql
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_IWC5MH4R_exports);
|
|
24
|
+
var import_chunk_K43RXWQY = require("./chunk-K43RXWQY.js");
|
|
25
25
|
var import_internals = require("@prisma/internals");
|
|
26
26
|
var supportedProviders = ["postgresql", "cockroachdb", "mysql", "sqlite"];
|
|
27
27
|
async function introspectSql(schemaPath, queries) {
|
|
@@ -41,7 +41,7 @@ async function introspectSql(schemaPath, queries) {
|
|
|
41
41
|
if (!url) {
|
|
42
42
|
throw new Error(`Could not get url from datasource ${firstDatasource.name} in ${schema.schemaPath}`);
|
|
43
43
|
}
|
|
44
|
-
const schemaEngine = new
|
|
44
|
+
const schemaEngine = new import_chunk_K43RXWQY.SchemaEngine({ schemaPath: schema.schemaPath });
|
|
45
45
|
const results = [];
|
|
46
46
|
const errors = [];
|
|
47
47
|
try {
|
|
@@ -26,16 +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
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_K43RXWQY_exports = {};
|
|
30
|
+
__export(chunk_K43RXWQY_exports, {
|
|
31
31
|
EngineError: () => EngineError,
|
|
32
32
|
SchemaEngine: () => SchemaEngine
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_K43RXWQY_exports);
|
|
35
|
+
var import_chunk_G7PJKEOV = require("./chunk-G7PJKEOV.js");
|
|
36
36
|
var import_chunk_L6KOIJJ5 = require("./chunk-L6KOIJJ5.js");
|
|
37
37
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
38
|
-
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
39
38
|
var import_node_path = __toESM(require("node:path"));
|
|
40
39
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
41
40
|
var import_internals = require("@prisma/internals");
|
|
@@ -44,27 +43,31 @@ var debugRpc = (0, import_debug.default)("prisma:schemaEngine:rpc");
|
|
|
44
43
|
var debugStderr = (0, import_debug.default)("prisma:schemaEngine:stderr");
|
|
45
44
|
var debugStdin = (0, import_debug.default)("prisma:schemaEngine:stdin");
|
|
46
45
|
var EngineError = class extends Error {
|
|
46
|
+
code;
|
|
47
47
|
constructor(message, code) {
|
|
48
48
|
super(message);
|
|
49
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "code");
|
|
50
49
|
this.code = code;
|
|
51
50
|
}
|
|
52
51
|
};
|
|
53
52
|
(0, import_internals.setClassName)(EngineError, "EngineError");
|
|
54
53
|
var messageId = 1;
|
|
55
54
|
var SchemaEngine = class {
|
|
55
|
+
debug;
|
|
56
|
+
child;
|
|
57
|
+
schemaPath;
|
|
58
|
+
listeners = {};
|
|
59
|
+
/** _All_ the logs from the engine process. */
|
|
60
|
+
messages = [];
|
|
61
|
+
lastRequest;
|
|
62
|
+
/** The fields of the last engine log event with an `ERROR` level. */
|
|
63
|
+
lastError = null;
|
|
64
|
+
initPromise;
|
|
65
|
+
enabledPreviewFeatures;
|
|
66
|
+
// `latestSchema` is set to the latest schema that was used in `introspect()`
|
|
67
|
+
latestSchema;
|
|
68
|
+
// `isRunning` is set to true when the engine is initialized, and set to false when the engine is stopped
|
|
69
|
+
isRunning = false;
|
|
56
70
|
constructor({ debug = false, schemaPath, enabledPreviewFeatures }) {
|
|
57
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "debug");
|
|
58
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "child");
|
|
59
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "schemaPath");
|
|
60
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "listeners", {});
|
|
61
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "messages", []);
|
|
62
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "lastRequest");
|
|
63
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "lastError", null);
|
|
64
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "initPromise");
|
|
65
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "enabledPreviewFeatures");
|
|
66
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "latestSchema");
|
|
67
|
-
(0, import_chunk_WWAWV7DQ.__publicField)(this, "isRunning", false);
|
|
68
71
|
this.schemaPath = schemaPath;
|
|
69
72
|
if (debug) {
|
|
70
73
|
import_debug.default.enable("SchemaEngine*");
|
|
@@ -172,7 +175,7 @@ var SchemaEngine = class {
|
|
|
172
175
|
const { views } = introspectResult;
|
|
173
176
|
if (views) {
|
|
174
177
|
const schemaPath = this.schemaPath ?? import_node_path.default.join(process.cwd(), "prisma");
|
|
175
|
-
await (0,
|
|
178
|
+
await (0, import_chunk_G7PJKEOV.handleViewsIO)({ views, schemaPath });
|
|
176
179
|
}
|
|
177
180
|
return introspectResult;
|
|
178
181
|
} finally {
|