Skip to content

Commit

Permalink
feat: add migrations transaction option to connection options
Browse files Browse the repository at this point in the history
It is the extension of pull request typeorm#4629 which allows
applying same transaction options when running transactions in automatic mode
  • Loading branch information
mightyYaroslav committed Nov 27, 2019
1 parent 710ca6a commit 062d32b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/connection/BaseConnectionOptions.ts
Expand Up @@ -50,7 +50,7 @@ export interface BaseConnectionOptions {
/**
* Transaction mode for migrations to run in
*/
readonly migrationsTransaction?: "all" | "none" | "each";
readonly migrationsTransactionMode?: "all" | "none" | "each";

/**
* Naming strategy to be used to name tables and columns in the database.
Expand Down
2 changes: 1 addition & 1 deletion src/connection/Connection.ts
Expand Up @@ -202,7 +202,7 @@ export class Connection {

// if option is set - automatically synchronize a schema
if (this.options.migrationsRun)
await this.runMigrations({ transaction: this.options.migrationsTransaction });
await this.runMigrations({ transaction: this.options.migrationsTransactionMode });

} catch (error) {

Expand Down

0 comments on commit 062d32b

Please sign in to comment.