Skip to content

Commit

Permalink
Adding ability to have a custom getNewMigrationName function. (#484)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgarbesi committed Jul 18, 2023
1 parent 0c67c6d commit 39cad61
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/guide/migrations.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,21 @@ module.exports = {
};
```

### Custom migration name

You may provide a custom migration name to be used in place of the default option.

```js
module.exports = {
client: 'pg',
migrations: {
getNewMigrationName: (name) => {
return `${+new Date()}-${name}.js`;
}
}
};
```

### Generated migration extension

You can control extension of generated migrations.
Expand Down

0 comments on commit 39cad61

Please sign in to comment.