Skip to content

Commit

Permalink
Create migration to change conection idle time (#1518)
Browse files Browse the repository at this point in the history
  • Loading branch information
mohammadranjbarz authored May 2, 2024
1 parent 414ef11 commit c97552f
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions migration/1714568966885-changeConnectionIdleTimeout.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { MigrationInterface, QueryRunner } from 'typeorm';

export class ChangeConnectionIdleTimeout1714568966885
implements MigrationInterface
{
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER DATABASE "${process.env.TYPEORM_DATABASE_NAME}" SET idle_in_transaction_session_timeout = '10min';`,
);
}

public async down(_queryRunner: QueryRunner): Promise<void> {
//
}
}

0 comments on commit c97552f

Please sign in to comment.