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

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

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