/* eslint-disable @typescript-eslint/no-unused-vars */
/* eslint-disable @typescript-eslint/no-empty-function */
import type { MigrationInterface, QueryRunner } from 'typeorm';

export class TaskAndActivityFiles1671203263368 implements MigrationInterface {
  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(`
      create table file_link (
        id integer generated by default as identity,
        account_id integer not null,
        source_type character varying not null,
        source_id integer not null,
        file_id uuid not null,
        file_name character varying not null,
        file_size integer not null,
        file_type character varying not null,
        primary key (id),
        foreign key (account_id) references account(id) on delete cascade
      );
    `);
  }

  public async down(_queryRunner: QueryRunner): Promise<void> {}
}
