mirror of
https://github.com/OneUptime/oneuptime.git
synced 2026-04-06 00:32:12 +02:00
chore(migration): drop jwtRefreshToken column from User and StatusPagePrivateUser tables
- remove jwtRefreshToken property from User model - add migration to drop column from User and StatusPagePrivateUser and restore it on down - register new migration in SchemaMigrations index
This commit is contained in:
@@ -300,21 +300,6 @@ class User extends UserModel {
|
||||
})
|
||||
public twoFactorAuthEnabled?: boolean = undefined;
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [],
|
||||
read: [],
|
||||
|
||||
update: [],
|
||||
})
|
||||
@TableColumn({ type: TableColumnType.ShortText })
|
||||
@Column({
|
||||
type: ColumnType.ShortText,
|
||||
length: ColumnLength.ShortText,
|
||||
nullable: true,
|
||||
unique: false,
|
||||
})
|
||||
public jwtRefreshToken?: string = undefined;
|
||||
|
||||
@ColumnAccessControl({
|
||||
create: [],
|
||||
read: [],
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
import { MigrationInterface, QueryRunner } from "typeorm";
|
||||
|
||||
export class MigrationName1762554602716 implements MigrationInterface {
|
||||
public name = 'MigrationName1762554602716'
|
||||
|
||||
public async up(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "User" DROP COLUMN "jwtRefreshToken"`);
|
||||
}
|
||||
|
||||
public async down(queryRunner: QueryRunner): Promise<void> {
|
||||
await queryRunner.query(`ALTER TABLE "User" ADD "jwtRefreshToken" character varying(100)`);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -180,6 +180,7 @@ import { MigrationName1760357680881 } from "./1760357680881-MigrationName";
|
||||
import { MigrationName1761232578396 } from "./1761232578396-MigrationName";
|
||||
import { MigrationName1761834523183 } from "./1761834523183-MigrationName";
|
||||
import { MigrationName1762181014879 } from "./1762181014879-MigrationName";
|
||||
import { MigrationName1762554602716 } from "./1762554602716-MigrationName";
|
||||
|
||||
export default [
|
||||
InitialMigration,
|
||||
@@ -364,4 +365,5 @@ export default [
|
||||
MigrationName1761232578396,
|
||||
MigrationName1761834523183,
|
||||
MigrationName1762181014879,
|
||||
MigrationName1762554602716
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user