@prisma/migrate 6.4.0-dev.6 → 6.4.0-dev.60
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-HAJNCOW7.js → chunk-26XQQ4AG.js} +25 -23
- package/dist/{chunk-I63N54YI.js → chunk-2RSEPJFX.js} +15 -13
- package/dist/{chunk-77RYI3ZW.js → chunk-4B2LXK4R.js} +14 -12
- package/dist/{chunk-CK5VLKFM.js → chunk-4UJBOCZJ.js} +7 -6
- package/dist/{chunk-43RWRQLU.js → chunk-5HZLCY6X.js} +14 -12
- package/dist/{chunk-AMRGQNRR.js → chunk-75EIHNAH.js} +6 -6
- package/dist/{chunk-Q3SQU7C6.js → chunk-7S3Q4MCN.js} +4 -4
- package/dist/{chunk-G66QFMM5.js → chunk-AOX7CJAS.js} +14 -12
- package/dist/{chunk-GRGGAY6L.js → chunk-CUDKD32S.js} +159 -5
- package/dist/{chunk-CNAS3YE2.js → chunk-DUCG3NRP.js} +76 -42
- package/dist/{chunk-JESW2ENL.js → chunk-FF3526PX.js} +14 -12
- package/dist/{chunk-JZ6FKTWG.js → chunk-FUSFURVP.js} +6 -6
- package/dist/{chunk-CSUAUCRR.js → chunk-GCTCQLOF.js} +15 -13
- package/dist/{chunk-7QAR4NT3.js → chunk-K44VNAFW.js} +15 -13
- package/dist/{chunk-KZEXQFQA.js → chunk-KK5B5L6X.js} +77 -43
- package/dist/{chunk-EYA6AFSF.js → chunk-M5YNQ2NP.js} +5 -5
- package/dist/{chunk-NJUAN6V2.js → chunk-O4BT6W33.js} +7 -6
- package/dist/{chunk-ZKWJDQMB.js → chunk-UVNSK22K.js} +7 -7
- package/dist/{chunk-WJT3IOMB.js → chunk-X6XGFLEF.js} +11 -9
- package/dist/{chunk-E2XKFV2C.js → chunk-YD7GG4WS.js} +8 -6
- package/dist/{chunk-JTNVQIRB.js → chunk-YWWOSXMY.js} +6 -6
- package/dist/commands/DbCommand.js +3 -3
- package/dist/commands/DbDrop.js +3 -3
- package/dist/commands/DbExecute.js +5 -5
- package/dist/commands/DbPull.js +5 -5
- package/dist/commands/DbPush.js +6 -6
- package/dist/commands/DbSeed.js +3 -3
- package/dist/commands/MigrateCommand.js +3 -3
- package/dist/commands/MigrateDeploy.js +6 -6
- package/dist/commands/MigrateDev.js +6 -6
- package/dist/commands/MigrateDiff.js +5 -5
- package/dist/commands/MigrateReset.js +6 -6
- package/dist/commands/MigrateResolve.js +6 -6
- package/dist/commands/MigrateStatus.js +6 -6
- package/dist/index.js +54 -54
- package/dist/internals/src/cli/checkUnsupportedDataProxy.d.ts +2 -1
- package/dist/internals/src/cli/getSchema.d.ts +20 -37
- package/dist/internals/src/cli/hashes.d.ts +2 -1
- 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/migrate/src/utils/getSchemaPathAndPrint.d.ts +3 -3
- package/dist/migrate/src/utils/setupPostgres.d.ts +1 -1
- package/dist/utils/getDatabaseVersionSafe.js +4 -4
- package/dist/utils/getSchemaPathAndPrint.js +4 -4
- package/dist/utils/introspectSql.js +3 -3
- package/dist/utils/setupPostgres.js +4 -8
- package/dist/utils/spinner.js +3 -3
- package/package.json +7 -6
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { PrismaConfigInternal } from '@prisma/config';
|
|
1
2
|
import { Command, HelpError } from '@prisma/internals';
|
|
2
3
|
export declare class DbPush implements Command {
|
|
3
4
|
static new(): DbPush;
|
|
4
5
|
private static help;
|
|
5
|
-
parse(argv: string[]): Promise<string | Error>;
|
|
6
|
+
parse(argv: string[], config: PrismaConfigInternal): Promise<string | Error>;
|
|
6
7
|
help(error?: string): string | HelpError;
|
|
7
8
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { PrismaConfigInternal } from '@prisma/config';
|
|
1
2
|
import { Command, HelpError } from '@prisma/internals';
|
|
2
3
|
export declare class DbSeed implements Command {
|
|
3
4
|
static new(): DbSeed;
|
|
4
5
|
private static help;
|
|
5
|
-
parse(argv: string[]): Promise<string | Error>;
|
|
6
|
+
parse(argv: string[], config: PrismaConfigInternal): Promise<string | Error>;
|
|
6
7
|
help(error?: string): string | HelpError;
|
|
7
8
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PrismaConfigInternal } from '@prisma/config';
|
|
1
2
|
import type { Command, Commands } from '@prisma/internals';
|
|
2
3
|
import { HelpError } from '@prisma/internals';
|
|
3
4
|
export declare class MigrateCommand implements Command {
|
|
@@ -5,6 +6,6 @@ export declare class MigrateCommand implements Command {
|
|
|
5
6
|
static new(cmds: Commands): MigrateCommand;
|
|
6
7
|
private static help;
|
|
7
8
|
private constructor();
|
|
8
|
-
parse(argv: string[]): Promise<string | Error>;
|
|
9
|
+
parse(argv: string[], config: PrismaConfigInternal): Promise<string | Error>;
|
|
9
10
|
help(error?: string): string | HelpError;
|
|
10
11
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { PrismaConfigInternal } from '@prisma/config';
|
|
1
2
|
import { Command, HelpError } from '@prisma/internals';
|
|
2
3
|
export declare class MigrateDeploy implements Command {
|
|
3
4
|
static new(): MigrateDeploy;
|
|
4
5
|
private static help;
|
|
5
|
-
parse(argv: string[]): Promise<string | Error>;
|
|
6
|
+
parse(argv: string[], config: PrismaConfigInternal): Promise<string | Error>;
|
|
6
7
|
help(error?: string): string | HelpError;
|
|
7
8
|
}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
+
import type { PrismaConfigInternal } from '@prisma/config';
|
|
1
2
|
import { Command, HelpError } from '@prisma/internals';
|
|
2
3
|
export declare class MigrateDev implements Command {
|
|
3
4
|
static new(): MigrateDev;
|
|
4
5
|
private static help;
|
|
5
|
-
parse(argv: string[]): Promise<string | Error>;
|
|
6
|
+
parse(argv: string[], config: PrismaConfigInternal): Promise<string | Error>;
|
|
6
7
|
private confirmReset;
|
|
7
8
|
help(error?: string): string | HelpError;
|
|
8
9
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { PrismaConfigInternal } from '@prisma/config';
|
|
1
2
|
import { Command, HelpError } from '@prisma/internals';
|
|
2
3
|
export declare class MigrateDiff implements Command {
|
|
3
4
|
static new(): MigrateDiff;
|
|
4
5
|
private static help;
|
|
5
|
-
parse(argv: string[]): Promise<string | Error>;
|
|
6
|
+
parse(argv: string[], config: PrismaConfigInternal): Promise<string | Error>;
|
|
6
7
|
help(error?: string): string | HelpError;
|
|
7
8
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { PrismaConfigInternal } from '@prisma/config';
|
|
1
2
|
import { Command, HelpError } from '@prisma/internals';
|
|
2
3
|
export declare class MigrateReset implements Command {
|
|
3
4
|
static new(): MigrateReset;
|
|
4
5
|
private static help;
|
|
5
|
-
parse(argv: string[]): Promise<string | Error>;
|
|
6
|
+
parse(argv: string[], config: PrismaConfigInternal): Promise<string | Error>;
|
|
6
7
|
help(error?: string): string | HelpError;
|
|
7
8
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { PrismaConfigInternal } from '@prisma/config';
|
|
1
2
|
import { Command, HelpError } from '@prisma/internals';
|
|
2
3
|
export declare class MigrateResolve implements Command {
|
|
3
4
|
static new(): MigrateResolve;
|
|
4
5
|
private static help;
|
|
5
|
-
parse(argv: string[]): Promise<string | Error>;
|
|
6
|
+
parse(argv: string[], config: PrismaConfigInternal): Promise<string | Error>;
|
|
6
7
|
help(error?: string): string | HelpError;
|
|
7
8
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import type { PrismaConfigInternal } from '@prisma/config';
|
|
1
2
|
import { Command, HelpError } from '@prisma/internals';
|
|
2
3
|
export declare class MigrateStatus implements Command {
|
|
3
4
|
static new(): MigrateStatus;
|
|
4
5
|
private static help;
|
|
5
|
-
parse(argv: string[]): Promise<string | Error>;
|
|
6
|
+
parse(argv: string[], config: PrismaConfigInternal): Promise<string | Error>;
|
|
6
7
|
help(error?: string): string | HelpError;
|
|
7
8
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { GetSchemaOptions, type GetSchemaResult } from '@prisma/internals';
|
|
1
|
+
import { type GetSchemaOptions, type GetSchemaResult, type SchemaPathFromConfig } from '@prisma/internals';
|
|
2
2
|
/**
|
|
3
3
|
* If a path is provided checks that it exists or error
|
|
4
4
|
* If no path provided check in default location(s) or error
|
|
5
|
-
* Schema found: print to console
|
|
5
|
+
* Schema found: print to console its relative path
|
|
6
6
|
*
|
|
7
7
|
* @returns {GetSchemaResult}
|
|
8
8
|
*/
|
|
9
|
-
export declare function getSchemaPathAndPrint(schemaPathProvided?: string, options?: GetSchemaOptions): Promise<GetSchemaResult>;
|
|
9
|
+
export declare function getSchemaPathAndPrint(schemaPathProvided?: string, schemaPathFromConfig?: SchemaPathFromConfig, options?: GetSchemaOptions): Promise<GetSchemaResult>;
|
|
10
10
|
export declare function printSchemaLoadedMessage(schemaPath: string): void;
|
|
@@ -10,4 +10,4 @@ export declare function tearDownPostgres(options: SetupParams): Promise<void>;
|
|
|
10
10
|
* This function should be called after `setupPostgres` and before `tearDownPostgres`.
|
|
11
11
|
* The given `options.connectionString` is used as is.
|
|
12
12
|
*/
|
|
13
|
-
export declare function runQueryPostgres(options: SetupParams, query: string): Promise<void>;
|
|
13
|
+
export declare function runQueryPostgres(options: Omit<SetupParams, 'dirname'>, query: string): Promise<void>;
|
|
@@ -18,13 +18,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var getDatabaseVersionSafe_exports = {};
|
|
20
20
|
__export(getDatabaseVersionSafe_exports, {
|
|
21
|
-
getDatabaseVersionSafe: () =>
|
|
21
|
+
getDatabaseVersionSafe: () => import_chunk_YWWOSXMY.getDatabaseVersionSafe
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(getDatabaseVersionSafe_exports);
|
|
24
|
-
var
|
|
25
|
-
var
|
|
24
|
+
var import_chunk_YWWOSXMY = require("../chunk-YWWOSXMY.js");
|
|
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_YWWOSXMY.init_getDatabaseVersionSafe)();
|
|
@@ -18,11 +18,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var getSchemaPathAndPrint_exports = {};
|
|
20
20
|
__export(getSchemaPathAndPrint_exports, {
|
|
21
|
-
getSchemaPathAndPrint: () =>
|
|
22
|
-
printSchemaLoadedMessage: () =>
|
|
21
|
+
getSchemaPathAndPrint: () => import_chunk_M5YNQ2NP.getSchemaPathAndPrint,
|
|
22
|
+
printSchemaLoadedMessage: () => import_chunk_M5YNQ2NP.printSchemaLoadedMessage
|
|
23
23
|
});
|
|
24
24
|
module.exports = __toCommonJS(getSchemaPathAndPrint_exports);
|
|
25
|
-
var
|
|
25
|
+
var import_chunk_M5YNQ2NP = require("../chunk-M5YNQ2NP.js");
|
|
26
26
|
var import_chunk_6TE2RIPN = require("../chunk-6TE2RIPN.js");
|
|
27
27
|
var import_chunk_WWAWV7DQ = require("../chunk-WWAWV7DQ.js");
|
|
28
|
-
(0,
|
|
28
|
+
(0, import_chunk_M5YNQ2NP.init_getSchemaPathAndPrint)();
|
|
@@ -18,11 +18,11 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var introspectSql_exports = {};
|
|
20
20
|
__export(introspectSql_exports, {
|
|
21
|
-
introspectSql: () =>
|
|
21
|
+
introspectSql: () => import_chunk_75EIHNAH.introspectSql
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(introspectSql_exports);
|
|
24
|
-
var
|
|
25
|
-
var
|
|
24
|
+
var import_chunk_75EIHNAH = require("../chunk-75EIHNAH.js");
|
|
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");
|
|
@@ -35,9 +35,9 @@ __export(setupPostgres_exports, {
|
|
|
35
35
|
module.exports = __toCommonJS(setupPostgres_exports);
|
|
36
36
|
var import_chunk_73OPZA7N = require("../chunk-73OPZA7N.js");
|
|
37
37
|
var import_chunk_WWAWV7DQ = require("../chunk-WWAWV7DQ.js");
|
|
38
|
+
var import_promises = __toESM(require("node:fs/promises"));
|
|
39
|
+
var import_node_path = __toESM(require("node:path"));
|
|
38
40
|
var import_internals = require("@prisma/internals");
|
|
39
|
-
var import_fs = __toESM(require("fs"));
|
|
40
|
-
var import_path = __toESM(require("path"));
|
|
41
41
|
var import_pg = (0, import_chunk_WWAWV7DQ.__toESM)((0, import_chunk_73OPZA7N.require_lib)());
|
|
42
42
|
async function setupPostgres(options) {
|
|
43
43
|
const { connectionString } = options;
|
|
@@ -53,12 +53,8 @@ async function setupPostgres(options) {
|
|
|
53
53
|
await dbDefault.query(`CREATE DATABASE "${credentials.database}";`);
|
|
54
54
|
await dbDefault.end();
|
|
55
55
|
if (dirname !== "") {
|
|
56
|
-
const
|
|
57
|
-
|
|
58
|
-
});
|
|
59
|
-
await db.connect();
|
|
60
|
-
await db.query(import_fs.default.readFileSync(import_path.default.join(dirname, "setup.sql"), "utf-8"));
|
|
61
|
-
await db.end();
|
|
56
|
+
const migrationScript = await import_promises.default.readFile(import_node_path.default.join(dirname, "setup.sql"), { encoding: "utf-8" });
|
|
57
|
+
await runQueryPostgres({ connectionString }, migrationScript);
|
|
62
58
|
}
|
|
63
59
|
}
|
|
64
60
|
async function tearDownPostgres(options) {
|
package/dist/utils/spinner.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 spinner_exports = {};
|
|
20
20
|
__export(spinner_exports, {
|
|
21
|
-
createSpinner: () =>
|
|
21
|
+
createSpinner: () => import_chunk_CUDKD32S.createSpinner
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(spinner_exports);
|
|
24
|
-
var
|
|
24
|
+
var import_chunk_CUDKD32S = require("../chunk-CUDKD32S.js");
|
|
25
25
|
var import_chunk_YUCPBDWV = require("../chunk-YUCPBDWV.js");
|
|
26
26
|
var import_chunk_RM5LJIEV = require("../chunk-RM5LJIEV.js");
|
|
27
27
|
var import_chunk_6C7ESGWY = require("../chunk-6C7ESGWY.js");
|
|
28
28
|
var import_chunk_J46BJQHT = require("../chunk-J46BJQHT.js");
|
|
29
29
|
var import_chunk_WWAWV7DQ = require("../chunk-WWAWV7DQ.js");
|
|
30
|
-
(0,
|
|
30
|
+
(0, import_chunk_CUDKD32S.init_spinner)();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@prisma/migrate",
|
|
3
|
-
"version": "6.4.0-dev.
|
|
3
|
+
"version": "6.4.0-dev.60",
|
|
4
4
|
"description": "This package is intended for Prisma's internal use",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/migrate/src/index.d.ts",
|
|
@@ -55,12 +55,13 @@
|
|
|
55
55
|
"@prisma/internals": "*"
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
|
-
"@prisma/engines-version": "6.4.0-
|
|
58
|
+
"@prisma/engines-version": "6.4.0-29.a9055b89e58b4b5bfb59600785423b1db3d0e75d",
|
|
59
59
|
"prompts": "2.4.2",
|
|
60
|
-
"@prisma/
|
|
61
|
-
"@prisma/
|
|
62
|
-
"@prisma/
|
|
63
|
-
"@prisma/internals": "6.4.0-dev.
|
|
60
|
+
"@prisma/config": "6.4.0-dev.60",
|
|
61
|
+
"@prisma/generator-helper": "6.4.0-dev.60",
|
|
62
|
+
"@prisma/debug": "6.4.0-dev.60",
|
|
63
|
+
"@prisma/internals": "6.4.0-dev.60",
|
|
64
|
+
"@prisma/get-platform": "6.4.0-dev.60"
|
|
64
65
|
},
|
|
65
66
|
"files": [
|
|
66
67
|
"README.md",
|