diff --git a/src/ORM/_migrations/RemoveAcceptedShareRetention1780959000000.ts b/src/ORM/_migrations/RemoveAcceptedShareRetention1780959000000.ts new file mode 100644 index 0000000..485b38c --- /dev/null +++ b/src/ORM/_migrations/RemoveAcceptedShareRetention1780959000000.ts @@ -0,0 +1,14 @@ +import { MigrationInterface, QueryRunner } from 'typeorm'; + +export class RemoveAcceptedShareRetention1780959000000 implements MigrationInterface { + public name = 'RemoveAcceptedShareRetention1780959000000'; + public transaction = false; + + public async up(queryRunner: QueryRunner): Promise { + await queryRunner.query(`SELECT remove_retention_policy('accepted_share_entity', if_exists => TRUE)`); + } + + public async down(queryRunner: QueryRunner): Promise { + await queryRunner.query(`SELECT add_retention_policy('accepted_share_entity', INTERVAL '30 days', if_not_exists => TRUE)`); + } +}