@prisma/migrate 6.4.0-dev.5 → 6.4.0-dev.50
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 +4 -4
- package/dist/SchemaEngine.js +4 -4
- package/dist/bin.js +61 -47
- package/dist/{chunk-7S3QTEWV.js → chunk-425Y6H4U.js} +41 -37
- package/dist/{chunk-XVXYNQ6H.js → chunk-6MPIO773.js} +40 -36
- package/dist/{chunk-AMRGQNRR.js → chunk-75EIHNAH.js} +6 -6
- package/dist/{chunk-Q3SQU7C6.js → chunk-7S3Q4MCN.js} +4 -4
- package/dist/{chunk-NKQGJ3AE.js → chunk-A6PMXMMT.js} +29 -15
- package/dist/{chunk-GRGGAY6L.js → chunk-CUDKD32S.js} +159 -5
- package/dist/{chunk-7QAR4NT3.js → chunk-EDQWDMXR.js} +9 -8
- package/dist/{chunk-43RWRQLU.js → chunk-FM4XJBEM.js} +9 -8
- package/dist/{chunk-JESW2ENL.js → chunk-JYXY3OJ6.js} +9 -8
- package/dist/{chunk-77RYI3ZW.js → chunk-KW5YM5ZK.js} +9 -8
- package/dist/{chunk-NJUAN6V2.js → chunk-L5WSTNST.js} +6 -6
- package/dist/{chunk-HAJNCOW7.js → chunk-LPSZG4BL.js} +22 -21
- package/dist/{chunk-JZ6FKTWG.js → chunk-MWDR5RWF.js} +5 -6
- package/dist/{chunk-G66QFMM5.js → chunk-N3AT4GUM.js} +11 -10
- package/dist/{chunk-CK5VLKFM.js → chunk-NGDFNKHZ.js} +6 -6
- package/dist/{chunk-E2XKFV2C.js → chunk-QV7SOU3V.js} +6 -5
- package/dist/{chunk-CSUAUCRR.js → chunk-REKABZBY.js} +9 -8
- package/dist/{chunk-I63N54YI.js → chunk-T6Y2635A.js} +10 -9
- package/dist/{chunk-ZKWJDQMB.js → chunk-UVNSK22K.js} +7 -7
- package/dist/{chunk-WJT3IOMB.js → chunk-VGYN2FAS.js} +6 -5
- package/dist/{chunk-JTNVQIRB.js → chunk-YWWOSXMY.js} +6 -6
- package/dist/commands/DbCommand.js +3 -3
- package/dist/commands/DbDrop.js +2 -2
- package/dist/commands/DbExecute.js +5 -5
- package/dist/commands/DbPull.js +5 -5
- package/dist/commands/DbPush.js +5 -5
- package/dist/commands/DbSeed.js +3 -3
- package/dist/commands/MigrateCommand.js +3 -3
- 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 +51 -51
- package/dist/internals/src/cli/getSchema.d.ts +1 -39
- package/dist/internals/src/cli/types.d.ts +2 -1
- package/dist/internals/src/index.d.ts +2 -1
- package/dist/internals/src/utils/loadEnvFile.d.ts +4 -2
- package/dist/internals/src/utils/toSchemasContainer.d.ts +1 -1
- package/dist/migrate/src/CLI.d.ts +2 -1
- package/dist/migrate/src/commands/DbCommand.d.ts +2 -1
- package/dist/migrate/src/commands/DbDrop.d.ts +2 -1
- package/dist/migrate/src/commands/DbExecute.d.ts +2 -1
- package/dist/migrate/src/commands/DbPull.d.ts +2 -1
- package/dist/migrate/src/commands/DbPush.d.ts +2 -1
- package/dist/migrate/src/commands/DbSeed.d.ts +2 -1
- package/dist/migrate/src/commands/MigrateCommand.d.ts +2 -1
- package/dist/migrate/src/commands/MigrateDeploy.d.ts +2 -1
- package/dist/migrate/src/commands/MigrateDev.d.ts +2 -1
- package/dist/migrate/src/commands/MigrateDiff.d.ts +2 -1
- package/dist/migrate/src/commands/MigrateReset.d.ts +2 -1
- package/dist/migrate/src/commands/MigrateResolve.d.ts +2 -1
- package/dist/migrate/src/commands/MigrateStatus.d.ts +2 -1
- package/dist/utils/getDatabaseVersionSafe.js +4 -4
- package/dist/utils/introspectSql.js +3 -3
- package/dist/utils/setupMSSQL.js +72 -73
- package/dist/utils/spinner.js +3 -3
- package/package.json +7 -6
package/dist/CLI.js
CHANGED
|
@@ -18,10 +18,10 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var CLI_exports = {};
|
|
20
20
|
__export(CLI_exports, {
|
|
21
|
-
CLI: () =>
|
|
21
|
+
CLI: () => import_chunk_MWDR5RWF.CLI
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(CLI_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_MWDR5RWF = require("./chunk-MWDR5RWF.js");
|
|
25
25
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
|
26
26
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
27
|
-
(0,
|
|
27
|
+
(0, import_chunk_MWDR5RWF.init_CLI)();
|
package/dist/Migrate.js
CHANGED
|
@@ -18,15 +18,15 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var Migrate_exports = {};
|
|
20
20
|
__export(Migrate_exports, {
|
|
21
|
-
Migrate: () =>
|
|
21
|
+
Migrate: () => import_chunk_UVNSK22K.Migrate
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(Migrate_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_UVNSK22K = require("./chunk-UVNSK22K.js");
|
|
25
25
|
var import_chunk_6C7ESGWY = require("./chunk-6C7ESGWY.js");
|
|
26
26
|
var import_chunk_J46BJQHT = require("./chunk-J46BJQHT.js");
|
|
27
|
-
var
|
|
27
|
+
var import_chunk_7S3Q4MCN = require("./chunk-7S3Q4MCN.js");
|
|
28
28
|
var import_chunk_CQQQ436N = require("./chunk-CQQQ436N.js");
|
|
29
29
|
var import_chunk_AAATUOV6 = require("./chunk-AAATUOV6.js");
|
|
30
30
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
|
31
31
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
32
|
-
(0,
|
|
32
|
+
(0, import_chunk_UVNSK22K.init_Migrate)();
|
package/dist/SchemaEngine.js
CHANGED
|
@@ -18,13 +18,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var SchemaEngine_exports = {};
|
|
20
20
|
__export(SchemaEngine_exports, {
|
|
21
|
-
EngineError: () =>
|
|
22
|
-
SchemaEngine: () =>
|
|
21
|
+
EngineError: () => import_chunk_7S3Q4MCN.EngineError,
|
|
22
|
+
SchemaEngine: () => import_chunk_7S3Q4MCN.SchemaEngine
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(SchemaEngine_exports);
|
|
25
|
-
var
|
|
25
|
+
var import_chunk_7S3Q4MCN = require("./chunk-7S3Q4MCN.js");
|
|
26
26
|
var import_chunk_CQQQ436N = require("./chunk-CQQQ436N.js");
|
|
27
27
|
var import_chunk_AAATUOV6 = require("./chunk-AAATUOV6.js");
|
|
28
28
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
|
29
29
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
30
|
-
(0,
|
|
30
|
+
(0, import_chunk_7S3Q4MCN.init_SchemaEngine)();
|
package/dist/bin.js
CHANGED
|
@@ -32,14 +32,14 @@ __export(bin_exports, {
|
|
|
32
32
|
default: () => bin_default
|
|
33
33
|
});
|
|
34
34
|
module.exports = __toCommonJS(bin_exports);
|
|
35
|
-
var
|
|
36
|
-
var
|
|
37
|
-
var
|
|
38
|
-
var
|
|
39
|
-
var
|
|
40
|
-
var
|
|
41
|
-
var
|
|
42
|
-
var
|
|
35
|
+
var import_chunk_MWDR5RWF = require("./chunk-MWDR5RWF.js");
|
|
36
|
+
var import_chunk_YWWOSXMY = require("./chunk-YWWOSXMY.js");
|
|
37
|
+
var import_chunk_EDQWDMXR = require("./chunk-EDQWDMXR.js");
|
|
38
|
+
var import_chunk_T6Y2635A = require("./chunk-T6Y2635A.js");
|
|
39
|
+
var import_chunk_KW5YM5ZK = require("./chunk-KW5YM5ZK.js");
|
|
40
|
+
var import_chunk_N3AT4GUM = require("./chunk-N3AT4GUM.js");
|
|
41
|
+
var import_chunk_LPSZG4BL = require("./chunk-LPSZG4BL.js");
|
|
42
|
+
var import_chunk_CUDKD32S = require("./chunk-CUDKD32S.js");
|
|
43
43
|
var import_chunk_ILJRJJ3S = require("./chunk-ILJRJJ3S.js");
|
|
44
44
|
var import_chunk_YUCPBDWV = require("./chunk-YUCPBDWV.js");
|
|
45
45
|
var import_chunk_RM5LJIEV = require("./chunk-RM5LJIEV.js");
|
|
@@ -49,28 +49,28 @@ var import_chunk_V7DE6JTG = require("./chunk-V7DE6JTG.js");
|
|
|
49
49
|
var import_chunk_QBK5XTJE = require("./chunk-QBK5XTJE.js");
|
|
50
50
|
var import_chunk_INC2OACE = require("./chunk-INC2OACE.js");
|
|
51
51
|
var import_chunk_GN5BY5N2 = require("./chunk-GN5BY5N2.js");
|
|
52
|
-
var
|
|
53
|
-
var
|
|
54
|
-
var
|
|
55
|
-
var
|
|
56
|
-
var
|
|
52
|
+
var import_chunk_JYXY3OJ6 = require("./chunk-JYXY3OJ6.js");
|
|
53
|
+
var import_chunk_QV7SOU3V = require("./chunk-QV7SOU3V.js");
|
|
54
|
+
var import_chunk_NGDFNKHZ = require("./chunk-NGDFNKHZ.js");
|
|
55
|
+
var import_chunk_FM4XJBEM = require("./chunk-FM4XJBEM.js");
|
|
56
|
+
var import_chunk_REKABZBY = require("./chunk-REKABZBY.js");
|
|
57
57
|
var import_chunk_IFCV5MY4 = require("./chunk-IFCV5MY4.js");
|
|
58
58
|
var import_chunk_SGCF5OHF = require("./chunk-SGCF5OHF.js");
|
|
59
59
|
var import_chunk_YKUZUAXA = require("./chunk-YKUZUAXA.js");
|
|
60
60
|
var import_chunk_WOOPRG54 = require("./chunk-WOOPRG54.js");
|
|
61
61
|
var import_chunk_6QFE3AWR = require("./chunk-6QFE3AWR.js");
|
|
62
62
|
var import_chunk_LKTTJWFT = require("./chunk-LKTTJWFT.js");
|
|
63
|
-
var
|
|
64
|
-
var
|
|
63
|
+
var import_chunk_425Y6H4U = require("./chunk-425Y6H4U.js");
|
|
64
|
+
var import_chunk_A6PMXMMT = require("./chunk-A6PMXMMT.js");
|
|
65
65
|
var import_chunk_XRTNIFND = require("./chunk-XRTNIFND.js");
|
|
66
66
|
var import_chunk_TKAGMA5K = require("./chunk-TKAGMA5K.js");
|
|
67
|
-
var
|
|
67
|
+
var import_chunk_UVNSK22K = require("./chunk-UVNSK22K.js");
|
|
68
68
|
var import_chunk_6C7ESGWY = require("./chunk-6C7ESGWY.js");
|
|
69
69
|
var import_chunk_J46BJQHT = require("./chunk-J46BJQHT.js");
|
|
70
|
-
var
|
|
70
|
+
var import_chunk_7S3Q4MCN = require("./chunk-7S3Q4MCN.js");
|
|
71
71
|
var import_chunk_CQQQ436N = require("./chunk-CQQQ436N.js");
|
|
72
72
|
var import_chunk_AAATUOV6 = require("./chunk-AAATUOV6.js");
|
|
73
|
-
var
|
|
73
|
+
var import_chunk_L5WSTNST = require("./chunk-L5WSTNST.js");
|
|
74
74
|
var import_chunk_U374EXYQ = require("./chunk-U374EXYQ.js");
|
|
75
75
|
var import_chunk_EYA6AFSF = require("./chunk-EYA6AFSF.js");
|
|
76
76
|
var import_chunk_Q7ACZDDT = require("./chunk-Q7ACZDDT.js");
|
|
@@ -78,26 +78,27 @@ var import_chunk_XJQP3B4W = require("./chunk-XJQP3B4W.js");
|
|
|
78
78
|
var import_chunk_KPUNMK5W = require("./chunk-KPUNMK5W.js");
|
|
79
79
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
|
80
80
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
|
81
|
+
var import_config = require("@prisma/config");
|
|
81
82
|
var import_debug = __toESM(require("@prisma/debug"));
|
|
82
83
|
var import_engines_version = require("@prisma/engines-version");
|
|
83
84
|
var import_internals = require("@prisma/internals");
|
|
84
85
|
var require_bin = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
85
86
|
"src/bin.ts"(exports, module) {
|
|
86
87
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
|
87
|
-
(0,
|
|
88
|
-
(0,
|
|
89
|
-
(0,
|
|
90
|
-
(0,
|
|
91
|
-
(0,
|
|
92
|
-
(0,
|
|
93
|
-
(0,
|
|
94
|
-
(0,
|
|
95
|
-
(0,
|
|
96
|
-
(0,
|
|
97
|
-
(0,
|
|
98
|
-
(0,
|
|
99
|
-
(0,
|
|
100
|
-
(0,
|
|
88
|
+
(0, import_chunk_MWDR5RWF.init_CLI)();
|
|
89
|
+
(0, import_chunk_L5WSTNST.init_DbCommand)();
|
|
90
|
+
(0, import_chunk_N3AT4GUM.init_DbExecute)();
|
|
91
|
+
(0, import_chunk_LPSZG4BL.init_DbPull)();
|
|
92
|
+
(0, import_chunk_JYXY3OJ6.init_DbPush)();
|
|
93
|
+
(0, import_chunk_QV7SOU3V.init_DbSeed)();
|
|
94
|
+
(0, import_chunk_NGDFNKHZ.init_MigrateCommand)();
|
|
95
|
+
(0, import_chunk_FM4XJBEM.init_MigrateDeploy)();
|
|
96
|
+
(0, import_chunk_REKABZBY.init_MigrateDev)();
|
|
97
|
+
(0, import_chunk_425Y6H4U.init_MigrateDiff)();
|
|
98
|
+
(0, import_chunk_EDQWDMXR.init_MigrateReset)();
|
|
99
|
+
(0, import_chunk_T6Y2635A.init_MigrateResolve)();
|
|
100
|
+
(0, import_chunk_KW5YM5ZK.init_MigrateStatus)();
|
|
101
|
+
(0, import_chunk_YWWOSXMY.init_getDatabaseVersionSafe)();
|
|
101
102
|
process.on("uncaughtException", (e) => {
|
|
102
103
|
console.log(e);
|
|
103
104
|
});
|
|
@@ -108,26 +109,39 @@ var require_bin = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
108
109
|
process.exit(130);
|
|
109
110
|
});
|
|
110
111
|
var commandArray = process.argv.slice(2);
|
|
112
|
+
var args = (0, import_internals.arg)(
|
|
113
|
+
commandArray,
|
|
114
|
+
{
|
|
115
|
+
"--config": String
|
|
116
|
+
},
|
|
117
|
+
false,
|
|
118
|
+
true
|
|
119
|
+
);
|
|
111
120
|
var packageJson = eval(`require('../package.json')`);
|
|
112
121
|
async function main() {
|
|
113
|
-
const cli =
|
|
114
|
-
migrate:
|
|
115
|
-
dev:
|
|
116
|
-
status:
|
|
117
|
-
resolve:
|
|
118
|
-
reset:
|
|
119
|
-
deploy:
|
|
120
|
-
diff:
|
|
122
|
+
const cli = import_chunk_MWDR5RWF.CLI.new({
|
|
123
|
+
migrate: import_chunk_NGDFNKHZ.MigrateCommand.new({
|
|
124
|
+
dev: import_chunk_REKABZBY.MigrateDev.new(),
|
|
125
|
+
status: import_chunk_KW5YM5ZK.MigrateStatus.new(),
|
|
126
|
+
resolve: import_chunk_T6Y2635A.MigrateResolve.new(),
|
|
127
|
+
reset: import_chunk_EDQWDMXR.MigrateReset.new(),
|
|
128
|
+
deploy: import_chunk_FM4XJBEM.MigrateDeploy.new(),
|
|
129
|
+
diff: import_chunk_425Y6H4U.MigrateDiff.new()
|
|
121
130
|
}),
|
|
122
|
-
db:
|
|
123
|
-
execute:
|
|
124
|
-
pull:
|
|
125
|
-
push:
|
|
131
|
+
db: import_chunk_L5WSTNST.DbCommand.new({
|
|
132
|
+
execute: import_chunk_N3AT4GUM.DbExecute.new(),
|
|
133
|
+
pull: import_chunk_LPSZG4BL.DbPull.new(),
|
|
134
|
+
push: import_chunk_JYXY3OJ6.DbPush.new(),
|
|
126
135
|
// drop: DbDrop.new(),
|
|
127
|
-
seed:
|
|
136
|
+
seed: import_chunk_QV7SOU3V.DbSeed.new()
|
|
128
137
|
})
|
|
129
138
|
});
|
|
130
|
-
const
|
|
139
|
+
const { config, error } = await (0, import_config.loadConfigFromFile)({ configFile: args["--config"] });
|
|
140
|
+
if (error) {
|
|
141
|
+
console.error(`Failed to load config file: ${error._tag}`);
|
|
142
|
+
return 1;
|
|
143
|
+
}
|
|
144
|
+
const result = await cli.parse(commandArray, { ...(0, import_config.defaultConfig)(), ...config });
|
|
131
145
|
if (result instanceof import_internals.HelpError) {
|
|
132
146
|
console.error(result);
|
|
133
147
|
return 1;
|
|
@@ -149,7 +163,7 @@ var require_bin = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
149
163
|
cliVersion: packageJson.version,
|
|
150
164
|
enginesVersion: import_engines_version.enginesVersion,
|
|
151
165
|
command: commandArray.join(" "),
|
|
152
|
-
getDatabaseVersionSafe:
|
|
166
|
+
getDatabaseVersionSafe: import_chunk_YWWOSXMY.getDatabaseVersionSafe
|
|
153
167
|
}).catch((e) => {
|
|
154
168
|
if (import_debug.default.enabled("migrate")) {
|
|
155
169
|
console.error((0, import_chunk_6TE2RIPN.red)((0, import_chunk_6TE2RIPN.bold)("Error: ")) + e.stack);
|
|
@@ -26,16 +26,16 @@ 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_425Y6H4U_exports = {};
|
|
30
|
+
__export(chunk_425Y6H4U_exports, {
|
|
31
31
|
MigrateDiff: () => MigrateDiff,
|
|
32
32
|
init_MigrateDiff: () => init_MigrateDiff
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_425Y6H4U_exports);
|
|
35
|
+
var import_chunk_A6PMXMMT = require("./chunk-A6PMXMMT.js");
|
|
36
36
|
var import_chunk_XRTNIFND = require("./chunk-XRTNIFND.js");
|
|
37
37
|
var import_chunk_TKAGMA5K = require("./chunk-TKAGMA5K.js");
|
|
38
|
-
var
|
|
38
|
+
var import_chunk_UVNSK22K = require("./chunk-UVNSK22K.js");
|
|
39
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");
|
|
@@ -6164,6 +6164,7 @@ var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
6164
6164
|
__export2(index_exports, {
|
|
6165
6165
|
CompositeFilesResolver: () => CompositeFilesResolver,
|
|
6166
6166
|
InMemoryFilesResolver: () => InMemoryFilesResolver,
|
|
6167
|
+
ensureType: () => ensureType2,
|
|
6167
6168
|
loadRelatedSchemaFiles: () => loadRelatedSchemaFiles,
|
|
6168
6169
|
loadSchemaFiles: () => loadSchemaFiles2,
|
|
6169
6170
|
realFsResolver: () => realFsResolver,
|
|
@@ -6394,6 +6395,24 @@ var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
6394
6395
|
}
|
|
6395
6396
|
return void 0;
|
|
6396
6397
|
}
|
|
6398
|
+
var import_promises3 = __toESM22((0, import_chunk_WWAWV7DQ.__require)("node:fs/promises"));
|
|
6399
|
+
async function ensureType2(entryPath, expectedType) {
|
|
6400
|
+
try {
|
|
6401
|
+
const pathStat = await import_promises3.default.stat(entryPath);
|
|
6402
|
+
if (expectedType === "file" && pathStat.isFile()) {
|
|
6403
|
+
return void 0;
|
|
6404
|
+
}
|
|
6405
|
+
if (expectedType === "directory" && pathStat.isDirectory()) {
|
|
6406
|
+
return void 0;
|
|
6407
|
+
}
|
|
6408
|
+
return { kind: "WrongType", path: entryPath, expectedTypes: [expectedType] };
|
|
6409
|
+
} catch (e) {
|
|
6410
|
+
if (e.code === "ENOENT") {
|
|
6411
|
+
return { kind: "NotFound", path: entryPath, expectedType };
|
|
6412
|
+
}
|
|
6413
|
+
throw e;
|
|
6414
|
+
}
|
|
6415
|
+
}
|
|
6397
6416
|
}
|
|
6398
6417
|
});
|
|
6399
6418
|
async function findUp(name, {
|
|
@@ -10706,8 +10725,8 @@ var require_typos = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
10706
10725
|
var require_fixer = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
10707
10726
|
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/fixer.js"(exports, module2) {
|
|
10708
10727
|
"use strict";
|
|
10709
|
-
var isValidSemver = (0,
|
|
10710
|
-
var cleanSemver = (0,
|
|
10728
|
+
var isValidSemver = (0, import_chunk_A6PMXMMT.require_valid)();
|
|
10729
|
+
var cleanSemver = (0, import_chunk_A6PMXMMT.require_clean)();
|
|
10711
10730
|
var validateLicense = require_validate_npm_package_license();
|
|
10712
10731
|
var hostedGitInfo = require_lib5();
|
|
10713
10732
|
var isBuiltinModule = require_is_core_module();
|
|
@@ -11543,7 +11562,7 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
11543
11562
|
"../internals/package.json"(exports, module2) {
|
|
11544
11563
|
module2.exports = {
|
|
11545
11564
|
name: "@prisma/internals",
|
|
11546
|
-
version: "6.4.0-dev.
|
|
11565
|
+
version: "6.4.0-dev.50",
|
|
11547
11566
|
description: "This package is intended for Prisma's internal use",
|
|
11548
11567
|
main: "dist/index.js",
|
|
11549
11568
|
types: "dist/index.d.ts",
|
|
@@ -11623,12 +11642,13 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
11623
11642
|
yarn: "1.22.22"
|
|
11624
11643
|
},
|
|
11625
11644
|
dependencies: {
|
|
11645
|
+
"@prisma/config": "workspace:*",
|
|
11626
11646
|
"@prisma/debug": "workspace:*",
|
|
11627
11647
|
"@prisma/engines": "workspace:*",
|
|
11628
11648
|
"@prisma/fetch-engine": "workspace:*",
|
|
11629
11649
|
"@prisma/generator-helper": "workspace:*",
|
|
11630
11650
|
"@prisma/get-platform": "workspace:*",
|
|
11631
|
-
"@prisma/prisma-schema-wasm": "6.4.0-
|
|
11651
|
+
"@prisma/prisma-schema-wasm": "6.4.0-24.b06b231b59f731b5063a26ba21c36320ce2feb4b",
|
|
11632
11652
|
"@prisma/schema-files-loader": "workspace:*",
|
|
11633
11653
|
arg: "5.0.2",
|
|
11634
11654
|
prompts: "2.4.2"
|
|
@@ -11919,7 +11939,7 @@ async function getSchemaWithPath(schemaPathFromArgs, { cwd = process.cwd(), argu
|
|
|
11919
11939
|
}
|
|
11920
11940
|
async function readSchemaFromSingleFile(schemaPath) {
|
|
11921
11941
|
debug2("Reading schema from single file", schemaPath);
|
|
11922
|
-
const typeError = await ensureType(schemaPath, "file");
|
|
11942
|
+
const typeError = await (0, import_schema_files_loader.ensureType)(schemaPath, "file");
|
|
11923
11943
|
if (typeError) {
|
|
11924
11944
|
return { ok: false, error: typeError };
|
|
11925
11945
|
}
|
|
@@ -11932,7 +11952,7 @@ async function readSchemaFromSingleFile(schemaPath) {
|
|
|
11932
11952
|
}
|
|
11933
11953
|
async function readSchemaFromDirectory(schemaPath) {
|
|
11934
11954
|
debug2("Reading schema from multiple files", schemaPath);
|
|
11935
|
-
const typeError = await ensureType(schemaPath, "directory");
|
|
11955
|
+
const typeError = await (0, import_schema_files_loader.ensureType)(schemaPath, "directory");
|
|
11936
11956
|
if (typeError) {
|
|
11937
11957
|
return { ok: false, error: typeError };
|
|
11938
11958
|
}
|
|
@@ -11948,23 +11968,6 @@ async function readSchemaFromDirectory(schemaPath) {
|
|
|
11948
11968
|
}
|
|
11949
11969
|
return { ok: true, schema: { schemaPath, schemaRootDir: schemaPath, schemas: files } };
|
|
11950
11970
|
}
|
|
11951
|
-
async function ensureType(entryPath, expectedType) {
|
|
11952
|
-
try {
|
|
11953
|
-
const pathStat = await stat(entryPath);
|
|
11954
|
-
if (expectedType === "file" && pathStat.isFile()) {
|
|
11955
|
-
return void 0;
|
|
11956
|
-
}
|
|
11957
|
-
if (expectedType === "directory" && pathStat.isDirectory()) {
|
|
11958
|
-
return void 0;
|
|
11959
|
-
}
|
|
11960
|
-
return { kind: "WrongType", path: entryPath, expectedTypes: [expectedType] };
|
|
11961
|
-
} catch (e) {
|
|
11962
|
-
if (e.code === "ENOENT") {
|
|
11963
|
-
return { kind: "NotFound", path: entryPath, expectedType };
|
|
11964
|
-
}
|
|
11965
|
-
throw e;
|
|
11966
|
-
}
|
|
11967
|
-
}
|
|
11968
11971
|
async function readSchemaFromFileOrDirectory(schemaPath) {
|
|
11969
11972
|
let stats;
|
|
11970
11973
|
try {
|
|
@@ -12165,7 +12168,7 @@ var init_MigrateDiff = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
12165
12168
|
import_fs_jetpack = (0, import_chunk_WWAWV7DQ.__toESM)(require_main());
|
|
12166
12169
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
|
12167
12170
|
init_getSchema();
|
|
12168
|
-
(0,
|
|
12171
|
+
(0, import_chunk_UVNSK22K.init_Migrate)();
|
|
12169
12172
|
(0, import_chunk_TKAGMA5K.init_captureStdout)();
|
|
12170
12173
|
debug3 = (0, import_debug3.default)("prisma:migrate:diff");
|
|
12171
12174
|
helpOptions = (0, import_internals.format)(
|
|
@@ -12176,6 +12179,7 @@ var init_MigrateDiff = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
12176
12179
|
${(0, import_chunk_6TE2RIPN.bold)("Options")}
|
|
12177
12180
|
|
|
12178
12181
|
-h, --help Display this help message
|
|
12182
|
+
--config Custom path to your Prisma config file
|
|
12179
12183
|
-o, --output Writes to a file instead of stdout
|
|
12180
12184
|
|
|
12181
12185
|
${(0, import_chunk_6TE2RIPN.italic)("From and To inputs (1 `--from-...` and 1 `--to-...` must be provided):")}
|
|
@@ -12209,7 +12213,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12209
12213
|
static new() {
|
|
12210
12214
|
return new _MigrateDiff2();
|
|
12211
12215
|
}
|
|
12212
|
-
async parse(argv) {
|
|
12216
|
+
async parse(argv, config) {
|
|
12213
12217
|
const args = (0, import_internals.arg)(
|
|
12214
12218
|
argv,
|
|
12215
12219
|
{
|
|
@@ -12269,14 +12273,14 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12269
12273
|
tag: "empty"
|
|
12270
12274
|
};
|
|
12271
12275
|
} else if (args["--from-schema-datasource"]) {
|
|
12272
|
-
await (0, import_internals.loadEnvFile)({ schemaPath: args["--from-schema-datasource"], printMessage: false });
|
|
12276
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--from-schema-datasource"], printMessage: false, config });
|
|
12273
12277
|
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--from-schema-datasource"]), {
|
|
12274
12278
|
argumentName: "--from-schema-datasource"
|
|
12275
12279
|
});
|
|
12276
|
-
const
|
|
12280
|
+
const engineConfig = await (0, import_internals.getConfig)({ datamodel: schema.schemas });
|
|
12277
12281
|
from = {
|
|
12278
12282
|
tag: "schemaDatasource",
|
|
12279
|
-
...(0, import_internals.toSchemasWithConfigDir)(schema,
|
|
12283
|
+
...(0, import_internals.toSchemasWithConfigDir)(schema, engineConfig)
|
|
12280
12284
|
};
|
|
12281
12285
|
} else if (args["--from-schema-datamodel"]) {
|
|
12282
12286
|
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--from-schema-datamodel"]), {
|
|
@@ -12309,14 +12313,14 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12309
12313
|
tag: "empty"
|
|
12310
12314
|
};
|
|
12311
12315
|
} else if (args["--to-schema-datasource"]) {
|
|
12312
|
-
await (0, import_internals.loadEnvFile)({ schemaPath: args["--to-schema-datasource"], printMessage: false });
|
|
12316
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--to-schema-datasource"], printMessage: false, config });
|
|
12313
12317
|
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--to-schema-datasource"]), {
|
|
12314
12318
|
argumentName: "--to-schema-datasource"
|
|
12315
12319
|
});
|
|
12316
|
-
const
|
|
12320
|
+
const engineConfig = await (0, import_internals.getConfig)({ datamodel: schema.schemas });
|
|
12317
12321
|
to = {
|
|
12318
12322
|
tag: "schemaDatasource",
|
|
12319
|
-
...(0, import_internals.toSchemasWithConfigDir)(schema,
|
|
12323
|
+
...(0, import_internals.toSchemasWithConfigDir)(schema, engineConfig)
|
|
12320
12324
|
};
|
|
12321
12325
|
} else if (args["--to-schema-datamodel"]) {
|
|
12322
12326
|
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--to-schema-datamodel"]), {
|
|
@@ -12343,7 +12347,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12343
12347
|
url: `file:${d1Database}`
|
|
12344
12348
|
};
|
|
12345
12349
|
}
|
|
12346
|
-
const migrate = new
|
|
12350
|
+
const migrate = new import_chunk_UVNSK22K.Migrate();
|
|
12347
12351
|
const captureStdout = new import_chunk_TKAGMA5K.CaptureStdout();
|
|
12348
12352
|
const outputPath = args["--output"];
|
|
12349
12353
|
const isOutputDefined = Boolean(outputPath);
|
|
@@ -26,16 +26,16 @@ 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_6MPIO773_exports = {};
|
|
30
|
+
__export(chunk_6MPIO773_exports, {
|
|
31
31
|
MigrateDiff: () => MigrateDiff,
|
|
32
32
|
init_MigrateDiff: () => init_MigrateDiff
|
|
33
33
|
});
|
|
34
|
-
module.exports = __toCommonJS(
|
|
35
|
-
var
|
|
34
|
+
module.exports = __toCommonJS(chunk_6MPIO773_exports);
|
|
35
|
+
var import_chunk_A6PMXMMT = require("./chunk-A6PMXMMT.js");
|
|
36
36
|
var import_chunk_XRTNIFND = require("./chunk-XRTNIFND.js");
|
|
37
37
|
var import_chunk_TKAGMA5K = require("./chunk-TKAGMA5K.js");
|
|
38
|
-
var
|
|
38
|
+
var import_chunk_UVNSK22K = require("./chunk-UVNSK22K.js");
|
|
39
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");
|
|
@@ -6164,6 +6164,7 @@ var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
6164
6164
|
__export2(index_exports, {
|
|
6165
6165
|
CompositeFilesResolver: () => CompositeFilesResolver,
|
|
6166
6166
|
InMemoryFilesResolver: () => InMemoryFilesResolver,
|
|
6167
|
+
ensureType: () => ensureType2,
|
|
6167
6168
|
loadRelatedSchemaFiles: () => loadRelatedSchemaFiles,
|
|
6168
6169
|
loadSchemaFiles: () => loadSchemaFiles2,
|
|
6169
6170
|
realFsResolver: () => realFsResolver,
|
|
@@ -6394,6 +6395,24 @@ var require_dist = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
6394
6395
|
}
|
|
6395
6396
|
return void 0;
|
|
6396
6397
|
}
|
|
6398
|
+
var import_promises3 = __toESM22((0, import_chunk_WWAWV7DQ.__require)("node:fs/promises"));
|
|
6399
|
+
async function ensureType2(entryPath, expectedType) {
|
|
6400
|
+
try {
|
|
6401
|
+
const pathStat = await import_promises3.default.stat(entryPath);
|
|
6402
|
+
if (expectedType === "file" && pathStat.isFile()) {
|
|
6403
|
+
return void 0;
|
|
6404
|
+
}
|
|
6405
|
+
if (expectedType === "directory" && pathStat.isDirectory()) {
|
|
6406
|
+
return void 0;
|
|
6407
|
+
}
|
|
6408
|
+
return { kind: "WrongType", path: entryPath, expectedTypes: [expectedType] };
|
|
6409
|
+
} catch (e) {
|
|
6410
|
+
if (e.code === "ENOENT") {
|
|
6411
|
+
return { kind: "NotFound", path: entryPath, expectedType };
|
|
6412
|
+
}
|
|
6413
|
+
throw e;
|
|
6414
|
+
}
|
|
6415
|
+
}
|
|
6397
6416
|
}
|
|
6398
6417
|
});
|
|
6399
6418
|
async function findUp(name, {
|
|
@@ -10706,8 +10725,8 @@ var require_typos = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
10706
10725
|
var require_fixer = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
10707
10726
|
"../../node_modules/.pnpm/normalize-package-data@6.0.0/node_modules/normalize-package-data/lib/fixer.js"(exports, module2) {
|
|
10708
10727
|
"use strict";
|
|
10709
|
-
var isValidSemver = (0,
|
|
10710
|
-
var cleanSemver = (0,
|
|
10728
|
+
var isValidSemver = (0, import_chunk_A6PMXMMT.require_valid)();
|
|
10729
|
+
var cleanSemver = (0, import_chunk_A6PMXMMT.require_clean)();
|
|
10711
10730
|
var validateLicense = require_validate_npm_package_license();
|
|
10712
10731
|
var hostedGitInfo = require_lib5();
|
|
10713
10732
|
var isBuiltinModule = require_is_core_module();
|
|
@@ -11623,12 +11642,13 @@ var require_package = (0, import_chunk_WWAWV7DQ.__commonJS)({
|
|
|
11623
11642
|
yarn: "1.22.22"
|
|
11624
11643
|
},
|
|
11625
11644
|
dependencies: {
|
|
11645
|
+
"@prisma/config": "workspace:*",
|
|
11626
11646
|
"@prisma/debug": "workspace:*",
|
|
11627
11647
|
"@prisma/engines": "workspace:*",
|
|
11628
11648
|
"@prisma/fetch-engine": "workspace:*",
|
|
11629
11649
|
"@prisma/generator-helper": "workspace:*",
|
|
11630
11650
|
"@prisma/get-platform": "workspace:*",
|
|
11631
|
-
"@prisma/prisma-schema-wasm": "6.4.0-
|
|
11651
|
+
"@prisma/prisma-schema-wasm": "6.4.0-24.b06b231b59f731b5063a26ba21c36320ce2feb4b",
|
|
11632
11652
|
"@prisma/schema-files-loader": "workspace:*",
|
|
11633
11653
|
arg: "5.0.2",
|
|
11634
11654
|
prompts: "2.4.2"
|
|
@@ -11919,7 +11939,7 @@ async function getSchemaWithPath(schemaPathFromArgs, { cwd = process.cwd(), argu
|
|
|
11919
11939
|
}
|
|
11920
11940
|
async function readSchemaFromSingleFile(schemaPath) {
|
|
11921
11941
|
debug2("Reading schema from single file", schemaPath);
|
|
11922
|
-
const typeError = await ensureType(schemaPath, "file");
|
|
11942
|
+
const typeError = await (0, import_schema_files_loader.ensureType)(schemaPath, "file");
|
|
11923
11943
|
if (typeError) {
|
|
11924
11944
|
return { ok: false, error: typeError };
|
|
11925
11945
|
}
|
|
@@ -11932,7 +11952,7 @@ async function readSchemaFromSingleFile(schemaPath) {
|
|
|
11932
11952
|
}
|
|
11933
11953
|
async function readSchemaFromDirectory(schemaPath) {
|
|
11934
11954
|
debug2("Reading schema from multiple files", schemaPath);
|
|
11935
|
-
const typeError = await ensureType(schemaPath, "directory");
|
|
11955
|
+
const typeError = await (0, import_schema_files_loader.ensureType)(schemaPath, "directory");
|
|
11936
11956
|
if (typeError) {
|
|
11937
11957
|
return { ok: false, error: typeError };
|
|
11938
11958
|
}
|
|
@@ -11948,23 +11968,6 @@ async function readSchemaFromDirectory(schemaPath) {
|
|
|
11948
11968
|
}
|
|
11949
11969
|
return { ok: true, schema: { schemaPath, schemaRootDir: schemaPath, schemas: files } };
|
|
11950
11970
|
}
|
|
11951
|
-
async function ensureType(entryPath, expectedType) {
|
|
11952
|
-
try {
|
|
11953
|
-
const pathStat = await stat(entryPath);
|
|
11954
|
-
if (expectedType === "file" && pathStat.isFile()) {
|
|
11955
|
-
return void 0;
|
|
11956
|
-
}
|
|
11957
|
-
if (expectedType === "directory" && pathStat.isDirectory()) {
|
|
11958
|
-
return void 0;
|
|
11959
|
-
}
|
|
11960
|
-
return { kind: "WrongType", path: entryPath, expectedTypes: [expectedType] };
|
|
11961
|
-
} catch (e) {
|
|
11962
|
-
if (e.code === "ENOENT") {
|
|
11963
|
-
return { kind: "NotFound", path: entryPath, expectedType };
|
|
11964
|
-
}
|
|
11965
|
-
throw e;
|
|
11966
|
-
}
|
|
11967
|
-
}
|
|
11968
11971
|
async function readSchemaFromFileOrDirectory(schemaPath) {
|
|
11969
11972
|
let stats;
|
|
11970
11973
|
try {
|
|
@@ -12165,7 +12168,7 @@ var init_MigrateDiff = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
12165
12168
|
import_fs_jetpack = (0, import_chunk_WWAWV7DQ.__toESM)(require_main());
|
|
12166
12169
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
|
12167
12170
|
init_getSchema();
|
|
12168
|
-
(0,
|
|
12171
|
+
(0, import_chunk_UVNSK22K.init_Migrate)();
|
|
12169
12172
|
(0, import_chunk_TKAGMA5K.init_captureStdout)();
|
|
12170
12173
|
debug3 = (0, import_debug3.default)("prisma:migrate:diff");
|
|
12171
12174
|
helpOptions = (0, import_internals.format)(
|
|
@@ -12176,6 +12179,7 @@ var init_MigrateDiff = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
|
12176
12179
|
${(0, import_chunk_6TE2RIPN.bold)("Options")}
|
|
12177
12180
|
|
|
12178
12181
|
-h, --help Display this help message
|
|
12182
|
+
--config Custom path to your Prisma config file
|
|
12179
12183
|
-o, --output Writes to a file instead of stdout
|
|
12180
12184
|
|
|
12181
12185
|
${(0, import_chunk_6TE2RIPN.italic)("From and To inputs (1 `--from-...` and 1 `--to-...` must be provided):")}
|
|
@@ -12209,7 +12213,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12209
12213
|
static new() {
|
|
12210
12214
|
return new _MigrateDiff2();
|
|
12211
12215
|
}
|
|
12212
|
-
async parse(argv) {
|
|
12216
|
+
async parse(argv, config) {
|
|
12213
12217
|
const args = (0, import_internals.arg)(
|
|
12214
12218
|
argv,
|
|
12215
12219
|
{
|
|
@@ -12269,14 +12273,14 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12269
12273
|
tag: "empty"
|
|
12270
12274
|
};
|
|
12271
12275
|
} else if (args["--from-schema-datasource"]) {
|
|
12272
|
-
await (0, import_internals.loadEnvFile)({ schemaPath: args["--from-schema-datasource"], printMessage: false });
|
|
12276
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--from-schema-datasource"], printMessage: false, config });
|
|
12273
12277
|
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--from-schema-datasource"]), {
|
|
12274
12278
|
argumentName: "--from-schema-datasource"
|
|
12275
12279
|
});
|
|
12276
|
-
const
|
|
12280
|
+
const engineConfig = await (0, import_internals.getConfig)({ datamodel: schema.schemas });
|
|
12277
12281
|
from = {
|
|
12278
12282
|
tag: "schemaDatasource",
|
|
12279
|
-
...(0, import_internals.toSchemasWithConfigDir)(schema,
|
|
12283
|
+
...(0, import_internals.toSchemasWithConfigDir)(schema, engineConfig)
|
|
12280
12284
|
};
|
|
12281
12285
|
} else if (args["--from-schema-datamodel"]) {
|
|
12282
12286
|
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--from-schema-datamodel"]), {
|
|
@@ -12309,14 +12313,14 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12309
12313
|
tag: "empty"
|
|
12310
12314
|
};
|
|
12311
12315
|
} else if (args["--to-schema-datasource"]) {
|
|
12312
|
-
await (0, import_internals.loadEnvFile)({ schemaPath: args["--to-schema-datasource"], printMessage: false });
|
|
12316
|
+
await (0, import_internals.loadEnvFile)({ schemaPath: args["--to-schema-datasource"], printMessage: false, config });
|
|
12313
12317
|
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--to-schema-datasource"]), {
|
|
12314
12318
|
argumentName: "--to-schema-datasource"
|
|
12315
12319
|
});
|
|
12316
|
-
const
|
|
12320
|
+
const engineConfig = await (0, import_internals.getConfig)({ datamodel: schema.schemas });
|
|
12317
12321
|
to = {
|
|
12318
12322
|
tag: "schemaDatasource",
|
|
12319
|
-
...(0, import_internals.toSchemasWithConfigDir)(schema,
|
|
12323
|
+
...(0, import_internals.toSchemasWithConfigDir)(schema, engineConfig)
|
|
12320
12324
|
};
|
|
12321
12325
|
} else if (args["--to-schema-datamodel"]) {
|
|
12322
12326
|
const schema = await getSchemaWithPath(import_path2.default.resolve(args["--to-schema-datamodel"]), {
|
|
@@ -12343,7 +12347,7 @@ ${(0, import_chunk_6TE2RIPN.bold)("Flags")}
|
|
|
12343
12347
|
url: `file:${d1Database}`
|
|
12344
12348
|
};
|
|
12345
12349
|
}
|
|
12346
|
-
const migrate = new
|
|
12350
|
+
const migrate = new import_chunk_UVNSK22K.Migrate();
|
|
12347
12351
|
const captureStdout = new import_chunk_TKAGMA5K.CaptureStdout();
|
|
12348
12352
|
const outputPath = args["--output"];
|
|
12349
12353
|
const isOutputDefined = Boolean(outputPath);
|
|
@@ -16,14 +16,14 @@ 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_75EIHNAH_exports = {};
|
|
20
|
+
__export(chunk_75EIHNAH_exports, {
|
|
21
21
|
introspectSql: () => introspectSql
|
|
22
22
|
});
|
|
23
|
-
module.exports = __toCommonJS(
|
|
24
|
-
var
|
|
23
|
+
module.exports = __toCommonJS(chunk_75EIHNAH_exports);
|
|
24
|
+
var import_chunk_7S3Q4MCN = require("./chunk-7S3Q4MCN.js");
|
|
25
25
|
var import_internals = require("@prisma/internals");
|
|
26
|
-
(0,
|
|
26
|
+
(0, import_chunk_7S3Q4MCN.init_SchemaEngine)();
|
|
27
27
|
var supportedProviders = ["postgresql", "cockroachdb", "mysql", "sqlite"];
|
|
28
28
|
async function introspectSql(schemaPath, queries) {
|
|
29
29
|
const schema = await (0, import_internals.getSchemaWithPath)(schemaPath);
|
|
@@ -42,7 +42,7 @@ async function introspectSql(schemaPath, queries) {
|
|
|
42
42
|
if (!url) {
|
|
43
43
|
throw new Error(`Could not get url from datasource ${firstDatasource.name} in ${schema.schemaPath}`);
|
|
44
44
|
}
|
|
45
|
-
const schemaEngine = new
|
|
45
|
+
const schemaEngine = new import_chunk_7S3Q4MCN.SchemaEngine({ schemaPath: schema.schemaPath });
|
|
46
46
|
const results = [];
|
|
47
47
|
const errors = [];
|
|
48
48
|
try {
|