source: OpenRLabs-Git/deploy/rlabs_installer/packages/openrlabs.sql @ 335213f

mainqndtest
Last change on this file since 335213f was f03481a, checked in by David Fuertes <dfuertes@…>, 4 years ago

Terminado instalador fullstack

  • Property mode set to 100644
File size: 21.8 KB
Line 
1--
2-- PostgreSQL database dump
3--
4
5-- Dumped from database version 10.17 (Debian 10.17-1.pgdg90+1)
6-- Dumped by pg_dump version 10.17 (Ubuntu 10.17-0ubuntu0.18.04.1)
7
8SET statement_timeout = 0;
9SET lock_timeout = 0;
10SET idle_in_transaction_session_timeout = 0;
11SET client_encoding = 'UTF8';
12SET standard_conforming_strings = on;
13SELECT pg_catalog.set_config('search_path', '', false);
14SET check_function_bodies = false;
15SET xmloption = content;
16SET client_min_messages = warning;
17SET row_security = off;
18
19--
20-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
21--
22
23CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
24
25
26--
27-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
28--
29
30COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
31
32
33SET default_tablespace = '';
34
35SET default_with_oids = false;
36
37--
38-- Name: active_directory; Type: TABLE; Schema: public; Owner: openrlabs
39--
40
41CREATE TABLE public.active_directory (
42    id integer NOT NULL,
43    admin_ad character varying(128),
44    password character varying(128),
45    server_ad character varying(512),
46    base_db character varying(512)
47);
48
49
50ALTER TABLE public.active_directory OWNER TO openrlabs;
51
52--
53-- Name: active_directory_id_seq; Type: SEQUENCE; Schema: public; Owner: openrlabs
54--
55
56CREATE SEQUENCE public.active_directory_id_seq
57    AS integer
58    START WITH 1
59    INCREMENT BY 1
60    NO MINVALUE
61    NO MAXVALUE
62    CACHE 1;
63
64
65ALTER TABLE public.active_directory_id_seq OWNER TO openrlabs;
66
67--
68-- Name: active_directory_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openrlabs
69--
70
71ALTER SEQUENCE public.active_directory_id_seq OWNED BY public.active_directory.id;
72
73
74--
75-- Name: reserves; Type: TABLE; Schema: public; Owner: openrlabs
76--
77
78CREATE TABLE public.reserves (
79    id integer NOT NULL,
80    user_id integer,
81    ou_id character varying(512),
82    lab_id character varying(512),
83    pc_id character varying(512),
84    pc_name character varying(512),
85    expiration_time timestamp without time zone,
86    ip character varying(512) NOT NULL,
87    protocol character varying(512),
88    port character varying(512),
89    os character varying(512),
90    is_assigned boolean DEFAULT false NOT NULL,
91    assigned_init_time timestamp without time zone,
92    image_id character varying NOT NULL,
93    reserved_init_time timestamp without time zone NOT NULL,
94    prereserve_id integer,
95    mac character varying NOT NULL
96);
97
98
99ALTER TABLE public.reserves OWNER TO openrlabs;
100
101--
102-- Name: active_reserves_id_seq; Type: SEQUENCE; Schema: public; Owner: openrlabs
103--
104
105CREATE SEQUENCE public.active_reserves_id_seq
106    AS integer
107    START WITH 1
108    INCREMENT BY 1
109    NO MINVALUE
110    NO MAXVALUE
111    CACHE 1;
112
113
114ALTER TABLE public.active_reserves_id_seq OWNER TO openrlabs;
115
116--
117-- Name: active_reserves_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openrlabs
118--
119
120ALTER SEQUENCE public.active_reserves_id_seq OWNED BY public.reserves.id;
121
122
123--
124-- Name: auth_cas; Type: TABLE; Schema: public; Owner: openrlabs
125--
126
127CREATE TABLE public.auth_cas (
128    id integer NOT NULL,
129    user_id integer,
130    created_on timestamp without time zone,
131    service character varying(512),
132    ticket character varying(512),
133    renew character(1)
134);
135
136
137ALTER TABLE public.auth_cas OWNER TO openrlabs;
138
139--
140-- Name: auth_cas_id_seq; Type: SEQUENCE; Schema: public; Owner: openrlabs
141--
142
143CREATE SEQUENCE public.auth_cas_id_seq
144    AS integer
145    START WITH 1
146    INCREMENT BY 1
147    NO MINVALUE
148    NO MAXVALUE
149    CACHE 1;
150
151
152ALTER TABLE public.auth_cas_id_seq OWNER TO openrlabs;
153
154--
155-- Name: auth_cas_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openrlabs
156--
157
158ALTER SEQUENCE public.auth_cas_id_seq OWNED BY public.auth_cas.id;
159
160
161--
162-- Name: auth_event; Type: TABLE; Schema: public; Owner: openrlabs
163--
164
165CREATE TABLE public.auth_event (
166    id integer NOT NULL,
167    time_stamp timestamp without time zone,
168    client_ip character varying(512),
169    user_id integer,
170    origin character varying(512),
171    description text
172);
173
174
175ALTER TABLE public.auth_event OWNER TO openrlabs;
176
177--
178-- Name: auth_event_id_seq; Type: SEQUENCE; Schema: public; Owner: openrlabs
179--
180
181CREATE SEQUENCE public.auth_event_id_seq
182    AS integer
183    START WITH 1
184    INCREMENT BY 1
185    NO MINVALUE
186    NO MAXVALUE
187    CACHE 1;
188
189
190ALTER TABLE public.auth_event_id_seq OWNER TO openrlabs;
191
192--
193-- Name: auth_event_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openrlabs
194--
195
196ALTER SEQUENCE public.auth_event_id_seq OWNED BY public.auth_event.id;
197
198
199--
200-- Name: auth_group; Type: TABLE; Schema: public; Owner: openrlabs
201--
202
203CREATE TABLE public.auth_group (
204    id integer NOT NULL,
205    role character varying(512),
206    description text
207);
208
209
210ALTER TABLE public.auth_group OWNER TO openrlabs;
211
212--
213-- Name: auth_group_id_seq; Type: SEQUENCE; Schema: public; Owner: openrlabs
214--
215
216CREATE SEQUENCE public.auth_group_id_seq
217    AS integer
218    START WITH 1
219    INCREMENT BY 1
220    NO MINVALUE
221    NO MAXVALUE
222    CACHE 1;
223
224
225ALTER TABLE public.auth_group_id_seq OWNER TO openrlabs;
226
227--
228-- Name: auth_group_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openrlabs
229--
230
231ALTER SEQUENCE public.auth_group_id_seq OWNED BY public.auth_group.id;
232
233
234--
235-- Name: auth_membership; Type: TABLE; Schema: public; Owner: openrlabs
236--
237
238CREATE TABLE public.auth_membership (
239    id integer NOT NULL,
240    user_id integer,
241    group_id integer
242);
243
244
245ALTER TABLE public.auth_membership OWNER TO openrlabs;
246
247--
248-- Name: auth_membership_id_seq; Type: SEQUENCE; Schema: public; Owner: openrlabs
249--
250
251CREATE SEQUENCE public.auth_membership_id_seq
252    AS integer
253    START WITH 1
254    INCREMENT BY 1
255    NO MINVALUE
256    NO MAXVALUE
257    CACHE 1;
258
259
260ALTER TABLE public.auth_membership_id_seq OWNER TO openrlabs;
261
262--
263-- Name: auth_membership_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openrlabs
264--
265
266ALTER SEQUENCE public.auth_membership_id_seq OWNED BY public.auth_membership.id;
267
268
269--
270-- Name: auth_permission; Type: TABLE; Schema: public; Owner: openrlabs
271--
272
273CREATE TABLE public.auth_permission (
274    id integer NOT NULL,
275    group_id integer,
276    name character varying(512),
277    table_name character varying(512),
278    record_id integer
279);
280
281
282ALTER TABLE public.auth_permission OWNER TO openrlabs;
283
284--
285-- Name: auth_permission_id_seq; Type: SEQUENCE; Schema: public; Owner: openrlabs
286--
287
288CREATE SEQUENCE public.auth_permission_id_seq
289    AS integer
290    START WITH 1
291    INCREMENT BY 1
292    NO MINVALUE
293    NO MAXVALUE
294    CACHE 1;
295
296
297ALTER TABLE public.auth_permission_id_seq OWNER TO openrlabs;
298
299--
300-- Name: auth_permission_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openrlabs
301--
302
303ALTER SEQUENCE public.auth_permission_id_seq OWNED BY public.auth_permission.id;
304
305
306--
307-- Name: auth_user; Type: TABLE; Schema: public; Owner: openrlabs
308--
309
310CREATE TABLE public.auth_user (
311    id integer NOT NULL,
312    first_name character varying(128),
313    last_name character varying(128),
314    email character varying(512),
315    password character varying(512),
316    registration_key character varying(512),
317    reset_password_key character varying(512),
318    registration_id character varying(512),
319    username character varying(128)
320);
321
322
323ALTER TABLE public.auth_user OWNER TO openrlabs;
324
325--
326-- Name: auth_user_id_seq; Type: SEQUENCE; Schema: public; Owner: openrlabs
327--
328
329CREATE SEQUENCE public.auth_user_id_seq
330    AS integer
331    START WITH 1
332    INCREMENT BY 1
333    NO MINVALUE
334    NO MAXVALUE
335    CACHE 1;
336
337
338ALTER TABLE public.auth_user_id_seq OWNER TO openrlabs;
339
340--
341-- Name: auth_user_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openrlabs
342--
343
344ALTER SEQUENCE public.auth_user_id_seq OWNED BY public.auth_user.id;
345
346
347--
348-- Name: labs_timetable; Type: TABLE; Schema: public; Owner: openrlabs
349--
350
351CREATE TABLE public.labs_timetable (
352    id integer NOT NULL,
353    lab_id integer NOT NULL,
354    lab_name character varying(512) NOT NULL,
355    "Init_Day" integer NOT NULL,
356    "End_Day" integer NOT NULL,
357    "Init_time" time without time zone NOT NULL,
358    "End_time" time without time zone NOT NULL,
359    cod_asign character varying
360);
361
362
363ALTER TABLE public.labs_timetable OWNER TO openrlabs;
364
365--
366-- Name: labs_timetable_id_seq; Type: SEQUENCE; Schema: public; Owner: openrlabs
367--
368
369CREATE SEQUENCE public.labs_timetable_id_seq
370    AS integer
371    START WITH 1
372    INCREMENT BY 1
373    NO MINVALUE
374    NO MAXVALUE
375    CACHE 1;
376
377
378ALTER TABLE public.labs_timetable_id_seq OWNER TO openrlabs;
379
380--
381-- Name: labs_timetable_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openrlabs
382--
383
384ALTER SEQUENCE public.labs_timetable_id_seq OWNED BY public.labs_timetable.id;
385
386
387--
388-- Name: nip_groups; Type: TABLE; Schema: public; Owner: openrlabs
389--
390
391CREATE TABLE public.nip_groups (
392    id integer NOT NULL,
393    nip character varying(128) NOT NULL,
394    groups text NOT NULL
395);
396
397
398ALTER TABLE public.nip_groups OWNER TO openrlabs;
399
400--
401-- Name: nip_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: openrlabs
402--
403
404CREATE SEQUENCE public.nip_groups_id_seq
405    AS integer
406    START WITH 1
407    INCREMENT BY 1
408    NO MINVALUE
409    NO MAXVALUE
410    CACHE 1;
411
412
413ALTER TABLE public.nip_groups_id_seq OWNER TO openrlabs;
414
415--
416-- Name: nip_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openrlabs
417--
418
419ALTER SEQUENCE public.nip_groups_id_seq OWNED BY public.nip_groups.id;
420
421
422--
423-- Name: openRLabs_setup; Type: TABLE; Schema: public; Owner: openrlabs
424--
425
426CREATE TABLE public."openRLabs_setup" (
427    id integer NOT NULL,
428    "URL_Apache_Guacamole_WebSocket" character varying(512),
429    "URL_openGnsys_server" character varying(512),
430    "URL_openRLabs_server" character varying(512),
431    maxtime_reserve character varying(512),
432    seconds_to_wait integer DEFAULT 200 NOT NULL,
433    auth_mode character varying(512)
434);
435
436
437ALTER TABLE public."openRLabs_setup" OWNER TO openrlabs;
438
439--
440-- Name: openRLabs_setup_id_seq; Type: SEQUENCE; Schema: public; Owner: openrlabs
441--
442
443CREATE SEQUENCE public."openRLabs_setup_id_seq"
444    AS integer
445    START WITH 1
446    INCREMENT BY 1
447    NO MINVALUE
448    NO MAXVALUE
449    CACHE 1;
450
451
452ALTER TABLE public."openRLabs_setup_id_seq" OWNER TO openrlabs;
453
454--
455-- Name: openRLabs_setup_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openrlabs
456--
457
458ALTER SEQUENCE public."openRLabs_setup_id_seq" OWNED BY public."openRLabs_setup".id;
459
460
461--
462-- Name: ous_setup; Type: TABLE; Schema: public; Owner: openrlabs
463--
464
465CREATE TABLE public.ous_setup (
466    id integer NOT NULL,
467    ou_id character varying(512),
468    ou_name character varying(512),
469    ou_user character varying(512),
470    ou_password character varying(512)
471);
472
473
474ALTER TABLE public.ous_setup OWNER TO openrlabs;
475
476--
477-- Name: ous_setup_id_seq; Type: SEQUENCE; Schema: public; Owner: openrlabs
478--
479
480CREATE SEQUENCE public.ous_setup_id_seq
481    AS integer
482    START WITH 1
483    INCREMENT BY 1
484    NO MINVALUE
485    NO MAXVALUE
486    CACHE 1;
487
488
489ALTER TABLE public.ous_setup_id_seq OWNER TO openrlabs;
490
491--
492-- Name: ous_setup_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openrlabs
493--
494
495ALTER SEQUENCE public.ous_setup_id_seq OWNED BY public.ous_setup.id;
496
497
498--
499-- Name: pop3_servers; Type: TABLE; Schema: public; Owner: openrlabs
500--
501
502CREATE TABLE public.pop3_servers (
503    id integer NOT NULL,
504    url character varying(512),
505    port integer NOT NULL,
506    use_tls boolean DEFAULT true NOT NULL,
507    default_server boolean DEFAULT false NOT NULL
508);
509
510
511ALTER TABLE public.pop3_servers OWNER TO openrlabs;
512
513--
514-- Name: pop3_servers_id_seq; Type: SEQUENCE; Schema: public; Owner: openrlabs
515--
516
517CREATE SEQUENCE public.pop3_servers_id_seq
518    AS integer
519    START WITH 1
520    INCREMENT BY 1
521    NO MINVALUE
522    NO MAXVALUE
523    CACHE 1;
524
525
526ALTER TABLE public.pop3_servers_id_seq OWNER TO openrlabs;
527
528--
529-- Name: pop3_servers_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openrlabs
530--
531
532ALTER SEQUENCE public.pop3_servers_id_seq OWNED BY public.pop3_servers.id;
533
534
535--
536-- Name: pre_reserves; Type: TABLE; Schema: public; Owner: openrlabs
537--
538
539CREATE TABLE public.pre_reserves (
540    id integer NOT NULL,
541    lab_id integer NOT NULL,
542    lab_name character varying(518) NOT NULL,
543    init_time timestamp without time zone NOT NULL,
544    finish_time timestamp without time zone NOT NULL,
545    num_reserves integer DEFAULT 1 NOT NULL,
546    ou_id character varying NOT NULL,
547    image_id character varying NOT NULL,
548    image_name character varying NOT NULL,
549    protocol character varying,
550    last_check_time timestamp without time zone
551);
552
553
554ALTER TABLE public.pre_reserves OWNER TO openrlabs;
555
556--
557-- Name: pre_reserves_id_seq; Type: SEQUENCE; Schema: public; Owner: openrlabs
558--
559
560CREATE SEQUENCE public.pre_reserves_id_seq
561    AS integer
562    START WITH 1
563    INCREMENT BY 1
564    NO MINVALUE
565    NO MAXVALUE
566    CACHE 1;
567
568
569ALTER TABLE public.pre_reserves_id_seq OWNER TO openrlabs;
570
571--
572-- Name: pre_reserves_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openrlabs
573--
574
575ALTER SEQUENCE public.pre_reserves_id_seq OWNED BY public.pre_reserves.id;
576
577
578--
579-- Name: services; Type: TABLE; Schema: public; Owner: openrlabs
580--
581
582CREATE TABLE public.services (
583    id integer NOT NULL,
584    name character varying(512),
585    port character varying(512)
586);
587
588
589ALTER TABLE public.services OWNER TO openrlabs;
590
591--
592-- Name: services_id_seq; Type: SEQUENCE; Schema: public; Owner: openrlabs
593--
594
595CREATE SEQUENCE public.services_id_seq
596    AS integer
597    START WITH 1
598    INCREMENT BY 1
599    NO MINVALUE
600    NO MAXVALUE
601    CACHE 1;
602
603
604ALTER TABLE public.services_id_seq OWNER TO openrlabs;
605
606--
607-- Name: services_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: openrlabs
608--
609
610ALTER SEQUENCE public.services_id_seq OWNED BY public.services.id;
611
612
613--
614-- Name: active_directory id; Type: DEFAULT; Schema: public; Owner: openrlabs
615--
616
617ALTER TABLE ONLY public.active_directory ALTER COLUMN id SET DEFAULT nextval('public.active_directory_id_seq'::regclass);
618
619
620--
621-- Name: auth_cas id; Type: DEFAULT; Schema: public; Owner: openrlabs
622--
623
624ALTER TABLE ONLY public.auth_cas ALTER COLUMN id SET DEFAULT nextval('public.auth_cas_id_seq'::regclass);
625
626
627--
628-- Name: auth_event id; Type: DEFAULT; Schema: public; Owner: openrlabs
629--
630
631ALTER TABLE ONLY public.auth_event ALTER COLUMN id SET DEFAULT nextval('public.auth_event_id_seq'::regclass);
632
633
634--
635-- Name: auth_group id; Type: DEFAULT; Schema: public; Owner: openrlabs
636--
637
638ALTER TABLE ONLY public.auth_group ALTER COLUMN id SET DEFAULT nextval('public.auth_group_id_seq'::regclass);
639
640
641--
642-- Name: auth_membership id; Type: DEFAULT; Schema: public; Owner: openrlabs
643--
644
645ALTER TABLE ONLY public.auth_membership ALTER COLUMN id SET DEFAULT nextval('public.auth_membership_id_seq'::regclass);
646
647
648--
649-- Name: auth_permission id; Type: DEFAULT; Schema: public; Owner: openrlabs
650--
651
652ALTER TABLE ONLY public.auth_permission ALTER COLUMN id SET DEFAULT nextval('public.auth_permission_id_seq'::regclass);
653
654
655--
656-- Name: auth_user id; Type: DEFAULT; Schema: public; Owner: openrlabs
657--
658
659ALTER TABLE ONLY public.auth_user ALTER COLUMN id SET DEFAULT nextval('public.auth_user_id_seq'::regclass);
660
661
662--
663-- Name: labs_timetable id; Type: DEFAULT; Schema: public; Owner: openrlabs
664--
665
666ALTER TABLE ONLY public.labs_timetable ALTER COLUMN id SET DEFAULT nextval('public.labs_timetable_id_seq'::regclass);
667
668
669--
670-- Name: nip_groups id; Type: DEFAULT; Schema: public; Owner: openrlabs
671--
672
673ALTER TABLE ONLY public.nip_groups ALTER COLUMN id SET DEFAULT nextval('public.nip_groups_id_seq'::regclass);
674
675
676--
677-- Name: openRLabs_setup id; Type: DEFAULT; Schema: public; Owner: openrlabs
678--
679
680ALTER TABLE ONLY public."openRLabs_setup" ALTER COLUMN id SET DEFAULT nextval('public."openRLabs_setup_id_seq"'::regclass);
681
682
683--
684-- Name: ous_setup id; Type: DEFAULT; Schema: public; Owner: openrlabs
685--
686
687ALTER TABLE ONLY public.ous_setup ALTER COLUMN id SET DEFAULT nextval('public.ous_setup_id_seq'::regclass);
688
689
690--
691-- Name: pop3_servers id; Type: DEFAULT; Schema: public; Owner: openrlabs
692--
693
694ALTER TABLE ONLY public.pop3_servers ALTER COLUMN id SET DEFAULT nextval('public.pop3_servers_id_seq'::regclass);
695
696
697--
698-- Name: pre_reserves id; Type: DEFAULT; Schema: public; Owner: openrlabs
699--
700
701ALTER TABLE ONLY public.pre_reserves ALTER COLUMN id SET DEFAULT nextval('public.pre_reserves_id_seq'::regclass);
702
703
704--
705-- Name: reserves id; Type: DEFAULT; Schema: public; Owner: openrlabs
706--
707
708ALTER TABLE ONLY public.reserves ALTER COLUMN id SET DEFAULT nextval('public.active_reserves_id_seq'::regclass);
709
710
711--
712-- Name: services id; Type: DEFAULT; Schema: public; Owner: openrlabs
713--
714
715ALTER TABLE ONLY public.services ALTER COLUMN id SET DEFAULT nextval('public.services_id_seq'::regclass);
716
717
718--
719-- Name: active_directory active_directory_pkey; Type: CONSTRAINT; Schema: public; Owner: openrlabs
720--
721
722ALTER TABLE ONLY public.active_directory
723    ADD CONSTRAINT active_directory_pkey PRIMARY KEY (id);
724
725
726--
727-- Name: reserves active_reserves_pkey; Type: CONSTRAINT; Schema: public; Owner: openrlabs
728--
729
730ALTER TABLE ONLY public.reserves
731    ADD CONSTRAINT active_reserves_pkey PRIMARY KEY (id);
732
733
734--
735-- Name: auth_cas auth_cas_pkey; Type: CONSTRAINT; Schema: public; Owner: openrlabs
736--
737
738ALTER TABLE ONLY public.auth_cas
739    ADD CONSTRAINT auth_cas_pkey PRIMARY KEY (id);
740
741
742--
743-- Name: auth_event auth_event_pkey; Type: CONSTRAINT; Schema: public; Owner: openrlabs
744--
745
746ALTER TABLE ONLY public.auth_event
747    ADD CONSTRAINT auth_event_pkey PRIMARY KEY (id);
748
749
750--
751-- Name: auth_group auth_group_pkey; Type: CONSTRAINT; Schema: public; Owner: openrlabs
752--
753
754ALTER TABLE ONLY public.auth_group
755    ADD CONSTRAINT auth_group_pkey PRIMARY KEY (id);
756
757
758--
759-- Name: auth_membership auth_membership_pkey; Type: CONSTRAINT; Schema: public; Owner: openrlabs
760--
761
762ALTER TABLE ONLY public.auth_membership
763    ADD CONSTRAINT auth_membership_pkey PRIMARY KEY (id);
764
765
766--
767-- Name: auth_permission auth_permission_pkey; Type: CONSTRAINT; Schema: public; Owner: openrlabs
768--
769
770ALTER TABLE ONLY public.auth_permission
771    ADD CONSTRAINT auth_permission_pkey PRIMARY KEY (id);
772
773
774--
775-- Name: auth_user auth_user_pkey; Type: CONSTRAINT; Schema: public; Owner: openrlabs
776--
777
778ALTER TABLE ONLY public.auth_user
779    ADD CONSTRAINT auth_user_pkey PRIMARY KEY (id);
780
781
782--
783-- Name: labs_timetable labs_timetable_pkey; Type: CONSTRAINT; Schema: public; Owner: openrlabs
784--
785
786ALTER TABLE ONLY public.labs_timetable
787    ADD CONSTRAINT labs_timetable_pkey PRIMARY KEY (id);
788
789
790--
791-- Name: nip_groups nip_groups_nip_unique; Type: CONSTRAINT; Schema: public; Owner: openrlabs
792--
793
794ALTER TABLE ONLY public.nip_groups
795    ADD CONSTRAINT nip_groups_nip_unique UNIQUE (nip);
796
797
798--
799-- Name: nip_groups nip_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: openrlabs
800--
801
802ALTER TABLE ONLY public.nip_groups
803    ADD CONSTRAINT nip_groups_pkey PRIMARY KEY (id);
804
805
806--
807-- Name: openRLabs_setup openRLabs_setup_pkey; Type: CONSTRAINT; Schema: public; Owner: openrlabs
808--
809
810ALTER TABLE ONLY public."openRLabs_setup"
811    ADD CONSTRAINT "openRLabs_setup_pkey" PRIMARY KEY (id);
812
813
814--
815-- Name: ous_setup ous_setup_ou_id_key; Type: CONSTRAINT; Schema: public; Owner: openrlabs
816--
817
818ALTER TABLE ONLY public.ous_setup
819    ADD CONSTRAINT ous_setup_ou_id_key UNIQUE (ou_id);
820
821
822--
823-- Name: ous_setup ous_setup_ou_name_key; Type: CONSTRAINT; Schema: public; Owner: openrlabs
824--
825
826ALTER TABLE ONLY public.ous_setup
827    ADD CONSTRAINT ous_setup_ou_name_key UNIQUE (ou_name);
828
829
830--
831-- Name: ous_setup ous_setup_pkey; Type: CONSTRAINT; Schema: public; Owner: openrlabs
832--
833
834ALTER TABLE ONLY public.ous_setup
835    ADD CONSTRAINT ous_setup_pkey PRIMARY KEY (id);
836
837
838--
839-- Name: pop3_servers pop3_servers_pkey; Type: CONSTRAINT; Schema: public; Owner: openrlabs
840--
841
842ALTER TABLE ONLY public.pop3_servers
843    ADD CONSTRAINT pop3_servers_pkey PRIMARY KEY (id);
844
845
846--
847-- Name: pre_reserves prereserves_pkey; Type: CONSTRAINT; Schema: public; Owner: openrlabs
848--
849
850ALTER TABLE ONLY public.pre_reserves
851    ADD CONSTRAINT prereserves_pkey PRIMARY KEY (id);
852
853
854--
855-- Name: services services_name_key; Type: CONSTRAINT; Schema: public; Owner: openrlabs
856--
857
858ALTER TABLE ONLY public.services
859    ADD CONSTRAINT services_name_key UNIQUE (name);
860
861
862--
863-- Name: services services_pkey; Type: CONSTRAINT; Schema: public; Owner: openrlabs
864--
865
866ALTER TABLE ONLY public.services
867    ADD CONSTRAINT services_pkey PRIMARY KEY (id);
868
869
870--
871-- Name: services services_port_key; Type: CONSTRAINT; Schema: public; Owner: openrlabs
872--
873
874ALTER TABLE ONLY public.services
875    ADD CONSTRAINT services_port_key UNIQUE (port);
876
877
878--
879-- Name: reserves active_reserves_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: openrlabs
880--
881
882ALTER TABLE ONLY public.reserves
883    ADD CONSTRAINT active_reserves_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.auth_user(id) ON DELETE CASCADE;
884
885
886--
887-- Name: auth_cas auth_cas_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: openrlabs
888--
889
890ALTER TABLE ONLY public.auth_cas
891    ADD CONSTRAINT auth_cas_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.auth_user(id) ON DELETE CASCADE;
892
893
894--
895-- Name: auth_event auth_event_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: openrlabs
896--
897
898ALTER TABLE ONLY public.auth_event
899    ADD CONSTRAINT auth_event_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.auth_user(id) ON DELETE CASCADE;
900
901
902--
903-- Name: auth_membership auth_membership_group_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: openrlabs
904--
905
906ALTER TABLE ONLY public.auth_membership
907    ADD CONSTRAINT auth_membership_group_id_fkey FOREIGN KEY (group_id) REFERENCES public.auth_group(id) ON DELETE CASCADE;
908
909
910--
911-- Name: auth_membership auth_membership_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: openrlabs
912--
913
914ALTER TABLE ONLY public.auth_membership
915    ADD CONSTRAINT auth_membership_user_id_fkey FOREIGN KEY (user_id) REFERENCES public.auth_user(id) ON DELETE CASCADE;
916
917
918--
919-- Name: auth_permission auth_permission_group_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: openrlabs
920--
921
922ALTER TABLE ONLY public.auth_permission
923    ADD CONSTRAINT auth_permission_group_id_fkey FOREIGN KEY (group_id) REFERENCES public.auth_group(id) ON DELETE CASCADE;
924
925
926--
927-- Name: reserves reserves__prereserve_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: openrlabs
928--
929
930ALTER TABLE ONLY public.reserves
931    ADD CONSTRAINT reserves__prereserve_id_fkey FOREIGN KEY (prereserve_id) REFERENCES public.pre_reserves(id) ON DELETE CASCADE;
932
933
934--
935-- PostgreSQL database dump complete
936--
937
Note: See TracBrowser for help on using the repository browser.