From 15c25739abe3771599e7fc8f8796553d51d71ce3 Mon Sep 17 00:00:00 2001 From: Jarkko Pesonen <435495+jrkkp@users.noreply.github.com> Date: Wed, 6 Nov 2024 14:04:22 +0200 Subject: [PATCH] VKT(Backend & Frontend): Merge fixes & database dump update --- backend/vkt/db/1_tables.sql | 1791 +++++++++++------ backend/vkt/db/2_tables_data.sql | 132 +- backend/vkt/db/3_liquibase.sql | 241 +-- backend/vkt/db/4_init.sql | 83 +- .../PublicExaminerListing.tsx | 2 +- 5 files changed, 1375 insertions(+), 874 deletions(-) diff --git a/backend/vkt/db/1_tables.sql b/backend/vkt/db/1_tables.sql index 427064f6e..cb24b8fd2 100644 --- a/backend/vkt/db/1_tables.sql +++ b/backend/vkt/db/1_tables.sql @@ -1,663 +1,1128 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 12.9 (Debian 12.9-1.pgdg110+1) --- Dumped by pg_dump version 14.7 (Homebrew) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -SET default_tablespace = ''; - -SET default_table_access_method = heap; - --- --- Name: email; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.email ( - email_id bigint NOT NULL, - version integer DEFAULT 0 NOT NULL, - created_by text, - modified_by text, - deleted_by text, - created_at timestamp with time zone DEFAULT now() NOT NULL, - modified_at timestamp with time zone DEFAULT now() NOT NULL, - deleted_at timestamp with time zone, - email_type character varying(255) NOT NULL, - recipient_name text NOT NULL, - recipient_address text NOT NULL, - subject text NOT NULL, - body text NOT NULL, - sent_at timestamp with time zone, - ext_id text, - error text -); - - -ALTER TABLE public.email OWNER TO postgres; - --- --- Name: email_attachment; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.email_attachment ( - email_attachment_id bigint NOT NULL, - version integer DEFAULT 0 NOT NULL, - created_by text, - modified_by text, - deleted_by text, - created_at timestamp with time zone DEFAULT now() NOT NULL, - modified_at timestamp with time zone DEFAULT now() NOT NULL, - deleted_at timestamp with time zone, - email_id bigint NOT NULL, - name character varying(255) NOT NULL, - content_type character varying(255) NOT NULL, - data bytea NOT NULL -); - - -ALTER TABLE public.email_attachment OWNER TO postgres; - --- --- Name: email_attachment_email_attachment_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres --- - -ALTER TABLE public.email_attachment ALTER COLUMN email_attachment_id ADD GENERATED BY DEFAULT AS IDENTITY ( - SEQUENCE NAME public.email_attachment_email_attachment_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1 -); - - --- --- Name: email_email_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres --- - -ALTER TABLE public.email ALTER COLUMN email_id ADD GENERATED BY DEFAULT AS IDENTITY ( - SEQUENCE NAME public.email_email_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1 -); - - --- --- Name: email_type; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.email_type ( - name character varying(255) NOT NULL -); - - -ALTER TABLE public.email_type OWNER TO postgres; - --- --- Name: enrollment; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.enrollment ( - enrollment_id bigint NOT NULL, - version integer DEFAULT 0 NOT NULL, - created_by text, - modified_by text, - deleted_by text, - created_at timestamp with time zone DEFAULT now() NOT NULL, - modified_at timestamp with time zone DEFAULT now() NOT NULL, - deleted_at timestamp with time zone, - exam_event_id bigint NOT NULL, - person_id bigint NOT NULL, - skill_oral boolean NOT NULL, - skill_textual boolean NOT NULL, - skill_understanding boolean NOT NULL, - partial_exam_speaking boolean NOT NULL, - partial_exam_speech_comprehension boolean NOT NULL, - partial_exam_writing boolean NOT NULL, - partial_exam_reading_comprehension boolean NOT NULL, - status character varying(255) NOT NULL, - previous_enrollment text, - digital_certificate_consent boolean NOT NULL, - email text NOT NULL, - phone_number text NOT NULL, - street text, - postal_code text, - town text, - country text, - payment_link_hash character varying(255), - payment_link_expires_at timestamp with time zone -); - - -ALTER TABLE public.enrollment OWNER TO postgres; - --- --- Name: enrollment_enrollment_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres --- - -ALTER TABLE public.enrollment ALTER COLUMN enrollment_id ADD GENERATED BY DEFAULT AS IDENTITY ( - SEQUENCE NAME public.enrollment_enrollment_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1 -); - - --- --- Name: enrollment_status; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.enrollment_status ( - name character varying(255) NOT NULL -); - - -ALTER TABLE public.enrollment_status OWNER TO postgres; - --- --- Name: exam_event; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.exam_event ( - exam_event_id bigint NOT NULL, - version integer DEFAULT 0 NOT NULL, - created_by text, - modified_by text, - deleted_by text, - created_at timestamp with time zone DEFAULT now() NOT NULL, - modified_at timestamp with time zone DEFAULT now() NOT NULL, - deleted_at timestamp with time zone, - language character varying(10) NOT NULL, - level character varying(255) NOT NULL, - date date NOT NULL, - registration_closes date NOT NULL, - is_hidden boolean NOT NULL, - max_participants integer NOT NULL, - CONSTRAINT ck_exam_event_max_participants CHECK ((max_participants >= 0)), - CONSTRAINT ck_exam_event_registration_closes CHECK ((registration_closes <= date)) -); - - -ALTER TABLE public.exam_event OWNER TO postgres; - --- --- Name: exam_event_exam_event_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres --- - -ALTER TABLE public.exam_event ALTER COLUMN exam_event_id ADD GENERATED BY DEFAULT AS IDENTITY ( - SEQUENCE NAME public.exam_event_exam_event_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1 -); - - --- --- Name: exam_language; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.exam_language ( - name character varying(10) NOT NULL -); - - -ALTER TABLE public.exam_language OWNER TO postgres; - --- --- Name: exam_level; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.exam_level ( - name character varying(255) NOT NULL -); - - -ALTER TABLE public.exam_level OWNER TO postgres; - --- --- Name: payment; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.payment ( - payment_id bigint NOT NULL, - version integer DEFAULT 0 NOT NULL, - created_by text, - modified_by text, - deleted_by text, - created_at timestamp with time zone DEFAULT now() NOT NULL, - modified_at timestamp with time zone DEFAULT now() NOT NULL, - deleted_at timestamp with time zone, - enrollment_id bigint NOT NULL, - amount integer NOT NULL, - transaction_id text, - reference text, - payment_url text, - payment_status text -); - - -ALTER TABLE public.payment OWNER TO postgres; - --- --- Name: payment_payment_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres --- - -ALTER TABLE public.payment ALTER COLUMN payment_id ADD GENERATED BY DEFAULT AS IDENTITY ( - SEQUENCE NAME public.payment_payment_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1 -); - - --- --- Name: person; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.person ( - person_id bigint NOT NULL, - version integer DEFAULT 0 NOT NULL, - created_by text, - modified_by text, - deleted_by text, - created_at timestamp with time zone DEFAULT now() NOT NULL, - modified_at timestamp with time zone DEFAULT now() NOT NULL, - deleted_at timestamp with time zone, - last_name text NOT NULL, - first_name text NOT NULL, - oid character varying(255), - other_identifier character varying(1024), - latest_identified_at timestamp with time zone NOT NULL -); - - -ALTER TABLE public.person OWNER TO postgres; - --- --- Name: person_person_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres --- - -ALTER TABLE public.person ALTER COLUMN person_id ADD GENERATED BY DEFAULT AS IDENTITY ( - SEQUENCE NAME public.person_person_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1 -); - - --- --- Name: reservation; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.reservation ( - reservation_id bigint NOT NULL, - version integer DEFAULT 0 NOT NULL, - created_by text, - modified_by text, - deleted_by text, - created_at timestamp with time zone DEFAULT now() NOT NULL, - modified_at timestamp with time zone DEFAULT now() NOT NULL, - deleted_at timestamp with time zone, - exam_event_id bigint NOT NULL, - person_id bigint NOT NULL, - expires_at timestamp with time zone NOT NULL, - renewed_at timestamp with time zone -); - - -ALTER TABLE public.reservation OWNER TO postgres; - --- --- Name: reservation_reservation_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres --- - -ALTER TABLE public.reservation ALTER COLUMN reservation_id ADD GENERATED BY DEFAULT AS IDENTITY ( - SEQUENCE NAME public.reservation_reservation_id_seq - START WITH 1 - INCREMENT BY 1 - NO MINVALUE - NO MAXVALUE - CACHE 1 -); - - --- --- Name: shedlock; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.shedlock ( - name character varying(64) NOT NULL, - lock_until timestamp without time zone NOT NULL, - locked_at timestamp without time zone NOT NULL, - locked_by character varying(255) NOT NULL -); - - -ALTER TABLE public.shedlock OWNER TO postgres; - --- --- Name: spring_session; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.spring_session ( - primary_id character(36) NOT NULL, - session_id character(36) NOT NULL, - creation_time bigint NOT NULL, - last_access_time bigint NOT NULL, - max_inactive_interval integer NOT NULL, - expiry_time bigint NOT NULL, - principal_name character varying(100) -); - - -ALTER TABLE public.spring_session OWNER TO postgres; - --- --- Name: spring_session_attributes; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.spring_session_attributes ( - session_primary_id character(36) NOT NULL, - attribute_name character varying(200) NOT NULL, - attribute_bytes bytea NOT NULL -); - - -ALTER TABLE public.spring_session_attributes OWNER TO postgres; - --- --- Name: email_attachment email_attachment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.email_attachment - ADD CONSTRAINT email_attachment_pkey PRIMARY KEY (email_attachment_id); - - --- --- Name: email email_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.email - ADD CONSTRAINT email_pkey PRIMARY KEY (email_id); - - --- --- Name: email_type email_type_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.email_type - ADD CONSTRAINT email_type_pkey PRIMARY KEY (name); - - --- --- Name: enrollment enrollment_payment_link_hash_uniq_idx; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.enrollment - ADD CONSTRAINT enrollment_payment_link_hash_uniq_idx UNIQUE (payment_link_hash); - - --- --- Name: enrollment enrollment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.enrollment - ADD CONSTRAINT enrollment_pkey PRIMARY KEY (enrollment_id); - - --- --- Name: enrollment_status enrollment_status_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.enrollment_status - ADD CONSTRAINT enrollment_status_pkey PRIMARY KEY (name); - - --- --- Name: exam_event exam_event_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.exam_event - ADD CONSTRAINT exam_event_pkey PRIMARY KEY (exam_event_id); - - --- --- Name: exam_language exam_language_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.exam_language - ADD CONSTRAINT exam_language_pkey PRIMARY KEY (name); - - --- --- Name: exam_level exam_level_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.exam_level - ADD CONSTRAINT exam_level_pkey PRIMARY KEY (name); - - --- --- Name: payment payment_id_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.payment - ADD CONSTRAINT payment_id_pkey PRIMARY KEY (payment_id); - - --- --- Name: person person_oid_uniq_idx; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.person - ADD CONSTRAINT person_oid_uniq_idx UNIQUE (oid); - - --- --- Name: person person_other_id_uniq_idx; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.person - ADD CONSTRAINT person_other_id_uniq_idx UNIQUE (other_identifier); - - --- --- Name: person person_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.person - ADD CONSTRAINT person_pkey PRIMARY KEY (person_id); - - --- --- Name: reservation reservation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.reservation - ADD CONSTRAINT reservation_pkey PRIMARY KEY (reservation_id); - - --- --- Name: shedlock shedlock_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.shedlock - ADD CONSTRAINT shedlock_pkey PRIMARY KEY (name); - - --- --- Name: spring_session_attributes spring_session_attributes_pk; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.spring_session_attributes - ADD CONSTRAINT spring_session_attributes_pk PRIMARY KEY (session_primary_id, attribute_name); - - --- --- Name: spring_session spring_session_id_idx; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.spring_session - ADD CONSTRAINT spring_session_id_idx UNIQUE (session_id); - - --- --- Name: spring_session spring_session_pk; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.spring_session - ADD CONSTRAINT spring_session_pk PRIMARY KEY (primary_id); - - --- --- Name: enrollment uk_enrollment_exam_event_person; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.enrollment - ADD CONSTRAINT uk_enrollment_exam_event_person UNIQUE (exam_event_id, person_id); - - --- --- Name: exam_event uk_exam_event_language_level_date; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.exam_event - ADD CONSTRAINT uk_exam_event_language_level_date UNIQUE (language, level, date); - - --- --- Name: reservation uk_reservation_exam_event_person; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.reservation - ADD CONSTRAINT uk_reservation_exam_event_person UNIQUE (exam_event_id, person_id); - - --- --- Name: spring_session_expires_idx; Type: INDEX; Schema: public; Owner: postgres --- - -CREATE INDEX spring_session_expires_idx ON public.spring_session USING btree (expiry_time); - - --- --- Name: spring_session_principal_idx; Type: INDEX; Schema: public; Owner: postgres --- - -CREATE INDEX spring_session_principal_idx ON public.spring_session USING btree (principal_name); - - --- --- Name: email_attachment fk_email_attachment_email; Type: FK CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.email_attachment - ADD CONSTRAINT fk_email_attachment_email FOREIGN KEY (email_id) REFERENCES public.email(email_id); - - --- --- Name: email fk_email_email_type; Type: FK CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.email - ADD CONSTRAINT fk_email_email_type FOREIGN KEY (email_type) REFERENCES public.email_type(name); - - --- --- Name: enrollment fk_enrollment_exam_event; Type: FK CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.enrollment - ADD CONSTRAINT fk_enrollment_exam_event FOREIGN KEY (exam_event_id) REFERENCES public.exam_event(exam_event_id); - - --- --- Name: enrollment fk_enrollment_person; Type: FK CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.enrollment - ADD CONSTRAINT fk_enrollment_person FOREIGN KEY (person_id) REFERENCES public.person(person_id); - - --- --- Name: enrollment fk_enrollment_status; Type: FK CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.enrollment - ADD CONSTRAINT fk_enrollment_status FOREIGN KEY (status) REFERENCES public.enrollment_status(name); - - --- --- Name: exam_event fk_exam_event_language; Type: FK CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.exam_event - ADD CONSTRAINT fk_exam_event_language FOREIGN KEY (language) REFERENCES public.exam_language(name); - - --- --- Name: exam_event fk_exam_event_level; Type: FK CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.exam_event - ADD CONSTRAINT fk_exam_event_level FOREIGN KEY (level) REFERENCES public.exam_level(name); - - --- --- Name: payment fk_payment_enrollment; Type: FK CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.payment - ADD CONSTRAINT fk_payment_enrollment FOREIGN KEY (enrollment_id) REFERENCES public.enrollment(enrollment_id); - - --- --- Name: reservation fk_reservation_exam_event; Type: FK CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.reservation - ADD CONSTRAINT fk_reservation_exam_event FOREIGN KEY (exam_event_id) REFERENCES public.exam_event(exam_event_id); - - --- --- Name: reservation fk_reservation_person; Type: FK CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.reservation - ADD CONSTRAINT fk_reservation_person FOREIGN KEY (person_id) REFERENCES public.person(person_id); - - --- --- Name: spring_session_attributes spring_session_attributes_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.spring_session_attributes - ADD CONSTRAINT spring_session_attributes_fk FOREIGN KEY (session_primary_id) REFERENCES public.spring_session(primary_id) ON DELETE CASCADE; - - --- --- PostgreSQL database dump complete --- - +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 16.3 +-- Dumped by pg_dump version 16.3 + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +SET default_tablespace = ''; + +SET default_table_access_method = heap; + +-- +-- Name: cas_ticket; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.cas_ticket ( + session_id character varying(255) NOT NULL, + ticket character varying(255) NOT NULL, + created_at timestamp with time zone NOT NULL +); + + +ALTER TABLE public.cas_ticket OWNER TO postgres; + +-- +-- Name: email; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.email ( + email_id bigint NOT NULL, + version integer DEFAULT 0 NOT NULL, + created_by text, + modified_by text, + deleted_by text, + created_at timestamp with time zone DEFAULT now() NOT NULL, + modified_at timestamp with time zone DEFAULT now() NOT NULL, + deleted_at timestamp with time zone, + email_type character varying(255) NOT NULL, + recipient_name text NOT NULL, + recipient_address text NOT NULL, + subject text NOT NULL, + body text NOT NULL, + sent_at timestamp with time zone, + ext_id text, + error text +); + + +ALTER TABLE public.email OWNER TO postgres; + +-- +-- Name: email_attachment; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.email_attachment ( + email_attachment_id bigint NOT NULL, + version integer DEFAULT 0 NOT NULL, + created_by text, + modified_by text, + deleted_by text, + created_at timestamp with time zone DEFAULT now() NOT NULL, + modified_at timestamp with time zone DEFAULT now() NOT NULL, + deleted_at timestamp with time zone, + email_id bigint NOT NULL, + name character varying(255) NOT NULL, + content_type character varying(255) NOT NULL, + data bytea NOT NULL +); + + +ALTER TABLE public.email_attachment OWNER TO postgres; + +-- +-- Name: email_attachment_email_attachment_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +ALTER TABLE public.email_attachment ALTER COLUMN email_attachment_id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME public.email_attachment_email_attachment_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); + + +-- +-- Name: email_email_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +ALTER TABLE public.email ALTER COLUMN email_id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME public.email_email_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); + + +-- +-- Name: email_type; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.email_type ( + name character varying(255) NOT NULL +); + + +ALTER TABLE public.email_type OWNER TO postgres; + +-- +-- Name: enrollment; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.enrollment ( + enrollment_id bigint NOT NULL, + version integer DEFAULT 0 NOT NULL, + created_by text, + modified_by text, + deleted_by text, + created_at timestamp with time zone DEFAULT now() NOT NULL, + modified_at timestamp with time zone DEFAULT now() NOT NULL, + deleted_at timestamp with time zone, + exam_event_id bigint NOT NULL, + person_id bigint NOT NULL, + skill_oral boolean NOT NULL, + skill_textual boolean NOT NULL, + skill_understanding boolean NOT NULL, + partial_exam_speaking boolean NOT NULL, + partial_exam_speech_comprehension boolean NOT NULL, + partial_exam_writing boolean NOT NULL, + partial_exam_reading_comprehension boolean NOT NULL, + status character varying(255) NOT NULL, + previous_enrollment text, + digital_certificate_consent boolean NOT NULL, + email text NOT NULL, + phone_number text NOT NULL, + street text, + postal_code text, + town text, + country text, + payment_link_hash character varying(255), + payment_link_expires_at timestamp with time zone, + free_enrollment bigint, + is_queued boolean +); + + +ALTER TABLE public.enrollment OWNER TO postgres; + +-- +-- Name: enrollment_appointment; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.enrollment_appointment ( + enrollment_appointment_id bigint NOT NULL, + version integer DEFAULT 0 NOT NULL, + created_by text, + modified_by text, + deleted_by text, + created_at timestamp with time zone DEFAULT now() NOT NULL, + modified_at timestamp with time zone DEFAULT now() NOT NULL, + deleted_at timestamp with time zone, + skill_oral boolean NOT NULL, + skill_textual boolean NOT NULL, + skill_understanding boolean NOT NULL, + partial_exam_speaking boolean NOT NULL, + partial_exam_speech_comprehension boolean NOT NULL, + partial_exam_writing boolean NOT NULL, + partial_exam_reading_comprehension boolean NOT NULL, + status character varying(255) NOT NULL, + previous_enrollment_date date, + digital_certificate_consent boolean NOT NULL, + auth_hash text, + email text, + phone_number text, + street text, + postal_code text, + town text, + country text, + person_id bigint, + first_name text, + last_name text +); + + +ALTER TABLE public.enrollment_appointment OWNER TO postgres; + +-- +-- Name: enrollment_appointment_enrollment_appointment_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +ALTER TABLE public.enrollment_appointment ALTER COLUMN enrollment_appointment_id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME public.enrollment_appointment_enrollment_appointment_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); + + +-- +-- Name: enrollment_enrollment_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +ALTER TABLE public.enrollment ALTER COLUMN enrollment_id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME public.enrollment_enrollment_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); + + +-- +-- Name: enrollment_status; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.enrollment_status ( + name character varying(255) NOT NULL +); + + +ALTER TABLE public.enrollment_status OWNER TO postgres; + +-- +-- Name: exam_event; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.exam_event ( + exam_event_id bigint NOT NULL, + version integer DEFAULT 0 NOT NULL, + created_by text, + modified_by text, + deleted_by text, + created_at timestamp with time zone DEFAULT now() NOT NULL, + modified_at timestamp with time zone DEFAULT now() NOT NULL, + deleted_at timestamp with time zone, + language character varying(10) NOT NULL, + level character varying(255) NOT NULL, + date date NOT NULL, + registration_closes timestamp with time zone NOT NULL, + is_hidden boolean NOT NULL, + max_participants integer NOT NULL, + registration_opens timestamp with time zone NOT NULL, + examiner_id bigint, + CONSTRAINT ck_exam_event_max_participants CHECK ((max_participants >= 0)) +); + + +ALTER TABLE public.exam_event OWNER TO postgres; + +-- +-- Name: exam_event_exam_event_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +ALTER TABLE public.exam_event ALTER COLUMN exam_event_id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME public.exam_event_exam_event_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); + + +-- +-- Name: exam_language; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.exam_language ( + name character varying(10) NOT NULL +); + + +ALTER TABLE public.exam_language OWNER TO postgres; + +-- +-- Name: exam_level; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.exam_level ( + name character varying(255) NOT NULL +); + + +ALTER TABLE public.exam_level OWNER TO postgres; + +-- +-- Name: examiner; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.examiner ( + examiner_id bigint NOT NULL, + version integer DEFAULT 0 NOT NULL, + created_by text, + modified_by text, + deleted_by text, + created_at timestamp with time zone DEFAULT now() NOT NULL, + modified_at timestamp with time zone DEFAULT now() NOT NULL, + deleted_at timestamp with time zone, + oid character varying(255) NOT NULL, + email character varying(255) NOT NULL, + phone_number character varying(255) NOT NULL, + last_name text NOT NULL, + first_name text NOT NULL, + nickname text NOT NULL, + exam_language_finnish boolean NOT NULL, + exam_language_swedish boolean NOT NULL, + is_public boolean NOT NULL +); + + +ALTER TABLE public.examiner OWNER TO postgres; + +-- +-- Name: examiner_examiner_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +ALTER TABLE public.examiner ALTER COLUMN examiner_id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME public.examiner_examiner_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); + + +-- +-- Name: examiner_municipality; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.examiner_municipality ( + examiner_municipality_id bigint NOT NULL, + municipality_id bigint NOT NULL, + examiner_id bigint NOT NULL +); + + +ALTER TABLE public.examiner_municipality OWNER TO postgres; + +-- +-- Name: examiner_municipality_examiner_municipality_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +ALTER TABLE public.examiner_municipality ALTER COLUMN examiner_municipality_id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME public.examiner_municipality_examiner_municipality_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); + + +-- +-- Name: free_enrollment; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.free_enrollment ( + free_enrollment_id bigint NOT NULL, + version integer DEFAULT 0 NOT NULL, + created_by text, + modified_by text, + deleted_by text, + created_at timestamp with time zone DEFAULT now() NOT NULL, + modified_at timestamp with time zone DEFAULT now() NOT NULL, + deleted_at timestamp with time zone, + person_id bigint NOT NULL, + source character varying(255) NOT NULL, + type character varying(255) NOT NULL, + approved boolean, + comment text +); + + +ALTER TABLE public.free_enrollment OWNER TO postgres; + +-- +-- Name: free_enrollment_free_enrollment_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +ALTER TABLE public.free_enrollment ALTER COLUMN free_enrollment_id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME public.free_enrollment_free_enrollment_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); + + +-- +-- Name: koski_educations; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.koski_educations ( + koski_educations_id bigint NOT NULL, + created_at timestamp with time zone DEFAULT now() NOT NULL, + free_enrollment_id bigint, + exam_event_id bigint NOT NULL, + matriculation_exam boolean NOT NULL, + higher_education_concluded boolean NOT NULL, + higher_education_enrolled boolean NOT NULL, + eb boolean NOT NULL, + dia boolean NOT NULL, + other boolean NOT NULL +); + + +ALTER TABLE public.koski_educations OWNER TO postgres; + +-- +-- Name: koski_educations_koski_educations_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +ALTER TABLE public.koski_educations ALTER COLUMN koski_educations_id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME public.koski_educations_koski_educations_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); + + +-- +-- Name: municipality; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.municipality ( + municipality_id bigint NOT NULL, + version integer DEFAULT 0 NOT NULL, + created_by text, + modified_by text, + deleted_by text, + created_at timestamp with time zone DEFAULT now() NOT NULL, + modified_at timestamp with time zone DEFAULT now() NOT NULL, + deleted_at timestamp with time zone, + code character varying(255) NOT NULL, + name_fi character varying(255) NOT NULL, + name_sv character varying(255) NOT NULL +); + + +ALTER TABLE public.municipality OWNER TO postgres; + +-- +-- Name: municipality_municipality_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +ALTER TABLE public.municipality ALTER COLUMN municipality_id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME public.municipality_municipality_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); + + +-- +-- Name: payment; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.payment ( + payment_id bigint NOT NULL, + version integer DEFAULT 0 NOT NULL, + created_by text, + modified_by text, + deleted_by text, + created_at timestamp with time zone DEFAULT now() NOT NULL, + modified_at timestamp with time zone DEFAULT now() NOT NULL, + deleted_at timestamp with time zone, + enrollment_id bigint NOT NULL, + amount integer NOT NULL, + transaction_id text, + reference text, + payment_url text, + payment_status text, + refunded_at timestamp with time zone, + enrollment_appointment_id bigint +); + + +ALTER TABLE public.payment OWNER TO postgres; + +-- +-- Name: payment_payment_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +ALTER TABLE public.payment ALTER COLUMN payment_id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME public.payment_payment_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); + + +-- +-- Name: person; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.person ( + person_id bigint NOT NULL, + version integer DEFAULT 0 NOT NULL, + created_by text, + modified_by text, + deleted_by text, + created_at timestamp with time zone DEFAULT now() NOT NULL, + modified_at timestamp with time zone DEFAULT now() NOT NULL, + deleted_at timestamp with time zone, + last_name text NOT NULL, + first_name text NOT NULL, + oid character varying(255), + other_identifier character varying(1024), + latest_identified_at timestamp with time zone NOT NULL, + uuid uuid NOT NULL +); + + +ALTER TABLE public.person OWNER TO postgres; + +-- +-- Name: person_person_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +ALTER TABLE public.person ALTER COLUMN person_id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME public.person_person_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); + + +-- +-- Name: reservation; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.reservation ( + reservation_id bigint NOT NULL, + version integer DEFAULT 0 NOT NULL, + created_by text, + modified_by text, + deleted_by text, + created_at timestamp with time zone DEFAULT now() NOT NULL, + modified_at timestamp with time zone DEFAULT now() NOT NULL, + deleted_at timestamp with time zone, + exam_event_id bigint NOT NULL, + person_id bigint NOT NULL, + expires_at timestamp with time zone NOT NULL, + renewed_at timestamp with time zone +); + + +ALTER TABLE public.reservation OWNER TO postgres; + +-- +-- Name: reservation_reservation_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +ALTER TABLE public.reservation ALTER COLUMN reservation_id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME public.reservation_reservation_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); + + +-- +-- Name: shedlock; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.shedlock ( + name character varying(64) NOT NULL, + lock_until timestamp without time zone NOT NULL, + locked_at timestamp without time zone NOT NULL, + locked_by character varying(255) NOT NULL +); + + +ALTER TABLE public.shedlock OWNER TO postgres; + +-- +-- Name: spring_session; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.spring_session ( + primary_id character(36) NOT NULL, + session_id character(36) NOT NULL, + creation_time bigint NOT NULL, + last_access_time bigint NOT NULL, + max_inactive_interval integer NOT NULL, + expiry_time bigint NOT NULL, + principal_name character varying(100) +); + + +ALTER TABLE public.spring_session OWNER TO postgres; + +-- +-- Name: spring_session_attributes; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.spring_session_attributes ( + session_primary_id character(36) NOT NULL, + attribute_name character varying(200) NOT NULL, + attribute_bytes bytea NOT NULL +); + + +ALTER TABLE public.spring_session_attributes OWNER TO postgres; + +-- +-- Name: uploaded_file_attachment; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.uploaded_file_attachment ( + attachment_id bigint NOT NULL, + version integer DEFAULT 0 NOT NULL, + created_by text, + modified_by text, + deleted_by text, + created_at timestamp with time zone DEFAULT now() NOT NULL, + modified_at timestamp with time zone DEFAULT now() NOT NULL, + deleted_at timestamp with time zone, + free_enrollment_id bigint NOT NULL, + key character varying(255) NOT NULL, + filename text NOT NULL, + size integer NOT NULL +); + + +ALTER TABLE public.uploaded_file_attachment OWNER TO postgres; + +-- +-- Name: uploaded_file_attachment_attachment_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres +-- + +ALTER TABLE public.uploaded_file_attachment ALTER COLUMN attachment_id ADD GENERATED BY DEFAULT AS IDENTITY ( + SEQUENCE NAME public.uploaded_file_attachment_attachment_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1 +); + + +-- +-- Name: cas_ticket cas_ticket_session_id_uniq_idx; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.cas_ticket + ADD CONSTRAINT cas_ticket_session_id_uniq_idx UNIQUE (session_id); + + +-- +-- Name: cas_ticket cas_ticket_ticket_uniq_idx; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.cas_ticket + ADD CONSTRAINT cas_ticket_ticket_uniq_idx UNIQUE (ticket); + + +-- +-- Name: email_attachment email_attachment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.email_attachment + ADD CONSTRAINT email_attachment_pkey PRIMARY KEY (email_attachment_id); + + +-- +-- Name: email email_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.email + ADD CONSTRAINT email_pkey PRIMARY KEY (email_id); + + +-- +-- Name: email_type email_type_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.email_type + ADD CONSTRAINT email_type_pkey PRIMARY KEY (name); + + +-- +-- Name: enrollment_appointment enrollment_appointment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.enrollment_appointment + ADD CONSTRAINT enrollment_appointment_pkey PRIMARY KEY (enrollment_appointment_id); + + +-- +-- Name: enrollment enrollment_payment_link_hash_uniq_idx; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.enrollment + ADD CONSTRAINT enrollment_payment_link_hash_uniq_idx UNIQUE (payment_link_hash); + + +-- +-- Name: enrollment enrollment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.enrollment + ADD CONSTRAINT enrollment_pkey PRIMARY KEY (enrollment_id); + + +-- +-- Name: enrollment_status enrollment_status_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.enrollment_status + ADD CONSTRAINT enrollment_status_pkey PRIMARY KEY (name); + + +-- +-- Name: exam_event exam_event_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.exam_event + ADD CONSTRAINT exam_event_pkey PRIMARY KEY (exam_event_id); + + +-- +-- Name: exam_language exam_language_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.exam_language + ADD CONSTRAINT exam_language_pkey PRIMARY KEY (name); + + +-- +-- Name: exam_level exam_level_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.exam_level + ADD CONSTRAINT exam_level_pkey PRIMARY KEY (name); + + +-- +-- Name: examiner_municipality examiner_municipality_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.examiner_municipality + ADD CONSTRAINT examiner_municipality_pkey PRIMARY KEY (examiner_municipality_id); + + +-- +-- Name: examiner examiner_oid_uniq_idx; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.examiner + ADD CONSTRAINT examiner_oid_uniq_idx UNIQUE (oid); + + +-- +-- Name: examiner examiner_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.examiner + ADD CONSTRAINT examiner_pkey PRIMARY KEY (examiner_id); + + +-- +-- Name: free_enrollment free_enrollment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.free_enrollment + ADD CONSTRAINT free_enrollment_pkey PRIMARY KEY (free_enrollment_id); + + +-- +-- Name: koski_educations koski_educations_free_enrollment_id_key; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.koski_educations + ADD CONSTRAINT koski_educations_free_enrollment_id_key UNIQUE (free_enrollment_id); + + +-- +-- Name: koski_educations koski_educations_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.koski_educations + ADD CONSTRAINT koski_educations_pkey PRIMARY KEY (koski_educations_id); + + +-- +-- Name: municipality municipality_code_uniq_idx; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.municipality + ADD CONSTRAINT municipality_code_uniq_idx UNIQUE (code); + + +-- +-- Name: municipality municipality_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.municipality + ADD CONSTRAINT municipality_pkey PRIMARY KEY (municipality_id); + + +-- +-- Name: payment payment_id_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.payment + ADD CONSTRAINT payment_id_pkey PRIMARY KEY (payment_id); + + +-- +-- Name: person person_oid_uniq_idx; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.person + ADD CONSTRAINT person_oid_uniq_idx UNIQUE (oid); + + +-- +-- Name: person person_other_id_uniq_idx; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.person + ADD CONSTRAINT person_other_id_uniq_idx UNIQUE (other_identifier); + + +-- +-- Name: person person_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.person + ADD CONSTRAINT person_pkey PRIMARY KEY (person_id); + + +-- +-- Name: person person_uuid_key; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.person + ADD CONSTRAINT person_uuid_key UNIQUE (uuid); + + +-- +-- Name: reservation reservation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.reservation + ADD CONSTRAINT reservation_pkey PRIMARY KEY (reservation_id); + + +-- +-- Name: shedlock shedlock_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.shedlock + ADD CONSTRAINT shedlock_pkey PRIMARY KEY (name); + + +-- +-- Name: spring_session_attributes spring_session_attributes_pk; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.spring_session_attributes + ADD CONSTRAINT spring_session_attributes_pk PRIMARY KEY (session_primary_id, attribute_name); + + +-- +-- Name: spring_session spring_session_id_idx; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.spring_session + ADD CONSTRAINT spring_session_id_idx UNIQUE (session_id); + + +-- +-- Name: spring_session spring_session_pk; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.spring_session + ADD CONSTRAINT spring_session_pk PRIMARY KEY (primary_id); + + +-- +-- Name: enrollment uk_enrollment_exam_event_person; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.enrollment + ADD CONSTRAINT uk_enrollment_exam_event_person UNIQUE (exam_event_id, person_id); + + +-- +-- Name: exam_event uk_exam_event_language_level_date_examiner; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.exam_event + ADD CONSTRAINT uk_exam_event_language_level_date_examiner UNIQUE NULLS NOT DISTINCT (language, level, date, examiner_id); + + +-- +-- Name: examiner_municipality uk_examiner_municipality_examiner_id_municipality_id; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.examiner_municipality + ADD CONSTRAINT uk_examiner_municipality_examiner_id_municipality_id UNIQUE (examiner_id, municipality_id); + + +-- +-- Name: reservation uk_reservation_exam_event_person; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.reservation + ADD CONSTRAINT uk_reservation_exam_event_person UNIQUE (exam_event_id, person_id); + + +-- +-- Name: uploaded_file_attachment uploaded_file_attachment_key_uniq_idx; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.uploaded_file_attachment + ADD CONSTRAINT uploaded_file_attachment_key_uniq_idx UNIQUE (key); + + +-- +-- Name: uploaded_file_attachment uploaded_file_attachment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.uploaded_file_attachment + ADD CONSTRAINT uploaded_file_attachment_pkey PRIMARY KEY (attachment_id); + + +-- +-- Name: spring_session_expires_idx; Type: INDEX; Schema: public; Owner: postgres +-- + +CREATE INDEX spring_session_expires_idx ON public.spring_session USING btree (expiry_time); + + +-- +-- Name: spring_session_principal_idx; Type: INDEX; Schema: public; Owner: postgres +-- + +CREATE INDEX spring_session_principal_idx ON public.spring_session USING btree (principal_name); + + +-- +-- Name: email_attachment fk_email_attachment_email; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.email_attachment + ADD CONSTRAINT fk_email_attachment_email FOREIGN KEY (email_id) REFERENCES public.email(email_id); + + +-- +-- Name: email fk_email_email_type; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.email + ADD CONSTRAINT fk_email_email_type FOREIGN KEY (email_type) REFERENCES public.email_type(name); + + +-- +-- Name: enrollment fk_enrollment_exam_event; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.enrollment + ADD CONSTRAINT fk_enrollment_exam_event FOREIGN KEY (exam_event_id) REFERENCES public.exam_event(exam_event_id); + + +-- +-- Name: enrollment fk_enrollment_free_enrollment; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.enrollment + ADD CONSTRAINT fk_enrollment_free_enrollment FOREIGN KEY (free_enrollment) REFERENCES public.free_enrollment(free_enrollment_id); + + +-- +-- Name: enrollment fk_enrollment_person; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.enrollment + ADD CONSTRAINT fk_enrollment_person FOREIGN KEY (person_id) REFERENCES public.person(person_id); + + +-- +-- Name: enrollment fk_enrollment_status; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.enrollment + ADD CONSTRAINT fk_enrollment_status FOREIGN KEY (status) REFERENCES public.enrollment_status(name); + + +-- +-- Name: exam_event fk_exam_event_examiner_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.exam_event + ADD CONSTRAINT fk_exam_event_examiner_id FOREIGN KEY (examiner_id) REFERENCES public.examiner(examiner_id); + + +-- +-- Name: exam_event fk_exam_event_language; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.exam_event + ADD CONSTRAINT fk_exam_event_language FOREIGN KEY (language) REFERENCES public.exam_language(name); + + +-- +-- Name: exam_event fk_exam_event_level; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.exam_event + ADD CONSTRAINT fk_exam_event_level FOREIGN KEY (level) REFERENCES public.exam_level(name); + + +-- +-- Name: examiner_municipality fk_examiner_municipality_examiner; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.examiner_municipality + ADD CONSTRAINT fk_examiner_municipality_examiner FOREIGN KEY (examiner_id) REFERENCES public.examiner(examiner_id); + + +-- +-- Name: examiner_municipality fk_examiner_municipality_municipality; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.examiner_municipality + ADD CONSTRAINT fk_examiner_municipality_municipality FOREIGN KEY (municipality_id) REFERENCES public.municipality(municipality_id); + + +-- +-- Name: free_enrollment fk_free_enrollment_person; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.free_enrollment + ADD CONSTRAINT fk_free_enrollment_person FOREIGN KEY (person_id) REFERENCES public.person(person_id); + + +-- +-- Name: koski_educations fk_koski_educations_exam_event; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.koski_educations + ADD CONSTRAINT fk_koski_educations_exam_event FOREIGN KEY (exam_event_id) REFERENCES public.exam_event(exam_event_id); + + +-- +-- Name: koski_educations fk_koski_educations_free_enrollment; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.koski_educations + ADD CONSTRAINT fk_koski_educations_free_enrollment FOREIGN KEY (free_enrollment_id) REFERENCES public.free_enrollment(free_enrollment_id); + + +-- +-- Name: payment fk_payment_enrollment; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.payment + ADD CONSTRAINT fk_payment_enrollment FOREIGN KEY (enrollment_id) REFERENCES public.enrollment(enrollment_id); + + +-- +-- Name: reservation fk_reservation_exam_event; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.reservation + ADD CONSTRAINT fk_reservation_exam_event FOREIGN KEY (exam_event_id) REFERENCES public.exam_event(exam_event_id); + + +-- +-- Name: reservation fk_reservation_person; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.reservation + ADD CONSTRAINT fk_reservation_person FOREIGN KEY (person_id) REFERENCES public.person(person_id); + + +-- +-- Name: uploaded_file_attachment fk_uploaded_file_attachment_free_enrollment; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.uploaded_file_attachment + ADD CONSTRAINT fk_uploaded_file_attachment_free_enrollment FOREIGN KEY (free_enrollment_id) REFERENCES public.free_enrollment(free_enrollment_id); + + +-- +-- Name: spring_session_attributes spring_session_attributes_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.spring_session_attributes + ADD CONSTRAINT spring_session_attributes_fk FOREIGN KEY (session_primary_id) REFERENCES public.spring_session(primary_id) ON DELETE CASCADE; + + +-- +-- PostgreSQL database dump complete +-- + diff --git a/backend/vkt/db/2_tables_data.sql b/backend/vkt/db/2_tables_data.sql index b96e48ef1..b4fd67091 100644 --- a/backend/vkt/db/2_tables_data.sql +++ b/backend/vkt/db/2_tables_data.sql @@ -1,65 +1,67 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 12.9 (Debian 12.9-1.pgdg110+1) --- Dumped by pg_dump version 14.7 (Homebrew) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - --- --- Data for Name: email_type; Type: TABLE DATA; Schema: public; Owner: postgres --- - -COPY public.email_type (name) FROM stdin; -ENROLLMENT_CONFIRMATION -ENROLLMENT_TO_QUEUE_CONFIRMATION -\. - - --- --- Data for Name: enrollment_status; Type: TABLE DATA; Schema: public; Owner: postgres --- - -COPY public.enrollment_status (name) FROM stdin; -PAID -QUEUED -CANCELED -EXPECTING_PAYMENT_UNFINISHED_ENROLLMENT -CANCELED_UNFINISHED_ENROLLMENT -SHIFTED_FROM_QUEUE -\. - - --- --- Data for Name: exam_language; Type: TABLE DATA; Schema: public; Owner: postgres --- - -COPY public.exam_language (name) FROM stdin; -FI -SV -\. - - --- --- Data for Name: exam_level; Type: TABLE DATA; Schema: public; Owner: postgres --- - -COPY public.exam_level (name) FROM stdin; -EXCELLENT -\. - - --- --- PostgreSQL database dump complete --- - +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 16.3 +-- Dumped by pg_dump version 16.3 + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +-- +-- Data for Name: email_type; Type: TABLE DATA; Schema: public; Owner: postgres +-- + +COPY public.email_type (name) FROM stdin; +ENROLLMENT_CONFIRMATION +ENROLLMENT_TO_QUEUE_CONFIRMATION +\. + + +-- +-- Data for Name: enrollment_status; Type: TABLE DATA; Schema: public; Owner: postgres +-- + +COPY public.enrollment_status (name) FROM stdin; +QUEUED +CANCELED +EXPECTING_PAYMENT_UNFINISHED_ENROLLMENT +CANCELED_UNFINISHED_ENROLLMENT +COMPLETED +AWAITING_PAYMENT +AWAITING_APPROVAL +\. + + +-- +-- Data for Name: exam_language; Type: TABLE DATA; Schema: public; Owner: postgres +-- + +COPY public.exam_language (name) FROM stdin; +FI +SV +\. + + +-- +-- Data for Name: exam_level; Type: TABLE DATA; Schema: public; Owner: postgres +-- + +COPY public.exam_level (name) FROM stdin; +EXCELLENT +GOOD_AND_SATISFACTORY +\. + + +-- +-- PostgreSQL database dump complete +-- + diff --git a/backend/vkt/db/3_liquibase.sql b/backend/vkt/db/3_liquibase.sql index d7ee01675..8c2dd72a1 100644 --- a/backend/vkt/db/3_liquibase.sql +++ b/backend/vkt/db/3_liquibase.sql @@ -1,114 +1,127 @@ --- --- PostgreSQL database dump --- - --- Dumped from database version 12.9 (Debian 12.9-1.pgdg110+1) --- Dumped by pg_dump version 14.7 (Homebrew) - -SET statement_timeout = 0; -SET lock_timeout = 0; -SET idle_in_transaction_session_timeout = 0; -SET client_encoding = 'UTF8'; -SET standard_conforming_strings = on; -SELECT pg_catalog.set_config('search_path', '', false); -SET check_function_bodies = false; -SET xmloption = content; -SET client_min_messages = warning; -SET row_security = off; - -SET default_tablespace = ''; - -SET default_table_access_method = heap; - --- --- Name: databasechangelog; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.databasechangelog ( - id character varying(255) NOT NULL, - author character varying(255) NOT NULL, - filename character varying(255) NOT NULL, - dateexecuted timestamp without time zone NOT NULL, - orderexecuted integer NOT NULL, - exectype character varying(10) NOT NULL, - md5sum character varying(35), - description character varying(255), - comments character varying(255), - tag character varying(255), - liquibase character varying(20), - contexts character varying(255), - labels character varying(255), - deployment_id character varying(10) -); - - -ALTER TABLE public.databasechangelog OWNER TO postgres; - --- --- Name: databasechangeloglock; Type: TABLE; Schema: public; Owner: postgres --- - -CREATE TABLE public.databasechangeloglock ( - id integer NOT NULL, - locked boolean NOT NULL, - lockgranted timestamp without time zone, - lockedby character varying(255) -); - - -ALTER TABLE public.databasechangeloglock OWNER TO postgres; - --- --- Data for Name: databasechangelog; Type: TABLE DATA; Schema: public; Owner: postgres --- - -COPY public.databasechangelog (id, author, filename, dateexecuted, orderexecuted, exectype, md5sum, description, comments, tag, liquibase, contexts, labels, deployment_id) FROM stdin; -2022-09-14-create-table-exam_language mikhuttu migrations.xml 2022-09-28 13:03:11.518594 1 EXECUTED 8:17db073b8f9d1a3557a6147981fd256e createTable tableName=exam_language; insert tableName=exam_language; insert tableName=exam_language \N 4.9.1 \N \N 4370191374 -2022-09-14-create-table-exam_level mikhuttu migrations.xml 2022-09-28 13:03:11.529341 2 EXECUTED 8:e8ac8e8266550d06f311340105eb558e createTable tableName=exam_level; insert tableName=exam_level \N 4.9.1 \N \N 4370191374 -2022-09-14-create-table-exam_event mikhuttu migrations.xml 2022-09-28 13:03:11.567242 3 EXECUTED 8:78e5d79871764de23d08742187c4be83 createTable tableName=exam_event; addForeignKeyConstraint baseTableName=exam_event, constraintName=fk_exam_event_language, referencedTableName=exam_language; addForeignKeyConstraint baseTableName=exam_event, constraintName=fk_exam_event_level, ref... \N 4.9.1 \N \N 4370191374 -2022-09-19-create-table-person mikhuttu migrations.xml 2022-09-28 13:03:11.580327 4 EXECUTED 8:1218e1e61ba39ea9793c670923ee5a80 createTable tableName=person; addUniqueConstraint constraintName=uk_person_onr_id, tableName=person \N 4.9.1 \N \N 4370191374 -2022-09-19-create-table-enrollment_status mikhuttu migrations.xml 2022-09-28 13:03:11.593403 5 EXECUTED 8:cb6dc3009864c99347b4097cd3d777a1 createTable tableName=enrollment_status; insert tableName=enrollment_status; insert tableName=enrollment_status; insert tableName=enrollment_status; insert tableName=enrollment_status \N 4.9.1 \N \N 4370191374 -2022-09-19-create-table-enrollment mikhuttu migrations.xml 2022-09-28 13:03:11.613202 6 EXECUTED 8:edba4d8326701eb21ede9eb4afb6c628 createTable tableName=enrollment; addForeignKeyConstraint baseTableName=enrollment, constraintName=fk_enrollment_exam_event, referencedTableName=exam_event; addForeignKeyConstraint baseTableName=enrollment, constraintName=fk_enrollment_person, ref... \N 4.9.1 \N \N 4370191374 -2022-10-12-change-person-columns mikhuttu migrations.xml 2022-10-12 18:42:43.132484 7 EXECUTED 8:d27f77bcff4989716b0be1fb83639ccf dropColumn tableName=person; addColumn tableName=person; addUniqueConstraint constraintName=uk_person_identity_number, tableName=person \N 4.9.1 \N \N 5600162993 -2022-10-28-create-table-reservation terova migrations.xml 2022-11-16 16:17:55.348633 8 EXECUTED 8:c4a64bee6d57de586b962e6b334cacbf createTable tableName=reservation; addForeignKeyConstraint baseTableName=reservation, constraintName=fk_reservation_exam_event, referencedTableName=exam_event; addForeignKeyConstraint baseTableName=reservation, constraintName=fk_reservation_person... \N 4.9.1 \N \N 8615475122 -2022-11-17-move_columns_from_person_to_enrollment terova migrations.xml 2022-11-17 12:16:38.355334 9 EXECUTED 8:5a6e66e03fe569e12cab0910180472d2 addColumn tableName=enrollment; dropColumn tableName=person \N 4.9.1 \N \N 8680198271 -2022-11-17-rename_exam_event_visible_to_hidden terova migrations.xml 2022-11-17 14:08:19.109749 10 EXECUTED 8:a8eaf66284e6fa36e931c01302dfcd90 renameColumn newColumnName=is_hidden, oldColumnName=is_visible, tableName=exam_event; sql \N 4.9.1 \N \N 8686899038 -2022-12-06-create-shedlock-table terova migrations.xml 2022-12-06 14:21:45.036739 11 EXECUTED 8:8d3e6aaeff0d8838d329ebbaa95bc096 createTable tableName=shedlock \N 4.9.1 \N \N 0336504848 -2022-12-06-add-enum-email_type terova migrations.xml 2022-12-06 14:21:45.065383 12 EXECUTED 8:9d2dd6c5fb47e67ba50c6cf0db4edd47 createTable tableName=email_type; insert tableName=email_type \N 4.9.1 \N \N 0336504848 -2022-12-06-create-email-table terova migrations.xml 2022-12-06 14:21:45.096787 13 EXECUTED 8:fc290ff4700b729ac568057c7dd6c211 createTable tableName=email; addForeignKeyConstraint baseTableName=email, constraintName=fk_email_email_type, referencedTableName=email_type \N 4.9.1 \N \N 0336504848 -2022-12-06-create-email_attachment-table terova migrations.xml 2022-12-06 18:42:00.87481 14 EXECUTED 8:27ead2667c986a4fb6325d9d93238151 createTable tableName=email_attachment; addForeignKeyConstraint baseTableName=email_attachment, constraintName=fk_email_attachment_email, referencedTableName=email \N 4.9.1 \N \N 0352120682 -2023-01-18-modify_enrollment-table_previous-enrollment-date mikhuttu migrations.xml 2023-05-29 09:17:57.498963 15 EXECUTED 8:b5bb9828cdc9f6349c1e92af6da50bcd modifyDataType columnName=previous_enrollment_date, tableName=enrollment; renameColumn newColumnName=previous_enrollment, oldColumnName=previous_enrollment_date, tableName=enrollment \N 4.9.1 \N \N 5351877372 -2023-02-03-add_reservation-table_renewed_at jrkkp migrations.xml 2023-05-29 09:17:57.503008 16 EXECUTED 8:e9cd840a8006f4a136fac6e259048628 addColumn tableName=reservation \N 4.9.1 \N \N 5351877372 -2023-03-20-add_spring_session_table jrkkp migrations.xml 2023-05-29 09:17:57.520006 17 EXECUTED 8:74529b81aca9ec770312c7017e0c594d createTable tableName=spring_session; createIndex indexName=spring_session_expires_idx, tableName=spring_session; createIndex indexName=spring_session_principal_idx, tableName=spring_session; createTable tableName=spring_session_attributes; addPri... \N 4.9.1 \N \N 5351877372 -2023-04-11-add_person_oid jrkkp migrations.xml 2023-05-29 09:17:57.530923 18 EXECUTED 8:5b0623c9012a91e8f39b129672804bde addColumn tableName=person; dropNotNullConstraint columnName=identity_number, tableName=person \N 4.9.1 \N \N 5351877372 -2023-05-03-add-enrollment-to-queue-confirmation-email_type mikhuttu migrations.xml 2023-05-29 09:17:57.534001 19 EXECUTED 8:4502d8b0afd0a1b88b7649fa2db135f4 insert tableName=email_type \N 4.9.1 \N \N 5351877372 -2023-05-25-payment-table jrkkp migrations.xml 2023-05-29 09:17:57.545296 20 EXECUTED 8:1869b55cb1a464dee967a5b832c80003 createTable tableName=payment; insert tableName=enrollment_status; insert tableName=enrollment_status; addForeignKeyConstraint baseTableName=payment, constraintName=fk_payment_enrollment, referencedTableName=enrollment \N 4.9.1 \N \N 5351877372 -2023-05-30-modify_payment-table_amount mikhuttu migrations.xml 2023-05-30 13:31:02.784706 21 EXECUTED 8:a1e8d1377da2bc6360f9971c8b052cb4 modifyDataType columnName=amount, tableName=payment \N 4.9.1 \N \N 5453462712 -2023-06-01-enrollment-payment-link-hash jrkkp migrations.xml 2023-06-01 13:53:01.472105 22 EXECUTED 8:0fc928a86fa41527372d8e8af21e813b addColumn tableName=enrollment \N 4.9.1 \N \N 5627581378 -2023-06-02-rename-enrollment-status-EXPECTING_PAYMENT mikhuttu migrations.xml 2023-06-02 08:38:57.704377 23 EXECUTED 8:a35dc4c9e0d0d241f4293f0b2ba16224 insert tableName=enrollment_status; sql; sql \N 4.9.1 \N \N 5695137627 -2023-06-16-person-latest-identified-at mikhuttu migrations.xml 2023-06-16 09:46:36.462511 24 EXECUTED 8:51d5c16082a3fd83108e9c40e7ae78e6 addColumn tableName=person; sql; addNotNullConstraint columnName=latest_identified_at, tableName=person \N 4.20.0 \N \N 6908796433 -2023-06-29-remove-person-identity_number mikhuttu migrations.xml 2023-06-29 09:32:48.572192 25 EXECUTED 8:5b23bce4f54b5583b757ad6bb81c612d dropColumn columnName=identity_number, tableName=person; dropColumn columnName=date_of_birth, tableName=person \N 4.20.0 \N \N 8031168558 -\. - - --- --- Data for Name: databasechangeloglock; Type: TABLE DATA; Schema: public; Owner: postgres --- - -COPY public.databasechangeloglock (id, locked, lockgranted, lockedby) FROM stdin; -1 f \N \N -\. - - --- --- Name: databasechangeloglock databasechangeloglock_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres --- - -ALTER TABLE ONLY public.databasechangeloglock - ADD CONSTRAINT databasechangeloglock_pkey PRIMARY KEY (id); - - --- --- PostgreSQL database dump complete --- - +-- +-- PostgreSQL database dump +-- + +-- Dumped from database version 16.3 +-- Dumped by pg_dump version 16.3 + +SET statement_timeout = 0; +SET lock_timeout = 0; +SET idle_in_transaction_session_timeout = 0; +SET client_encoding = 'UTF8'; +SET standard_conforming_strings = on; +SELECT pg_catalog.set_config('search_path', '', false); +SET check_function_bodies = false; +SET xmloption = content; +SET client_min_messages = warning; +SET row_security = off; + +SET default_tablespace = ''; + +SET default_table_access_method = heap; + +-- +-- Name: databasechangelog; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.databasechangelog ( + id character varying(255) NOT NULL, + author character varying(255) NOT NULL, + filename character varying(255) NOT NULL, + dateexecuted timestamp without time zone NOT NULL, + orderexecuted integer NOT NULL, + exectype character varying(10) NOT NULL, + md5sum character varying(35), + description character varying(255), + comments character varying(255), + tag character varying(255), + liquibase character varying(20), + contexts character varying(255), + labels character varying(255), + deployment_id character varying(10) +); + + +ALTER TABLE public.databasechangelog OWNER TO postgres; + +-- +-- Name: databasechangeloglock; Type: TABLE; Schema: public; Owner: postgres +-- + +CREATE TABLE public.databasechangeloglock ( + id integer NOT NULL, + locked boolean NOT NULL, + lockgranted timestamp without time zone, + lockedby character varying(255) +); + + +ALTER TABLE public.databasechangeloglock OWNER TO postgres; + +-- +-- Data for Name: databasechangelog; Type: TABLE DATA; Schema: public; Owner: postgres +-- + +COPY public.databasechangelog (id, author, filename, dateexecuted, orderexecuted, exectype, md5sum, description, comments, tag, liquibase, contexts, labels, deployment_id) FROM stdin; +2022-09-14-create-table-exam_language mikhuttu migrations.xml 2022-09-28 13:03:11.518594 1 EXECUTED 9:01b3c2b6d1b07e777b86ea211569ce34 createTable tableName=exam_language; insert tableName=exam_language; insert tableName=exam_language \N 4.9.1 \N \N 4370191374 +2022-09-14-create-table-exam_level mikhuttu migrations.xml 2022-09-28 13:03:11.529341 2 EXECUTED 9:6b045bdd49b5a6b645f7df1821fd99a8 createTable tableName=exam_level; insert tableName=exam_level \N 4.9.1 \N \N 4370191374 +2022-09-14-create-table-exam_event mikhuttu migrations.xml 2022-09-28 13:03:11.567242 3 EXECUTED 9:469ab52e24b6778fc65a208c183333df createTable tableName=exam_event; addForeignKeyConstraint baseTableName=exam_event, constraintName=fk_exam_event_language, referencedTableName=exam_language; addForeignKeyConstraint baseTableName=exam_event, constraintName=fk_exam_event_level, ref... \N 4.9.1 \N \N 4370191374 +2022-09-19-create-table-person mikhuttu migrations.xml 2022-09-28 13:03:11.580327 4 EXECUTED 9:b6d90b721004da05d10471b1252976e4 createTable tableName=person; addUniqueConstraint constraintName=uk_person_onr_id, tableName=person \N 4.9.1 \N \N 4370191374 +2022-09-19-create-table-enrollment_status mikhuttu migrations.xml 2022-09-28 13:03:11.593403 5 EXECUTED 9:3d0c7bf5f1331255ce5b1ccda9c349b1 createTable tableName=enrollment_status; insert tableName=enrollment_status; insert tableName=enrollment_status; insert tableName=enrollment_status; insert tableName=enrollment_status \N 4.9.1 \N \N 4370191374 +2022-09-19-create-table-enrollment mikhuttu migrations.xml 2022-09-28 13:03:11.613202 6 EXECUTED 9:abacfedebf8b66d765ed003d8f1051c4 createTable tableName=enrollment; addForeignKeyConstraint baseTableName=enrollment, constraintName=fk_enrollment_exam_event, referencedTableName=exam_event; addForeignKeyConstraint baseTableName=enrollment, constraintName=fk_enrollment_person, ref... \N 4.9.1 \N \N 4370191374 +2022-10-12-change-person-columns mikhuttu migrations.xml 2022-10-12 18:42:43.132484 7 EXECUTED 9:64c7f869d68907e4e75c5640170abff0 dropColumn tableName=person; addColumn tableName=person; addUniqueConstraint constraintName=uk_person_identity_number, tableName=person \N 4.9.1 \N \N 5600162993 +2022-10-28-create-table-reservation terova migrations.xml 2022-11-16 16:17:55.348633 8 EXECUTED 9:5a7ec529509bd086e2b22c8090009985 createTable tableName=reservation; addForeignKeyConstraint baseTableName=reservation, constraintName=fk_reservation_exam_event, referencedTableName=exam_event; addForeignKeyConstraint baseTableName=reservation, constraintName=fk_reservation_person... \N 4.9.1 \N \N 8615475122 +2022-11-17-move_columns_from_person_to_enrollment terova migrations.xml 2022-11-17 12:16:38.355334 9 EXECUTED 9:6d847e8743a2b08a08c5be28f6180ac5 addColumn tableName=enrollment; dropColumn tableName=person \N 4.9.1 \N \N 8680198271 +2022-11-17-rename_exam_event_visible_to_hidden terova migrations.xml 2022-11-17 14:08:19.109749 10 EXECUTED 9:cd1240669368efdbe8d5de4e26924cd7 renameColumn newColumnName=is_hidden, oldColumnName=is_visible, tableName=exam_event; sql \N 4.9.1 \N \N 8686899038 +2022-12-06-create-shedlock-table terova migrations.xml 2022-12-06 14:21:45.036739 11 EXECUTED 9:d5d845196153f4afe595382eaf208376 createTable tableName=shedlock \N 4.9.1 \N \N 0336504848 +2022-12-06-add-enum-email_type terova migrations.xml 2022-12-06 14:21:45.065383 12 EXECUTED 9:3a40f8d772c317519fdaba844e162bdb createTable tableName=email_type; insert tableName=email_type \N 4.9.1 \N \N 0336504848 +2022-12-06-create-email-table terova migrations.xml 2022-12-06 14:21:45.096787 13 EXECUTED 9:d556eb6481d5aff882b485908596202f createTable tableName=email; addForeignKeyConstraint baseTableName=email, constraintName=fk_email_email_type, referencedTableName=email_type \N 4.9.1 \N \N 0336504848 +2022-12-06-create-email_attachment-table terova migrations.xml 2022-12-06 18:42:00.87481 14 EXECUTED 9:4c7f2fe87d7688bf0654a3e6f62a9746 createTable tableName=email_attachment; addForeignKeyConstraint baseTableName=email_attachment, constraintName=fk_email_attachment_email, referencedTableName=email \N 4.9.1 \N \N 0352120682 +2023-01-18-modify_enrollment-table_previous-enrollment-date mikhuttu migrations.xml 2023-05-29 09:17:57.498963 15 EXECUTED 9:3c10af2ffb29d968230e15e621c3ba6d modifyDataType columnName=previous_enrollment_date, tableName=enrollment; renameColumn newColumnName=previous_enrollment, oldColumnName=previous_enrollment_date, tableName=enrollment \N 4.9.1 \N \N 5351877372 +2023-02-03-add_reservation-table_renewed_at jrkkp migrations.xml 2023-05-29 09:17:57.503008 16 EXECUTED 9:40b3879c568d7328d1944869f9421376 addColumn tableName=reservation \N 4.9.1 \N \N 5351877372 +2023-03-20-add_spring_session_table jrkkp migrations.xml 2023-05-29 09:17:57.520006 17 EXECUTED 9:9484e3d16fe0c70adca4187e9a2b453b createTable tableName=spring_session; createIndex indexName=spring_session_expires_idx, tableName=spring_session; createIndex indexName=spring_session_principal_idx, tableName=spring_session; createTable tableName=spring_session_attributes; addPri... \N 4.9.1 \N \N 5351877372 +2023-04-11-add_person_oid jrkkp migrations.xml 2023-05-29 09:17:57.530923 18 EXECUTED 9:4904dd1ca41b61cfa4a9ff05ffde1963 addColumn tableName=person; dropNotNullConstraint columnName=identity_number, tableName=person \N 4.9.1 \N \N 5351877372 +2023-05-03-add-enrollment-to-queue-confirmation-email_type mikhuttu migrations.xml 2023-05-29 09:17:57.534001 19 EXECUTED 9:5cf2bfd776d0ee74ff115ecf82793fc0 insert tableName=email_type \N 4.9.1 \N \N 5351877372 +2023-05-25-payment-table jrkkp migrations.xml 2023-05-29 09:17:57.545296 20 EXECUTED 9:ca4457716b237266c83dbd9e07528ae5 createTable tableName=payment; insert tableName=enrollment_status; insert tableName=enrollment_status; addForeignKeyConstraint baseTableName=payment, constraintName=fk_payment_enrollment, referencedTableName=enrollment \N 4.9.1 \N \N 5351877372 +2023-05-30-modify_payment-table_amount mikhuttu migrations.xml 2023-05-30 13:31:02.784706 21 EXECUTED 9:00ea657910e9e5e2fe442fe3af4b8511 modifyDataType columnName=amount, tableName=payment \N 4.9.1 \N \N 5453462712 +2023-06-01-enrollment-payment-link-hash jrkkp migrations.xml 2023-06-01 13:53:01.472105 22 EXECUTED 9:f67baa7a2e918bb953e82f030af5c78b addColumn tableName=enrollment \N 4.9.1 \N \N 5627581378 +2023-06-02-rename-enrollment-status-EXPECTING_PAYMENT mikhuttu migrations.xml 2023-06-02 08:38:57.704377 23 EXECUTED 9:d8ace0bf20260b36e2c2f0c6833f2ffe insert tableName=enrollment_status; sql; sql \N 4.9.1 \N \N 5695137627 +2023-06-16-person-latest-identified-at mikhuttu migrations.xml 2023-06-16 09:46:36.462511 24 EXECUTED 9:7151d4c1022ac9e13ea88c9c7774e579 addColumn tableName=person; sql; addNotNullConstraint columnName=latest_identified_at, tableName=person \N 4.20.0 \N \N 6908796433 +2023-06-29-remove-person-identity_number mikhuttu migrations.xml 2023-06-29 09:32:48.572192 25 EXECUTED 9:687bbb81a5282eccdb83443935421340 dropColumn columnName=identity_number, tableName=person; dropColumn columnName=date_of_birth, tableName=person \N 4.20.0 \N \N 8031168558 +2023-08-03-payment-add-refunded jrkkp migrations.xml 2024-11-06 13:14:31.761976 26 EXECUTED 9:a5197d8152163f63193f3ef194e246aa addColumn tableName=payment \N 4.29.1 \N \N 0891671690 +2024-04-08-cas-session-ticket jrkkp migrations.xml 2024-11-06 13:14:31.773922 27 EXECUTED 9:b6cfacfeeaaa34091bd253a2317bea3f createTable tableName=cas_ticket \N 4.29.1 \N \N 0891671690 +2024-05-31-free-enrollment lket migrations.xml 2024-11-06 13:14:31.813119 28 EXECUTED 9:804d47bd31f027ba706ff62fd67412b3 createTable tableName=free_enrollment; addForeignKeyConstraint baseTableName=free_enrollment, constraintName=fk_free_enrollment_person, referencedTableName=person; addColumn tableName=enrollment; addForeignKeyConstraint baseTableName=enrollment, c... \N 4.29.1 \N \N 0891671690 +2024-06-18-add-uuid-to-person-postgres pkoivisto migrations.xml 2024-11-06 13:14:31.823681 29 EXECUTED 9:72ab649e66366bb6a154ca0ed767d919 addColumn tableName=person; sql; addNotNullConstraint columnName=uuid, tableName=person \N 4.29.1 \N \N 0891671690 +2024-08-14-add-is-queued-to-enrollment jrkkp migrations.xml 2024-11-06 13:14:31.832944 30 EXECUTED 9:0c6f186a9f15e2e395cd24d1652bd239 addColumn tableName=enrollment; sql; sql \N 4.29.1 \N \N 0891671690 +2024-08-27-all-koski-educations pkoivisto migrations.xml 2024-11-06 13:14:31.845359 31 EXECUTED 9:aee4a31a7eb021b38755e24b0c30070f createTable tableName=koski_educations; addForeignKeyConstraint baseTableName=koski_educations, constraintName=fk_koski_educations_free_enrollment, referencedTableName=free_enrollment; addForeignKeyConstraint baseTableName=koski_educations, constr... \N 4.29.1 \N \N 0891671690 +2024-09-11-registration-open-and-close-times-psql jrkkp migrations.xml 2024-11-06 13:14:31.862263 32 EXECUTED 9:27e10d6992e13a438d8945de985d1fa7 sql \N 4.29.1 \N \N 0891671690 +2024-09-16-enrollment_appointment jrkkp migrations.xml 2024-11-06 13:14:31.874047 33 EXECUTED 9:2ac5933bca860e5cbbd3f9592c718275 createTable tableName=enrollment_appointment; addColumn tableName=payment \N 4.29.1 \N \N 0891671690 +2024-10-04-examiner-and-municipality-tables pkoivisto migrations.xml 2024-11-06 13:14:31.897791 34 EXECUTED 9:17684f1fcc2b8eeda7ed7db0865b421a createTable tableName=examiner; createTable tableName=municipality; createTable tableName=examiner_municipality; addUniqueConstraint constraintName=uk_examiner_municipality_examiner_id_municipality_id, tableName=examiner_municipality; addForeignKe... \N 4.29.1 \N \N 0891671690 +2024-10-15-exam_event-add-reference-to-examiner pkoivisto migrations.xml 2024-11-06 13:14:31.905791 35 EXECUTED 9:88276462edd4a15ef2f384cd6094990c dropUniqueConstraint constraintName=uk_exam_event_language_level_date, tableName=exam_event; addColumn tableName=exam_event; addForeignKeyConstraint baseTableName=exam_event, constraintName=fk_exam_event_examiner_id, referencedTableName=examiner \N 4.29.1 \N \N 0891671690 +2024-10-15-exam_level-new-value pkoivisto migrations.xml 2024-11-06 13:14:31.909788 36 EXECUTED 9:8faf60b4438613d90a29a860678bf66e insert tableName=exam_level \N 4.29.1 \N \N 0891671690 +2024-10-15-unique-exam-event-language-level-date-examiner-on-psql pkoivisto migrations.xml 2024-11-06 13:14:31.915393 37 EXECUTED 9:b69bb176a254f507ddeb877153d6b162 sql \N 4.29.1 \N \N 0891671690 +2024-11-04-add-enrollment_appointment-missing-fields jrkkp migrations.xml 2024-11-06 13:14:31.922772 38 EXECUTED 9:b982dffea40ebba3a547a1afd7a3ca6a addColumn tableName=enrollment_appointment \N 4.29.1 \N \N 0891671690 +\. + + +-- +-- Data for Name: databasechangeloglock; Type: TABLE DATA; Schema: public; Owner: postgres +-- + +COPY public.databasechangeloglock (id, locked, lockgranted, lockedby) FROM stdin; +1 f \N \N +\. + + +-- +-- Name: databasechangeloglock databasechangeloglock_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres +-- + +ALTER TABLE ONLY public.databasechangeloglock + ADD CONSTRAINT databasechangeloglock_pkey PRIMARY KEY (id); + + +-- +-- PostgreSQL database dump complete +-- + diff --git a/backend/vkt/db/4_init.sql b/backend/vkt/db/4_init.sql index b9f3d1c3d..bd8b159ca 100644 --- a/backend/vkt/db/4_init.sql +++ b/backend/vkt/db/4_init.sql @@ -4,143 +4,156 @@ TRUNCATE TABLE person CASCADE; -- Insert exam events INSERT INTO exam_event - (language, level, date, registration_closes, is_hidden, max_participants) + (language, level, date, registration_opens, registration_closes, is_hidden, max_participants) VALUES ( 'FI', 'EXCELLENT', NOW() - INTERVAL '1 MONTHS', + NOW() - INTERVAL '2 WEEKS', NOW() - INTERVAL '2 MONTHS', false, 10 ); INSERT INTO exam_event - (language, level, date, registration_closes, is_hidden, max_participants) + (language, level, date, registration_opens, registration_closes, is_hidden, max_participants) VALUES ( 'SV', 'EXCELLENT', NOW() - INTERVAL '1 MONTHS', + NOW() - INTERVAL '2 WEEKS', NOW() - INTERVAL '2 MONTHS', false, 10 ); INSERT INTO exam_event - (language, level, date, registration_closes, is_hidden, max_participants) + (language, level, date, registration_opens, registration_closes, is_hidden, max_participants) VALUES ( 'FI', 'EXCELLENT', NOW(), NOW(), + NOW(), false, 10 ); INSERT INTO exam_event - (language, level, date, registration_closes, is_hidden, max_participants) + (language, level, date, registration_opens, registration_closes, is_hidden, max_participants) VALUES ( 'SV', 'EXCELLENT', NOW(), NOW(), + NOW(), false, 10 ); INSERT INTO exam_event - (language, level, date, registration_closes, is_hidden, max_participants) + (language, level, date, registration_opens, registration_closes, is_hidden, max_participants) VALUES ( 'FI', 'EXCELLENT', NOW() + INTERVAL '1 WEEK', + NOW() - INTERVAL '1 DAY', NOW(), false, 10 ); INSERT INTO exam_event - (language, level, date, registration_closes, is_hidden, max_participants) + (language, level, date, registration_opens, registration_closes, is_hidden, max_participants) VALUES ( 'FI', 'EXCELLENT', NOW() + INTERVAL '3 MONTHS', + NOW() + INTERVAL '1 DAY', NOW() + INTERVAL '2 MONTHS', false, 10 ); INSERT INTO exam_event - (language, level, date, registration_closes, is_hidden, max_participants) + (language, level, date, registration_opens, registration_closes, is_hidden, max_participants) VALUES ( 'SV', 'EXCELLENT', NOW() + INTERVAL '3 MONTHS', + NOW(), NOW() + INTERVAL '2 MONTHS', false, 10 ); INSERT INTO exam_event - (language, level, date, registration_closes, is_hidden, max_participants) + (language, level, date, registration_opens, registration_closes, is_hidden, max_participants) VALUES ( 'FI', 'EXCELLENT', NOW() + INTERVAL '5 MONTHS', + NOW(), NOW() + INTERVAL '4 MONTHS', false, 10 ); INSERT INTO exam_event - (language, level, date, registration_closes, is_hidden, max_participants) + (language, level, date, registration_opens, registration_closes, is_hidden, max_participants) VALUES ( 'FI', 'EXCELLENT', NOW() + INTERVAL '9 MONTHS', + NOW(), NOW() + INTERVAL '8 MONTHS', false, 10 ); INSERT INTO exam_event - (language, level, date, registration_closes, is_hidden, max_participants) + (language, level, date, registration_opens, registration_closes, is_hidden, max_participants) VALUES ( 'FI', 'EXCELLENT', NOW() + INTERVAL '12 MONTHS', + NOW(), NOW() + INTERVAL '11 MONTHS', false, 10 ); INSERT INTO exam_event - (language, level, date, registration_closes, is_hidden, max_participants) + (language, level, date, registration_opens, registration_closes, is_hidden, max_participants) VALUES ( 'SV', 'EXCELLENT', NOW() + INTERVAL '12 MONTHS', + NOW(), NOW() + INTERVAL '11 MONTHS', false, 10 ); INSERT INTO exam_event - (language, level, date, registration_closes, is_hidden, max_participants) + (language, level, date, registration_opens, registration_closes, is_hidden, max_participants) VALUES ( 'FI', 'EXCELLENT', NOW() + INTERVAL '24 MONTHS', + NOW(), NOW() + INTERVAL '22 MONTHS', false, 10 ); INSERT INTO exam_event - (language, level, date, registration_closes, is_hidden, max_participants) + (language, level, date, registration_opens, registration_closes, is_hidden, max_participants) VALUES ( 'SV', 'EXCELLENT', NOW() + INTERVAL '24 MONTHS', + NOW(), NOW() + INTERVAL '22 MONTHS', false, 10 @@ -149,29 +162,31 @@ VALUES ( -- Special exam events INSERT INTO exam_event - (language, level, date, registration_closes, is_hidden, max_participants) + (language, level, date, registration_opens, registration_closes, is_hidden, max_participants) VALUES ( 'SV', 'EXCELLENT', NOW() + INTERVAL '5 WEEKS', + NOW(), NOW() + INTERVAL '4 WEEKS', false, 8 ); INSERT INTO exam_event - (language, level, date, registration_closes, is_hidden, max_participants) + (language, level, date, registration_opens, registration_closes, is_hidden, max_participants) VALUES ( 'SV', 'EXCELLENT', NOW() + INTERVAL '2 WEEKS', + NOW(), NOW() + INTERVAL '1 WEEK', true, 10 ); -- Insert persons -INSERT INTO person(last_name, first_name, oid, other_identifier, latest_identified_at) +INSERT INTO person(last_name, first_name, oid, other_identifier, latest_identified_at, uuid) SELECT last_names[mod(i, array_length(last_names, 1)) + 1], first_names[mod(i, array_length(first_names, 1)) + 1], @@ -179,7 +194,8 @@ SELECT WHEN 0 THEN NULL ELSE '1.2.246.init-' || i::text END, CASE mod(i, 7) WHEN 0 THEN 'FI/init-' || i::text END, - NOW() + NOW(), + gen_random_uuid() FROM generate_series(1, 22) i, (SELECT ('{Anneli, Ella, Hanna, Iiris, Liisa, Maria, Ninni, Viivi, Sointu, Jaakko, Lasse, Kyösti, ' || 'Markku, Kristian, Mikael, Nooa, Otto, Olli}')::text[] AS first_names) AS first_name_table, @@ -195,7 +211,7 @@ INSERT INTO enrollment(exam_event_id, person_id, SELECT (SELECT exam_event_id FROM exam_event ORDER BY exam_event_id DESC LIMIT 1 OFFSET 1), person_id, true, true, true, true, true, true, true, - 'PAID', true, + 'COMPLETED', true, 'person' || person_id::text || '@example.invalid', '+35840' || (1000000 + person_id)::text, CASE mod(person_id, 5) @@ -225,7 +241,7 @@ INSERT INTO enrollment(exam_event_id, person_id, SELECT (SELECT exam_event_id FROM exam_event ORDER BY exam_event_id DESC LIMIT 1 OFFSET 2), person_id, true, true, true, true, true, true, true, - 'PAID', true, + 'COMPLETED', true, 'person' || person_id::text || '@example.invalid', '+35840' || (1000000 + person_id)::text, CASE mod(person_id, 5) @@ -285,7 +301,7 @@ INSERT INTO enrollment(exam_event_id, person_id, SELECT (SELECT exam_event_id FROM exam_event ORDER BY exam_event_id DESC LIMIT 1 OFFSET 3), person_id, true, true, true, true, true, true, true, - 'PAID', true, + 'COMPLETED', true, 'person' || person_id::text || '@example.invalid', '+35840' || (1000000 + person_id)::text, CASE mod(person_id, 5) @@ -312,7 +328,7 @@ INSERT INTO enrollment(exam_event_id, person_id, SELECT (SELECT exam_event_id FROM exam_event ORDER BY exam_event_id DESC LIMIT 1 OFFSET 3), person_id, true, true, true, true, true, true, true, - 'SHIFTED_FROM_QUEUE', true, + 'AWAITING_PAYMENT', true, 'person' || person_id::text || '@example.invalid', '+35840' || (1000000 + person_id)::text, CASE mod(person_id, 5) @@ -343,7 +359,7 @@ INSERT INTO enrollment(exam_event_id, person_id, SELECT (SELECT exam_event_id FROM exam_event ORDER BY exam_event_id DESC LIMIT 1 OFFSET 4), person_id, true, true, true, true, true, true, true, - 'PAID', true, + 'COMPLETED', true, 'person' || person_id::text || '@example.invalid', '+35840' || (1000000 + person_id)::text, CASE mod(person_id, 5) @@ -377,12 +393,17 @@ SELECT exam_event_id, (SELECT max(person_id) FROM person), FROM exam_event; -- Insert enrollment appointment -INSERT INTO enrollment_appointment(person_id, - skill_oral, skill_textual, skill_understanding, - partial_exam_speaking, partial_exam_speech_comprehension, partial_exam_writing, partial_exam_reading_comprehension, - status, digital_certificate_consent, email, phone_number, street, postal_code, town, country) -VALUES (SELECT max(person_id) FROM person), - true, true, true, - true, true, true, true, - 'COMPLETED', true, - 'foo@bar.invalid', '0404040404', null, null, null, null; +-- INSERT INTO enrollment_appointment(person_id, +-- skill_oral, skill_textual, skill_understanding, +-- partial_exam_speaking, partial_exam_speech_comprehension, partial_exam_writing, partial_exam_reading_comprehension, +-- status, digital_certificate_consent, email, phone_number, street, postal_code, town, country) +-- VALUES (SELECT max(person_id) FROM person), +-- true, true, true, +-- true, true, true, true, +-- 'COMPLETED', true, +-- 'foo@bar.invalid', '0404040404', null, null, null, null; + + +-- Insert enrollment appointment +INSERT INTO examiner(version, oid, email, phone_number, last_name, first_name, nickname, exam_language_finnish, exam_language_swedish, is_public) +VALUES (1, '1.2.246.init-1', 'examiner@example.invalid', '04040404040', 'Tessilä', 'Testi', 'Tessa', true, true, true); diff --git a/frontend/packages/vkt/src/components/publicExaminerListing/PublicExaminerListing.tsx b/frontend/packages/vkt/src/components/publicExaminerListing/PublicExaminerListing.tsx index dcd4e7fae..e09fd1319 100644 --- a/frontend/packages/vkt/src/components/publicExaminerListing/PublicExaminerListing.tsx +++ b/frontend/packages/vkt/src/components/publicExaminerListing/PublicExaminerListing.tsx @@ -25,7 +25,7 @@ import { usePublicTranslation, } from 'configs/i18n'; import { useAppDispatch, useAppSelector } from 'configs/redux'; -import { ExamLanguage } from 'enums/app'; +import { AppRoutes, ExamLanguage } from 'enums/app'; import { PublicExaminer } from 'interfaces/publicExaminer'; import { setPublicExaminerLanguageFilter } from 'redux/reducers/publicExaminer'; import {