docs: fix missing DataSource in migrations config (#11249)

This commit is contained in:
Maciej Kasprzyk 2025-02-14 21:17:09 +01:00 committed by GitHub
parent 5f6039289c
commit 87b9fad737
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -61,7 +61,9 @@ This place is called "migrations".
Before creating a new migration you need to setup your data source options properly:
```ts
{
import { DataSource } from "typeorm";
export default new DataSource({
type: "mysql",
host: "localhost",
port: 3306,
@ -71,7 +73,7 @@ Before creating a new migration you need to setup your data source options prope
entities: [/*...*/],
migrations: [/*...*/],
migrationsTableName: "custom_migration_table",
}
})
```
Here we setup two options: