summaryrefslogtreecommitdiff
path: root/packages/backend/migration/1618637372000-user-last-active-date.js
blob: 6c77ace467c720d9710bebe89221124222f8bd53 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
export class userLastActiveDate1618637372000 {
    constructor() {
        this.name = 'userLastActiveDate1618637372000';
    }
    async up(queryRunner) {
        await queryRunner.query(`ALTER TABLE "user" ADD "lastActiveDate" TIMESTAMP WITH TIME ZONE DEFAULT NULL`);
        await queryRunner.query(`CREATE INDEX "IDX_seoignmeoprigmkpodgrjmkpormg" ON "user" ("lastActiveDate") `);
    }
    async down(queryRunner) {
        await queryRunner.query(`DROP INDEX "IDX_seoignmeoprigmkpodgrjmkpormg"`);
        await queryRunner.query(`ALTER TABLE "user" DROP COLUMN "lastActiveDate"`);
    }
}