From ac986dbada9a015d7fcba597adc3d63eb072236d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lipt=C3=A1k=20P=C3=A9ter?= Date: Thu, 10 Sep 2026 21:59:11 +0200 Subject: [PATCH] feat(career): Improve application form behavior Allow administrators to require PDF CVs and enforce the setting in both the browser and API. Show complete group descriptions across desktop and mobile layouts. --- .../karrier/components/application-form.tsx | 17 +- .../(app)/karrier/components/career-group.tsx | 7 +- src/app/(app)/karrier/translations.ts | 2 + src/app/api/karrier/jelentkezes/route.ts | 7 + src/collections/CareerSettings.ts | 11 + src/lib/career-form.ts | 10 + ...260910_194346_add_cv_required_setting.json | 4513 +++++++++++++++++ ...20260910_194346_add_cv_required_setting.ts | 11 + src/migrations/index.ts | 6 + src/payload-types.ts | 5 + tests/career.test.ts | 17 +- 11 files changed, 4600 insertions(+), 6 deletions(-) create mode 100644 src/migrations/20260910_194346_add_cv_required_setting.json create mode 100644 src/migrations/20260910_194346_add_cv_required_setting.ts diff --git a/src/app/(app)/karrier/components/application-form.tsx b/src/app/(app)/karrier/components/application-form.tsx index 5f1df3f..2fea29c 100644 --- a/src/app/(app)/karrier/components/application-form.tsx +++ b/src/app/(app)/karrier/components/application-form.tsx @@ -5,6 +5,7 @@ import { useEffect, useRef, useState } from "react" import { MAX_CV_SIZE, validateAnswers, + validateCVPresence, type Answer, type FormConfig, type FormQuestion, @@ -239,6 +240,11 @@ export default function ApplicationForm({ showError(validated.error, validated.field) return } + const cvPresence = validateCVPresence(!!cv, config) + if (cvPresence !== true) { + showError(cvPresence, "cv") + return + } setStatus("submitting") setErrorMessage(null) setErrorField(undefined) @@ -315,7 +321,14 @@ export default function ApplicationForm({ className="mb-2 flex items-center gap-2 text-sm font-medium" > - {isEn ? "CV (optional)" : "Önéletrajz (opcionális)"} + {isEn ? "CV" : "Önéletrajz"} + {config.cvRequired ? ( + " *" + ) : ( + + {` (${isEn ? "optional" : "opcionális"})`} + + )}

{isEn @@ -329,6 +342,8 @@ export default function ApplicationForm({ type="file" accept=".pdf,application/pdf" aria-describedby="cv-help" + aria-invalid={errorField === "cv" || undefined} + required={config.cvRequired} className="block w-full min-w-0 text-sm file:mr-3 file:rounded-lg file:border-0 file:bg-career-accent-soft file:px-4 file:py-2 file:text-career-accent" onChange={(event) => { const file = event.target.files?.[0] ?? null diff --git a/src/app/(app)/karrier/components/career-group.tsx b/src/app/(app)/karrier/components/career-group.tsx index b838284..d26374b 100644 --- a/src/app/(app)/karrier/components/career-group.tsx +++ b/src/app/(app)/karrier/components/career-group.tsx @@ -68,10 +68,9 @@ export default function CareerGroup({

{groupName}

- {/* A sávban csak rövid, szöveges előnézet fér el. A CMS-ben a leírás - beágyazott képet is tartalmazhat — azt itt elrejtjük, különben - szétfeszítené a sávot. */} -
+ {/* A teljes formázott leírást megjelenítjük. A CMS-ben beágyazott kép is + szerepelhet — azt itt elrejtjük, hogy ne feszítse szét a csoportsávot. */} +

diff --git a/src/app/(app)/karrier/translations.ts b/src/app/(app)/karrier/translations.ts index 28af6f4..68799ba 100644 --- a/src/app/(app)/karrier/translations.ts +++ b/src/app/(app)/karrier/translations.ts @@ -79,6 +79,8 @@ export function applicationErrorText(code: string, isEn: boolean) { return isEn ? "The upload is too large. The PDF may be at most 5 MiB." : "A feltöltés túl nagy. A PDF legfeljebb 5 MiB lehet." case "INVALID_CV": return isEn ? "Please choose a valid, unencrypted PDF document." : "Kérlek, válassz érvényes, jelszóval nem védett PDF-dokumentumot." + case "MISSING_CV": + return isEn ? "Please attach your CV in PDF format." : "Kérlek, csatold az önéletrajzodat PDF formátumban." case "MISSING_FIELDS": return isEn ? "Please fill in the required fields and accept the data processing consent." diff --git a/src/app/api/karrier/jelentkezes/route.ts b/src/app/api/karrier/jelentkezes/route.ts index 5e75fff..fea9a94 100644 --- a/src/app/api/karrier/jelentkezes/route.ts +++ b/src/app/api/karrier/jelentkezes/route.ts @@ -6,6 +6,7 @@ import { } from "@/lib/application-upload"; import { resolveFormConfig, + validateCVPresence, validateAnswers, summarizeAnswers, type CoreKey, @@ -57,6 +58,12 @@ export async function POST(request: Request) { { error: parsed.error, field: parsed.field }, { status: 400 }, ); + const cvPresence = validateCVPresence(!!cv, formConfig); + if (cvPresence !== true) + return NextResponse.json( + { error: cvPresence, field: "cv" }, + { status: 400 }, + ); const language = body.language === "en" ? "en" : "hu"; if (cv) { const bytes = await validateCV(cv); diff --git a/src/collections/CareerSettings.ts b/src/collections/CareerSettings.ts index b9db03a..34e6938 100644 --- a/src/collections/CareerSettings.ts +++ b/src/collections/CareerSettings.ts @@ -165,6 +165,17 @@ export const CareerSettings: GlobalConfig = { return true; }, }, + { + name: "cvRequired", + type: "checkbox", + defaultValue: false, + label: "Önéletrajz kötelező", + admin: { + description: + "Bekapcsolva a beépített jelentkezési űrlap csak PDF önéletrajzzal küldhető be.", + condition: (data) => data?.applicationMode !== "googleForm", + }, + }, { name: "applicationsOpen", type: "checkbox", diff --git a/src/lib/career-form.ts b/src/lib/career-form.ts index 3a24c58..4ba7ef4 100644 --- a/src/lib/career-form.ts +++ b/src/lib/career-form.ts @@ -38,6 +38,7 @@ export interface FormQuestion { export interface FormConfig { version: string questions: FormQuestion[] + cvRequired: boolean } export const MAX_CV_SIZE = 5 * 1024 * 1024 export const DEFAULT_QUESTIONS: FormQuestion[] = [ @@ -99,6 +100,7 @@ export const DEFAULT_QUESTIONS: FormQuestion[] = [ export function resolveFormConfig( settings?: { formQuestions?: FormQuestion[] | null + cvRequired?: boolean | null updatedAt?: string | null } | null, ): FormConfig { @@ -107,8 +109,16 @@ export function resolveFormConfig( questions: settings?.formQuestions?.length ? settings.formQuestions : DEFAULT_QUESTIONS, + cvRequired: settings?.cvRequired === true, } } + +export function validateCVPresence( + hasCV: boolean, + config: Pick, +): true | "MISSING_CV" { + return config.cvRequired && !hasCV ? "MISSING_CV" : true +} export function validateQuestions(questions: FormQuestion[]): true | string { if (!questions.length || questions.length > 50) return "Az űrlap 1–50 kérdést tartalmazhat." diff --git a/src/migrations/20260910_194346_add_cv_required_setting.json b/src/migrations/20260910_194346_add_cv_required_setting.json new file mode 100644 index 0000000..59e47a3 --- /dev/null +++ b/src/migrations/20260910_194346_add_cv_required_setting.json @@ -0,0 +1,4513 @@ +{ + "version": "7", + "dialect": "postgresql", + "tables": { + "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 + }, + "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.media": { + "name": "media", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "alt": { + "name": "alt", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "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": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.articles_gallery": { + "name": "articles_gallery", + "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 + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "articles_gallery_order_idx": { + "name": "articles_gallery_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "articles_gallery_parent_id_idx": { + "name": "articles_gallery_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "articles_gallery_image_idx": { + "name": "articles_gallery_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "articles_gallery_image_id_media_id_fk": { + "name": "articles_gallery_image_id_media_id_fk", + "tableFrom": "articles_gallery", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "articles_gallery_parent_id_fk": { + "name": "articles_gallery_parent_id_fk", + "tableFrom": "articles_gallery", + "tableTo": "articles", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.articles": { + "name": "articles", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "title_eng": { + "name": "title_eng", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "short_description": { + "name": "short_description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "short_description_eng": { + "name": "short_description_eng", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "content_eng": { + "name": "content_eng", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "published_date": { + "name": "published_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "featured_image_id": { + "name": "featured_image_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "category_eng": { + "name": "category_eng", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "articles_featured_image_idx": { + "name": "articles_featured_image_idx", + "columns": [ + { + "expression": "featured_image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "articles_slug_idx": { + "name": "articles_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "articles_updated_at_idx": { + "name": "articles_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "articles_created_at_idx": { + "name": "articles_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "articles_featured_image_id_media_id_fk": { + "name": "articles_featured_image_id_media_id_fk", + "tableFrom": "articles", + "tableTo": "media", + "columnsFrom": [ + "featured_image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.events": { + "name": "events", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "title_eng": { + "name": "title_eng", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "description_eng": { + "name": "description_eng", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "start_date": { + "name": "start_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "end_date": { + "name": "end_date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": false + }, + "location": { + "name": "location", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "facebook_event_link": { + "name": "facebook_event_link", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "link_to_picture_from_event_id": { + "name": "link_to_picture_from_event_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "events_image_idx": { + "name": "events_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "events_link_to_picture_from_event_idx": { + "name": "events_link_to_picture_from_event_idx", + "columns": [ + { + "expression": "link_to_picture_from_event_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "events_slug_idx": { + "name": "events_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "events_updated_at_idx": { + "name": "events_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "events_created_at_idx": { + "name": "events_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "events_image_id_media_id_fk": { + "name": "events_image_id_media_id_fk", + "tableFrom": "events", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "events_link_to_picture_from_event_id_gallery_id_fk": { + "name": "events_link_to_picture_from_event_id_gallery_id_fk", + "tableFrom": "events", + "tableTo": "gallery", + "columnsFrom": [ + "link_to_picture_from_event_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.cars_gallery": { + "name": "cars_gallery", + "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 + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "cars_gallery_order_idx": { + "name": "cars_gallery_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "cars_gallery_parent_id_idx": { + "name": "cars_gallery_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "cars_gallery_image_idx": { + "name": "cars_gallery_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "cars_gallery_image_id_media_id_fk": { + "name": "cars_gallery_image_id_media_id_fk", + "tableFrom": "cars_gallery", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "cars_gallery_parent_id_fk": { + "name": "cars_gallery_parent_id_fk", + "tableFrom": "cars_gallery", + "tableTo": "cars", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.cars": { + "name": "cars", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "year": { + "name": "year", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "description_eng": { + "name": "description_eng", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "interactive_model_id": { + "name": "interactive_model_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": { + "cars_image_idx": { + "name": "cars_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "cars_interactive_model_idx": { + "name": "cars_interactive_model_idx", + "columns": [ + { + "expression": "interactive_model_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "cars_updated_at_idx": { + "name": "cars_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "cars_created_at_idx": { + "name": "cars_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "cars_image_id_media_id_fk": { + "name": "cars_image_id_media_id_fk", + "tableFrom": "cars", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "cars_interactive_model_id_media_id_fk": { + "name": "cars_interactive_model_id_media_id_fk", + "tableFrom": "cars", + "tableTo": "media", + "columnsFrom": [ + "interactive_model_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.gallery_images": { + "name": "gallery_images", + "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 + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "gallery_images_order_idx": { + "name": "gallery_images_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "gallery_images_parent_id_idx": { + "name": "gallery_images_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "gallery_images_image_idx": { + "name": "gallery_images_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "gallery_images_image_id_media_id_fk": { + "name": "gallery_images_image_id_media_id_fk", + "tableFrom": "gallery_images", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "gallery_images_parent_id_fk": { + "name": "gallery_images_parent_id_fk", + "tableFrom": "gallery_images", + "tableTo": "gallery", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.gallery": { + "name": "gallery", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "title_eng": { + "name": "title_eng", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "date": { + "name": "date", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "slug": { + "name": "slug", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "gallery_slug_idx": { + "name": "gallery_slug_idx", + "columns": [ + { + "expression": "slug", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "gallery_updated_at_idx": { + "name": "gallery_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "gallery_created_at_idx": { + "name": "gallery_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.publications": { + "name": "publications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "title_eng": { + "name": "title_eng", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "author": { + "name": "author", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "description_eng": { + "name": "description_eng", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "link": { + "name": "link", + "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": { + "publications_updated_at_idx": { + "name": "publications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "publications_created_at_idx": { + "name": "publications_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.members": { + "name": "members", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "group_id": { + "name": "group_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "position": { + "name": "position", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "position_en": { + "name": "position_en", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "picture_id": { + "name": "picture_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "linkedin": { + "name": "linkedin", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "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": { + "members_group_idx": { + "name": "members_group_idx", + "columns": [ + { + "expression": "group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "members_picture_idx": { + "name": "members_picture_idx", + "columns": [ + { + "expression": "picture_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "members_updated_at_idx": { + "name": "members_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "members_created_at_idx": { + "name": "members_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "members_group_id_groups_id_fk": { + "name": "members_group_id_groups_id_fk", + "tableFrom": "members", + "tableTo": "groups", + "columnsFrom": [ + "group_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + }, + "members_picture_id_media_id_fk": { + "name": "members_picture_id_media_id_fk", + "tableFrom": "members", + "tableTo": "media", + "columnsFrom": [ + "picture_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sponsors": { + "name": "sponsors", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "logo_id": { + "name": "logo_id", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "website": { + "name": "website", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "tier": { + "name": "tier", + "type": "enum_sponsors_tier", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sponsors_logo_idx": { + "name": "sponsors_logo_idx", + "columns": [ + { + "expression": "logo_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sponsors_updated_at_idx": { + "name": "sponsors_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sponsors_created_at_idx": { + "name": "sponsors_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sponsors_logo_id_media_id_fk": { + "name": "sponsors_logo_id_media_id_fk", + "tableFrom": "sponsors", + "tableTo": "media", + "columnsFrom": [ + "logo_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.recruitment_positions_sections": { + "name": "recruitment_positions_sections", + "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 + }, + "section_title": { + "name": "section_title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "section_title_eng": { + "name": "section_title_eng", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "section_content": { + "name": "section_content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "section_content_eng": { + "name": "section_content_eng", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "recruitment_positions_sections_order_idx": { + "name": "recruitment_positions_sections_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "recruitment_positions_sections_parent_id_idx": { + "name": "recruitment_positions_sections_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "recruitment_positions_sections_parent_id_fk": { + "name": "recruitment_positions_sections_parent_id_fk", + "tableFrom": "recruitment_positions_sections", + "tableTo": "recruitment_positions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.recruitment_positions": { + "name": "recruitment_positions", + "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 + }, + "position_name": { + "name": "position_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "position_name_eng": { + "name": "position_name_eng", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "position_open": { + "name": "position_open", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "position_description": { + "name": "position_description", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "position_description_eng": { + "name": "position_description_eng", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "highlights_joining": { + "name": "highlights_joining", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "highlights_joining_eng": { + "name": "highlights_joining_eng", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "highlights_time_commitment": { + "name": "highlights_time_commitment", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "highlights_time_commitment_eng": { + "name": "highlights_time_commitment_eng", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "highlights_subsystem": { + "name": "highlights_subsystem", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "highlights_subsystem_eng": { + "name": "highlights_subsystem_eng", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "recruitment_positions_order_idx": { + "name": "recruitment_positions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "recruitment_positions_parent_id_idx": { + "name": "recruitment_positions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "recruitment_positions_parent_id_fk": { + "name": "recruitment_positions_parent_id_fk", + "tableFrom": "recruitment_positions", + "tableTo": "recruitment", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.recruitment": { + "name": "recruitment", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "group_name": { + "name": "group_name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "group_name_eng": { + "name": "group_name_eng", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "image_id": { + "name": "image_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "order": { + "name": "order", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "description_eng": { + "name": "description_eng", + "type": "jsonb", + "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": { + "recruitment_image_idx": { + "name": "recruitment_image_idx", + "columns": [ + { + "expression": "image_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "recruitment_updated_at_idx": { + "name": "recruitment_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "recruitment_created_at_idx": { + "name": "recruitment_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "recruitment_image_id_media_id_fk": { + "name": "recruitment_image_id_media_id_fk", + "tableFrom": "recruitment", + "tableTo": "media", + "columnsFrom": [ + "image_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.job_applications": { + "name": "job_applications", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "cv_id": { + "name": "cv_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "form_version": { + "name": "form_version", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "language": { + "name": "language", + "type": "enum_job_applications_language", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "answer_summary": { + "name": "answer_summary", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "answer_snapshot": { + "name": "answer_snapshot", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "phone": { + "name": "phone", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "university": { + "name": "university", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "major": { + "name": "major", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "semester": { + "name": "semester", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "group_name": { + "name": "group_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "position_name": { + "name": "position_name", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "motivation": { + "name": "motivation", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "consent": { + "name": "consent", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "sheet_sync_status": { + "name": "sheet_sync_status", + "type": "enum_job_applications_sheet_sync_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "sheet_sync_error": { + "name": "sheet_sync_error", + "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": { + "job_applications_cv_idx": { + "name": "job_applications_cv_idx", + "columns": [ + { + "expression": "cv_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_applications_updated_at_idx": { + "name": "job_applications_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_applications_created_at_idx": { + "name": "job_applications_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "job_applications_cv_id_application_cvs_id_fk": { + "name": "job_applications_cv_id_application_cvs_id_fk", + "tableFrom": "job_applications", + "tableTo": "application_cvs", + "columnsFrom": [ + "cv_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.application_cvs": { + "name": "application_cvs", + "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": true, + "default": "now()" + }, + "created_at": { + "name": "created_at", + "type": "timestamp(3) with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "url": { + "name": "url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "thumbnail_u_r_l": { + "name": "thumbnail_u_r_l", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filename": { + "name": "filename", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "mime_type": { + "name": "mime_type", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "filesize": { + "name": "filesize", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_x": { + "name": "focal_x", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "focal_y": { + "name": "focal_y", + "type": "numeric", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "application_cvs_updated_at_idx": { + "name": "application_cvs_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "application_cvs_created_at_idx": { + "name": "application_cvs_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "application_cvs_filename_idx": { + "name": "application_cvs_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.groups": { + "name": "groups", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "name_en": { + "name": "name_en", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "description_eng": { + "name": "description_eng", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "order": { + "name": "order", + "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": { + "groups_updated_at_idx": { + "name": "groups_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "groups_created_at_idx": { + "name": "groups_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.association": { + "name": "association", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "title_en": { + "name": "title_en", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "content_en": { + "name": "content_en", + "type": "jsonb", + "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": { + "association_updated_at_idx": { + "name": "association_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "association_created_at_idx": { + "name": "association_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.support_us": { + "name": "support_us", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "title_en": { + "name": "title_en", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "button_text": { + "name": "button_text", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'Támogatom a csapatot'" + }, + "button_text_en": { + "name": "button_text_en", + "type": "varchar", + "primaryKey": false, + "notNull": true, + "default": "'Support the team'" + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "content_en": { + "name": "content_en", + "type": "jsonb", + "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": { + "support_us_updated_at_idx": { + "name": "support_us_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "support_us_created_at_idx": { + "name": "support_us_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.contact": { + "name": "contact", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "exhibition_url": { + "name": "exhibition_url", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'https://docs.google.com/forms/d/e/1FAIpQLSdrA3VX3YpxQB3uZ1ojXov8-J3LPawAt4ip_Aj4k8FNbNOCrA/viewform?usp=dialog'" + }, + "exhibition_label": { + "name": "exhibition_label", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Rendezvényen való kiállítási igény'" + }, + "exhibition_label_eng": { + "name": "exhibition_label_eng", + "type": "varchar", + "primaryKey": false, + "notNull": false, + "default": "'Event Exhibition Request'" + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "title_en": { + "name": "title_en", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "content_en": { + "name": "content_en", + "type": "jsonb", + "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": { + "contact_updated_at_idx": { + "name": "contact_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "contact_created_at_idx": { + "name": "contact_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.formula_student": { + "name": "formula_student", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "title_en": { + "name": "title_en", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "content_en": { + "name": "content_en", + "type": "jsonb", + "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": { + "formula_student_updated_at_idx": { + "name": "formula_student_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "formula_student_created_at_idx": { + "name": "formula_student_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_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_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 + }, + "users_id": { + "name": "users_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "media_id": { + "name": "media_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "articles_id": { + "name": "articles_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "events_id": { + "name": "events_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "cars_id": { + "name": "cars_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "gallery_id": { + "name": "gallery_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "publications_id": { + "name": "publications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "members_id": { + "name": "members_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "sponsors_id": { + "name": "sponsors_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "recruitment_id": { + "name": "recruitment_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "job_applications_id": { + "name": "job_applications_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "application_cvs_id": { + "name": "application_cvs_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "groups_id": { + "name": "groups_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "association_id": { + "name": "association_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "support_us_id": { + "name": "support_us_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "contact_id": { + "name": "contact_id", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "formula_student_id": { + "name": "formula_student_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_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_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_articles_id_idx": { + "name": "payload_locked_documents_rels_articles_id_idx", + "columns": [ + { + "expression": "articles_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_events_id_idx": { + "name": "payload_locked_documents_rels_events_id_idx", + "columns": [ + { + "expression": "events_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_cars_id_idx": { + "name": "payload_locked_documents_rels_cars_id_idx", + "columns": [ + { + "expression": "cars_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_gallery_id_idx": { + "name": "payload_locked_documents_rels_gallery_id_idx", + "columns": [ + { + "expression": "gallery_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_publications_id_idx": { + "name": "payload_locked_documents_rels_publications_id_idx", + "columns": [ + { + "expression": "publications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_members_id_idx": { + "name": "payload_locked_documents_rels_members_id_idx", + "columns": [ + { + "expression": "members_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_sponsors_id_idx": { + "name": "payload_locked_documents_rels_sponsors_id_idx", + "columns": [ + { + "expression": "sponsors_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_recruitment_id_idx": { + "name": "payload_locked_documents_rels_recruitment_id_idx", + "columns": [ + { + "expression": "recruitment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_job_applications_id_idx": { + "name": "payload_locked_documents_rels_job_applications_id_idx", + "columns": [ + { + "expression": "job_applications_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_application_cvs_id_idx": { + "name": "payload_locked_documents_rels_application_cvs_id_idx", + "columns": [ + { + "expression": "application_cvs_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_groups_id_idx": { + "name": "payload_locked_documents_rels_groups_id_idx", + "columns": [ + { + "expression": "groups_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_association_id_idx": { + "name": "payload_locked_documents_rels_association_id_idx", + "columns": [ + { + "expression": "association_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_support_us_id_idx": { + "name": "payload_locked_documents_rels_support_us_id_idx", + "columns": [ + { + "expression": "support_us_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_contact_id_idx": { + "name": "payload_locked_documents_rels_contact_id_idx", + "columns": [ + { + "expression": "contact_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "payload_locked_documents_rels_formula_student_id_idx": { + "name": "payload_locked_documents_rels_formula_student_id_idx", + "columns": [ + { + "expression": "formula_student_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_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_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_articles_fk": { + "name": "payload_locked_documents_rels_articles_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "articles", + "columnsFrom": [ + "articles_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_events_fk": { + "name": "payload_locked_documents_rels_events_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "events", + "columnsFrom": [ + "events_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_cars_fk": { + "name": "payload_locked_documents_rels_cars_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "cars", + "columnsFrom": [ + "cars_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_gallery_fk": { + "name": "payload_locked_documents_rels_gallery_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "gallery", + "columnsFrom": [ + "gallery_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_publications_fk": { + "name": "payload_locked_documents_rels_publications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "publications", + "columnsFrom": [ + "publications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_members_fk": { + "name": "payload_locked_documents_rels_members_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "members", + "columnsFrom": [ + "members_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_sponsors_fk": { + "name": "payload_locked_documents_rels_sponsors_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "sponsors", + "columnsFrom": [ + "sponsors_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_recruitment_fk": { + "name": "payload_locked_documents_rels_recruitment_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "recruitment", + "columnsFrom": [ + "recruitment_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_job_applications_fk": { + "name": "payload_locked_documents_rels_job_applications_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "job_applications", + "columnsFrom": [ + "job_applications_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_application_cvs_fk": { + "name": "payload_locked_documents_rels_application_cvs_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "application_cvs", + "columnsFrom": [ + "application_cvs_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_groups_fk": { + "name": "payload_locked_documents_rels_groups_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "groups", + "columnsFrom": [ + "groups_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_association_fk": { + "name": "payload_locked_documents_rels_association_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "association", + "columnsFrom": [ + "association_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_support_us_fk": { + "name": "payload_locked_documents_rels_support_us_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "support_us", + "columnsFrom": [ + "support_us_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_contact_fk": { + "name": "payload_locked_documents_rels_contact_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "contact", + "columnsFrom": [ + "contact_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "payload_locked_documents_rels_formula_student_fk": { + "name": "payload_locked_documents_rels_formula_student_fk", + "tableFrom": "payload_locked_documents_rels", + "tableTo": "formula_student", + "columnsFrom": [ + "formula_student_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.site_settings": { + "name": "site_settings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "show_association_page": { + "name": "show_association_page", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "show_recruitment_page": { + "name": "show_recruitment_page", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": 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.career_settings_form_questions_options": { + "name": "career_settings_form_questions_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 + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "label_eng": { + "name": "label_eng", + "type": "varchar", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "career_settings_form_questions_options_order_idx": { + "name": "career_settings_form_questions_options_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "career_settings_form_questions_options_parent_id_idx": { + "name": "career_settings_form_questions_options_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "career_settings_form_questions_options_parent_id_fk": { + "name": "career_settings_form_questions_options_parent_id_fk", + "tableFrom": "career_settings_form_questions_options", + "tableTo": "career_settings_form_questions", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.career_settings_form_questions": { + "name": "career_settings_form_questions", + "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 + }, + "key": { + "name": "key", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "label_eng": { + "name": "label_eng", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "hint": { + "name": "hint", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "hint_eng": { + "name": "hint_eng", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "enum_career_settings_form_questions_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'text'" + }, + "required": { + "name": "required", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "hidden": { + "name": "hidden", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + } + }, + "indexes": { + "career_settings_form_questions_order_idx": { + "name": "career_settings_form_questions_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "career_settings_form_questions_parent_id_idx": { + "name": "career_settings_form_questions_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "career_settings_form_questions_parent_id_fk": { + "name": "career_settings_form_questions_parent_id_fk", + "tableFrom": "career_settings_form_questions", + "tableTo": "career_settings", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.career_settings_faqs": { + "name": "career_settings_faqs", + "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 + }, + "question": { + "name": "question", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "question_eng": { + "name": "question_eng", + "type": "varchar", + "primaryKey": false, + "notNull": true + }, + "answer": { + "name": "answer", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "answer_eng": { + "name": "answer_eng", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "career_settings_faqs_order_idx": { + "name": "career_settings_faqs_order_idx", + "columns": [ + { + "expression": "_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "career_settings_faqs_parent_id_idx": { + "name": "career_settings_faqs_parent_id_idx", + "columns": [ + { + "expression": "_parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "career_settings_faqs_parent_id_fk": { + "name": "career_settings_faqs_parent_id_fk", + "tableFrom": "career_settings_faqs", + "tableTo": "career_settings", + "columnsFrom": [ + "_parent_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.career_settings": { + "name": "career_settings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "intro": { + "name": "intro", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "intro_eng": { + "name": "intro_eng", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "application_mode": { + "name": "application_mode", + "type": "enum_career_settings_application_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": false, + "default": "'builtIn'" + }, + "google_form_url": { + "name": "google_form_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "spreadsheet_url": { + "name": "spreadsheet_url", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "cv_required": { + "name": "cv_required", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "applications_open": { + "name": "applications_open", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "applications_closed_text": { + "name": "applications_closed_text", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "applications_closed_text_eng": { + "name": "applications_closed_text_eng", + "type": "varchar", + "primaryKey": false, + "notNull": false + }, + "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 + } + }, + "enums": { + "public.enum_sponsors_tier": { + "name": "enum_sponsors_tier", + "schema": "public", + "values": [ + "diamond", + "gold", + "silver", + "copper", + "other", + "bme" + ] + }, + "public.enum_job_applications_language": { + "name": "enum_job_applications_language", + "schema": "public", + "values": [ + "hu", + "en" + ] + }, + "public.enum_job_applications_sheet_sync_status": { + "name": "enum_job_applications_sheet_sync_status", + "schema": "public", + "values": [ + "ok", + "skipped", + "error" + ] + }, + "public.enum_career_settings_form_questions_type": { + "name": "enum_career_settings_form_questions_type", + "schema": "public", + "values": [ + "text", + "textarea", + "select", + "multiselect", + "checkbox" + ] + }, + "public.enum_career_settings_application_mode": { + "name": "enum_career_settings_application_mode", + "schema": "public", + "values": [ + "builtIn", + "googleForm" + ] + } + }, + "schemas": {}, + "sequences": {}, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "id": "3771bb5b-e7b5-4ae0-99f1-8b3994612285", + "prevId": "00000000-0000-0000-0000-000000000000" +} \ No newline at end of file diff --git a/src/migrations/20260910_194346_add_cv_required_setting.ts b/src/migrations/20260910_194346_add_cv_required_setting.ts new file mode 100644 index 0000000..fb8fc08 --- /dev/null +++ b/src/migrations/20260910_194346_add_cv_required_setting.ts @@ -0,0 +1,11 @@ +import { MigrateUpArgs, MigrateDownArgs, sql } from '@payloadcms/db-postgres' + +export async function up({ db }: MigrateUpArgs): Promise { + await db.execute(sql` + ALTER TABLE "career_settings" ADD COLUMN "cv_required" boolean DEFAULT false;`) +} + +export async function down({ db }: MigrateDownArgs): Promise { + await db.execute(sql` + ALTER TABLE "career_settings" DROP COLUMN "cv_required";`) +} diff --git a/src/migrations/index.ts b/src/migrations/index.ts index 9a0b204..692c901 100644 --- a/src/migrations/index.ts +++ b/src/migrations/index.ts @@ -12,6 +12,7 @@ import * as migration_20260729_182451_karrier_oldal from './20260729_182451_karr import * as migration_20260730_204153_karrier_sheets_link from './20260730_204153_karrier_sheets_link'; import * as migration_20260803_170842_karrier_faq from './20260803_170842_karrier_faq'; import * as migration_20260906_154659_career_form_cv_contact from './20260906_154659_career_form_cv_contact'; +import * as migration_20260910_194346_add_cv_required_setting from './20260910_194346_add_cv_required_setting'; export const migrations = [ { @@ -80,4 +81,9 @@ export const migrations = [ down: migration_events_baseline.down, name: '20260906_220000_events_baseline', }, + { + up: migration_20260910_194346_add_cv_required_setting.up, + down: migration_20260910_194346_add_cv_required_setting.down, + name: '20260910_194346_add_cv_required_setting' + }, ]; diff --git a/src/payload-types.ts b/src/payload-types.ts index ff590b7..1f50760 100644 --- a/src/payload-types.ts +++ b/src/payload-types.ts @@ -1503,6 +1503,10 @@ export interface CareerSetting { */ googleFormUrl?: string | null; spreadsheetUrl?: string | null; + /** + * Bekapcsolva a beépített jelentkezési űrlap csak PDF önéletrajzzal küldhető be. + */ + cvRequired?: boolean | null; /** * Kikapcsolva az oldal továbbra is elérhető, de a jelentkezési űrlap és a „Jelentkezz” gomb helyett egy tájékoztató szöveg jelenik meg. */ @@ -1594,6 +1598,7 @@ export interface CareerSettingsSelect { applicationMode?: T; googleFormUrl?: T; spreadsheetUrl?: T; + cvRequired?: T; applicationsOpen?: T; applicationsClosedText?: T; applicationsClosedTextEng?: T; diff --git a/tests/career.test.ts b/tests/career.test.ts index 10fdae0..40e1ad7 100644 --- a/tests/career.test.ts +++ b/tests/career.test.ts @@ -5,6 +5,7 @@ import { DEFAULT_QUESTIONS, MAX_CV_SIZE, resolveFormConfig, + validateCVPresence, validateQuestions, validateAnswers, summarizeAnswers, @@ -33,7 +34,21 @@ const custom: FormQuestion = { required: true, options: [option], } -const config = { version: "v1", questions: [...DEFAULT_QUESTIONS, custom] } +const config = { + version: "v1", + questions: [...DEFAULT_QUESTIONS, custom], + cvRequired: false, +} + +test("CV requirement defaults to optional and follows the admin setting", () => { + assert.equal(resolveFormConfig().cvRequired, false) + assert.equal(resolveFormConfig({ cvRequired: false }).cvRequired, false) + const requiredConfig = resolveFormConfig({ cvRequired: true }) + assert.equal(requiredConfig.cvRequired, true) + assert.equal(validateCVPresence(false, requiredConfig), "MISSING_CV") + assert.equal(validateCVPresence(true, requiredConfig), true) + assert.equal(validateCVPresence(false, resolveFormConfig()), true) +}) test("mandatory core fields cannot be deleted, hidden or changed to another type", () => { for (const key of ["name", "email", "consent"]) {