@prisma/migrate 6.3.0-integration-simpler-typeinfo-query.1 → 6.3.0-integration-studio-ux-refinements.1
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/Migrate.js +5 -5
- package/dist/SchemaEngine.js +5 -5
- package/dist/bin.js +41 -42
- package/dist/{chunk-LLGEQ76N.js → chunk-33HVTIBE.js} +15 -15
- package/dist/{chunk-BAVMZZAR.js → chunk-4BFDHH3U.js} +12 -12
- package/dist/{chunk-XLLUFIQK.js → chunk-7MUF3HLX.js} +9 -8
- package/dist/{chunk-SV5GANSI.js → chunk-7TICHBC5.js} +10 -10
- package/dist/{chunk-GJN3CSXW.js → chunk-AOCCG7RR.js} +6 -6
- package/dist/{chunk-ZLGLVUFD.js → chunk-E2XKFV2C.js} +8 -8
- package/dist/{chunk-LVFPGUOH.js → chunk-E3UZYEGF.js} +92 -87
- package/dist/{chunk-BAFPAACN.js → chunk-ILJRJJ3S.js} +4 -4
- package/dist/{chunk-E3KHFUFQ.js → chunk-J77IRNPE.js} +9 -124
- package/dist/{chunk-RYWEOVLN.js → chunk-KHICE54Q.js} +6 -6
- package/dist/{chunk-5VYRCIVT.js → chunk-MQQLTARC.js} +100 -182
- package/dist/{chunk-MWEO3VUS.js → chunk-NCDRH4BH.js} +7 -7
- package/dist/{chunk-VWV2NY26.js → chunk-NKQGJ3AE.js} +7 -3
- package/dist/{chunk-XVL5RF2T.js → chunk-OANG4W7W.js} +15 -15
- package/dist/{chunk-55NRLWME.js → chunk-PSSOKBLN.js} +1029 -339
- package/dist/{chunk-EXUBPCXZ.js → chunk-TFIFMCN4.js} +18 -18
- package/dist/{chunk-76XWADEV.js → chunk-TJZ4FW7K.js} +10 -10
- package/dist/{chunk-ZBOJAYON.js → chunk-UI76O6B2.js} +6 -6
- package/dist/{chunk-KEBB7UIB.js → chunk-UQQQ6HXZ.js} +5 -3
- package/dist/{chunk-W3ROQKBN.js → chunk-V7DE6JTG.js} +4 -4
- package/dist/{chunk-UJWMQPUH.js → chunk-XQEPG5ZX.js} +10 -10
- package/dist/{chunk-YOW3VBYS.js → chunk-XQJTDY7A.js} +6 -6
- package/dist/{chunk-WIZM7TFT.js → chunk-YKUZUAXA.js} +443 -55
- package/dist/commands/DbDrop.js +3 -3
- package/dist/commands/DbExecute.js +6 -6
- package/dist/commands/DbPull.js +8 -8
- package/dist/commands/DbPush.js +7 -7
- package/dist/commands/DbSeed.js +4 -5
- package/dist/commands/MigrateDeploy.js +7 -7
- package/dist/commands/MigrateDev.js +8 -9
- package/dist/commands/MigrateDiff.js +7 -8
- package/dist/commands/MigrateReset.js +8 -9
- package/dist/commands/MigrateResolve.js +7 -7
- package/dist/commands/MigrateStatus.js +7 -7
- package/dist/index.js +52 -53
- package/dist/internals/src/cli/getTypescriptVersion.d.ts +1 -0
- package/dist/internals/src/index.d.ts +1 -0
- package/dist/internals/src/tracing/types.d.ts +26 -16
- package/dist/internals/src/utils/isCurrentBinInstalledGlobally.d.ts +1 -1
- package/dist/migrate/src/utils/ensureDatabaseExists.d.ts +1 -1
- package/dist/migrate/src/utils/printDatasources.d.ts +2 -1
- package/dist/{multipart-parser-KKECAI5D.js → multipart-parser-73VM3J4A.js} +10 -7
- package/dist/{multipart-parser-47FFAP42-P3F6TPHJ.js → multipart-parser-ITART6UP-FFJAMHWE.js} +25 -22
- package/dist/typescript-AILDXN3I.js +205230 -0
- package/dist/typescript-WN4QH2CP.js +205192 -0
- package/dist/utils/ensureDatabaseExists.js +7 -7
- package/dist/utils/getDatabaseVersionSafe.js +5 -5
- package/dist/utils/introspectSql.js +4 -4
- package/dist/utils/removeSchemaFiles.js +3 -3
- package/dist/utils/saveSchemaFiles.js +3 -3
- package/dist/utils/seed.js +6 -7
- package/dist/utils/setupMSSQL.js +62 -59
- package/dist/utils/setupMongo.js +17608 -14119
- package/dist/utils/setupMysql.js +45 -0
- package/dist/views/handleViewsIO.js +3 -3
- package/package.json +14 -15
- package/dist/chunk-EFPE3Q7J.js +0 -424
- package/dist/internals/src/get-generators/generatorResolvers/prisma-client-js/check-dependencies/checkYarnVersion.d.ts +0 -9
@@ -26,25 +26,25 @@ 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_TFIFMCN4_exports = {};
|
30
|
+
__export(chunk_TFIFMCN4_exports, {
|
31
31
|
DbPull: () => DbPull,
|
32
32
|
init_DbPull: () => init_DbPull
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_TFIFMCN4_exports);
|
35
35
|
var import_chunk_GRGGAY6L = require("./chunk-GRGGAY6L.js");
|
36
|
-
var
|
36
|
+
var import_chunk_ILJRJJ3S = require("./chunk-ILJRJJ3S.js");
|
37
37
|
var import_chunk_35LAJN5S = require("./chunk-35LAJN5S.js");
|
38
38
|
var import_chunk_7IT2ZO3D = require("./chunk-7IT2ZO3D.js");
|
39
|
-
var
|
39
|
+
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_7MUF3HLX = require("./chunk-7MUF3HLX.js");
|
44
|
+
var import_chunk_E3UZYEGF = require("./chunk-E3UZYEGF.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_UQQQ6HXZ = require("./chunk-UQQQ6HXZ.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,18 +54,18 @@ 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_E3UZYEGF.init_dist)();
|
58
|
+
(0, import_chunk_7MUF3HLX.init_SchemaEngine)();
|
59
59
|
(0, import_chunk_GN5BY5N2.init_countModelsAndTypes)();
|
60
|
-
(0,
|
60
|
+
(0, import_chunk_UQQQ6HXZ.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)();
|
64
64
|
(0, import_chunk_35LAJN5S.init_printDatasources)();
|
65
65
|
(0, import_chunk_7IT2ZO3D.init_printIntrospectedSchema)();
|
66
|
-
(0,
|
66
|
+
(0, import_chunk_V7DE6JTG.init_removeSchemaFiles)();
|
67
67
|
(0, import_chunk_QBK5XTJE.init_replaceOrAddDatasource)();
|
68
|
-
(0,
|
68
|
+
(0, import_chunk_ILJRJJ3S.init_saveSchemaFiles)();
|
69
69
|
(0, import_chunk_GRGGAY6L.init_spinner)();
|
70
70
|
debug = (0, import_debug.default)("prisma:db:pull");
|
71
71
|
_DbPull = class _DbPull2 {
|
@@ -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_UQQQ6HXZ.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_E3UZYEGF.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_7MUF3HLX.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))}` : "";
|
@@ -302,9 +302,9 @@ Or run this command with the ${(0, import_chunk_6TE2RIPN.green)(
|
|
302
302
|
} else {
|
303
303
|
schemaPath = schemaPath || "schema.prisma";
|
304
304
|
if (args["--force"]) {
|
305
|
-
await (0,
|
305
|
+
await (0, import_chunk_V7DE6JTG.removeSchemaFiles)(schema);
|
306
306
|
}
|
307
|
-
await (0,
|
307
|
+
await (0, import_chunk_ILJRJJ3S.saveSchemaFiles)(introspectionSchema);
|
308
308
|
const { modelsCount, typesCount } = (0, import_chunk_GN5BY5N2.countModelsAndTypes)(introspectionSchema);
|
309
309
|
const modelsCountMessage = `${modelsCount} ${modelsCount > 1 ? "models" : "model"}`;
|
310
310
|
const typesCountMessage = `${typesCount} ${typesCount > 1 ? "embedded documents" : "embedded document"}`;
|
@@ -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_TJZ4FW7K_exports = {};
|
30
|
+
__export(chunk_TJZ4FW7K_exports, {
|
31
31
|
DbPush: () => DbPush,
|
32
32
|
init_DbPush: () => init_DbPush
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
35
|
-
var
|
34
|
+
module.exports = __toCommonJS(chunk_TJZ4FW7K_exports);
|
35
|
+
var import_chunk_NCDRH4BH = require("./chunk-NCDRH4BH.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_UQQQ6HXZ = require("./chunk-UQQQ6HXZ.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_NCDRH4BH.init_Migrate)();
|
49
|
+
(0, import_chunk_UQQQ6HXZ.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_UQQQ6HXZ.getDatasourceInfo)({ schemaPath });
|
81
81
|
(0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo });
|
82
|
-
const migrate = new
|
82
|
+
const migrate = new import_chunk_NCDRH4BH.Migrate(schemaPath);
|
83
83
|
try {
|
84
|
-
const wasDbCreated = await (0,
|
84
|
+
const wasDbCreated = await (0, import_chunk_UQQQ6HXZ.ensureDatabaseExists)("push", schemaPath);
|
85
85
|
if (wasDbCreated) {
|
86
86
|
process.stdout.write("\n" + wasDbCreated + "\n");
|
87
87
|
}
|
@@ -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_UI76O6B2_exports = {};
|
30
|
+
__export(chunk_UI76O6B2_exports, {
|
31
31
|
DbExecute: () => DbExecute,
|
32
32
|
init_DbExecute: () => init_DbExecute
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
35
|
-
var
|
34
|
+
module.exports = __toCommonJS(chunk_UI76O6B2_exports);
|
35
|
+
var import_chunk_NCDRH4BH = require("./chunk-NCDRH4BH.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_NCDRH4BH.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_NCDRH4BH.Migrate();
|
175
175
|
try {
|
176
176
|
await migrate.engine.dbExecute({
|
177
177
|
script,
|
@@ -16,8 +16,8 @@ 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_UQQQ6HXZ_exports = {};
|
20
|
+
__export(chunk_UQQQ6HXZ_exports, {
|
21
21
|
ensureCanConnectToDatabase: () => ensureCanConnectToDatabase,
|
22
22
|
ensureDatabaseExists: () => ensureDatabaseExists,
|
23
23
|
getDatasourceInfo: () => getDatasourceInfo,
|
@@ -25,7 +25,7 @@ __export(chunk_KEBB7UIB_exports, {
|
|
25
25
|
init_ensureDatabaseExists: () => init_ensureDatabaseExists,
|
26
26
|
prettifyProvider: () => prettifyProvider
|
27
27
|
});
|
28
|
-
module.exports = __toCommonJS(
|
28
|
+
module.exports = __toCommonJS(chunk_UQQQ6HXZ_exports);
|
29
29
|
var import_chunk_KPUNMK5W = require("./chunk-KPUNMK5W.js");
|
30
30
|
var import_chunk_6TE2RIPN = require("./chunk-6TE2RIPN.js");
|
31
31
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
@@ -183,6 +183,8 @@ function prettifyProvider(provider) {
|
|
183
183
|
case "postgres":
|
184
184
|
case "postgresql":
|
185
185
|
return `PostgreSQL`;
|
186
|
+
case "prisma+postgres":
|
187
|
+
return `Prisma Postgres`;
|
186
188
|
case "sqlite":
|
187
189
|
return `SQLite`;
|
188
190
|
case "cockroachdb":
|
@@ -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_V7DE6JTG_exports = {};
|
30
|
+
__export(chunk_V7DE6JTG_exports, {
|
31
31
|
init_removeSchemaFiles: () => init_removeSchemaFiles,
|
32
32
|
removeSchemaFiles: () => removeSchemaFiles
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_V7DE6JTG_exports);
|
35
35
|
var import_chunk_WWAWV7DQ = require("./chunk-WWAWV7DQ.js");
|
36
|
-
var import_promises = __toESM(require("fs/promises"));
|
36
|
+
var import_promises = __toESM(require("node:fs/promises"));
|
37
37
|
async function removeSchemaFiles(files) {
|
38
38
|
await Promise.all(files.map(([path]) => import_promises.default.rm(path)));
|
39
39
|
}
|
@@ -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_XQEPG5ZX_exports = {};
|
30
|
+
__export(chunk_XQEPG5ZX_exports, {
|
31
31
|
MigrateDeploy: () => MigrateDeploy,
|
32
32
|
init_MigrateDeploy: () => init_MigrateDeploy
|
33
33
|
});
|
34
|
-
module.exports = __toCommonJS(
|
34
|
+
module.exports = __toCommonJS(chunk_XQEPG5ZX_exports);
|
35
35
|
var import_chunk_WOOPRG54 = require("./chunk-WOOPRG54.js");
|
36
|
-
var
|
36
|
+
var import_chunk_NCDRH4BH = require("./chunk-NCDRH4BH.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_UQQQ6HXZ = require("./chunk-UQQQ6HXZ.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_debug = __toESM(require("@prisma/debug"));
|
@@ -45,8 +45,8 @@ var debug, _MigrateDeploy, MigrateDeploy;
|
|
45
45
|
var init_MigrateDeploy = (0, import_chunk_WWAWV7DQ.__esm)({
|
46
46
|
"src/commands/MigrateDeploy.ts"() {
|
47
47
|
(0, import_chunk_6TE2RIPN.init_colors)();
|
48
|
-
(0,
|
49
|
-
(0,
|
48
|
+
(0, import_chunk_NCDRH4BH.init_Migrate)();
|
49
|
+
(0, import_chunk_UQQQ6HXZ.init_ensureDatabaseExists)();
|
50
50
|
(0, import_chunk_EYA6AFSF.init_getSchemaPathAndPrint)();
|
51
51
|
(0, import_chunk_Q7ACZDDT.init_printDatasource)();
|
52
52
|
(0, import_chunk_WOOPRG54.init_printFiles)();
|
@@ -75,10 +75,10 @@ var init_MigrateDeploy = (0, import_chunk_WWAWV7DQ.__esm)({
|
|
75
75
|
}
|
76
76
|
await (0, import_internals.loadEnvFile)({ schemaPath: args["--schema"], printMessage: true });
|
77
77
|
const { schemaPath } = await (0, import_chunk_EYA6AFSF.getSchemaPathAndPrint)(args["--schema"]);
|
78
|
-
(0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0,
|
79
|
-
const migrate = new
|
78
|
+
(0, import_chunk_Q7ACZDDT.printDatasource)({ datasourceInfo: await (0, import_chunk_UQQQ6HXZ.getDatasourceInfo)({ schemaPath }) });
|
79
|
+
const migrate = new import_chunk_NCDRH4BH.Migrate(schemaPath);
|
80
80
|
try {
|
81
|
-
const wasDbCreated = await (0,
|
81
|
+
const wasDbCreated = await (0, import_chunk_UQQQ6HXZ.ensureDatabaseExists)("apply", schemaPath);
|
82
82
|
if (wasDbCreated) {
|
83
83
|
process.stdout.write("\n" + wasDbCreated + "\n");
|
84
84
|
}
|
@@ -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_XQJTDY7A_exports = {};
|
20
|
+
__export(chunk_XQJTDY7A_exports, {
|
21
21
|
introspectSql: () => introspectSql
|
22
22
|
});
|
23
|
-
module.exports = __toCommonJS(
|
24
|
-
var
|
23
|
+
module.exports = __toCommonJS(chunk_XQJTDY7A_exports);
|
24
|
+
var import_chunk_7MUF3HLX = require("./chunk-7MUF3HLX.js");
|
25
25
|
var import_internals = require("@prisma/internals");
|
26
|
-
(0,
|
26
|
+
(0, import_chunk_7MUF3HLX.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_7MUF3HLX.SchemaEngine({ schemaPath: schema.schemaPath });
|
46
46
|
const results = [];
|
47
47
|
const errors = [];
|
48
48
|
try {
|