From fd55e88166ef8cd77875f6044a2bc47a072aabe6 Mon Sep 17 00:00:00 2001 From: Benno Tielen Date: Wed, 11 Dec 2024 10:17:37 +0100 Subject: [PATCH] feature: event photo --- README.md | 19 +- src/app/veranstaltungen/[id]/page.tsx | 4 +- src/components/Flex/styles.module.scss | 1 - src/components/Gallery/Fullscreen.tsx | 1 + src/components/Gallery/Gallery.tsx | 1 + .../HorizontalRule/styles.module.scss | 6 + src/migrations/20241205_121237.json | 5941 +++++++++++++++++ src/migrations/20241205_121237.ts | 1068 +++ src/migrations/index.ts | 9 + src/pageComponents/Event/Event.stories.tsx | 8 + src/pageComponents/Event/Event.tsx | 18 +- src/pageComponents/Event/lobpreis.jpeg | Bin 0 -> 19532 bytes src/pageComponents/Event/styles.module.scss | 47 + src/utils/dto/gallery.ts | 63 +- 14 files changed, 7144 insertions(+), 42 deletions(-) create mode 100644 src/migrations/20241205_121237.json create mode 100644 src/migrations/20241205_121237.ts create mode 100644 src/migrations/index.ts create mode 100644 src/pageComponents/Event/lobpreis.jpeg diff --git a/README.md b/README.md index b83cb9c..9877d87 100644 --- a/README.md +++ b/README.md @@ -1,29 +1,14 @@ # Heilige Drei Könige Website This is the repository for the Heilige Drei Könige Catholic Church website, built using -Payload CMS v3, NextJS, React and MongoDB. +Payload CMS v3, NextJS, React and Postges. ## Getting Started ### Prerequisites - Node.js and npm: Make sure you have Node.js and npm installed on your machine. -- MongoDB: You'll need a MongoDB database to store the website data. +- Postgres: You'll need a PostgresSQL database to store the website data. -### MongoDB - -If you don't have docker on system installed, please -follow the instructions for your operating system on the Docker website. - -To pull the MongoDB docker image: -```bash -docker pull mongodb/mongodb-community-server:latest -``` - -To Run the image as a Container -```bash -docker run --name mongodb -p 27017:27017 -d mongodb/mongodb-community-server:latest -``` - ### Postgres Database You will need the an Postgres database including the postgis extension diff --git a/src/app/veranstaltungen/[id]/page.tsx b/src/app/veranstaltungen/[id]/page.tsx index c0621ce..2d2bfbd 100644 --- a/src/app/veranstaltungen/[id]/page.tsx +++ b/src/app/veranstaltungen/[id]/page.tsx @@ -2,6 +2,7 @@ import { notFound } from 'next/navigation' import { Event } from '@/payload-types' import { EventPage } from '@/pageComponents/Event/Event' import { stringify } from 'qs-esm' +import { getPhoto } from '@/utils/dto/gallery' export default async function Page({ params }: { params: Promise<{id: string}>}) { @@ -32,8 +33,8 @@ export default async function Page({ params }: { params: Promise<{id: string}>}) } const event = await res.json() as Event; - console.log(event) const group = Array.isArray(event.group) && event.group.length > 0 && typeof event.group[0] == "object" ? event.group[0].slug : undefined; + const photo = getPhoto("tablet", event.photo); return ( }) group={group} contact={event.contact || undefined} flyer={typeof event.flyer === 'object' ? event.flyer || undefined : undefined} + photo={photo} /> ) } \ No newline at end of file diff --git a/src/components/Flex/styles.module.scss b/src/components/Flex/styles.module.scss index 9a2d6f0..c51e927 100644 --- a/src/components/Flex/styles.module.scss +++ b/src/components/Flex/styles.module.scss @@ -6,7 +6,6 @@ .col { flex: 1 1 0; - width: 0; } @media screen and (max-width: 576px) { diff --git a/src/components/Gallery/Fullscreen.tsx b/src/components/Gallery/Fullscreen.tsx index a311bbd..9d1c3f4 100644 --- a/src/components/Gallery/Fullscreen.tsx +++ b/src/components/Gallery/Fullscreen.tsx @@ -24,6 +24,7 @@ export const Fullscreen = ({display, image, closeClicked, alt, nextClicked}: Ful width={image.width} src={image.src} alt={alt || ""} + unoptimized={true} /> ) diff --git a/src/components/Gallery/Gallery.tsx b/src/components/Gallery/Gallery.tsx index 990b60f..7c2508e 100644 --- a/src/components/Gallery/Gallery.tsx +++ b/src/components/Gallery/Gallery.tsx @@ -38,6 +38,7 @@ const GalleryItem = ({ thumbnail, alt, onClick }: GalleryItemProps) => { height={thumbnail.height} width={thumbnail.width} alt={alt} + unoptimized={true} /> ) } diff --git a/src/components/HorizontalRule/styles.module.scss b/src/components/HorizontalRule/styles.module.scss index 1defa16..2a62970 100644 --- a/src/components/HorizontalRule/styles.module.scss +++ b/src/components/HorizontalRule/styles.module.scss @@ -11,3 +11,9 @@ flex: 1 1 0; height: 28px; } + +@media screen and (max-width: 1100px) { + .container { + padding: 20px; + } +} diff --git a/src/migrations/20241205_121237.json b/src/migrations/20241205_121237.json new file mode 100644 index 0000000..78751c3 --- /dev/null +++ b/src/migrations/20241205_121237.json @@ -0,0 +1,5941 @@ +{ + "id": "90e30117-5167-4086-aa64-1b648d696363", + "prevId": "00000000-0000-0000-0000-000000000000", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.parish_contact_persons": { + "name": "parish_contact_persons", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "parish_contact_persons_order_idx": { + "name": "parish_contact_persons_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "parish_contact_persons_parent_id_idx": { + "name": "parish_contact_persons_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "parish_contact_persons_parent_id_fk": { + "name": "parish_contact_persons_parent_id_fk", + "tableFrom": "parish_contact_persons", + "tableTo": "parish", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.parish_gallery": { + "name": "parish_gallery", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "photo_id": { + "name": "photo_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "parish_gallery_order_idx": { + "name": "parish_gallery_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "parish_gallery_parent_id_idx": { + "name": "parish_gallery_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "parish_gallery_photo_idx": { + "name": "parish_gallery_photo_idx", + "columns": [ + { + "expression": "photo_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "parish_gallery_photo_id_media_id_fk": { + "name": "parish_gallery_photo_id_media_id_fk", + "tableFrom": "parish_gallery", + "tableTo": "media", + "columnsFrom": [ + "photo_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "parish_gallery_parent_id_fk": { + "name": "parish_gallery_parent_id_fk", + "tableFrom": "parish_gallery", + "tableTo": "parish", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.parish": { + "name": "parish", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "history": { + "name": "history", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "contact": { + "name": "contact", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "photo_id": { + "name": "photo_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "parish_photo_idx": { + "name": "parish_photo_idx", + "columns": [ + { + "expression": "photo_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "parish_updated_at_idx": { + "name": "parish_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "parish_created_at_idx": { + "name": "parish_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "parish_photo_id_media_id_fk": { + "name": "parish_photo_id_media_id_fk", + "tableFrom": "parish", + "tableTo": "media", + "columnsFrom": [ + "photo_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.parish_rels": { + "name": "parish_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "church_id": { + "name": "church_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "employees_id": { + "name": "employees_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "parish_rels_order_idx": { + "name": "parish_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "parish_rels_parent_idx": { + "name": "parish_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "parish_rels_path_idx": { + "name": "parish_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "parish_rels_church_id_idx": { + "name": "parish_rels_church_id_idx", + "columns": [ + { + "expression": "church_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "parish_rels_employees_id_idx": { + "name": "parish_rels_employees_id_idx", + "columns": [ + { + "expression": "employees_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "parish_rels_parent_fk": { + "name": "parish_rels_parent_fk", + "tableFrom": "parish_rels", + "tableTo": "parish", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "parish_rels_church_fk": { + "name": "parish_rels_church_fk", + "tableFrom": "parish_rels", + "tableTo": "church", + "columnsFrom": [ + "church_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "parish_rels_employees_fk": { + "name": "parish_rels_employees_fk", + "tableFrom": "parish_rels", + "tableTo": "employees", + "columnsFrom": [ + "employees_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.church": { + "name": "church", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "address": { + "name": "address", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "church_updated_at_idx": { + "name": "church_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "church_created_at_idx": { + "name": "church_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.worship": { + "name": "worship", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "date": { + "name": "date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "location_id": { + "name": "location_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "enum_worship_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cancelled": { + "name": "cancelled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "liturgical_day": { + "name": "liturgical_day", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "celebrant": { + "name": "celebrant", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "worship_location_idx": { + "name": "worship_location_idx", + "columns": [ + { + "expression": "location_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "worship_updated_at_idx": { + "name": "worship_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "worship_created_at_idx": { + "name": "worship_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "worship_location_id_church_id_fk": { + "name": "worship_location_id_church_id_fk", + "tableFrom": "worship", + "tableTo": "church", + "columnsFrom": [ + "location_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.announcement": { + "name": "announcement", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "date": { + "name": "date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "document_id": { + "name": "document_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "announcement_document_idx": { + "name": "announcement_document_idx", + "columns": [ + { + "expression": "document_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "announcement_updated_at_idx": { + "name": "announcement_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "announcement_created_at_idx": { + "name": "announcement_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "announcement_document_id_documents_id_fk": { + "name": "announcement_document_id_documents_id_fk", + "tableFrom": "announcement", + "tableTo": "documents", + "columnsFrom": [ + "document_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.announcement_rels": { + "name": "announcement_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "parish_id": { + "name": "parish_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "announcement_rels_order_idx": { + "name": "announcement_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "announcement_rels_parent_idx": { + "name": "announcement_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "announcement_rels_path_idx": { + "name": "announcement_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "announcement_rels_parish_id_idx": { + "name": "announcement_rels_parish_id_idx", + "columns": [ + { + "expression": "parish_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "announcement_rels_parent_fk": { + "name": "announcement_rels_parent_fk", + "tableFrom": "announcement_rels", + "tableTo": "announcement", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "announcement_rels_parish_fk": { + "name": "announcement_rels_parish_fk", + "tableFrom": "announcement_rels", + "tableTo": "parish", + "columnsFrom": [ + "parish_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.blog_blocks_text": { + "name": "blog_blocks_text", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "content_html": { + "name": "content_html", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "enum_blog_blocks_text_width", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'1/2'" + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "blog_blocks_text_order_idx": { + "name": "blog_blocks_text_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "blog_blocks_text_parent_id_idx": { + "name": "blog_blocks_text_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "blog_blocks_text_path_idx": { + "name": "blog_blocks_text_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "blog_blocks_text_parent_id_fk": { + "name": "blog_blocks_text_parent_id_fk", + "tableFrom": "blog_blocks_text", + "tableTo": "blog", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.blog_blocks_document": { + "name": "blog_blocks_document", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "file_id": { + "name": "file_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "button": { + "name": "button", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'Download Flyer'" + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "blog_blocks_document_order_idx": { + "name": "blog_blocks_document_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "blog_blocks_document_parent_id_idx": { + "name": "blog_blocks_document_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "blog_blocks_document_path_idx": { + "name": "blog_blocks_document_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "blog_blocks_document_file_idx": { + "name": "blog_blocks_document_file_idx", + "columns": [ + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "blog_blocks_document_file_id_documents_id_fk": { + "name": "blog_blocks_document_file_id_documents_id_fk", + "tableFrom": "blog_blocks_document", + "tableTo": "documents", + "columnsFrom": [ + "file_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "blog_blocks_document_parent_id_fk": { + "name": "blog_blocks_document_parent_id_fk", + "tableFrom": "blog_blocks_document", + "tableTo": "blog", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.blog_blocks_contactform": { + "name": "blog_blocks_contactform", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'Ich bin dabei!'" + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'Um dich anzumelden oder uns zu unterstützen, fülle bitte das Kontaktformular aus. Wir freuen uns sehr, dass du Teil unserer Gemeinschaft bist und mit deinem Engagement dazu beiträgst, unsere Ziele zu erreichen. Solltest du Fragen haben oder weitere Informationen benötigen, zögere nicht, uns zu kontaktieren – wir sind gerne für dich da!'" + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'kontakt@dreikoenige.berlin'" + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "blog_blocks_contactform_order_idx": { + "name": "blog_blocks_contactform_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "blog_blocks_contactform_parent_id_idx": { + "name": "blog_blocks_contactform_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "blog_blocks_contactform_path_idx": { + "name": "blog_blocks_contactform_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "blog_blocks_contactform_parent_id_fk": { + "name": "blog_blocks_contactform_parent_id_fk", + "tableFrom": "blog_blocks_contactform", + "tableTo": "blog", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.blog_blocks_gallery_items": { + "name": "blog_blocks_gallery_items", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "photo_id": { + "name": "photo_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "blog_blocks_gallery_items_order_idx": { + "name": "blog_blocks_gallery_items_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "blog_blocks_gallery_items_parent_id_idx": { + "name": "blog_blocks_gallery_items_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "blog_blocks_gallery_items_photo_idx": { + "name": "blog_blocks_gallery_items_photo_idx", + "columns": [ + { + "expression": "photo_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "blog_blocks_gallery_items_photo_id_media_id_fk": { + "name": "blog_blocks_gallery_items_photo_id_media_id_fk", + "tableFrom": "blog_blocks_gallery_items", + "tableTo": "media", + "columnsFrom": [ + "photo_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "blog_blocks_gallery_items_parent_id_fk": { + "name": "blog_blocks_gallery_items_parent_id_fk", + "tableFrom": "blog_blocks_gallery_items", + "tableTo": "blog_blocks_gallery", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.blog_blocks_gallery": { + "name": "blog_blocks_gallery", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "blog_blocks_gallery_order_idx": { + "name": "blog_blocks_gallery_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "blog_blocks_gallery_parent_id_idx": { + "name": "blog_blocks_gallery_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "blog_blocks_gallery_path_idx": { + "name": "blog_blocks_gallery_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "blog_blocks_gallery_parent_id_fk": { + "name": "blog_blocks_gallery_parent_id_fk", + "tableFrom": "blog_blocks_gallery", + "tableTo": "blog", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.blog": { + "name": "blog", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "photo_id": { + "name": "photo_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "excerpt": { + "name": "excerpt", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "blog_photo_idx": { + "name": "blog_photo_idx", + "columns": [ + { + "expression": "photo_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "blog_updated_at_idx": { + "name": "blog_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "blog_created_at_idx": { + "name": "blog_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "blog_photo_id_media_id_fk": { + "name": "blog_photo_id_media_id_fk", + "tableFrom": "blog", + "tableTo": "media", + "columnsFrom": [ + "photo_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.blog_rels": { + "name": "blog_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "parish_id": { + "name": "parish_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "blog_rels_order_idx": { + "name": "blog_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "blog_rels_parent_idx": { + "name": "blog_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "blog_rels_path_idx": { + "name": "blog_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "blog_rels_parish_id_idx": { + "name": "blog_rels_parish_id_idx", + "columns": [ + { + "expression": "parish_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "blog_rels_parent_fk": { + "name": "blog_rels_parent_fk", + "tableFrom": "blog_rels", + "tableTo": "blog", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "blog_rels_parish_fk": { + "name": "blog_rels_parish_fk", + "tableFrom": "blog_rels", + "tableTo": "parish", + "columnsFrom": [ + "parish_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.highlight": { + "name": "highlight", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "from": { + "name": "from", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "until": { + "name": "until", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "date": { + "name": "date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "highlight_updated_at_idx": { + "name": "highlight_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "highlight_created_at_idx": { + "name": "highlight_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.highlight_rels": { + "name": "highlight_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "event_id": { + "name": "event_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "blog_id": { + "name": "blog_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "worship_id": { + "name": "worship_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "highlight_rels_order_idx": { + "name": "highlight_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "highlight_rels_parent_idx": { + "name": "highlight_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "highlight_rels_path_idx": { + "name": "highlight_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "highlight_rels_event_id_idx": { + "name": "highlight_rels_event_id_idx", + "columns": [ + { + "expression": "event_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "highlight_rels_blog_id_idx": { + "name": "highlight_rels_blog_id_idx", + "columns": [ + { + "expression": "blog_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "highlight_rels_worship_id_idx": { + "name": "highlight_rels_worship_id_idx", + "columns": [ + { + "expression": "worship_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "highlight_rels_parent_fk": { + "name": "highlight_rels_parent_fk", + "tableFrom": "highlight_rels", + "tableTo": "highlight", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "highlight_rels_event_fk": { + "name": "highlight_rels_event_fk", + "tableFrom": "highlight_rels", + "tableTo": "event", + "columnsFrom": [ + "event_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "highlight_rels_blog_fk": { + "name": "highlight_rels_blog_fk", + "tableFrom": "highlight_rels", + "tableTo": "blog", + "columnsFrom": [ + "blog_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "highlight_rels_worship_fk": { + "name": "highlight_rels_worship_fk", + "tableFrom": "highlight_rels", + "tableTo": "worship", + "columnsFrom": [ + "worship_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.event": { + "name": "event", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "photo_id": { + "name": "photo_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "date": { + "name": "date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "location_id": { + "name": "location_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "contact_id": { + "name": "contact_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "short_description": { + "name": "short_description", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "flyer_id": { + "name": "flyer_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "cancelled": { + "name": "cancelled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "is_recurring": { + "name": "is_recurring", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "event_photo_idx": { + "name": "event_photo_idx", + "columns": [ + { + "expression": "photo_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "event_location_idx": { + "name": "event_location_idx", + "columns": [ + { + "expression": "location_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "event_contact_idx": { + "name": "event_contact_idx", + "columns": [ + { + "expression": "contact_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "event_flyer_idx": { + "name": "event_flyer_idx", + "columns": [ + { + "expression": "flyer_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "event_updated_at_idx": { + "name": "event_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "event_created_at_idx": { + "name": "event_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "event_photo_id_media_id_fk": { + "name": "event_photo_id_media_id_fk", + "tableFrom": "event", + "tableTo": "media", + "columnsFrom": [ + "photo_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "event_location_id_locations_id_fk": { + "name": "event_location_id_locations_id_fk", + "tableFrom": "event", + "tableTo": "locations", + "columnsFrom": [ + "location_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "event_contact_id_contact_person_id_fk": { + "name": "event_contact_id_contact_person_id_fk", + "tableFrom": "event", + "tableTo": "contact_person", + "columnsFrom": [ + "contact_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "event_flyer_id_documents_id_fk": { + "name": "event_flyer_id_documents_id_fk", + "tableFrom": "event", + "tableTo": "documents", + "columnsFrom": [ + "flyer_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.event_rels": { + "name": "event_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "parish_id": { + "name": "parish_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "group_id": { + "name": "group_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "event_rels_order_idx": { + "name": "event_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "event_rels_parent_idx": { + "name": "event_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "event_rels_path_idx": { + "name": "event_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "event_rels_parish_id_idx": { + "name": "event_rels_parish_id_idx", + "columns": [ + { + "expression": "parish_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "event_rels_group_id_idx": { + "name": "event_rels_group_id_idx", + "columns": [ + { + "expression": "group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "event_rels_parent_fk": { + "name": "event_rels_parent_fk", + "tableFrom": "event_rels", + "tableTo": "event", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "event_rels_parish_fk": { + "name": "event_rels_parish_fk", + "tableFrom": "event_rels", + "tableTo": "parish", + "columnsFrom": [ + "parish_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "event_rels_group_fk": { + "name": "event_rels_group_fk", + "tableFrom": "event_rels", + "tableTo": "group", + "columnsFrom": [ + "group_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.contact_person": { + "name": "contact_person", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "telephone": { + "name": "telephone", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "contact_person_updated_at_idx": { + "name": "contact_person_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "contact_person_created_at_idx": { + "name": "contact_person_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.locations": { + "name": "locations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "address": { + "name": "address", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "coordinates": { + "name": "coordinates", + "type": "geometry(Point)", + "primaryKey": false, + "notNull": false + }, + "notes": { + "name": "notes", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "barrier_free": { + "name": "barrier_free", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "locations_name_idx": { + "name": "locations_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locations_updated_at_idx": { + "name": "locations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "locations_created_at_idx": { + "name": "locations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.group_blocks_text": { + "name": "group_blocks_text", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "content_html": { + "name": "content_html", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "enum_group_blocks_text_width", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'1/2'" + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "group_blocks_text_order_idx": { + "name": "group_blocks_text_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "group_blocks_text_parent_id_idx": { + "name": "group_blocks_text_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "group_blocks_text_path_idx": { + "name": "group_blocks_text_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "group_blocks_text_parent_id_fk": { + "name": "group_blocks_text_parent_id_fk", + "tableFrom": "group_blocks_text", + "tableTo": "group", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.group_blocks_gallery_items": { + "name": "group_blocks_gallery_items", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "photo_id": { + "name": "photo_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "group_blocks_gallery_items_order_idx": { + "name": "group_blocks_gallery_items_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "group_blocks_gallery_items_parent_id_idx": { + "name": "group_blocks_gallery_items_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "group_blocks_gallery_items_photo_idx": { + "name": "group_blocks_gallery_items_photo_idx", + "columns": [ + { + "expression": "photo_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "group_blocks_gallery_items_photo_id_media_id_fk": { + "name": "group_blocks_gallery_items_photo_id_media_id_fk", + "tableFrom": "group_blocks_gallery_items", + "tableTo": "media", + "columnsFrom": [ + "photo_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "group_blocks_gallery_items_parent_id_fk": { + "name": "group_blocks_gallery_items_parent_id_fk", + "tableFrom": "group_blocks_gallery_items", + "tableTo": "group_blocks_gallery", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.group_blocks_gallery": { + "name": "group_blocks_gallery", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "group_blocks_gallery_order_idx": { + "name": "group_blocks_gallery_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "group_blocks_gallery_parent_id_idx": { + "name": "group_blocks_gallery_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "group_blocks_gallery_path_idx": { + "name": "group_blocks_gallery_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "group_blocks_gallery_parent_id_fk": { + "name": "group_blocks_gallery_parent_id_fk", + "tableFrom": "group_blocks_gallery", + "tableTo": "group", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.group_blocks_document": { + "name": "group_blocks_document", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "file_id": { + "name": "file_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "button": { + "name": "button", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'Download Flyer'" + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "group_blocks_document_order_idx": { + "name": "group_blocks_document_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "group_blocks_document_parent_id_idx": { + "name": "group_blocks_document_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "group_blocks_document_path_idx": { + "name": "group_blocks_document_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "group_blocks_document_file_idx": { + "name": "group_blocks_document_file_idx", + "columns": [ + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "group_blocks_document_file_id_documents_id_fk": { + "name": "group_blocks_document_file_id_documents_id_fk", + "tableFrom": "group_blocks_document", + "tableTo": "documents", + "columnsFrom": [ + "file_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "group_blocks_document_parent_id_fk": { + "name": "group_blocks_document_parent_id_fk", + "tableFrom": "group_blocks_document", + "tableTo": "group", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.group_blocks_contactform": { + "name": "group_blocks_contactform", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'Ich bin dabei!'" + }, + "description": { + "name": "description", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'Um dich anzumelden oder uns zu unterstützen, fülle bitte das Kontaktformular aus. Wir freuen uns sehr, dass du Teil unserer Gemeinschaft bist und mit deinem Engagement dazu beiträgst, unsere Ziele zu erreichen. Solltest du Fragen haben oder weitere Informationen benötigen, zögere nicht, uns zu kontaktieren – wir sind gerne für dich da!'" + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'kontakt@dreikoenige.berlin'" + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "group_blocks_contactform_order_idx": { + "name": "group_blocks_contactform_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "group_blocks_contactform_parent_id_idx": { + "name": "group_blocks_contactform_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "group_blocks_contactform_path_idx": { + "name": "group_blocks_contactform_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "group_blocks_contactform_parent_id_fk": { + "name": "group_blocks_contactform_parent_id_fk", + "tableFrom": "group_blocks_contactform", + "tableTo": "group", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.group": { + "name": "group", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "photo_id": { + "name": "photo_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "short_description": { + "name": "short_description", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "text_html": { + "name": "text_html", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "group_photo_idx": { + "name": "group_photo_idx", + "columns": [ + { + "expression": "photo_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "group_slug_idx": { + "name": "group_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "group_updated_at_idx": { + "name": "group_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "group_created_at_idx": { + "name": "group_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "group_photo_id_media_id_fk": { + "name": "group_photo_id_media_id_fk", + "tableFrom": "group", + "tableTo": "media", + "columnsFrom": [ + "photo_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.employees": { + "name": "employees", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "photo_id": { + "name": "photo_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "occupation": { + "name": "occupation", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "telephone": { + "name": "telephone", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "employees_photo_idx": { + "name": "employees_photo_idx", + "columns": [ + { + "expression": "photo_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "employees_updated_at_idx": { + "name": "employees_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "employees_created_at_idx": { + "name": "employees_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "employees_photo_id_media_id_fk": { + "name": "employees_photo_id_media_id_fk", + "tableFrom": "employees", + "tableTo": "media", + "columnsFrom": [ + "photo_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.testimony": { + "name": "testimony", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "testimony": { + "name": "testimony", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "occupation": { + "name": "occupation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "category": { + "name": "category", + "type": "enum_testimony_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "testimony_updated_at_idx": { + "name": "testimony_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "testimony_created_at_idx": { + "name": "testimony_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.page_blocks_content": { + "name": "page_blocks_content", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "page_blocks_content_order_idx": { + "name": "page_blocks_content_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "page_blocks_content_parent_id_idx": { + "name": "page_blocks_content_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "page_blocks_content_path_idx": { + "name": "page_blocks_content_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "page_blocks_content_parent_id_fk": { + "name": "page_blocks_content_parent_id_fk", + "tableFrom": "page_blocks_content", + "tableTo": "page", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.page_blocks_title": { + "name": "page_blocks_title", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "page_blocks_title_order_idx": { + "name": "page_blocks_title_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "page_blocks_title_parent_id_idx": { + "name": "page_blocks_title_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "page_blocks_title_path_idx": { + "name": "page_blocks_title_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "page_blocks_title_parent_id_fk": { + "name": "page_blocks_title_parent_id_fk", + "tableFrom": "page_blocks_title", + "tableTo": "page", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.page_blocks_testimony": { + "name": "page_blocks_testimony", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "testimony_id": { + "name": "testimony_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "page_blocks_testimony_order_idx": { + "name": "page_blocks_testimony_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "page_blocks_testimony_parent_id_idx": { + "name": "page_blocks_testimony_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "page_blocks_testimony_path_idx": { + "name": "page_blocks_testimony_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "page_blocks_testimony_testimony_idx": { + "name": "page_blocks_testimony_testimony_idx", + "columns": [ + { + "expression": "testimony_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "page_blocks_testimony_testimony_id_testimony_id_fk": { + "name": "page_blocks_testimony_testimony_id_testimony_id_fk", + "tableFrom": "page_blocks_testimony", + "tableTo": "testimony", + "columnsFrom": [ + "testimony_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "page_blocks_testimony_parent_id_fk": { + "name": "page_blocks_testimony_parent_id_fk", + "tableFrom": "page_blocks_testimony", + "tableTo": "page", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.page": { + "name": "page", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "page_updated_at_idx": { + "name": "page_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "page_created_at_idx": { + "name": "page_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "roles": { + "name": "roles", + "type": "enum_users_roles", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'user'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "reset_password_token": { + "name": "reset_password_token", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reset_password_expiration": { + "name": "reset_password_expiration", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "salt": { + "name": "salt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hash": { + "name": "hash", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "login_attempts": { + "name": "login_attempts", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "lock_until": { + "name": "lock_until", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_updated_at_idx": { + "name": "users_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_created_at_idx": { + "name": "users_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_email_idx": { + "name": "users_email_idx", + "columns": [ + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_rels": { + "name": "users_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "group_id": { + "name": "group_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "users_rels_order_idx": { + "name": "users_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_rels_parent_idx": { + "name": "users_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_rels_path_idx": { + "name": "users_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_rels_group_id_idx": { + "name": "users_rels_group_id_idx", + "columns": [ + { + "expression": "group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_rels_parent_fk": { + "name": "users_rels_parent_fk", + "tableFrom": "users_rels", + "tableTo": "users", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "users_rels_group_fk": { + "name": "users_rels_group_fk", + "tableFrom": "users_rels", + "tableTo": "group", + "columnsFrom": [ + "group_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.documents": { + "name": "documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "prefix": { + "name": "prefix", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'documents/'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "documents_updated_at_idx": { + "name": "documents_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "documents_created_at_idx": { + "name": "documents_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "documents_filename_idx": { + "name": "documents_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.media": { + "name": "media", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "alt": { + "name": "alt", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "search": { + "name": "search", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "prefix": { + "name": "prefix", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'media/'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_thumbnail_url": { + "name": "sizes_thumbnail_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_thumbnail_width": { + "name": "sizes_thumbnail_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_thumbnail_height": { + "name": "sizes_thumbnail_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_thumbnail_mime_type": { + "name": "sizes_thumbnail_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_thumbnail_filesize": { + "name": "sizes_thumbnail_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_thumbnail_filename": { + "name": "sizes_thumbnail_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_banner_url": { + "name": "sizes_banner_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_banner_width": { + "name": "sizes_banner_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_banner_height": { + "name": "sizes_banner_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_banner_mime_type": { + "name": "sizes_banner_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_banner_filesize": { + "name": "sizes_banner_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_banner_filename": { + "name": "sizes_banner_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_gallery_url": { + "name": "sizes_gallery_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_gallery_width": { + "name": "sizes_gallery_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_gallery_height": { + "name": "sizes_gallery_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_gallery_mime_type": { + "name": "sizes_gallery_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_gallery_filesize": { + "name": "sizes_gallery_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_gallery_filename": { + "name": "sizes_gallery_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_tablet_url": { + "name": "sizes_tablet_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_tablet_width": { + "name": "sizes_tablet_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_tablet_height": { + "name": "sizes_tablet_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_tablet_mime_type": { + "name": "sizes_tablet_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_tablet_filesize": { + "name": "sizes_tablet_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_tablet_filename": { + "name": "sizes_tablet_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "media_updated_at_idx": { + "name": "media_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_created_at_idx": { + "name": "media_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_filename_idx": { + "name": "media_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_thumbnail_sizes_thumbnail_filename_idx": { + "name": "media_sizes_thumbnail_sizes_thumbnail_filename_idx", + "columns": [ + { + "expression": "sizes_thumbnail_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_banner_sizes_banner_filename_idx": { + "name": "media_sizes_banner_sizes_banner_filename_idx", + "columns": [ + { + "expression": "sizes_banner_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_gallery_sizes_gallery_filename_idx": { + "name": "media_sizes_gallery_sizes_gallery_filename_idx", + "columns": [ + { + "expression": "sizes_gallery_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_tablet_sizes_tablet_filename_idx": { + "name": "media_sizes_tablet_sizes_tablet_filename_idx", + "columns": [ + { + "expression": "sizes_tablet_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents": { + "name": "payload_locked_documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "global_slug": { + "name": "global_slug", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_locked_documents_global_slug_idx": { + "name": "payload_locked_documents_global_slug_idx", + "columns": [ + { + "expression": "global_slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_updated_at_idx": { + "name": "payload_locked_documents_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_created_at_idx": { + "name": "payload_locked_documents_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents_rels": { + "name": "payload_locked_documents_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "parish_id": { + "name": "parish_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "church_id": { + "name": "church_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "worship_id": { + "name": "worship_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "announcement_id": { + "name": "announcement_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "blog_id": { + "name": "blog_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "highlight_id": { + "name": "highlight_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "event_id": { + "name": "event_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "contact_person_id": { + "name": "contact_person_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "locations_id": { + "name": "locations_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "group_id": { + "name": "group_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "employees_id": { + "name": "employees_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "testimony_id": { + "name": "testimony_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "page_id": { + "name": "page_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "users_id": { + "name": "users_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "documents_id": { + "name": "documents_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "media_id": { + "name": "media_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_locked_documents_rels_order_idx": { + "name": "payload_locked_documents_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_parent_idx": { + "name": "payload_locked_documents_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_path_idx": { + "name": "payload_locked_documents_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_parish_id_idx": { + "name": "payload_locked_documents_rels_parish_id_idx", + "columns": [ + { + "expression": "parish_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_church_id_idx": { + "name": "payload_locked_documents_rels_church_id_idx", + "columns": [ + { + "expression": "church_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_worship_id_idx": { + "name": "payload_locked_documents_rels_worship_id_idx", + "columns": [ + { + "expression": "worship_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_announcement_id_idx": { + "name": "payload_locked_documents_rels_announcement_id_idx", + "columns": [ + { + "expression": "announcement_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_blog_id_idx": { + "name": "payload_locked_documents_rels_blog_id_idx", + "columns": [ + { + "expression": "blog_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_highlight_id_idx": { + "name": "payload_locked_documents_rels_highlight_id_idx", + "columns": [ + { + "expression": "highlight_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_event_id_idx": { + "name": "payload_locked_documents_rels_event_id_idx", + "columns": [ + { + "expression": "event_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_contact_person_id_idx": { + "name": "payload_locked_documents_rels_contact_person_id_idx", + "columns": [ + { + "expression": "contact_person_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_locations_id_idx": { + "name": "payload_locked_documents_rels_locations_id_idx", + "columns": [ + { + "expression": "locations_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_group_id_idx": { + "name": "payload_locked_documents_rels_group_id_idx", + "columns": [ + { + "expression": "group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_employees_id_idx": { + "name": "payload_locked_documents_rels_employees_id_idx", + "columns": [ + { + "expression": "employees_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_testimony_id_idx": { + "name": "payload_locked_documents_rels_testimony_id_idx", + "columns": [ + { + "expression": "testimony_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_page_id_idx": { + "name": "payload_locked_documents_rels_page_id_idx", + "columns": [ + { + "expression": "page_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_users_id_idx": { + "name": "payload_locked_documents_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_documents_id_idx": { + "name": "payload_locked_documents_rels_documents_id_idx", + "columns": [ + { + "expression": "documents_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_media_id_idx": { + "name": "payload_locked_documents_rels_media_id_idx", + "columns": [ + { + "expression": "media_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_locked_documents_rels_parent_fk": { + "name": "payload_locked_documents_rels_parent_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_locked_documents", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_parish_fk": { + "name": "payload_locked_documents_rels_parish_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "parish", + "columnsFrom": [ + "parish_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_church_fk": { + "name": "payload_locked_documents_rels_church_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "church", + "columnsFrom": [ + "church_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_worship_fk": { + "name": "payload_locked_documents_rels_worship_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "worship", + "columnsFrom": [ + "worship_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_announcement_fk": { + "name": "payload_locked_documents_rels_announcement_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "announcement", + "columnsFrom": [ + "announcement_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_blog_fk": { + "name": "payload_locked_documents_rels_blog_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "blog", + "columnsFrom": [ + "blog_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_highlight_fk": { + "name": "payload_locked_documents_rels_highlight_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "highlight", + "columnsFrom": [ + "highlight_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_event_fk": { + "name": "payload_locked_documents_rels_event_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "event", + "columnsFrom": [ + "event_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_contact_person_fk": { + "name": "payload_locked_documents_rels_contact_person_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "contact_person", + "columnsFrom": [ + "contact_person_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_locations_fk": { + "name": "payload_locked_documents_rels_locations_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "locations", + "columnsFrom": [ + "locations_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_group_fk": { + "name": "payload_locked_documents_rels_group_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "group", + "columnsFrom": [ + "group_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_employees_fk": { + "name": "payload_locked_documents_rels_employees_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "employees", + "columnsFrom": [ + "employees_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_testimony_fk": { + "name": "payload_locked_documents_rels_testimony_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "testimony", + "columnsFrom": [ + "testimony_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_page_fk": { + "name": "payload_locked_documents_rels_page_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "page", + "columnsFrom": [ + "page_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_users_fk": { + "name": "payload_locked_documents_rels_users_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_documents_fk": { + "name": "payload_locked_documents_rels_documents_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "documents", + "columnsFrom": [ + "documents_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_media_fk": { + "name": "payload_locked_documents_rels_media_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "media", + "columnsFrom": [ + "media_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences": { + "name": "payload_preferences", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "value": { + "name": "value", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_preferences_key_idx": { + "name": "payload_preferences_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_updated_at_idx": { + "name": "payload_preferences_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_created_at_idx": { + "name": "payload_preferences_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_preferences_rels": { + "name": "payload_preferences_rels", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_preferences_rels_order_idx": { + "name": "payload_preferences_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_parent_idx": { + "name": "payload_preferences_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_path_idx": { + "name": "payload_preferences_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_preferences_rels_users_id_idx": { + "name": "payload_preferences_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_preferences_rels_parent_fk": { + "name": "payload_preferences_rels_parent_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "payload_preferences", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_preferences_rels_users_fk": { + "name": "payload_preferences_rels_users_fk", + "tableFrom": "payload_preferences_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_migrations": { + "name": "payload_migrations", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "batch": { + "name": "batch", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "payload_migrations_updated_at_idx": { + "name": "payload_migrations_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_migrations_created_at_idx": { + "name": "payload_migrations_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.enum_worship_type": { + "name": "enum_worship_type", + "schema": "public", + "values": [ + "MASS", + "FAMILY", + "WORD" + ] + }, + "public.enum_blog_blocks_text_width": { + "name": "enum_blog_blocks_text_width", + "schema": "public", + "values": [ + "1/2", + "3/4" + ] + }, + "public.enum_group_blocks_text_width": { + "name": "enum_group_blocks_text_width", + "schema": "public", + "values": [ + "1/2", + "3/4" + ] + }, + "public.enum_testimony_category": { + "name": "enum_testimony_category", + "schema": "public", + "values": [ + "EUCHARIST" + ] + }, + "public.enum_users_roles": { + "name": "enum_users_roles", + "schema": "public", + "values": [ + "user", + "employee", + "admin" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + } +} \ No newline at end of file diff --git a/src/migrations/20241205_121237.ts b/src/migrations/20241205_121237.ts new file mode 100644 index 0000000..07418e3 --- /dev/null +++ b/src/migrations/20241205_121237.ts @@ -0,0 +1,1068 @@ +import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres' + +export async function up({ payload, req }: MigrateUpArgs): Promise { + await payload.db.drizzle.execute(sql` + CREATE TYPE "public"."enum_worship_type" AS ENUM('MASS', 'FAMILY', 'WORD'); + CREATE TYPE "public"."enum_blog_blocks_text_width" AS ENUM('1/2', '3/4'); + CREATE TYPE "public"."enum_group_blocks_text_width" AS ENUM('1/2', '3/4'); + CREATE TYPE "public"."enum_testimony_category" AS ENUM('EUCHARIST'); + CREATE TYPE "public"."enum_users_roles" AS ENUM('user', 'employee', 'admin'); + CREATE TABLE IF NOT EXISTS "parish_contact_persons" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "title" varchar NOT NULL, + "description" varchar NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "parish_gallery" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "photo_id" uuid NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "parish" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "name" varchar NOT NULL, + "slug" varchar NOT NULL, + "description" varchar NOT NULL, + "history" varchar NOT NULL, + "contact" varchar NOT NULL, + "photo_id" uuid NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "parish_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" uuid NOT NULL, + "path" varchar NOT NULL, + "church_id" uuid, + "employees_id" uuid + ); + + CREATE TABLE IF NOT EXISTS "church" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "name" varchar NOT NULL, + "address" varchar NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "worship" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "date" timestamp(3) with time zone NOT NULL, + "location_id" uuid NOT NULL, + "type" "enum_worship_type" NOT NULL, + "title" varchar, + "cancelled" boolean DEFAULT false NOT NULL, + "liturgical_day" varchar, + "celebrant" varchar, + "description" varchar, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "announcement" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "date" timestamp(3) with time zone NOT NULL, + "document_id" uuid NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "announcement_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" uuid NOT NULL, + "path" varchar NOT NULL, + "parish_id" uuid + ); + + CREATE TABLE IF NOT EXISTS "blog_blocks_text" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "content" jsonb NOT NULL, + "content_html" varchar, + "width" "enum_blog_blocks_text_width" DEFAULT '1/2' NOT NULL, + "block_name" varchar + ); + + CREATE TABLE IF NOT EXISTS "blog_blocks_document" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "file_id" uuid NOT NULL, + "button" varchar DEFAULT 'Download Flyer' NOT NULL, + "block_name" varchar + ); + + CREATE TABLE IF NOT EXISTS "blog_blocks_contactform" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "title" varchar DEFAULT 'Ich bin dabei!' NOT NULL, + "description" varchar DEFAULT 'Um dich anzumelden oder uns zu unterstützen, fülle bitte das Kontaktformular aus. Wir freuen uns sehr, dass du Teil unserer Gemeinschaft bist und mit deinem Engagement dazu beiträgst, unsere Ziele zu erreichen. Solltest du Fragen haben oder weitere Informationen benötigen, zögere nicht, uns zu kontaktieren – wir sind gerne für dich da!' NOT NULL, + "email" varchar DEFAULT 'kontakt@dreikoenige.berlin' NOT NULL, + "block_name" varchar + ); + + CREATE TABLE IF NOT EXISTS "blog_blocks_gallery_items" ( + "_order" integer NOT NULL, + "_parent_id" varchar NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "photo_id" uuid NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "blog_blocks_gallery" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "block_name" varchar + ); + + CREATE TABLE IF NOT EXISTS "blog" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "photo_id" uuid, + "title" varchar NOT NULL, + "excerpt" varchar NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "blog_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" uuid NOT NULL, + "path" varchar NOT NULL, + "parish_id" uuid + ); + + CREATE TABLE IF NOT EXISTS "highlight" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "from" timestamp(3) with time zone NOT NULL, + "until" timestamp(3) with time zone NOT NULL, + "date" timestamp(3) with time zone NOT NULL, + "text" varchar NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "highlight_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" uuid NOT NULL, + "path" varchar NOT NULL, + "event_id" uuid, + "blog_id" uuid, + "worship_id" uuid + ); + + CREATE TABLE IF NOT EXISTS "event" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "photo_id" uuid, + "title" varchar NOT NULL, + "date" timestamp(3) with time zone NOT NULL, + "location_id" uuid NOT NULL, + "contact_id" uuid, + "short_description" varchar NOT NULL, + "description" varchar NOT NULL, + "flyer_id" uuid, + "cancelled" boolean DEFAULT false NOT NULL, + "is_recurring" boolean DEFAULT false NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "event_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" uuid NOT NULL, + "path" varchar NOT NULL, + "parish_id" uuid, + "group_id" uuid + ); + + CREATE TABLE IF NOT EXISTS "contact_person" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "name" varchar NOT NULL, + "email" varchar, + "telephone" varchar, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "locations" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "name" varchar NOT NULL, + "address" varchar, + "coordinates" geometry(Point), + "notes" varchar, + "barrier_free" boolean DEFAULT false, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "group_blocks_text" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "content" jsonb NOT NULL, + "content_html" varchar, + "width" "enum_group_blocks_text_width" DEFAULT '1/2' NOT NULL, + "block_name" varchar + ); + + CREATE TABLE IF NOT EXISTS "group_blocks_gallery_items" ( + "_order" integer NOT NULL, + "_parent_id" varchar NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "photo_id" uuid NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "group_blocks_gallery" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "block_name" varchar + ); + + CREATE TABLE IF NOT EXISTS "group_blocks_document" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "file_id" uuid NOT NULL, + "button" varchar DEFAULT 'Download Flyer' NOT NULL, + "block_name" varchar + ); + + CREATE TABLE IF NOT EXISTS "group_blocks_contactform" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "title" varchar DEFAULT 'Ich bin dabei!' NOT NULL, + "description" varchar DEFAULT 'Um dich anzumelden oder uns zu unterstützen, fülle bitte das Kontaktformular aus. Wir freuen uns sehr, dass du Teil unserer Gemeinschaft bist und mit deinem Engagement dazu beiträgst, unsere Ziele zu erreichen. Solltest du Fragen haben oder weitere Informationen benötigen, zögere nicht, uns zu kontaktieren – wir sind gerne für dich da!' NOT NULL, + "email" varchar DEFAULT 'kontakt@dreikoenige.berlin' NOT NULL, + "block_name" varchar + ); + + CREATE TABLE IF NOT EXISTS "group" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "photo_id" uuid, + "name" varchar NOT NULL, + "slug" varchar NOT NULL, + "short_description" varchar NOT NULL, + "text" jsonb, + "text_html" varchar, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "employees" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "photo_id" uuid, + "name" varchar NOT NULL, + "occupation" varchar NOT NULL, + "email" varchar, + "telephone" varchar, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "testimony" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "testimony" varchar NOT NULL, + "name" varchar NOT NULL, + "occupation" varchar, + "category" "enum_testimony_category" NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "page_blocks_content" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "content" jsonb NOT NULL, + "block_name" varchar + ); + + CREATE TABLE IF NOT EXISTS "page_blocks_title" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "title" varchar NOT NULL, + "block_name" varchar + ); + + CREATE TABLE IF NOT EXISTS "page_blocks_testimony" ( + "_order" integer NOT NULL, + "_parent_id" uuid NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "testimony_id" uuid NOT NULL, + "block_name" varchar + ); + + CREATE TABLE IF NOT EXISTS "page" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "title" varchar NOT NULL, + "slug" varchar NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "users" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "name" varchar DEFAULT '' NOT NULL, + "roles" "enum_users_roles" DEFAULT 'user' NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "email" varchar NOT NULL, + "reset_password_token" varchar, + "reset_password_expiration" timestamp(3) with time zone, + "salt" varchar, + "hash" varchar, + "login_attempts" numeric DEFAULT 0, + "lock_until" timestamp(3) with time zone + ); + + CREATE TABLE IF NOT EXISTS "users_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" uuid NOT NULL, + "path" varchar NOT NULL, + "group_id" uuid + ); + + CREATE TABLE IF NOT EXISTS "documents" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "name" varchar NOT NULL, + "prefix" varchar DEFAULT 'documents/', + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "url" varchar, + "thumbnail_u_r_l" varchar, + "filename" varchar, + "mime_type" varchar, + "filesize" numeric, + "width" numeric, + "height" numeric, + "focal_x" numeric, + "focal_y" numeric + ); + + CREATE TABLE IF NOT EXISTS "media" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "alt" varchar NOT NULL, + "search" varchar, + "prefix" varchar DEFAULT 'media/', + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "url" varchar, + "thumbnail_u_r_l" varchar, + "filename" varchar, + "mime_type" varchar, + "filesize" numeric, + "width" numeric, + "height" numeric, + "focal_x" numeric, + "focal_y" numeric, + "sizes_thumbnail_url" varchar, + "sizes_thumbnail_width" numeric, + "sizes_thumbnail_height" numeric, + "sizes_thumbnail_mime_type" varchar, + "sizes_thumbnail_filesize" numeric, + "sizes_thumbnail_filename" varchar, + "sizes_banner_url" varchar, + "sizes_banner_width" numeric, + "sizes_banner_height" numeric, + "sizes_banner_mime_type" varchar, + "sizes_banner_filesize" numeric, + "sizes_banner_filename" varchar, + "sizes_gallery_url" varchar, + "sizes_gallery_width" numeric, + "sizes_gallery_height" numeric, + "sizes_gallery_mime_type" varchar, + "sizes_gallery_filesize" numeric, + "sizes_gallery_filename" varchar, + "sizes_tablet_url" varchar, + "sizes_tablet_width" numeric, + "sizes_tablet_height" numeric, + "sizes_tablet_mime_type" varchar, + "sizes_tablet_filesize" numeric, + "sizes_tablet_filename" varchar + ); + + CREATE TABLE IF NOT EXISTS "payload_locked_documents" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "global_slug" varchar, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "payload_locked_documents_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" uuid NOT NULL, + "path" varchar NOT NULL, + "parish_id" uuid, + "church_id" uuid, + "worship_id" uuid, + "announcement_id" uuid, + "blog_id" uuid, + "highlight_id" uuid, + "event_id" uuid, + "contact_person_id" uuid, + "locations_id" uuid, + "group_id" uuid, + "employees_id" uuid, + "testimony_id" uuid, + "page_id" uuid, + "users_id" uuid, + "documents_id" uuid, + "media_id" uuid + ); + + CREATE TABLE IF NOT EXISTS "payload_preferences" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "key" varchar, + "value" jsonb, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE IF NOT EXISTS "payload_preferences_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" uuid NOT NULL, + "path" varchar NOT NULL, + "users_id" uuid + ); + + CREATE TABLE IF NOT EXISTS "payload_migrations" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "name" varchar, + "batch" numeric, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + DO $$ BEGIN + ALTER TABLE "parish_contact_persons" ADD CONSTRAINT "parish_contact_persons_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."parish"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "parish_gallery" ADD CONSTRAINT "parish_gallery_photo_id_media_id_fk" FOREIGN KEY ("photo_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "parish_gallery" ADD CONSTRAINT "parish_gallery_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."parish"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "parish" ADD CONSTRAINT "parish_photo_id_media_id_fk" FOREIGN KEY ("photo_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "parish_rels" ADD CONSTRAINT "parish_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."parish"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "parish_rels" ADD CONSTRAINT "parish_rels_church_fk" FOREIGN KEY ("church_id") REFERENCES "public"."church"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "parish_rels" ADD CONSTRAINT "parish_rels_employees_fk" FOREIGN KEY ("employees_id") REFERENCES "public"."employees"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "worship" ADD CONSTRAINT "worship_location_id_church_id_fk" FOREIGN KEY ("location_id") REFERENCES "public"."church"("id") ON DELETE set null ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "announcement" ADD CONSTRAINT "announcement_document_id_documents_id_fk" FOREIGN KEY ("document_id") REFERENCES "public"."documents"("id") ON DELETE set null ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "announcement_rels" ADD CONSTRAINT "announcement_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."announcement"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "announcement_rels" ADD CONSTRAINT "announcement_rels_parish_fk" FOREIGN KEY ("parish_id") REFERENCES "public"."parish"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "blog_blocks_text" ADD CONSTRAINT "blog_blocks_text_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."blog"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "blog_blocks_document" ADD CONSTRAINT "blog_blocks_document_file_id_documents_id_fk" FOREIGN KEY ("file_id") REFERENCES "public"."documents"("id") ON DELETE set null ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "blog_blocks_document" ADD CONSTRAINT "blog_blocks_document_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."blog"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "blog_blocks_contactform" ADD CONSTRAINT "blog_blocks_contactform_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."blog"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "blog_blocks_gallery_items" ADD CONSTRAINT "blog_blocks_gallery_items_photo_id_media_id_fk" FOREIGN KEY ("photo_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "blog_blocks_gallery_items" ADD CONSTRAINT "blog_blocks_gallery_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."blog_blocks_gallery"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "blog_blocks_gallery" ADD CONSTRAINT "blog_blocks_gallery_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."blog"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "blog" ADD CONSTRAINT "blog_photo_id_media_id_fk" FOREIGN KEY ("photo_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "blog_rels" ADD CONSTRAINT "blog_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."blog"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "blog_rels" ADD CONSTRAINT "blog_rels_parish_fk" FOREIGN KEY ("parish_id") REFERENCES "public"."parish"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "highlight_rels" ADD CONSTRAINT "highlight_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."highlight"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "highlight_rels" ADD CONSTRAINT "highlight_rels_event_fk" FOREIGN KEY ("event_id") REFERENCES "public"."event"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "highlight_rels" ADD CONSTRAINT "highlight_rels_blog_fk" FOREIGN KEY ("blog_id") REFERENCES "public"."blog"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "highlight_rels" ADD CONSTRAINT "highlight_rels_worship_fk" FOREIGN KEY ("worship_id") REFERENCES "public"."worship"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "event" ADD CONSTRAINT "event_photo_id_media_id_fk" FOREIGN KEY ("photo_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "event" ADD CONSTRAINT "event_location_id_locations_id_fk" FOREIGN KEY ("location_id") REFERENCES "public"."locations"("id") ON DELETE set null ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "event" ADD CONSTRAINT "event_contact_id_contact_person_id_fk" FOREIGN KEY ("contact_id") REFERENCES "public"."contact_person"("id") ON DELETE set null ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "event" ADD CONSTRAINT "event_flyer_id_documents_id_fk" FOREIGN KEY ("flyer_id") REFERENCES "public"."documents"("id") ON DELETE set null ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "event_rels" ADD CONSTRAINT "event_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."event"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "event_rels" ADD CONSTRAINT "event_rels_parish_fk" FOREIGN KEY ("parish_id") REFERENCES "public"."parish"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "event_rels" ADD CONSTRAINT "event_rels_group_fk" FOREIGN KEY ("group_id") REFERENCES "public"."group"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "group_blocks_text" ADD CONSTRAINT "group_blocks_text_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."group"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "group_blocks_gallery_items" ADD CONSTRAINT "group_blocks_gallery_items_photo_id_media_id_fk" FOREIGN KEY ("photo_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "group_blocks_gallery_items" ADD CONSTRAINT "group_blocks_gallery_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."group_blocks_gallery"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "group_blocks_gallery" ADD CONSTRAINT "group_blocks_gallery_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."group"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "group_blocks_document" ADD CONSTRAINT "group_blocks_document_file_id_documents_id_fk" FOREIGN KEY ("file_id") REFERENCES "public"."documents"("id") ON DELETE set null ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "group_blocks_document" ADD CONSTRAINT "group_blocks_document_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."group"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "group_blocks_contactform" ADD CONSTRAINT "group_blocks_contactform_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."group"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "group" ADD CONSTRAINT "group_photo_id_media_id_fk" FOREIGN KEY ("photo_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "employees" ADD CONSTRAINT "employees_photo_id_media_id_fk" FOREIGN KEY ("photo_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "page_blocks_content" ADD CONSTRAINT "page_blocks_content_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."page"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "page_blocks_title" ADD CONSTRAINT "page_blocks_title_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."page"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "page_blocks_testimony" ADD CONSTRAINT "page_blocks_testimony_testimony_id_testimony_id_fk" FOREIGN KEY ("testimony_id") REFERENCES "public"."testimony"("id") ON DELETE set null ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "page_blocks_testimony" ADD CONSTRAINT "page_blocks_testimony_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."page"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "users_rels" ADD CONSTRAINT "users_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "users_rels" ADD CONSTRAINT "users_rels_group_fk" FOREIGN KEY ("group_id") REFERENCES "public"."group"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."payload_locked_documents"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_parish_fk" FOREIGN KEY ("parish_id") REFERENCES "public"."parish"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_church_fk" FOREIGN KEY ("church_id") REFERENCES "public"."church"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_worship_fk" FOREIGN KEY ("worship_id") REFERENCES "public"."worship"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_announcement_fk" FOREIGN KEY ("announcement_id") REFERENCES "public"."announcement"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_blog_fk" FOREIGN KEY ("blog_id") REFERENCES "public"."blog"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_highlight_fk" FOREIGN KEY ("highlight_id") REFERENCES "public"."highlight"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_event_fk" FOREIGN KEY ("event_id") REFERENCES "public"."event"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_contact_person_fk" FOREIGN KEY ("contact_person_id") REFERENCES "public"."contact_person"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_locations_fk" FOREIGN KEY ("locations_id") REFERENCES "public"."locations"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_group_fk" FOREIGN KEY ("group_id") REFERENCES "public"."group"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_employees_fk" FOREIGN KEY ("employees_id") REFERENCES "public"."employees"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_testimony_fk" FOREIGN KEY ("testimony_id") REFERENCES "public"."testimony"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_page_fk" FOREIGN KEY ("page_id") REFERENCES "public"."page"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_users_fk" FOREIGN KEY ("users_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_documents_fk" FOREIGN KEY ("documents_id") REFERENCES "public"."documents"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_media_fk" FOREIGN KEY ("media_id") REFERENCES "public"."media"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_preferences_rels" ADD CONSTRAINT "payload_preferences_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."payload_preferences"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + DO $$ BEGIN + ALTER TABLE "payload_preferences_rels" ADD CONSTRAINT "payload_preferences_rels_users_fk" FOREIGN KEY ("users_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action; + EXCEPTION + WHEN duplicate_object THEN null; + END $$; + + CREATE INDEX IF NOT EXISTS "parish_contact_persons_order_idx" ON "parish_contact_persons" USING btree ("_order"); + CREATE INDEX IF NOT EXISTS "parish_contact_persons_parent_id_idx" ON "parish_contact_persons" USING btree ("_parent_id"); + CREATE INDEX IF NOT EXISTS "parish_gallery_order_idx" ON "parish_gallery" USING btree ("_order"); + CREATE INDEX IF NOT EXISTS "parish_gallery_parent_id_idx" ON "parish_gallery" USING btree ("_parent_id"); + CREATE INDEX IF NOT EXISTS "parish_gallery_photo_idx" ON "parish_gallery" USING btree ("photo_id"); + CREATE INDEX IF NOT EXISTS "parish_photo_idx" ON "parish" USING btree ("photo_id"); + CREATE INDEX IF NOT EXISTS "parish_updated_at_idx" ON "parish" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "parish_created_at_idx" ON "parish" USING btree ("created_at"); + CREATE INDEX IF NOT EXISTS "parish_rels_order_idx" ON "parish_rels" USING btree ("order"); + CREATE INDEX IF NOT EXISTS "parish_rels_parent_idx" ON "parish_rels" USING btree ("parent_id"); + CREATE INDEX IF NOT EXISTS "parish_rels_path_idx" ON "parish_rels" USING btree ("path"); + CREATE INDEX IF NOT EXISTS "parish_rels_church_id_idx" ON "parish_rels" USING btree ("church_id"); + CREATE INDEX IF NOT EXISTS "parish_rels_employees_id_idx" ON "parish_rels" USING btree ("employees_id"); + CREATE INDEX IF NOT EXISTS "church_updated_at_idx" ON "church" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "church_created_at_idx" ON "church" USING btree ("created_at"); + CREATE INDEX IF NOT EXISTS "worship_location_idx" ON "worship" USING btree ("location_id"); + CREATE INDEX IF NOT EXISTS "worship_updated_at_idx" ON "worship" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "worship_created_at_idx" ON "worship" USING btree ("created_at"); + CREATE INDEX IF NOT EXISTS "announcement_document_idx" ON "announcement" USING btree ("document_id"); + CREATE INDEX IF NOT EXISTS "announcement_updated_at_idx" ON "announcement" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "announcement_created_at_idx" ON "announcement" USING btree ("created_at"); + CREATE INDEX IF NOT EXISTS "announcement_rels_order_idx" ON "announcement_rels" USING btree ("order"); + CREATE INDEX IF NOT EXISTS "announcement_rels_parent_idx" ON "announcement_rels" USING btree ("parent_id"); + CREATE INDEX IF NOT EXISTS "announcement_rels_path_idx" ON "announcement_rels" USING btree ("path"); + CREATE INDEX IF NOT EXISTS "announcement_rels_parish_id_idx" ON "announcement_rels" USING btree ("parish_id"); + CREATE INDEX IF NOT EXISTS "blog_blocks_text_order_idx" ON "blog_blocks_text" USING btree ("_order"); + CREATE INDEX IF NOT EXISTS "blog_blocks_text_parent_id_idx" ON "blog_blocks_text" USING btree ("_parent_id"); + CREATE INDEX IF NOT EXISTS "blog_blocks_text_path_idx" ON "blog_blocks_text" USING btree ("_path"); + CREATE INDEX IF NOT EXISTS "blog_blocks_document_order_idx" ON "blog_blocks_document" USING btree ("_order"); + CREATE INDEX IF NOT EXISTS "blog_blocks_document_parent_id_idx" ON "blog_blocks_document" USING btree ("_parent_id"); + CREATE INDEX IF NOT EXISTS "blog_blocks_document_path_idx" ON "blog_blocks_document" USING btree ("_path"); + CREATE INDEX IF NOT EXISTS "blog_blocks_document_file_idx" ON "blog_blocks_document" USING btree ("file_id"); + CREATE INDEX IF NOT EXISTS "blog_blocks_contactform_order_idx" ON "blog_blocks_contactform" USING btree ("_order"); + CREATE INDEX IF NOT EXISTS "blog_blocks_contactform_parent_id_idx" ON "blog_blocks_contactform" USING btree ("_parent_id"); + CREATE INDEX IF NOT EXISTS "blog_blocks_contactform_path_idx" ON "blog_blocks_contactform" USING btree ("_path"); + CREATE INDEX IF NOT EXISTS "blog_blocks_gallery_items_order_idx" ON "blog_blocks_gallery_items" USING btree ("_order"); + CREATE INDEX IF NOT EXISTS "blog_blocks_gallery_items_parent_id_idx" ON "blog_blocks_gallery_items" USING btree ("_parent_id"); + CREATE INDEX IF NOT EXISTS "blog_blocks_gallery_items_photo_idx" ON "blog_blocks_gallery_items" USING btree ("photo_id"); + CREATE INDEX IF NOT EXISTS "blog_blocks_gallery_order_idx" ON "blog_blocks_gallery" USING btree ("_order"); + CREATE INDEX IF NOT EXISTS "blog_blocks_gallery_parent_id_idx" ON "blog_blocks_gallery" USING btree ("_parent_id"); + CREATE INDEX IF NOT EXISTS "blog_blocks_gallery_path_idx" ON "blog_blocks_gallery" USING btree ("_path"); + CREATE INDEX IF NOT EXISTS "blog_photo_idx" ON "blog" USING btree ("photo_id"); + CREATE INDEX IF NOT EXISTS "blog_updated_at_idx" ON "blog" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "blog_created_at_idx" ON "blog" USING btree ("created_at"); + CREATE INDEX IF NOT EXISTS "blog_rels_order_idx" ON "blog_rels" USING btree ("order"); + CREATE INDEX IF NOT EXISTS "blog_rels_parent_idx" ON "blog_rels" USING btree ("parent_id"); + CREATE INDEX IF NOT EXISTS "blog_rels_path_idx" ON "blog_rels" USING btree ("path"); + CREATE INDEX IF NOT EXISTS "blog_rels_parish_id_idx" ON "blog_rels" USING btree ("parish_id"); + CREATE INDEX IF NOT EXISTS "highlight_updated_at_idx" ON "highlight" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "highlight_created_at_idx" ON "highlight" USING btree ("created_at"); + CREATE INDEX IF NOT EXISTS "highlight_rels_order_idx" ON "highlight_rels" USING btree ("order"); + CREATE INDEX IF NOT EXISTS "highlight_rels_parent_idx" ON "highlight_rels" USING btree ("parent_id"); + CREATE INDEX IF NOT EXISTS "highlight_rels_path_idx" ON "highlight_rels" USING btree ("path"); + CREATE INDEX IF NOT EXISTS "highlight_rels_event_id_idx" ON "highlight_rels" USING btree ("event_id"); + CREATE INDEX IF NOT EXISTS "highlight_rels_blog_id_idx" ON "highlight_rels" USING btree ("blog_id"); + CREATE INDEX IF NOT EXISTS "highlight_rels_worship_id_idx" ON "highlight_rels" USING btree ("worship_id"); + CREATE INDEX IF NOT EXISTS "event_photo_idx" ON "event" USING btree ("photo_id"); + CREATE INDEX IF NOT EXISTS "event_location_idx" ON "event" USING btree ("location_id"); + CREATE INDEX IF NOT EXISTS "event_contact_idx" ON "event" USING btree ("contact_id"); + CREATE INDEX IF NOT EXISTS "event_flyer_idx" ON "event" USING btree ("flyer_id"); + CREATE INDEX IF NOT EXISTS "event_updated_at_idx" ON "event" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "event_created_at_idx" ON "event" USING btree ("created_at"); + CREATE INDEX IF NOT EXISTS "event_rels_order_idx" ON "event_rels" USING btree ("order"); + CREATE INDEX IF NOT EXISTS "event_rels_parent_idx" ON "event_rels" USING btree ("parent_id"); + CREATE INDEX IF NOT EXISTS "event_rels_path_idx" ON "event_rels" USING btree ("path"); + CREATE INDEX IF NOT EXISTS "event_rels_parish_id_idx" ON "event_rels" USING btree ("parish_id"); + CREATE INDEX IF NOT EXISTS "event_rels_group_id_idx" ON "event_rels" USING btree ("group_id"); + CREATE INDEX IF NOT EXISTS "contact_person_updated_at_idx" ON "contact_person" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "contact_person_created_at_idx" ON "contact_person" USING btree ("created_at"); + CREATE UNIQUE INDEX IF NOT EXISTS "locations_name_idx" ON "locations" USING btree ("name"); + CREATE INDEX IF NOT EXISTS "locations_updated_at_idx" ON "locations" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "locations_created_at_idx" ON "locations" USING btree ("created_at"); + CREATE INDEX IF NOT EXISTS "group_blocks_text_order_idx" ON "group_blocks_text" USING btree ("_order"); + CREATE INDEX IF NOT EXISTS "group_blocks_text_parent_id_idx" ON "group_blocks_text" USING btree ("_parent_id"); + CREATE INDEX IF NOT EXISTS "group_blocks_text_path_idx" ON "group_blocks_text" USING btree ("_path"); + CREATE INDEX IF NOT EXISTS "group_blocks_gallery_items_order_idx" ON "group_blocks_gallery_items" USING btree ("_order"); + CREATE INDEX IF NOT EXISTS "group_blocks_gallery_items_parent_id_idx" ON "group_blocks_gallery_items" USING btree ("_parent_id"); + CREATE INDEX IF NOT EXISTS "group_blocks_gallery_items_photo_idx" ON "group_blocks_gallery_items" USING btree ("photo_id"); + CREATE INDEX IF NOT EXISTS "group_blocks_gallery_order_idx" ON "group_blocks_gallery" USING btree ("_order"); + CREATE INDEX IF NOT EXISTS "group_blocks_gallery_parent_id_idx" ON "group_blocks_gallery" USING btree ("_parent_id"); + CREATE INDEX IF NOT EXISTS "group_blocks_gallery_path_idx" ON "group_blocks_gallery" USING btree ("_path"); + CREATE INDEX IF NOT EXISTS "group_blocks_document_order_idx" ON "group_blocks_document" USING btree ("_order"); + CREATE INDEX IF NOT EXISTS "group_blocks_document_parent_id_idx" ON "group_blocks_document" USING btree ("_parent_id"); + CREATE INDEX IF NOT EXISTS "group_blocks_document_path_idx" ON "group_blocks_document" USING btree ("_path"); + CREATE INDEX IF NOT EXISTS "group_blocks_document_file_idx" ON "group_blocks_document" USING btree ("file_id"); + CREATE INDEX IF NOT EXISTS "group_blocks_contactform_order_idx" ON "group_blocks_contactform" USING btree ("_order"); + CREATE INDEX IF NOT EXISTS "group_blocks_contactform_parent_id_idx" ON "group_blocks_contactform" USING btree ("_parent_id"); + CREATE INDEX IF NOT EXISTS "group_blocks_contactform_path_idx" ON "group_blocks_contactform" USING btree ("_path"); + CREATE INDEX IF NOT EXISTS "group_photo_idx" ON "group" USING btree ("photo_id"); + CREATE UNIQUE INDEX IF NOT EXISTS "group_slug_idx" ON "group" USING btree ("slug"); + CREATE INDEX IF NOT EXISTS "group_updated_at_idx" ON "group" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "group_created_at_idx" ON "group" USING btree ("created_at"); + CREATE INDEX IF NOT EXISTS "employees_photo_idx" ON "employees" USING btree ("photo_id"); + CREATE INDEX IF NOT EXISTS "employees_updated_at_idx" ON "employees" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "employees_created_at_idx" ON "employees" USING btree ("created_at"); + CREATE INDEX IF NOT EXISTS "testimony_updated_at_idx" ON "testimony" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "testimony_created_at_idx" ON "testimony" USING btree ("created_at"); + CREATE INDEX IF NOT EXISTS "page_blocks_content_order_idx" ON "page_blocks_content" USING btree ("_order"); + CREATE INDEX IF NOT EXISTS "page_blocks_content_parent_id_idx" ON "page_blocks_content" USING btree ("_parent_id"); + CREATE INDEX IF NOT EXISTS "page_blocks_content_path_idx" ON "page_blocks_content" USING btree ("_path"); + CREATE INDEX IF NOT EXISTS "page_blocks_title_order_idx" ON "page_blocks_title" USING btree ("_order"); + CREATE INDEX IF NOT EXISTS "page_blocks_title_parent_id_idx" ON "page_blocks_title" USING btree ("_parent_id"); + CREATE INDEX IF NOT EXISTS "page_blocks_title_path_idx" ON "page_blocks_title" USING btree ("_path"); + CREATE INDEX IF NOT EXISTS "page_blocks_testimony_order_idx" ON "page_blocks_testimony" USING btree ("_order"); + CREATE INDEX IF NOT EXISTS "page_blocks_testimony_parent_id_idx" ON "page_blocks_testimony" USING btree ("_parent_id"); + CREATE INDEX IF NOT EXISTS "page_blocks_testimony_path_idx" ON "page_blocks_testimony" USING btree ("_path"); + CREATE INDEX IF NOT EXISTS "page_blocks_testimony_testimony_idx" ON "page_blocks_testimony" USING btree ("testimony_id"); + CREATE INDEX IF NOT EXISTS "page_updated_at_idx" ON "page" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "page_created_at_idx" ON "page" USING btree ("created_at"); + CREATE INDEX IF NOT EXISTS "users_updated_at_idx" ON "users" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "users_created_at_idx" ON "users" USING btree ("created_at"); + CREATE UNIQUE INDEX IF NOT EXISTS "users_email_idx" ON "users" USING btree ("email"); + CREATE INDEX IF NOT EXISTS "users_rels_order_idx" ON "users_rels" USING btree ("order"); + CREATE INDEX IF NOT EXISTS "users_rels_parent_idx" ON "users_rels" USING btree ("parent_id"); + CREATE INDEX IF NOT EXISTS "users_rels_path_idx" ON "users_rels" USING btree ("path"); + CREATE INDEX IF NOT EXISTS "users_rels_group_id_idx" ON "users_rels" USING btree ("group_id"); + CREATE INDEX IF NOT EXISTS "documents_updated_at_idx" ON "documents" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "documents_created_at_idx" ON "documents" USING btree ("created_at"); + CREATE UNIQUE INDEX IF NOT EXISTS "documents_filename_idx" ON "documents" USING btree ("filename"); + CREATE INDEX IF NOT EXISTS "media_updated_at_idx" ON "media" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "media_created_at_idx" ON "media" USING btree ("created_at"); + CREATE UNIQUE INDEX IF NOT EXISTS "media_filename_idx" ON "media" USING btree ("filename"); + CREATE INDEX IF NOT EXISTS "media_sizes_thumbnail_sizes_thumbnail_filename_idx" ON "media" USING btree ("sizes_thumbnail_filename"); + CREATE INDEX IF NOT EXISTS "media_sizes_banner_sizes_banner_filename_idx" ON "media" USING btree ("sizes_banner_filename"); + CREATE INDEX IF NOT EXISTS "media_sizes_gallery_sizes_gallery_filename_idx" ON "media" USING btree ("sizes_gallery_filename"); + CREATE INDEX IF NOT EXISTS "media_sizes_tablet_sizes_tablet_filename_idx" ON "media" USING btree ("sizes_tablet_filename"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_global_slug_idx" ON "payload_locked_documents" USING btree ("global_slug"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_updated_at_idx" ON "payload_locked_documents" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_created_at_idx" ON "payload_locked_documents" USING btree ("created_at"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_order_idx" ON "payload_locked_documents_rels" USING btree ("order"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_parent_idx" ON "payload_locked_documents_rels" USING btree ("parent_id"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_path_idx" ON "payload_locked_documents_rels" USING btree ("path"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_parish_id_idx" ON "payload_locked_documents_rels" USING btree ("parish_id"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_church_id_idx" ON "payload_locked_documents_rels" USING btree ("church_id"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_worship_id_idx" ON "payload_locked_documents_rels" USING btree ("worship_id"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_announcement_id_idx" ON "payload_locked_documents_rels" USING btree ("announcement_id"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_blog_id_idx" ON "payload_locked_documents_rels" USING btree ("blog_id"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_highlight_id_idx" ON "payload_locked_documents_rels" USING btree ("highlight_id"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_event_id_idx" ON "payload_locked_documents_rels" USING btree ("event_id"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_contact_person_id_idx" ON "payload_locked_documents_rels" USING btree ("contact_person_id"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_locations_id_idx" ON "payload_locked_documents_rels" USING btree ("locations_id"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_group_id_idx" ON "payload_locked_documents_rels" USING btree ("group_id"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_employees_id_idx" ON "payload_locked_documents_rels" USING btree ("employees_id"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_testimony_id_idx" ON "payload_locked_documents_rels" USING btree ("testimony_id"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_page_id_idx" ON "payload_locked_documents_rels" USING btree ("page_id"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_users_id_idx" ON "payload_locked_documents_rels" USING btree ("users_id"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_documents_id_idx" ON "payload_locked_documents_rels" USING btree ("documents_id"); + CREATE INDEX IF NOT EXISTS "payload_locked_documents_rels_media_id_idx" ON "payload_locked_documents_rels" USING btree ("media_id"); + CREATE INDEX IF NOT EXISTS "payload_preferences_key_idx" ON "payload_preferences" USING btree ("key"); + CREATE INDEX IF NOT EXISTS "payload_preferences_updated_at_idx" ON "payload_preferences" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "payload_preferences_created_at_idx" ON "payload_preferences" USING btree ("created_at"); + CREATE INDEX IF NOT EXISTS "payload_preferences_rels_order_idx" ON "payload_preferences_rels" USING btree ("order"); + CREATE INDEX IF NOT EXISTS "payload_preferences_rels_parent_idx" ON "payload_preferences_rels" USING btree ("parent_id"); + CREATE INDEX IF NOT EXISTS "payload_preferences_rels_path_idx" ON "payload_preferences_rels" USING btree ("path"); + CREATE INDEX IF NOT EXISTS "payload_preferences_rels_users_id_idx" ON "payload_preferences_rels" USING btree ("users_id"); + CREATE INDEX IF NOT EXISTS "payload_migrations_updated_at_idx" ON "payload_migrations" USING btree ("updated_at"); + CREATE INDEX IF NOT EXISTS "payload_migrations_created_at_idx" ON "payload_migrations" USING btree ("created_at");`) +} + +export async function down({ payload, req }: MigrateDownArgs): Promise { + await payload.db.drizzle.execute(sql` + DROP TABLE "parish_contact_persons" CASCADE; + DROP TABLE "parish_gallery" CASCADE; + DROP TABLE "parish" CASCADE; + DROP TABLE "parish_rels" CASCADE; + DROP TABLE "church" CASCADE; + DROP TABLE "worship" CASCADE; + DROP TABLE "announcement" CASCADE; + DROP TABLE "announcement_rels" CASCADE; + DROP TABLE "blog_blocks_text" CASCADE; + DROP TABLE "blog_blocks_document" CASCADE; + DROP TABLE "blog_blocks_contactform" CASCADE; + DROP TABLE "blog_blocks_gallery_items" CASCADE; + DROP TABLE "blog_blocks_gallery" CASCADE; + DROP TABLE "blog" CASCADE; + DROP TABLE "blog_rels" CASCADE; + DROP TABLE "highlight" CASCADE; + DROP TABLE "highlight_rels" CASCADE; + DROP TABLE "event" CASCADE; + DROP TABLE "event_rels" CASCADE; + DROP TABLE "contact_person" CASCADE; + DROP TABLE "locations" CASCADE; + DROP TABLE "group_blocks_text" CASCADE; + DROP TABLE "group_blocks_gallery_items" CASCADE; + DROP TABLE "group_blocks_gallery" CASCADE; + DROP TABLE "group_blocks_document" CASCADE; + DROP TABLE "group_blocks_contactform" CASCADE; + DROP TABLE "group" CASCADE; + DROP TABLE "employees" CASCADE; + DROP TABLE "testimony" CASCADE; + DROP TABLE "page_blocks_content" CASCADE; + DROP TABLE "page_blocks_title" CASCADE; + DROP TABLE "page_blocks_testimony" CASCADE; + DROP TABLE "page" CASCADE; + DROP TABLE "users" CASCADE; + DROP TABLE "users_rels" CASCADE; + DROP TABLE "documents" CASCADE; + DROP TABLE "media" CASCADE; + DROP TABLE "payload_locked_documents" CASCADE; + DROP TABLE "payload_locked_documents_rels" CASCADE; + DROP TABLE "payload_preferences" CASCADE; + DROP TABLE "payload_preferences_rels" CASCADE; + DROP TABLE "payload_migrations" CASCADE; + DROP TYPE "public"."enum_worship_type"; + DROP TYPE "public"."enum_blog_blocks_text_width"; + DROP TYPE "public"."enum_group_blocks_text_width"; + DROP TYPE "public"."enum_testimony_category"; + DROP TYPE "public"."enum_users_roles";`) +} diff --git a/src/migrations/index.ts b/src/migrations/index.ts new file mode 100644 index 0000000..7c61ccf --- /dev/null +++ b/src/migrations/index.ts @@ -0,0 +1,9 @@ +import * as migration_20241205_121237 from './20241205_121237'; + +export const migrations = [ + { + up: migration_20241205_121237.up, + down: migration_20241205_121237.down, + name: '20241205_121237' + }, +]; diff --git a/src/pageComponents/Event/Event.stories.tsx b/src/pageComponents/Event/Event.stories.tsx index 8678d80..dcbb9d4 100644 --- a/src/pageComponents/Event/Event.stories.tsx +++ b/src/pageComponents/Event/Event.stories.tsx @@ -1,5 +1,6 @@ import { Meta, StoryObj } from '@storybook/react' import { EventPage as Event } from './Event' +import photo from "./lobpreis.jpeg" const meta: Meta = { component: Event, @@ -60,4 +61,11 @@ export const WithFlyerAndGroup: Story = { ...WithFlyer.args, group: "some_group" } +} + +export const WithPhoto: Story = { + args: { + ...Default.args, + photo: photo + } } \ No newline at end of file diff --git a/src/pageComponents/Event/Event.tsx b/src/pageComponents/Event/Event.tsx index 63ccad4..d9e33bf 100644 --- a/src/pageComponents/Event/Event.tsx +++ b/src/pageComponents/Event/Event.tsx @@ -62,9 +62,10 @@ export function EventPage( color={"contrast"} cancelled={cancelled} /> + - - +
+

Herzliche Einladungen an unseren kommenden Veranstaltungen und Events teilzunehmen.

@@ -80,11 +81,18 @@ export function EventPage( Abgesagt }
- +
+ { photo && + {"Veranstaltungsbild"} + } + -
- +
diff --git a/src/pageComponents/Event/lobpreis.jpeg b/src/pageComponents/Event/lobpreis.jpeg new file mode 100644 index 0000000000000000000000000000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!1T?@Sai9(bHlUHkb$P6R zakgTFDStqTeQHKyb)~Bh8yBlNu}wU#KZ&zfP@L69UmhEZ-!OmAChwla-ELDx6#EwM WTc{Jn8f>M6? { items.forEach(item => { if (typeof item === "object" && typeof item.photo === "object" && item.id) { - const thumbnail = item.photo.sizes?.gallery?.url; - const tWidth = item.photo.sizes?.gallery?.width; - const tHeight = item.photo.sizes?.gallery?.height; - const image = item.photo.sizes?.tablet?.url; - const iWidth = item.photo.sizes?.tablet?.width; - const iHeight = item.photo.sizes?.tablet?.height; + const thumbnail = getPhoto("gallery", item.photo); + const image = getPhoto("tablet", item.photo); - if (thumbnail && image && tWidth && tHeight && iWidth && iHeight) { + if (thumbnail && image) { galleryItems.push({ alt: item.photo.alt, id: item.id, - thumbnail: { - src: thumbnail, - width: tWidth, - height: tHeight, - }, - image: { - src: image, - width: iWidth, - height: iHeight - } + thumbnail, + image }) } } }) return galleryItems -} \ No newline at end of file +} + +type Size = "thumbnail" | "banner" | "gallery" | "tablet"; +type OptionalMedia = string | null | undefined | Media; + +/** + * Get image data from optional media + * + */ +export const getPhoto = (size: Size, data: OptionalMedia): StaticImageData | undefined => { + if (!data) { + return undefined; + } + + if (typeof data === "string") { + return undefined; + } + + if (!data.sizes) { + return undefined; + } + + const sizeData = data.sizes[size] + + if (!sizeData) { + return undefined; + } + + if (sizeData.url && sizeData.width && sizeData.height) { + return { + src: sizeData.url, + width: sizeData.width, + height: sizeData.height + } + } + + return undefined; +} +