From 35d75607b065b3ebd72fb42eb02a94dc6c2b601c Mon Sep 17 00:00:00 2001 From: Mackie Date: Fri, 22 May 2026 01:45:11 +0800 Subject: [PATCH] Add Dockerfile and fix pnpm setup for Dokploy --- Dockerfile | 52 +- payload_dump.sql | 0 src/migrations/20260521_173007.json | 9675 +++++++++++++++++++++++++++ src/migrations/20260521_173007.ts | 1243 ++++ src/migrations/index.ts | 9 + src/payload-types.ts | 130 +- 6 files changed, 10995 insertions(+), 114 deletions(-) create mode 100644 payload_dump.sql create mode 100644 src/migrations/20260521_173007.json create mode 100644 src/migrations/20260521_173007.ts create mode 100644 src/migrations/index.ts diff --git a/Dockerfile b/Dockerfile index 99e029a..d20a46b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,71 +1,25 @@ -# To use this Dockerfile, you have to set `output: 'standalone'` in your next.config.js file. -# From https://github.com/vercel/next.js/blob/canary/examples/with-docker/Dockerfile - -FROM node:22.17.0-alpine AS base - # Install dependencies only when needed FROM base AS deps -# Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. RUN apk add --no-cache libc6-compat WORKDIR /app -# Install dependencies based on the preferred package manager COPY package.json yarn.lock* package-lock.json* pnpm-lock.yaml* ./ RUN \ if [ -f yarn.lock ]; then yarn --frozen-lockfile; \ elif [ -f package-lock.json ]; then npm ci; \ - elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm i --frozen-lockfile; \ + elif [ -f pnpm-lock.yaml ]; then corepack enable && corepack prepare pnpm@10.11.0 --activate && pnpm i --frozen-lockfile; \ else echo "Lockfile not found." && exit 1; \ fi - # Rebuild the source code only when needed FROM base AS builder WORKDIR /app COPY --from=deps /app/node_modules ./node_modules COPY . . -# Next.js collects completely anonymous telemetry data about general usage. -# Learn more here: https://nextjs.org/telemetry -# Uncomment the following line in case you want to disable telemetry during the build. -# ENV NEXT_TELEMETRY_DISABLED 1 - RUN \ if [ -f yarn.lock ]; then yarn run build; \ elif [ -f package-lock.json ]; then npm run build; \ - elif [ -f pnpm-lock.yaml ]; then corepack enable pnpm && pnpm run build; \ + elif [ -f pnpm-lock.yaml ]; then corepack enable && corepack prepare pnpm@10.11.0 --activate && pnpm run build; \ else echo "Lockfile not found." && exit 1; \ - fi - -# Production image, copy all the files and run next -FROM base AS runner -WORKDIR /app - -ENV NODE_ENV production -# Uncomment the following line in case you want to disable telemetry during runtime. -# ENV NEXT_TELEMETRY_DISABLED 1 - -RUN addgroup --system --gid 1001 nodejs -RUN adduser --system --uid 1001 nextjs - -# Remove this line if you do not have this folder -COPY --from=builder /app/public ./public - -# Set the correct permission for prerender cache -RUN mkdir .next -RUN chown nextjs:nodejs .next - -# Automatically leverage output traces to reduce image size -# https://nextjs.org/docs/advanced-features/output-file-tracing -COPY --from=builder --chown=nextjs:nodejs /app/.next/standalone ./ -COPY --from=builder --chown=nextjs:nodejs /app/.next/static ./.next/static - -USER nextjs - -EXPOSE 3000 - -ENV PORT 3000 - -# server.js is created by next build from the standalone output -# https://nextjs.org/docs/pages/api-reference/next-config-js/output -CMD HOSTNAME="0.0.0.0" node server.js + fi \ No newline at end of file diff --git a/payload_dump.sql b/payload_dump.sql new file mode 100644 index 0000000..e69de29 diff --git a/src/migrations/20260521_173007.json b/src/migrations/20260521_173007.json new file mode 100644 index 0000000..52254f5 --- /dev/null +++ b/src/migrations/20260521_173007.json @@ -0,0 +1,9675 @@ +{ + "version": "7", + "dialect": "postgresql", + "tables": { + "public.pages_hero_links": { + "name": "pages_hero_links", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "link_type": { + "name": "link_type", + "type": "enum_pages_hero_links_link_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'reference'" + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "link_url": { + "name": "link_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link_label": { + "name": "link_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link_appearance": { + "name": "link_appearance", + "type": "enum_pages_hero_links_link_appearance", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'default'" + } + }, + "indexes": { + "pages_hero_links_order_idx": { + "name": "pages_hero_links_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_hero_links_parent_id_idx": { + "name": "pages_hero_links_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_hero_links_parent_id_fk": { + "name": "pages_hero_links_parent_id_fk", + "tableFrom": "pages_hero_links", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_cta_links": { + "name": "pages_blocks_cta_links", + "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 + }, + "link_type": { + "name": "link_type", + "type": "enum_pages_blocks_cta_links_link_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'reference'" + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "link_url": { + "name": "link_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link_label": { + "name": "link_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link_appearance": { + "name": "link_appearance", + "type": "enum_pages_blocks_cta_links_link_appearance", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'default'" + } + }, + "indexes": { + "pages_blocks_cta_links_order_idx": { + "name": "pages_blocks_cta_links_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_cta_links_parent_id_idx": { + "name": "pages_blocks_cta_links_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_cta_links_parent_id_fk": { + "name": "pages_blocks_cta_links_parent_id_fk", + "tableFrom": "pages_blocks_cta_links", + "tableTo": "pages_blocks_cta", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_cta": { + "name": "pages_blocks_cta", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "rich_text": { + "name": "rich_text", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_cta_order_idx": { + "name": "pages_blocks_cta_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_cta_parent_id_idx": { + "name": "pages_blocks_cta_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_cta_path_idx": { + "name": "pages_blocks_cta_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_cta_parent_id_fk": { + "name": "pages_blocks_cta_parent_id_fk", + "tableFrom": "pages_blocks_cta", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_content_columns": { + "name": "pages_blocks_content_columns", + "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 + }, + "size": { + "name": "size", + "type": "enum_pages_blocks_content_columns_size", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'oneThird'" + }, + "rich_text": { + "name": "rich_text", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "enable_link": { + "name": "enable_link", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "link_type": { + "name": "link_type", + "type": "enum_pages_blocks_content_columns_link_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'reference'" + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "link_url": { + "name": "link_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link_label": { + "name": "link_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link_appearance": { + "name": "link_appearance", + "type": "enum_pages_blocks_content_columns_link_appearance", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'default'" + } + }, + "indexes": { + "pages_blocks_content_columns_order_idx": { + "name": "pages_blocks_content_columns_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_content_columns_parent_id_idx": { + "name": "pages_blocks_content_columns_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_content_columns_parent_id_fk": { + "name": "pages_blocks_content_columns_parent_id_fk", + "tableFrom": "pages_blocks_content_columns", + "tableTo": "pages_blocks_content", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_content": { + "name": "pages_blocks_content", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "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": { + "pages_blocks_content_order_idx": { + "name": "pages_blocks_content_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_content_parent_id_idx": { + "name": "pages_blocks_content_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_content_path_idx": { + "name": "pages_blocks_content_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_content_parent_id_fk": { + "name": "pages_blocks_content_parent_id_fk", + "tableFrom": "pages_blocks_content", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_media_block": { + "name": "pages_blocks_media_block", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "media_id": { + "name": "media_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_media_block_order_idx": { + "name": "pages_blocks_media_block_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_media_block_parent_id_idx": { + "name": "pages_blocks_media_block_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_media_block_path_idx": { + "name": "pages_blocks_media_block_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_media_block_media_idx": { + "name": "pages_blocks_media_block_media_idx", + "columns": [ + { + "expression": "media_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_media_block_media_id_media_id_fk": { + "name": "pages_blocks_media_block_media_id_media_id_fk", + "tableFrom": "pages_blocks_media_block", + "tableTo": "media", + "columnsFrom": [ + "media_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_media_block_parent_id_fk": { + "name": "pages_blocks_media_block_parent_id_fk", + "tableFrom": "pages_blocks_media_block", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_archive": { + "name": "pages_blocks_archive", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "intro_content": { + "name": "intro_content", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "populate_by": { + "name": "populate_by", + "type": "enum_pages_blocks_archive_populate_by", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'collection'" + }, + "relation_to": { + "name": "relation_to", + "type": "enum_pages_blocks_archive_relation_to", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'posts'" + }, + "limit": { + "name": "limit", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 10 + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_archive_order_idx": { + "name": "pages_blocks_archive_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_archive_parent_id_idx": { + "name": "pages_blocks_archive_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_archive_path_idx": { + "name": "pages_blocks_archive_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_archive_parent_id_fk": { + "name": "pages_blocks_archive_parent_id_fk", + "tableFrom": "pages_blocks_archive", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_blocks_form_block": { + "name": "pages_blocks_form_block", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "form_id": { + "name": "form_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "enable_intro": { + "name": "enable_intro", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "intro_content": { + "name": "intro_content", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_blocks_form_block_order_idx": { + "name": "pages_blocks_form_block_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_form_block_parent_id_idx": { + "name": "pages_blocks_form_block_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_form_block_path_idx": { + "name": "pages_blocks_form_block_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_blocks_form_block_form_idx": { + "name": "pages_blocks_form_block_form_idx", + "columns": [ + { + "expression": "form_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_blocks_form_block_form_id_forms_id_fk": { + "name": "pages_blocks_form_block_form_id_forms_id_fk", + "tableFrom": "pages_blocks_form_block", + "tableTo": "forms", + "columnsFrom": [ + "form_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_blocks_form_block_parent_id_fk": { + "name": "pages_blocks_form_block_parent_id_fk", + "tableFrom": "pages_blocks_form_block", + "tableTo": "pages", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages": { + "name": "pages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hero_type": { + "name": "hero_type", + "type": "enum_pages_hero_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'lowImpact'" + }, + "hero_rich_text": { + "name": "hero_rich_text", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "hero_media_id": { + "name": "hero_media_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "meta_title": { + "name": "meta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "meta_image_id": { + "name": "meta_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "meta_description": { + "name": "meta_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "published_at": { + "name": "published_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "generate_slug": { + "name": "generate_slug", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "slug": { + "name": "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()" + }, + "_status": { + "name": "_status", + "type": "enum_pages_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + } + }, + "indexes": { + "pages_hero_hero_media_idx": { + "name": "pages_hero_hero_media_idx", + "columns": [ + { + "expression": "hero_media_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_meta_meta_image_idx": { + "name": "pages_meta_meta_image_idx", + "columns": [ + { + "expression": "meta_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_slug_idx": { + "name": "pages_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_updated_at_idx": { + "name": "pages_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_created_at_idx": { + "name": "pages_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages__status_idx": { + "name": "pages__status_idx", + "columns": [ + { + "expression": "_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_hero_media_id_media_id_fk": { + "name": "pages_hero_media_id_media_id_fk", + "tableFrom": "pages", + "tableTo": "media", + "columnsFrom": [ + "hero_media_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "pages_meta_image_id_media_id_fk": { + "name": "pages_meta_image_id_media_id_fk", + "tableFrom": "pages", + "tableTo": "media", + "columnsFrom": [ + "meta_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pages_rels": { + "name": "pages_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": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "categories_id": { + "name": "categories_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "pages_rels_order_idx": { + "name": "pages_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_rels_parent_idx": { + "name": "pages_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_rels_path_idx": { + "name": "pages_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_rels_pages_id_idx": { + "name": "pages_rels_pages_id_idx", + "columns": [ + { + "expression": "pages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_rels_posts_id_idx": { + "name": "pages_rels_posts_id_idx", + "columns": [ + { + "expression": "posts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pages_rels_categories_id_idx": { + "name": "pages_rels_categories_id_idx", + "columns": [ + { + "expression": "categories_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pages_rels_parent_fk": { + "name": "pages_rels_parent_fk", + "tableFrom": "pages_rels", + "tableTo": "pages", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pages_rels_pages_fk": { + "name": "pages_rels_pages_fk", + "tableFrom": "pages_rels", + "tableTo": "pages", + "columnsFrom": [ + "pages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pages_rels_posts_fk": { + "name": "pages_rels_posts_fk", + "tableFrom": "pages_rels", + "tableTo": "posts", + "columnsFrom": [ + "posts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pages_rels_categories_fk": { + "name": "pages_rels_categories_fk", + "tableFrom": "pages_rels", + "tableTo": "categories", + "columnsFrom": [ + "categories_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._pages_v_version_hero_links": { + "name": "_pages_v_version_hero_links", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "link_type": { + "name": "link_type", + "type": "enum__pages_v_version_hero_links_link_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'reference'" + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "link_url": { + "name": "link_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link_label": { + "name": "link_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link_appearance": { + "name": "link_appearance", + "type": "enum__pages_v_version_hero_links_link_appearance", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'default'" + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_pages_v_version_hero_links_order_idx": { + "name": "_pages_v_version_hero_links_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_version_hero_links_parent_id_idx": { + "name": "_pages_v_version_hero_links_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_pages_v_version_hero_links_parent_id_fk": { + "name": "_pages_v_version_hero_links_parent_id_fk", + "tableFrom": "_pages_v_version_hero_links", + "tableTo": "_pages_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._pages_v_blocks_cta_links": { + "name": "_pages_v_blocks_cta_links", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "link_type": { + "name": "link_type", + "type": "enum__pages_v_blocks_cta_links_link_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'reference'" + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "link_url": { + "name": "link_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link_label": { + "name": "link_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link_appearance": { + "name": "link_appearance", + "type": "enum__pages_v_blocks_cta_links_link_appearance", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'default'" + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_pages_v_blocks_cta_links_order_idx": { + "name": "_pages_v_blocks_cta_links_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_blocks_cta_links_parent_id_idx": { + "name": "_pages_v_blocks_cta_links_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_pages_v_blocks_cta_links_parent_id_fk": { + "name": "_pages_v_blocks_cta_links_parent_id_fk", + "tableFrom": "_pages_v_blocks_cta_links", + "tableTo": "_pages_v_blocks_cta", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._pages_v_blocks_cta": { + "name": "_pages_v_blocks_cta", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "rich_text": { + "name": "rich_text", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_pages_v_blocks_cta_order_idx": { + "name": "_pages_v_blocks_cta_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_blocks_cta_parent_id_idx": { + "name": "_pages_v_blocks_cta_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_blocks_cta_path_idx": { + "name": "_pages_v_blocks_cta_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_pages_v_blocks_cta_parent_id_fk": { + "name": "_pages_v_blocks_cta_parent_id_fk", + "tableFrom": "_pages_v_blocks_cta", + "tableTo": "_pages_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._pages_v_blocks_content_columns": { + "name": "_pages_v_blocks_content_columns", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "size": { + "name": "size", + "type": "enum__pages_v_blocks_content_columns_size", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'oneThird'" + }, + "rich_text": { + "name": "rich_text", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "enable_link": { + "name": "enable_link", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "link_type": { + "name": "link_type", + "type": "enum__pages_v_blocks_content_columns_link_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'reference'" + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "link_url": { + "name": "link_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link_label": { + "name": "link_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link_appearance": { + "name": "link_appearance", + "type": "enum__pages_v_blocks_content_columns_link_appearance", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'default'" + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_pages_v_blocks_content_columns_order_idx": { + "name": "_pages_v_blocks_content_columns_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_blocks_content_columns_parent_id_idx": { + "name": "_pages_v_blocks_content_columns_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_pages_v_blocks_content_columns_parent_id_fk": { + "name": "_pages_v_blocks_content_columns_parent_id_fk", + "tableFrom": "_pages_v_blocks_content_columns", + "tableTo": "_pages_v_blocks_content", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._pages_v_blocks_content": { + "name": "_pages_v_blocks_content", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_pages_v_blocks_content_order_idx": { + "name": "_pages_v_blocks_content_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_blocks_content_parent_id_idx": { + "name": "_pages_v_blocks_content_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_blocks_content_path_idx": { + "name": "_pages_v_blocks_content_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_pages_v_blocks_content_parent_id_fk": { + "name": "_pages_v_blocks_content_parent_id_fk", + "tableFrom": "_pages_v_blocks_content", + "tableTo": "_pages_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._pages_v_blocks_media_block": { + "name": "_pages_v_blocks_media_block", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "media_id": { + "name": "media_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_pages_v_blocks_media_block_order_idx": { + "name": "_pages_v_blocks_media_block_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_blocks_media_block_parent_id_idx": { + "name": "_pages_v_blocks_media_block_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_blocks_media_block_path_idx": { + "name": "_pages_v_blocks_media_block_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_blocks_media_block_media_idx": { + "name": "_pages_v_blocks_media_block_media_idx", + "columns": [ + { + "expression": "media_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_pages_v_blocks_media_block_media_id_media_id_fk": { + "name": "_pages_v_blocks_media_block_media_id_media_id_fk", + "tableFrom": "_pages_v_blocks_media_block", + "tableTo": "media", + "columnsFrom": [ + "media_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_pages_v_blocks_media_block_parent_id_fk": { + "name": "_pages_v_blocks_media_block_parent_id_fk", + "tableFrom": "_pages_v_blocks_media_block", + "tableTo": "_pages_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._pages_v_blocks_archive": { + "name": "_pages_v_blocks_archive", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "intro_content": { + "name": "intro_content", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "populate_by": { + "name": "populate_by", + "type": "enum__pages_v_blocks_archive_populate_by", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'collection'" + }, + "relation_to": { + "name": "relation_to", + "type": "enum__pages_v_blocks_archive_relation_to", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'posts'" + }, + "limit": { + "name": "limit", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 10 + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_pages_v_blocks_archive_order_idx": { + "name": "_pages_v_blocks_archive_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_blocks_archive_parent_id_idx": { + "name": "_pages_v_blocks_archive_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_blocks_archive_path_idx": { + "name": "_pages_v_blocks_archive_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_pages_v_blocks_archive_parent_id_fk": { + "name": "_pages_v_blocks_archive_parent_id_fk", + "tableFrom": "_pages_v_blocks_archive", + "tableTo": "_pages_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._pages_v_blocks_form_block": { + "name": "_pages_v_blocks_form_block", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "form_id": { + "name": "form_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "enable_intro": { + "name": "enable_intro", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "intro_content": { + "name": "intro_content", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_pages_v_blocks_form_block_order_idx": { + "name": "_pages_v_blocks_form_block_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_blocks_form_block_parent_id_idx": { + "name": "_pages_v_blocks_form_block_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_blocks_form_block_path_idx": { + "name": "_pages_v_blocks_form_block_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_blocks_form_block_form_idx": { + "name": "_pages_v_blocks_form_block_form_idx", + "columns": [ + { + "expression": "form_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_pages_v_blocks_form_block_form_id_forms_id_fk": { + "name": "_pages_v_blocks_form_block_form_id_forms_id_fk", + "tableFrom": "_pages_v_blocks_form_block", + "tableTo": "forms", + "columnsFrom": [ + "form_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_pages_v_blocks_form_block_parent_id_fk": { + "name": "_pages_v_blocks_form_block_parent_id_fk", + "tableFrom": "_pages_v_blocks_form_block", + "tableTo": "_pages_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._pages_v": { + "name": "_pages_v", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "version_title": { + "name": "version_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_hero_type": { + "name": "version_hero_type", + "type": "enum__pages_v_version_hero_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'lowImpact'" + }, + "version_hero_rich_text": { + "name": "version_hero_rich_text", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "version_hero_media_id": { + "name": "version_hero_media_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "version_meta_title": { + "name": "version_meta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_meta_image_id": { + "name": "version_meta_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "version_meta_description": { + "name": "version_meta_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_published_at": { + "name": "version_published_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version_generate_slug": { + "name": "version_generate_slug", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "version_slug": { + "name": "version_slug", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_updated_at": { + "name": "version_updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version_created_at": { + "name": "version_created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version__status": { + "name": "version__status", + "type": "enum__pages_v_version_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "latest": { + "name": "latest", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "autosave": { + "name": "autosave", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_pages_v_parent_idx": { + "name": "_pages_v_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_version_hero_version_hero_media_idx": { + "name": "_pages_v_version_hero_version_hero_media_idx", + "columns": [ + { + "expression": "version_hero_media_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_version_meta_version_meta_image_idx": { + "name": "_pages_v_version_meta_version_meta_image_idx", + "columns": [ + { + "expression": "version_meta_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_version_version_slug_idx": { + "name": "_pages_v_version_version_slug_idx", + "columns": [ + { + "expression": "version_slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_version_version_updated_at_idx": { + "name": "_pages_v_version_version_updated_at_idx", + "columns": [ + { + "expression": "version_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_version_version_created_at_idx": { + "name": "_pages_v_version_version_created_at_idx", + "columns": [ + { + "expression": "version_created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_version_version__status_idx": { + "name": "_pages_v_version_version__status_idx", + "columns": [ + { + "expression": "version__status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_created_at_idx": { + "name": "_pages_v_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_updated_at_idx": { + "name": "_pages_v_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_latest_idx": { + "name": "_pages_v_latest_idx", + "columns": [ + { + "expression": "latest", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_autosave_idx": { + "name": "_pages_v_autosave_idx", + "columns": [ + { + "expression": "autosave", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_pages_v_parent_id_pages_id_fk": { + "name": "_pages_v_parent_id_pages_id_fk", + "tableFrom": "_pages_v", + "tableTo": "pages", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_pages_v_version_hero_media_id_media_id_fk": { + "name": "_pages_v_version_hero_media_id_media_id_fk", + "tableFrom": "_pages_v", + "tableTo": "media", + "columnsFrom": [ + "version_hero_media_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_pages_v_version_meta_image_id_media_id_fk": { + "name": "_pages_v_version_meta_image_id_media_id_fk", + "tableFrom": "_pages_v", + "tableTo": "media", + "columnsFrom": [ + "version_meta_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._pages_v_rels": { + "name": "_pages_v_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": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "categories_id": { + "name": "categories_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_pages_v_rels_order_idx": { + "name": "_pages_v_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_rels_parent_idx": { + "name": "_pages_v_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_rels_path_idx": { + "name": "_pages_v_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_rels_pages_id_idx": { + "name": "_pages_v_rels_pages_id_idx", + "columns": [ + { + "expression": "pages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_rels_posts_id_idx": { + "name": "_pages_v_rels_posts_id_idx", + "columns": [ + { + "expression": "posts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_pages_v_rels_categories_id_idx": { + "name": "_pages_v_rels_categories_id_idx", + "columns": [ + { + "expression": "categories_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_pages_v_rels_parent_fk": { + "name": "_pages_v_rels_parent_fk", + "tableFrom": "_pages_v_rels", + "tableTo": "_pages_v", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_pages_v_rels_pages_fk": { + "name": "_pages_v_rels_pages_fk", + "tableFrom": "_pages_v_rels", + "tableTo": "pages", + "columnsFrom": [ + "pages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_pages_v_rels_posts_fk": { + "name": "_pages_v_rels_posts_fk", + "tableFrom": "_pages_v_rels", + "tableTo": "posts", + "columnsFrom": [ + "posts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_pages_v_rels_categories_fk": { + "name": "_pages_v_rels_categories_fk", + "tableFrom": "_pages_v_rels", + "tableTo": "categories", + "columnsFrom": [ + "categories_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.posts_populated_authors": { + "name": "posts_populated_authors", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "posts_populated_authors_order_idx": { + "name": "posts_populated_authors_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "posts_populated_authors_parent_id_idx": { + "name": "posts_populated_authors_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "posts_populated_authors_parent_id_fk": { + "name": "posts_populated_authors_parent_id_fk", + "tableFrom": "posts_populated_authors", + "tableTo": "posts", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.posts": { + "name": "posts", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hero_image_id": { + "name": "hero_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "meta_title": { + "name": "meta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "meta_image_id": { + "name": "meta_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "meta_description": { + "name": "meta_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "published_at": { + "name": "published_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "generate_slug": { + "name": "generate_slug", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "slug": { + "name": "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()" + }, + "_status": { + "name": "_status", + "type": "enum_posts_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + } + }, + "indexes": { + "posts_hero_image_idx": { + "name": "posts_hero_image_idx", + "columns": [ + { + "expression": "hero_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "posts_meta_meta_image_idx": { + "name": "posts_meta_meta_image_idx", + "columns": [ + { + "expression": "meta_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "posts_slug_idx": { + "name": "posts_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "posts_updated_at_idx": { + "name": "posts_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "posts_created_at_idx": { + "name": "posts_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "posts__status_idx": { + "name": "posts__status_idx", + "columns": [ + { + "expression": "_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "posts_hero_image_id_media_id_fk": { + "name": "posts_hero_image_id_media_id_fk", + "tableFrom": "posts", + "tableTo": "media", + "columnsFrom": [ + "hero_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "posts_meta_image_id_media_id_fk": { + "name": "posts_meta_image_id_media_id_fk", + "tableFrom": "posts", + "tableTo": "media", + "columnsFrom": [ + "meta_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.posts_rels": { + "name": "posts_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": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "categories_id": { + "name": "categories_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "posts_rels_order_idx": { + "name": "posts_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "posts_rels_parent_idx": { + "name": "posts_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "posts_rels_path_idx": { + "name": "posts_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "posts_rels_posts_id_idx": { + "name": "posts_rels_posts_id_idx", + "columns": [ + { + "expression": "posts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "posts_rels_categories_id_idx": { + "name": "posts_rels_categories_id_idx", + "columns": [ + { + "expression": "categories_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "posts_rels_users_id_idx": { + "name": "posts_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "posts_rels_parent_fk": { + "name": "posts_rels_parent_fk", + "tableFrom": "posts_rels", + "tableTo": "posts", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "posts_rels_posts_fk": { + "name": "posts_rels_posts_fk", + "tableFrom": "posts_rels", + "tableTo": "posts", + "columnsFrom": [ + "posts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "posts_rels_categories_fk": { + "name": "posts_rels_categories_fk", + "tableFrom": "posts_rels", + "tableTo": "categories", + "columnsFrom": [ + "categories_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "posts_rels_users_fk": { + "name": "posts_rels_users_fk", + "tableFrom": "posts_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._posts_v_version_populated_authors": { + "name": "_posts_v_version_populated_authors", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "_uuid": { + "name": "_uuid", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_posts_v_version_populated_authors_order_idx": { + "name": "_posts_v_version_populated_authors_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_posts_v_version_populated_authors_parent_id_idx": { + "name": "_posts_v_version_populated_authors_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_posts_v_version_populated_authors_parent_id_fk": { + "name": "_posts_v_version_populated_authors_parent_id_fk", + "tableFrom": "_posts_v_version_populated_authors", + "tableTo": "_posts_v", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._posts_v": { + "name": "_posts_v", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "version_title": { + "name": "version_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_hero_image_id": { + "name": "version_hero_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "version_content": { + "name": "version_content", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "version_meta_title": { + "name": "version_meta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_meta_image_id": { + "name": "version_meta_image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "version_meta_description": { + "name": "version_meta_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_published_at": { + "name": "version_published_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version_generate_slug": { + "name": "version_generate_slug", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "version_slug": { + "name": "version_slug", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "version_updated_at": { + "name": "version_updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version_created_at": { + "name": "version_created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "version__status": { + "name": "version__status", + "type": "enum__posts_v_version_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'draft'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "latest": { + "name": "latest", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "autosave": { + "name": "autosave", + "type": "boolean", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_posts_v_parent_idx": { + "name": "_posts_v_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_posts_v_version_version_hero_image_idx": { + "name": "_posts_v_version_version_hero_image_idx", + "columns": [ + { + "expression": "version_hero_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_posts_v_version_meta_version_meta_image_idx": { + "name": "_posts_v_version_meta_version_meta_image_idx", + "columns": [ + { + "expression": "version_meta_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_posts_v_version_version_slug_idx": { + "name": "_posts_v_version_version_slug_idx", + "columns": [ + { + "expression": "version_slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_posts_v_version_version_updated_at_idx": { + "name": "_posts_v_version_version_updated_at_idx", + "columns": [ + { + "expression": "version_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_posts_v_version_version_created_at_idx": { + "name": "_posts_v_version_version_created_at_idx", + "columns": [ + { + "expression": "version_created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_posts_v_version_version__status_idx": { + "name": "_posts_v_version_version__status_idx", + "columns": [ + { + "expression": "version__status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_posts_v_created_at_idx": { + "name": "_posts_v_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_posts_v_updated_at_idx": { + "name": "_posts_v_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_posts_v_latest_idx": { + "name": "_posts_v_latest_idx", + "columns": [ + { + "expression": "latest", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_posts_v_autosave_idx": { + "name": "_posts_v_autosave_idx", + "columns": [ + { + "expression": "autosave", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_posts_v_parent_id_posts_id_fk": { + "name": "_posts_v_parent_id_posts_id_fk", + "tableFrom": "_posts_v", + "tableTo": "posts", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_posts_v_version_hero_image_id_media_id_fk": { + "name": "_posts_v_version_hero_image_id_media_id_fk", + "tableFrom": "_posts_v", + "tableTo": "media", + "columnsFrom": [ + "version_hero_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "_posts_v_version_meta_image_id_media_id_fk": { + "name": "_posts_v_version_meta_image_id_media_id_fk", + "tableFrom": "_posts_v", + "tableTo": "media", + "columnsFrom": [ + "version_meta_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public._posts_v_rels": { + "name": "_posts_v_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": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "categories_id": { + "name": "categories_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "_posts_v_rels_order_idx": { + "name": "_posts_v_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_posts_v_rels_parent_idx": { + "name": "_posts_v_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_posts_v_rels_path_idx": { + "name": "_posts_v_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_posts_v_rels_posts_id_idx": { + "name": "_posts_v_rels_posts_id_idx", + "columns": [ + { + "expression": "posts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_posts_v_rels_categories_id_idx": { + "name": "_posts_v_rels_categories_id_idx", + "columns": [ + { + "expression": "categories_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "_posts_v_rels_users_id_idx": { + "name": "_posts_v_rels_users_id_idx", + "columns": [ + { + "expression": "users_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "_posts_v_rels_parent_fk": { + "name": "_posts_v_rels_parent_fk", + "tableFrom": "_posts_v_rels", + "tableTo": "_posts_v", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_posts_v_rels_posts_fk": { + "name": "_posts_v_rels_posts_fk", + "tableFrom": "_posts_v_rels", + "tableTo": "posts", + "columnsFrom": [ + "posts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_posts_v_rels_categories_fk": { + "name": "_posts_v_rels_categories_fk", + "tableFrom": "_posts_v_rels", + "tableTo": "categories", + "columnsFrom": [ + "categories_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "_posts_v_rels_users_fk": { + "name": "_posts_v_rels_users_fk", + "tableFrom": "_posts_v_rels", + "tableTo": "users", + "columnsFrom": [ + "users_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.media": { + "name": "media", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "alt": { + "name": "alt", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "caption": { + "name": "caption", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "folder_id": { + "name": "folder_id", + "type": "integer", + "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()" + }, + "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_square_url": { + "name": "sizes_square_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_square_width": { + "name": "sizes_square_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_square_height": { + "name": "sizes_square_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_square_mime_type": { + "name": "sizes_square_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_square_filesize": { + "name": "sizes_square_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_square_filename": { + "name": "sizes_square_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_small_url": { + "name": "sizes_small_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_small_width": { + "name": "sizes_small_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_small_height": { + "name": "sizes_small_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_small_mime_type": { + "name": "sizes_small_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_small_filesize": { + "name": "sizes_small_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_small_filename": { + "name": "sizes_small_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_medium_url": { + "name": "sizes_medium_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_medium_width": { + "name": "sizes_medium_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_medium_height": { + "name": "sizes_medium_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_medium_mime_type": { + "name": "sizes_medium_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_medium_filesize": { + "name": "sizes_medium_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_medium_filename": { + "name": "sizes_medium_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_large_url": { + "name": "sizes_large_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_large_width": { + "name": "sizes_large_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_large_height": { + "name": "sizes_large_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_large_mime_type": { + "name": "sizes_large_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_large_filesize": { + "name": "sizes_large_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_large_filename": { + "name": "sizes_large_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_xlarge_url": { + "name": "sizes_xlarge_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_xlarge_width": { + "name": "sizes_xlarge_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_xlarge_height": { + "name": "sizes_xlarge_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_xlarge_mime_type": { + "name": "sizes_xlarge_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_xlarge_filesize": { + "name": "sizes_xlarge_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_xlarge_filename": { + "name": "sizes_xlarge_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_og_url": { + "name": "sizes_og_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_og_width": { + "name": "sizes_og_width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_og_height": { + "name": "sizes_og_height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_og_mime_type": { + "name": "sizes_og_mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "sizes_og_filesize": { + "name": "sizes_og_filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "sizes_og_filename": { + "name": "sizes_og_filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "media_folder_idx": { + "name": "media_folder_idx", + "columns": [ + { + "expression": "folder_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "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_square_sizes_square_filename_idx": { + "name": "media_sizes_square_sizes_square_filename_idx", + "columns": [ + { + "expression": "sizes_square_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_small_sizes_small_filename_idx": { + "name": "media_sizes_small_sizes_small_filename_idx", + "columns": [ + { + "expression": "sizes_small_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_medium_sizes_medium_filename_idx": { + "name": "media_sizes_medium_sizes_medium_filename_idx", + "columns": [ + { + "expression": "sizes_medium_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_large_sizes_large_filename_idx": { + "name": "media_sizes_large_sizes_large_filename_idx", + "columns": [ + { + "expression": "sizes_large_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_xlarge_sizes_xlarge_filename_idx": { + "name": "media_sizes_xlarge_sizes_xlarge_filename_idx", + "columns": [ + { + "expression": "sizes_xlarge_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "media_sizes_og_sizes_og_filename_idx": { + "name": "media_sizes_og_sizes_og_filename_idx", + "columns": [ + { + "expression": "sizes_og_filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "media_folder_id_payload_folders_id_fk": { + "name": "media_folder_id_payload_folders_id_fk", + "tableFrom": "media", + "tableTo": "payload_folders", + "columnsFrom": [ + "folder_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.categories_breadcrumbs": { + "name": "categories_breadcrumbs", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "doc_id": { + "name": "doc_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "categories_breadcrumbs_order_idx": { + "name": "categories_breadcrumbs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "categories_breadcrumbs_parent_id_idx": { + "name": "categories_breadcrumbs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "categories_breadcrumbs_doc_idx": { + "name": "categories_breadcrumbs_doc_idx", + "columns": [ + { + "expression": "doc_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "categories_breadcrumbs_doc_id_categories_id_fk": { + "name": "categories_breadcrumbs_doc_id_categories_id_fk", + "tableFrom": "categories_breadcrumbs", + "tableTo": "categories", + "columnsFrom": [ + "doc_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "categories_breadcrumbs_parent_id_fk": { + "name": "categories_breadcrumbs_parent_id_fk", + "tableFrom": "categories_breadcrumbs", + "tableTo": "categories", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.categories": { + "name": "categories", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "generate_slug": { + "name": "generate_slug", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "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": { + "categories_slug_idx": { + "name": "categories_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "categories_parent_idx": { + "name": "categories_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "categories_updated_at_idx": { + "name": "categories_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "categories_created_at_idx": { + "name": "categories_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "categories_parent_id_categories_id_fk": { + "name": "categories_parent_id_categories_id_fk", + "tableFrom": "categories", + "tableTo": "categories", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users_sessions": { + "name": "users_sessions", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "users_sessions_order_idx": { + "name": "users_sessions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "users_sessions_parent_id_idx": { + "name": "users_sessions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "users_sessions_parent_id_fk": { + "name": "users_sessions_parent_id_fk", + "tableFrom": "users_sessions", + "tableTo": "users", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "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()" + }, + "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.redirects": { + "name": "redirects", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "from": { + "name": "from", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "to_type": { + "name": "to_type", + "type": "enum_redirects_to_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'reference'" + }, + "to_url": { + "name": "to_url", + "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": { + "redirects_from_idx": { + "name": "redirects_from_idx", + "columns": [ + { + "expression": "from", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "redirects_updated_at_idx": { + "name": "redirects_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "redirects_created_at_idx": { + "name": "redirects_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.redirects_rels": { + "name": "redirects_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": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "redirects_rels_order_idx": { + "name": "redirects_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "redirects_rels_parent_idx": { + "name": "redirects_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "redirects_rels_path_idx": { + "name": "redirects_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "redirects_rels_pages_id_idx": { + "name": "redirects_rels_pages_id_idx", + "columns": [ + { + "expression": "pages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "redirects_rels_posts_id_idx": { + "name": "redirects_rels_posts_id_idx", + "columns": [ + { + "expression": "posts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "redirects_rels_parent_fk": { + "name": "redirects_rels_parent_fk", + "tableFrom": "redirects_rels", + "tableTo": "redirects", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "redirects_rels_pages_fk": { + "name": "redirects_rels_pages_fk", + "tableFrom": "redirects_rels", + "tableTo": "pages", + "columnsFrom": [ + "pages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "redirects_rels_posts_fk": { + "name": "redirects_rels_posts_fk", + "tableFrom": "redirects_rels", + "tableTo": "posts", + "columnsFrom": [ + "posts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_checkbox": { + "name": "forms_blocks_checkbox", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "default_value": { + "name": "default_value", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_blocks_checkbox_order_idx": { + "name": "forms_blocks_checkbox_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_checkbox_parent_id_idx": { + "name": "forms_blocks_checkbox_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_checkbox_path_idx": { + "name": "forms_blocks_checkbox_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_checkbox_parent_id_fk": { + "name": "forms_blocks_checkbox_parent_id_fk", + "tableFrom": "forms_blocks_checkbox", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_country": { + "name": "forms_blocks_country", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_blocks_country_order_idx": { + "name": "forms_blocks_country_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_country_parent_id_idx": { + "name": "forms_blocks_country_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_country_path_idx": { + "name": "forms_blocks_country_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_country_parent_id_fk": { + "name": "forms_blocks_country_parent_id_fk", + "tableFrom": "forms_blocks_country", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_email": { + "name": "forms_blocks_email", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_blocks_email_order_idx": { + "name": "forms_blocks_email_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_email_parent_id_idx": { + "name": "forms_blocks_email_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_email_path_idx": { + "name": "forms_blocks_email_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_email_parent_id_fk": { + "name": "forms_blocks_email_parent_id_fk", + "tableFrom": "forms_blocks_email", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_message": { + "name": "forms_blocks_message", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "message": { + "name": "message", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_blocks_message_order_idx": { + "name": "forms_blocks_message_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_message_parent_id_idx": { + "name": "forms_blocks_message_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_message_path_idx": { + "name": "forms_blocks_message_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_message_parent_id_fk": { + "name": "forms_blocks_message_parent_id_fk", + "tableFrom": "forms_blocks_message", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_number": { + "name": "forms_blocks_number", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "default_value": { + "name": "default_value", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_blocks_number_order_idx": { + "name": "forms_blocks_number_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_number_parent_id_idx": { + "name": "forms_blocks_number_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_number_path_idx": { + "name": "forms_blocks_number_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_number_parent_id_fk": { + "name": "forms_blocks_number_parent_id_fk", + "tableFrom": "forms_blocks_number", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_select_options": { + "name": "forms_blocks_select_options", + "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 + }, + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "forms_blocks_select_options_order_idx": { + "name": "forms_blocks_select_options_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_select_options_parent_id_idx": { + "name": "forms_blocks_select_options_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_select_options_parent_id_fk": { + "name": "forms_blocks_select_options_parent_id_fk", + "tableFrom": "forms_blocks_select_options", + "tableTo": "forms_blocks_select", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_select": { + "name": "forms_blocks_select", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "default_value": { + "name": "default_value", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "placeholder": { + "name": "placeholder", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_blocks_select_order_idx": { + "name": "forms_blocks_select_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_select_parent_id_idx": { + "name": "forms_blocks_select_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_select_path_idx": { + "name": "forms_blocks_select_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_select_parent_id_fk": { + "name": "forms_blocks_select_parent_id_fk", + "tableFrom": "forms_blocks_select", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_state": { + "name": "forms_blocks_state", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_blocks_state_order_idx": { + "name": "forms_blocks_state_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_state_parent_id_idx": { + "name": "forms_blocks_state_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_state_path_idx": { + "name": "forms_blocks_state_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_state_parent_id_fk": { + "name": "forms_blocks_state_parent_id_fk", + "tableFrom": "forms_blocks_state", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_text": { + "name": "forms_blocks_text", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "default_value": { + "name": "default_value", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_blocks_text_order_idx": { + "name": "forms_blocks_text_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_text_parent_id_idx": { + "name": "forms_blocks_text_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_text_path_idx": { + "name": "forms_blocks_text_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_text_parent_id_fk": { + "name": "forms_blocks_text_parent_id_fk", + "tableFrom": "forms_blocks_text", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_blocks_textarea": { + "name": "forms_blocks_textarea", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_path": { + "name": "_path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "default_value": { + "name": "default_value", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "block_name": { + "name": "block_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_blocks_textarea_order_idx": { + "name": "forms_blocks_textarea_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_textarea_parent_id_idx": { + "name": "forms_blocks_textarea_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_blocks_textarea_path_idx": { + "name": "forms_blocks_textarea_path_idx", + "columns": [ + { + "expression": "_path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_blocks_textarea_parent_id_fk": { + "name": "forms_blocks_textarea_parent_id_fk", + "tableFrom": "forms_blocks_textarea", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms_emails": { + "name": "forms_emails", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "email_to": { + "name": "email_to", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cc": { + "name": "cc", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "bcc": { + "name": "bcc", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "reply_to": { + "name": "reply_to", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "email_from": { + "name": "email_from", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "subject": { + "name": "subject", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'You''ve received a new message.'" + }, + "message": { + "name": "message", + "type": "jsonb", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "forms_emails_order_idx": { + "name": "forms_emails_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_emails_parent_id_idx": { + "name": "forms_emails_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "forms_emails_parent_id_fk": { + "name": "forms_emails_parent_id_fk", + "tableFrom": "forms_emails", + "tableTo": "forms", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.forms": { + "name": "forms", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "submit_button_label": { + "name": "submit_button_label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "confirmation_type": { + "name": "confirmation_type", + "type": "enum_forms_confirmation_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'message'" + }, + "confirmation_message": { + "name": "confirmation_message", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "redirect_url": { + "name": "redirect_url", + "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": { + "forms_updated_at_idx": { + "name": "forms_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "forms_created_at_idx": { + "name": "forms_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.form_submissions_submission_data": { + "name": "form_submissions_submission_data", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "field": { + "name": "field", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "form_submissions_submission_data_order_idx": { + "name": "form_submissions_submission_data_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "form_submissions_submission_data_parent_id_idx": { + "name": "form_submissions_submission_data_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "form_submissions_submission_data_parent_id_fk": { + "name": "form_submissions_submission_data_parent_id_fk", + "tableFrom": "form_submissions_submission_data", + "tableTo": "form_submissions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.form_submissions": { + "name": "form_submissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "form_id": { + "name": "form_id", + "type": "integer", + "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": { + "form_submissions_form_idx": { + "name": "form_submissions_form_idx", + "columns": [ + { + "expression": "form_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "form_submissions_updated_at_idx": { + "name": "form_submissions_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "form_submissions_created_at_idx": { + "name": "form_submissions_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "form_submissions_form_id_forms_id_fk": { + "name": "form_submissions_form_id_forms_id_fk", + "tableFrom": "form_submissions", + "tableTo": "forms", + "columnsFrom": [ + "form_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.search_categories": { + "name": "search_categories", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "relation_to": { + "name": "relation_to", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "category_i_d": { + "name": "category_i_d", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "search_categories_order_idx": { + "name": "search_categories_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "search_categories_parent_id_idx": { + "name": "search_categories_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "search_categories_parent_id_fk": { + "name": "search_categories_parent_id_fk", + "tableFrom": "search_categories", + "tableTo": "search", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.search": { + "name": "search", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "priority": { + "name": "priority", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "meta_title": { + "name": "meta_title", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "meta_description": { + "name": "meta_description", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "meta_image_id": { + "name": "meta_image_id", + "type": "integer", + "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": { + "search_slug_idx": { + "name": "search_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "search_meta_meta_image_idx": { + "name": "search_meta_meta_image_idx", + "columns": [ + { + "expression": "meta_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "search_updated_at_idx": { + "name": "search_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "search_created_at_idx": { + "name": "search_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "search_meta_image_id_media_id_fk": { + "name": "search_meta_image_id_media_id_fk", + "tableFrom": "search", + "tableTo": "media", + "columnsFrom": [ + "meta_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.search_rels": { + "name": "search_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": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "search_rels_order_idx": { + "name": "search_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "search_rels_parent_idx": { + "name": "search_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "search_rels_path_idx": { + "name": "search_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "search_rels_posts_id_idx": { + "name": "search_rels_posts_id_idx", + "columns": [ + { + "expression": "posts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "search_rels_parent_fk": { + "name": "search_rels_parent_fk", + "tableFrom": "search_rels", + "tableTo": "search", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "search_rels_posts_fk": { + "name": "search_rels_posts_fk", + "tableFrom": "search_rels", + "tableTo": "posts", + "columnsFrom": [ + "posts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_kv": { + "name": "payload_kv", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "payload_kv_key_idx": { + "name": "payload_kv_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_jobs_log": { + "name": "payload_jobs_log", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "executed_at": { + "name": "executed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "task_slug": { + "name": "task_slug", + "type": "enum_payload_jobs_log_task_slug", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "task_i_d": { + "name": "task_i_d", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "input": { + "name": "input", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "output": { + "name": "output", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "state": { + "name": "state", + "type": "enum_payload_jobs_log_state", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "error": { + "name": "error", + "type": "jsonb", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "payload_jobs_log_order_idx": { + "name": "payload_jobs_log_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_jobs_log_parent_id_idx": { + "name": "payload_jobs_log_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_jobs_log_parent_id_fk": { + "name": "payload_jobs_log_parent_id_fk", + "tableFrom": "payload_jobs_log", + "tableTo": "payload_jobs", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_jobs": { + "name": "payload_jobs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "input": { + "name": "input", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "total_tried": { + "name": "total_tried", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "has_error": { + "name": "has_error", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "error": { + "name": "error", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "task_slug": { + "name": "task_slug", + "type": "enum_payload_jobs_task_slug", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "queue": { + "name": "queue", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'default'" + }, + "wait_until": { + "name": "wait_until", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "processing": { + "name": "processing", + "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": { + "payload_jobs_completed_at_idx": { + "name": "payload_jobs_completed_at_idx", + "columns": [ + { + "expression": "completed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_jobs_total_tried_idx": { + "name": "payload_jobs_total_tried_idx", + "columns": [ + { + "expression": "total_tried", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_jobs_has_error_idx": { + "name": "payload_jobs_has_error_idx", + "columns": [ + { + "expression": "has_error", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_jobs_task_slug_idx": { + "name": "payload_jobs_task_slug_idx", + "columns": [ + { + "expression": "task_slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_jobs_queue_idx": { + "name": "payload_jobs_queue_idx", + "columns": [ + { + "expression": "queue", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_jobs_wait_until_idx": { + "name": "payload_jobs_wait_until_idx", + "columns": [ + { + "expression": "wait_until", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_jobs_processing_idx": { + "name": "payload_jobs_processing_idx", + "columns": [ + { + "expression": "processing", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_jobs_updated_at_idx": { + "name": "payload_jobs_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_jobs_created_at_idx": { + "name": "payload_jobs_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_folders_folder_type": { + "name": "payload_folders_folder_type", + "schema": "", + "columns": { + "order": { + "name": "order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "parent_id": { + "name": "parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "enum_payload_folders_folder_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + } + }, + "indexes": { + "payload_folders_folder_type_order_idx": { + "name": "payload_folders_folder_type_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_folders_folder_type_parent_idx": { + "name": "payload_folders_folder_type_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_folders_folder_type_parent_fk": { + "name": "payload_folders_folder_type_parent_fk", + "tableFrom": "payload_folders_folder_type", + "tableTo": "payload_folders", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_folders": { + "name": "payload_folders", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "folder_id": { + "name": "folder_id", + "type": "integer", + "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_folders_name_idx": { + "name": "payload_folders_name_idx", + "columns": [ + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_folders_folder_idx": { + "name": "payload_folders_folder_idx", + "columns": [ + { + "expression": "folder_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_folders_updated_at_idx": { + "name": "payload_folders_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_folders_created_at_idx": { + "name": "payload_folders_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "payload_folders_folder_id_payload_folders_id_fk": { + "name": "payload_folders_folder_id_payload_folders_id_fk", + "tableFrom": "payload_folders", + "tableTo": "payload_folders", + "columnsFrom": [ + "folder_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.payload_locked_documents": { + "name": "payload_locked_documents", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "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": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "media_id": { + "name": "media_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "categories_id": { + "name": "categories_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "redirects_id": { + "name": "redirects_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "forms_id": { + "name": "forms_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "form_submissions_id": { + "name": "form_submissions_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "search_id": { + "name": "search_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "payload_folders_id": { + "name": "payload_folders_id", + "type": "integer", + "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_pages_id_idx": { + "name": "payload_locked_documents_rels_pages_id_idx", + "columns": [ + { + "expression": "pages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_posts_id_idx": { + "name": "payload_locked_documents_rels_posts_id_idx", + "columns": [ + { + "expression": "posts_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": {} + }, + "payload_locked_documents_rels_categories_id_idx": { + "name": "payload_locked_documents_rels_categories_id_idx", + "columns": [ + { + "expression": "categories_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_redirects_id_idx": { + "name": "payload_locked_documents_rels_redirects_id_idx", + "columns": [ + { + "expression": "redirects_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_forms_id_idx": { + "name": "payload_locked_documents_rels_forms_id_idx", + "columns": [ + { + "expression": "forms_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_form_submissions_id_idx": { + "name": "payload_locked_documents_rels_form_submissions_id_idx", + "columns": [ + { + "expression": "form_submissions_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_search_id_idx": { + "name": "payload_locked_documents_rels_search_id_idx", + "columns": [ + { + "expression": "search_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_payload_folders_id_idx": { + "name": "payload_locked_documents_rels_payload_folders_id_idx", + "columns": [ + { + "expression": "payload_folders_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_pages_fk": { + "name": "payload_locked_documents_rels_pages_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "pages", + "columnsFrom": [ + "pages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_posts_fk": { + "name": "payload_locked_documents_rels_posts_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "posts", + "columnsFrom": [ + "posts_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" + }, + "payload_locked_documents_rels_categories_fk": { + "name": "payload_locked_documents_rels_categories_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "categories", + "columnsFrom": [ + "categories_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_redirects_fk": { + "name": "payload_locked_documents_rels_redirects_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "redirects", + "columnsFrom": [ + "redirects_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_forms_fk": { + "name": "payload_locked_documents_rels_forms_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "forms", + "columnsFrom": [ + "forms_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_form_submissions_fk": { + "name": "payload_locked_documents_rels_form_submissions_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "form_submissions", + "columnsFrom": [ + "form_submissions_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_search_fk": { + "name": "payload_locked_documents_rels_search_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "search", + "columnsFrom": [ + "search_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_payload_folders_fk": { + "name": "payload_locked_documents_rels_payload_folders_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "payload_folders", + "columnsFrom": [ + "payload_folders_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": "serial", + "primaryKey": true, + "notNull": true + }, + "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": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "users_id": { + "name": "users_id", + "type": "integer", + "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": "serial", + "primaryKey": true, + "notNull": true + }, + "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 + }, + "public.header_nav_items": { + "name": "header_nav_items", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "link_type": { + "name": "link_type", + "type": "enum_header_nav_items_link_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'reference'" + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "link_url": { + "name": "link_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link_label": { + "name": "link_label", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "header_nav_items_order_idx": { + "name": "header_nav_items_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "header_nav_items_parent_id_idx": { + "name": "header_nav_items_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "header_nav_items_parent_id_fk": { + "name": "header_nav_items_parent_id_fk", + "tableFrom": "header_nav_items", + "tableTo": "header", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.header": { + "name": "header", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.header_rels": { + "name": "header_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": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "header_rels_order_idx": { + "name": "header_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "header_rels_parent_idx": { + "name": "header_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "header_rels_path_idx": { + "name": "header_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "header_rels_pages_id_idx": { + "name": "header_rels_pages_id_idx", + "columns": [ + { + "expression": "pages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "header_rels_posts_id_idx": { + "name": "header_rels_posts_id_idx", + "columns": [ + { + "expression": "posts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "header_rels_parent_fk": { + "name": "header_rels_parent_fk", + "tableFrom": "header_rels", + "tableTo": "header", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "header_rels_pages_fk": { + "name": "header_rels_pages_fk", + "tableFrom": "header_rels", + "tableTo": "pages", + "columnsFrom": [ + "pages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "header_rels_posts_fk": { + "name": "header_rels_posts_fk", + "tableFrom": "header_rels", + "tableTo": "posts", + "columnsFrom": [ + "posts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.footer_nav_items": { + "name": "footer_nav_items", + "schema": "", + "columns": { + "_order": { + "name": "_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "_parent_id": { + "name": "_parent_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "id": { + "name": "id", + "type": "varchar", + "primaryKey": true, + "notNull": true + }, + "link_type": { + "name": "link_type", + "type": "enum_footer_nav_items_link_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'reference'" + }, + "link_new_tab": { + "name": "link_new_tab", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "link_url": { + "name": "link_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link_label": { + "name": "link_label", + "type": "varchar", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "footer_nav_items_order_idx": { + "name": "footer_nav_items_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "footer_nav_items_parent_id_idx": { + "name": "footer_nav_items_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "footer_nav_items_parent_id_fk": { + "name": "footer_nav_items_parent_id_fk", + "tableFrom": "footer_nav_items", + "tableTo": "footer", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.footer": { + "name": "footer", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.footer_rels": { + "name": "footer_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": "integer", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "pages_id": { + "name": "pages_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "posts_id": { + "name": "posts_id", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "footer_rels_order_idx": { + "name": "footer_rels_order_idx", + "columns": [ + { + "expression": "order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "footer_rels_parent_idx": { + "name": "footer_rels_parent_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "footer_rels_path_idx": { + "name": "footer_rels_path_idx", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "footer_rels_pages_id_idx": { + "name": "footer_rels_pages_id_idx", + "columns": [ + { + "expression": "pages_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "footer_rels_posts_id_idx": { + "name": "footer_rels_posts_id_idx", + "columns": [ + { + "expression": "posts_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "footer_rels_parent_fk": { + "name": "footer_rels_parent_fk", + "tableFrom": "footer_rels", + "tableTo": "footer", + "columnsFrom": [ + "parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "footer_rels_pages_fk": { + "name": "footer_rels_pages_fk", + "tableFrom": "footer_rels", + "tableTo": "pages", + "columnsFrom": [ + "pages_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "footer_rels_posts_fk": { + "name": "footer_rels_posts_fk", + "tableFrom": "footer_rels", + "tableTo": "posts", + "columnsFrom": [ + "posts_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.enum_pages_hero_links_link_type": { + "name": "enum_pages_hero_links_link_type", + "schema": "public", + "values": [ + "reference", + "custom" + ] + }, + "public.enum_pages_hero_links_link_appearance": { + "name": "enum_pages_hero_links_link_appearance", + "schema": "public", + "values": [ + "default", + "outline" + ] + }, + "public.enum_pages_blocks_cta_links_link_type": { + "name": "enum_pages_blocks_cta_links_link_type", + "schema": "public", + "values": [ + "reference", + "custom" + ] + }, + "public.enum_pages_blocks_cta_links_link_appearance": { + "name": "enum_pages_blocks_cta_links_link_appearance", + "schema": "public", + "values": [ + "default", + "outline" + ] + }, + "public.enum_pages_blocks_content_columns_size": { + "name": "enum_pages_blocks_content_columns_size", + "schema": "public", + "values": [ + "oneThird", + "half", + "twoThirds", + "full" + ] + }, + "public.enum_pages_blocks_content_columns_link_type": { + "name": "enum_pages_blocks_content_columns_link_type", + "schema": "public", + "values": [ + "reference", + "custom" + ] + }, + "public.enum_pages_blocks_content_columns_link_appearance": { + "name": "enum_pages_blocks_content_columns_link_appearance", + "schema": "public", + "values": [ + "default", + "outline" + ] + }, + "public.enum_pages_blocks_archive_populate_by": { + "name": "enum_pages_blocks_archive_populate_by", + "schema": "public", + "values": [ + "collection", + "selection" + ] + }, + "public.enum_pages_blocks_archive_relation_to": { + "name": "enum_pages_blocks_archive_relation_to", + "schema": "public", + "values": [ + "posts" + ] + }, + "public.enum_pages_hero_type": { + "name": "enum_pages_hero_type", + "schema": "public", + "values": [ + "none", + "highImpact", + "mediumImpact", + "lowImpact" + ] + }, + "public.enum_pages_status": { + "name": "enum_pages_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__pages_v_version_hero_links_link_type": { + "name": "enum__pages_v_version_hero_links_link_type", + "schema": "public", + "values": [ + "reference", + "custom" + ] + }, + "public.enum__pages_v_version_hero_links_link_appearance": { + "name": "enum__pages_v_version_hero_links_link_appearance", + "schema": "public", + "values": [ + "default", + "outline" + ] + }, + "public.enum__pages_v_blocks_cta_links_link_type": { + "name": "enum__pages_v_blocks_cta_links_link_type", + "schema": "public", + "values": [ + "reference", + "custom" + ] + }, + "public.enum__pages_v_blocks_cta_links_link_appearance": { + "name": "enum__pages_v_blocks_cta_links_link_appearance", + "schema": "public", + "values": [ + "default", + "outline" + ] + }, + "public.enum__pages_v_blocks_content_columns_size": { + "name": "enum__pages_v_blocks_content_columns_size", + "schema": "public", + "values": [ + "oneThird", + "half", + "twoThirds", + "full" + ] + }, + "public.enum__pages_v_blocks_content_columns_link_type": { + "name": "enum__pages_v_blocks_content_columns_link_type", + "schema": "public", + "values": [ + "reference", + "custom" + ] + }, + "public.enum__pages_v_blocks_content_columns_link_appearance": { + "name": "enum__pages_v_blocks_content_columns_link_appearance", + "schema": "public", + "values": [ + "default", + "outline" + ] + }, + "public.enum__pages_v_blocks_archive_populate_by": { + "name": "enum__pages_v_blocks_archive_populate_by", + "schema": "public", + "values": [ + "collection", + "selection" + ] + }, + "public.enum__pages_v_blocks_archive_relation_to": { + "name": "enum__pages_v_blocks_archive_relation_to", + "schema": "public", + "values": [ + "posts" + ] + }, + "public.enum__pages_v_version_hero_type": { + "name": "enum__pages_v_version_hero_type", + "schema": "public", + "values": [ + "none", + "highImpact", + "mediumImpact", + "lowImpact" + ] + }, + "public.enum__pages_v_version_status": { + "name": "enum__pages_v_version_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum_posts_status": { + "name": "enum_posts_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum__posts_v_version_status": { + "name": "enum__posts_v_version_status", + "schema": "public", + "values": [ + "draft", + "published" + ] + }, + "public.enum_redirects_to_type": { + "name": "enum_redirects_to_type", + "schema": "public", + "values": [ + "reference", + "custom" + ] + }, + "public.enum_forms_confirmation_type": { + "name": "enum_forms_confirmation_type", + "schema": "public", + "values": [ + "message", + "redirect" + ] + }, + "public.enum_payload_jobs_log_task_slug": { + "name": "enum_payload_jobs_log_task_slug", + "schema": "public", + "values": [ + "inline", + "schedulePublish" + ] + }, + "public.enum_payload_jobs_log_state": { + "name": "enum_payload_jobs_log_state", + "schema": "public", + "values": [ + "failed", + "succeeded" + ] + }, + "public.enum_payload_jobs_task_slug": { + "name": "enum_payload_jobs_task_slug", + "schema": "public", + "values": [ + "inline", + "schedulePublish" + ] + }, + "public.enum_payload_folders_folder_type": { + "name": "enum_payload_folders_folder_type", + "schema": "public", + "values": [ + "media" + ] + }, + "public.enum_header_nav_items_link_type": { + "name": "enum_header_nav_items_link_type", + "schema": "public", + "values": [ + "reference", + "custom" + ] + }, + "public.enum_footer_nav_items_link_type": { + "name": "enum_footer_nav_items_link_type", + "schema": "public", + "values": [ + "reference", + "custom" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "id": "a11c8f2b-087b-4d62-8c7a-aac1740014a9", + "prevId": "00000000-0000-0000-0000-000000000000" +} \ No newline at end of file diff --git a/src/migrations/20260521_173007.ts b/src/migrations/20260521_173007.ts new file mode 100644 index 0000000..094676d --- /dev/null +++ b/src/migrations/20260521_173007.ts @@ -0,0 +1,1243 @@ +import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres' + +export async function up({ db, payload, req }: MigrateUpArgs): Promise { + await db.execute(sql` + CREATE TYPE "public"."enum_pages_hero_links_link_type" AS ENUM('reference', 'custom'); + CREATE TYPE "public"."enum_pages_hero_links_link_appearance" AS ENUM('default', 'outline'); + CREATE TYPE "public"."enum_pages_blocks_cta_links_link_type" AS ENUM('reference', 'custom'); + CREATE TYPE "public"."enum_pages_blocks_cta_links_link_appearance" AS ENUM('default', 'outline'); + CREATE TYPE "public"."enum_pages_blocks_content_columns_size" AS ENUM('oneThird', 'half', 'twoThirds', 'full'); + CREATE TYPE "public"."enum_pages_blocks_content_columns_link_type" AS ENUM('reference', 'custom'); + CREATE TYPE "public"."enum_pages_blocks_content_columns_link_appearance" AS ENUM('default', 'outline'); + CREATE TYPE "public"."enum_pages_blocks_archive_populate_by" AS ENUM('collection', 'selection'); + CREATE TYPE "public"."enum_pages_blocks_archive_relation_to" AS ENUM('posts'); + CREATE TYPE "public"."enum_pages_hero_type" AS ENUM('none', 'highImpact', 'mediumImpact', 'lowImpact'); + CREATE TYPE "public"."enum_pages_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__pages_v_version_hero_links_link_type" AS ENUM('reference', 'custom'); + CREATE TYPE "public"."enum__pages_v_version_hero_links_link_appearance" AS ENUM('default', 'outline'); + CREATE TYPE "public"."enum__pages_v_blocks_cta_links_link_type" AS ENUM('reference', 'custom'); + CREATE TYPE "public"."enum__pages_v_blocks_cta_links_link_appearance" AS ENUM('default', 'outline'); + CREATE TYPE "public"."enum__pages_v_blocks_content_columns_size" AS ENUM('oneThird', 'half', 'twoThirds', 'full'); + CREATE TYPE "public"."enum__pages_v_blocks_content_columns_link_type" AS ENUM('reference', 'custom'); + CREATE TYPE "public"."enum__pages_v_blocks_content_columns_link_appearance" AS ENUM('default', 'outline'); + CREATE TYPE "public"."enum__pages_v_blocks_archive_populate_by" AS ENUM('collection', 'selection'); + CREATE TYPE "public"."enum__pages_v_blocks_archive_relation_to" AS ENUM('posts'); + CREATE TYPE "public"."enum__pages_v_version_hero_type" AS ENUM('none', 'highImpact', 'mediumImpact', 'lowImpact'); + CREATE TYPE "public"."enum__pages_v_version_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum_posts_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum__posts_v_version_status" AS ENUM('draft', 'published'); + CREATE TYPE "public"."enum_redirects_to_type" AS ENUM('reference', 'custom'); + CREATE TYPE "public"."enum_forms_confirmation_type" AS ENUM('message', 'redirect'); + CREATE TYPE "public"."enum_payload_jobs_log_task_slug" AS ENUM('inline', 'schedulePublish'); + CREATE TYPE "public"."enum_payload_jobs_log_state" AS ENUM('failed', 'succeeded'); + CREATE TYPE "public"."enum_payload_jobs_task_slug" AS ENUM('inline', 'schedulePublish'); + CREATE TYPE "public"."enum_payload_folders_folder_type" AS ENUM('media'); + CREATE TYPE "public"."enum_header_nav_items_link_type" AS ENUM('reference', 'custom'); + CREATE TYPE "public"."enum_footer_nav_items_link_type" AS ENUM('reference', 'custom'); + CREATE TABLE "pages_hero_links" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "link_type" "enum_pages_hero_links_link_type" DEFAULT 'reference', + "link_new_tab" boolean, + "link_url" varchar, + "link_label" varchar, + "link_appearance" "enum_pages_hero_links_link_appearance" DEFAULT 'default' + ); + + CREATE TABLE "pages_blocks_cta_links" ( + "_order" integer NOT NULL, + "_parent_id" varchar NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "link_type" "enum_pages_blocks_cta_links_link_type" DEFAULT 'reference', + "link_new_tab" boolean, + "link_url" varchar, + "link_label" varchar, + "link_appearance" "enum_pages_blocks_cta_links_link_appearance" DEFAULT 'default' + ); + + CREATE TABLE "pages_blocks_cta" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "rich_text" jsonb, + "block_name" varchar + ); + + CREATE TABLE "pages_blocks_content_columns" ( + "_order" integer NOT NULL, + "_parent_id" varchar NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "size" "enum_pages_blocks_content_columns_size" DEFAULT 'oneThird', + "rich_text" jsonb, + "enable_link" boolean, + "link_type" "enum_pages_blocks_content_columns_link_type" DEFAULT 'reference', + "link_new_tab" boolean, + "link_url" varchar, + "link_label" varchar, + "link_appearance" "enum_pages_blocks_content_columns_link_appearance" DEFAULT 'default' + ); + + CREATE TABLE "pages_blocks_content" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "block_name" varchar + ); + + CREATE TABLE "pages_blocks_media_block" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "media_id" integer, + "block_name" varchar + ); + + CREATE TABLE "pages_blocks_archive" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "intro_content" jsonb, + "populate_by" "enum_pages_blocks_archive_populate_by" DEFAULT 'collection', + "relation_to" "enum_pages_blocks_archive_relation_to" DEFAULT 'posts', + "limit" numeric DEFAULT 10, + "block_name" varchar + ); + + CREATE TABLE "pages_blocks_form_block" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "form_id" integer, + "enable_intro" boolean, + "intro_content" jsonb, + "block_name" varchar + ); + + CREATE TABLE "pages" ( + "id" serial PRIMARY KEY NOT NULL, + "title" varchar, + "hero_type" "enum_pages_hero_type" DEFAULT 'lowImpact', + "hero_rich_text" jsonb, + "hero_media_id" integer, + "meta_title" varchar, + "meta_image_id" integer, + "meta_description" varchar, + "published_at" timestamp(3) with time zone, + "generate_slug" boolean DEFAULT true, + "slug" varchar, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "_status" "enum_pages_status" DEFAULT 'draft' + ); + + CREATE TABLE "pages_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "pages_id" integer, + "posts_id" integer, + "categories_id" integer + ); + + CREATE TABLE "_pages_v_version_hero_links" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" serial PRIMARY KEY NOT NULL, + "link_type" "enum__pages_v_version_hero_links_link_type" DEFAULT 'reference', + "link_new_tab" boolean, + "link_url" varchar, + "link_label" varchar, + "link_appearance" "enum__pages_v_version_hero_links_link_appearance" DEFAULT 'default', + "_uuid" varchar + ); + + CREATE TABLE "_pages_v_blocks_cta_links" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" serial PRIMARY KEY NOT NULL, + "link_type" "enum__pages_v_blocks_cta_links_link_type" DEFAULT 'reference', + "link_new_tab" boolean, + "link_url" varchar, + "link_label" varchar, + "link_appearance" "enum__pages_v_blocks_cta_links_link_appearance" DEFAULT 'default', + "_uuid" varchar + ); + + CREATE TABLE "_pages_v_blocks_cta" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" serial PRIMARY KEY NOT NULL, + "rich_text" jsonb, + "_uuid" varchar, + "block_name" varchar + ); + + CREATE TABLE "_pages_v_blocks_content_columns" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" serial PRIMARY KEY NOT NULL, + "size" "enum__pages_v_blocks_content_columns_size" DEFAULT 'oneThird', + "rich_text" jsonb, + "enable_link" boolean, + "link_type" "enum__pages_v_blocks_content_columns_link_type" DEFAULT 'reference', + "link_new_tab" boolean, + "link_url" varchar, + "link_label" varchar, + "link_appearance" "enum__pages_v_blocks_content_columns_link_appearance" DEFAULT 'default', + "_uuid" varchar + ); + + CREATE TABLE "_pages_v_blocks_content" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" serial PRIMARY KEY NOT NULL, + "_uuid" varchar, + "block_name" varchar + ); + + CREATE TABLE "_pages_v_blocks_media_block" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" serial PRIMARY KEY NOT NULL, + "media_id" integer, + "_uuid" varchar, + "block_name" varchar + ); + + CREATE TABLE "_pages_v_blocks_archive" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" serial PRIMARY KEY NOT NULL, + "intro_content" jsonb, + "populate_by" "enum__pages_v_blocks_archive_populate_by" DEFAULT 'collection', + "relation_to" "enum__pages_v_blocks_archive_relation_to" DEFAULT 'posts', + "limit" numeric DEFAULT 10, + "_uuid" varchar, + "block_name" varchar + ); + + CREATE TABLE "_pages_v_blocks_form_block" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" serial PRIMARY KEY NOT NULL, + "form_id" integer, + "enable_intro" boolean, + "intro_content" jsonb, + "_uuid" varchar, + "block_name" varchar + ); + + CREATE TABLE "_pages_v" ( + "id" serial PRIMARY KEY NOT NULL, + "parent_id" integer, + "version_title" varchar, + "version_hero_type" "enum__pages_v_version_hero_type" DEFAULT 'lowImpact', + "version_hero_rich_text" jsonb, + "version_hero_media_id" integer, + "version_meta_title" varchar, + "version_meta_image_id" integer, + "version_meta_description" varchar, + "version_published_at" timestamp(3) with time zone, + "version_generate_slug" boolean DEFAULT true, + "version_slug" varchar, + "version_updated_at" timestamp(3) with time zone, + "version_created_at" timestamp(3) with time zone, + "version__status" "enum__pages_v_version_status" DEFAULT 'draft', + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "latest" boolean, + "autosave" boolean + ); + + CREATE TABLE "_pages_v_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "pages_id" integer, + "posts_id" integer, + "categories_id" integer + ); + + CREATE TABLE "posts_populated_authors" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "name" varchar + ); + + CREATE TABLE "posts" ( + "id" serial PRIMARY KEY NOT NULL, + "title" varchar, + "hero_image_id" integer, + "content" jsonb, + "meta_title" varchar, + "meta_image_id" integer, + "meta_description" varchar, + "published_at" timestamp(3) with time zone, + "generate_slug" boolean DEFAULT true, + "slug" varchar, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "_status" "enum_posts_status" DEFAULT 'draft' + ); + + CREATE TABLE "posts_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "posts_id" integer, + "categories_id" integer, + "users_id" integer + ); + + CREATE TABLE "_posts_v_version_populated_authors" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" serial PRIMARY KEY NOT NULL, + "_uuid" varchar, + "name" varchar + ); + + CREATE TABLE "_posts_v" ( + "id" serial PRIMARY KEY NOT NULL, + "parent_id" integer, + "version_title" varchar, + "version_hero_image_id" integer, + "version_content" jsonb, + "version_meta_title" varchar, + "version_meta_image_id" integer, + "version_meta_description" varchar, + "version_published_at" timestamp(3) with time zone, + "version_generate_slug" boolean DEFAULT true, + "version_slug" varchar, + "version_updated_at" timestamp(3) with time zone, + "version_created_at" timestamp(3) with time zone, + "version__status" "enum__posts_v_version_status" DEFAULT 'draft', + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "latest" boolean, + "autosave" boolean + ); + + CREATE TABLE "_posts_v_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "posts_id" integer, + "categories_id" integer, + "users_id" integer + ); + + CREATE TABLE "media" ( + "id" serial PRIMARY KEY NOT NULL, + "alt" varchar, + "caption" jsonb, + "folder_id" integer, + "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_square_url" varchar, + "sizes_square_width" numeric, + "sizes_square_height" numeric, + "sizes_square_mime_type" varchar, + "sizes_square_filesize" numeric, + "sizes_square_filename" varchar, + "sizes_small_url" varchar, + "sizes_small_width" numeric, + "sizes_small_height" numeric, + "sizes_small_mime_type" varchar, + "sizes_small_filesize" numeric, + "sizes_small_filename" varchar, + "sizes_medium_url" varchar, + "sizes_medium_width" numeric, + "sizes_medium_height" numeric, + "sizes_medium_mime_type" varchar, + "sizes_medium_filesize" numeric, + "sizes_medium_filename" varchar, + "sizes_large_url" varchar, + "sizes_large_width" numeric, + "sizes_large_height" numeric, + "sizes_large_mime_type" varchar, + "sizes_large_filesize" numeric, + "sizes_large_filename" varchar, + "sizes_xlarge_url" varchar, + "sizes_xlarge_width" numeric, + "sizes_xlarge_height" numeric, + "sizes_xlarge_mime_type" varchar, + "sizes_xlarge_filesize" numeric, + "sizes_xlarge_filename" varchar, + "sizes_og_url" varchar, + "sizes_og_width" numeric, + "sizes_og_height" numeric, + "sizes_og_mime_type" varchar, + "sizes_og_filesize" numeric, + "sizes_og_filename" varchar + ); + + CREATE TABLE "categories_breadcrumbs" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "doc_id" integer, + "url" varchar, + "label" varchar + ); + + CREATE TABLE "categories" ( + "id" serial PRIMARY KEY NOT NULL, + "title" varchar NOT NULL, + "generate_slug" boolean DEFAULT true, + "slug" varchar NOT NULL, + "parent_id" integer, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "users_sessions" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "created_at" timestamp(3) with time zone, + "expires_at" timestamp(3) with time zone NOT NULL + ); + + CREATE TABLE "users" ( + "id" serial PRIMARY KEY NOT NULL, + "name" varchar, + "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 "redirects" ( + "id" serial PRIMARY KEY NOT NULL, + "from" varchar NOT NULL, + "to_type" "enum_redirects_to_type" DEFAULT 'reference', + "to_url" 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 "redirects_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "pages_id" integer, + "posts_id" integer + ); + + CREATE TABLE "forms_blocks_checkbox" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "label" varchar, + "width" numeric, + "required" boolean, + "default_value" boolean, + "block_name" varchar + ); + + CREATE TABLE "forms_blocks_country" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "label" varchar, + "width" numeric, + "required" boolean, + "block_name" varchar + ); + + CREATE TABLE "forms_blocks_email" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "label" varchar, + "width" numeric, + "required" boolean, + "block_name" varchar + ); + + CREATE TABLE "forms_blocks_message" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "message" jsonb, + "block_name" varchar + ); + + CREATE TABLE "forms_blocks_number" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "label" varchar, + "width" numeric, + "default_value" numeric, + "required" boolean, + "block_name" varchar + ); + + CREATE TABLE "forms_blocks_select_options" ( + "_order" integer NOT NULL, + "_parent_id" varchar NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "label" varchar NOT NULL, + "value" varchar NOT NULL + ); + + CREATE TABLE "forms_blocks_select" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "label" varchar, + "width" numeric, + "default_value" varchar, + "placeholder" varchar, + "required" boolean, + "block_name" varchar + ); + + CREATE TABLE "forms_blocks_state" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "label" varchar, + "width" numeric, + "required" boolean, + "block_name" varchar + ); + + CREATE TABLE "forms_blocks_text" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "label" varchar, + "width" numeric, + "default_value" varchar, + "required" boolean, + "block_name" varchar + ); + + CREATE TABLE "forms_blocks_textarea" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "_path" text NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "label" varchar, + "width" numeric, + "default_value" varchar, + "required" boolean, + "block_name" varchar + ); + + CREATE TABLE "forms_emails" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "email_to" varchar, + "cc" varchar, + "bcc" varchar, + "reply_to" varchar, + "email_from" varchar, + "subject" varchar DEFAULT 'You''ve received a new message.' NOT NULL, + "message" jsonb + ); + + CREATE TABLE "forms" ( + "id" serial PRIMARY KEY NOT NULL, + "title" varchar NOT NULL, + "submit_button_label" varchar, + "confirmation_type" "enum_forms_confirmation_type" DEFAULT 'message', + "confirmation_message" jsonb, + "redirect_url" 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 "form_submissions_submission_data" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "field" varchar NOT NULL, + "value" varchar NOT NULL + ); + + CREATE TABLE "form_submissions" ( + "id" serial PRIMARY KEY NOT NULL, + "form_id" integer 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 "search_categories" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "relation_to" varchar, + "category_i_d" varchar, + "title" varchar + ); + + CREATE TABLE "search" ( + "id" serial PRIMARY KEY NOT NULL, + "title" varchar, + "priority" numeric, + "slug" varchar, + "meta_title" varchar, + "meta_description" varchar, + "meta_image_id" integer, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "search_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "posts_id" integer + ); + + CREATE TABLE "payload_kv" ( + "id" serial PRIMARY KEY NOT NULL, + "key" varchar NOT NULL, + "data" jsonb NOT NULL + ); + + CREATE TABLE "payload_jobs_log" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "executed_at" timestamp(3) with time zone NOT NULL, + "completed_at" timestamp(3) with time zone NOT NULL, + "task_slug" "enum_payload_jobs_log_task_slug" NOT NULL, + "task_i_d" varchar NOT NULL, + "input" jsonb, + "output" jsonb, + "state" "enum_payload_jobs_log_state" NOT NULL, + "error" jsonb + ); + + CREATE TABLE "payload_jobs" ( + "id" serial PRIMARY KEY NOT NULL, + "input" jsonb, + "completed_at" timestamp(3) with time zone, + "total_tried" numeric DEFAULT 0, + "has_error" boolean DEFAULT false, + "error" jsonb, + "task_slug" "enum_payload_jobs_task_slug", + "queue" varchar DEFAULT 'default', + "wait_until" timestamp(3) with time zone, + "processing" 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 "payload_folders_folder_type" ( + "order" integer NOT NULL, + "parent_id" integer NOT NULL, + "value" "enum_payload_folders_folder_type", + "id" serial PRIMARY KEY NOT NULL + ); + + CREATE TABLE "payload_folders" ( + "id" serial PRIMARY KEY NOT NULL, + "name" varchar NOT NULL, + "folder_id" integer, + "updated_at" timestamp(3) with time zone DEFAULT now() NOT NULL, + "created_at" timestamp(3) with time zone DEFAULT now() NOT NULL + ); + + CREATE TABLE "payload_locked_documents" ( + "id" serial PRIMARY KEY 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 "payload_locked_documents_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "pages_id" integer, + "posts_id" integer, + "media_id" integer, + "categories_id" integer, + "users_id" integer, + "redirects_id" integer, + "forms_id" integer, + "form_submissions_id" integer, + "search_id" integer, + "payload_folders_id" integer + ); + + CREATE TABLE "payload_preferences" ( + "id" serial PRIMARY KEY 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 "payload_preferences_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "users_id" integer + ); + + CREATE TABLE "payload_migrations" ( + "id" serial PRIMARY KEY 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 + ); + + CREATE TABLE "header_nav_items" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "link_type" "enum_header_nav_items_link_type" DEFAULT 'reference', + "link_new_tab" boolean, + "link_url" varchar, + "link_label" varchar NOT NULL + ); + + CREATE TABLE "header" ( + "id" serial PRIMARY KEY NOT NULL, + "updated_at" timestamp(3) with time zone, + "created_at" timestamp(3) with time zone + ); + + CREATE TABLE "header_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "pages_id" integer, + "posts_id" integer + ); + + CREATE TABLE "footer_nav_items" ( + "_order" integer NOT NULL, + "_parent_id" integer NOT NULL, + "id" varchar PRIMARY KEY NOT NULL, + "link_type" "enum_footer_nav_items_link_type" DEFAULT 'reference', + "link_new_tab" boolean, + "link_url" varchar, + "link_label" varchar NOT NULL + ); + + CREATE TABLE "footer" ( + "id" serial PRIMARY KEY NOT NULL, + "updated_at" timestamp(3) with time zone, + "created_at" timestamp(3) with time zone + ); + + CREATE TABLE "footer_rels" ( + "id" serial PRIMARY KEY NOT NULL, + "order" integer, + "parent_id" integer NOT NULL, + "path" varchar NOT NULL, + "pages_id" integer, + "posts_id" integer + ); + + ALTER TABLE "pages_hero_links" ADD CONSTRAINT "pages_hero_links_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "pages_blocks_cta_links" ADD CONSTRAINT "pages_blocks_cta_links_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."pages_blocks_cta"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "pages_blocks_cta" ADD CONSTRAINT "pages_blocks_cta_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "pages_blocks_content_columns" ADD CONSTRAINT "pages_blocks_content_columns_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."pages_blocks_content"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "pages_blocks_content" ADD CONSTRAINT "pages_blocks_content_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "pages_blocks_media_block" ADD CONSTRAINT "pages_blocks_media_block_media_id_media_id_fk" FOREIGN KEY ("media_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "pages_blocks_media_block" ADD CONSTRAINT "pages_blocks_media_block_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "pages_blocks_archive" ADD CONSTRAINT "pages_blocks_archive_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "pages_blocks_form_block" ADD CONSTRAINT "pages_blocks_form_block_form_id_forms_id_fk" FOREIGN KEY ("form_id") REFERENCES "public"."forms"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "pages_blocks_form_block" ADD CONSTRAINT "pages_blocks_form_block_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "pages" ADD CONSTRAINT "pages_hero_media_id_media_id_fk" FOREIGN KEY ("hero_media_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "pages" ADD CONSTRAINT "pages_meta_image_id_media_id_fk" FOREIGN KEY ("meta_image_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "pages_rels" ADD CONSTRAINT "pages_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "pages_rels" ADD CONSTRAINT "pages_rels_pages_fk" FOREIGN KEY ("pages_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "pages_rels" ADD CONSTRAINT "pages_rels_posts_fk" FOREIGN KEY ("posts_id") REFERENCES "public"."posts"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "pages_rels" ADD CONSTRAINT "pages_rels_categories_fk" FOREIGN KEY ("categories_id") REFERENCES "public"."categories"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_pages_v_version_hero_links" ADD CONSTRAINT "_pages_v_version_hero_links_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_pages_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_pages_v_blocks_cta_links" ADD CONSTRAINT "_pages_v_blocks_cta_links_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_pages_v_blocks_cta"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_pages_v_blocks_cta" ADD CONSTRAINT "_pages_v_blocks_cta_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_pages_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_pages_v_blocks_content_columns" ADD CONSTRAINT "_pages_v_blocks_content_columns_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_pages_v_blocks_content"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_pages_v_blocks_content" ADD CONSTRAINT "_pages_v_blocks_content_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_pages_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_pages_v_blocks_media_block" ADD CONSTRAINT "_pages_v_blocks_media_block_media_id_media_id_fk" FOREIGN KEY ("media_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "_pages_v_blocks_media_block" ADD CONSTRAINT "_pages_v_blocks_media_block_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_pages_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_pages_v_blocks_archive" ADD CONSTRAINT "_pages_v_blocks_archive_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_pages_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_pages_v_blocks_form_block" ADD CONSTRAINT "_pages_v_blocks_form_block_form_id_forms_id_fk" FOREIGN KEY ("form_id") REFERENCES "public"."forms"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "_pages_v_blocks_form_block" ADD CONSTRAINT "_pages_v_blocks_form_block_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_pages_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_pages_v" ADD CONSTRAINT "_pages_v_parent_id_pages_id_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."pages"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "_pages_v" ADD CONSTRAINT "_pages_v_version_hero_media_id_media_id_fk" FOREIGN KEY ("version_hero_media_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "_pages_v" ADD CONSTRAINT "_pages_v_version_meta_image_id_media_id_fk" FOREIGN KEY ("version_meta_image_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "_pages_v_rels" ADD CONSTRAINT "_pages_v_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."_pages_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_pages_v_rels" ADD CONSTRAINT "_pages_v_rels_pages_fk" FOREIGN KEY ("pages_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_pages_v_rels" ADD CONSTRAINT "_pages_v_rels_posts_fk" FOREIGN KEY ("posts_id") REFERENCES "public"."posts"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_pages_v_rels" ADD CONSTRAINT "_pages_v_rels_categories_fk" FOREIGN KEY ("categories_id") REFERENCES "public"."categories"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "posts_populated_authors" ADD CONSTRAINT "posts_populated_authors_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."posts"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "posts" ADD CONSTRAINT "posts_hero_image_id_media_id_fk" FOREIGN KEY ("hero_image_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "posts" ADD CONSTRAINT "posts_meta_image_id_media_id_fk" FOREIGN KEY ("meta_image_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "posts_rels" ADD CONSTRAINT "posts_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."posts"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "posts_rels" ADD CONSTRAINT "posts_rels_posts_fk" FOREIGN KEY ("posts_id") REFERENCES "public"."posts"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "posts_rels" ADD CONSTRAINT "posts_rels_categories_fk" FOREIGN KEY ("categories_id") REFERENCES "public"."categories"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "posts_rels" ADD CONSTRAINT "posts_rels_users_fk" FOREIGN KEY ("users_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_posts_v_version_populated_authors" ADD CONSTRAINT "_posts_v_version_populated_authors_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."_posts_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_posts_v" ADD CONSTRAINT "_posts_v_parent_id_posts_id_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."posts"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "_posts_v" ADD CONSTRAINT "_posts_v_version_hero_image_id_media_id_fk" FOREIGN KEY ("version_hero_image_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "_posts_v" ADD CONSTRAINT "_posts_v_version_meta_image_id_media_id_fk" FOREIGN KEY ("version_meta_image_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "_posts_v_rels" ADD CONSTRAINT "_posts_v_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."_posts_v"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_posts_v_rels" ADD CONSTRAINT "_posts_v_rels_posts_fk" FOREIGN KEY ("posts_id") REFERENCES "public"."posts"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_posts_v_rels" ADD CONSTRAINT "_posts_v_rels_categories_fk" FOREIGN KEY ("categories_id") REFERENCES "public"."categories"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "_posts_v_rels" ADD CONSTRAINT "_posts_v_rels_users_fk" FOREIGN KEY ("users_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "media" ADD CONSTRAINT "media_folder_id_payload_folders_id_fk" FOREIGN KEY ("folder_id") REFERENCES "public"."payload_folders"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "categories_breadcrumbs" ADD CONSTRAINT "categories_breadcrumbs_doc_id_categories_id_fk" FOREIGN KEY ("doc_id") REFERENCES "public"."categories"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "categories_breadcrumbs" ADD CONSTRAINT "categories_breadcrumbs_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."categories"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "categories" ADD CONSTRAINT "categories_parent_id_categories_id_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."categories"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "users_sessions" ADD CONSTRAINT "users_sessions_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."users"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "redirects_rels" ADD CONSTRAINT "redirects_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."redirects"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "redirects_rels" ADD CONSTRAINT "redirects_rels_pages_fk" FOREIGN KEY ("pages_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "redirects_rels" ADD CONSTRAINT "redirects_rels_posts_fk" FOREIGN KEY ("posts_id") REFERENCES "public"."posts"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "forms_blocks_checkbox" ADD CONSTRAINT "forms_blocks_checkbox_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."forms"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "forms_blocks_country" ADD CONSTRAINT "forms_blocks_country_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."forms"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "forms_blocks_email" ADD CONSTRAINT "forms_blocks_email_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."forms"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "forms_blocks_message" ADD CONSTRAINT "forms_blocks_message_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."forms"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "forms_blocks_number" ADD CONSTRAINT "forms_blocks_number_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."forms"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "forms_blocks_select_options" ADD CONSTRAINT "forms_blocks_select_options_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."forms_blocks_select"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "forms_blocks_select" ADD CONSTRAINT "forms_blocks_select_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."forms"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "forms_blocks_state" ADD CONSTRAINT "forms_blocks_state_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."forms"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "forms_blocks_text" ADD CONSTRAINT "forms_blocks_text_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."forms"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "forms_blocks_textarea" ADD CONSTRAINT "forms_blocks_textarea_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."forms"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "forms_emails" ADD CONSTRAINT "forms_emails_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."forms"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "form_submissions_submission_data" ADD CONSTRAINT "form_submissions_submission_data_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."form_submissions"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "form_submissions" ADD CONSTRAINT "form_submissions_form_id_forms_id_fk" FOREIGN KEY ("form_id") REFERENCES "public"."forms"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "search_categories" ADD CONSTRAINT "search_categories_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."search"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "search" ADD CONSTRAINT "search_meta_image_id_media_id_fk" FOREIGN KEY ("meta_image_id") REFERENCES "public"."media"("id") ON DELETE set null ON UPDATE no action; + ALTER TABLE "search_rels" ADD CONSTRAINT "search_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."search"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "search_rels" ADD CONSTRAINT "search_rels_posts_fk" FOREIGN KEY ("posts_id") REFERENCES "public"."posts"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_jobs_log" ADD CONSTRAINT "payload_jobs_log_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."payload_jobs"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_folders_folder_type" ADD CONSTRAINT "payload_folders_folder_type_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."payload_folders"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_folders" ADD CONSTRAINT "payload_folders_folder_id_payload_folders_id_fk" FOREIGN KEY ("folder_id") REFERENCES "public"."payload_folders"("id") ON DELETE set null ON UPDATE no action; + 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; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_pages_fk" FOREIGN KEY ("pages_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_posts_fk" FOREIGN KEY ("posts_id") REFERENCES "public"."posts"("id") ON DELETE cascade ON UPDATE no action; + 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; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_categories_fk" FOREIGN KEY ("categories_id") REFERENCES "public"."categories"("id") ON DELETE cascade ON UPDATE no action; + 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; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_redirects_fk" FOREIGN KEY ("redirects_id") REFERENCES "public"."redirects"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_forms_fk" FOREIGN KEY ("forms_id") REFERENCES "public"."forms"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_form_submissions_fk" FOREIGN KEY ("form_submissions_id") REFERENCES "public"."form_submissions"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_search_fk" FOREIGN KEY ("search_id") REFERENCES "public"."search"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "payload_locked_documents_rels" ADD CONSTRAINT "payload_locked_documents_rels_payload_folders_fk" FOREIGN KEY ("payload_folders_id") REFERENCES "public"."payload_folders"("id") ON DELETE cascade ON UPDATE no action; + 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; + 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; + ALTER TABLE "header_nav_items" ADD CONSTRAINT "header_nav_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."header"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "header_rels" ADD CONSTRAINT "header_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."header"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "header_rels" ADD CONSTRAINT "header_rels_pages_fk" FOREIGN KEY ("pages_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "header_rels" ADD CONSTRAINT "header_rels_posts_fk" FOREIGN KEY ("posts_id") REFERENCES "public"."posts"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "footer_nav_items" ADD CONSTRAINT "footer_nav_items_parent_id_fk" FOREIGN KEY ("_parent_id") REFERENCES "public"."footer"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "footer_rels" ADD CONSTRAINT "footer_rels_parent_fk" FOREIGN KEY ("parent_id") REFERENCES "public"."footer"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "footer_rels" ADD CONSTRAINT "footer_rels_pages_fk" FOREIGN KEY ("pages_id") REFERENCES "public"."pages"("id") ON DELETE cascade ON UPDATE no action; + ALTER TABLE "footer_rels" ADD CONSTRAINT "footer_rels_posts_fk" FOREIGN KEY ("posts_id") REFERENCES "public"."posts"("id") ON DELETE cascade ON UPDATE no action; + CREATE INDEX "pages_hero_links_order_idx" ON "pages_hero_links" USING btree ("_order"); + CREATE INDEX "pages_hero_links_parent_id_idx" ON "pages_hero_links" USING btree ("_parent_id"); + CREATE INDEX "pages_blocks_cta_links_order_idx" ON "pages_blocks_cta_links" USING btree ("_order"); + CREATE INDEX "pages_blocks_cta_links_parent_id_idx" ON "pages_blocks_cta_links" USING btree ("_parent_id"); + CREATE INDEX "pages_blocks_cta_order_idx" ON "pages_blocks_cta" USING btree ("_order"); + CREATE INDEX "pages_blocks_cta_parent_id_idx" ON "pages_blocks_cta" USING btree ("_parent_id"); + CREATE INDEX "pages_blocks_cta_path_idx" ON "pages_blocks_cta" USING btree ("_path"); + CREATE INDEX "pages_blocks_content_columns_order_idx" ON "pages_blocks_content_columns" USING btree ("_order"); + CREATE INDEX "pages_blocks_content_columns_parent_id_idx" ON "pages_blocks_content_columns" USING btree ("_parent_id"); + CREATE INDEX "pages_blocks_content_order_idx" ON "pages_blocks_content" USING btree ("_order"); + CREATE INDEX "pages_blocks_content_parent_id_idx" ON "pages_blocks_content" USING btree ("_parent_id"); + CREATE INDEX "pages_blocks_content_path_idx" ON "pages_blocks_content" USING btree ("_path"); + CREATE INDEX "pages_blocks_media_block_order_idx" ON "pages_blocks_media_block" USING btree ("_order"); + CREATE INDEX "pages_blocks_media_block_parent_id_idx" ON "pages_blocks_media_block" USING btree ("_parent_id"); + CREATE INDEX "pages_blocks_media_block_path_idx" ON "pages_blocks_media_block" USING btree ("_path"); + CREATE INDEX "pages_blocks_media_block_media_idx" ON "pages_blocks_media_block" USING btree ("media_id"); + CREATE INDEX "pages_blocks_archive_order_idx" ON "pages_blocks_archive" USING btree ("_order"); + CREATE INDEX "pages_blocks_archive_parent_id_idx" ON "pages_blocks_archive" USING btree ("_parent_id"); + CREATE INDEX "pages_blocks_archive_path_idx" ON "pages_blocks_archive" USING btree ("_path"); + CREATE INDEX "pages_blocks_form_block_order_idx" ON "pages_blocks_form_block" USING btree ("_order"); + CREATE INDEX "pages_blocks_form_block_parent_id_idx" ON "pages_blocks_form_block" USING btree ("_parent_id"); + CREATE INDEX "pages_blocks_form_block_path_idx" ON "pages_blocks_form_block" USING btree ("_path"); + CREATE INDEX "pages_blocks_form_block_form_idx" ON "pages_blocks_form_block" USING btree ("form_id"); + CREATE INDEX "pages_hero_hero_media_idx" ON "pages" USING btree ("hero_media_id"); + CREATE INDEX "pages_meta_meta_image_idx" ON "pages" USING btree ("meta_image_id"); + CREATE UNIQUE INDEX "pages_slug_idx" ON "pages" USING btree ("slug"); + CREATE INDEX "pages_updated_at_idx" ON "pages" USING btree ("updated_at"); + CREATE INDEX "pages_created_at_idx" ON "pages" USING btree ("created_at"); + CREATE INDEX "pages__status_idx" ON "pages" USING btree ("_status"); + CREATE INDEX "pages_rels_order_idx" ON "pages_rels" USING btree ("order"); + CREATE INDEX "pages_rels_parent_idx" ON "pages_rels" USING btree ("parent_id"); + CREATE INDEX "pages_rels_path_idx" ON "pages_rels" USING btree ("path"); + CREATE INDEX "pages_rels_pages_id_idx" ON "pages_rels" USING btree ("pages_id"); + CREATE INDEX "pages_rels_posts_id_idx" ON "pages_rels" USING btree ("posts_id"); + CREATE INDEX "pages_rels_categories_id_idx" ON "pages_rels" USING btree ("categories_id"); + CREATE INDEX "_pages_v_version_hero_links_order_idx" ON "_pages_v_version_hero_links" USING btree ("_order"); + CREATE INDEX "_pages_v_version_hero_links_parent_id_idx" ON "_pages_v_version_hero_links" USING btree ("_parent_id"); + CREATE INDEX "_pages_v_blocks_cta_links_order_idx" ON "_pages_v_blocks_cta_links" USING btree ("_order"); + CREATE INDEX "_pages_v_blocks_cta_links_parent_id_idx" ON "_pages_v_blocks_cta_links" USING btree ("_parent_id"); + CREATE INDEX "_pages_v_blocks_cta_order_idx" ON "_pages_v_blocks_cta" USING btree ("_order"); + CREATE INDEX "_pages_v_blocks_cta_parent_id_idx" ON "_pages_v_blocks_cta" USING btree ("_parent_id"); + CREATE INDEX "_pages_v_blocks_cta_path_idx" ON "_pages_v_blocks_cta" USING btree ("_path"); + CREATE INDEX "_pages_v_blocks_content_columns_order_idx" ON "_pages_v_blocks_content_columns" USING btree ("_order"); + CREATE INDEX "_pages_v_blocks_content_columns_parent_id_idx" ON "_pages_v_blocks_content_columns" USING btree ("_parent_id"); + CREATE INDEX "_pages_v_blocks_content_order_idx" ON "_pages_v_blocks_content" USING btree ("_order"); + CREATE INDEX "_pages_v_blocks_content_parent_id_idx" ON "_pages_v_blocks_content" USING btree ("_parent_id"); + CREATE INDEX "_pages_v_blocks_content_path_idx" ON "_pages_v_blocks_content" USING btree ("_path"); + CREATE INDEX "_pages_v_blocks_media_block_order_idx" ON "_pages_v_blocks_media_block" USING btree ("_order"); + CREATE INDEX "_pages_v_blocks_media_block_parent_id_idx" ON "_pages_v_blocks_media_block" USING btree ("_parent_id"); + CREATE INDEX "_pages_v_blocks_media_block_path_idx" ON "_pages_v_blocks_media_block" USING btree ("_path"); + CREATE INDEX "_pages_v_blocks_media_block_media_idx" ON "_pages_v_blocks_media_block" USING btree ("media_id"); + CREATE INDEX "_pages_v_blocks_archive_order_idx" ON "_pages_v_blocks_archive" USING btree ("_order"); + CREATE INDEX "_pages_v_blocks_archive_parent_id_idx" ON "_pages_v_blocks_archive" USING btree ("_parent_id"); + CREATE INDEX "_pages_v_blocks_archive_path_idx" ON "_pages_v_blocks_archive" USING btree ("_path"); + CREATE INDEX "_pages_v_blocks_form_block_order_idx" ON "_pages_v_blocks_form_block" USING btree ("_order"); + CREATE INDEX "_pages_v_blocks_form_block_parent_id_idx" ON "_pages_v_blocks_form_block" USING btree ("_parent_id"); + CREATE INDEX "_pages_v_blocks_form_block_path_idx" ON "_pages_v_blocks_form_block" USING btree ("_path"); + CREATE INDEX "_pages_v_blocks_form_block_form_idx" ON "_pages_v_blocks_form_block" USING btree ("form_id"); + CREATE INDEX "_pages_v_parent_idx" ON "_pages_v" USING btree ("parent_id"); + CREATE INDEX "_pages_v_version_hero_version_hero_media_idx" ON "_pages_v" USING btree ("version_hero_media_id"); + CREATE INDEX "_pages_v_version_meta_version_meta_image_idx" ON "_pages_v" USING btree ("version_meta_image_id"); + CREATE INDEX "_pages_v_version_version_slug_idx" ON "_pages_v" USING btree ("version_slug"); + CREATE INDEX "_pages_v_version_version_updated_at_idx" ON "_pages_v" USING btree ("version_updated_at"); + CREATE INDEX "_pages_v_version_version_created_at_idx" ON "_pages_v" USING btree ("version_created_at"); + CREATE INDEX "_pages_v_version_version__status_idx" ON "_pages_v" USING btree ("version__status"); + CREATE INDEX "_pages_v_created_at_idx" ON "_pages_v" USING btree ("created_at"); + CREATE INDEX "_pages_v_updated_at_idx" ON "_pages_v" USING btree ("updated_at"); + CREATE INDEX "_pages_v_latest_idx" ON "_pages_v" USING btree ("latest"); + CREATE INDEX "_pages_v_autosave_idx" ON "_pages_v" USING btree ("autosave"); + CREATE INDEX "_pages_v_rels_order_idx" ON "_pages_v_rels" USING btree ("order"); + CREATE INDEX "_pages_v_rels_parent_idx" ON "_pages_v_rels" USING btree ("parent_id"); + CREATE INDEX "_pages_v_rels_path_idx" ON "_pages_v_rels" USING btree ("path"); + CREATE INDEX "_pages_v_rels_pages_id_idx" ON "_pages_v_rels" USING btree ("pages_id"); + CREATE INDEX "_pages_v_rels_posts_id_idx" ON "_pages_v_rels" USING btree ("posts_id"); + CREATE INDEX "_pages_v_rels_categories_id_idx" ON "_pages_v_rels" USING btree ("categories_id"); + CREATE INDEX "posts_populated_authors_order_idx" ON "posts_populated_authors" USING btree ("_order"); + CREATE INDEX "posts_populated_authors_parent_id_idx" ON "posts_populated_authors" USING btree ("_parent_id"); + CREATE INDEX "posts_hero_image_idx" ON "posts" USING btree ("hero_image_id"); + CREATE INDEX "posts_meta_meta_image_idx" ON "posts" USING btree ("meta_image_id"); + CREATE UNIQUE INDEX "posts_slug_idx" ON "posts" USING btree ("slug"); + CREATE INDEX "posts_updated_at_idx" ON "posts" USING btree ("updated_at"); + CREATE INDEX "posts_created_at_idx" ON "posts" USING btree ("created_at"); + CREATE INDEX "posts__status_idx" ON "posts" USING btree ("_status"); + CREATE INDEX "posts_rels_order_idx" ON "posts_rels" USING btree ("order"); + CREATE INDEX "posts_rels_parent_idx" ON "posts_rels" USING btree ("parent_id"); + CREATE INDEX "posts_rels_path_idx" ON "posts_rels" USING btree ("path"); + CREATE INDEX "posts_rels_posts_id_idx" ON "posts_rels" USING btree ("posts_id"); + CREATE INDEX "posts_rels_categories_id_idx" ON "posts_rels" USING btree ("categories_id"); + CREATE INDEX "posts_rels_users_id_idx" ON "posts_rels" USING btree ("users_id"); + CREATE INDEX "_posts_v_version_populated_authors_order_idx" ON "_posts_v_version_populated_authors" USING btree ("_order"); + CREATE INDEX "_posts_v_version_populated_authors_parent_id_idx" ON "_posts_v_version_populated_authors" USING btree ("_parent_id"); + CREATE INDEX "_posts_v_parent_idx" ON "_posts_v" USING btree ("parent_id"); + CREATE INDEX "_posts_v_version_version_hero_image_idx" ON "_posts_v" USING btree ("version_hero_image_id"); + CREATE INDEX "_posts_v_version_meta_version_meta_image_idx" ON "_posts_v" USING btree ("version_meta_image_id"); + CREATE INDEX "_posts_v_version_version_slug_idx" ON "_posts_v" USING btree ("version_slug"); + CREATE INDEX "_posts_v_version_version_updated_at_idx" ON "_posts_v" USING btree ("version_updated_at"); + CREATE INDEX "_posts_v_version_version_created_at_idx" ON "_posts_v" USING btree ("version_created_at"); + CREATE INDEX "_posts_v_version_version__status_idx" ON "_posts_v" USING btree ("version__status"); + CREATE INDEX "_posts_v_created_at_idx" ON "_posts_v" USING btree ("created_at"); + CREATE INDEX "_posts_v_updated_at_idx" ON "_posts_v" USING btree ("updated_at"); + CREATE INDEX "_posts_v_latest_idx" ON "_posts_v" USING btree ("latest"); + CREATE INDEX "_posts_v_autosave_idx" ON "_posts_v" USING btree ("autosave"); + CREATE INDEX "_posts_v_rels_order_idx" ON "_posts_v_rels" USING btree ("order"); + CREATE INDEX "_posts_v_rels_parent_idx" ON "_posts_v_rels" USING btree ("parent_id"); + CREATE INDEX "_posts_v_rels_path_idx" ON "_posts_v_rels" USING btree ("path"); + CREATE INDEX "_posts_v_rels_posts_id_idx" ON "_posts_v_rels" USING btree ("posts_id"); + CREATE INDEX "_posts_v_rels_categories_id_idx" ON "_posts_v_rels" USING btree ("categories_id"); + CREATE INDEX "_posts_v_rels_users_id_idx" ON "_posts_v_rels" USING btree ("users_id"); + CREATE INDEX "media_folder_idx" ON "media" USING btree ("folder_id"); + CREATE INDEX "media_updated_at_idx" ON "media" USING btree ("updated_at"); + CREATE INDEX "media_created_at_idx" ON "media" USING btree ("created_at"); + CREATE UNIQUE INDEX "media_filename_idx" ON "media" USING btree ("filename"); + CREATE INDEX "media_sizes_thumbnail_sizes_thumbnail_filename_idx" ON "media" USING btree ("sizes_thumbnail_filename"); + CREATE INDEX "media_sizes_square_sizes_square_filename_idx" ON "media" USING btree ("sizes_square_filename"); + CREATE INDEX "media_sizes_small_sizes_small_filename_idx" ON "media" USING btree ("sizes_small_filename"); + CREATE INDEX "media_sizes_medium_sizes_medium_filename_idx" ON "media" USING btree ("sizes_medium_filename"); + CREATE INDEX "media_sizes_large_sizes_large_filename_idx" ON "media" USING btree ("sizes_large_filename"); + CREATE INDEX "media_sizes_xlarge_sizes_xlarge_filename_idx" ON "media" USING btree ("sizes_xlarge_filename"); + CREATE INDEX "media_sizes_og_sizes_og_filename_idx" ON "media" USING btree ("sizes_og_filename"); + CREATE INDEX "categories_breadcrumbs_order_idx" ON "categories_breadcrumbs" USING btree ("_order"); + CREATE INDEX "categories_breadcrumbs_parent_id_idx" ON "categories_breadcrumbs" USING btree ("_parent_id"); + CREATE INDEX "categories_breadcrumbs_doc_idx" ON "categories_breadcrumbs" USING btree ("doc_id"); + CREATE UNIQUE INDEX "categories_slug_idx" ON "categories" USING btree ("slug"); + CREATE INDEX "categories_parent_idx" ON "categories" USING btree ("parent_id"); + CREATE INDEX "categories_updated_at_idx" ON "categories" USING btree ("updated_at"); + CREATE INDEX "categories_created_at_idx" ON "categories" USING btree ("created_at"); + CREATE INDEX "users_sessions_order_idx" ON "users_sessions" USING btree ("_order"); + CREATE INDEX "users_sessions_parent_id_idx" ON "users_sessions" USING btree ("_parent_id"); + CREATE INDEX "users_updated_at_idx" ON "users" USING btree ("updated_at"); + CREATE INDEX "users_created_at_idx" ON "users" USING btree ("created_at"); + CREATE UNIQUE INDEX "users_email_idx" ON "users" USING btree ("email"); + CREATE UNIQUE INDEX "redirects_from_idx" ON "redirects" USING btree ("from"); + CREATE INDEX "redirects_updated_at_idx" ON "redirects" USING btree ("updated_at"); + CREATE INDEX "redirects_created_at_idx" ON "redirects" USING btree ("created_at"); + CREATE INDEX "redirects_rels_order_idx" ON "redirects_rels" USING btree ("order"); + CREATE INDEX "redirects_rels_parent_idx" ON "redirects_rels" USING btree ("parent_id"); + CREATE INDEX "redirects_rels_path_idx" ON "redirects_rels" USING btree ("path"); + CREATE INDEX "redirects_rels_pages_id_idx" ON "redirects_rels" USING btree ("pages_id"); + CREATE INDEX "redirects_rels_posts_id_idx" ON "redirects_rels" USING btree ("posts_id"); + CREATE INDEX "forms_blocks_checkbox_order_idx" ON "forms_blocks_checkbox" USING btree ("_order"); + CREATE INDEX "forms_blocks_checkbox_parent_id_idx" ON "forms_blocks_checkbox" USING btree ("_parent_id"); + CREATE INDEX "forms_blocks_checkbox_path_idx" ON "forms_blocks_checkbox" USING btree ("_path"); + CREATE INDEX "forms_blocks_country_order_idx" ON "forms_blocks_country" USING btree ("_order"); + CREATE INDEX "forms_blocks_country_parent_id_idx" ON "forms_blocks_country" USING btree ("_parent_id"); + CREATE INDEX "forms_blocks_country_path_idx" ON "forms_blocks_country" USING btree ("_path"); + CREATE INDEX "forms_blocks_email_order_idx" ON "forms_blocks_email" USING btree ("_order"); + CREATE INDEX "forms_blocks_email_parent_id_idx" ON "forms_blocks_email" USING btree ("_parent_id"); + CREATE INDEX "forms_blocks_email_path_idx" ON "forms_blocks_email" USING btree ("_path"); + CREATE INDEX "forms_blocks_message_order_idx" ON "forms_blocks_message" USING btree ("_order"); + CREATE INDEX "forms_blocks_message_parent_id_idx" ON "forms_blocks_message" USING btree ("_parent_id"); + CREATE INDEX "forms_blocks_message_path_idx" ON "forms_blocks_message" USING btree ("_path"); + CREATE INDEX "forms_blocks_number_order_idx" ON "forms_blocks_number" USING btree ("_order"); + CREATE INDEX "forms_blocks_number_parent_id_idx" ON "forms_blocks_number" USING btree ("_parent_id"); + CREATE INDEX "forms_blocks_number_path_idx" ON "forms_blocks_number" USING btree ("_path"); + CREATE INDEX "forms_blocks_select_options_order_idx" ON "forms_blocks_select_options" USING btree ("_order"); + CREATE INDEX "forms_blocks_select_options_parent_id_idx" ON "forms_blocks_select_options" USING btree ("_parent_id"); + CREATE INDEX "forms_blocks_select_order_idx" ON "forms_blocks_select" USING btree ("_order"); + CREATE INDEX "forms_blocks_select_parent_id_idx" ON "forms_blocks_select" USING btree ("_parent_id"); + CREATE INDEX "forms_blocks_select_path_idx" ON "forms_blocks_select" USING btree ("_path"); + CREATE INDEX "forms_blocks_state_order_idx" ON "forms_blocks_state" USING btree ("_order"); + CREATE INDEX "forms_blocks_state_parent_id_idx" ON "forms_blocks_state" USING btree ("_parent_id"); + CREATE INDEX "forms_blocks_state_path_idx" ON "forms_blocks_state" USING btree ("_path"); + CREATE INDEX "forms_blocks_text_order_idx" ON "forms_blocks_text" USING btree ("_order"); + CREATE INDEX "forms_blocks_text_parent_id_idx" ON "forms_blocks_text" USING btree ("_parent_id"); + CREATE INDEX "forms_blocks_text_path_idx" ON "forms_blocks_text" USING btree ("_path"); + CREATE INDEX "forms_blocks_textarea_order_idx" ON "forms_blocks_textarea" USING btree ("_order"); + CREATE INDEX "forms_blocks_textarea_parent_id_idx" ON "forms_blocks_textarea" USING btree ("_parent_id"); + CREATE INDEX "forms_blocks_textarea_path_idx" ON "forms_blocks_textarea" USING btree ("_path"); + CREATE INDEX "forms_emails_order_idx" ON "forms_emails" USING btree ("_order"); + CREATE INDEX "forms_emails_parent_id_idx" ON "forms_emails" USING btree ("_parent_id"); + CREATE INDEX "forms_updated_at_idx" ON "forms" USING btree ("updated_at"); + CREATE INDEX "forms_created_at_idx" ON "forms" USING btree ("created_at"); + CREATE INDEX "form_submissions_submission_data_order_idx" ON "form_submissions_submission_data" USING btree ("_order"); + CREATE INDEX "form_submissions_submission_data_parent_id_idx" ON "form_submissions_submission_data" USING btree ("_parent_id"); + CREATE INDEX "form_submissions_form_idx" ON "form_submissions" USING btree ("form_id"); + CREATE INDEX "form_submissions_updated_at_idx" ON "form_submissions" USING btree ("updated_at"); + CREATE INDEX "form_submissions_created_at_idx" ON "form_submissions" USING btree ("created_at"); + CREATE INDEX "search_categories_order_idx" ON "search_categories" USING btree ("_order"); + CREATE INDEX "search_categories_parent_id_idx" ON "search_categories" USING btree ("_parent_id"); + CREATE INDEX "search_slug_idx" ON "search" USING btree ("slug"); + CREATE INDEX "search_meta_meta_image_idx" ON "search" USING btree ("meta_image_id"); + CREATE INDEX "search_updated_at_idx" ON "search" USING btree ("updated_at"); + CREATE INDEX "search_created_at_idx" ON "search" USING btree ("created_at"); + CREATE INDEX "search_rels_order_idx" ON "search_rels" USING btree ("order"); + CREATE INDEX "search_rels_parent_idx" ON "search_rels" USING btree ("parent_id"); + CREATE INDEX "search_rels_path_idx" ON "search_rels" USING btree ("path"); + CREATE INDEX "search_rels_posts_id_idx" ON "search_rels" USING btree ("posts_id"); + CREATE UNIQUE INDEX "payload_kv_key_idx" ON "payload_kv" USING btree ("key"); + CREATE INDEX "payload_jobs_log_order_idx" ON "payload_jobs_log" USING btree ("_order"); + CREATE INDEX "payload_jobs_log_parent_id_idx" ON "payload_jobs_log" USING btree ("_parent_id"); + CREATE INDEX "payload_jobs_completed_at_idx" ON "payload_jobs" USING btree ("completed_at"); + CREATE INDEX "payload_jobs_total_tried_idx" ON "payload_jobs" USING btree ("total_tried"); + CREATE INDEX "payload_jobs_has_error_idx" ON "payload_jobs" USING btree ("has_error"); + CREATE INDEX "payload_jobs_task_slug_idx" ON "payload_jobs" USING btree ("task_slug"); + CREATE INDEX "payload_jobs_queue_idx" ON "payload_jobs" USING btree ("queue"); + CREATE INDEX "payload_jobs_wait_until_idx" ON "payload_jobs" USING btree ("wait_until"); + CREATE INDEX "payload_jobs_processing_idx" ON "payload_jobs" USING btree ("processing"); + CREATE INDEX "payload_jobs_updated_at_idx" ON "payload_jobs" USING btree ("updated_at"); + CREATE INDEX "payload_jobs_created_at_idx" ON "payload_jobs" USING btree ("created_at"); + CREATE INDEX "payload_folders_folder_type_order_idx" ON "payload_folders_folder_type" USING btree ("order"); + CREATE INDEX "payload_folders_folder_type_parent_idx" ON "payload_folders_folder_type" USING btree ("parent_id"); + CREATE INDEX "payload_folders_name_idx" ON "payload_folders" USING btree ("name"); + CREATE INDEX "payload_folders_folder_idx" ON "payload_folders" USING btree ("folder_id"); + CREATE INDEX "payload_folders_updated_at_idx" ON "payload_folders" USING btree ("updated_at"); + CREATE INDEX "payload_folders_created_at_idx" ON "payload_folders" USING btree ("created_at"); + CREATE INDEX "payload_locked_documents_global_slug_idx" ON "payload_locked_documents" USING btree ("global_slug"); + CREATE INDEX "payload_locked_documents_updated_at_idx" ON "payload_locked_documents" USING btree ("updated_at"); + CREATE INDEX "payload_locked_documents_created_at_idx" ON "payload_locked_documents" USING btree ("created_at"); + CREATE INDEX "payload_locked_documents_rels_order_idx" ON "payload_locked_documents_rels" USING btree ("order"); + CREATE INDEX "payload_locked_documents_rels_parent_idx" ON "payload_locked_documents_rels" USING btree ("parent_id"); + CREATE INDEX "payload_locked_documents_rels_path_idx" ON "payload_locked_documents_rels" USING btree ("path"); + CREATE INDEX "payload_locked_documents_rels_pages_id_idx" ON "payload_locked_documents_rels" USING btree ("pages_id"); + CREATE INDEX "payload_locked_documents_rels_posts_id_idx" ON "payload_locked_documents_rels" USING btree ("posts_id"); + CREATE INDEX "payload_locked_documents_rels_media_id_idx" ON "payload_locked_documents_rels" USING btree ("media_id"); + CREATE INDEX "payload_locked_documents_rels_categories_id_idx" ON "payload_locked_documents_rels" USING btree ("categories_id"); + CREATE INDEX "payload_locked_documents_rels_users_id_idx" ON "payload_locked_documents_rels" USING btree ("users_id"); + CREATE INDEX "payload_locked_documents_rels_redirects_id_idx" ON "payload_locked_documents_rels" USING btree ("redirects_id"); + CREATE INDEX "payload_locked_documents_rels_forms_id_idx" ON "payload_locked_documents_rels" USING btree ("forms_id"); + CREATE INDEX "payload_locked_documents_rels_form_submissions_id_idx" ON "payload_locked_documents_rels" USING btree ("form_submissions_id"); + CREATE INDEX "payload_locked_documents_rels_search_id_idx" ON "payload_locked_documents_rels" USING btree ("search_id"); + CREATE INDEX "payload_locked_documents_rels_payload_folders_id_idx" ON "payload_locked_documents_rels" USING btree ("payload_folders_id"); + CREATE INDEX "payload_preferences_key_idx" ON "payload_preferences" USING btree ("key"); + CREATE INDEX "payload_preferences_updated_at_idx" ON "payload_preferences" USING btree ("updated_at"); + CREATE INDEX "payload_preferences_created_at_idx" ON "payload_preferences" USING btree ("created_at"); + CREATE INDEX "payload_preferences_rels_order_idx" ON "payload_preferences_rels" USING btree ("order"); + CREATE INDEX "payload_preferences_rels_parent_idx" ON "payload_preferences_rels" USING btree ("parent_id"); + CREATE INDEX "payload_preferences_rels_path_idx" ON "payload_preferences_rels" USING btree ("path"); + CREATE INDEX "payload_preferences_rels_users_id_idx" ON "payload_preferences_rels" USING btree ("users_id"); + CREATE INDEX "payload_migrations_updated_at_idx" ON "payload_migrations" USING btree ("updated_at"); + CREATE INDEX "payload_migrations_created_at_idx" ON "payload_migrations" USING btree ("created_at"); + CREATE INDEX "header_nav_items_order_idx" ON "header_nav_items" USING btree ("_order"); + CREATE INDEX "header_nav_items_parent_id_idx" ON "header_nav_items" USING btree ("_parent_id"); + CREATE INDEX "header_rels_order_idx" ON "header_rels" USING btree ("order"); + CREATE INDEX "header_rels_parent_idx" ON "header_rels" USING btree ("parent_id"); + CREATE INDEX "header_rels_path_idx" ON "header_rels" USING btree ("path"); + CREATE INDEX "header_rels_pages_id_idx" ON "header_rels" USING btree ("pages_id"); + CREATE INDEX "header_rels_posts_id_idx" ON "header_rels" USING btree ("posts_id"); + CREATE INDEX "footer_nav_items_order_idx" ON "footer_nav_items" USING btree ("_order"); + CREATE INDEX "footer_nav_items_parent_id_idx" ON "footer_nav_items" USING btree ("_parent_id"); + CREATE INDEX "footer_rels_order_idx" ON "footer_rels" USING btree ("order"); + CREATE INDEX "footer_rels_parent_idx" ON "footer_rels" USING btree ("parent_id"); + CREATE INDEX "footer_rels_path_idx" ON "footer_rels" USING btree ("path"); + CREATE INDEX "footer_rels_pages_id_idx" ON "footer_rels" USING btree ("pages_id"); + CREATE INDEX "footer_rels_posts_id_idx" ON "footer_rels" USING btree ("posts_id");`) +} + +export async function down({ db, payload, req }: MigrateDownArgs): Promise { + await db.execute(sql` + DROP TABLE "pages_hero_links" CASCADE; + DROP TABLE "pages_blocks_cta_links" CASCADE; + DROP TABLE "pages_blocks_cta" CASCADE; + DROP TABLE "pages_blocks_content_columns" CASCADE; + DROP TABLE "pages_blocks_content" CASCADE; + DROP TABLE "pages_blocks_media_block" CASCADE; + DROP TABLE "pages_blocks_archive" CASCADE; + DROP TABLE "pages_blocks_form_block" CASCADE; + DROP TABLE "pages" CASCADE; + DROP TABLE "pages_rels" CASCADE; + DROP TABLE "_pages_v_version_hero_links" CASCADE; + DROP TABLE "_pages_v_blocks_cta_links" CASCADE; + DROP TABLE "_pages_v_blocks_cta" CASCADE; + DROP TABLE "_pages_v_blocks_content_columns" CASCADE; + DROP TABLE "_pages_v_blocks_content" CASCADE; + DROP TABLE "_pages_v_blocks_media_block" CASCADE; + DROP TABLE "_pages_v_blocks_archive" CASCADE; + DROP TABLE "_pages_v_blocks_form_block" CASCADE; + DROP TABLE "_pages_v" CASCADE; + DROP TABLE "_pages_v_rels" CASCADE; + DROP TABLE "posts_populated_authors" CASCADE; + DROP TABLE "posts" CASCADE; + DROP TABLE "posts_rels" CASCADE; + DROP TABLE "_posts_v_version_populated_authors" CASCADE; + DROP TABLE "_posts_v" CASCADE; + DROP TABLE "_posts_v_rels" CASCADE; + DROP TABLE "media" CASCADE; + DROP TABLE "categories_breadcrumbs" CASCADE; + DROP TABLE "categories" CASCADE; + DROP TABLE "users_sessions" CASCADE; + DROP TABLE "users" CASCADE; + DROP TABLE "redirects" CASCADE; + DROP TABLE "redirects_rels" CASCADE; + DROP TABLE "forms_blocks_checkbox" CASCADE; + DROP TABLE "forms_blocks_country" CASCADE; + DROP TABLE "forms_blocks_email" CASCADE; + DROP TABLE "forms_blocks_message" CASCADE; + DROP TABLE "forms_blocks_number" CASCADE; + DROP TABLE "forms_blocks_select_options" CASCADE; + DROP TABLE "forms_blocks_select" CASCADE; + DROP TABLE "forms_blocks_state" CASCADE; + DROP TABLE "forms_blocks_text" CASCADE; + DROP TABLE "forms_blocks_textarea" CASCADE; + DROP TABLE "forms_emails" CASCADE; + DROP TABLE "forms" CASCADE; + DROP TABLE "form_submissions_submission_data" CASCADE; + DROP TABLE "form_submissions" CASCADE; + DROP TABLE "search_categories" CASCADE; + DROP TABLE "search" CASCADE; + DROP TABLE "search_rels" CASCADE; + DROP TABLE "payload_kv" CASCADE; + DROP TABLE "payload_jobs_log" CASCADE; + DROP TABLE "payload_jobs" CASCADE; + DROP TABLE "payload_folders_folder_type" CASCADE; + DROP TABLE "payload_folders" 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 TABLE "header_nav_items" CASCADE; + DROP TABLE "header" CASCADE; + DROP TABLE "header_rels" CASCADE; + DROP TABLE "footer_nav_items" CASCADE; + DROP TABLE "footer" CASCADE; + DROP TABLE "footer_rels" CASCADE; + DROP TYPE "public"."enum_pages_hero_links_link_type"; + DROP TYPE "public"."enum_pages_hero_links_link_appearance"; + DROP TYPE "public"."enum_pages_blocks_cta_links_link_type"; + DROP TYPE "public"."enum_pages_blocks_cta_links_link_appearance"; + DROP TYPE "public"."enum_pages_blocks_content_columns_size"; + DROP TYPE "public"."enum_pages_blocks_content_columns_link_type"; + DROP TYPE "public"."enum_pages_blocks_content_columns_link_appearance"; + DROP TYPE "public"."enum_pages_blocks_archive_populate_by"; + DROP TYPE "public"."enum_pages_blocks_archive_relation_to"; + DROP TYPE "public"."enum_pages_hero_type"; + DROP TYPE "public"."enum_pages_status"; + DROP TYPE "public"."enum__pages_v_version_hero_links_link_type"; + DROP TYPE "public"."enum__pages_v_version_hero_links_link_appearance"; + DROP TYPE "public"."enum__pages_v_blocks_cta_links_link_type"; + DROP TYPE "public"."enum__pages_v_blocks_cta_links_link_appearance"; + DROP TYPE "public"."enum__pages_v_blocks_content_columns_size"; + DROP TYPE "public"."enum__pages_v_blocks_content_columns_link_type"; + DROP TYPE "public"."enum__pages_v_blocks_content_columns_link_appearance"; + DROP TYPE "public"."enum__pages_v_blocks_archive_populate_by"; + DROP TYPE "public"."enum__pages_v_blocks_archive_relation_to"; + DROP TYPE "public"."enum__pages_v_version_hero_type"; + DROP TYPE "public"."enum__pages_v_version_status"; + DROP TYPE "public"."enum_posts_status"; + DROP TYPE "public"."enum__posts_v_version_status"; + DROP TYPE "public"."enum_redirects_to_type"; + DROP TYPE "public"."enum_forms_confirmation_type"; + DROP TYPE "public"."enum_payload_jobs_log_task_slug"; + DROP TYPE "public"."enum_payload_jobs_log_state"; + DROP TYPE "public"."enum_payload_jobs_task_slug"; + DROP TYPE "public"."enum_payload_folders_folder_type"; + DROP TYPE "public"."enum_header_nav_items_link_type"; + DROP TYPE "public"."enum_footer_nav_items_link_type";`) +} diff --git a/src/migrations/index.ts b/src/migrations/index.ts new file mode 100644 index 0000000..367bc06 --- /dev/null +++ b/src/migrations/index.ts @@ -0,0 +1,9 @@ +import * as migration_20260521_173007 from './20260521_173007'; + +export const migrations = [ + { + up: migration_20260521_173007.up, + down: migration_20260521_173007.down, + name: '20260521_173007' + }, +]; diff --git a/src/payload-types.ts b/src/payload-types.ts index 8cad02f..a4f063a 100644 --- a/src/payload-types.ts +++ b/src/payload-types.ts @@ -106,7 +106,7 @@ export interface Config { 'payload-migrations': PayloadMigrationsSelect | PayloadMigrationsSelect; }; db: { - defaultIDType: string; + defaultIDType: number; }; fallbackLocale: null; globals: { @@ -156,7 +156,7 @@ export interface UserAuthOperations { * via the `definition` "pages". */ export interface Page { - id: string; + id: number; title: string; hero: { type: 'none' | 'highImpact' | 'mediumImpact' | 'lowImpact'; @@ -183,11 +183,11 @@ export interface Page { reference?: | ({ relationTo: 'pages'; - value: string | Page; + value: number | Page; } | null) | ({ relationTo: 'posts'; - value: string | Post; + value: number | Post; } | null); url?: string | null; label: string; @@ -199,7 +199,7 @@ export interface Page { id?: string | null; }[] | null; - media?: (string | null) | Media; + media?: (number | null) | Media; }; layout: (CallToActionBlock | ContentBlock | MediaBlock | ArchiveBlock | FormBlock)[]; meta?: { @@ -207,7 +207,7 @@ export interface Page { /** * Maximum upload file size: 12MB. Recommended file size for images is <500KB. */ - image?: (string | null) | Media; + image?: (number | null) | Media; description?: string | null; }; publishedAt?: string | null; @@ -225,9 +225,9 @@ export interface Page { * via the `definition` "posts". */ export interface Post { - id: string; + id: number; title: string; - heroImage?: (string | null) | Media; + heroImage?: (number | null) | Media; content: { root: { type: string; @@ -243,18 +243,18 @@ export interface Post { }; [k: string]: unknown; }; - relatedPosts?: (string | Post)[] | null; - categories?: (string | Category)[] | null; + relatedPosts?: (number | Post)[] | null; + categories?: (number | Category)[] | null; meta?: { title?: string | null; /** * Maximum upload file size: 12MB. Recommended file size for images is <500KB. */ - image?: (string | null) | Media; + image?: (number | null) | Media; description?: string | null; }; publishedAt?: string | null; - authors?: (string | User)[] | null; + authors?: (number | User)[] | null; populatedAuthors?: | { id?: string | null; @@ -275,7 +275,7 @@ export interface Post { * via the `definition` "media". */ export interface Media { - id: string; + id: number; alt?: string | null; caption?: { root: { @@ -292,7 +292,7 @@ export interface Media { }; [k: string]: unknown; } | null; - folder?: (string | null) | FolderInterface; + folder?: (number | null) | FolderInterface; updatedAt: string; createdAt: string; url?: string | null; @@ -368,18 +368,18 @@ export interface Media { * via the `definition` "payload-folders". */ export interface FolderInterface { - id: string; + id: number; name: string; - folder?: (string | null) | FolderInterface; + folder?: (number | null) | FolderInterface; documentsAndFolders?: { docs?: ( | { relationTo?: 'payload-folders'; - value: string | FolderInterface; + value: number | FolderInterface; } | { relationTo?: 'media'; - value: string | Media; + value: number | Media; } )[]; hasNextPage?: boolean; @@ -394,17 +394,17 @@ export interface FolderInterface { * via the `definition` "categories". */ export interface Category { - id: string; + id: number; title: string; /** * When enabled, the slug will auto-generate from the title field on save and autosave. */ generateSlug?: boolean | null; slug: string; - parent?: (string | null) | Category; + parent?: (number | null) | Category; breadcrumbs?: | { - doc?: (string | null) | Category; + doc?: (number | null) | Category; url?: string | null; label?: string | null; id?: string | null; @@ -418,7 +418,7 @@ export interface Category { * via the `definition` "users". */ export interface User { - id: string; + id: number; name?: string | null; updatedAt: string; createdAt: string; @@ -467,11 +467,11 @@ export interface CallToActionBlock { reference?: | ({ relationTo: 'pages'; - value: string | Page; + value: number | Page; } | null) | ({ relationTo: 'posts'; - value: string | Post; + value: number | Post; } | null); url?: string | null; label: string; @@ -517,11 +517,11 @@ export interface ContentBlock { reference?: | ({ relationTo: 'pages'; - value: string | Page; + value: number | Page; } | null) | ({ relationTo: 'posts'; - value: string | Post; + value: number | Post; } | null); url?: string | null; label: string; @@ -542,7 +542,7 @@ export interface ContentBlock { * via the `definition` "MediaBlock". */ export interface MediaBlock { - media: string | Media; + media: number | Media; id?: string | null; blockName?: string | null; blockType: 'mediaBlock'; @@ -569,12 +569,12 @@ export interface ArchiveBlock { } | null; populateBy?: ('collection' | 'selection') | null; relationTo?: 'posts' | null; - categories?: (string | Category)[] | null; + categories?: (number | Category)[] | null; limit?: number | null; selectedDocs?: | { relationTo: 'posts'; - value: string | Post; + value: number | Post; }[] | null; id?: string | null; @@ -586,7 +586,7 @@ export interface ArchiveBlock { * via the `definition` "FormBlock". */ export interface FormBlock { - form: string | Form; + form: number | Form; enableIntro?: boolean | null; introContent?: { root: { @@ -612,7 +612,7 @@ export interface FormBlock { * via the `definition` "forms". */ export interface Form { - id: string; + id: number; title: string; fields?: | ( @@ -786,7 +786,7 @@ export interface Form { * via the `definition` "redirects". */ export interface Redirect { - id: string; + id: number; /** * You will need to rebuild the website when changing this field. */ @@ -796,11 +796,11 @@ export interface Redirect { reference?: | ({ relationTo: 'pages'; - value: string | Page; + value: number | Page; } | null) | ({ relationTo: 'posts'; - value: string | Post; + value: number | Post; } | null); url?: string | null; }; @@ -812,8 +812,8 @@ export interface Redirect { * via the `definition` "form-submissions". */ export interface FormSubmission { - id: string; - form: string | Form; + id: number; + form: number | Form; submissionData?: | { field: string; @@ -831,18 +831,18 @@ export interface FormSubmission { * via the `definition` "search". */ export interface Search { - id: string; + id: number; title?: string | null; priority?: number | null; doc: { relationTo: 'posts'; - value: string | Post; + value: number | Post; }; slug?: string | null; meta?: { title?: string | null; description?: string | null; - image?: (string | null) | Media; + image?: (number | null) | Media; }; categories?: | { @@ -860,7 +860,7 @@ export interface Search { * via the `definition` "payload-kv". */ export interface PayloadKv { - id: string; + id: number; key: string; data: | { @@ -877,7 +877,7 @@ export interface PayloadKv { * via the `definition` "payload-jobs". */ export interface PayloadJob { - id: string; + id: number; /** * Input data provided to the job */ @@ -969,52 +969,52 @@ export interface PayloadJob { * via the `definition` "payload-locked-documents". */ export interface PayloadLockedDocument { - id: string; + id: number; document?: | ({ relationTo: 'pages'; - value: string | Page; + value: number | Page; } | null) | ({ relationTo: 'posts'; - value: string | Post; + value: number | Post; } | null) | ({ relationTo: 'media'; - value: string | Media; + value: number | Media; } | null) | ({ relationTo: 'categories'; - value: string | Category; + value: number | Category; } | null) | ({ relationTo: 'users'; - value: string | User; + value: number | User; } | null) | ({ relationTo: 'redirects'; - value: string | Redirect; + value: number | Redirect; } | null) | ({ relationTo: 'forms'; - value: string | Form; + value: number | Form; } | null) | ({ relationTo: 'form-submissions'; - value: string | FormSubmission; + value: number | FormSubmission; } | null) | ({ relationTo: 'search'; - value: string | Search; + value: number | Search; } | null) | ({ relationTo: 'payload-folders'; - value: string | FolderInterface; + value: number | FolderInterface; } | null); globalSlug?: string | null; user: { relationTo: 'users'; - value: string | User; + value: number | User; }; updatedAt: string; createdAt: string; @@ -1024,10 +1024,10 @@ export interface PayloadLockedDocument { * via the `definition` "payload-preferences". */ export interface PayloadPreference { - id: string; + id: number; user: { relationTo: 'users'; - value: string | User; + value: number | User; }; key?: string | null; value?: @@ -1047,7 +1047,7 @@ export interface PayloadPreference { * via the `definition` "payload-migrations". */ export interface PayloadMigration { - id: string; + id: number; name?: string | null; batch?: number | null; updatedAt: string; @@ -1636,7 +1636,7 @@ export interface PayloadMigrationsSelect { * via the `definition` "header". */ export interface Header { - id: string; + id: number; navItems?: | { link: { @@ -1645,11 +1645,11 @@ export interface Header { reference?: | ({ relationTo: 'pages'; - value: string | Page; + value: number | Page; } | null) | ({ relationTo: 'posts'; - value: string | Post; + value: number | Post; } | null); url?: string | null; label: string; @@ -1665,7 +1665,7 @@ export interface Header { * via the `definition` "footer". */ export interface Footer { - id: string; + id: number; navItems?: | { link: { @@ -1674,11 +1674,11 @@ export interface Footer { reference?: | ({ relationTo: 'pages'; - value: string | Page; + value: number | Page; } | null) | ({ relationTo: 'posts'; - value: string | Post; + value: number | Post; } | null); url?: string | null; label: string; @@ -1756,14 +1756,14 @@ export interface TaskSchedulePublish { doc?: | ({ relationTo: 'pages'; - value: string | Page; + value: number | Page; } | null) | ({ relationTo: 'posts'; - value: string | Post; + value: number | Post; } | null); global?: string | null; - user?: (string | null) | User; + user?: (number | null) | User; }; output?: unknown; }