docs: migrations directory details

This commit is contained in:
Elliot DeNolf
2023-11-28 11:18:04 -05:00
parent 530c825f80
commit 35ce0ebc83

View File

@@ -46,8 +46,14 @@ export async function down({ payload }: MigrateDownArgs): Promise<void> {
};
```
### Migrations Directory
Each DB adapter has an optional property `migrationDir` where you can override where you want your migrations to be stored/read. If this is not specified, Payload will check the default and possibly make a best effort to find your migrations directory by searching in common locations ie. `./src/migrations`, `./dist/igrations`, `./migrations`, etc.
All database adapters should implement similar migration patterns, but there will be small differences based on the adapter and its specific needs. Below is a list of all migration commands that should be supported by your database adapter.
## Commands
### Migrate
The `migrate` command will run any migrations that have not yet been run.