Skip to content

Commit 44e505b

Browse files
committed
create migrations dir if it doesn't exist
1 parent cc4bf56 commit 44e505b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/v3/migration/engine/Engine.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,11 @@ export class Engine {
162162
// update current state to the network directory
163163
this.migration.state = this.IO.state.fetch(this.pathToNetworkDir);
164164

165+
// create migrations dir if it doesn't exist
166+
if (!fs.existsSync(this.pathToMigrationsDir)) {
167+
fs.mkdirSync(this.pathToMigrationsDir);
168+
}
169+
165170
// generate migration files
166171
const allMigrationFiles = fs.readdirSync(this.pathToMigrationsDir);
167172
const migrationFiles = allMigrationFiles.filter((fileName: string) => fileName.endsWith('.ts'));

0 commit comments

Comments
 (0)