@@ -9,7 +9,7 @@ type CommonOptions = {
9
9
} ;
10
10
11
11
/**
12
- * CLI action for generating code from schema
12
+ * CLI action for migration-related commands
13
13
*/
14
14
export async function run ( command : string , options : CommonOptions ) {
15
15
const schemaFile = getSchemaFile ( options . schema ) ;
@@ -27,28 +27,24 @@ export async function run(command: string, options: CommonOptions) {
27
27
28
28
switch ( command ) {
29
29
case 'dev' :
30
- await runDev ( schemaFile , prismaSchemaFile , options ) ;
30
+ await runDev ( prismaSchemaFile , options ) ;
31
31
break ;
32
32
33
33
case 'reset' :
34
- await runReset ( schemaFile , prismaSchemaFile , options as any ) ;
34
+ await runReset ( prismaSchemaFile , options as any ) ;
35
35
break ;
36
36
37
37
case 'deploy' :
38
- await runDeploy ( schemaFile , prismaSchemaFile , options ) ;
38
+ await runDeploy ( prismaSchemaFile , options ) ;
39
39
break ;
40
40
41
41
case 'status' :
42
- await runStatus ( schemaFile , prismaSchemaFile , options ) ;
42
+ await runStatus ( prismaSchemaFile , options ) ;
43
43
break ;
44
44
}
45
45
}
46
46
47
- async function runDev (
48
- _schemaFile : string ,
49
- prismaSchemaFile : string ,
50
- _options : unknown
51
- ) {
47
+ async function runDev ( prismaSchemaFile : string , _options : unknown ) {
52
48
try {
53
49
await execPackage (
54
50
`prisma migrate dev --schema "${ prismaSchemaFile } " --skip-generate` ,
@@ -61,11 +57,7 @@ async function runDev(
61
57
}
62
58
}
63
59
64
- async function runReset (
65
- _schemaFile : string ,
66
- prismaSchemaFile : string ,
67
- options : { force : boolean }
68
- ) {
60
+ async function runReset ( prismaSchemaFile : string , options : { force : boolean } ) {
69
61
try {
70
62
await execPackage (
71
63
`prisma migrate reset --schema "${ prismaSchemaFile } "${
@@ -80,11 +72,7 @@ async function runReset(
80
72
}
81
73
}
82
74
83
- async function runDeploy (
84
- _schemaFile : string ,
85
- prismaSchemaFile : string ,
86
- _options : unknown
87
- ) {
75
+ async function runDeploy ( prismaSchemaFile : string , _options : unknown ) {
88
76
try {
89
77
await execPackage (
90
78
`prisma migrate deploy --schema "${ prismaSchemaFile } "` ,
@@ -97,11 +85,7 @@ async function runDeploy(
97
85
}
98
86
}
99
87
100
- async function runStatus (
101
- _schemaFile : string ,
102
- prismaSchemaFile : string ,
103
- _options : unknown
104
- ) {
88
+ async function runStatus ( prismaSchemaFile : string , _options : unknown ) {
105
89
try {
106
90
await execPackage (
107
91
`prisma migrate status --schema "${ prismaSchemaFile } "` ,
0 commit comments