import { MigrationInterface, QueryRunner } from 'typeorm';

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

  public async up(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      `ALTER TABLE "items" DROP CONSTRAINT "UQ_213736582899b3599acaade2cd1"`,
    );
  }

  public async down(queryRunner: QueryRunner): Promise<void> {
    await queryRunner.query(
      `ALTER TABLE "items" ADD CONSTRAINT "UQ_213736582899b3599acaade2cd1" UNIQUE ("name")`,
    );
  }
}
