From 528d4a33eb5fdb068fa5daa8dc148f55eeb8e59a Mon Sep 17 00:00:00 2001 From: Jens Cornelsen <79703163+IB-Cornelsen@users.noreply.github.com> Date: Mon, 7 Apr 2025 06:34:00 +0200 Subject: [PATCH] Preise XL angepasst --- .../migrations/20250222151858_/migration.sql | 47 -- .../20250223113449_migration/migration.sql | 47 -- .../migration.sql | 48 -- .../migration.sql | 48 -- .../20250310094927_updated/migration.sql | 49 -- .../migration.sql | 48 -- .../20250310230139_uodated/migration.sql | 49 -- .../20250310230150_default_gone/migration.sql | 48 -- .../20250312191621_gng/migration.sql | 47 -- .../migrations/20250312191859_/migration.sql | 47 -- .../migration.sql | 66 -- .../migrations/20250312210347_/migration.sql | 62 -- .../20250317233655_name_bild/migration.sql | 54 -- .../migrations/20250318212311_/migration.sql | 47 -- .../migrations/20250319160937_/migration.sql | 50 -- .../migrations/20250319214746_/migration.sql | 47 -- .../migrations/20250320120721_/migration.sql | 55 -- .../migrations/20250320120730_/migration.sql | 47 -- .../20250324191736_ausweistyp/migration.sql | 57 -- .../20250324210605_id/migration.sql | 573 ------------------ .../migrations/20250330225209_/migration.sql | 44 -- .../20250331182241_nachweise/migration.sql | 22 - .../20250405131537_mime/migration.sql | 20 - .../20250406203632_id_longer/migration.sql | 106 ---- .../migration.sql | 229 ++++--- prisma/schema/Rechnung.prisma | 3 + src/astro-typesafe-api-caller.ts | 6 +- src/components/Ausweis/Progressbar.svelte | 4 +- .../Dashboard/DashboardAusweis.svelte | 41 +- src/generated/enums.ts | 3 + src/lib/constants.ts | 30 +- src/lib/server/mail/helpers.ts | 24 +- src/modules/KundendatenModule.svelte | 6 +- 33 files changed, 214 insertions(+), 1860 deletions(-) delete mode 100644 prisma/migrations/20250222151858_/migration.sql delete mode 100644 prisma/migrations/20250223113449_migration/migration.sql delete mode 100644 prisma/migrations/20250307174552_user_verified/migration.sql delete mode 100644 prisma/migrations/20250308100529_warmwasser_anteil_bekannt/migration.sql delete mode 100644 prisma/migrations/20250310094927_updated/migration.sql delete mode 100644 prisma/migrations/20250310095844_remove_default/migration.sql delete mode 100644 prisma/migrations/20250310230139_uodated/migration.sql delete mode 100644 prisma/migrations/20250310230150_default_gone/migration.sql delete mode 100644 prisma/migrations/20250312191621_gng/migration.sql delete mode 100644 prisma/migrations/20250312191859_/migration.sql delete mode 100644 prisma/migrations/20250312210235_bedarfsausweis_gewerbe/migration.sql delete mode 100644 prisma/migrations/20250312210347_/migration.sql delete mode 100644 prisma/migrations/20250317233655_name_bild/migration.sql delete mode 100644 prisma/migrations/20250318212311_/migration.sql delete mode 100644 prisma/migrations/20250319160937_/migration.sql delete mode 100644 prisma/migrations/20250319214746_/migration.sql delete mode 100644 prisma/migrations/20250320120721_/migration.sql delete mode 100644 prisma/migrations/20250320120730_/migration.sql delete mode 100644 prisma/migrations/20250324191736_ausweistyp/migration.sql delete mode 100644 prisma/migrations/20250324210605_id/migration.sql delete mode 100644 prisma/migrations/20250330225209_/migration.sql delete mode 100644 prisma/migrations/20250331182241_nachweise/migration.sql delete mode 100644 prisma/migrations/20250405131537_mime/migration.sql delete mode 100644 prisma/migrations/20250406203632_id_longer/migration.sql rename prisma/migrations/{20250222150442_ => 20250407035945_}/migration.sql (83%) diff --git a/prisma/migrations/20250222151858_/migration.sql b/prisma/migrations/20250222151858_/migration.sql deleted file mode 100644 index 4e4efaa6..00000000 --- a/prisma/migrations/20250222151858_/migration.sql +++ /dev/null @@ -1,47 +0,0 @@ --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250223113449_migration/migration.sql b/prisma/migrations/20250223113449_migration/migration.sql deleted file mode 100644 index 4e4efaa6..00000000 --- a/prisma/migrations/20250223113449_migration/migration.sql +++ /dev/null @@ -1,47 +0,0 @@ --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250307174552_user_verified/migration.sql b/prisma/migrations/20250307174552_user_verified/migration.sql deleted file mode 100644 index adf12357..00000000 --- a/prisma/migrations/20250307174552_user_verified/migration.sql +++ /dev/null @@ -1,48 +0,0 @@ --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "benutzer" ADD COLUMN "verified" BOOLEAN NOT NULL DEFAULT false, -ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250308100529_warmwasser_anteil_bekannt/migration.sql b/prisma/migrations/20250308100529_warmwasser_anteil_bekannt/migration.sql deleted file mode 100644 index e94020be..00000000 --- a/prisma/migrations/20250308100529_warmwasser_anteil_bekannt/migration.sql +++ /dev/null @@ -1,48 +0,0 @@ --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ADD COLUMN "warmwasser_anteil_bekannt" BOOLEAN, -ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250310094927_updated/migration.sql b/prisma/migrations/20250310094927_updated/migration.sql deleted file mode 100644 index a51eb6eb..00000000 --- a/prisma/migrations/20250310094927_updated/migration.sql +++ /dev/null @@ -1,49 +0,0 @@ --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ADD COLUMN "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, -ADD COLUMN "updated_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, -ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250310095844_remove_default/migration.sql b/prisma/migrations/20250310095844_remove_default/migration.sql deleted file mode 100644 index 25058c47..00000000 --- a/prisma/migrations/20250310095844_remove_default/migration.sql +++ /dev/null @@ -1,48 +0,0 @@ --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(), -ALTER COLUMN "updated_at" DROP DEFAULT; - --- AlterTable -ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250310230139_uodated/migration.sql b/prisma/migrations/20250310230139_uodated/migration.sql deleted file mode 100644 index de317f1b..00000000 --- a/prisma/migrations/20250310230139_uodated/migration.sql +++ /dev/null @@ -1,49 +0,0 @@ --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ADD COLUMN "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, -ADD COLUMN "updated_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, -ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250310230150_default_gone/migration.sql b/prisma/migrations/20250310230150_default_gone/migration.sql deleted file mode 100644 index 5859bde1..00000000 --- a/prisma/migrations/20250310230150_default_gone/migration.sql +++ /dev/null @@ -1,48 +0,0 @@ --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(), -ALTER COLUMN "updated_at" DROP DEFAULT; - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250312191621_gng/migration.sql b/prisma/migrations/20250312191621_gng/migration.sql deleted file mode 100644 index d6f2e9e5..00000000 --- a/prisma/migrations/20250312191621_gng/migration.sql +++ /dev/null @@ -1,47 +0,0 @@ --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gng-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250312191859_/migration.sql b/prisma/migrations/20250312191859_/migration.sql deleted file mode 100644 index 4e4efaa6..00000000 --- a/prisma/migrations/20250312191859_/migration.sql +++ /dev/null @@ -1,47 +0,0 @@ --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250312210235_bedarfsausweis_gewerbe/migration.sql b/prisma/migrations/20250312210235_bedarfsausweis_gewerbe/migration.sql deleted file mode 100644 index 99b144c7..00000000 --- a/prisma/migrations/20250312210235_bedarfsausweis_gewerbe/migration.sql +++ /dev/null @@ -1,66 +0,0 @@ --- AlterEnum -ALTER TYPE "BilderKategorie" ADD VALUE 'AnlagenTechnik'; - --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ADD COLUMN "abluftanlage" BOOLEAN DEFAULT false, -ADD COLUMN "ausstellgrund" "Ausstellgrund", -ADD COLUMN "bauteilaktivierung" BOOLEAN DEFAULT false, -ADD COLUMN "bestellt" BOOLEAN DEFAULT false, -ADD COLUMN "direktheizung" BOOLEAN DEFAULT false, -ADD COLUMN "dunkelstrahler" BOOLEAN DEFAULT false, -ADD COLUMN "fussbodenheizung" BOOLEAN DEFAULT false, -ADD COLUMN "hallenheizung" BOOLEAN DEFAULT false, -ADD COLUMN "infrarotstrahler" BOOLEAN DEFAULT false, -ADD COLUMN "keller_beheizt" BOOLEAN, -ADD COLUMN "klimatisierung" BOOLEAN DEFAULT false, -ADD COLUMN "konditionierung_der_zuluft" BOOLEAN DEFAULT false, -ADD COLUMN "luftheizung" BOOLEAN DEFAULT false, -ADD COLUMN "storniert" BOOLEAN DEFAULT false, -ADD COLUMN "zu_abluftanlage" BOOLEAN DEFAULT false, -ADD COLUMN "zurueckgestellt" BOOLEAN DEFAULT false, -ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gng-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250312210347_/migration.sql b/prisma/migrations/20250312210347_/migration.sql deleted file mode 100644 index ffcf3ff6..00000000 --- a/prisma/migrations/20250312210347_/migration.sql +++ /dev/null @@ -1,62 +0,0 @@ -/* - Warnings: - - - The values [GEGNachweisBedarfsausweis] on the enum `Ausweisart` will be removed. If these variants are still used in the database, this will fail. - -*/ --- AlterEnum -BEGIN; -CREATE TYPE "Ausweisart_new" AS ENUM ('VerbrauchsausweisWohnen', 'VerbrauchsausweisGewerbe', 'BedarfsausweisWohnen', 'BedarfsausweisGewerbe', 'GEGNachweisWohnen', 'GEGNachweisGewerbe'); -ALTER TABLE "Aufnahme" ALTER COLUMN "ausweisart" TYPE "Ausweisart_new" USING ("ausweisart"::text::"Ausweisart_new"); -ALTER TYPE "Ausweisart" RENAME TO "Ausweisart_old"; -ALTER TYPE "Ausweisart_new" RENAME TO "Ausweisart"; -DROP TYPE "Ausweisart_old"; -COMMIT; - --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gng-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250317233655_name_bild/migration.sql b/prisma/migrations/20250317233655_name_bild/migration.sql deleted file mode 100644 index c31ba371..00000000 --- a/prisma/migrations/20250317233655_name_bild/migration.sql +++ /dev/null @@ -1,54 +0,0 @@ -/* - Warnings: - - - Added the required column `name` to the `Bild` table without a default value. This is not possible if the table is not empty. - -*/ --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ADD COLUMN "name" TEXT NOT NULL, -ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gng-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250318212311_/migration.sql b/prisma/migrations/20250318212311_/migration.sql deleted file mode 100644 index d6f2e9e5..00000000 --- a/prisma/migrations/20250318212311_/migration.sql +++ /dev/null @@ -1,47 +0,0 @@ --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gng-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250319160937_/migration.sql b/prisma/migrations/20250319160937_/migration.sql deleted file mode 100644 index 6cdd5411..00000000 --- a/prisma/migrations/20250319160937_/migration.sql +++ /dev/null @@ -1,50 +0,0 @@ --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ADD COLUMN "alte_ausweis_id" INTEGER, -ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gng-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ADD COLUMN "alte_ausweis_id" INTEGER, -ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ADD COLUMN "alte_ausweis_id" INTEGER, -ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250319214746_/migration.sql b/prisma/migrations/20250319214746_/migration.sql deleted file mode 100644 index d6f2e9e5..00000000 --- a/prisma/migrations/20250319214746_/migration.sql +++ /dev/null @@ -1,47 +0,0 @@ --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gng-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250320120721_/migration.sql b/prisma/migrations/20250320120721_/migration.sql deleted file mode 100644 index a2c90f6a..00000000 --- a/prisma/migrations/20250320120721_/migration.sql +++ /dev/null @@ -1,55 +0,0 @@ -/* - Warnings: - - - Added the required column `updated_at` to the `BedarfsausweisWohnen` table without a default value. This is not possible if the table is not empty. - -*/ --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ADD COLUMN "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, -ADD COLUMN "updated_at" TIMESTAMP(3) NOT NULL, -ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gng-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250320120730_/migration.sql b/prisma/migrations/20250320120730_/migration.sql deleted file mode 100644 index d6f2e9e5..00000000 --- a/prisma/migrations/20250320120730_/migration.sql +++ /dev/null @@ -1,47 +0,0 @@ --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gng-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250324191736_ausweistyp/migration.sql b/prisma/migrations/20250324191736_ausweistyp/migration.sql deleted file mode 100644 index 3e29f2ed..00000000 --- a/prisma/migrations/20250324191736_ausweistyp/migration.sql +++ /dev/null @@ -1,57 +0,0 @@ -/* - Warnings: - - - You are about to drop the column `ausweistyp` on the `Rechnung` table. All the data in the column will be lost. - -*/ --- AlterTable -ALTER TABLE "Anteilshaber" ALTER COLUMN "uid" SET DEFAULT 'ant-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Aufnahme" ALTER COLUMN "uid" SET DEFAULT 'auf-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'bag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ADD COLUMN "ausweistyp" "AusweisTyp" NOT NULL DEFAULT 'Standard', -ALTER COLUMN "uid" SET DEFAULT 'baw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Bild" ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Event" ALTER COLUMN "uid" SET DEFAULT 'evt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGEinpreisung" ALTER COLUMN "uid" SET DEFAULT 'gge-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ALTER COLUMN "uid" SET DEFAULT 'gng-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ALTER COLUMN "uid" SET DEFAULT 'gnw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Objekt" ALTER COLUMN "uid" SET DEFAULT 'obj-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Rechnung" DROP COLUMN "ausweistyp", -ALTER COLUMN "uid" SET DEFAULT 'inv-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Tickets" ALTER COLUMN "uid" SET DEFAULT 'tkt-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "uid" SET DEFAULT 'pln-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ADD COLUMN "ausweistyp" "AusweisTyp" NOT NULL DEFAULT 'Standard', -ALTER COLUMN "uid" SET DEFAULT 'vag-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" ADD COLUMN "ausweistyp" "AusweisTyp" NOT NULL DEFAULT 'Standard', -ALTER COLUMN "uid" SET DEFAULT 'vaw-' || gen_random_uuid(); - --- AlterTable -ALTER TABLE "benutzer" ALTER COLUMN "uid" SET DEFAULT 'usr-' || gen_random_uuid(); diff --git a/prisma/migrations/20250324210605_id/migration.sql b/prisma/migrations/20250324210605_id/migration.sql deleted file mode 100644 index e4be4967..00000000 --- a/prisma/migrations/20250324210605_id/migration.sql +++ /dev/null @@ -1,573 +0,0 @@ -/* - Warnings: - - - The primary key for the `Anteilshaber` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to drop the column `uid` on the `Anteilshaber` table. All the data in the column will be lost. - - You are about to alter the column `id` on the `Anteilshaber` table. The data in that column could be lost. The data in that column will be cast from `Integer` to `VarChar(8)`. - - The primary key for the `ApiRequests` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to alter the column `id` on the `ApiRequests` table. The data in that column could be lost. The data in that column will be cast from `Integer` to `VarChar(8)`. - - The primary key for the `Aufnahme` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to drop the column `uid` on the `Aufnahme` table. All the data in the column will be lost. - - You are about to alter the column `id` on the `Aufnahme` table. The data in that column could be lost. The data in that column will be cast from `Integer` to `VarChar(8)`. - - The primary key for the `BedarfsausweisGewerbe` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to drop the column `uid` on the `BedarfsausweisGewerbe` table. All the data in the column will be lost. - - You are about to alter the column `id` on the `BedarfsausweisGewerbe` table. The data in that column could be lost. The data in that column will be cast from `Integer` to `VarChar(8)`. - - The primary key for the `BedarfsausweisWohnen` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to drop the column `uid` on the `BedarfsausweisWohnen` table. All the data in the column will be lost. - - You are about to alter the column `id` on the `BedarfsausweisWohnen` table. The data in that column could be lost. The data in that column will be cast from `Integer` to `VarChar(8)`. - - The primary key for the `Bild` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to alter the column `id` on the `Bild` table. The data in that column could be lost. The data in that column will be cast from `Integer` to `VarChar(8)`. - - The primary key for the `Event` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to drop the column `uid` on the `Event` table. All the data in the column will be lost. - - You are about to alter the column `id` on the `Event` table. The data in that column could be lost. The data in that column will be cast from `Integer` to `VarChar(8)`. - - The primary key for the `GEGEinpreisung` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to drop the column `uid` on the `GEGEinpreisung` table. All the data in the column will be lost. - - You are about to alter the column `id` on the `GEGEinpreisung` table. The data in that column could be lost. The data in that column will be cast from `Integer` to `VarChar(8)`. - - The primary key for the `GEGNachweisGewerbe` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to drop the column `uid` on the `GEGNachweisGewerbe` table. All the data in the column will be lost. - - You are about to alter the column `id` on the `GEGNachweisGewerbe` table. The data in that column could be lost. The data in that column will be cast from `Integer` to `VarChar(8)`. - - The primary key for the `GEGNachweisWohnen` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to drop the column `uid` on the `GEGNachweisWohnen` table. All the data in the column will be lost. - - You are about to alter the column `id` on the `GEGNachweisWohnen` table. The data in that column could be lost. The data in that column will be cast from `Integer` to `VarChar(8)`. - - The primary key for the `Objekt` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to drop the column `uid` on the `Objekt` table. All the data in the column will be lost. - - You are about to alter the column `id` on the `Objekt` table. The data in that column could be lost. The data in that column will be cast from `Integer` to `VarChar(8)`. - - The primary key for the `Rechnung` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to drop the column `uid` on the `Rechnung` table. All the data in the column will be lost. - - You are about to alter the column `id` on the `Rechnung` table. The data in that column could be lost. The data in that column will be cast from `Integer` to `VarChar(8)`. - - The primary key for the `Tickets` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to drop the column `uid` on the `Tickets` table. All the data in the column will be lost. - - You are about to alter the column `id` on the `Tickets` table. The data in that column could be lost. The data in that column will be cast from `Integer` to `VarChar(8)`. - - The primary key for the `Unterlage` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to drop the column `uid` on the `Unterlage` table. All the data in the column will be lost. - - You are about to alter the column `id` on the `Unterlage` table. The data in that column could be lost. The data in that column will be cast from `Integer` to `VarChar(8)`. - - The primary key for the `VerbrauchsausweisGewerbe` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to drop the column `uid` on the `VerbrauchsausweisGewerbe` table. All the data in the column will be lost. - - You are about to alter the column `id` on the `VerbrauchsausweisGewerbe` table. The data in that column could be lost. The data in that column will be cast from `Integer` to `VarChar(8)`. - - The primary key for the `VerbrauchsausweisWohnen` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to drop the column `uid` on the `VerbrauchsausweisWohnen` table. All the data in the column will be lost. - - You are about to alter the column `id` on the `VerbrauchsausweisWohnen` table. The data in that column could be lost. The data in that column will be cast from `Integer` to `VarChar(8)`. - - The primary key for the `benutzer` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to drop the column `uid` on the `benutzer` table. All the data in the column will be lost. - - You are about to alter the column `id` on the `benutzer` table. The data in that column could be lost. The data in that column will be cast from `Integer` to `VarChar(8)`. - - A unique constraint covering the columns `[id]` on the table `Anteilshaber` will be added. If there are existing duplicate values, this will fail. - - A unique constraint covering the columns `[id]` on the table `ApiRequests` will be added. If there are existing duplicate values, this will fail. - - A unique constraint covering the columns `[id]` on the table `Aufnahme` will be added. If there are existing duplicate values, this will fail. - - A unique constraint covering the columns `[id]` on the table `BedarfsausweisGewerbe` will be added. If there are existing duplicate values, this will fail. - - A unique constraint covering the columns `[id]` on the table `BedarfsausweisWohnen` will be added. If there are existing duplicate values, this will fail. - - A unique constraint covering the columns `[id]` on the table `Bild` will be added. If there are existing duplicate values, this will fail. - - A unique constraint covering the columns `[id]` on the table `Event` will be added. If there are existing duplicate values, this will fail. - - A unique constraint covering the columns `[id]` on the table `GEGEinpreisung` will be added. If there are existing duplicate values, this will fail. - - A unique constraint covering the columns `[id]` on the table `GEGNachweisGewerbe` will be added. If there are existing duplicate values, this will fail. - - A unique constraint covering the columns `[id]` on the table `GEGNachweisWohnen` will be added. If there are existing duplicate values, this will fail. - - A unique constraint covering the columns `[id]` on the table `Objekt` will be added. If there are existing duplicate values, this will fail. - - A unique constraint covering the columns `[id]` on the table `Rechnung` will be added. If there are existing duplicate values, this will fail. - - A unique constraint covering the columns `[id]` on the table `Tickets` will be added. If there are existing duplicate values, this will fail. - - A unique constraint covering the columns `[id]` on the table `Unterlage` will be added. If there are existing duplicate values, this will fail. - - A unique constraint covering the columns `[id]` on the table `VerbrauchsausweisGewerbe` will be added. If there are existing duplicate values, this will fail. - - A unique constraint covering the columns `[id]` on the table `VerbrauchsausweisWohnen` will be added. If there are existing duplicate values, this will fail. - - A unique constraint covering the columns `[id]` on the table `benutzer` will be added. If there are existing duplicate values, this will fail. - -*/ --- DropForeignKey -ALTER TABLE "Anteilshaber" DROP CONSTRAINT "Anteilshaber_benutzer_id_fkey"; - --- DropForeignKey -ALTER TABLE "Anteilshaber" DROP CONSTRAINT "Anteilshaber_objekt_id_fkey"; - --- DropForeignKey -ALTER TABLE "ApiRequests" DROP CONSTRAINT "ApiRequests_user_id_fkey"; - --- DropForeignKey -ALTER TABLE "Aufnahme" DROP CONSTRAINT "Aufnahme_benutzer_id_fkey"; - --- DropForeignKey -ALTER TABLE "Aufnahme" DROP CONSTRAINT "Aufnahme_objekt_id_fkey"; - --- DropForeignKey -ALTER TABLE "BedarfsausweisGewerbe" DROP CONSTRAINT "BedarfsausweisGewerbe_aufnahme_id_fkey"; - --- DropForeignKey -ALTER TABLE "BedarfsausweisGewerbe" DROP CONSTRAINT "BedarfsausweisGewerbe_benutzer_id_fkey"; - --- DropForeignKey -ALTER TABLE "BedarfsausweisGewerbe" DROP CONSTRAINT "BedarfsausweisGewerbe_geg_einpreisung_id_fkey"; - --- DropForeignKey -ALTER TABLE "BedarfsausweisGewerbe" DROP CONSTRAINT "BedarfsausweisGewerbe_rechnung_id_fkey"; - --- DropForeignKey -ALTER TABLE "BedarfsausweisWohnen" DROP CONSTRAINT "BedarfsausweisWohnen_aufnahme_id_fkey"; - --- DropForeignKey -ALTER TABLE "BedarfsausweisWohnen" DROP CONSTRAINT "BedarfsausweisWohnen_benutzer_id_fkey"; - --- DropForeignKey -ALTER TABLE "BedarfsausweisWohnen" DROP CONSTRAINT "BedarfsausweisWohnen_rechnung_id_fkey"; - --- DropForeignKey -ALTER TABLE "Bild" DROP CONSTRAINT "Bild_aufnahme_id_fkey"; - --- DropForeignKey -ALTER TABLE "Event" DROP CONSTRAINT "Event_aufnahme_id_fkey"; - --- DropForeignKey -ALTER TABLE "Event" DROP CONSTRAINT "Event_benutzer_id_fkey"; - --- DropForeignKey -ALTER TABLE "GEGEinpreisung" DROP CONSTRAINT "GEGEinpreisung_benutzer_id_fkey"; - --- DropForeignKey -ALTER TABLE "GEGNachweisGewerbe" DROP CONSTRAINT "GEGNachweisGewerbe_aufnahme_id_fkey"; - --- DropForeignKey -ALTER TABLE "GEGNachweisGewerbe" DROP CONSTRAINT "GEGNachweisGewerbe_benutzer_id_fkey"; - --- DropForeignKey -ALTER TABLE "GEGNachweisGewerbe" DROP CONSTRAINT "GEGNachweisGewerbe_geg_einpreisung_id_fkey"; - --- DropForeignKey -ALTER TABLE "GEGNachweisGewerbe" DROP CONSTRAINT "GEGNachweisGewerbe_rechnung_id_fkey"; - --- DropForeignKey -ALTER TABLE "GEGNachweisWohnen" DROP CONSTRAINT "GEGNachweisWohnen_aufnahme_id_fkey"; - --- DropForeignKey -ALTER TABLE "GEGNachweisWohnen" DROP CONSTRAINT "GEGNachweisWohnen_benutzer_id_fkey"; - --- DropForeignKey -ALTER TABLE "GEGNachweisWohnen" DROP CONSTRAINT "GEGNachweisWohnen_geg_einpreisung_id_fkey"; - --- DropForeignKey -ALTER TABLE "GEGNachweisWohnen" DROP CONSTRAINT "GEGNachweisWohnen_rechnung_id_fkey"; - --- DropForeignKey -ALTER TABLE "Objekt" DROP CONSTRAINT "Objekt_benutzer_id_fkey"; - --- DropForeignKey -ALTER TABLE "Rechnung" DROP CONSTRAINT "Rechnung_benutzer_id_fkey"; - --- DropForeignKey -ALTER TABLE "RefreshTokens" DROP CONSTRAINT "RefreshTokens_benutzer_id_fkey"; - --- DropForeignKey -ALTER TABLE "Tickets" DROP CONSTRAINT "Tickets_bearbeiter_id_fkey"; - --- DropForeignKey -ALTER TABLE "Tickets" DROP CONSTRAINT "Tickets_benutzer_id_fkey"; - --- DropForeignKey -ALTER TABLE "Unterlage" DROP CONSTRAINT "Unterlage_aufnahme_id_fkey"; - --- DropForeignKey -ALTER TABLE "VerbrauchsausweisGewerbe" DROP CONSTRAINT "VerbrauchsausweisGewerbe_aufnahme_id_fkey"; - --- DropForeignKey -ALTER TABLE "VerbrauchsausweisGewerbe" DROP CONSTRAINT "VerbrauchsausweisGewerbe_benutzer_id_fkey"; - --- DropForeignKey -ALTER TABLE "VerbrauchsausweisGewerbe" DROP CONSTRAINT "VerbrauchsausweisGewerbe_rechnung_id_fkey"; - --- DropForeignKey -ALTER TABLE "VerbrauchsausweisWohnen" DROP CONSTRAINT "VerbrauchsausweisWohnen_aufnahme_id_fkey"; - --- DropForeignKey -ALTER TABLE "VerbrauchsausweisWohnen" DROP CONSTRAINT "VerbrauchsausweisWohnen_benutzer_id_fkey"; - --- DropForeignKey -ALTER TABLE "VerbrauchsausweisWohnen" DROP CONSTRAINT "VerbrauchsausweisWohnen_rechnung_id_fkey"; - --- DropForeignKey -ALTER TABLE "documenttemplates" DROP CONSTRAINT "benutzer_fk"; - --- DropForeignKey -ALTER TABLE "tokens" DROP CONSTRAINT "fk_benutzer_tokens_user_id"; - --- DropIndex -DROP INDEX "Anteilshaber_uid_key"; - --- DropIndex -DROP INDEX "Aufnahme_uid_key"; - --- DropIndex -DROP INDEX "BedarfsausweisGewerbe_uid_key"; - --- DropIndex -DROP INDEX "BedarfsausweisWohnen_uid_key"; - --- DropIndex -DROP INDEX "Event_uid_key"; - --- DropIndex -DROP INDEX "GEGEinpreisung_uid_key"; - --- DropIndex -DROP INDEX "GEGNachweisGewerbe_uid_key"; - --- DropIndex -DROP INDEX "GEGNachweisWohnen_uid_key"; - --- DropIndex -DROP INDEX "Objekt_uid_key"; - --- DropIndex -DROP INDEX "Rechnung_uid_key"; - --- DropIndex -DROP INDEX "Tickets_uid_key"; - --- DropIndex -DROP INDEX "Unterlage_uid_key"; - --- DropIndex -DROP INDEX "VerbrauchsausweisGewerbe_uid_key"; - --- DropIndex -DROP INDEX "VerbrauchsausweisWohnen_uid_key"; - --- DropIndex -DROP INDEX "benutzer_uid_key"; - --- AlterTable -ALTER TABLE "Anteilshaber" DROP CONSTRAINT "Anteilshaber_pkey", -DROP COLUMN "uid", -ALTER COLUMN "id" DROP DEFAULT, -ALTER COLUMN "id" SET DATA TYPE VARCHAR(8), -ALTER COLUMN "benutzer_id" SET DATA TYPE TEXT, -ALTER COLUMN "objekt_id" SET DATA TYPE TEXT, -ADD CONSTRAINT "Anteilshaber_pkey" PRIMARY KEY ("id"); -DROP SEQUENCE "Anteilshaber_id_seq"; - --- AlterTable -ALTER TABLE "ApiRequests" DROP CONSTRAINT "ApiRequests_pkey", -ALTER COLUMN "id" DROP DEFAULT, -ALTER COLUMN "id" SET DATA TYPE VARCHAR(8), -ALTER COLUMN "user_id" SET DATA TYPE TEXT, -ADD CONSTRAINT "ApiRequests_pkey" PRIMARY KEY ("id"); -DROP SEQUENCE "ApiRequests_id_seq"; - --- AlterTable -ALTER TABLE "Aufnahme" DROP CONSTRAINT "Aufnahme_pkey", -DROP COLUMN "uid", -ALTER COLUMN "id" DROP DEFAULT, -ALTER COLUMN "id" SET DATA TYPE VARCHAR(8), -ALTER COLUMN "benutzer_id" SET DATA TYPE TEXT, -ALTER COLUMN "objekt_id" SET DATA TYPE TEXT, -ADD CONSTRAINT "Aufnahme_pkey" PRIMARY KEY ("id"); -DROP SEQUENCE "Aufnahme_id_seq"; - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" DROP CONSTRAINT "BedarfsausweisGewerbe_pkey", -DROP COLUMN "uid", -ALTER COLUMN "id" DROP DEFAULT, -ALTER COLUMN "id" SET DATA TYPE VARCHAR(8), -ALTER COLUMN "benutzer_id" SET DATA TYPE TEXT, -ALTER COLUMN "aufnahme_id" SET DATA TYPE TEXT, -ALTER COLUMN "rechnung_id" SET DATA TYPE TEXT, -ALTER COLUMN "geg_einpreisung_id" SET DATA TYPE TEXT, -ADD CONSTRAINT "BedarfsausweisGewerbe_pkey" PRIMARY KEY ("id"); -DROP SEQUENCE "BedarfsausweisGewerbe_id_seq"; - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" DROP CONSTRAINT "BedarfsausweisWohnen_pkey", -DROP COLUMN "uid", -ALTER COLUMN "id" DROP DEFAULT, -ALTER COLUMN "id" SET DATA TYPE VARCHAR(8), -ALTER COLUMN "benutzer_id" SET DATA TYPE TEXT, -ALTER COLUMN "rechnung_id" SET DATA TYPE TEXT, -ALTER COLUMN "aufnahme_id" SET DATA TYPE TEXT, -ADD CONSTRAINT "BedarfsausweisWohnen_pkey" PRIMARY KEY ("id"); -DROP SEQUENCE "BedarfsausweisWohnen_id_seq"; - --- AlterTable -ALTER TABLE "Bild" DROP CONSTRAINT "Bild_pkey", -ALTER COLUMN "id" DROP DEFAULT, -ALTER COLUMN "id" SET DATA TYPE VARCHAR(8), -ALTER COLUMN "uid" SET DEFAULT 'img-' || gen_random_uuid(), -ALTER COLUMN "aufnahme_id" SET DATA TYPE TEXT, -ADD CONSTRAINT "Bild_pkey" PRIMARY KEY ("id"); -DROP SEQUENCE "Bild_id_seq"; - --- AlterTable -ALTER TABLE "Event" DROP CONSTRAINT "Event_pkey", -DROP COLUMN "uid", -ALTER COLUMN "id" DROP DEFAULT, -ALTER COLUMN "id" SET DATA TYPE VARCHAR(8), -ALTER COLUMN "aufnahme_id" SET DATA TYPE TEXT, -ALTER COLUMN "benutzer_id" SET DATA TYPE TEXT, -ADD CONSTRAINT "Event_pkey" PRIMARY KEY ("id"); -DROP SEQUENCE "Event_id_seq"; - --- AlterTable -ALTER TABLE "GEGEinpreisung" DROP CONSTRAINT "GEGEinpreisung_pkey", -DROP COLUMN "uid", -ALTER COLUMN "id" DROP DEFAULT, -ALTER COLUMN "id" SET DATA TYPE VARCHAR(8), -ALTER COLUMN "benutzer_id" SET DATA TYPE TEXT, -ADD CONSTRAINT "GEGEinpreisung_pkey" PRIMARY KEY ("id"); -DROP SEQUENCE "GEGEinpreisung_id_seq"; - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" DROP CONSTRAINT "GEGNachweisGewerbe_pkey", -DROP COLUMN "uid", -ALTER COLUMN "id" DROP DEFAULT, -ALTER COLUMN "id" SET DATA TYPE VARCHAR(8), -ALTER COLUMN "benutzer_id" SET DATA TYPE TEXT, -ALTER COLUMN "aufnahme_id" SET DATA TYPE TEXT, -ALTER COLUMN "rechnung_id" SET DATA TYPE TEXT, -ALTER COLUMN "geg_einpreisung_id" SET DATA TYPE TEXT, -ADD CONSTRAINT "GEGNachweisGewerbe_pkey" PRIMARY KEY ("id"); -DROP SEQUENCE "GEGNachweisGewerbe_id_seq"; - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" DROP CONSTRAINT "GEGNachweisWohnen_pkey", -DROP COLUMN "uid", -ALTER COLUMN "id" DROP DEFAULT, -ALTER COLUMN "id" SET DATA TYPE VARCHAR(8), -ALTER COLUMN "benutzer_id" SET DATA TYPE TEXT, -ALTER COLUMN "aufnahme_id" SET DATA TYPE TEXT, -ALTER COLUMN "rechnung_id" SET DATA TYPE TEXT, -ALTER COLUMN "geg_einpreisung_id" SET DATA TYPE TEXT, -ADD CONSTRAINT "GEGNachweisWohnen_pkey" PRIMARY KEY ("id"); -DROP SEQUENCE "GEGNachweisWohnen_id_seq"; - --- AlterTable -ALTER TABLE "Objekt" DROP CONSTRAINT "Objekt_pkey", -DROP COLUMN "uid", -ALTER COLUMN "id" DROP DEFAULT, -ALTER COLUMN "id" SET DATA TYPE VARCHAR(8), -ALTER COLUMN "benutzer_id" SET DATA TYPE TEXT, -ADD CONSTRAINT "Objekt_pkey" PRIMARY KEY ("id"); -DROP SEQUENCE "Objekt_id_seq"; - --- AlterTable -ALTER TABLE "Rechnung" DROP CONSTRAINT "Rechnung_pkey", -DROP COLUMN "uid", -ALTER COLUMN "id" DROP DEFAULT, -ALTER COLUMN "id" SET DATA TYPE VARCHAR(8), -ALTER COLUMN "benutzer_id" SET DATA TYPE TEXT, -ADD CONSTRAINT "Rechnung_pkey" PRIMARY KEY ("id"); -DROP SEQUENCE "Rechnung_id_seq"; - --- AlterTable -ALTER TABLE "RefreshTokens" ALTER COLUMN "benutzer_id" SET DATA TYPE TEXT; - --- AlterTable -ALTER TABLE "Tickets" DROP CONSTRAINT "Tickets_pkey", -DROP COLUMN "uid", -ALTER COLUMN "id" DROP DEFAULT, -ALTER COLUMN "id" SET DATA TYPE VARCHAR(8), -ALTER COLUMN "benutzer_id" SET DATA TYPE TEXT, -ALTER COLUMN "bearbeiter_id" SET DATA TYPE TEXT, -ADD CONSTRAINT "Tickets_pkey" PRIMARY KEY ("id"); -DROP SEQUENCE "Tickets_id_seq"; - --- AlterTable -ALTER TABLE "Unterlage" DROP CONSTRAINT "Unterlage_pkey", -DROP COLUMN "uid", -ALTER COLUMN "id" DROP DEFAULT, -ALTER COLUMN "id" SET DATA TYPE VARCHAR(8), -ALTER COLUMN "aufnahme_id" SET DATA TYPE TEXT, -ADD CONSTRAINT "Unterlage_pkey" PRIMARY KEY ("id"); -DROP SEQUENCE "Unterlage_id_seq"; - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" DROP CONSTRAINT "VerbrauchsausweisGewerbe_pkey", -DROP COLUMN "uid", -ALTER COLUMN "id" DROP DEFAULT, -ALTER COLUMN "id" SET DATA TYPE VARCHAR(8), -ALTER COLUMN "benutzer_id" SET DATA TYPE TEXT, -ALTER COLUMN "rechnung_id" SET DATA TYPE TEXT, -ALTER COLUMN "aufnahme_id" SET DATA TYPE TEXT, -ADD CONSTRAINT "VerbrauchsausweisGewerbe_pkey" PRIMARY KEY ("id"); -DROP SEQUENCE "VerbrauchsausweisGewerbe_id_seq"; - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" DROP CONSTRAINT "VerbrauchsausweisWohnen_pkey", -DROP COLUMN "uid", -ALTER COLUMN "id" DROP DEFAULT, -ALTER COLUMN "id" SET DATA TYPE VARCHAR(8), -ALTER COLUMN "benutzer_id" SET DATA TYPE TEXT, -ALTER COLUMN "rechnung_id" SET DATA TYPE TEXT, -ALTER COLUMN "aufnahme_id" SET DATA TYPE TEXT, -ADD CONSTRAINT "VerbrauchsausweisWohnen_pkey" PRIMARY KEY ("id"); -DROP SEQUENCE "VerbrauchsausweisWohnen_id_seq"; - --- AlterTable -ALTER TABLE "benutzer" DROP CONSTRAINT "benutzer_pkey", -DROP COLUMN "uid", -ALTER COLUMN "id" DROP DEFAULT, -ALTER COLUMN "id" SET DATA TYPE VARCHAR(8), -ADD CONSTRAINT "benutzer_pkey" PRIMARY KEY ("id"); -DROP SEQUENCE "benutzer_id_seq"; - --- AlterTable -ALTER TABLE "documenttemplates" ALTER COLUMN "user_id" SET DATA TYPE TEXT; - --- AlterTable -ALTER TABLE "tokens" ALTER COLUMN "user_id" SET DATA TYPE TEXT; - --- CreateIndex -CREATE UNIQUE INDEX "Anteilshaber_id_key" ON "Anteilshaber"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "ApiRequests_id_key" ON "ApiRequests"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "Aufnahme_id_key" ON "Aufnahme"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "BedarfsausweisGewerbe_id_key" ON "BedarfsausweisGewerbe"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "BedarfsausweisWohnen_id_key" ON "BedarfsausweisWohnen"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "Bild_id_key" ON "Bild"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "Event_id_key" ON "Event"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "GEGEinpreisung_id_key" ON "GEGEinpreisung"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "GEGNachweisGewerbe_id_key" ON "GEGNachweisGewerbe"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "GEGNachweisWohnen_id_key" ON "GEGNachweisWohnen"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "Objekt_id_key" ON "Objekt"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "Rechnung_id_key" ON "Rechnung"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "Tickets_id_key" ON "Tickets"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "Unterlage_id_key" ON "Unterlage"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "VerbrauchsausweisGewerbe_id_key" ON "VerbrauchsausweisGewerbe"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "VerbrauchsausweisWohnen_id_key" ON "VerbrauchsausweisWohnen"("id"); - --- CreateIndex -CREATE UNIQUE INDEX "benutzer_id_key" ON "benutzer"("id"); - --- AddForeignKey -ALTER TABLE "Anteilshaber" ADD CONSTRAINT "Anteilshaber_benutzer_id_fkey" FOREIGN KEY ("benutzer_id") REFERENCES "benutzer"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "Anteilshaber" ADD CONSTRAINT "Anteilshaber_objekt_id_fkey" FOREIGN KEY ("objekt_id") REFERENCES "Objekt"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "ApiRequests" ADD CONSTRAINT "ApiRequests_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "benutzer"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "Aufnahme" ADD CONSTRAINT "Aufnahme_benutzer_id_fkey" FOREIGN KEY ("benutzer_id") REFERENCES "benutzer"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "Aufnahme" ADD CONSTRAINT "Aufnahme_objekt_id_fkey" FOREIGN KEY ("objekt_id") REFERENCES "Objekt"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "BedarfsausweisGewerbe" ADD CONSTRAINT "BedarfsausweisGewerbe_benutzer_id_fkey" FOREIGN KEY ("benutzer_id") REFERENCES "benutzer"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "BedarfsausweisGewerbe" ADD CONSTRAINT "BedarfsausweisGewerbe_aufnahme_id_fkey" FOREIGN KEY ("aufnahme_id") REFERENCES "Aufnahme"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "BedarfsausweisGewerbe" ADD CONSTRAINT "BedarfsausweisGewerbe_rechnung_id_fkey" FOREIGN KEY ("rechnung_id") REFERENCES "Rechnung"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "BedarfsausweisGewerbe" ADD CONSTRAINT "BedarfsausweisGewerbe_geg_einpreisung_id_fkey" FOREIGN KEY ("geg_einpreisung_id") REFERENCES "GEGEinpreisung"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "BedarfsausweisWohnen" ADD CONSTRAINT "BedarfsausweisWohnen_benutzer_id_fkey" FOREIGN KEY ("benutzer_id") REFERENCES "benutzer"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "BedarfsausweisWohnen" ADD CONSTRAINT "BedarfsausweisWohnen_rechnung_id_fkey" FOREIGN KEY ("rechnung_id") REFERENCES "Rechnung"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "BedarfsausweisWohnen" ADD CONSTRAINT "BedarfsausweisWohnen_aufnahme_id_fkey" FOREIGN KEY ("aufnahme_id") REFERENCES "Aufnahme"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "Bild" ADD CONSTRAINT "Bild_aufnahme_id_fkey" FOREIGN KEY ("aufnahme_id") REFERENCES "Aufnahme"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "Event" ADD CONSTRAINT "Event_aufnahme_id_fkey" FOREIGN KEY ("aufnahme_id") REFERENCES "Aufnahme"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "Event" ADD CONSTRAINT "Event_benutzer_id_fkey" FOREIGN KEY ("benutzer_id") REFERENCES "benutzer"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "GEGEinpreisung" ADD CONSTRAINT "GEGEinpreisung_benutzer_id_fkey" FOREIGN KEY ("benutzer_id") REFERENCES "benutzer"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "GEGNachweisGewerbe" ADD CONSTRAINT "GEGNachweisGewerbe_benutzer_id_fkey" FOREIGN KEY ("benutzer_id") REFERENCES "benutzer"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "GEGNachweisGewerbe" ADD CONSTRAINT "GEGNachweisGewerbe_aufnahme_id_fkey" FOREIGN KEY ("aufnahme_id") REFERENCES "Aufnahme"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "GEGNachweisGewerbe" ADD CONSTRAINT "GEGNachweisGewerbe_rechnung_id_fkey" FOREIGN KEY ("rechnung_id") REFERENCES "Rechnung"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "GEGNachweisGewerbe" ADD CONSTRAINT "GEGNachweisGewerbe_geg_einpreisung_id_fkey" FOREIGN KEY ("geg_einpreisung_id") REFERENCES "GEGEinpreisung"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "GEGNachweisWohnen" ADD CONSTRAINT "GEGNachweisWohnen_benutzer_id_fkey" FOREIGN KEY ("benutzer_id") REFERENCES "benutzer"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "GEGNachweisWohnen" ADD CONSTRAINT "GEGNachweisWohnen_aufnahme_id_fkey" FOREIGN KEY ("aufnahme_id") REFERENCES "Aufnahme"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "GEGNachweisWohnen" ADD CONSTRAINT "GEGNachweisWohnen_rechnung_id_fkey" FOREIGN KEY ("rechnung_id") REFERENCES "Rechnung"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "GEGNachweisWohnen" ADD CONSTRAINT "GEGNachweisWohnen_geg_einpreisung_id_fkey" FOREIGN KEY ("geg_einpreisung_id") REFERENCES "GEGEinpreisung"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "Objekt" ADD CONSTRAINT "Objekt_benutzer_id_fkey" FOREIGN KEY ("benutzer_id") REFERENCES "benutzer"("id") ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Rechnung" ADD CONSTRAINT "Rechnung_benutzer_id_fkey" FOREIGN KEY ("benutzer_id") REFERENCES "benutzer"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "RefreshTokens" ADD CONSTRAINT "RefreshTokens_benutzer_id_fkey" FOREIGN KEY ("benutzer_id") REFERENCES "benutzer"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Tickets" ADD CONSTRAINT "Tickets_benutzer_id_fkey" FOREIGN KEY ("benutzer_id") REFERENCES "benutzer"("id") ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Tickets" ADD CONSTRAINT "Tickets_bearbeiter_id_fkey" FOREIGN KEY ("bearbeiter_id") REFERENCES "benutzer"("id") ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "Unterlage" ADD CONSTRAINT "Unterlage_aufnahme_id_fkey" FOREIGN KEY ("aufnahme_id") REFERENCES "Aufnahme"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "VerbrauchsausweisGewerbe" ADD CONSTRAINT "VerbrauchsausweisGewerbe_benutzer_id_fkey" FOREIGN KEY ("benutzer_id") REFERENCES "benutzer"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "VerbrauchsausweisGewerbe" ADD CONSTRAINT "VerbrauchsausweisGewerbe_rechnung_id_fkey" FOREIGN KEY ("rechnung_id") REFERENCES "Rechnung"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "VerbrauchsausweisGewerbe" ADD CONSTRAINT "VerbrauchsausweisGewerbe_aufnahme_id_fkey" FOREIGN KEY ("aufnahme_id") REFERENCES "Aufnahme"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "VerbrauchsausweisWohnen" ADD CONSTRAINT "VerbrauchsausweisWohnen_benutzer_id_fkey" FOREIGN KEY ("benutzer_id") REFERENCES "benutzer"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "VerbrauchsausweisWohnen" ADD CONSTRAINT "VerbrauchsausweisWohnen_rechnung_id_fkey" FOREIGN KEY ("rechnung_id") REFERENCES "Rechnung"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "VerbrauchsausweisWohnen" ADD CONSTRAINT "VerbrauchsausweisWohnen_aufnahme_id_fkey" FOREIGN KEY ("aufnahme_id") REFERENCES "Aufnahme"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE "documenttemplates" ADD CONSTRAINT "benutzer_fk" FOREIGN KEY ("user_id") REFERENCES "benutzer"("id") ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE "tokens" ADD CONSTRAINT "fk_benutzer_tokens_user_id" FOREIGN KEY ("user_id") REFERENCES "benutzer"("id") ON DELETE NO ACTION ON UPDATE NO ACTION; diff --git a/prisma/migrations/20250330225209_/migration.sql b/prisma/migrations/20250330225209_/migration.sql deleted file mode 100644 index cd49940e..00000000 --- a/prisma/migrations/20250330225209_/migration.sql +++ /dev/null @@ -1,44 +0,0 @@ -/* - Warnings: - - - You are about to drop the column `ausstellungsdatum` on the `Aufnahme` table. All the data in the column will be lost. - - You are about to drop the column `ausweisart` on the `Aufnahme` table. All the data in the column will be lost. - - You are about to drop the column `boxpruefung` on the `Aufnahme` table. All the data in the column will be lost. - - You are about to drop the column `brennstoff_1` on the `Aufnahme` table. All the data in the column will be lost. - - You are about to drop the column `brennstoff_2` on the `Aufnahme` table. All the data in the column will be lost. - - You are about to drop the column `energieeffizienzklasse` on the `Aufnahme` table. All the data in the column will be lost. - - You are about to drop the column `uid` on the `Bild` table. All the data in the column will be lost. - - You are about to drop the column `keller_beheizt` on the `VerbrauchsausweisWohnen` table. All the data in the column will be lost. - -*/ --- DropIndex -DROP INDEX "Bild_uid_key"; - --- AlterTable -ALTER TABLE "Aufnahme" DROP COLUMN "ausstellungsdatum", -DROP COLUMN "ausweisart", -DROP COLUMN "boxpruefung", -DROP COLUMN "brennstoff_1", -DROP COLUMN "brennstoff_2", -DROP COLUMN "energieeffizienzklasse"; - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" ADD COLUMN "ausstellungsdatum" TIMESTAMP(3), -ADD COLUMN "boxpruefung" BOOLEAN DEFAULT false, -ADD COLUMN "energieeffizienzklasse" VARCHAR(5); - --- AlterTable -ALTER TABLE "Bild" DROP COLUMN "uid"; - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" ADD COLUMN "ausstellungsdatum" TIMESTAMP(3), -ADD COLUMN "boxpruefung" BOOLEAN DEFAULT false, -ADD COLUMN "energieeffizienzklasse" VARCHAR(5); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" DROP COLUMN "keller_beheizt", -ADD COLUMN "ausstellungsdatum" TIMESTAMP(3), -ADD COLUMN "boxpruefung" BOOLEAN DEFAULT false, -ADD COLUMN "brennstoff_1" VARCHAR(50), -ADD COLUMN "brennstoff_2" VARCHAR(50), -ADD COLUMN "energieeffizienzklasse" VARCHAR(5); diff --git a/prisma/migrations/20250331182241_nachweise/migration.sql b/prisma/migrations/20250331182241_nachweise/migration.sql deleted file mode 100644 index b92d17c6..00000000 --- a/prisma/migrations/20250331182241_nachweise/migration.sql +++ /dev/null @@ -1,22 +0,0 @@ -/* - Warnings: - - - Added the required column `updated_at` to the `BedarfsausweisGewerbe` table without a default value. This is not possible if the table is not empty. - - Added the required column `updated_at` to the `GEGNachweisGewerbe` table without a default value. This is not possible if the table is not empty. - - Added the required column `updated_at` to the `GEGNachweisWohnen` table without a default value. This is not possible if the table is not empty. - -*/ --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" ADD COLUMN "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, -ADD COLUMN "nachweistyp" "AusweisTyp" NOT NULL DEFAULT 'Standard', -ADD COLUMN "updated_at" TIMESTAMP(3) NOT NULL; - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" ADD COLUMN "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, -ADD COLUMN "nachweistyp" "AusweisTyp" NOT NULL DEFAULT 'Standard', -ADD COLUMN "updated_at" TIMESTAMP(3) NOT NULL; - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" ADD COLUMN "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, -ADD COLUMN "nachweistyp" "AusweisTyp" NOT NULL DEFAULT 'Standard', -ADD COLUMN "updated_at" TIMESTAMP(3) NOT NULL; diff --git a/prisma/migrations/20250405131537_mime/migration.sql b/prisma/migrations/20250405131537_mime/migration.sql deleted file mode 100644 index 5950a2bf..00000000 --- a/prisma/migrations/20250405131537_mime/migration.sql +++ /dev/null @@ -1,20 +0,0 @@ -/* - Warnings: - - - You are about to drop the column `alte_ausweis_id` on the `BedarfsausweisWohnen` table. All the data in the column will be lost. - - You are about to drop the column `alte_ausweis_id` on the `VerbrauchsausweisGewerbe` table. All the data in the column will be lost. - - You are about to drop the column `alte_ausweis_id` on the `VerbrauchsausweisWohnen` table. All the data in the column will be lost. - - Made the column `mime` on table `Unterlage` required. This step will fail if there are existing NULL values in that column. - -*/ --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" DROP COLUMN "alte_ausweis_id"; - --- AlterTable -ALTER TABLE "Unterlage" ALTER COLUMN "mime" SET NOT NULL; - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" DROP COLUMN "alte_ausweis_id"; - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" DROP COLUMN "alte_ausweis_id"; diff --git a/prisma/migrations/20250406203632_id_longer/migration.sql b/prisma/migrations/20250406203632_id_longer/migration.sql deleted file mode 100644 index 7a6062a5..00000000 --- a/prisma/migrations/20250406203632_id_longer/migration.sql +++ /dev/null @@ -1,106 +0,0 @@ -/* - Warnings: - - - The primary key for the `Anteilshaber` table will be changed. If it partially fails, the table could be left without primary key constraint. - - The primary key for the `ApiRequests` table will be changed. If it partially fails, the table could be left without primary key constraint. - - The primary key for the `Aufnahme` table will be changed. If it partially fails, the table could be left without primary key constraint. - - The primary key for the `BedarfsausweisGewerbe` table will be changed. If it partially fails, the table could be left without primary key constraint. - - The primary key for the `BedarfsausweisWohnen` table will be changed. If it partially fails, the table could be left without primary key constraint. - - The primary key for the `Bild` table will be changed. If it partially fails, the table could be left without primary key constraint. - - The primary key for the `Event` table will be changed. If it partially fails, the table could be left without primary key constraint. - - The primary key for the `GEGEinpreisung` table will be changed. If it partially fails, the table could be left without primary key constraint. - - The primary key for the `GEGNachweisGewerbe` table will be changed. If it partially fails, the table could be left without primary key constraint. - - The primary key for the `GEGNachweisWohnen` table will be changed. If it partially fails, the table could be left without primary key constraint. - - The primary key for the `Objekt` table will be changed. If it partially fails, the table could be left without primary key constraint. - - The primary key for the `Rechnung` table will be changed. If it partially fails, the table could be left without primary key constraint. - - The primary key for the `Tickets` table will be changed. If it partially fails, the table could be left without primary key constraint. - - The primary key for the `Unterlage` table will be changed. If it partially fails, the table could be left without primary key constraint. - - The primary key for the `VerbrauchsausweisGewerbe` table will be changed. If it partially fails, the table could be left without primary key constraint. - - The primary key for the `VerbrauchsausweisWohnen` table will be changed. If it partially fails, the table could be left without primary key constraint. - - The primary key for the `benutzer` table will be changed. If it partially fails, the table could be left without primary key constraint. - -*/ --- AlterTable -ALTER TABLE "Anteilshaber" DROP CONSTRAINT "Anteilshaber_pkey", -ALTER COLUMN "id" SET DATA TYPE VARCHAR(10), -ADD CONSTRAINT "Anteilshaber_pkey" PRIMARY KEY ("id"); - --- AlterTable -ALTER TABLE "ApiRequests" DROP CONSTRAINT "ApiRequests_pkey", -ALTER COLUMN "id" SET DATA TYPE VARCHAR(10), -ADD CONSTRAINT "ApiRequests_pkey" PRIMARY KEY ("id"); - --- AlterTable -ALTER TABLE "Aufnahme" DROP CONSTRAINT "Aufnahme_pkey", -ALTER COLUMN "id" SET DATA TYPE VARCHAR(10), -ADD CONSTRAINT "Aufnahme_pkey" PRIMARY KEY ("id"); - --- AlterTable -ALTER TABLE "BedarfsausweisGewerbe" DROP CONSTRAINT "BedarfsausweisGewerbe_pkey", -ALTER COLUMN "id" SET DATA TYPE VARCHAR(10), -ADD CONSTRAINT "BedarfsausweisGewerbe_pkey" PRIMARY KEY ("id"); - --- AlterTable -ALTER TABLE "BedarfsausweisWohnen" DROP CONSTRAINT "BedarfsausweisWohnen_pkey", -ALTER COLUMN "id" SET DATA TYPE VARCHAR(10), -ADD CONSTRAINT "BedarfsausweisWohnen_pkey" PRIMARY KEY ("id"); - --- AlterTable -ALTER TABLE "Bild" DROP CONSTRAINT "Bild_pkey", -ALTER COLUMN "id" SET DATA TYPE VARCHAR(10), -ADD CONSTRAINT "Bild_pkey" PRIMARY KEY ("id"); - --- AlterTable -ALTER TABLE "Event" DROP CONSTRAINT "Event_pkey", -ALTER COLUMN "id" SET DATA TYPE VARCHAR(10), -ADD CONSTRAINT "Event_pkey" PRIMARY KEY ("id"); - --- AlterTable -ALTER TABLE "GEGEinpreisung" DROP CONSTRAINT "GEGEinpreisung_pkey", -ALTER COLUMN "id" SET DATA TYPE VARCHAR(10), -ADD CONSTRAINT "GEGEinpreisung_pkey" PRIMARY KEY ("id"); - --- AlterTable -ALTER TABLE "GEGNachweisGewerbe" DROP CONSTRAINT "GEGNachweisGewerbe_pkey", -ALTER COLUMN "id" SET DATA TYPE VARCHAR(10), -ADD CONSTRAINT "GEGNachweisGewerbe_pkey" PRIMARY KEY ("id"); - --- AlterTable -ALTER TABLE "GEGNachweisWohnen" DROP CONSTRAINT "GEGNachweisWohnen_pkey", -ALTER COLUMN "id" SET DATA TYPE VARCHAR(10), -ADD CONSTRAINT "GEGNachweisWohnen_pkey" PRIMARY KEY ("id"); - --- AlterTable -ALTER TABLE "Objekt" DROP CONSTRAINT "Objekt_pkey", -ALTER COLUMN "id" SET DATA TYPE VARCHAR(10), -ADD CONSTRAINT "Objekt_pkey" PRIMARY KEY ("id"); - --- AlterTable -ALTER TABLE "Rechnung" DROP CONSTRAINT "Rechnung_pkey", -ALTER COLUMN "id" SET DATA TYPE VARCHAR(10), -ADD CONSTRAINT "Rechnung_pkey" PRIMARY KEY ("id"); - --- AlterTable -ALTER TABLE "Tickets" DROP CONSTRAINT "Tickets_pkey", -ALTER COLUMN "id" SET DATA TYPE VARCHAR(10), -ADD CONSTRAINT "Tickets_pkey" PRIMARY KEY ("id"); - --- AlterTable -ALTER TABLE "Unterlage" DROP CONSTRAINT "Unterlage_pkey", -ALTER COLUMN "id" SET DATA TYPE VARCHAR(10), -ADD CONSTRAINT "Unterlage_pkey" PRIMARY KEY ("id"); - --- AlterTable -ALTER TABLE "VerbrauchsausweisGewerbe" DROP CONSTRAINT "VerbrauchsausweisGewerbe_pkey", -ALTER COLUMN "id" SET DATA TYPE VARCHAR(10), -ADD CONSTRAINT "VerbrauchsausweisGewerbe_pkey" PRIMARY KEY ("id"); - --- AlterTable -ALTER TABLE "VerbrauchsausweisWohnen" DROP CONSTRAINT "VerbrauchsausweisWohnen_pkey", -ALTER COLUMN "id" SET DATA TYPE VARCHAR(10), -ADD CONSTRAINT "VerbrauchsausweisWohnen_pkey" PRIMARY KEY ("id"); - --- AlterTable -ALTER TABLE "benutzer" DROP CONSTRAINT "benutzer_pkey", -ALTER COLUMN "id" SET DATA TYPE VARCHAR(10), -ADD CONSTRAINT "benutzer_pkey" PRIMARY KEY ("id"); diff --git a/prisma/migrations/20250222150442_/migration.sql b/prisma/migrations/20250407035945_/migration.sql similarity index 83% rename from prisma/migrations/20250222150442_/migration.sql rename to prisma/migrations/20250407035945_/migration.sql index 2c8fab83..e5c90bba 100644 --- a/prisma/migrations/20250222150442_/migration.sql +++ b/prisma/migrations/20250407035945_/migration.sql @@ -8,7 +8,7 @@ CREATE TYPE "Lueftungskonzept" AS ENUM ('Fensterlueftung', 'Schachtlueftung', 'L CREATE TYPE "BenutzerRolle" AS ENUM ('USER', 'ADMIN'); -- CreateEnum -CREATE TYPE "BilderKategorie" AS ENUM ('Heizung', 'Fenster', 'Gebaeude', 'Daemmung'); +CREATE TYPE "BilderKategorie" AS ENUM ('Heizung', 'Fenster', 'Gebaeude', 'Daemmung', 'AnlagenTechnik'); -- CreateEnum CREATE TYPE "Einpreisungsstatus" AS ENUM ('open', 'canceled', 'pending', 'expired'); @@ -20,7 +20,7 @@ CREATE TYPE "Bezahlmethoden" AS ENUM ('paypal', 'giropay', 'sofort', 'creditcard CREATE TYPE "Rechnungsstatus" AS ENUM ('open', 'canceled', 'pending', 'authorized', 'expired', 'failed', 'paid'); -- CreateEnum -CREATE TYPE "AusweisTyp" AS ENUM ('Standard', 'Beratung', 'Offline'); +CREATE TYPE "AusweisTyp" AS ENUM ('Standard', 'standardXL', 'Beratung', 'BeratungXL', 'Offline', 'OfflineXL'); -- CreateEnum CREATE TYPE "TicketStatus" AS ENUM ('OFFEN', 'IN_BEARBEITUNG', 'IN_WARTESCHLEIFE', 'GESCHLOSSEN', 'GELOEST'); @@ -32,26 +32,25 @@ CREATE TYPE "UnterlagenKategorie" AS ENUM ('Grundriss', 'Sonstiges'); CREATE TYPE "Ausstellgrund" AS ENUM ('Neubau', 'Vermietung', 'Verkauf', 'Modernisierung', 'Sonstiges'); -- CreateEnum -CREATE TYPE "Ausweisart" AS ENUM ('VerbrauchsausweisWohnen', 'VerbrauchsausweisGewerbe', 'BedarfsausweisWohnen', 'BedarfsausweisGewerbe', 'GEGNachweisWohnen', 'GEGNachweisBedarfsausweis', 'GEGNachweisGewerbe'); +CREATE TYPE "Ausweisart" AS ENUM ('VerbrauchsausweisWohnen', 'VerbrauchsausweisGewerbe', 'BedarfsausweisWohnen', 'BedarfsausweisGewerbe', 'GEGNachweisWohnen', 'GEGNachweisGewerbe'); -- CreateEnum CREATE TYPE "Service" AS ENUM ('Telefonberatung', 'Aushang', 'Qualitaetsdruck', 'SameDay'); -- CreateTable CREATE TABLE "Anteilshaber" ( - "id" SERIAL NOT NULL, - "benutzer_id" INTEGER NOT NULL, + "id" VARCHAR(10) NOT NULL, "rolle" VARCHAR, "privilegien" BIGINT, - "uid" TEXT NOT NULL DEFAULT 'ant-' || gen_random_uuid(), - "objekt_id" INTEGER NOT NULL, + "benutzer_id" TEXT NOT NULL, + "objekt_id" TEXT NOT NULL, CONSTRAINT "Anteilshaber_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "ApiRequests" ( - "id" SERIAL NOT NULL, + "id" VARCHAR(10) NOT NULL, "date" TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, "ip" VARCHAR(50) NOT NULL, "method" VARCHAR(10) NOT NULL, @@ -60,17 +59,15 @@ CREATE TABLE "ApiRequests" ( "responseTime" DOUBLE PRECISION NOT NULL, "responseSize" INTEGER NOT NULL, "userAgent" VARCHAR(500) NOT NULL, - "user_id" INTEGER, + "user_id" TEXT, CONSTRAINT "ApiRequests_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Aufnahme" ( - "id" SERIAL NOT NULL, - "uid" TEXT NOT NULL DEFAULT 'auf-' || gen_random_uuid(), - "benutzer_id" INTEGER, - "ausweisart" "Ausweisart", + "id" VARCHAR(10) NOT NULL, + "benutzer_id" TEXT, "gebaeudetyp" VARCHAR, "gebaeudeteil" VARCHAR, "baujahr_gebaeude" INTEGER[], @@ -89,12 +86,7 @@ CREATE TABLE "Aufnahme" ( "alternative_warmwasser" BOOLEAN, "alternative_lueftung" BOOLEAN, "alternative_kuehlung" BOOLEAN, - "brennstoff_1" VARCHAR(50), - "brennstoff_2" VARCHAR(50), - "boxpruefung" BOOLEAN DEFAULT false, - "energieeffizienzklasse" VARCHAR(5), "erstellungsdatum" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP, - "ausstellungsdatum" TIMESTAMP(3), "zentralheizung" BOOLEAN, "solarsystem_warmwasser" BOOLEAN, "warmwasser_rohre_gedaemmt" BOOLEAN, @@ -125,34 +117,54 @@ CREATE TABLE "Aufnahme" ( "aussenwand_min_12cm_gedaemmt" BOOLEAN, "dachgeschoss_min_12cm_gedaemmt" BOOLEAN, "oberste_geschossdecke_min_12cm_gedaemmt" BOOLEAN, - "objekt_id" INTEGER NOT NULL, + "objekt_id" TEXT NOT NULL, CONSTRAINT "Aufnahme_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "BedarfsausweisGewerbe" ( - "id" SERIAL NOT NULL, - "uid" TEXT NOT NULL DEFAULT 'bag-' || gen_random_uuid(), - "benutzer_id" INTEGER, - "aufnahme_id" INTEGER NOT NULL, - "rechnung_id" INTEGER, - "geg_einpreisung_id" INTEGER, + "id" VARCHAR(10) NOT NULL, + "ausstellgrund" "Ausstellgrund", + "keller_beheizt" BOOLEAN, + "storniert" BOOLEAN DEFAULT false, + "bestellt" BOOLEAN DEFAULT false, + "zurueckgestellt" BOOLEAN DEFAULT false, + "abluftanlage" BOOLEAN DEFAULT false, + "zu_abluftanlage" BOOLEAN DEFAULT false, + "konditionierung_der_zuluft" BOOLEAN DEFAULT false, + "luftheizung" BOOLEAN DEFAULT false, + "hallenheizung" BOOLEAN DEFAULT false, + "dunkelstrahler" BOOLEAN DEFAULT false, + "direktheizung" BOOLEAN DEFAULT false, + "infrarotstrahler" BOOLEAN DEFAULT false, + "fussbodenheizung" BOOLEAN DEFAULT false, + "bauteilaktivierung" BOOLEAN DEFAULT false, + "klimatisierung" BOOLEAN DEFAULT false, + "nachweistyp" "AusweisTyp" NOT NULL DEFAULT 'Standard', + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" TIMESTAMP(3) NOT NULL, + "benutzer_id" TEXT, + "aufnahme_id" TEXT NOT NULL, + "rechnung_id" TEXT, + "geg_einpreisung_id" TEXT, CONSTRAINT "BedarfsausweisGewerbe_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "BedarfsausweisWohnen" ( - "id" SERIAL NOT NULL, - "uid" TEXT NOT NULL DEFAULT 'baw-' || gen_random_uuid(), - "benutzer_id" INTEGER, + "id" VARCHAR(10) NOT NULL, + "benutzer_id" TEXT, "ausstellgrund" "Ausstellgrund", "registriernummer" VARCHAR, "alternative_heizung" BOOLEAN, "alternative_warmwasser" BOOLEAN, "alternative_lueftung" BOOLEAN, "alternative_kuehlung" BOOLEAN, + "energieeffizienzklasse" VARCHAR(5), + "ausstellungsdatum" TIMESTAMP(3), + "boxpruefung" BOOLEAN DEFAULT false, "anzahl_vollgeschosse" INTEGER, "geschosshoehe" DOUBLE PRECISION, "anzahl_gauben" INTEGER, @@ -208,16 +220,18 @@ CREATE TABLE "BedarfsausweisWohnen" ( "prueftext" VARCHAR(1000), "beschreibung" TEXT, "kontrolldatei_angefragt" BOOLEAN DEFAULT false, - "rechnung_id" INTEGER, - "aufnahme_id" INTEGER NOT NULL, + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" TIMESTAMP(3) NOT NULL, + "ausweistyp" "AusweisTyp" NOT NULL DEFAULT 'Standard', + "rechnung_id" TEXT, + "aufnahme_id" TEXT NOT NULL, CONSTRAINT "BedarfsausweisWohnen_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "benutzer" ( - "id" SERIAL NOT NULL, - "uid" TEXT NOT NULL DEFAULT 'usr-' || gen_random_uuid(), + "id" VARCHAR(10) NOT NULL, "name" VARCHAR(50), "vorname" VARCHAR(50), "email" VARCHAR(255) NOT NULL, @@ -231,37 +245,36 @@ CREATE TABLE "benutzer" ( "rolle" "BenutzerRolle" NOT NULL DEFAULT 'USER', "firma" TEXT, "lex_office_id" TEXT, + "verified" BOOLEAN NOT NULL DEFAULT false, CONSTRAINT "benutzer_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Bild" ( - "id" SERIAL NOT NULL, + "id" VARCHAR(10) NOT NULL, "kategorie" "BilderKategorie" NOT NULL, - "uid" TEXT NOT NULL DEFAULT 'img-' || gen_random_uuid(), - "aufnahme_id" INTEGER, + "name" TEXT NOT NULL, + "aufnahme_id" TEXT, CONSTRAINT "Bild_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Event" ( - "id" SERIAL NOT NULL, - "uid" TEXT NOT NULL DEFAULT 'evt-' || gen_random_uuid(), + "id" VARCHAR(10) NOT NULL, "date" TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, "title" VARCHAR(255) NOT NULL, "description" TEXT, - "aufnahme_id" INTEGER NOT NULL, - "benutzer_id" INTEGER, + "aufnahme_id" TEXT NOT NULL, + "benutzer_id" TEXT, CONSTRAINT "Event_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "GEGEinpreisung" ( - "id" SERIAL NOT NULL, - "uid" TEXT NOT NULL DEFAULT 'gge-' || gen_random_uuid(), + "id" VARCHAR(10) NOT NULL, "empfaenger" VARCHAR, "strasse" VARCHAR, "plz" VARCHAR, @@ -276,43 +289,47 @@ CREATE TABLE "GEGEinpreisung" ( "versand_ort" VARCHAR, "versand_zusatzzeile" VARCHAR, "status" "Einpreisungsstatus" NOT NULL, - "benutzer_id" INTEGER, + "benutzer_id" TEXT, CONSTRAINT "GEGEinpreisung_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "GEGNachweisGewerbe" ( - "id" SERIAL NOT NULL, - "uid" TEXT NOT NULL DEFAULT 'gnw-' || gen_random_uuid(), + "id" VARCHAR(10) NOT NULL, "ausstellgrund" "Ausstellgrund", "keller_beheizt" BOOLEAN, "storniert" BOOLEAN DEFAULT false, "bestellt" BOOLEAN DEFAULT false, "zurueckgestellt" BOOLEAN DEFAULT false, "beschreibung" TEXT, - "benutzer_id" INTEGER, - "aufnahme_id" INTEGER NOT NULL, - "rechnung_id" INTEGER, - "geg_einpreisung_id" INTEGER, + "nachweistyp" "AusweisTyp" NOT NULL DEFAULT 'Standard', + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" TIMESTAMP(3) NOT NULL, + "benutzer_id" TEXT, + "aufnahme_id" TEXT NOT NULL, + "rechnung_id" TEXT, + "geg_einpreisung_id" TEXT, CONSTRAINT "GEGNachweisGewerbe_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "GEGNachweisWohnen" ( - "id" SERIAL NOT NULL, - "uid" TEXT NOT NULL DEFAULT 'gnw-' || gen_random_uuid(), + "id" VARCHAR(10) NOT NULL, "ausstellgrund" "Ausstellgrund", "keller_beheizt" BOOLEAN, "storniert" BOOLEAN DEFAULT false, "bestellt" BOOLEAN DEFAULT false, "zurueckgestellt" BOOLEAN DEFAULT false, "beschreibung" TEXT, - "benutzer_id" INTEGER, - "aufnahme_id" INTEGER NOT NULL, - "rechnung_id" INTEGER, - "geg_einpreisung_id" INTEGER, + "nachweistyp" "AusweisTyp" NOT NULL DEFAULT 'Standard', + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" TIMESTAMP(3) NOT NULL, + "benutzer_id" TEXT, + "aufnahme_id" TEXT NOT NULL, + "rechnung_id" TEXT, + "geg_einpreisung_id" TEXT, CONSTRAINT "GEGNachweisWohnen_pkey" PRIMARY KEY ("id") ); @@ -330,15 +347,14 @@ CREATE TABLE "Klimafaktoren" ( -- CreateTable CREATE TABLE "Objekt" ( - "id" SERIAL NOT NULL, - "uid" TEXT NOT NULL DEFAULT 'obj-' || gen_random_uuid(), - "benutzer_id" INTEGER, + "id" VARCHAR(10) NOT NULL, "latitude" DOUBLE PRECISION, "longitude" DOUBLE PRECISION, "plz" VARCHAR(5), "ort" VARCHAR(50), "adresse" VARCHAR(100), "erstellungsdatum" TIMESTAMP(3) DEFAULT CURRENT_TIMESTAMP, + "benutzer_id" TEXT, CONSTRAINT "Objekt_pkey" PRIMARY KEY ("id") ); @@ -358,9 +374,7 @@ CREATE TABLE "Postleitzahlen" ( -- CreateTable CREATE TABLE "Rechnung" ( - "id" SERIAL NOT NULL, - "uid" TEXT NOT NULL DEFAULT 'inv-' || gen_random_uuid(), - "benutzer_id" INTEGER NOT NULL, + "id" VARCHAR(10) NOT NULL, "empfaenger" VARCHAR, "strasse" VARCHAR, "plz" VARCHAR, @@ -377,12 +391,12 @@ CREATE TABLE "Rechnung" ( "bezahlmethode" "Bezahlmethoden" NOT NULL, "status" "Rechnungsstatus" NOT NULL, "services" "Service"[], - "ausweistyp" "AusweisTyp" NOT NULL DEFAULT 'Standard', "betrag" DOUBLE PRECISION NOT NULL, "erstellt_am" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "bezahlt_am" TIMESTAMP(3), "storniert_am" TIMESTAMP(3), "transaktions_referenz" VARCHAR, + "benutzer_id" TEXT NOT NULL, CONSTRAINT "Rechnung_pkey" PRIMARY KEY ("id") ); @@ -390,19 +404,17 @@ CREATE TABLE "Rechnung" ( -- CreateTable CREATE TABLE "RefreshTokens" ( "id" SERIAL NOT NULL, - "benutzer_id" INTEGER NOT NULL, "token" TEXT NOT NULL, "ip" TEXT NOT NULL, "expiry" TIMESTAMP(3) NOT NULL, + "benutzer_id" TEXT NOT NULL, CONSTRAINT "RefreshTokens_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Tickets" ( - "id" SERIAL NOT NULL, - "uid" TEXT NOT NULL DEFAULT 'tkt-' || gen_random_uuid(), - "benutzer_id" INTEGER, + "id" VARCHAR(10) NOT NULL, "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, "updated_at" TIMESTAMP(3), "deleted_at" TIMESTAMP(3), @@ -411,35 +423,31 @@ CREATE TABLE "Tickets" ( "beschreibung" TEXT NOT NULL, "metadata" JSONB, "email" TEXT NOT NULL, - "bearbeiter_id" INTEGER, + "bearbeiter_id" TEXT, "prioritaet" INTEGER DEFAULT 0, + "benutzer_id" TEXT, CONSTRAINT "Tickets_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "Unterlage" ( - "id" SERIAL NOT NULL, - "uid" TEXT NOT NULL DEFAULT 'pln-' || gen_random_uuid(), + "id" VARCHAR(10) NOT NULL, "name" TEXT, "kategorie" TEXT, - "mime" TEXT, - "aufnahme_id" INTEGER, + "mime" TEXT NOT NULL, + "aufnahme_id" TEXT, CONSTRAINT "Unterlage_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "VerbrauchsausweisGewerbe" ( - "id" SERIAL NOT NULL, - "uid" TEXT NOT NULL DEFAULT 'vag-' || gen_random_uuid(), - "benutzer_id" INTEGER, + "id" VARCHAR(10) NOT NULL, "ausstellgrund" "Ausstellgrund", "registriernummer" VARCHAR, "zusaetzliche_heizquelle" BOOLEAN, - "brennstoff_1" VARCHAR(50), "einheit_1" VARCHAR(50), - "brennstoff_2" VARCHAR(50), "einheit_2" VARCHAR(50), "startdatum" TIMESTAMP(6), "verbrauch_1" INTEGER, @@ -448,6 +456,11 @@ CREATE TABLE "VerbrauchsausweisGewerbe" ( "verbrauch_4" INTEGER, "verbrauch_5" INTEGER, "verbrauch_6" INTEGER, + "brennstoff_1" VARCHAR(50), + "brennstoff_2" VARCHAR(50), + "energieeffizienzklasse" VARCHAR(5), + "ausstellungsdatum" TIMESTAMP(3), + "boxpruefung" BOOLEAN DEFAULT false, "strom_1" INTEGER, "strom_2" INTEGER, "strom_3" INTEGER, @@ -466,6 +479,7 @@ CREATE TABLE "VerbrauchsausweisGewerbe" ( "alternative_lueftung" BOOLEAN, "alternative_kuehlung" BOOLEAN, "warmwasser_enthalten" BOOLEAN, + "warmwasser_anteil_bekannt" BOOLEAN, "anteil_warmwasser_1" DOUBLE PRECISION, "anteil_warmwasser_2" DOUBLE PRECISION, "ausgestellt" BOOLEAN DEFAULT false, @@ -475,22 +489,29 @@ CREATE TABLE "VerbrauchsausweisGewerbe" ( "prueftext" VARCHAR(1000), "beschreibung" TEXT, "kontrolldatei_angefragt" BOOLEAN DEFAULT false, - "rechnung_id" INTEGER, - "aufnahme_id" INTEGER NOT NULL, + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" TIMESTAMP(3) NOT NULL, + "ausweistyp" "AusweisTyp" NOT NULL DEFAULT 'Standard', + "benutzer_id" TEXT, + "rechnung_id" TEXT, + "aufnahme_id" TEXT NOT NULL, CONSTRAINT "VerbrauchsausweisGewerbe_pkey" PRIMARY KEY ("id") ); -- CreateTable CREATE TABLE "VerbrauchsausweisWohnen" ( - "id" SERIAL NOT NULL, - "uid" TEXT NOT NULL DEFAULT 'vaw-' || gen_random_uuid(), - "benutzer_id" INTEGER, + "id" VARCHAR(10) NOT NULL, "ausstellgrund" "Ausstellgrund", "registriernummer" VARCHAR, "zusaetzliche_heizquelle" BOOLEAN, "einheit_1" VARCHAR(50), "einheit_2" VARCHAR(50), + "brennstoff_1" VARCHAR(50), + "brennstoff_2" VARCHAR(50), + "energieeffizienzklasse" VARCHAR(5), + "ausstellungsdatum" TIMESTAMP(3), + "boxpruefung" BOOLEAN DEFAULT false, "startdatum" TIMESTAMPTZ(6), "verbrauch_1" INTEGER, "verbrauch_2" INTEGER, @@ -500,7 +521,6 @@ CREATE TABLE "VerbrauchsausweisWohnen" ( "verbrauch_6" INTEGER, "warmwasser_enthalten" BOOLEAN, "warmwasser_anteil_bekannt" BOOLEAN, - "keller_beheizt" BOOLEAN, "faktorKeller" DOUBLE PRECISION, "alternative_heizung" BOOLEAN, "alternative_warmwasser" BOOLEAN, @@ -515,8 +535,12 @@ CREATE TABLE "VerbrauchsausweisWohnen" ( "prueftext" VARCHAR(1000), "beschreibung" TEXT, "kontrolldatei_angefragt" BOOLEAN DEFAULT false, - "rechnung_id" INTEGER, - "aufnahme_id" INTEGER NOT NULL, + "ausweistyp" "AusweisTyp" NOT NULL DEFAULT 'Standard', + "created_at" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP, + "updated_at" TIMESTAMP(3) NOT NULL, + "benutzer_id" TEXT, + "rechnung_id" TEXT, + "aufnahme_id" TEXT NOT NULL, CONSTRAINT "VerbrauchsausweisWohnen_pkey" PRIMARY KEY ("id") ); @@ -527,7 +551,7 @@ CREATE TABLE "documenttemplates" ( "name" VARCHAR(100) NOT NULL, "shortdescription" VARCHAR(100) NOT NULL, "longdescription" VARCHAR(5000) NOT NULL, - "user_id" INTEGER NOT NULL, + "user_id" TEXT NOT NULL, "is_private" BOOLEAN NOT NULL DEFAULT true, "documenttype" INTEGER NOT NULL, "filename" VARCHAR(100) NOT NULL, @@ -551,7 +575,7 @@ CREATE TABLE "documenttypes" ( CREATE TABLE "tokens" ( "id" SERIAL NOT NULL, "token" VARCHAR(36) NOT NULL, - "user_id" INTEGER NOT NULL, + "user_id" TEXT NOT NULL, "date_created" TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, "last_used" TIMESTAMP(6) NOT NULL DEFAULT CURRENT_TIMESTAMP, "times_used" INTEGER NOT NULL DEFAULT 0, @@ -561,13 +585,16 @@ CREATE TABLE "tokens" ( ); -- CreateIndex -CREATE UNIQUE INDEX "Anteilshaber_uid_key" ON "Anteilshaber"("uid"); +CREATE UNIQUE INDEX "Anteilshaber_id_key" ON "Anteilshaber"("id"); -- CreateIndex -CREATE UNIQUE INDEX "Aufnahme_uid_key" ON "Aufnahme"("uid"); +CREATE UNIQUE INDEX "ApiRequests_id_key" ON "ApiRequests"("id"); -- CreateIndex -CREATE UNIQUE INDEX "BedarfsausweisGewerbe_uid_key" ON "BedarfsausweisGewerbe"("uid"); +CREATE UNIQUE INDEX "Aufnahme_id_key" ON "Aufnahme"("id"); + +-- CreateIndex +CREATE UNIQUE INDEX "BedarfsausweisGewerbe_id_key" ON "BedarfsausweisGewerbe"("id"); -- CreateIndex CREATE UNIQUE INDEX "BedarfsausweisGewerbe_aufnahme_id_key" ON "BedarfsausweisGewerbe"("aufnahme_id"); @@ -579,7 +606,7 @@ CREATE UNIQUE INDEX "BedarfsausweisGewerbe_rechnung_id_key" ON "BedarfsausweisGe CREATE UNIQUE INDEX "BedarfsausweisGewerbe_geg_einpreisung_id_key" ON "BedarfsausweisGewerbe"("geg_einpreisung_id"); -- CreateIndex -CREATE UNIQUE INDEX "BedarfsausweisWohnen_uid_key" ON "BedarfsausweisWohnen"("uid"); +CREATE UNIQUE INDEX "BedarfsausweisWohnen_id_key" ON "BedarfsausweisWohnen"("id"); -- CreateIndex CREATE UNIQUE INDEX "BedarfsausweisWohnen_rechnung_id_key" ON "BedarfsausweisWohnen"("rechnung_id"); @@ -588,22 +615,22 @@ CREATE UNIQUE INDEX "BedarfsausweisWohnen_rechnung_id_key" ON "BedarfsausweisWoh CREATE UNIQUE INDEX "BedarfsausweisWohnen_aufnahme_id_key" ON "BedarfsausweisWohnen"("aufnahme_id"); -- CreateIndex -CREATE UNIQUE INDEX "benutzer_uid_key" ON "benutzer"("uid"); +CREATE UNIQUE INDEX "benutzer_id_key" ON "benutzer"("id"); -- CreateIndex CREATE UNIQUE INDEX "benutzer_email_idx" ON "benutzer"("email"); -- CreateIndex -CREATE UNIQUE INDEX "Bild_uid_key" ON "Bild"("uid"); +CREATE UNIQUE INDEX "Bild_id_key" ON "Bild"("id"); -- CreateIndex -CREATE UNIQUE INDEX "Event_uid_key" ON "Event"("uid"); +CREATE UNIQUE INDEX "Event_id_key" ON "Event"("id"); -- CreateIndex -CREATE UNIQUE INDEX "GEGEinpreisung_uid_key" ON "GEGEinpreisung"("uid"); +CREATE UNIQUE INDEX "GEGEinpreisung_id_key" ON "GEGEinpreisung"("id"); -- CreateIndex -CREATE UNIQUE INDEX "GEGNachweisGewerbe_uid_key" ON "GEGNachweisGewerbe"("uid"); +CREATE UNIQUE INDEX "GEGNachweisGewerbe_id_key" ON "GEGNachweisGewerbe"("id"); -- CreateIndex CREATE UNIQUE INDEX "GEGNachweisGewerbe_aufnahme_id_key" ON "GEGNachweisGewerbe"("aufnahme_id"); @@ -615,7 +642,7 @@ CREATE UNIQUE INDEX "GEGNachweisGewerbe_rechnung_id_key" ON "GEGNachweisGewerbe" CREATE UNIQUE INDEX "GEGNachweisGewerbe_geg_einpreisung_id_key" ON "GEGNachweisGewerbe"("geg_einpreisung_id"); -- CreateIndex -CREATE UNIQUE INDEX "GEGNachweisWohnen_uid_key" ON "GEGNachweisWohnen"("uid"); +CREATE UNIQUE INDEX "GEGNachweisWohnen_id_key" ON "GEGNachweisWohnen"("id"); -- CreateIndex CREATE UNIQUE INDEX "GEGNachweisWohnen_aufnahme_id_key" ON "GEGNachweisWohnen"("aufnahme_id"); @@ -630,10 +657,10 @@ CREATE UNIQUE INDEX "GEGNachweisWohnen_geg_einpreisung_id_key" ON "GEGNachweisWo CREATE UNIQUE INDEX "Klimafaktoren_plz_month_year_key" ON "Klimafaktoren"("plz", "month", "year"); -- CreateIndex -CREATE UNIQUE INDEX "Objekt_uid_key" ON "Objekt"("uid"); +CREATE UNIQUE INDEX "Objekt_id_key" ON "Objekt"("id"); -- CreateIndex -CREATE UNIQUE INDEX "Rechnung_uid_key" ON "Rechnung"("uid"); +CREATE UNIQUE INDEX "Rechnung_id_key" ON "Rechnung"("id"); -- CreateIndex CREATE UNIQUE INDEX "Rechnung_transaktions_referenz_key" ON "Rechnung"("transaktions_referenz"); @@ -642,13 +669,13 @@ CREATE UNIQUE INDEX "Rechnung_transaktions_referenz_key" ON "Rechnung"("transakt CREATE UNIQUE INDEX "RefreshTokens_token_key" ON "RefreshTokens"("token"); -- CreateIndex -CREATE UNIQUE INDEX "Tickets_uid_key" ON "Tickets"("uid"); +CREATE UNIQUE INDEX "Tickets_id_key" ON "Tickets"("id"); -- CreateIndex -CREATE UNIQUE INDEX "Unterlage_uid_key" ON "Unterlage"("uid"); +CREATE UNIQUE INDEX "Unterlage_id_key" ON "Unterlage"("id"); -- CreateIndex -CREATE UNIQUE INDEX "VerbrauchsausweisGewerbe_uid_key" ON "VerbrauchsausweisGewerbe"("uid"); +CREATE UNIQUE INDEX "VerbrauchsausweisGewerbe_id_key" ON "VerbrauchsausweisGewerbe"("id"); -- CreateIndex CREATE UNIQUE INDEX "VerbrauchsausweisGewerbe_rechnung_id_key" ON "VerbrauchsausweisGewerbe"("rechnung_id"); @@ -657,7 +684,7 @@ CREATE UNIQUE INDEX "VerbrauchsausweisGewerbe_rechnung_id_key" ON "Verbrauchsaus CREATE UNIQUE INDEX "VerbrauchsausweisGewerbe_aufnahme_id_key" ON "VerbrauchsausweisGewerbe"("aufnahme_id"); -- CreateIndex -CREATE UNIQUE INDEX "VerbrauchsausweisWohnen_uid_key" ON "VerbrauchsausweisWohnen"("uid"); +CREATE UNIQUE INDEX "VerbrauchsausweisWohnen_id_key" ON "VerbrauchsausweisWohnen"("id"); -- CreateIndex CREATE UNIQUE INDEX "VerbrauchsausweisWohnen_rechnung_id_key" ON "VerbrauchsausweisWohnen"("rechnung_id"); diff --git a/prisma/schema/Rechnung.prisma b/prisma/schema/Rechnung.prisma index c414bf04..d5f7e774 100644 --- a/prisma/schema/Rechnung.prisma +++ b/prisma/schema/Rechnung.prisma @@ -19,8 +19,11 @@ enum Rechnungsstatus { enum AusweisTyp { Standard + standardXL Beratung + BeratungXL Offline + OfflineXL } model Rechnung { diff --git a/src/astro-typesafe-api-caller.ts b/src/astro-typesafe-api-caller.ts index 0e168f07..38dbbbd9 100644 --- a/src/astro-typesafe-api-caller.ts +++ b/src/astro-typesafe-api-caller.ts @@ -12,8 +12,8 @@ export const createCaller = createCallerFactory({ "admin/post-ausstellen": await import("../src/pages/api/admin/post-ausstellen.ts"), "admin/registriernummer": await import("../src/pages/api/admin/registriernummer.ts"), "admin/stornieren": await import("../src/pages/api/admin/stornieren.ts"), - "ausweise": await import("../src/pages/api/ausweise/index.ts"), "aufnahme": await import("../src/pages/api/aufnahme/index.ts"), + "ausweise": await import("../src/pages/api/ausweise/index.ts"), "auth/access-token": await import("../src/pages/api/auth/access-token.ts"), "auth/passwort-vergessen": await import("../src/pages/api/auth/passwort-vergessen.ts"), "auth/refresh-token": await import("../src/pages/api/auth/refresh-token.ts"), @@ -31,10 +31,10 @@ export const createCaller = createCallerFactory({ "rechnung/anfordern": await import("../src/pages/api/rechnung/anfordern.ts"), "rechnung": await import("../src/pages/api/rechnung/index.ts"), "ticket": await import("../src/pages/api/ticket/index.ts"), - "verbrauchsausweis-gewerbe/[id]": await import("../src/pages/api/verbrauchsausweis-gewerbe/[id].ts"), - "verbrauchsausweis-gewerbe": await import("../src/pages/api/verbrauchsausweis-gewerbe/index.ts"), "user": await import("../src/pages/api/user/index.ts"), "user/self": await import("../src/pages/api/user/self.ts"), + "verbrauchsausweis-gewerbe/[id]": await import("../src/pages/api/verbrauchsausweis-gewerbe/[id].ts"), + "verbrauchsausweis-gewerbe": await import("../src/pages/api/verbrauchsausweis-gewerbe/index.ts"), "verbrauchsausweis-wohnen/[id]": await import("../src/pages/api/verbrauchsausweis-wohnen/[id].ts"), "verbrauchsausweis-wohnen": await import("../src/pages/api/verbrauchsausweis-wohnen/index.ts"), "webhooks/mollie": await import("../src/pages/api/webhooks/mollie.ts"), diff --git a/src/components/Ausweis/Progressbar.svelte b/src/components/Ausweis/Progressbar.svelte index 9dda6504..2a7a6f83 100644 --- a/src/components/Ausweis/Progressbar.svelte +++ b/src/components/Ausweis/Progressbar.svelte @@ -31,9 +31,9 @@ {:else if ausweisart === Enums.Ausweisart.GEGNachweisGewerbe} GEG Nachweis Gewerbegebäude {/if} - {#if ausweistyp === Enums.AusweisTyp.Beratung} + {#if ausweistyp === Enums.AusweisTyp.Beratung || ausweistyp === Enums.AusweisTyp.BeratungXL} mit Beratung - {:else if ausweistyp === Enums.AusweisTyp.Offline} + {:else if ausweistyp === Enums.AusweisTyp.Offline || ausweistyp === Enums.AusweisTyp.OfflineXL} offline {/if} {PRICES[ausweisart][ausweistyp]} € diff --git a/src/components/Dashboard/DashboardAusweis.svelte b/src/components/Dashboard/DashboardAusweis.svelte index 85e0f63a..b39ffd98 100644 --- a/src/components/Dashboard/DashboardAusweis.svelte +++ b/src/components/Dashboard/DashboardAusweis.svelte @@ -215,9 +215,9 @@ Bedarfsausweis Gewerbe {/if} - {#if ausweis.ausweistyp === Enums.AusweisTyp.Beratung} + {#if ausweis.ausweistyp === Enums.AusweisTyp.Beratung || ausweis.ausweistyp === Enums.AusweisTyp.BeratungXL} (Beratung) - {:else if ausweis.ausweistyp === Enums.AusweisTyp.Offline} + {:else if ausweis.ausweistyp === Enums.AusweisTyp.Offline || ausweis.ausweistyp === Enums.AusweisTyp.OfflineXL} (Offline) {/if} @@ -240,9 +240,9 @@ > {#if ausweis.bestellt} - {#if ausweis.ausweistyp === Enums.AusweisTyp.Beratung} + {#if ausweis.ausweistyp === Enums.AusweisTyp.Beratung || ausweis.ausweistyp === Enums.AusweisTyp.BeratungXL}

Sie haben Hilfe zu diesem Ausweis angefordert. Sie werden innerhalb der nächsten 48 Stunden über die hinterlegte Telefonnummer vom IB Cornelsen kontaktiert.

- {:else if ausweis.ausweistyp === Enums.AusweisTyp.Offline} + {:else if ausweis.ausweistyp === Enums.AusweisTyp.Offline || ausweis.ausweistyp === Enums.AusweisTyp.OfflineXL}

Sie haben die offline Variant zu diesem Ausweis angefordert. Bitte übermitteln Sie uns die letzten drei Jahre der Energieabrechnungen Ihres Energieversorgers.

{:else}

Der Ausweis wurde von Ihnen freigegeben und befindet sich in Prüfung vom IB Cornelsen

@@ -311,7 +311,38 @@ {/if} - {#if !ausweis.ausgestellt && (!ausweis.bestellt || (ausweis.ausweistyp === Enums.AusweisTyp.Beratung || ausweis.ausweistyp === Enums.AusweisTyp.Offline))} + {#if !ausweis.ausgestellt && (!ausweis.bestellt || (ausweis.ausweistyp === Enums.AusweisTyp.Beratung || ausweis.ausweistyp === Enums.AusweisTyp.Offline || ausweis.ausweistyp === Enums.AusweisTyp.OfflineXL || ausweis.ausweistyp === Enums.AusweisTyp.BeratungXL))} + {#if ausweisart === Enums.Ausweisart.VerbrauchsausweisWohnen} + Bearbeiten + {:else if ausweisart === Enums.Ausweisart.VerbrauchsausweisGewerbe} + Bearbeiten + {:else if ausweisart === Enums.Ausweisart.BedarfsausweisWohnen} + Bearbeiten + {:else if ausweisart === Enums.Ausweisart.GEGNachweisWohnen} + Bearbeiten + {:else if ausweisart === Enums.Ausweisart.GEGNachweisGewerbe} + Bearbeiten + {:else if ausweisart === Enums.Ausweisart.BedarfsausweisGewerbe} + Bearbeiten + {/if} {#if ausweisart === Enums.Ausweisart.VerbrauchsausweisWohnen} > BedarfsausweisWohnen: { [Enums.AusweisTyp.Standard]: 95, [Enums.AusweisTyp.Beratung]: 125, - [Enums.AusweisTyp.Offline]: 295 + [Enums.AusweisTyp.Offline]: 295, + [Enums.AusweisTyp.standardXL]: 120, + [Enums.AusweisTyp.BeratungXL]: 150, + [Enums.AusweisTyp.OfflineXL]: 320, }, VerbrauchsausweisWohnen: { [Enums.AusweisTyp.Standard]: 65, [Enums.AusweisTyp.Beratung]: 95, - [Enums.AusweisTyp.Offline]: 180 + [Enums.AusweisTyp.Offline]: 180, + [Enums.AusweisTyp.standardXL]: 75, + [Enums.AusweisTyp.BeratungXL]: 105, + [Enums.AusweisTyp.OfflineXL]: 190 }, VerbrauchsausweisGewerbe: { [Enums.AusweisTyp.Standard]: 95, [Enums.AusweisTyp.Beratung]: 125, - [Enums.AusweisTyp.Offline]: 360 + [Enums.AusweisTyp.Offline]: 360, + [Enums.AusweisTyp.standardXL]: 110, + [Enums.AusweisTyp.BeratungXL]: 140, + [Enums.AusweisTyp.OfflineXL]: 375 }, BedarfsausweisGewerbe: { [Enums.AusweisTyp.Standard]: 500, [Enums.AusweisTyp.Beratung]: 700, - [Enums.AusweisTyp.Offline]: 1000 + [Enums.AusweisTyp.Offline]: 1000, + [Enums.AusweisTyp.standardXL]: 800, + [Enums.AusweisTyp.BeratungXL]: 1000, + [Enums.AusweisTyp.OfflineXL]: 1300 }, GEGNachweisWohnen: { [Enums.AusweisTyp.Standard]: 500, [Enums.AusweisTyp.Beratung]: 700, - [Enums.AusweisTyp.Offline]: 1000 + [Enums.AusweisTyp.Offline]: 1000, + [Enums.AusweisTyp.standardXL]: 700, + [Enums.AusweisTyp.BeratungXL]: 900, + [Enums.AusweisTyp.OfflineXL]: 1200 }, GEGNachweisGewerbe: { [Enums.AusweisTyp.Standard]: 800, [Enums.AusweisTyp.Beratung]: 1000, - [Enums.AusweisTyp.Offline]: 1300 + [Enums.AusweisTyp.Offline]: 1300, + [Enums.AusweisTyp.standardXL]: 1100, + [Enums.AusweisTyp.BeratungXL]: 1300, + [Enums.AusweisTyp.OfflineXL]: 1600 } }; diff --git a/src/lib/server/mail/helpers.ts b/src/lib/server/mail/helpers.ts index f574c3c4..7a4864dc 100644 --- a/src/lib/server/mail/helpers.ts +++ b/src/lib/server/mail/helpers.ts @@ -7,23 +7,23 @@ export function getPaymentSuccessSubject(ausweis: VerbrauchsausweisWohnen | Verb if (ausweisart === Enums.Ausweisart.VerbrauchsausweisWohnen) { subject = `Bestellbestätigung vom IB Cornelsen - Verbrauchsausweis Wohnen (ID: ${id})`; - if (ausweis.ausweistyp === Enums.AusweisTyp.Beratung) { + if (ausweis.ausweistyp === Enums.AusweisTyp.Beratung || ausweis.ausweistyp === Enums.AusweisTyp.BeratungXL) { subject = `Bestellbestätigung vom IB Cornelsen - Verbrauchsausweis Wohnen mit Beratung (ID: ${id})` - } else if (ausweis.ausweistyp === Enums.AusweisTyp.Offline) { + } else if (ausweis.ausweistyp === Enums.AusweisTyp.Offline || ausweis.ausweistyp === Enums.AusweisTyp.OfflineXL) { subject = `Bestellbestätigung vom IB Cornelsen - Verbrauchsausweis Wohnen - offline Service (ID: ${id})` } } else if (ausweisart === Enums.Ausweisart.VerbrauchsausweisGewerbe) { subject = `Bestellbestätigung vom IB Cornelsen - Verbrauchsausweis Gewerbe (ID: ${id})` - if (ausweis.ausweistyp === Enums.AusweisTyp.Beratung) { + if (ausweis.ausweistyp === Enums.AusweisTyp.Beratung || ausweis.ausweistyp === Enums.AusweisTyp.BeratungXL) { subject = `Bestellbestätigung vom IB Cornelsen - Verbrauchsausweis Gewerbe mit Beratung (ID: ${id})` - } else if (ausweis.ausweistyp === Enums.AusweisTyp.Offline) { + } else if (ausweis.ausweistyp === Enums.AusweisTyp.Offline || ausweis.ausweistyp === Enums.AusweisTyp.OfflineXL) { subject = `Bestellbestätigung vom IB Cornelsen - Verbrauchsausweis Gewerbe - offline Service (ID: ${id})` } } else if (ausweisart === Enums.Ausweisart.BedarfsausweisWohnen) { subject = `Bestellbestätigung vom IB Cornelsen - Bedarfsausweis Wohnen (ID: ${id})` - if (ausweis.ausweistyp === Enums.AusweisTyp.Beratung) { + if (ausweis.ausweistyp === Enums.AusweisTyp.Beratung || ausweis.ausweistyp === Enums.AusweisTyp.BeratungXL) { subject = `Bestellbestätigung vom IB Cornelsen - Bedarfsausweis Wohnen mit Beratung (ID: ${id})` - } else if (ausweis.ausweistyp === Enums.AusweisTyp.Offline) { + } else if (ausweis.ausweistyp === Enums.AusweisTyp.Offline || ausweis.ausweistyp === Enums.AusweisTyp.OfflineXL) { subject = `Bestellbestätigung vom IB Cornelsen - Bedarfsausweis Wohnen - offline Service (ID: ${id})` } } @@ -60,7 +60,7 @@ export function getPaymentInvoiceBody(ausweis: VerbrauchsausweisWohnen | Verbrau
fax 040 · 209339859

` - if (ausweis.ausweistyp === Enums.AusweisTyp.Beratung) { + if (ausweis.ausweistyp === Enums.AusweisTyp.Beratung || ausweis.ausweistyp === Enums.AusweisTyp.BeratungXL) { body = `

vielen Dank für Ihre Bestellung. Sie haben telefonische Beratung zu Ihrer online Eingabe angefordert.
Wir werden Sie innerhalb von 48 Stunden unter der von Ihnen hinterlegten Telefonnummer kontaktieren und dann die offenen Fragen zu Ihrer Eingabe beantworten.

@@ -133,7 +133,7 @@ export function getPaymentInvoiceBody(ausweis: VerbrauchsausweisWohnen | Verbrau
fax 040 · 209339859

` - if (ausweis.ausweistyp === Enums.AusweisTyp.Beratung) { + if (ausweis. ausweistyp === Enums.AusweisTyp.Beratung || ausweis.ausweistyp === Enums.AusweisTyp.BeratungXL) { body = `

vielen Dank für Ihre Bestellung. Sie haben telefonische Beratung zu Ihrer online Eingabe angefordert.
Wir werden Sie innerhalb von 48 Stunden unter der von Ihnen hinterlegten Telefonnummer kontaktieren und dann die offenen Fragen zu Ihrer Eingabe beantworten.

@@ -206,7 +206,7 @@ export function getPaymentInvoiceBody(ausweis: VerbrauchsausweisWohnen | Verbrau
fax 040 · 209339859

` - if (ausweis.ausweistyp === Enums.AusweisTyp.Beratung) { + if (ausweis.ausweistyp === Enums.AusweisTyp.Beratung || ausweis.ausweistyp === Enums.AusweisTyp.BeratungXL) { body = `

vielen Dank für Ihre Bestellung. Sie haben telefonische Beratung zu Ihrer online Eingabe angefordert.
Wir werden Sie innerhalb von 48 Stunden unter der von Ihnen hinterlegten Telefonnummer kontaktieren und dann die offenen Fragen zu Ihrer Eingabe beantworten.

@@ -289,7 +289,7 @@ export function getPaymentSuccessBody(ausweis: VerbrauchsausweisWohnen | Verbrau
fax 040 · 209339859

` - if (ausweis.ausweistyp === Enums.AusweisTyp.Beratung) { + if (ausweis.ausweistyp === Enums.AusweisTyp.Beratung || ausweis.ausweistyp === Enums.AusweisTyp.BeratungXL) { body = `

vielen Dank für Ihre Bestellung. Sie haben telefonische Beratung zu Ihrer online Eingabe angefordert.
Wir werden Sie innerhalb von 48 Stunden unter der von Ihnen hinterlegten Telefonnummer kontaktieren und dann die offenen Fragen zu Ihrer Eingabe beantworten.

@@ -362,7 +362,7 @@ export function getPaymentSuccessBody(ausweis: VerbrauchsausweisWohnen | Verbrau
fax 040 · 209339859

` - if (ausweis.ausweistyp === Enums.AusweisTyp.Beratung) { + if (ausweis.ausweistyp === Enums.AusweisTyp.Beratung || ausweis.ausweistyp === Enums.AusweisTyp.BeratungXL) { body = `

vielen Dank für Ihre Bestellung. Sie haben telefonische Beratung zu Ihrer online Eingabe angefordert.
Wir werden Sie innerhalb von 48 Stunden unter der von Ihnen hinterlegten Telefonnummer kontaktieren und dann die offenen Fragen zu Ihrer Eingabe beantworten.

@@ -435,7 +435,7 @@ export function getPaymentSuccessBody(ausweis: VerbrauchsausweisWohnen | Verbrau
fax 040 · 209339859

` - if (ausweis.ausweistyp === Enums.AusweisTyp.Beratung) { + if (ausweis.ausweistyp === Enums.AusweisTyp.Beratung || ausweis.ausweistyp === Enums.AusweisTyp.BeratungXL) { body = `

vielen Dank für Ihre Bestellung. Sie haben telefonische Beratung zu Ihrer online Eingabe angefordert.
Wir werden Sie innerhalb von 48 Stunden unter der von Ihnen hinterlegten Telefonnummer kontaktieren und dann die offenen Fragen zu Ihrer Eingabe beantworten.

diff --git a/src/modules/KundendatenModule.svelte b/src/modules/KundendatenModule.svelte index 0d6d9843..605e0a5a 100644 --- a/src/modules/KundendatenModule.svelte +++ b/src/modules/KundendatenModule.svelte @@ -855,11 +855,11 @@ grid-cols-3 sm:grid-cols-5 justify-around justify-items-center items-center"
- {#if ausweis.ausweistyp === Enums.AusweisTyp.Standard} + {#if ausweis.ausweistyp === Enums.AusweisTyp.Standard || ausweis.ausweistyp === Enums.AusweisTyp.standardXL} Netto-Preis Energieausweis - {:else if ausweis.ausweistyp === Enums.AusweisTyp.Beratung} + {:else if ausweis.ausweistyp === Enums.AusweisTyp.Beratung || ausweis.ausweistyp === Enums.AusweisTyp.BeratungXL} Energieausweis inkl. Beratung - {:else if ausweis.ausweistyp === Enums.AusweisTyp.Offline} + {:else if ausweis.ausweistyp === Enums.AusweisTyp.Offline || ausweis.ausweistyp === Enums.AusweisTyp.OfflineXL} Energieausweis Offline {/if} :