TypeORM migrations
See original GitHub issueHi, Is there a way to run migrations with defining the connection as described in the docs?
export const databaseProviders = [
{
provide: DB_CON_TOKEN,
useFactory: async () => await createConnection({
type: 'mysql',
host: 'localhost',
port: 3306,
username: 'root',
password: 'root',
database: 'test',
entities: [
__dirname + '/../**/*.entity{.ts,.js}',
],
migrations: [
__dirname + '/migrations/*.migration{.ts,.js}'
]
}),
},
];
The only option I see is to configure 2 dbConnections, one for nest (for the repository/entity) and one for TypeORM for the migrations.
Issue Analytics
- State:
- Created 6 years ago
- Comments:7
Top Results From Across the Web
Migrations - typeorm - GitBook
TypeORM provides a place where you can write such sql queries and run them when needed. This place is called "migrations".
Read more >TypeORM - Migrations - Tutorialspoint
TypeORM - Migrations, Migrations are like version control for your database. It is used to modify and share application’s database schema.
Read more >TypeORM - Amazing ORM for TypeScript and JavaScript (ES7 ...
TypeORM is an ORM that can run in NodeJS, Browser, Cordova, PhoneGap, Ionic, React Native, NativeScript, ... Migrations and automatic migrations generation.
Read more >API with NestJS #69. Database migrations with TypeORM
We go through the idea of database migrations and learn how to perform them with TypeORM.
Read more >Using CLI | TypeORM Docs
Automatic migration generation creates a new migration file and writes all sql queries that must be executed to update the database. If no...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
awesome! thanks for providing the example
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.