Skip to content

Commit b0ebea0

Browse files
committed
[pat] Fix expiration time auto-udpate
1 parent 82e56ca commit b0ebea0

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Copyright (c) 2022 Gitpod GmbH. All rights reserved.
3+
* Licensed under the GNU Affero General Public License (AGPL).
4+
* See License-AGPL.txt in the project root for license information.
5+
*/
6+
7+
import { MigrationInterface, QueryRunner } from "typeorm";
8+
9+
const TABLE_NAME = "d_b_personal_access_token";
10+
11+
export class PersonalAccessTokenFixExpirationTimeAutoUpdate1669892320740 implements MigrationInterface {
12+
public async up(queryRunner: QueryRunner): Promise<void> {
13+
await queryRunner.query(
14+
`ALTER TABLE ${TABLE_NAME} CHANGE expirationTime expirationTime timestamp(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6)`,
15+
);
16+
}
17+
18+
public async down(queryRunner: QueryRunner): Promise<void> {}
19+
}

0 commit comments

Comments
 (0)