import { MigrationInterface, QueryRunner } from 'typeorm';

export class ItemVideoAndVipPass1729072422409 implements MigrationInterface {
  name = 'ItemVideoAndVipPass1729072422409';

  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      `ALTER TABLE "items" ADD "video_url" character varying`,
    );
    await queryRunner.query(
      `ALTER TABLE "vip_categories" ADD "has_vip_pass" boolean NOT NULL DEFAULT false`,
    );
  }

  public async down(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      `ALTER TABLE "vip_categories" DROP COLUMN "has_vip_pass"`,
    );
    await queryRunner.query(`ALTER TABLE "items" DROP COLUMN "video_url"`);
  }
}
