|
|
@@ -0,0 +1,515 @@
|
|
|
+--
|
|
|
+-- PostgreSQL database dump
|
|
|
+--
|
|
|
+
|
|
|
+-- Dumped from database version 13.4
|
|
|
+-- Dumped by pg_dump version 13.4
|
|
|
+
|
|
|
+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: announcement; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE IF NOT EXISTS public.announcement(
|
|
|
+ id bigint NOT NULL,
|
|
|
+ content character varying(255) NOT NULL,
|
|
|
+ course_id bigint NOT NULL,
|
|
|
+ created_at timestamp without time zone NOT NULL,
|
|
|
+ sender_id bigint NOT NULL,
|
|
|
+ state character varying(255) NOT NULL,
|
|
|
+ title character varying(255) NOT NULL,
|
|
|
+ type integer NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.announcement OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: announcement_record; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE IF NOT EXISTS public.announcement_record (
|
|
|
+ announcement_id bigint NOT NULL,
|
|
|
+ recipient_id bigint NOT NULL,
|
|
|
+ created_at timestamp without time zone NOT NULL,
|
|
|
+ read_at timestamp without time zone,
|
|
|
+ state boolean NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.announcement_record OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: course; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE IF NOT EXISTS public.course (
|
|
|
+ id bigint NOT NULL,
|
|
|
+ coder_id integer,
|
|
|
+ created_time timestamp without time zone NOT NULL,
|
|
|
+ description character varying(255) NOT NULL,
|
|
|
+ end_time timestamp without time zone NOT NULL,
|
|
|
+ eval_id integer,
|
|
|
+ helper_id bigint,
|
|
|
+ image_url character varying(255),
|
|
|
+ invitation_code character varying(255) NOT NULL,
|
|
|
+ mooc_url character varying(255),
|
|
|
+ name character varying(255) NOT NULL,
|
|
|
+ price double precision NOT NULL,
|
|
|
+ semester character varying(255) NOT NULL,
|
|
|
+ start_time timestamp without time zone NOT NULL,
|
|
|
+ state character varying(255) NOT NULL,
|
|
|
+ teacher_id bigint NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.course OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: course_generation; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE IF NOT EXISTS public.course_generation (
|
|
|
+ pk_course_id_name character varying(255) NOT NULL,
|
|
|
+ pk_course_id_value bigint
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.course_generation OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: course_selection; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE IF NOT EXISTS public.course_selection (
|
|
|
+ course_id bigint NOT NULL,
|
|
|
+ user_id bigint NOT NULL,
|
|
|
+ state boolean NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.course_selection OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: filled_info; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE IF NOT EXISTS public.filled_info (
|
|
|
+ id bigint NOT NULL,
|
|
|
+ filled integer,
|
|
|
+ phone character varying(64) NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.filled_info OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: hibernate_sequence; Type: SEQUENCE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE SEQUENCE public.hibernate_sequence
|
|
|
+ START WITH 1
|
|
|
+ INCREMENT BY 1
|
|
|
+ NO MINVALUE
|
|
|
+ NO MAXVALUE
|
|
|
+ CACHE 1;
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.hibernate_sequence OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: message; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE IF NOT EXISTS public.message (
|
|
|
+ id bigint NOT NULL,
|
|
|
+ action_type character varying(255) NOT NULL,
|
|
|
+ content character varying(255) NOT NULL,
|
|
|
+ created_at timestamp without time zone NOT NULL,
|
|
|
+ mnt_id bigint NOT NULL,
|
|
|
+ sender_id bigint NOT NULL,
|
|
|
+ state character varying(255) NOT NULL,
|
|
|
+ target_id bigint NOT NULL,
|
|
|
+ target_type character varying(255) NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.message OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: message_record; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE IF NOT EXISTS public.message_record (
|
|
|
+ message_id bigint NOT NULL,
|
|
|
+ recipient_id bigint NOT NULL,
|
|
|
+ created_at timestamp without time zone NOT NULL,
|
|
|
+ read_at timestamp without time zone,
|
|
|
+ state boolean NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.message_record OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: phone_verification; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE IF NOT EXISTS public.phone_verification (
|
|
|
+ id bigint NOT NULL,
|
|
|
+ code character varying(64) NOT NULL,
|
|
|
+ code_time timestamp without time zone,
|
|
|
+ phone character varying(64) NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.phone_verification OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: portal_user; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE IF NOT EXISTS public.portal_user (
|
|
|
+ id bigint NOT NULL,
|
|
|
+ created_time timestamp without time zone,
|
|
|
+ email character varying(512),
|
|
|
+ is_valid boolean,
|
|
|
+ name character varying(64),
|
|
|
+ password character varying(512) NOT NULL,
|
|
|
+ phone character varying(64) NOT NULL,
|
|
|
+ photo character varying(512),
|
|
|
+ role character varying(255) NOT NULL,
|
|
|
+ signature character varying(512),
|
|
|
+ username character varying(64) NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.portal_user OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: super; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE IF NOT EXISTS public.super (
|
|
|
+ id bigint NOT NULL,
|
|
|
+ certificate character varying(512),
|
|
|
+ created_time timestamp without time zone NOT NULL,
|
|
|
+ job_number character varying(64) NOT NULL,
|
|
|
+ organization character varying(64) NOT NULL,
|
|
|
+ real_name character varying(64) NOT NULL,
|
|
|
+ role integer NOT NULL,
|
|
|
+ state character varying(255) NOT NULL,
|
|
|
+ uid bigint NOT NULL
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.super OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: user_generation; Type: TABLE; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE TABLE IF NOT EXISTS public.user_generation (
|
|
|
+ pk_user_id_name character varying(255) NOT NULL,
|
|
|
+ pk_user_id_value bigint
|
|
|
+);
|
|
|
+
|
|
|
+
|
|
|
+ALTER TABLE public.user_generation OWNER TO postgres;
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: announcement announcement_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.announcement
|
|
|
+ ADD CONSTRAINT announcement_pkey PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: announcement_record announcement_record_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.announcement_record
|
|
|
+ ADD CONSTRAINT announcement_record_pkey PRIMARY KEY (announcement_id, recipient_id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: course_generation course_generation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.course_generation
|
|
|
+ ADD CONSTRAINT course_generation_pkey PRIMARY KEY (pk_course_id_name);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: course course_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.course
|
|
|
+ ADD CONSTRAINT course_pkey PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: course_selection course_selection_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.course_selection
|
|
|
+ ADD CONSTRAINT course_selection_pkey PRIMARY KEY (course_id, user_id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: filled_info filled_info_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.filled_info
|
|
|
+ ADD CONSTRAINT filled_info_pkey PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: message message_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.message
|
|
|
+ ADD CONSTRAINT message_pkey PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: message_record message_record_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.message_record
|
|
|
+ ADD CONSTRAINT message_record_pkey PRIMARY KEY (message_id, recipient_id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: phone_verification phone_verification_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.phone_verification
|
|
|
+ ADD CONSTRAINT phone_verification_pkey PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: portal_user portal_user_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.portal_user
|
|
|
+ ADD CONSTRAINT portal_user_pkey PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: super super_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.super
|
|
|
+ ADD CONSTRAINT super_pkey PRIMARY KEY (id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: phone_verification uk_1ebndp9bn7nuiyqujcmeifojg; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.phone_verification
|
|
|
+ ADD CONSTRAINT uk_1ebndp9bn7nuiyqujcmeifojg UNIQUE (phone);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: course uk_4xqvdpkafb91tt3hsb67ga3fj; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.course
|
|
|
+ ADD CONSTRAINT uk_4xqvdpkafb91tt3hsb67ga3fj UNIQUE (name);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: filled_info uk_66l7r4p268ua5cdhp06luoni5; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.filled_info
|
|
|
+ ADD CONSTRAINT uk_66l7r4p268ua5cdhp06luoni5 UNIQUE (phone);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: portal_user uk_86nctyu9don6c0ja9n2nnpudy; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.portal_user
|
|
|
+ ADD CONSTRAINT uk_86nctyu9don6c0ja9n2nnpudy UNIQUE (phone);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: portal_user uk_9vbggjygrxxob1bwqarsen47l; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.portal_user
|
|
|
+ ADD CONSTRAINT uk_9vbggjygrxxob1bwqarsen47l UNIQUE (name);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: portal_user uk_lasdi4ow5ujm6tmww2rfviwbk; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.portal_user
|
|
|
+ ADD CONSTRAINT uk_lasdi4ow5ujm6tmww2rfviwbk UNIQUE (username);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: course uk_oh8yv6gdqu1nonas8bf9666if; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.course
|
|
|
+ ADD CONSTRAINT uk_oh8yv6gdqu1nonas8bf9666if UNIQUE (coder_id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: course uk_rsy0nmfm5erp14m7suwbnna07; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.course
|
|
|
+ ADD CONSTRAINT uk_rsy0nmfm5erp14m7suwbnna07 UNIQUE (eval_id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: course uk_s56iq6sjdp4tx9g89efphd7uo; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.course
|
|
|
+ ADD CONSTRAINT uk_s56iq6sjdp4tx9g89efphd7uo UNIQUE (invitation_code);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: course uk_totwnh6y5qe9axhrns6jgrlf; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.course
|
|
|
+ ADD CONSTRAINT uk_totwnh6y5qe9axhrns6jgrlf UNIQUE (helper_id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: user_generation user_generation_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.user_generation
|
|
|
+ ADD CONSTRAINT user_generation_pkey PRIMARY KEY (pk_user_id_name);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: user_phone_index; Type: INDEX; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE INDEX user_phone_index ON public.portal_user USING btree (phone);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: verification_phone_index; Type: INDEX; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+CREATE INDEX verification_phone_index ON public.phone_verification USING btree (phone);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: announcement announcement_course_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.announcement
|
|
|
+ ADD CONSTRAINT announcement_course_id_fk FOREIGN KEY (course_id) REFERENCES public.course(id) ON DELETE CASCADE;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: announcement announcement_portal_user_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.announcement
|
|
|
+ ADD CONSTRAINT announcement_portal_user_id_fk FOREIGN KEY (sender_id) REFERENCES public.portal_user(id) ON DELETE CASCADE;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: announcement_record announcement_record_announcement_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.announcement_record
|
|
|
+ ADD CONSTRAINT announcement_record_announcement_id_fk FOREIGN KEY (announcement_id) REFERENCES public.announcement(id) ON DELETE CASCADE;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: announcement_record announcement_record_portal_user_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.announcement_record
|
|
|
+ ADD CONSTRAINT announcement_record_portal_user_id_fk FOREIGN KEY (announcement_id) REFERENCES public.portal_user(id) ON DELETE CASCADE;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: course course_portal_user_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.course
|
|
|
+ ADD CONSTRAINT course_portal_user_id_fk FOREIGN KEY (teacher_id) REFERENCES public.portal_user(id) ON DELETE RESTRICT;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: course_selection course_selection_course_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.course_selection
|
|
|
+ ADD CONSTRAINT course_selection_course_id_fk FOREIGN KEY (course_id) REFERENCES public.course(id) ON DELETE CASCADE;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: course_selection course_selection_portal_user_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.course_selection
|
|
|
+ ADD CONSTRAINT course_selection_portal_user_id_fk FOREIGN KEY (user_id) REFERENCES public.portal_user(id) ON DELETE CASCADE;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: super fkkm5iyxbchlm1hjhs7tyqi6knh; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.super
|
|
|
+ ADD CONSTRAINT fkkm5iyxbchlm1hjhs7tyqi6knh FOREIGN KEY (uid) REFERENCES public.portal_user(id);
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: message message_portal_user_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.message
|
|
|
+ ADD CONSTRAINT message_portal_user_id_fk FOREIGN KEY (sender_id) REFERENCES public.portal_user(id) ON DELETE CASCADE;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: message_record message_record_message_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.message_record
|
|
|
+ ADD CONSTRAINT message_record_message_id_fk FOREIGN KEY (message_id) REFERENCES public.message(id) ON DELETE CASCADE;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- Name: message_record message_record_portal_user_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: postgres
|
|
|
+--
|
|
|
+
|
|
|
+ALTER TABLE ONLY public.message_record
|
|
|
+ ADD CONSTRAINT message_record_portal_user_id_fk FOREIGN KEY (recipient_id) REFERENCES public.portal_user(id) ON DELETE CASCADE;
|
|
|
+
|
|
|
+
|
|
|
+--
|
|
|
+-- PostgreSQL database dump complete
|
|
|
+--
|
|
|
+
|