mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 21:47:17 +00:00
19 lines
572 B
TypeScript
19 lines
572 B
TypeScript
import { MigrationInterface, QueryRunner, TableColumn } from 'typeorm';
|
|
|
|
export class addLastLoggedInToUserSession1718704694211 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.addColumn(
|
|
'user_sessions',
|
|
new TableColumn({
|
|
name: 'last_logged_in',
|
|
type: 'timestamp',
|
|
isNullable: false,
|
|
default: 'now()',
|
|
})
|
|
);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.dropColumn('user_sessions', 'last_logged_in');
|
|
}
|
|
}
|