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

export class GoogleCalendarLinked1736773476711 implements MigrationInterface {
  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(`
      create table google_calendar_linked (
        id integer generated by default as identity,
        account_id integer not null,
        calendar_id integer not null,
        type text not null,
        object_id integer not null,
        primary key (id),
        foreign key (account_id) references account(id) on delete cascade,
        foreign key (calendar_id) references google_calendar(id) on delete cascade
      );
    `);
  }

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