Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --
- -- PostgreSQL database dump
- --
- -- Dumped from database version 11.2 (Debian 11.2-1.pgdg90+1)
- -- Dumped by pg_dump version 11.2 (Debian 11.2-1.pgdg90+1)
- 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 client_min_messages = warning;
- SET row_security = off;
- ALTER TABLE ONLY public.tbl_users_roles DROP CONSTRAINT fktluqqx2halgc7p9jkwky32vrv;
- ALTER TABLE ONLY public.tbl_assigment DROP CONSTRAINT fksptc0lftsxp29s0pod9bbprtp;
- ALTER TABLE ONLY public.tbl_users_roles DROP CONSTRAINT fkfyl02cyotreo3iktoovt2mp2d;
- ALTER TABLE ONLY public.tbl_student_subject DROP CONSTRAINT fkbvbdfavpbohtu2vh9kp944u9w;
- ALTER TABLE ONLY public.tbl_contact DROP CONSTRAINT fka16d3baa7wtpasdk9fi5vswmu;
- ALTER TABLE ONLY public.tbl_student_subject DROP CONSTRAINT fk3xp9h6tfnv9o6m6xpwyww83kw;
- ALTER TABLE ONLY public.tbl_user DROP CONSTRAINT uk_npn1wf1yu1g5rjohbek375pp1;
- ALTER TABLE ONLY public.tbl_contact DROP CONSTRAINT uk_l0ggcgypq0bvxvo8lp5uadu1p;
- ALTER TABLE ONLY public.tbl_user DROP CONSTRAINT tbl_user_pkey;
- ALTER TABLE ONLY public.tbl_subject DROP CONSTRAINT tbl_subject_pkey;
- ALTER TABLE ONLY public.tbl_student DROP CONSTRAINT tbl_student_pkey;
- ALTER TABLE ONLY public.tbl_role DROP CONSTRAINT tbl_role_pkey;
- ALTER TABLE ONLY public.tbl_employee DROP CONSTRAINT tbl_employee_pkey;
- ALTER TABLE ONLY public.tbl_contact DROP CONSTRAINT tbl_contact_pkey;
- ALTER TABLE ONLY public.tbl_assigment DROP CONSTRAINT tbl_assigment_pkey;
- DROP TABLE public.tbl_users_roles;
- DROP TABLE public.tbl_user;
- DROP TABLE public.tbl_subject;
- DROP TABLE public.tbl_student_subject;
- DROP TABLE public.tbl_student;
- DROP TABLE public.tbl_role;
- DROP TABLE public.tbl_employee;
- DROP TABLE public.tbl_contact;
- DROP TABLE public.tbl_assigment;
- SET default_tablespace = '';
- SET default_with_oids = false;
- --
- -- Name: tbl_assigment; Type: TABLE; Schema: public; Owner: postgres
- --
- CREATE TABLE public.tbl_assigment (
- id bigint NOT NULL,
- grade integer NOT NULL,
- name character varying(100) NOT NULL,
- student_id bigint NOT NULL
- );
- ALTER TABLE public.tbl_assigment OWNER TO postgres;
- --
- -- Name: tbl_contact; Type: TABLE; Schema: public; Owner: postgres
- --
- CREATE TABLE public.tbl_contact (
- id bigint NOT NULL,
- city character varying(100),
- phone character varying(20),
- student_id bigint NOT NULL
- );
- ALTER TABLE public.tbl_contact OWNER TO postgres;
- --
- -- Name: tbl_employee; Type: TABLE; Schema: public; Owner: postgres
- --
- CREATE TABLE public.tbl_employee (
- company_id character varying(255) NOT NULL,
- employee_id character varying(255) NOT NULL,
- first_name character varying(100) NOT NULL,
- last_name character varying(100)
- );
- ALTER TABLE public.tbl_employee OWNER TO postgres;
- --
- -- Name: tbl_role; Type: TABLE; Schema: public; Owner: postgres
- --
- CREATE TABLE public.tbl_role (
- id bigint NOT NULL,
- role_name character varying(100) NOT NULL
- );
- ALTER TABLE public.tbl_role OWNER TO postgres;
- --
- -- Name: tbl_student; Type: TABLE; Schema: public; Owner: postgres
- --
- CREATE TABLE public.tbl_student (
- id bigint NOT NULL,
- created_by character varying(255),
- created_date timestamp without time zone,
- last_modified_by character varying(255),
- last_modified_date timestamp without time zone,
- age integer NOT NULL,
- name character varying(100) NOT NULL
- );
- ALTER TABLE public.tbl_student OWNER TO postgres;
- --
- -- Name: tbl_student_subject; Type: TABLE; Schema: public; Owner: postgres
- --
- CREATE TABLE public.tbl_student_subject (
- student_id bigint NOT NULL,
- subject_id bigint NOT NULL
- );
- ALTER TABLE public.tbl_student_subject OWNER TO postgres;
- --
- -- Name: tbl_subject; Type: TABLE; Schema: public; Owner: postgres
- --
- CREATE TABLE public.tbl_subject (
- id bigint NOT NULL,
- name character varying(100) NOT NULL
- );
- ALTER TABLE public.tbl_subject OWNER TO postgres;
- --
- -- Name: tbl_user; Type: TABLE; Schema: public; Owner: postgres
- --
- CREATE TABLE public.tbl_user (
- id bigint NOT NULL,
- email character varying(100),
- first_name character varying(100) NOT NULL,
- last_name character varying(100),
- password character varying(100),
- user_name character varying(50) NOT NULL
- );
- ALTER TABLE public.tbl_user OWNER TO postgres;
- --
- -- Name: tbl_users_roles; Type: TABLE; Schema: public; Owner: postgres
- --
- CREATE TABLE public.tbl_users_roles (
- user_id bigint NOT NULL,
- role_id bigint NOT NULL
- );
- ALTER TABLE public.tbl_users_roles OWNER TO postgres;
- --
- -- Data for Name: tbl_assigment; Type: TABLE DATA; Schema: public; Owner: postgres
- --
- COPY public.tbl_assigment (id, grade, name, student_id) FROM stdin;
- \.
- --
- -- Data for Name: tbl_contact; Type: TABLE DATA; Schema: public; Owner: postgres
- --
- COPY public.tbl_contact (id, city, phone, student_id) FROM stdin;
- \.
- --
- -- Data for Name: tbl_employee; Type: TABLE DATA; Schema: public; Owner: postgres
- --
- COPY public.tbl_employee (company_id, employee_id, first_name, last_name) FROM stdin;
- \.
- --
- -- Data for Name: tbl_role; Type: TABLE DATA; Schema: public; Owner: postgres
- --
- COPY public.tbl_role (id, role_name) FROM stdin;
- \.
- --
- -- Data for Name: tbl_student; Type: TABLE DATA; Schema: public; Owner: postgres
- --
- COPY public.tbl_student (id, created_by, created_date, last_modified_by, last_modified_date, age, name) FROM stdin;
- \.
- --
- -- Data for Name: tbl_student_subject; Type: TABLE DATA; Schema: public; Owner: postgres
- --
- COPY public.tbl_student_subject (student_id, subject_id) FROM stdin;
- \.
- --
- -- Data for Name: tbl_subject; Type: TABLE DATA; Schema: public; Owner: postgres
- --
- COPY public.tbl_subject (id, name) FROM stdin;
- \.
- --
- -- Data for Name: tbl_user; Type: TABLE DATA; Schema: public; Owner: postgres
- --
- COPY public.tbl_user (id, email, first_name, last_name, password, user_name) FROM stdin;
- \.
- --
- -- Data for Name: tbl_users_roles; Type: TABLE DATA; Schema: public; Owner: postgres
- --
- COPY public.tbl_users_roles (user_id, role_id) FROM stdin;
- \.
- --
- -- Name: tbl_assigment tbl_assigment_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
- --
- ALTER TABLE ONLY public.tbl_assigment
- ADD CONSTRAINT tbl_assigment_pkey PRIMARY KEY (id);
- --
- -- Name: tbl_contact tbl_contact_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
- --
- ALTER TABLE ONLY public.tbl_contact
- ADD CONSTRAINT tbl_contact_pkey PRIMARY KEY (id);
- --
- -- Name: tbl_employee tbl_employee_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
- --
- ALTER TABLE ONLY public.tbl_employee
- ADD CONSTRAINT tbl_employee_pkey PRIMARY KEY (company_id, employee_id);
- --
- -- Name: tbl_role tbl_role_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
- --
- ALTER TABLE ONLY public.tbl_role
- ADD CONSTRAINT tbl_role_pkey PRIMARY KEY (id);
- --
- -- Name: tbl_student tbl_student_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
- --
- ALTER TABLE ONLY public.tbl_student
- ADD CONSTRAINT tbl_student_pkey PRIMARY KEY (id);
- --
- -- Name: tbl_subject tbl_subject_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
- --
- ALTER TABLE ONLY public.tbl_subject
- ADD CONSTRAINT tbl_subject_pkey PRIMARY KEY (id);
- --
- -- Name: tbl_user tbl_user_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
- --
- ALTER TABLE ONLY public.tbl_user
- ADD CONSTRAINT tbl_user_pkey PRIMARY KEY (id);
- --
- -- Name: tbl_contact uk_l0ggcgypq0bvxvo8lp5uadu1p; Type: CONSTRAINT; Schema: public; Owner: postgres
- --
- ALTER TABLE ONLY public.tbl_contact
- ADD CONSTRAINT uk_l0ggcgypq0bvxvo8lp5uadu1p UNIQUE (student_id);
- --
- -- Name: tbl_user uk_npn1wf1yu1g5rjohbek375pp1; Type: CONSTRAINT; Schema: public; Owner: postgres
- --
- ALTER TABLE ONLY public.tbl_user
- ADD CONSTRAINT uk_npn1wf1yu1g5rjohbek375pp1 UNIQUE (email);
- --
- -- Name: tbl_student_subject fk3xp9h6tfnv9o6m6xpwyww83kw; Type: FK CONSTRAINT; Schema: public; Owner: postgres
- --
- ALTER TABLE ONLY public.tbl_student_subject
- ADD CONSTRAINT fk3xp9h6tfnv9o6m6xpwyww83kw FOREIGN KEY (student_id) REFERENCES public.tbl_student(id);
- --
- -- Name: tbl_contact fka16d3baa7wtpasdk9fi5vswmu; Type: FK CONSTRAINT; Schema: public; Owner: postgres
- --
- ALTER TABLE ONLY public.tbl_contact
- ADD CONSTRAINT fka16d3baa7wtpasdk9fi5vswmu FOREIGN KEY (student_id) REFERENCES public.tbl_student(id);
- --
- -- Name: tbl_student_subject fkbvbdfavpbohtu2vh9kp944u9w; Type: FK CONSTRAINT; Schema: public; Owner: postgres
- --
- ALTER TABLE ONLY public.tbl_student_subject
- ADD CONSTRAINT fkbvbdfavpbohtu2vh9kp944u9w FOREIGN KEY (subject_id) REFERENCES public.tbl_subject(id);
- --
- -- Name: tbl_users_roles fkfyl02cyotreo3iktoovt2mp2d; Type: FK CONSTRAINT; Schema: public; Owner: postgres
- --
- ALTER TABLE ONLY public.tbl_users_roles
- ADD CONSTRAINT fkfyl02cyotreo3iktoovt2mp2d FOREIGN KEY (user_id) REFERENCES public.tbl_user(id);
- --
- -- Name: tbl_assigment fksptc0lftsxp29s0pod9bbprtp; Type: FK CONSTRAINT; Schema: public; Owner: postgres
- --
- ALTER TABLE ONLY public.tbl_assigment
- ADD CONSTRAINT fksptc0lftsxp29s0pod9bbprtp FOREIGN KEY (student_id) REFERENCES public.tbl_student(id);
- --
- -- Name: tbl_users_roles fktluqqx2halgc7p9jkwky32vrv; Type: FK CONSTRAINT; Schema: public; Owner: postgres
- --
- ALTER TABLE ONLY public.tbl_users_roles
- ADD CONSTRAINT fktluqqx2halgc7p9jkwky32vrv FOREIGN KEY (role_id) REFERENCES public.tbl_role(id);
- --
- -- PostgreSQL database dump complete
- --
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement