mirror of
https://github.com/ToolJet/ToolJet
synced 2026-04-21 21:47:17 +00:00
* feat: trigger mail when user is mentioned in comment * reset email service * fix backspace issue * open comment on view comment clicked from email * add helper to highlight user in mail * reset mentioned input value when value turns empty in parent * fix test * use where condition + throw error * add userId * feat: add notification center (#3484) * remove commented code
63 lines
1.6 KiB
TypeScript
63 lines
1.6 KiB
TypeScript
import { MigrationInterface, QueryRunner, Table } from 'typeorm';
|
|
|
|
export class CreateCommentUsers1656312830147 implements MigrationInterface {
|
|
public async up(queryRunner: QueryRunner): Promise<void> {
|
|
await queryRunner.createTable(
|
|
new Table({
|
|
name: 'comment_users',
|
|
columns: [
|
|
{
|
|
name: 'id',
|
|
type: 'uuid',
|
|
isGenerated: true,
|
|
default: 'gen_random_uuid()',
|
|
isPrimary: true,
|
|
},
|
|
{
|
|
name: 'comment_id',
|
|
type: 'uuid',
|
|
isNullable: false,
|
|
},
|
|
{
|
|
name: 'user_id',
|
|
type: 'uuid',
|
|
isNullable: false,
|
|
},
|
|
{
|
|
name: 'is_read',
|
|
type: 'boolean',
|
|
default: false,
|
|
isNullable: true,
|
|
},
|
|
{
|
|
name: 'created_at',
|
|
type: 'timestamp',
|
|
isNullable: true,
|
|
default: 'now()',
|
|
},
|
|
{
|
|
name: 'updated_at',
|
|
type: 'timestamp',
|
|
isNullable: true,
|
|
default: 'now()',
|
|
},
|
|
],
|
|
foreignKeys: [
|
|
{
|
|
referencedTableName: 'users',
|
|
referencedColumnNames: ['id'],
|
|
columnNames: ['user_id'],
|
|
},
|
|
{
|
|
referencedTableName: 'comments',
|
|
referencedColumnNames: ['id'],
|
|
columnNames: ['comment_id'],
|
|
},
|
|
],
|
|
}),
|
|
true
|
|
);
|
|
}
|
|
|
|
public async down(queryRunner: QueryRunner): Promise<void> {}
|
|
}
|