@prisma/migrate 6.5.0-dev.7 → 6.5.0-dev.71
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 +2 -2
- package/dist/Migrate.js +3 -3
- package/dist/SchemaEngine.js +3 -3
- package/dist/bin.js +35 -35
- package/dist/{chunk-J77IRNPE.js → chunk-5VDXAE53.js} +45 -31
- package/dist/{chunk-PSYS5XVH.js → chunk-A4BCLP6K.js} +23 -32
- package/dist/{chunk-CTPONE6G.js → chunk-DLLXDCI2.js} +6 -3
- package/dist/{chunk-4EV2RVXY.js → chunk-E7OXHCDR.js} +31 -37
- package/dist/{chunk-73OPZA7N.js → chunk-EGPJABTW.js} +136 -81
- package/dist/{chunk-TM3ETZES.js → chunk-EX2UWGES.js} +11 -10
- package/dist/{chunk-FRTPDRF2.js → chunk-G2XUUMKH.js} +5 -5
- package/dist/{chunk-6DFJIBJX.js → chunk-GKDFIHM2.js} +3 -3
- package/dist/{chunk-2NMFKGXM.js → chunk-IR55GBON.js} +5 -5
- package/dist/{chunk-DDHPSYC4.js → chunk-KXMACMQC.js} +9 -6
- package/dist/{chunk-I4EY55DC.js → chunk-LZOZZRHB.js} +10 -9
- package/dist/{chunk-4JQIX6O7.js → chunk-MKK3GSDF.js} +5 -5
- package/dist/{chunk-7PNPCL4P.js → chunk-ONNHBHOI.js} +465 -1336
- package/dist/{chunk-LVLRGTYH.js → chunk-TPJISPJ5.js} +10 -9
- package/dist/{chunk-D74DU52C.js → chunk-UQXG2PBG.js} +464 -1335
- package/dist/{chunk-YZVZCC3I.js → chunk-V5TUSOJX.js} +8 -7
- package/dist/{chunk-WNH2ACJS.js → chunk-VVKOFN3Y.js} +6 -5
- package/dist/{chunk-QTAIWPLH.js → chunk-VZ23KD5C.js} +5 -4
- package/dist/{chunk-HIFVDK2U.js → chunk-W2SZNLK4.js} +6 -5
- package/dist/{chunk-WLPX3672.js → chunk-X5N72JHI.js} +8 -7
- package/dist/{chunk-RQFGRXJI.js → chunk-X6KW7BYP.js} +10 -9
- package/dist/{chunk-XRTNIFND.js → chunk-YYPMC5FN.js} +203 -108
- package/dist/{chunk-ORL3LJOT.js → chunk-ZOEKRXDP.js} +16 -7
- package/dist/{chunk-J5FHVALZ.js → chunk-ZQ3OWSVS.js} +10 -9
- package/dist/commands/DbCommand.js +2 -2
- package/dist/commands/DbDrop.js +3 -3
- package/dist/commands/DbExecute.js +4 -4
- package/dist/commands/DbPull.js +3 -3
- package/dist/commands/DbPush.js +5 -5
- package/dist/commands/DbSeed.js +2 -2
- package/dist/commands/MigrateCommand.js +2 -2
- package/dist/commands/MigrateDeploy.js +5 -5
- package/dist/commands/MigrateDev.js +5 -5
- package/dist/commands/MigrateDiff.js +6 -6
- package/dist/commands/MigrateReset.js +5 -5
- package/dist/commands/MigrateResolve.js +5 -5
- package/dist/commands/MigrateStatus.js +5 -5
- package/dist/index.js +39 -39
- package/dist/internals/src/errorReporting.d.ts +1 -0
- package/dist/utils/captureStdout.js +2 -2
- package/dist/utils/getDatabaseVersionSafe.js +3 -3
- package/dist/utils/getSchemaPathAndPrint.js +3 -3
- package/dist/utils/introspectSql.js +3 -3
- package/dist/utils/setupCockroach.js +2 -2
- package/dist/utils/setupMSSQL.js +13 -13
- package/dist/utils/setupMongo.js +3 -3
- package/dist/utils/setupMysql.js +231 -99
- package/dist/utils/setupPostgres.js +2 -2
- package/package.json +14 -14
|
@@ -26,17 +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
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_V5TUSOJX_exports = {};
|
|
30
|
+
__export(chunk_V5TUSOJX_exports, {
|
|
31
31
|
DbDrop: () => DbDrop
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_V5TUSOJX_exports);
|
|
34
34
|
var import_chunk_IHDN3L3R = require("./chunk-IHDN3L3R.js");
|
|
35
35
|
var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
|
|
36
|
-
var
|
|
36
|
+
var import_chunk_GKDFIHM2 = require("./chunk-GKDFIHM2.js");
|
|
37
37
|
var import_chunk_QOPTDDIH = require("./chunk-QOPTDDIH.js");
|
|
38
38
|
var import_chunk_DJMFXNR4 = require("./chunk-DJMFXNR4.js");
|
|
39
39
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
40
|
+
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
40
41
|
var import_internals = require("@prisma/internals");
|
|
41
42
|
var import_prompts = __toESM(require("prompts"));
|
|
42
43
|
var _DbDrop = class _DbDrop2 {
|
|
@@ -65,7 +66,7 @@ var _DbDrop = class _DbDrop2 {
|
|
|
65
66
|
throw new import_chunk_IHDN3L3R.PreviewFlagError();
|
|
66
67
|
}
|
|
67
68
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
68
|
-
const { schemaPath } = await (0,
|
|
69
|
+
const { schemaPath } = await (0, import_chunk_GKDFIHM2.getSchemaPathAndPrint)(args["--schema"], config.schema);
|
|
69
70
|
const datasourceInfo = await (0, import_chunk_DJMFXNR4.getDatasourceInfo)({ schemaPath, throwIfEnvError: true });
|
|
70
71
|
(0, import_chunk_QOPTDDIH.printDatasource)({ datasourceInfo });
|
|
71
72
|
process.stdout.write("\n");
|
|
@@ -104,7 +105,7 @@ ${_DbDrop2.help}`);
|
|
|
104
105
|
return _DbDrop2.help;
|
|
105
106
|
}
|
|
106
107
|
};
|
|
107
|
-
_DbDrop
|
|
108
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(_DbDrop, "help", (0, import_internals.format)(`
|
|
108
109
|
${process.platform === "win32" ? "" : "\u{1F4A3} "}Drop the database
|
|
109
110
|
|
|
110
111
|
${(0, import_chunk_SKRR5WT4.bold)((0, import_chunk_SKRR5WT4.yellow)("WARNING"))} ${(0, import_chunk_SKRR5WT4.bold)(
|
|
@@ -134,5 +135,5 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
134
135
|
|
|
135
136
|
Use --force to skip the confirmation prompt
|
|
136
137
|
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db drop --preview-feature --force
|
|
137
|
-
`);
|
|
138
|
+
`));
|
|
138
139
|
var DbDrop = _DbDrop;
|
|
@@ -16,12 +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
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_VVKOFN3Y_exports = {};
|
|
20
|
+
__export(chunk_VVKOFN3Y_exports, {
|
|
21
21
|
MigrateCommand: () => MigrateCommand
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_VVKOFN3Y_exports);
|
|
24
24
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
25
|
+
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
25
26
|
var import_internals = require("@prisma/internals");
|
|
26
27
|
var _MigrateCommand = class _MigrateCommand2 {
|
|
27
28
|
constructor(cmds) {
|
|
@@ -67,7 +68,7 @@ ${_MigrateCommand2.help}`);
|
|
|
67
68
|
return _MigrateCommand2.help;
|
|
68
69
|
}
|
|
69
70
|
};
|
|
70
|
-
_MigrateCommand
|
|
71
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(_MigrateCommand, "help", (0, import_internals.format)(`
|
|
71
72
|
Update the database schema with migrations
|
|
72
73
|
|
|
73
74
|
${(0, import_chunk_SKRR5WT4.bold)("Usage")}
|
|
@@ -118,5 +119,5 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
118
119
|
--from-url "$DATABASE_URL" \\
|
|
119
120
|
--to-url "postgresql://login:password@localhost:5432/db" \\
|
|
120
121
|
--script
|
|
121
|
-
`);
|
|
122
|
+
`));
|
|
122
123
|
var MigrateCommand = _MigrateCommand;
|
|
@@ -16,12 +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
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_VZ23KD5C_exports = {};
|
|
20
|
+
__export(chunk_VZ23KD5C_exports, {
|
|
21
21
|
CLI: () => CLI
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_VZ23KD5C_exports);
|
|
24
24
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
25
|
+
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
25
26
|
var import_internals = require("@prisma/internals");
|
|
26
27
|
var _CLI = class _CLI2 {
|
|
27
28
|
constructor(cmds) {
|
|
@@ -74,5 +75,5 @@ ${_CLI2.help}`);
|
|
|
74
75
|
return _CLI2.help;
|
|
75
76
|
}
|
|
76
77
|
};
|
|
77
|
-
_CLI
|
|
78
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(_CLI, "help", (0, import_internals.format)(`This is the internal CLI for @prisma/migrate`));
|
|
78
79
|
var CLI = _CLI;
|
|
@@ -16,12 +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
|
|
20
|
-
__export(
|
|
19
|
+
var chunk_W2SZNLK4_exports = {};
|
|
20
|
+
__export(chunk_W2SZNLK4_exports, {
|
|
21
21
|
DbCommand: () => DbCommand
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
23
|
+
module.exports = __toCommonJS(chunk_W2SZNLK4_exports);
|
|
24
24
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
25
|
+
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
25
26
|
var import_internals = require("@prisma/internals");
|
|
26
27
|
var _DbCommand = class _DbCommand2 {
|
|
27
28
|
constructor(cmds) {
|
|
@@ -60,7 +61,7 @@ ${_DbCommand2.help}`);
|
|
|
60
61
|
return _DbCommand2.help;
|
|
61
62
|
}
|
|
62
63
|
};
|
|
63
|
-
_DbCommand
|
|
64
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(_DbCommand, "help", (0, import_internals.format)(`
|
|
64
65
|
${process.platform === "win32" ? "" : "\u{1F3CB}\uFE0F "}Manage your database schema and lifecycle during development.
|
|
65
66
|
|
|
66
67
|
${(0, import_chunk_SKRR5WT4.bold)("Usage")}
|
|
@@ -92,5 +93,5 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
92
93
|
|
|
93
94
|
Run \`prisma db execute\`
|
|
94
95
|
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db execute
|
|
95
|
-
`);
|
|
96
|
+
`));
|
|
96
97
|
var DbCommand = _DbCommand;
|
|
@@ -26,11 +26,11 @@ 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_X5N72JHI_exports = {};
|
|
30
|
+
__export(chunk_X5N72JHI_exports, {
|
|
31
31
|
DbPull: () => DbPull
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_X5N72JHI_exports);
|
|
34
34
|
var import_chunk_DIAO4W7O = require("./chunk-DIAO4W7O.js");
|
|
35
35
|
var import_chunk_RTGQXNX6 = require("./chunk-RTGQXNX6.js");
|
|
36
36
|
var import_chunk_RP2N6UXA = require("./chunk-RP2N6UXA.js");
|
|
@@ -39,12 +39,13 @@ var import_chunk_JZ75RIMZ = require("./chunk-JZ75RIMZ.js");
|
|
|
39
39
|
var import_chunk_RR6BKMNO = require("./chunk-RR6BKMNO.js");
|
|
40
40
|
var import_chunk_JFKDSUIE = require("./chunk-JFKDSUIE.js");
|
|
41
41
|
var import_chunk_LGYRZ6CV = require("./chunk-LGYRZ6CV.js");
|
|
42
|
-
var
|
|
42
|
+
var import_chunk_ZOEKRXDP = require("./chunk-ZOEKRXDP.js");
|
|
43
43
|
var import_chunk_MATFO4ZW = require("./chunk-MATFO4ZW.js");
|
|
44
44
|
var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
|
|
45
45
|
var import_chunk_QOPTDDIH = require("./chunk-QOPTDDIH.js");
|
|
46
46
|
var import_chunk_DJMFXNR4 = require("./chunk-DJMFXNR4.js");
|
|
47
47
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
48
|
+
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
48
49
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
49
50
|
var import_internals = require("@prisma/internals");
|
|
50
51
|
var import_path = __toESM(require("path"));
|
|
@@ -199,7 +200,7 @@ Some information will be lost (relations, comments, mapped fields, @ignore...),
|
|
|
199
200
|
)} for more info.`);
|
|
200
201
|
}
|
|
201
202
|
}
|
|
202
|
-
const engine = new
|
|
203
|
+
const engine = new import_chunk_ZOEKRXDP.SchemaEngine({
|
|
203
204
|
schemaPath: schemaPath ?? void 0
|
|
204
205
|
});
|
|
205
206
|
const basedOn = !args["--url"] && schemaPath ? ` based on datasource defined in ${(0, import_chunk_SKRR5WT4.underline)(import_path.default.relative(process.cwd(), schemaPath))}` : "";
|
|
@@ -323,7 +324,7 @@ ${_DbPull2.help}`);
|
|
|
323
324
|
return _DbPull2.help;
|
|
324
325
|
}
|
|
325
326
|
};
|
|
326
|
-
_DbPull
|
|
327
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(_DbPull, "help", (0, import_internals.format)(`
|
|
327
328
|
Pull the state from the database to the Prisma schema using introspection
|
|
328
329
|
|
|
329
330
|
${(0, import_chunk_SKRR5WT4.bold)("Usage")}
|
|
@@ -361,5 +362,5 @@ Overwrite the current schema with the introspected schema instead of enriching i
|
|
|
361
362
|
Set composite types introspection depth to 2 levels
|
|
362
363
|
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma db pull --composite-type-depth=2
|
|
363
364
|
|
|
364
|
-
`);
|
|
365
|
+
`));
|
|
365
366
|
var DbPull = _DbPull;
|
|
@@ -26,19 +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
|
|
30
|
-
__export(
|
|
29
|
+
var chunk_X6KW7BYP_exports = {};
|
|
30
|
+
__export(chunk_X6KW7BYP_exports, {
|
|
31
31
|
MigrateReset: () => MigrateReset
|
|
32
32
|
});
|
|
33
|
-
module.exports = __toCommonJS(
|
|
33
|
+
module.exports = __toCommonJS(chunk_X6KW7BYP_exports);
|
|
34
34
|
var import_chunk_V3ZMNXZC = require("./chunk-V3ZMNXZC.js");
|
|
35
35
|
var import_chunk_255BRND3 = require("./chunk-255BRND3.js");
|
|
36
|
-
var
|
|
36
|
+
var import_chunk_KXMACMQC = require("./chunk-KXMACMQC.js");
|
|
37
37
|
var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
|
|
38
|
-
var
|
|
38
|
+
var import_chunk_GKDFIHM2 = require("./chunk-GKDFIHM2.js");
|
|
39
39
|
var import_chunk_QOPTDDIH = require("./chunk-QOPTDDIH.js");
|
|
40
40
|
var import_chunk_DJMFXNR4 = require("./chunk-DJMFXNR4.js");
|
|
41
41
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
42
|
+
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
42
43
|
var import_internals = require("@prisma/internals");
|
|
43
44
|
var import_prompts = __toESM(require("prompts"));
|
|
44
45
|
var _MigrateReset = class _MigrateReset2 {
|
|
@@ -65,7 +66,7 @@ var _MigrateReset = class _MigrateReset2 {
|
|
|
65
66
|
return this.help();
|
|
66
67
|
}
|
|
67
68
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true, config });
|
|
68
|
-
const { schemaPath } = await (0,
|
|
69
|
+
const { schemaPath } = await (0, import_chunk_GKDFIHM2.getSchemaPathAndPrint)(args["--schema"], config.schema);
|
|
69
70
|
const datasourceInfo = await (0, import_chunk_DJMFXNR4.getDatasourceInfo)({ schemaPath });
|
|
70
71
|
(0, import_chunk_QOPTDDIH.printDatasource)({ datasourceInfo });
|
|
71
72
|
const wasDbCreated = await (0, import_chunk_DJMFXNR4.ensureDatabaseExists)("create", schemaPath);
|
|
@@ -88,7 +89,7 @@ var _MigrateReset = class _MigrateReset2 {
|
|
|
88
89
|
process.exit(130);
|
|
89
90
|
}
|
|
90
91
|
}
|
|
91
|
-
const migrate = new
|
|
92
|
+
const migrate = new import_chunk_KXMACMQC.Migrate(schemaPath);
|
|
92
93
|
let migrationIds;
|
|
93
94
|
try {
|
|
94
95
|
await migrate.reset();
|
|
@@ -144,7 +145,7 @@ ${_MigrateReset2.help}`);
|
|
|
144
145
|
return _MigrateReset2.help;
|
|
145
146
|
}
|
|
146
147
|
};
|
|
147
|
-
_MigrateReset
|
|
148
|
+
(0, import_chunk_WWAWV7DQ.__publicField)(_MigrateReset, "help", (0, import_internals.format)(`
|
|
148
149
|
Reset your database and apply all migrations, all data will be lost
|
|
149
150
|
|
|
150
151
|
${(0, import_chunk_SKRR5WT4.bold)("Usage")}
|
|
@@ -170,5 +171,5 @@ ${(0, import_chunk_SKRR5WT4.bold)("Examples")}
|
|
|
170
171
|
|
|
171
172
|
Use --force to skip the confirmation prompt
|
|
172
173
|
${(0, import_chunk_SKRR5WT4.dim)("$")} prisma migrate reset --force
|
|
173
|
-
`);
|
|
174
|
+
`));
|
|
174
175
|
var MigrateReset = _MigrateReset;
|