@prisma/migrate 6.3.0-integration-studio-ux-refinements.2 → 6.3.0-integration-studio-ux-refinements.3
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/Migrate.js +5 -5
- package/dist/SchemaEngine.js +5 -5
- package/dist/bin.js +34 -34
- package/dist/{chunk-XQEPG5ZX.js → chunk-43RWRQLU.js} +10 -10
- package/dist/{chunk-MQQLTARC.js → chunk-5OBIVXLU.js} +42 -20
- package/dist/{chunk-7TICHBC5.js → chunk-77RYI3ZW.js} +10 -10
- package/dist/{chunk-OANG4W7W.js → chunk-7QAR4NT3.js} +12 -11
- package/dist/{chunk-XQJTDY7A.js → chunk-AMRGQNRR.js} +6 -6
- package/dist/{chunk-E3UZYEGF.js → chunk-CQQQ436N.js} +4 -4
- package/dist/{chunk-7HAYHRF4.js → chunk-CSQDAWA6.js} +43 -21
- package/dist/{chunk-33HVTIBE.js → chunk-CSUAUCRR.js} +11 -11
- package/dist/{chunk-UI76O6B2.js → chunk-G66QFMM5.js} +6 -6
- package/dist/{chunk-TFIFMCN4.js → chunk-HAJNCOW7.js} +12 -12
- package/dist/{chunk-4BFDHH3U.js → chunk-I63N54YI.js} +12 -12
- package/dist/{chunk-TJZ4FW7K.js → chunk-JESW2ENL.js} +11 -11
- package/dist/{chunk-AOCCG7RR.js → chunk-JTNVQIRB.js} +6 -6
- package/dist/{chunk-7MUF3HLX.js → chunk-Q3SQU7C6.js} +6 -6
- package/dist/{chunk-KHICE54Q.js → chunk-WJT3IOMB.js} +6 -6
- package/dist/{chunk-UQQQ6HXZ.js → chunk-XJQP3B4W.js} +4 -4
- package/dist/{chunk-NCDRH4BH.js → chunk-ZKWJDQMB.js} +11 -9
- package/dist/commands/DbDrop.js +3 -3
- package/dist/commands/DbExecute.js +6 -6
- package/dist/commands/DbPull.js +6 -6
- package/dist/commands/DbPush.js +7 -7
- package/dist/commands/MigrateDeploy.js +7 -7
- package/dist/commands/MigrateDev.js +7 -7
- package/dist/commands/MigrateDiff.js +6 -6
- package/dist/commands/MigrateReset.js +7 -7
- package/dist/commands/MigrateResolve.js +7 -7
- package/dist/commands/MigrateStatus.js +7 -7
- package/dist/index.js +42 -42
- package/dist/internals/src/client/getClientEngineType.d.ts +2 -1
- package/dist/internals/src/index.d.ts +1 -0
- package/dist/internals/src/utils/prismaPostgres.d.ts +3 -0
- package/dist/migrate/src/Migrate.d.ts +2 -1
- package/dist/utils/ensureDatabaseExists.js +7 -7
- package/dist/utils/getDatabaseVersionSafe.js +5 -5
- package/dist/utils/introspectSql.js +4 -4
- package/dist/utils/setupMongo.js +792 -732
- package/dist/views/handleViewsIO.js +3 -3
- package/package.json +9 -9
@@ -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
|
30
|
-
__export(
|
29
|
+
var chunk_CSQDAWA6_exports = {};
|
30
|
+
__export(chunk_CSQDAWA6_exports, {
|
31
31
|
MigrateDiff: () => MigrateDiff,
|
32
32
|
init_MigrateDiff: () => init_MigrateDiff
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_CSQDAWA6_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
|
39
|
-
var
|
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"));
|
@@ -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.
|
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-integration-studio-ux-refinements.
|
11546
|
+
version: "6.3.0-integration-studio-ux-refinements.3",
|
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",
|
@@ -11572,7 +11586,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
11572
11586
|
esbuild: "0.24.2",
|
11573
11587
|
"escape-string-regexp": "4.0.0",
|
11574
11588
|
execa: "5.1.1",
|
11575
|
-
"fast-glob": "3.3.
|
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.
|
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.
|
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-
|
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,
|
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:
|
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,
|
11743
|
+
import_function2 = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_CQQQ436N.require_function)());
|
11722
11744
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
11723
|
-
(0,
|
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,
|
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,
|
11876
|
+
import_function3 = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_CQQQ436N.require_function)());
|
11855
11877
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
11856
|
-
(0,
|
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,
|
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,
|
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
|
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,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
|
30
|
-
__export(
|
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(
|
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
|
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
|
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,
|
55
|
-
(0,
|
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,
|
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,
|
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
|
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
|
30
|
-
__export(
|
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(
|
35
|
-
var
|
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,
|
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
|
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
|
30
|
-
__export(
|
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(
|
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
|
44
|
-
var
|
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
|
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,
|
58
|
-
(0,
|
57
|
+
(0, import_chunk_CQQQ436N.init_dist)();
|
58
|
+
(0, import_chunk_Q3SQU7C6.init_SchemaEngine)();
|
59
59
|
(0, import_chunk_GN5BY5N2.init_countModelsAndTypes)();
|
60
|
-
(0,
|
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,
|
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,
|
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
|
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))}` : "";
|
@@ -16,16 +16,16 @@ 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_I63N54YI_exports = {};
|
20
|
+
__export(chunk_I63N54YI_exports, {
|
21
21
|
MigrateResolve: () => MigrateResolve,
|
22
22
|
init_MigrateResolve: () => init_MigrateResolve
|
23
23
|
});
|
24
|
-
module.exports = __toCommonJS(
|
25
|
-
var
|
24
|
+
module.exports = __toCommonJS(chunk_I63N54YI_exports);
|
25
|
+
var import_chunk_ZKWJDQMB = require("./chunk-ZKWJDQMB.js");
|
26
26
|
var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
|
27
27
|
var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
|
28
|
-
var
|
28
|
+
var import_chunk_XJQP3B4W = require("./chunk-XJQP3B4W.js");
|
29
29
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
30
30
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
31
31
|
var import_internals = require("@prisma/internals");
|
@@ -33,8 +33,8 @@ var _MigrateResolve, MigrateResolve;
|
|
33
33
|
var init_MigrateResolve = (0, import_chunk_WWAWV7DQ.__esm)({
|
34
34
|
"src/commands/MigrateResolve.ts"() {
|
35
35
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
36
|
-
(0,
|
37
|
-
(0,
|
36
|
+
(0, import_chunk_ZKWJDQMB.init_Migrate)();
|
37
|
+
(0, import_chunk_XJQP3B4W.init_ensureDatabaseExists)();
|
38
38
|
(0, import_chunk_EYA6AFSF.init_getSchemaPathAndPrint)();
|
39
39
|
(0, import_chunk_Q7ACZDDT.init_printDatasource)();
|
40
40
|
_MigrateResolve = class _MigrateResolve2 {
|
@@ -63,7 +63,7 @@ var init_MigrateResolve = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
63
63
|
}
|
64
64
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
|
65
65
|
const { schemaPath } = await (0, import_chunk_EYA6AFSF.getSchemaPathAndPrint)(args["--schema"]);
|
66
|
-
(0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0,
|
66
|
+
(0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath }) });
|
67
67
|
if (!args["--applied"] && !args["--rolled-back"]) {
|
68
68
|
throw new Error(
|
69
69
|
`--applied or --rolled-back must be part of the command like:
|
@@ -81,8 +81,8 @@ ${(0, import_chunk_6TE2RIPN.bold)((0, import_chunk_6TE2RIPN.green)((0, import_in
|
|
81
81
|
)}`
|
82
82
|
);
|
83
83
|
}
|
84
|
-
await (0,
|
85
|
-
const migrate = new
|
84
|
+
await (0, import_chunk_XJQP3B4W.ensureCanConnectToDatabase)(schemaPath);
|
85
|
+
const migrate = new import_chunk_ZKWJDQMB.Migrate(schemaPath);
|
86
86
|
try {
|
87
87
|
await migrate.markMigrationApplied({
|
88
88
|
migrationId: args["--applied"]
|
@@ -102,8 +102,8 @@ Migration ${args["--applied"]} marked as applied.
|
|
102
102
|
)}`
|
103
103
|
);
|
104
104
|
}
|
105
|
-
await (0,
|
106
|
-
const migrate = new
|
105
|
+
await (0, import_chunk_XJQP3B4W.ensureCanConnectToDatabase)(schemaPath);
|
106
|
+
const migrate = new import_chunk_ZKWJDQMB.Migrate(schemaPath);
|
107
107
|
try {
|
108
108
|
await migrate.markMigrationRolledBack({
|
109
109
|
migrationId: args["--rolled-back"]
|
@@ -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
|
30
|
-
__export(
|
29
|
+
var chunk_JESW2ENL_exports = {};
|
30
|
+
__export(chunk_JESW2ENL_exports, {
|
31
31
|
DbPush: () => DbPush,
|
32
32
|
init_DbPush: () => init_DbPush
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
35
|
-
var
|
34
|
+
module.exports = __toCommonJS(chunk_JESW2ENL_exports);
|
35
|
+
var import_chunk_ZKWJDQMB = require("./chunk-ZKWJDQMB.js");
|
36
36
|
var import_chunk_U374EXYQ = require("./chunk-U374EXYQ.js");
|
37
37
|
var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
|
38
38
|
var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
|
39
|
-
var
|
39
|
+
var import_chunk_XJQP3B4W = require("./chunk-XJQP3B4W.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_internals = require("@prisma/internals");
|
@@ -45,8 +45,8 @@ var _DbPush, DbPush;
|
|
45
45
|
var init_DbPush = (0, import_chunk_WWAWV7DQ.__esm)({
|
46
46
|
"src/commands/DbPush.ts"() {
|
47
47
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
48
|
-
(0,
|
49
|
-
(0,
|
48
|
+
(0, import_chunk_ZKWJDQMB.init_Migrate)();
|
49
|
+
(0, import_chunk_XJQP3B4W.init_ensureDatabaseExists)();
|
50
50
|
(0, import_chunk_U374EXYQ.init_errors)();
|
51
51
|
(0, import_chunk_EYA6AFSF.init_getSchemaPathAndPrint)();
|
52
52
|
(0, import_chunk_Q7ACZDDT.init_printDatasource)();
|
@@ -77,11 +77,11 @@ var init_DbPush = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
77
77
|
}
|
78
78
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
|
79
79
|
const { schemaPath } = await (0, import_chunk_EYA6AFSF.getSchemaPathAndPrint)(args["--schema"]);
|
80
|
-
const datasourceInfo = await (0,
|
80
|
+
const datasourceInfo = await (0, import_chunk_XJQP3B4W.getDatasourceInfo)({ schemaPath });
|
81
81
|
(0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo });
|
82
|
-
const migrate = new
|
82
|
+
const migrate = new import_chunk_ZKWJDQMB.Migrate(schemaPath);
|
83
83
|
try {
|
84
|
-
const wasDbCreated = await (0,
|
84
|
+
const wasDbCreated = await (0, import_chunk_XJQP3B4W.ensureDatabaseExists)("push", schemaPath);
|
85
85
|
if (wasDbCreated) {
|
86
86
|
process.stdout.write("\n" + wasDbCreated + "\n");
|
87
87
|
}
|
@@ -233,7 +233,7 @@ ${rocketEmoji}${provider === "mongodb" ? migrationSuccessMongoMessage : migratio
|
|
233
233
|
);
|
234
234
|
}
|
235
235
|
if (!process.env.PRISMA_MIGRATE_SKIP_GENERATE && !args["--skip-generate"]) {
|
236
|
-
await migrate.tryToRunGenerate();
|
236
|
+
await migrate.tryToRunGenerate(datasourceInfo);
|
237
237
|
}
|
238
238
|
return ``;
|
239
239
|
}
|
@@ -26,20 +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_JTNVQIRB_exports = {};
|
30
|
+
__export(chunk_JTNVQIRB_exports, {
|
31
31
|
getDatabaseVersionSafe: () => getDatabaseVersionSafe,
|
32
32
|
init_getDatabaseVersionSafe: () => init_getDatabaseVersionSafe
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
35
|
-
var
|
34
|
+
module.exports = __toCommonJS(chunk_JTNVQIRB_exports);
|
35
|
+
var import_chunk_Q3SQU7C6 = require("./chunk-Q3SQU7C6.js");
|
36
36
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
37
37
|
var import_debug = __toESM(require("@prisma/debug"));
|
38
38
|
async function getDatabaseVersionSafe(args) {
|
39
39
|
let engine;
|
40
40
|
let dbVersion;
|
41
41
|
try {
|
42
|
-
engine = new
|
42
|
+
engine = new import_chunk_Q3SQU7C6.SchemaEngine({});
|
43
43
|
dbVersion = await engine.getDatabaseVersion(args);
|
44
44
|
} catch (e) {
|
45
45
|
debug(e);
|
@@ -53,7 +53,7 @@ async function getDatabaseVersionSafe(args) {
|
|
53
53
|
var debug;
|
54
54
|
var init_getDatabaseVersionSafe = (0, import_chunk_WWAWV7DQ.__esm)({
|
55
55
|
"src/utils/getDatabaseVersionSafe.ts"() {
|
56
|
-
(0,
|
56
|
+
(0, import_chunk_Q3SQU7C6.init_SchemaEngine)();
|
57
57
|
debug = (0, import_debug.default)("prisma:cli");
|
58
58
|
}
|
59
59
|
});
|
@@ -26,14 +26,14 @@ 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_Q3SQU7C6_exports = {};
|
30
|
+
__export(chunk_Q3SQU7C6_exports, {
|
31
31
|
EngineError: () => EngineError,
|
32
32
|
SchemaEngine: () => SchemaEngine,
|
33
33
|
init_SchemaEngine: () => init_SchemaEngine
|
34
34
|
});
|
35
|
-
module.exports = __toCommonJS(
|
36
|
-
var
|
35
|
+
module.exports = __toCommonJS(chunk_Q3SQU7C6_exports);
|
36
|
+
var import_chunk_CQQQ436N = require("./chunk-CQQQ436N.js");
|
37
37
|
var import_chunk_AAATUOV6 = require("./chunk-AAATUOV6.js");
|
38
38
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
39
39
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
@@ -50,7 +50,7 @@ var init_SchemaEngine = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
50
50
|
"src/SchemaEngine.ts"() {
|
51
51
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
52
52
|
(0, import_chunk_AAATUOV6.init_byline)();
|
53
|
-
(0,
|
53
|
+
(0, import_chunk_CQQQ436N.init_handleViewsIO)();
|
54
54
|
debugRpc = (0, import_debug.default)("prisma:schemaEngine:rpc");
|
55
55
|
debugStderr = (0, import_debug.default)("prisma:schemaEngine:stderr");
|
56
56
|
debugStdin = (0, import_debug.default)("prisma:schemaEngine:stdin");
|
@@ -175,7 +175,7 @@ var init_SchemaEngine = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
175
175
|
const { views } = introspectResult;
|
176
176
|
if (views) {
|
177
177
|
const schemaPath = this.schemaPath ?? import_node_path.default.join(process.cwd(), "prisma");
|
178
|
-
await (0,
|
178
|
+
await (0, import_chunk_CQQQ436N.handleViewsIO)({ views, schemaPath });
|
179
179
|
}
|
180
180
|
return introspectResult;
|
181
181
|
} finally {
|