@prisma/migrate 6.6.0-dev.4 → 6.6.0-dev.41
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 +8 -6
- package/dist/SchemaEngine.js +5 -5
- package/dist/bin.js +48 -47
- package/dist/chunk-23DZXSTI.js +62 -0
- package/dist/{chunk-WWAWV7DQ.js → chunk-2ESYSVXG.js} +3 -27
- package/dist/{chunk-LKTTJWFT.js → chunk-2R6DII47.js} +5 -5
- package/dist/chunk-33LPBNDX.js +1399 -0
- package/dist/{chunk-GG54LOYV.js → chunk-3PIR4R46.js} +45 -44
- package/dist/{chunk-2JZLJQDC.js → chunk-4EPP5QEP.js} +346 -368
- package/dist/{chunk-V3ZMNXZC.js → chunk-5LKIRKDL.js} +307 -382
- package/dist/{chunk-IR55GBON.js → chunk-5LTDMS3H.js} +18 -18
- package/dist/{chunk-LOGAFLCN.js → chunk-5R44VVVX.js} +29 -29
- package/dist/{chunk-DJMFXNR4.js → chunk-74LUB4XX.js} +56 -57
- package/dist/{chunk-RP2N6UXA.js → chunk-AI6DH66U.js} +6 -6
- package/dist/{chunk-G2XUUMKH.js → chunk-B4SUSDC2.js} +31 -39
- package/dist/{chunk-Q3ZLC44N.js → chunk-CKRN45WP.js} +57 -66
- package/dist/{chunk-ZOEKRXDP.js → chunk-D2DGSPW6.js} +29 -55
- package/dist/{chunk-W2SZNLK4.js → chunk-EJG7GKM7.js} +37 -39
- package/dist/{chunk-5PSO7BDO.js → chunk-EJUXYFV3.js} +15 -15
- package/dist/{chunk-N3KYWSX2.js → chunk-GAKKKF5T.js} +55 -49
- package/dist/{chunk-N4XTKFY6.js → chunk-GKHRL6AR.js} +39 -38
- package/dist/{chunk-CQZFVAXC.js → chunk-HHVLUI3H.js} +42 -41
- package/dist/{chunk-MCWCB2AX.js → chunk-IINN7QUV.js} +170 -643
- package/dist/{chunk-HCBZB4XC.js → chunk-KN2W5IP7.js} +53 -52
- package/dist/{chunk-255BRND3.js → chunk-KRQEFTDT.js} +6 -6
- package/dist/{chunk-VVKOFN3Y.js → chunk-LLO7YF56.js} +44 -46
- package/dist/{chunk-VZ23KD5C.js → chunk-NGQA5JTN.js} +8 -10
- package/dist/{chunk-MKK3GSDF.js → chunk-NIKXBMZL.js} +5 -5
- package/dist/{chunk-KS7IEA6Z.js → chunk-O723A5JE.js} +50 -52
- package/dist/{chunk-MATFO4ZW.js → chunk-OEWQACEH.js} +38 -39
- package/dist/chunk-PDCXVUV3.js +883 -0
- package/dist/{chunk-WI2A2TQE.js → chunk-QJT4H5N6.js} +91 -92
- package/dist/{chunk-V5TUSOJX.js → chunk-SQKGZVG3.js} +45 -45
- package/dist/{chunk-EGPJABTW.js → chunk-TGV6QGEF.js} +69 -69
- package/dist/{chunk-ZYKVWZ6H.js → chunk-U7NSKPM6.js} +347 -369
- package/dist/chunk-URKH6SE2.js +479 -0
- package/dist/chunk-V6PVGSDJ.js +76 -0
- package/dist/{chunk-DLLXDCI2.js → chunk-VAJ4VX67.js} +5 -6
- package/dist/{chunk-OCQGHQED.js → chunk-YBX7R3MT.js} +12 -12
- package/dist/{chunk-A6PMXMMT.js → chunk-ZB5NPOJW.js} +13 -13
- package/dist/commands/DbCommand.js +3 -3
- package/dist/commands/DbDrop.js +4 -5
- package/dist/commands/DbExecute.js +9 -7
- package/dist/commands/DbPull.js +12 -11
- package/dist/commands/DbPush.js +10 -9
- package/dist/commands/DbSeed.js +4 -5
- package/dist/commands/MigrateCommand.js +3 -3
- package/dist/commands/MigrateDeploy.js +12 -11
- package/dist/commands/MigrateDev.js +14 -13
- package/dist/commands/MigrateDiff.js +12 -10
- package/dist/commands/MigrateReset.js +13 -12
- package/dist/commands/MigrateResolve.js +10 -9
- package/dist/commands/MigrateStatus.js +10 -9
- package/dist/index.js +52 -50
- package/dist/internals/src/cli/checkUnsupportedDataProxy.d.ts +12 -17
- package/dist/internals/src/cli/directoryConfig.d.ts +7 -0
- package/dist/internals/src/cli/schemaContext.d.ts +58 -0
- package/dist/internals/src/engine-commands/getConfig.d.ts +0 -4
- package/dist/internals/src/engine-commands/getDmmf.d.ts +1 -5
- package/dist/internals/src/engine-commands/lintSchema.d.ts +1 -1
- package/dist/internals/src/errorReporting.d.ts +0 -1
- package/dist/internals/src/get-generators/getGenerators.d.ts +7 -3
- package/dist/internals/src/index.d.ts +3 -1
- package/dist/internals/src/migrateTypes.d.ts +63 -0
- package/dist/internals/src/panic.d.ts +1 -4
- package/dist/internals/src/utils/extractPreviewFeatures.d.ts +2 -2
- package/dist/internals/src/utils/schemaFileInput.d.ts +0 -4
- package/dist/internals/src/utils/toSchemasContainer.d.ts +2 -3
- package/dist/migrate/src/Migrate.d.ts +7 -5
- package/dist/migrate/src/SchemaEngine.d.ts +5 -9
- package/dist/migrate/src/types.d.ts +14 -10
- package/dist/migrate/src/utils/createMigration.d.ts +21 -0
- package/dist/migrate/src/utils/ensureDatabaseExists.d.ts +4 -6
- package/dist/migrate/src/utils/introspectSql.d.ts +2 -1
- package/dist/migrate/src/utils/listMigrations.d.ts +9 -0
- package/dist/migrate/src/utils/seed.d.ts +0 -2
- package/dist/migrate/src/views/handleViewsIO.d.ts +2 -2
- package/dist/{multipart-parser-54WEFGGN-NLZG56KM.js → multipart-parser-ASKQAOL4-WZ47HU6G.js} +92 -125
- package/dist/{multipart-parser-NDLECNMN.js → multipart-parser-QCI3Y5IB.js} +66 -68
- package/dist/types.js +1 -1
- package/dist/{typescript-WN4QH2CP.js → typescript-2LKASCMC.js} +33 -33
- package/dist/{typescript-AILDXN3I.js → typescript-H3AVJ6KX.js} +32 -32
- package/dist/utils/byline.js +1 -1
- package/dist/utils/captureStdout.js +3 -3
- package/dist/utils/countModelsAndTypes.js +1 -1
- package/dist/utils/createMigration.js +27 -0
- package/dist/utils/customColors.js +1 -1
- package/dist/utils/ensureDatabaseExists.js +7 -7
- package/dist/utils/errors.js +1 -1
- package/dist/utils/flagErrors.js +1 -1
- package/dist/utils/getDatabaseVersionSafe.js +5 -5
- package/dist/utils/getSchemaPathAndPrint.js +1 -1
- package/dist/utils/handleEvaluateDataloss.js +1 -1
- package/dist/utils/introspectSql.js +5 -5
- package/dist/utils/isSchemaEmpty.js +1 -1
- package/dist/utils/listMigrations.js +25 -0
- package/dist/utils/now.js +1 -1
- package/dist/utils/printDatasource.js +1 -1
- package/dist/utils/printDatasources.js +5 -5
- package/dist/utils/printFiles.js +5 -5
- package/dist/utils/printIntrospectedSchema.js +1 -1
- package/dist/utils/printMigrationId.js +1 -1
- package/dist/utils/promptForMigrationName.js +3 -3
- package/dist/utils/removeSchemaFiles.js +1 -1
- package/dist/utils/replaceOrAddDatasource.js +1 -1
- package/dist/utils/replaceOrAddDatasource.test.js +1 -1
- package/dist/utils/saveSchemaFiles.js +1 -1
- package/dist/utils/seed.js +4 -7
- package/dist/utils/setupCockroach.js +3 -3
- package/dist/utils/setupMSSQL.js +759 -675
- package/dist/utils/setupMongo.js +552 -552
- package/dist/utils/setupMysql.js +508 -563
- package/dist/utils/setupPostgres.js +3 -3
- package/dist/utils/spinner.js +4 -3
- package/dist/utils/test-handlePanic.js +1 -30
- package/dist/utils/unixSocket.js +1 -1
- package/dist/views/handleViewsIO.js +3 -3
- package/package.json +9 -9
- package/dist/chunk-J46BJQHT.js +0 -268
- package/dist/chunk-KOF4LGTS.js +0 -1817
- package/dist/chunk-YYPMC5FN.js +0 -1407
- package/dist/internals/src/get-generators/utils/check-feature-flags/checkFeatureFlags.d.ts +0 -8
package/dist/index.js
CHANGED
|
@@ -18,72 +18,74 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var index_exports = {};
|
|
20
20
|
__export(index_exports, {
|
|
21
|
-
DbCommand: () =>
|
|
22
|
-
DbDrop: () =>
|
|
23
|
-
DbExecute: () =>
|
|
24
|
-
DbPull: () =>
|
|
25
|
-
DbPush: () =>
|
|
26
|
-
DbSeed: () =>
|
|
21
|
+
DbCommand: () => import_chunk_EJG7GKM7.DbCommand,
|
|
22
|
+
DbDrop: () => import_chunk_SQKGZVG3.DbDrop,
|
|
23
|
+
DbExecute: () => import_chunk_GAKKKF5T.DbExecute,
|
|
24
|
+
DbPull: () => import_chunk_QJT4H5N6.DbPull,
|
|
25
|
+
DbPush: () => import_chunk_3PIR4R46.DbPush,
|
|
26
|
+
DbSeed: () => import_chunk_B4SUSDC2.DbSeed,
|
|
27
27
|
EngineResults: () => import_chunk_LVR7W5DD.EngineResults,
|
|
28
|
-
Migrate: () =>
|
|
29
|
-
MigrateCommand: () =>
|
|
30
|
-
MigrateDeploy: () =>
|
|
31
|
-
MigrateDev: () =>
|
|
32
|
-
MigrateDiff: () =>
|
|
33
|
-
MigrateReset: () =>
|
|
34
|
-
MigrateResolve: () =>
|
|
35
|
-
MigrateStatus: () =>
|
|
36
|
-
SchemaEngine: () =>
|
|
28
|
+
Migrate: () => import_chunk_PDCXVUV3.Migrate,
|
|
29
|
+
MigrateCommand: () => import_chunk_LLO7YF56.MigrateCommand,
|
|
30
|
+
MigrateDeploy: () => import_chunk_HHVLUI3H.MigrateDeploy,
|
|
31
|
+
MigrateDev: () => import_chunk_CKRN45WP.MigrateDev,
|
|
32
|
+
MigrateDiff: () => import_chunk_U7NSKPM6.MigrateDiff,
|
|
33
|
+
MigrateReset: () => import_chunk_O723A5JE.MigrateReset,
|
|
34
|
+
MigrateResolve: () => import_chunk_KN2W5IP7.MigrateResolve,
|
|
35
|
+
MigrateStatus: () => import_chunk_GKHRL6AR.MigrateStatus,
|
|
36
|
+
SchemaEngine: () => import_chunk_D2DGSPW6.SchemaEngine,
|
|
37
37
|
byline: () => import_chunk_L6KOIJJ5.byline,
|
|
38
|
-
getDatabaseVersionSafe: () =>
|
|
38
|
+
getDatabaseVersionSafe: () => import_chunk_NIKXBMZL.getDatabaseVersionSafe,
|
|
39
39
|
getSchemaPathAndPrint: () => import_chunk_GKDFIHM2.getSchemaPathAndPrint,
|
|
40
|
-
introspectSql: () =>
|
|
40
|
+
introspectSql: () => import_chunk_5LTDMS3H.introspectSql,
|
|
41
41
|
printSchemaLoadedMessage: () => import_chunk_GKDFIHM2.printSchemaLoadedMessage
|
|
42
42
|
});
|
|
43
43
|
module.exports = __toCommonJS(index_exports);
|
|
44
|
-
var
|
|
45
|
-
var
|
|
46
|
-
var
|
|
47
|
-
var
|
|
48
|
-
var
|
|
49
|
-
var
|
|
50
|
-
var
|
|
51
|
-
var
|
|
52
|
-
var
|
|
53
|
-
var import_chunk_RP2N6UXA = require("./chunk-RP2N6UXA.js");
|
|
54
|
-
var import_chunk_AHJ2N6BJ = require("./chunk-AHJ2N6BJ.js");
|
|
44
|
+
var import_chunk_GKDFIHM2 = require("./chunk-GKDFIHM2.js");
|
|
45
|
+
var import_chunk_5LTDMS3H = require("./chunk-5LTDMS3H.js");
|
|
46
|
+
var import_chunk_NIKXBMZL = require("./chunk-NIKXBMZL.js");
|
|
47
|
+
var import_chunk_O723A5JE = require("./chunk-O723A5JE.js");
|
|
48
|
+
var import_chunk_KN2W5IP7 = require("./chunk-KN2W5IP7.js");
|
|
49
|
+
var import_chunk_GKHRL6AR = require("./chunk-GKHRL6AR.js");
|
|
50
|
+
var import_chunk_GAKKKF5T = require("./chunk-GAKKKF5T.js");
|
|
51
|
+
var import_chunk_QJT4H5N6 = require("./chunk-QJT4H5N6.js");
|
|
52
|
+
var import_chunk_IINN7QUV = require("./chunk-IINN7QUV.js");
|
|
55
53
|
var import_chunk_JZ75RIMZ = require("./chunk-JZ75RIMZ.js");
|
|
56
54
|
var import_chunk_RR6BKMNO = require("./chunk-RR6BKMNO.js");
|
|
55
|
+
var import_chunk_RTGQXNX6 = require("./chunk-RTGQXNX6.js");
|
|
56
|
+
var import_chunk_AI6DH66U = require("./chunk-AI6DH66U.js");
|
|
57
|
+
var import_chunk_AHJ2N6BJ = require("./chunk-AHJ2N6BJ.js");
|
|
57
58
|
var import_chunk_JFKDSUIE = require("./chunk-JFKDSUIE.js");
|
|
58
59
|
var import_chunk_LGYRZ6CV = require("./chunk-LGYRZ6CV.js");
|
|
59
|
-
var
|
|
60
|
-
var
|
|
61
|
-
var
|
|
62
|
-
var
|
|
63
|
-
var
|
|
64
|
-
var
|
|
60
|
+
var import_chunk_3PIR4R46 = require("./chunk-3PIR4R46.js");
|
|
61
|
+
var import_chunk_B4SUSDC2 = require("./chunk-B4SUSDC2.js");
|
|
62
|
+
var import_chunk_LLO7YF56 = require("./chunk-LLO7YF56.js");
|
|
63
|
+
var import_chunk_HHVLUI3H = require("./chunk-HHVLUI3H.js");
|
|
64
|
+
var import_chunk_CKRN45WP = require("./chunk-CKRN45WP.js");
|
|
65
|
+
var import_chunk_YBX7R3MT = require("./chunk-YBX7R3MT.js");
|
|
65
66
|
var import_chunk_7CQBDP4H = require("./chunk-7CQBDP4H.js");
|
|
66
|
-
var
|
|
67
|
-
var
|
|
67
|
+
var import_chunk_5LKIRKDL = require("./chunk-5LKIRKDL.js");
|
|
68
|
+
var import_chunk_KRQEFTDT = require("./chunk-KRQEFTDT.js");
|
|
68
69
|
var import_chunk_UP6FVCDK = require("./chunk-UP6FVCDK.js");
|
|
69
|
-
var
|
|
70
|
-
var
|
|
71
|
-
var
|
|
72
|
-
var
|
|
73
|
-
var
|
|
74
|
-
var
|
|
75
|
-
var
|
|
76
|
-
var
|
|
77
|
-
var
|
|
70
|
+
var import_chunk_2R6DII47 = require("./chunk-2R6DII47.js");
|
|
71
|
+
var import_chunk_U7NSKPM6 = require("./chunk-U7NSKPM6.js");
|
|
72
|
+
var import_chunk_33LPBNDX = require("./chunk-33LPBNDX.js");
|
|
73
|
+
var import_chunk_ZB5NPOJW = require("./chunk-ZB5NPOJW.js");
|
|
74
|
+
var import_chunk_VAJ4VX67 = require("./chunk-VAJ4VX67.js");
|
|
75
|
+
var import_chunk_PDCXVUV3 = require("./chunk-PDCXVUV3.js");
|
|
76
|
+
var import_chunk_V6PVGSDJ = require("./chunk-V6PVGSDJ.js");
|
|
77
|
+
var import_chunk_23DZXSTI = require("./chunk-23DZXSTI.js");
|
|
78
|
+
var import_chunk_URKH6SE2 = require("./chunk-URKH6SE2.js");
|
|
79
|
+
var import_chunk_D2DGSPW6 = require("./chunk-D2DGSPW6.js");
|
|
80
|
+
var import_chunk_OEWQACEH = require("./chunk-OEWQACEH.js");
|
|
78
81
|
var import_chunk_L6KOIJJ5 = require("./chunk-L6KOIJJ5.js");
|
|
79
82
|
var import_chunk_LVR7W5DD = require("./chunk-LVR7W5DD.js");
|
|
80
|
-
var
|
|
81
|
-
var
|
|
83
|
+
var import_chunk_EJG7GKM7 = require("./chunk-EJG7GKM7.js");
|
|
84
|
+
var import_chunk_SQKGZVG3 = require("./chunk-SQKGZVG3.js");
|
|
82
85
|
var import_chunk_IHDN3L3R = require("./chunk-IHDN3L3R.js");
|
|
83
86
|
var import_chunk_3WC4XD74 = require("./chunk-3WC4XD74.js");
|
|
84
|
-
var import_chunk_GKDFIHM2 = require("./chunk-GKDFIHM2.js");
|
|
85
87
|
var import_chunk_QOPTDDIH = require("./chunk-QOPTDDIH.js");
|
|
86
|
-
var
|
|
88
|
+
var import_chunk_74LUB4XX = require("./chunk-74LUB4XX.js");
|
|
87
89
|
var import_chunk_TWPTG4XS = require("./chunk-TWPTG4XS.js");
|
|
88
90
|
var import_chunk_SKRR5WT4 = require("./chunk-SKRR5WT4.js");
|
|
89
|
-
var
|
|
91
|
+
var import_chunk_2ESYSVXG = require("./chunk-2ESYSVXG.js");
|
|
@@ -1,23 +1,18 @@
|
|
|
1
|
-
import
|
|
2
|
-
import type { SchemaPathFromConfig } from './getSchema';
|
|
3
|
-
/**
|
|
4
|
-
* These are the cli args that we check the data proxy for. If in use
|
|
5
|
-
*/
|
|
6
|
-
declare const checkedArgs: {
|
|
7
|
-
'--url': boolean;
|
|
8
|
-
'--to-url': boolean;
|
|
9
|
-
'--from-url': boolean;
|
|
10
|
-
'--shadow-database-url': boolean;
|
|
11
|
-
'--schema': boolean;
|
|
12
|
-
'--from-schema-datamodel': boolean;
|
|
13
|
-
'--to-schema-datamodel': boolean;
|
|
14
|
-
};
|
|
15
|
-
type Args = O.Optional<O.Update<typeof checkedArgs, any, string>>;
|
|
1
|
+
import { SchemaContext } from '..';
|
|
16
2
|
/**
|
|
17
3
|
* Get the message to display when a command is forbidden with a data proxy flag
|
|
18
4
|
* @param command the cli command (eg. db push)
|
|
19
5
|
* @returns
|
|
20
6
|
*/
|
|
21
7
|
export declare const forbiddenCmdWithDataProxyFlagMessage: (command: string) => string;
|
|
22
|
-
|
|
23
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Check that the data proxy cannot be used through the given urls and schema contexts
|
|
10
|
+
* @param command the cli command (eg. db push)
|
|
11
|
+
* @param urls list of urls to check
|
|
12
|
+
* @param schemaContexts list of schema contexts to check
|
|
13
|
+
*/
|
|
14
|
+
export declare function checkUnsupportedDataProxy({ cmd, schemaContext, urls, }: {
|
|
15
|
+
cmd: string;
|
|
16
|
+
schemaContext?: SchemaContext;
|
|
17
|
+
urls?: (string | undefined)[];
|
|
18
|
+
}): void;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SchemaContext } from './schemaContext';
|
|
2
|
+
export type DirectoryConfig = {
|
|
3
|
+
viewsDirPath: string;
|
|
4
|
+
typedSqlDirPath: string;
|
|
5
|
+
migrationsDirPath: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function inferDirectoryConfig(schemaContext?: SchemaContext | null): DirectoryConfig;
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { DataSource, GeneratorConfig } from '@prisma/generator-helper';
|
|
2
|
+
import { GetSchemaResult, LoadedFile } from '@prisma/schema-files-loader';
|
|
3
|
+
import { SchemaPathFromConfig } from './getSchema';
|
|
4
|
+
export type SchemaContext = {
|
|
5
|
+
/**
|
|
6
|
+
* All loaded schema files and their paths.
|
|
7
|
+
*/
|
|
8
|
+
schemaFiles: LoadedFile[];
|
|
9
|
+
/**
|
|
10
|
+
* The root directory of the schema files.
|
|
11
|
+
* Either set explicitly from a schema folder based config or the parent directory of the schema.prisma file.
|
|
12
|
+
*/
|
|
13
|
+
schemaRootDir: string;
|
|
14
|
+
/**
|
|
15
|
+
* The directory of the schema.prisma file that contains the datasource block.
|
|
16
|
+
* Some relative paths like SQLite paths or SSL file paths are resolved relative to it.
|
|
17
|
+
*/
|
|
18
|
+
primaryDatasourceDirectory: string;
|
|
19
|
+
/**
|
|
20
|
+
* The path that shall be printed in user facing logs messages informing them from where the schema was loaded.
|
|
21
|
+
*/
|
|
22
|
+
loadedFromPathForLogMessages: string;
|
|
23
|
+
/**
|
|
24
|
+
* The datasource extracted from the Prisma schema. So far we only support a single datasource block.
|
|
25
|
+
*/
|
|
26
|
+
primaryDatasource: DataSource | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* Warnings that were raised during Prisma schema parsing.
|
|
29
|
+
*/
|
|
30
|
+
warnings: string[] | [];
|
|
31
|
+
/**
|
|
32
|
+
* The datasources extracted from the Prisma schema. Prefer to use primaryDatasource for most cases.
|
|
33
|
+
*/
|
|
34
|
+
datasources: DataSource[] | [];
|
|
35
|
+
/**
|
|
36
|
+
* The generators extracted from the Prisma schema.
|
|
37
|
+
*/
|
|
38
|
+
generators: GeneratorConfig[] | [];
|
|
39
|
+
schemaPath: string;
|
|
40
|
+
};
|
|
41
|
+
type LoadSchemaContextOptions = {
|
|
42
|
+
schemaPathFromArg?: string;
|
|
43
|
+
schemaPathFromConfig?: SchemaPathFromConfig;
|
|
44
|
+
printLoadMessage?: boolean;
|
|
45
|
+
ignoreEnvVarErrors?: boolean;
|
|
46
|
+
allowNull?: boolean;
|
|
47
|
+
schemaPathArgumentName?: string;
|
|
48
|
+
};
|
|
49
|
+
export declare function loadSchemaContext(opts: LoadSchemaContextOptions & {
|
|
50
|
+
allowNull: true;
|
|
51
|
+
}): Promise<SchemaContext | null>;
|
|
52
|
+
export declare function loadSchemaContext(opts?: LoadSchemaContextOptions): Promise<SchemaContext>;
|
|
53
|
+
export declare function processSchemaResult({ schemaResult, printLoadMessage, ignoreEnvVarErrors, }: {
|
|
54
|
+
schemaResult: GetSchemaResult;
|
|
55
|
+
printLoadMessage?: boolean;
|
|
56
|
+
ignoreEnvVarErrors?: boolean;
|
|
57
|
+
}): Promise<SchemaContext>;
|
|
58
|
+
export {};
|
|
@@ -16,10 +16,6 @@ interface GetConfigValidationError {
|
|
|
16
16
|
}
|
|
17
17
|
export type GetConfigOptions = {
|
|
18
18
|
datamodel: SchemaFileInput;
|
|
19
|
-
cwd?: string;
|
|
20
|
-
prismaPath?: string;
|
|
21
|
-
datamodelPath?: string;
|
|
22
|
-
retry?: number;
|
|
23
19
|
ignoreEnvVarErrors?: boolean;
|
|
24
20
|
};
|
|
25
21
|
export declare class GetConfigError extends Error {
|
|
@@ -7,11 +7,7 @@ export interface ConfigMetaFormat {
|
|
|
7
7
|
warnings: string[];
|
|
8
8
|
}
|
|
9
9
|
export type GetDMMFOptions = {
|
|
10
|
-
datamodel
|
|
11
|
-
cwd?: string;
|
|
12
|
-
prismaPath?: string;
|
|
13
|
-
datamodelPath?: string;
|
|
14
|
-
retry?: number;
|
|
10
|
+
datamodel: SchemaFileInput;
|
|
15
11
|
previewFeatures?: string[];
|
|
16
12
|
};
|
|
17
13
|
export declare class GetDmmfError extends Error {
|
|
@@ -19,7 +19,7 @@ export type LintDiagnostic = LintWarning | LintError;
|
|
|
19
19
|
* This function may panic, but it won't throw any standard error.
|
|
20
20
|
*/
|
|
21
21
|
export declare function lintSchema({ schemas }: LintSchemaParams): LintDiagnostic[];
|
|
22
|
-
export declare function handleLintPanic<T>(tryCb: () => T
|
|
22
|
+
export declare function handleLintPanic<T>(tryCb: () => T): T;
|
|
23
23
|
export declare function getLintWarnings(lintDiagnostics: LintDiagnostic[]): LintWarning[];
|
|
24
24
|
export declare function getLintWarningsAsText(lintDiagnostics: LintDiagnostic[]): string;
|
|
25
25
|
export declare function warningToString(warning: LintDiagnostic): string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { BinaryTargetsEnvValue, EngineType, GeneratorConfig, SqlQueryOutput } from '@prisma/generator-helper';
|
|
2
2
|
import type { BinaryTarget } from '@prisma/get-platform';
|
|
3
|
+
import { SchemaContext } from '..';
|
|
3
4
|
import { Generator } from '../Generator';
|
|
4
5
|
import type { GeneratorPaths } from './generatorResolvers/generatorResolvers';
|
|
5
6
|
export type ProviderAliases = {
|
|
@@ -9,7 +10,12 @@ type BinaryPathsOverride = {
|
|
|
9
10
|
[P in EngineType]?: string;
|
|
10
11
|
};
|
|
11
12
|
export type GetGeneratorOptions = {
|
|
12
|
-
|
|
13
|
+
/** @deprecated Pass a schemaContext instead. Kept for compatibility with prisma studio. */
|
|
14
|
+
schemaPath?: string;
|
|
15
|
+
schemaContext?: SchemaContext;
|
|
16
|
+
/**
|
|
17
|
+
* Aliases like `prisma-client-js` -> `node_modules/@prisma/client/generator-build/index.js`
|
|
18
|
+
*/
|
|
13
19
|
providerAliases?: ProviderAliases;
|
|
14
20
|
cliVersion?: string;
|
|
15
21
|
version?: string;
|
|
@@ -27,8 +33,6 @@ export type GetGeneratorOptions = {
|
|
|
27
33
|
* Makes sure that all generators have the binaries they deserve and returns a
|
|
28
34
|
* `Generator` class per generator defined in the schema.prisma file.
|
|
29
35
|
* In other words, this is basically a generator factory function.
|
|
30
|
-
* @param schemaPath Path to schema.prisma
|
|
31
|
-
* @param aliases Aliases like `prisma-client-js` -> `node_modules/@prisma/client/generator-build/index.js`
|
|
32
36
|
*/
|
|
33
37
|
export declare function getGenerators(options: GetGeneratorOptions): Promise<Generator[]>;
|
|
34
38
|
type NeededVersions = {
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
export { checkUnsupportedDataProxy } from './cli/checkUnsupportedDataProxy';
|
|
2
|
+
export { type DirectoryConfig, inferDirectoryConfig } from './cli/directoryConfig';
|
|
2
3
|
export { getGeneratorSuccessMessage } from './cli/getGeneratorSuccessMessage';
|
|
3
4
|
export { getPrismaConfigFromPackageJson, getSchema, getSchemaDir, type GetSchemaOptions, getSchemaWithPath, getSchemaWithPathOptional, type SchemaPathFromConfig, } from './cli/getSchema';
|
|
4
5
|
export { getTypescriptVersion } from './cli/getTypescriptVersion';
|
|
5
6
|
export { getCLIPathHash, getProjectHash } from './cli/hashes';
|
|
6
7
|
export { unknownCommand } from './cli/Help';
|
|
7
8
|
export { HelpError } from './cli/Help';
|
|
9
|
+
export { loadSchemaContext, processSchemaResult, type SchemaContext } from './cli/schemaContext';
|
|
8
10
|
export type { Command, Commands, CompiledGeneratorDefinition, Dictionary, GeneratorConfig, GeneratorDefinition, GeneratorDefinitionWithPackage, GeneratorFunction, GeneratorOptions, } from './cli/types';
|
|
9
11
|
export { arg, format, isError } from './cli/utils';
|
|
10
12
|
export { ClientEngineType, DEFAULT_CLIENT_ENGINE_TYPE, getClientEngineType } from './client/getClientEngineType';
|
|
@@ -75,7 +77,7 @@ export { longestCommonPathPrefix, pathToPosix } from './utils/path';
|
|
|
75
77
|
export { pick } from './utils/pick';
|
|
76
78
|
export { printConfigWarnings } from './utils/printConfigWarnings';
|
|
77
79
|
export { isPrismaPostgres, PRISMA_POSTGRES_PROTOCOL, PRISMA_POSTGRES_PROVIDER } from './utils/prismaPostgres';
|
|
78
|
-
export {
|
|
80
|
+
export { extractSchemaContent, type SchemaFileInput } from './utils/schemaFileInput';
|
|
79
81
|
export { type MultipleSchemas } from './utils/schemaFileInput';
|
|
80
82
|
export { serializeQueryEngineName } from './utils/serializeQueryEngineName';
|
|
81
83
|
export { setClassName } from './utils/setClassName';
|
|
@@ -1,4 +1,67 @@
|
|
|
1
1
|
export declare namespace MigrateTypes {
|
|
2
|
+
type MigrationDirectory = {
|
|
3
|
+
/**
|
|
4
|
+
* Relative path to a migration directory from `baseDir`.
|
|
5
|
+
* E.g., `./20201117144659_test`.
|
|
6
|
+
*/
|
|
7
|
+
path: string;
|
|
8
|
+
/**
|
|
9
|
+
* Description of the migration file in the directory.
|
|
10
|
+
*/
|
|
11
|
+
migrationFile: {
|
|
12
|
+
/**
|
|
13
|
+
* Relative path to the migration file from `path`.
|
|
14
|
+
*/
|
|
15
|
+
path: 'migration.sql';
|
|
16
|
+
/**
|
|
17
|
+
* Content of the migration file.
|
|
18
|
+
* E.g.,
|
|
19
|
+
* ```sql
|
|
20
|
+
* -- CreateTable
|
|
21
|
+
* CREATE TABLE "Blog" (
|
|
22
|
+
* "id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
|
23
|
+
*
|
|
24
|
+
* "viewCount20" INTEGER NOT NULL
|
|
25
|
+
* );
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
content: Tagged<'ok', {
|
|
29
|
+
value: string;
|
|
30
|
+
}> | Tagged<'error', {
|
|
31
|
+
value: Error;
|
|
32
|
+
}>;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
type MigrationLockfile = {
|
|
36
|
+
/**
|
|
37
|
+
* Relative path to the lockfile from `baseDir`.
|
|
38
|
+
*/
|
|
39
|
+
path: 'migration_lock.toml';
|
|
40
|
+
/**
|
|
41
|
+
* Content of the lockfile, if it exists.
|
|
42
|
+
* E.g.,
|
|
43
|
+
* ```toml
|
|
44
|
+
* # Please do not edit this file manually
|
|
45
|
+
* provider = "sqlite"
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
content: string | null;
|
|
49
|
+
};
|
|
50
|
+
type MigrationList = {
|
|
51
|
+
/**
|
|
52
|
+
* Absolute path to the base directory of Prisma migrations.
|
|
53
|
+
* E.g., `/usr/src/app/prisma/migrations`.
|
|
54
|
+
*/
|
|
55
|
+
baseDir: string;
|
|
56
|
+
/**
|
|
57
|
+
* Description of the lockfile, which may or may not exist.
|
|
58
|
+
*/
|
|
59
|
+
lockfile: MigrationLockfile;
|
|
60
|
+
/**
|
|
61
|
+
* Description of the migration directories.
|
|
62
|
+
*/
|
|
63
|
+
migrationDirectories: Array<MigrationDirectory>;
|
|
64
|
+
};
|
|
2
65
|
type SchemaContainer = {
|
|
3
66
|
path: string;
|
|
4
67
|
content: string;
|
|
@@ -1,13 +1,10 @@
|
|
|
1
|
-
import { MultipleSchemas } from './utils/schemaFileInput';
|
|
2
1
|
export declare class RustPanic extends Error {
|
|
3
2
|
readonly __typename = "RustPanic";
|
|
4
3
|
request: any;
|
|
5
4
|
rustStack: string;
|
|
6
5
|
area: ErrorArea;
|
|
7
|
-
schemaPath?: string;
|
|
8
|
-
schema?: MultipleSchemas;
|
|
9
6
|
introspectionUrl?: string;
|
|
10
|
-
constructor(message: string, rustStack: string, request: any, area: ErrorArea,
|
|
7
|
+
constructor(message: string, rustStack: string, request: any, area: ErrorArea, introspectionUrl?: string);
|
|
11
8
|
}
|
|
12
9
|
export declare function isRustPanic(e: Error): e is RustPanic;
|
|
13
10
|
export declare enum ErrorArea {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
export declare function extractPreviewFeatures(
|
|
1
|
+
import type { GeneratorConfig } from '@prisma/generator-helper';
|
|
2
|
+
export declare function extractPreviewFeatures(generators: GeneratorConfig[]): string[];
|
|
@@ -2,8 +2,4 @@ export type SingleSchema = string;
|
|
|
2
2
|
export type MultipleSchemaTuple = [filename: string, content: string];
|
|
3
3
|
export type MultipleSchemas = Array<MultipleSchemaTuple>;
|
|
4
4
|
export type SchemaFileInput = SingleSchema | MultipleSchemas;
|
|
5
|
-
export declare const schemaToStringDebug: (schemaFileInput: SchemaFileInput | unknown) => string | undefined;
|
|
6
|
-
export declare function toMultipleSchemas(input: SchemaFileInput | undefined): MultipleSchemas | undefined;
|
|
7
|
-
export declare function debugMultipleSchemas(multipleSchemas: MultipleSchemas): string;
|
|
8
|
-
export declare function debugMultipleSchemaPaths(multipleSchemas: MultipleSchemas): string;
|
|
9
5
|
export declare function extractSchemaContent(multipleSchemas: MultipleSchemas): string[];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ConfigMetaFormat } from '../engine-commands';
|
|
1
|
+
import { SchemaContext } from '../cli/schemaContext';
|
|
3
2
|
import { MigrateTypes } from '../migrateTypes';
|
|
4
3
|
import { MultipleSchemas } from './schemaFileInput';
|
|
5
4
|
export declare function toSchemasContainer(schemas: MultipleSchemas): MigrateTypes.SchemasContainer;
|
|
6
|
-
export declare function toSchemasWithConfigDir(
|
|
5
|
+
export declare function toSchemasWithConfigDir(schemaContext: SchemaContext): MigrateTypes.SchemasWithConfigDir;
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { MigrateTypes, SchemaContext } from '@prisma/internals';
|
|
2
2
|
import { SchemaEngine } from './SchemaEngine';
|
|
3
3
|
import type { EngineArgs, EngineResults } from './types';
|
|
4
4
|
import { DatasourceInfo } from './utils/ensureDatabaseExists';
|
|
5
5
|
export declare class Migrate {
|
|
6
6
|
engine: SchemaEngine;
|
|
7
|
-
private
|
|
7
|
+
private schemaContext?;
|
|
8
8
|
migrationsDirectoryPath?: string;
|
|
9
|
-
constructor(
|
|
9
|
+
constructor(schemaContext?: SchemaContext, migrationsDirPath?: string, enabledPreviewFeatures?: string[]);
|
|
10
10
|
stop(): void;
|
|
11
|
-
getPrismaSchema():
|
|
11
|
+
getPrismaSchema(): MigrateTypes.SchemasContainer;
|
|
12
12
|
reset(): Promise<void>;
|
|
13
|
-
createMigration(params: EngineArgs.CreateMigrationInput): Promise<
|
|
13
|
+
createMigration(params: Omit<EngineArgs.CreateMigrationInput, 'migrationsList'>): Promise<{
|
|
14
|
+
generatedMigrationName: string | undefined;
|
|
15
|
+
}>;
|
|
14
16
|
diagnoseMigrationHistory({ optInToShadowDatabase, }: {
|
|
15
17
|
optInToShadowDatabase: boolean;
|
|
16
18
|
}): Promise<EngineResults.DiagnoseMigrationHistoryOutput>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type MigrateTypes } from '@prisma/internals';
|
|
1
|
+
import { type MigrateTypes, SchemaContext } from '@prisma/internals';
|
|
2
2
|
import type { EngineArgs, EngineResults } from './types';
|
|
3
3
|
export interface SchemaEngineOptions {
|
|
4
|
-
|
|
4
|
+
schemaContext?: SchemaContext;
|
|
5
5
|
debug?: boolean;
|
|
6
6
|
enabledPreviewFeatures?: string[];
|
|
7
7
|
}
|
|
@@ -12,7 +12,7 @@ export declare class EngineError extends Error {
|
|
|
12
12
|
export declare class SchemaEngine {
|
|
13
13
|
private debug;
|
|
14
14
|
private child?;
|
|
15
|
-
private
|
|
15
|
+
private schemaContext?;
|
|
16
16
|
private listeners;
|
|
17
17
|
/** _All_ the logs from the engine process. */
|
|
18
18
|
private messages;
|
|
@@ -23,7 +23,7 @@ export declare class SchemaEngine {
|
|
|
23
23
|
private enabledPreviewFeatures?;
|
|
24
24
|
private latestSchema?;
|
|
25
25
|
isRunning: boolean;
|
|
26
|
-
constructor({ debug,
|
|
26
|
+
constructor({ debug, schemaContext, enabledPreviewFeatures }: SchemaEngineOptions);
|
|
27
27
|
/**
|
|
28
28
|
* Apply the migrations from the migrations directory to the database.
|
|
29
29
|
* This is the command behind prisma migrate deploy.
|
|
@@ -82,7 +82,7 @@ export declare class SchemaEngine {
|
|
|
82
82
|
* Given a Prisma schema, introspect the database definitions and update the schema with the results.
|
|
83
83
|
* `compositeTypeDepth` is optional, and only required for MongoDB.
|
|
84
84
|
*/
|
|
85
|
-
introspect({ schema, force, baseDirectoryPath, compositeTypeDepth, // cannot be undefined
|
|
85
|
+
introspect({ schema, force, baseDirectoryPath, viewsDirectoryPath, compositeTypeDepth, // cannot be undefined
|
|
86
86
|
namespaces, }: EngineArgs.IntrospectParams): Promise<EngineArgs.IntrospectResult>;
|
|
87
87
|
/**
|
|
88
88
|
* Compares two databases schemas from two arbitrary sources,
|
|
@@ -94,10 +94,6 @@ export declare class SchemaEngine {
|
|
|
94
94
|
* By default, we output a human-readable diff. If you want an executable script, pass the "script": true param.
|
|
95
95
|
*/
|
|
96
96
|
migrateDiff(args: EngineArgs.MigrateDiffInput): Promise<EngineResults.MigrateDiffOutput>;
|
|
97
|
-
/**
|
|
98
|
-
* List the names of the migrations in the migrations directory.
|
|
99
|
-
*/
|
|
100
|
-
listMigrationDirectories(args: EngineArgs.ListMigrationDirectoriesInput): Promise<EngineResults.ListMigrationDirectoriesOutput>;
|
|
101
97
|
/**
|
|
102
98
|
* Mark a migration as applied in the migrations table.
|
|
103
99
|
* There are two possible outcomes:
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { SqlQueryOutput } from '@prisma/generator-helper';
|
|
1
|
+
import type { ActiveConnectorType, SqlQueryOutput } from '@prisma/generator-helper';
|
|
2
2
|
import type { MigrateTypes } from '@prisma/internals';
|
|
3
3
|
import type { IntrospectionViewDefinition } from './views/handleViewsIO';
|
|
4
4
|
export interface RpcRequestResponse {
|
|
@@ -69,13 +69,13 @@ export declare namespace EngineArgs {
|
|
|
69
69
|
* These RPCs need a sourceConfig, therefore a db connection to function
|
|
70
70
|
*/
|
|
71
71
|
export interface ApplyMigrationsInput {
|
|
72
|
-
|
|
72
|
+
migrationsList: MigrateTypes.MigrationList;
|
|
73
73
|
}
|
|
74
74
|
export interface CreateMigrationInput {
|
|
75
|
-
|
|
75
|
+
migrationsList: MigrateTypes.MigrationList;
|
|
76
76
|
schema: MigrateTypes.SchemasContainer;
|
|
77
77
|
draft: boolean;
|
|
78
|
-
migrationName
|
|
78
|
+
migrationName: string;
|
|
79
79
|
}
|
|
80
80
|
export interface CreateDatabaseInput {
|
|
81
81
|
datasource: MigrateTypes.DatasourceParam;
|
|
@@ -91,6 +91,7 @@ export declare namespace EngineArgs {
|
|
|
91
91
|
export interface IntrospectParams {
|
|
92
92
|
schema: MigrateTypes.SchemasContainer;
|
|
93
93
|
baseDirectoryPath: string;
|
|
94
|
+
viewsDirectoryPath: string;
|
|
94
95
|
force?: Boolean;
|
|
95
96
|
compositeTypeDepth?: number;
|
|
96
97
|
namespaces?: string[];
|
|
@@ -110,24 +111,24 @@ export declare namespace EngineArgs {
|
|
|
110
111
|
views: IntrospectionViewDefinition[] | null;
|
|
111
112
|
}
|
|
112
113
|
export interface DevDiagnosticInput {
|
|
113
|
-
|
|
114
|
+
migrationsList: MigrateTypes.MigrationList;
|
|
114
115
|
}
|
|
115
116
|
export interface DiagnoseMigrationHistoryInput {
|
|
116
|
-
|
|
117
|
+
migrationsList: MigrateTypes.MigrationList;
|
|
117
118
|
optInToShadowDatabase: boolean;
|
|
118
119
|
}
|
|
119
120
|
export interface EnsureConnectionValidityInput {
|
|
120
121
|
datasource: MigrateTypes.DatasourceParam;
|
|
121
122
|
}
|
|
122
123
|
export interface EvaluateDataLossInput {
|
|
123
|
-
|
|
124
|
+
migrationsList: MigrateTypes.MigrationList;
|
|
124
125
|
schema: MigrateTypes.SchemasContainer;
|
|
125
126
|
}
|
|
126
127
|
export interface ListMigrationDirectoriesInput {
|
|
127
128
|
migrationsDirectoryPath: string;
|
|
128
129
|
}
|
|
129
130
|
export interface MarkMigrationAppliedInput {
|
|
130
|
-
|
|
131
|
+
migrationsList: MigrateTypes.MigrationList;
|
|
131
132
|
migrationName: string;
|
|
132
133
|
}
|
|
133
134
|
export interface MarkMigrationRolledBackInput {
|
|
@@ -141,7 +142,7 @@ export declare namespace EngineArgs {
|
|
|
141
142
|
type MigrateDiffTargetSchemaDatasource = MigrateTypes.Tagged<'schemaDatasource', MigrateTypes.SchemasWithConfigDir>;
|
|
142
143
|
type MigrateDiffTargetMigrations = {
|
|
143
144
|
tag: 'migrations';
|
|
144
|
-
|
|
145
|
+
migrationsList: MigrateTypes.MigrationList;
|
|
145
146
|
};
|
|
146
147
|
export type MigrateDiffTarget = MigrateDiffTargetUrl | MigrateDiffTargetEmpty | MigrateDiffTargetSchemaDatamodel | MigrateDiffTargetSchemaDatasource | MigrateDiffTargetMigrations;
|
|
147
148
|
export interface MigrateDiffInput {
|
|
@@ -173,7 +174,10 @@ export declare namespace EngineResults {
|
|
|
173
174
|
database_name: string;
|
|
174
175
|
}
|
|
175
176
|
interface CreateMigrationOutput {
|
|
176
|
-
|
|
177
|
+
connectorType: ActiveConnectorType;
|
|
178
|
+
generatedMigrationName: string;
|
|
179
|
+
migrationScript: string | null;
|
|
180
|
+
extension: string;
|
|
177
181
|
}
|
|
178
182
|
interface DbExecuteOutput {
|
|
179
183
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { ActiveConnectorType } from '@prisma/generator-helper';
|
|
2
|
+
import type { MigrateTypes } from '@prisma/internals';
|
|
3
|
+
type CreateMigrationInput = {
|
|
4
|
+
baseDir: string;
|
|
5
|
+
generatedMigrationName: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function createMigration({ baseDir, generatedMigrationName }: CreateMigrationInput): Promise<string>;
|
|
8
|
+
type WriteMigrationScriptInput = {
|
|
9
|
+
baseDir: string;
|
|
10
|
+
migrationName: string;
|
|
11
|
+
extension: string;
|
|
12
|
+
script: string;
|
|
13
|
+
};
|
|
14
|
+
export declare function writeMigrationScript({ baseDir, extension, migrationName, script, }: WriteMigrationScriptInput): Promise<void>;
|
|
15
|
+
type WriteMigrationLockfileInput = {
|
|
16
|
+
baseDir: string;
|
|
17
|
+
connectorType: ActiveConnectorType;
|
|
18
|
+
lockfile: Omit<MigrateTypes.MigrationLockfile, 'content'>;
|
|
19
|
+
};
|
|
20
|
+
export declare function writeMigrationLockfile({ baseDir, connectorType, lockfile }: WriteMigrationLockfileInput): Promise<void>;
|
|
21
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { DataSource } from '@prisma/generator-helper';
|
|
1
2
|
import type { DatabaseCredentials } from '@prisma/internals';
|
|
2
3
|
import { ConnectorType } from './printDatasources';
|
|
3
4
|
export type MigrateAction = 'create' | 'apply' | 'unapply' | 'dev' | 'push';
|
|
@@ -12,12 +13,9 @@ export type DatasourceInfo = {
|
|
|
12
13
|
schemas?: string[];
|
|
13
14
|
configDir?: string;
|
|
14
15
|
};
|
|
15
|
-
export declare function
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}): Promise<DatasourceInfo>;
|
|
19
|
-
export declare function ensureCanConnectToDatabase(schemaPath?: string): Promise<Boolean | Error>;
|
|
20
|
-
export declare function ensureDatabaseExists(action: MigrateAction, schemaPath?: string): Promise<string | undefined>;
|
|
16
|
+
export declare function parseDatasourceInfo(datasource: DataSource | undefined): DatasourceInfo;
|
|
17
|
+
export declare function ensureCanConnectToDatabase(datasource: DataSource | undefined): Promise<Boolean | Error>;
|
|
18
|
+
export declare function ensureDatabaseExists(datasource: DataSource | undefined): Promise<string | undefined>;
|
|
21
19
|
export declare function getDbLocation(credentials: DatabaseCredentials): string | undefined;
|
|
22
20
|
/**
|
|
23
21
|
* Return a pretty version of a "provider" (with uppercase characters)
|