Files
online-energieausweis/prisma/migrations/20250501111512_/migration.sql
2025-05-02 10:00:44 +02:00

34 lines
1.7 KiB
PL/PgSQL

/*
Warnings:
- The values [OhnemechLüftung] on the enum `LueftungsAnlage` will be removed. If these variants are still used in the database, this will fail.
- The values [KategorieImitGeplanterDichtheitsprüfung,KategorieIIneuesGebäude,KategorieIIIGebäudebestand] on the enum `LuftDichtheit` will be removed. If these variants are still used in the database, this will fail.
- The `waerme_erzeugung_heizung_18599` column on the `BedarfsausweisWohnen` table would be dropped and recreated. This will lead to data loss if there is data in the column.
*/
-- CreateEnum
CREATE TYPE "Waermeerzeuger" AS ENUM ('standard_kessel', 'brennwert_kessel', 'niedertemperatur_kessel', 'biomasse_kessel', 'fernwaerme', 'waermepumpe', 'blockheizkraftwerk');
-- AlterEnum
BEGIN;
CREATE TYPE "LueftungsAnlage_new" AS ENUM ('Abluftanlage', 'ZuUndAbluftanlage', 'OhnemechLueftung', 'LuftHeizungsanlage', 'Zuluftsystem');
ALTER TYPE "LueftungsAnlage" RENAME TO "LueftungsAnlage_old";
ALTER TYPE "LueftungsAnlage_new" RENAME TO "LueftungsAnlage";
DROP TYPE "LueftungsAnlage_old";
COMMIT;
-- AlterEnum
BEGIN;
CREATE TYPE "LuftDichtheit_new" AS ENUM ('KategorieImitGeplanterDichtheitspruefung', 'KategorieIIneuesGebaeude', 'KategorieIIIGebaeudebestand', 'KategorieVImitoffensichtlichenUndichtheiten', 'gemessenerLuftwechseln50');
ALTER TYPE "LuftDichtheit" RENAME TO "LuftDichtheit_old";
ALTER TYPE "LuftDichtheit_new" RENAME TO "LuftDichtheit";
DROP TYPE "LuftDichtheit_old";
COMMIT;
-- AlterTable
ALTER TABLE "BedarfsausweisWohnen" DROP COLUMN "waerme_erzeugung_heizung_18599",
ADD COLUMN "waerme_erzeugung_heizung_18599" "Waermeerzeuger" NOT NULL DEFAULT 'brennwert_kessel';
-- DropEnum
DROP TYPE "Wärmeerzeuger";