docs: document checks examples + migrations naming convention (#13052)
This commit is contained in:
1 parent
b40b2ff676
commit
5a01ef89ea
5 files changed
+189
-5
No files matched your search
@@ -37,7 +37,7 @@ You can also write migrations manually. To do that, create a file in the `migrat
|
||||
|
||||
For example:
|
||||
|
||||
```ts title="src/modules/blog/migrations/Migration202507021059.ts"
|
||||
```ts title="src/modules/blog/migrations/Migration202507021059_create_author.ts"
|
||||
import { Migration } from "@mikro-orm/migrations"
|
||||
|
||||
export class Migration202507021059 extends Migration {
|
||||
@@ -63,6 +63,12 @@ Refer to [MikroORM's documentation](https://mikro-orm.io/docs/migrations#migrati
|
||||
|
||||
</Note>
|
||||
|
||||
### Migration File Naming
|
||||
|
||||
Migrations are executed in the ascending order of their file names. So, it's recommended to prefix the migration file name with the timestamp of when the migration was created. This ensures that migrations are executed in the order they were created.
|
||||
|
||||
For example, if you create a migration on July 2, 2025, at 10:59 AM, the file name should be `Migration202507021059_create_brand.ts`. This way, the migration will be executed after any previous migrations that were created before this date and time.
|
||||
|
||||
---
|
||||
|
||||
## Run the Migration
|
||||
|
||||
Reference in new issue
Block a user