import { MigrationInterface, QueryRunner } from 'typeorm';

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

  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      `ALTER TABLE "items" RENAME COLUMN "image" TO "image_url"`,
    );
  }

  public async down(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      `ALTER TABLE "items" RENAME COLUMN "image_url" TO "image"`,
    );
  }
}
