diff --git a/migrations/1696397559095-AddExpirationDateResetToMultisigSession.ts b/migrations/1696397559095-AddExpirationDateResetToMultisigSession.ts index 7184e2d..3d8c647 100644 --- a/migrations/1696397559095-AddExpirationDateResetToMultisigSession.ts +++ b/migrations/1696397559095-AddExpirationDateResetToMultisigSession.ts @@ -4,14 +4,22 @@ export class AddExpirationDateResetToMultisigSession1696397559095 implements MigrationInterface { public async up(queryRunner: QueryRunner): Promise { - await queryRunner.addColumn( - 'multisig_session', - new TableColumn({ - name: 'approvalExpirationDate', - type: 'date', - isNullable: true, - }), + const table = await queryRunner.getTable('multisig_session'); + if (!table) return; + + const approvalExpirationDateColumnExists = table.columns.some( + c => c.name === 'approvalExpirationDate', ); + if (!approvalExpirationDateColumnExists) { + await queryRunner.addColumn( + 'multisig_session', + new TableColumn({ + name: 'approvalExpirationDate', + type: 'date', + isNullable: true, + }), + ); + } } public async down(queryRunner: QueryRunner): Promise {