/*
  Warnings:

  - The values [FINISHING,MARKING,WAITING,RUNNING] on the enum `MatchStatus` will be removed. If these variants are still used in the database, this will fail.
  - The values [OPENING,PREPARING,RUNNING,FINISHING] on the enum `TournamentStatus` will be removed. If these variants are still used in the database, this will fail.

*/
-- AlterEnum
BEGIN;
CREATE TYPE "MatchStatus_new" AS ENUM ('FINALIZADA', 'MARCADA', 'EM_ESPERA', 'EM_ANDAMENTO');
ALTER TABLE "Matches" ALTER COLUMN "match_status" DROP DEFAULT;
ALTER TABLE "Matches" ALTER COLUMN "match_status" TYPE "MatchStatus_new" USING ("match_status"::text::"MatchStatus_new");
ALTER TYPE "MatchStatus" RENAME TO "MatchStatus_old";
ALTER TYPE "MatchStatus_new" RENAME TO "MatchStatus";
DROP TYPE "MatchStatus_old";
ALTER TABLE "Matches" ALTER COLUMN "match_status" SET DEFAULT 'MARCADA';
COMMIT;

-- AlterEnum
BEGIN;
CREATE TYPE "TournamentStatus_new" AS ENUM ('ABERTO', 'PREPARANDO', 'EM ANDAMENTO', 'FINALIZADO');
ALTER TABLE "Tournament" ALTER COLUMN "tournament_status" DROP DEFAULT;
ALTER TABLE "Tournament" ALTER COLUMN "tournament_status" TYPE "TournamentStatus_new" USING ("tournament_status"::text::"TournamentStatus_new");
ALTER TYPE "TournamentStatus" RENAME TO "TournamentStatus_old";
ALTER TYPE "TournamentStatus_new" RENAME TO "TournamentStatus";
DROP TYPE "TournamentStatus_old";
ALTER TABLE "Tournament" ALTER COLUMN "tournament_status" SET DEFAULT 'ABERTO';
COMMIT;

-- AlterTable
ALTER TABLE "Matches" ALTER COLUMN "match_status" SET DEFAULT 'MARCADA';

-- AlterTable
ALTER TABLE "Tournament" ALTER COLUMN "tournament_status" SET DEFAULT 'ABERTO';
