Changeset 2171
- Timestamp:
- 01/17/19 16:32:12 (5 years ago)
- Location:
- trunk/LATMOS-Accounts
- Files:
-
- 1 added
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LATMOS-Accounts/sqldata/base.sql
r1061 r2171 1 --- DataBase Schema for LATMOS-Accounts 5.2.34 2 --- Schema version 28 build on 2019-01-17T15:11:30 3 4 --- To properly deploy as Postgresql Admin run: 5 --- CREATE ROLE laccounts LOGIN PASSWORD 'laccounts' ; 6 --- CREATE DATABASE laccounts OWNER laccounts encoding 'UTF-8' 7 1 8 -- 2 9 -- PostgreSQL database dump 3 10 -- 4 11 12 -- Dumped from database version 9.6.10 13 -- Dumped by pg_dump version 9.6.10 14 5 15 SET statement_timeout = 0; 16 SET lock_timeout = 0; 17 SET idle_in_transaction_session_timeout = 0; 6 18 SET client_encoding = 'UTF8'; 7 SET standard_conforming_strings = off; 19 SET standard_conforming_strings = on; 20 SELECT pg_catalog.set_config('search_path', '', false); 8 21 SET check_function_bodies = false; 9 22 SET client_min_messages = warning; 10 SET escape_string_warning = off; 11 12 -- 13 -- Name: plpgsql; Type: PROCEDURAL LANGUAGE; Schema: -; Owner: - 14 -- 15 16 CREATE PROCEDURAL LANGUAGE plpgsql; 17 18 19 SET search_path = public, pg_catalog; 23 SET row_security = off; 24 25 -- 26 -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: - 27 -- 28 29 CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog; 30 31 32 -- 33 -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: - 34 -- 35 36 COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language'; 37 20 38 21 39 -- … … 23 41 -- 24 42 25 CREATE FUNCTION accreq_attr_update_ref() RETURNS trigger43 CREATE FUNCTION public.accreq_attr_update_ref() RETURNS trigger 26 44 LANGUAGE plpgsql 27 45 AS $$begin … … 47 65 -- 48 66 49 CREATE FUNCTION address_attr_update_ref() RETURNS trigger67 CREATE FUNCTION public.address_attr_update_ref() RETURNS trigger 50 68 LANGUAGE plpgsql 51 69 AS $$begin … … 71 89 -- 72 90 73 CREATE FUNCTION address_sort_fields() RETURNS trigger91 CREATE FUNCTION public.address_sort_fields() RETURNS trigger 74 92 LANGUAGE plpgsql 75 93 AS $$BEGIN … … 107 125 -- 108 126 109 CREATE FUNCTION address_update_user_rev() RETURNS trigger127 CREATE FUNCTION public.address_update_user_rev() RETURNS trigger 110 128 LANGUAGE plpgsql 111 129 AS $$begin … … 123 141 124 142 -- 143 -- Name: aliases_attr_update_ref(); Type: FUNCTION; Schema: public; Owner: - 144 -- 145 146 CREATE FUNCTION public.aliases_attr_update_ref() RETURNS trigger 147 LANGUAGE plpgsql 148 AS $$begin 149 150 IF (TG_OP != 'INSERT') then 151 update "aliases" set date = now() where "aliases".ikey = old.okey; 152 end if; 153 IF (TG_OP != 'DELETE') then 154 update "aliases" set date = now() where "aliases".ikey = new.okey; 155 end if; 156 157 IF (TG_OP = 'DELETE') then 158 return old; 159 ELSE 160 return new; 161 END IF; 162 163 END;$$; 164 165 166 -- 125 167 -- Name: aliases_nickname(); Type: FUNCTION; Schema: public; Owner: - 126 168 -- 127 169 128 CREATE FUNCTION aliases_nickname() RETURNS trigger170 CREATE FUNCTION public.aliases_nickname() RETURNS trigger 129 171 LANGUAGE plpgsql 130 172 AS $$begin … … 149 191 END;$$; 150 192 193 151 194 -- 152 195 -- Name: department_group_upd_f(); Type: FUNCTION; Schema: public; Owner: - 153 196 -- 154 197 155 CREATE FUNCTION department_group_upd_f() RETURNS trigger198 CREATE FUNCTION public.department_group_upd_f() RETURNS trigger 156 199 LANGUAGE plpgsql 157 200 AS $$BEGIN … … 172 215 173 216 -- 174 -- Name: fmt_macaddr(); Type: FUNCTION; Schema: public; Owner: -175 -- 176 177 CREATE FUNCTION fmt_macaddr() RETURNS trigger217 -- Name: employment_attr_update_ref(); Type: FUNCTION; Schema: public; Owner: - 218 -- 219 220 CREATE FUNCTION public.employment_attr_update_ref() RETURNS trigger 178 221 LANGUAGE plpgsql 179 222 AS $$begin 180 223 224 IF (TG_OP != 'INSERT') then 225 update "employment" set date = now() where "employment".ikey = old.okey; 226 end if; 227 IF (TG_OP != 'DELETE') then 228 update "employment" set date = now() where "employment".ikey = new.okey; 229 end if; 230 231 IF (TG_OP = 'DELETE') then 232 return old; 233 ELSE 234 return new; 235 END IF; 236 237 END;$$; 238 239 240 -- 241 -- Name: fmt_macaddr(); Type: FUNCTION; Schema: public; Owner: - 242 -- 243 244 CREATE FUNCTION public.fmt_macaddr() RETURNS trigger 245 LANGUAGE plpgsql 246 AS $$begin 247 181 248 new.value := new.value::macaddr::text; 182 249 … … 189 256 -- 190 257 191 CREATE FUNCTION group_attr_update_ref() RETURNS trigger258 CREATE FUNCTION public.group_attr_update_ref() RETURNS trigger 192 259 LANGUAGE plpgsql 193 260 AS $$begin … … 213 280 -- 214 281 215 CREATE FUNCTION group_attr_user_update_user_ref() RETURNS trigger282 CREATE FUNCTION public.group_attr_user_update_user_ref() RETURNS trigger 216 283 LANGUAGE plpgsql 217 284 AS $$begin … … 237 304 -- 238 305 239 CREATE FUNCTION group_sort_fields() RETURNS trigger306 CREATE FUNCTION public.group_sort_fields() RETURNS trigger 240 307 LANGUAGE plpgsql 241 308 AS $$BEGIN 242 309 243 IF (TG_OP='INSERT') then 244 IF (new.attr='managedBy' 245 OR new.attr='member' 246 OR new.attr='memberUID') THEN 247 insert into group_attributes_users VALUES (new.*); 248 RETURN NULL; 249 END IF; 250 251 IF (new.attr='sutype') THEN 252 insert into group_attributes_sutypes VALUES (new.*); 253 RETURN NULL; 254 END IF; 255 end if; 256 257 258 IF (TG_OP = 'UPDATE') THEN 259 IF (new.attr='gidNumber') then 260 update "group" set gidnumber = new.value::integer where "group".ikey = new.okey; 261 RETURN NULL; 262 END IF; 263 END IF; 264 265 IF (TG_OP = 'DELETE') THEN 266 IF (old.attr='exported') then 267 update "group" set exported = false where "group".ikey = old.okey; 268 return null; 269 end if; 270 else 271 IF (new.attr='exported') then 272 update "group" set exported = true where "group".ikey = new.okey; 273 RETURN NULL; 274 end if; 275 END IF; 276 277 if (TG_OP='DELETE') THEN 278 RETURN old; 279 else 280 RETURN new; 281 end if; 282 END;$$; 310 IF (TG_OP='INSERT') then 311 IF (new.attr='managedBy' 312 OR new.attr='managedAlsoBy' 313 OR new.attr='member' 314 OR new.attr='memberUID') THEN 315 insert into group_attributes_users VALUES (new.*); 316 RETURN NULL; 317 END IF; 318 319 IF (new.attr='sutype') THEN 320 insert into group_attributes_sutypes VALUES (new.*); 321 RETURN NULL; 322 END IF; 323 end if; 324 325 326 IF (TG_OP = 'UPDATE') THEN 327 IF (new.attr='gidNumber') then 328 update "group" set gidnumber = new.value::integer where 329 "group".ikey = new.okey; 330 RETURN NULL; 331 END IF; 332 END IF; 333 334 IF (TG_OP = 'DELETE') THEN 335 IF (old.attr='exported') then 336 update "group" set exported = false where "group".ikey = old.okey; 337 return null; 338 end if; 339 else 340 IF (new.attr='exported') then 341 update "group" set exported = true where "group".ikey = new.okey; 342 RETURN NULL; 343 end if; 344 END IF; 345 346 if (TG_OP='DELETE') THEN 347 RETURN old; 348 else 349 RETURN new; 350 end if; 351 END;$$; 283 352 284 353 … … 287 356 -- 288 357 289 CREATE FUNCTION nethost_attr_update_ref() RETURNS trigger358 CREATE FUNCTION public.nethost_attr_update_ref() RETURNS trigger 290 359 LANGUAGE plpgsql 291 360 AS $$begin … … 311 380 -- 312 381 313 CREATE FUNCTION nethost_sort_fields() RETURNS trigger382 CREATE FUNCTION public.nethost_sort_fields() RETURNS trigger 314 383 LANGUAGE plpgsql 315 384 AS $$BEGIN 316 385 317 IF (TG_OP='INSERT') then 318 IF (new.attr='ip') THEN 319 insert into nethost_attributes_ips VALUES (new.*); 320 RETURN NULL; 321 END IF; 322 323 IF (new.attr='macaddr') THEN 324 insert into nethost_attributes_macs VALUES (new.*); 325 RETURN NULL; 326 END IF; 327 328 IF (new.attr='owner') THEN 329 insert into nethost_attributes_users VALUES (new.*); 330 RETURN NULL; 331 END IF; 332 end if; 333 334 335 336 if (TG_OP='DELETE') THEN 337 RETURN old; 338 else 339 RETURN new; 340 end if; 341 END;$$; 386 IF (TG_OP='INSERT') then 387 IF (new.attr='ip') THEN 388 insert into nethost_attributes_ips VALUES (new.*); 389 RETURN NULL; 390 END IF; 391 392 IF (new.attr='macaddr') THEN 393 insert into nethost_attributes_macs VALUES (new.*); 394 RETURN NULL; 395 END IF; 396 397 IF (new.attr='owner') THEN 398 insert into nethost_attributes_users VALUES (new.*); 399 RETURN NULL; 400 END IF; 401 402 IF (new.attr='user') THEN 403 insert into nethost_attributes_users VALUES (new.*); 404 RETURN NULL; 405 END IF; 406 407 IF (new.attr='related') THEN 408 insert into nethost_attributes_nethosts VALUES (new.*); 409 RETURN NULL; 410 END IF; 411 end if; 412 413 if (TG_OP='DELETE') THEN 414 RETURN old; 415 else 416 RETURN new; 417 end if; 418 END;$$; 342 419 343 420 … … 346 423 -- 347 424 348 CREATE FUNCTION nethost_upd_zone() RETURNS trigger425 CREATE FUNCTION public.nethost_upd_zone() RETURNS trigger 349 426 LANGUAGE plpgsql 350 427 AS $$begin … … 386 463 -- 387 464 388 CREATE FUNCTION nethostipdel_upd_zone() RETURNS trigger465 CREATE FUNCTION public.nethostipdel_upd_zone() RETURNS trigger 389 466 LANGUAGE plpgsql 390 467 AS $$begin … … 408 485 -- 409 486 410 CREATE FUNCTION netzone_attr_update_ref() RETURNS trigger487 CREATE FUNCTION public.netzone_attr_update_ref() RETURNS trigger 411 488 LANGUAGE plpgsql 412 489 AS $$begin … … 432 509 -- 433 510 434 CREATE FUNCTION netzone_sort_fields() RETURNS trigger511 CREATE FUNCTION public.netzone_sort_fields() RETURNS trigger 435 512 LANGUAGE plpgsql 436 513 AS $$BEGIN … … 461 538 -- 462 539 463 CREATE FUNCTION p erson_attr_update_ref() RETURNS trigger540 CREATE FUNCTION public.person_attr_update_ref() RETURNS trigger 464 541 LANGUAGE plpgsql 465 542 AS $$begin … … 484 561 485 562 -- 563 -- Name: rev_tg_aliases_f(); Type: FUNCTION; Schema: public; Owner: - 564 -- 565 566 CREATE FUNCTION public.rev_tg_aliases_f() RETURNS trigger 567 LANGUAGE plpgsql 568 AS $$begin 569 570 IF (TG_OP = 'DELETE') THEN 571 update "user" set rev = nextval('revisions_rev_seq'::regclass), "date" = now() where "name" = ANY (old.forward); 572 return old; 573 ELSE 574 IF (TG_OP = 'UPDATE') THEN 575 update "user" set rev = nextval('revisions_rev_seq'::regclass), "date" = now() where "name" = ANY (old.forward); 576 END IF; 577 update "user" set rev = nextval('revisions_rev_seq'::regclass), "date" = now() where "name" = ANY (new.forward); 578 return new; 579 END IF; 580 581 end;$$; 582 583 584 -- 486 585 -- Name: rev_tg_f(); Type: FUNCTION; Schema: public; Owner: - 487 586 -- 488 587 489 CREATE FUNCTION rev_tg_f() RETURNS trigger588 CREATE FUNCTION public.rev_tg_f() RETURNS trigger 490 589 LANGUAGE plpgsql 491 590 AS $$begin … … 499 598 else 500 599 IF (TG_OP = 'INSERT') THEN 501 new.rev := nextval(' revisions_rev_seq'::regclass);600 new.rev := nextval('public.revisions_rev_seq'::regclass); 502 601 new.date := now(); 503 602 ELSIF (old.rev = new.rev) THEN 504 new.rev := nextval(' revisions_rev_seq'::regclass);603 new.rev := nextval('public.revisions_rev_seq'::regclass); 505 604 new.date := now(); 506 605 END IF; … … 512 611 513 612 -- 613 -- Name: service_attr_update_ref(); Type: FUNCTION; Schema: public; Owner: - 614 -- 615 616 CREATE FUNCTION public.service_attr_update_ref() RETURNS trigger 617 LANGUAGE plpgsql 618 AS $$begin 619 620 IF (TG_OP != 'INSERT') then 621 update "service" set date = now() where "service".ikey = old.okey; 622 end if; 623 IF (TG_OP != 'DELETE') then 624 update "service" set date = now() where "service".ikey = new.okey; 625 end if; 626 627 IF (TG_OP = 'DELETE') then 628 return old; 629 ELSE 630 return new; 631 END IF; 632 633 END;$$; 634 635 636 -- 637 -- Name: service_sort_fields(); Type: FUNCTION; Schema: public; Owner: - 638 -- 639 640 CREATE FUNCTION public.service_sort_fields() RETURNS trigger 641 LANGUAGE plpgsql 642 AS $$BEGIN 643 644 if (TG_OP='INSERT' or TG_OP='UPDATE') THEN 645 IF (new.attr='manager') THEN 646 insert into service_attributes_users VALUES (new.*); 647 RETURN NULL; 648 END IF; 649 END IF; 650 651 if (TG_OP='DELETE') THEN 652 RETURN old; 653 else 654 RETURN new; 655 end if; 656 END;$$; 657 658 659 -- 514 660 -- Name: site_attr_update_ref(); Type: FUNCTION; Schema: public; Owner: - 515 661 -- 516 662 517 CREATE FUNCTION site_attr_update_ref() RETURNS trigger663 CREATE FUNCTION public.site_attr_update_ref() RETURNS trigger 518 664 LANGUAGE plpgsql 519 665 AS $$begin … … 536 682 537 683 -- 684 -- Name: stat_attr_update_ref(); Type: FUNCTION; Schema: public; Owner: - 685 -- 686 687 CREATE FUNCTION public.stat_attr_update_ref() RETURNS trigger 688 LANGUAGE plpgsql 689 AS $$begin 690 691 IF (TG_OP != 'INSERT') then 692 update "stat" set date = now() where "stat".ikey = old.okey; 693 end if; 694 IF (TG_OP != 'DELETE') then 695 update "stat" set date = now() where "stat".ikey = new.okey; 696 end if; 697 698 IF (TG_OP = 'DELETE') then 699 return old; 700 ELSE 701 return new; 702 END IF; 703 704 END;$$; 705 706 707 -- 538 708 -- Name: update_address_site(); Type: FUNCTION; Schema: public; Owner: - 539 709 -- 540 710 541 CREATE FUNCTION update_address_site() RETURNS trigger711 CREATE FUNCTION public.update_address_site() RETURNS trigger 542 712 LANGUAGE plpgsql 543 713 AS $$begin … … 562 732 -- 563 733 564 CREATE FUNCTION user_sort_fields() RETURNS trigger734 CREATE FUNCTION public.user_sort_fields() RETURNS trigger 565 735 LANGUAGE plpgsql 566 736 AS $$DECLARE 567 rec RECORD;568 BEGIN569 570 IF (TG_OP='UPDATE' or TG_OP='INSERT') THEN571 572 IF (new.attr='locked') THEN573 IF (TG_OP = 'INSERT') THEN574 new.value = now()::text;575 ELSIF (TG_OP='UPDATE') THEN576 new.value = old.value;577 END IF;578 END IF;579 580 IF (new.attr='nickname') THEN581 PERFORM 1 from "user" where "user".ikey = new.okey582 and new.value = "user".name;583 IF NOT FOUND THEN584 select aliases.name into rec from aliases join "user"585 on array["user".name] = aliases.forward586 where "user".ikey = new.okey and aliases.name = new.value;587 IF NOT FOUND THEN588 insert into aliases ("name", "forward")589 select new.value, array["user".name]from "user" where "user".ikey = new.okey;590 END IF;591 END IF;592 END IF;593 594 IF (new.attr='uidNumber') THEN595 update "user" set uidnumber = new.value::integer where ikey = new.okey;596 RETURN NULL;597 END IF;598 599 IF (new.attr='gidNumber') THEN600 update "user" set gidnumber = new.value::integer where ikey = new.okey;601 RETURN null;602 END IF;603 604 IF (new.attr='expire') THEN605 update "user" set expire = new.value::timestamp where ikey = new.okey;606 RETURN NULL;607 END IF;608 609 IF (new.attr='exported') THEN610 update "user" set exported = true where ikey = new.okey;611 RETURN NULL;612 END IF;613 614 END IF;615 616 IF (TG_OP = 'DELETE') THEN617 618 IF (old.attr='expire') THEN619 update "user" set expire = NULL where ikey = old.okey;620 RETURN NULL;621 END IF;622 623 IF (old.attr='exported') THEN624 update "user" set exported = false where ikey = old.okey;625 RETURN NULL;626 END IF;627 628 END IF;629 630 631 IF (TG_OP='INSERT') THEN632 IF (new.attr='manager') THEN633 insert into user_attributes_users VALUES (new.*);634 RETURN NULL;635 END IF;636 637 IF (new.attr='site') THEN638 insert into user_attributes_site VALUES (new.*);639 RETURN NULL;640 END IF;641 642 IF (new.attr='department') THEN643 insert into user_attributes_groups VALUES (new.*);644 RETURN NULL;645 END IF;646 647 IF (new.attr='contratType') THEN648 insert into user_attributes_groups VALUES (new.*);649 RETURN NULL;650 END IF;651 652 IF (new.attr='jobType') THEN653 insert into user_attributes_groups VALUES (new.*);654 RETURN NULL;655 END IF;656 657 END IF;658 659 IF (TG_OP='DELETE') then660 RETURN old;661 ELSE662 RETURN new;663 end if;664 END;$$;737 rec RECORD; 738 BEGIN 739 740 IF (TG_OP='UPDATE' or TG_OP='INSERT') THEN 741 742 IF (new.attr='locked') THEN 743 IF (TG_OP = 'INSERT') THEN 744 new.value = now()::text; 745 ELSIF (TG_OP='UPDATE') THEN 746 new.value = old.value; 747 END IF; 748 END IF; 749 750 IF (new.attr='nickname') THEN 751 PERFORM 1 from "user" where "user".ikey = new.okey 752 and new.value = "user".name; 753 IF NOT FOUND THEN 754 select aliases.name into rec from aliases join "user" 755 on array["user".name] = aliases.forward 756 where "user".ikey = new.okey and aliases.name = new.value; 757 IF NOT FOUND THEN 758 insert into aliases ("name", "forward", "description", exported) 759 select new.value, array["user".name], 'Forward for ' || "user".name || ' nickname', "user".exported from "user" where "user".ikey = new.okey; 760 END IF; 761 END IF; 762 END IF; 763 764 IF (new.attr='uidNumber') THEN 765 update "user" set uidnumber = new.value::integer where ikey = new.okey; 766 RETURN NULL; 767 END IF; 768 769 IF (new.attr='gidNumber') THEN 770 update "user" set gidnumber = new.value::integer where ikey = new.okey; 771 RETURN null; 772 END IF; 773 774 IF (new.attr='expire') THEN 775 update "user" set expire = new.value::timestamp where ikey = new.okey; 776 RETURN NULL; 777 END IF; 778 779 IF (new.attr='exported') THEN 780 update "user" set exported = true where ikey = new.okey; 781 RETURN NULL; 782 END IF; 783 784 END IF; 785 786 IF (TG_OP = 'DELETE') THEN 787 788 IF (old.attr='expire') THEN 789 update "user" set expire = NULL where ikey = old.okey; 790 RETURN NULL; 791 END IF; 792 793 IF (old.attr='exported') THEN 794 update "user" set exported = false where ikey = old.okey; 795 RETURN NULL; 796 END IF; 797 798 END IF; 799 800 801 IF (TG_OP='INSERT') THEN 802 IF (new.attr='manager') THEN 803 insert into user_attributes_users VALUES (new.*); 804 RETURN NULL; 805 END IF; 806 807 IF (new.attr='site') THEN 808 insert into user_attributes_site VALUES (new.*); 809 RETURN NULL; 810 END IF; 811 812 IF (new.attr='department') THEN 813 insert into user_attributes_groups VALUES (new.*); 814 RETURN NULL; 815 END IF; 816 817 IF (new.attr='contratType') THEN 818 insert into user_attributes_groups VALUES (new.*); 819 RETURN NULL; 820 END IF; 821 822 IF (new.attr='jobType') THEN 823 insert into user_attributes_groups VALUES (new.*); 824 RETURN NULL; 825 END IF; 826 827 END IF; 828 829 IF (TG_OP='DELETE') then 830 RETURN old; 831 ELSE 832 RETURN new; 833 end if; 834 END;$$; 665 835 666 836 … … 669 839 -- 670 840 671 CREATE SEQUENCE ikey_seq841 CREATE SEQUENCE public.ikey_seq 672 842 START WITH 1 673 843 INCREMENT BY 1 844 NO MINVALUE 674 845 NO MAXVALUE 675 NO MINVALUE676 846 CACHE 1; 677 847 … … 682 852 683 853 -- 684 -- Name: revisions; Type: TABLE; Schema: public; Owner: - ; Tablespace:685 -- 686 687 CREATE TABLE revisions (854 -- Name: revisions; Type: TABLE; Schema: public; Owner: - 855 -- 856 857 CREATE TABLE public.revisions ( 688 858 rev integer NOT NULL, 689 859 date timestamp with time zone DEFAULT now() NOT NULL, 690 860 "create" timestamp with time zone DEFAULT now() NOT NULL, 691 ikey integer DEFAULT nextval(' ikey_seq'::regclass) NOT NULL861 ikey integer DEFAULT nextval('public.ikey_seq'::regclass) NOT NULL 692 862 ); 693 863 694 864 695 865 -- 696 -- Name: revisions_rev_seq; Type: SEQUENCE; Schema: public; Owner: - 697 -- 698 699 CREATE SEQUENCE revisions_rev_seq 700 START WITH 1 701 INCREMENT BY 1 702 NO MAXVALUE 703 NO MINVALUE 704 CACHE 1; 705 706 707 -- 708 -- Name: revisions_rev_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - 709 -- 710 711 ALTER SEQUENCE revisions_rev_seq OWNED BY revisions.rev; 712 713 714 -- 715 -- Name: objects; Type: TABLE; Schema: public; Owner: -; Tablespace: 716 -- 717 718 CREATE TABLE objects ( 866 -- Name: objects; Type: TABLE; Schema: public; Owner: - 867 -- 868 869 CREATE TABLE public.objects ( 719 870 exported boolean DEFAULT true NOT NULL, 720 name text NOT NULL 871 name text NOT NULL, 872 createdby text, 873 modifiedby text, 874 oalias text, 875 internobject boolean DEFAULT false NOT NULL, 876 nodelete boolean DEFAULT false NOT NULL, 877 oaliascache text 721 878 ) 722 INHERITS ( revisions);723 724 725 -- 726 -- Name: accreq; Type: TABLE; Schema: public; Owner: - ; Tablespace:727 -- 728 729 CREATE TABLE accreq (879 INHERITS (public.revisions); 880 881 882 -- 883 -- Name: accreq; Type: TABLE; Schema: public; Owner: - 884 -- 885 886 CREATE TABLE public.accreq ( 730 887 ) 731 INHERITS ( objects);732 733 734 -- 735 -- Name: attributes; Type: TABLE; Schema: public; Owner: - ; Tablespace:736 -- 737 738 CREATE TABLE attributes (888 INHERITS (public.objects); 889 890 891 -- 892 -- Name: attributes; Type: TABLE; Schema: public; Owner: - 893 -- 894 895 CREATE TABLE public.attributes ( 739 896 value text NOT NULL, 740 897 attr_key integer NOT NULL, … … 745 902 746 903 -- 747 -- Name: attributes_attr_key_seq; Type: SEQUENCE; Schema: public; Owner: - 748 -- 749 750 CREATE SEQUENCE attributes_attr_key_seq 904 -- Name: accreq_attributes; Type: TABLE; Schema: public; Owner: - 905 -- 906 907 CREATE TABLE public.accreq_attributes ( 908 ) 909 INHERITS (public.attributes); 910 911 912 -- 913 -- Name: attributes_list; Type: TABLE; Schema: public; Owner: - 914 -- 915 916 CREATE TABLE public.attributes_list ( 917 canonical text NOT NULL, 918 ikey integer DEFAULT nextval('public.ikey_seq'::regclass) NOT NULL, 919 description text 920 ); 921 922 923 -- 924 -- Name: COLUMN attributes_list.canonical; Type: COMMENT; Schema: public; Owner: - 925 -- 926 927 COMMENT ON COLUMN public.attributes_list.canonical IS 'Nom de l''attribut'; 928 929 930 -- 931 -- Name: COLUMN attributes_list.ikey; Type: COMMENT; Schema: public; Owner: - 932 -- 933 934 COMMENT ON COLUMN public.attributes_list.ikey IS 'Clef interne à la base'; 935 936 937 -- 938 -- Name: revisions_rev_seq; Type: SEQUENCE; Schema: public; Owner: - 939 -- 940 941 CREATE SEQUENCE public.revisions_rev_seq 751 942 START WITH 1 752 943 INCREMENT BY 1 944 NO MINVALUE 753 945 NO MAXVALUE 754 NO MINVALUE755 946 CACHE 1; 756 947 757 948 758 949 -- 759 -- Name: attributes_attr_key_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - 760 -- 761 762 ALTER SEQUENCE attributes_attr_key_seq OWNED BY attributes.attr_key; 763 764 765 -- 766 -- Name: accreq_attributes; Type: TABLE; Schema: public; Owner: -; Tablespace: 767 -- 768 769 CREATE TABLE accreq_attributes ( 770 ) 771 INHERITS (attributes); 772 773 774 -- 775 -- Name: attributes_list; Type: TABLE; Schema: public; Owner: -; Tablespace: 776 -- 777 778 CREATE TABLE attributes_list ( 779 canonical text NOT NULL, 780 ikey integer DEFAULT nextval('ikey_seq'::regclass) NOT NULL, 781 description text 782 ); 783 784 785 -- 786 -- Name: COLUMN attributes_list.canonical; Type: COMMENT; Schema: public; Owner: - 787 -- 788 789 COMMENT ON COLUMN attributes_list.canonical IS 'Nom de l''attribut'; 790 791 792 -- 793 -- Name: COLUMN attributes_list.ikey; Type: COMMENT; Schema: public; Owner: - 794 -- 795 796 COMMENT ON COLUMN attributes_list.ikey IS 'Clef interne à la base'; 797 798 799 -- 800 -- Name: accreq_attributes_list; Type: TABLE; Schema: public; Owner: -; Tablespace: 801 -- 802 803 CREATE TABLE accreq_attributes_list ( 804 ikey integer, 805 rev integer DEFAULT nextval('revisions_rev_seq'::regclass) NOT NULL, 950 -- Name: revisions_rev_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - 951 -- 952 953 ALTER SEQUENCE public.revisions_rev_seq OWNED BY public.revisions.rev; 954 955 956 -- 957 -- Name: accreq_attributes_list; Type: TABLE; Schema: public; Owner: - 958 -- 959 960 CREATE TABLE public.accreq_attributes_list ( 961 ikey integer DEFAULT nextval('public.ikey_seq'::regclass), 962 rev integer DEFAULT nextval('public.revisions_rev_seq'::regclass) NOT NULL, 806 963 date timestamp with time zone DEFAULT now() NOT NULL, 807 964 "create" timestamp with time zone DEFAULT now() NOT NULL 808 965 ) 809 INHERITS ( attributes_list);966 INHERITS (public.attributes_list); 810 967 811 968 … … 814 971 -- 815 972 816 CREATE SEQUENCE address_seq973 CREATE SEQUENCE public.address_seq 817 974 START WITH 1 818 975 INCREMENT BY 1 976 NO MINVALUE 819 977 NO MAXVALUE 820 NO MINVALUE821 978 CACHE 1; 822 979 823 980 824 981 -- 825 -- Name: address; Type: TABLE; Schema: public; Owner: -; Tablespace: 826 -- 827 828 CREATE TABLE address ( 829 name text DEFAULT ('address'::text || (nextval('address_seq'::regclass))::text), 830 "user" text NOT NULL 831 ) 832 INHERITS (objects); 833 834 835 -- 836 -- Name: address_attributes_base; Type: TABLE; Schema: public; Owner: -; Tablespace: 837 -- 838 839 CREATE TABLE address_attributes_base ( 840 ) 841 INHERITS (attributes); 842 843 844 -- 845 -- Name: address_attributes; Type: VIEW; Schema: public; Owner: - 846 -- 847 848 CREATE VIEW address_attributes AS 849 (SELECT address."user" AS value, 'user' AS attr, address.rev AS attr_key, address.ikey AS okey FROM address UNION ALL SELECT address.name AS value, 'name' AS attr, address.rev AS attr_key, address.ikey AS okey FROM address) UNION ALL SELECT address_attributes.value, address_attributes.attr, address_attributes.attr_key, address_attributes.okey FROM address_attributes_base address_attributes; 850 851 852 -- 853 -- Name: address_attributes_list; Type: TABLE; Schema: public; Owner: -; Tablespace: 854 -- 855 856 CREATE TABLE address_attributes_list ( 857 rev integer, 858 date timestamp with time zone, 859 "create" timestamp with time zone 860 ) 861 INHERITS (attributes_list, revisions); 862 863 864 -- 865 -- Name: address_attributes_list_site; Type: TABLE; Schema: public; Owner: -; Tablespace: 866 -- 867 868 CREATE TABLE address_attributes_list_site ( 869 ) 870 INHERITS (address_attributes_list); 871 872 873 -- 874 -- Name: address_attributes_site; Type: TABLE; Schema: public; Owner: -; Tablespace: 875 -- 876 877 CREATE TABLE address_attributes_site ( 878 ) 879 INHERITS (address_attributes_base); 880 881 882 -- 883 -- Name: aliases; Type: TABLE; Schema: public; Owner: -; Tablespace: 884 -- 885 886 CREATE TABLE aliases ( 887 forward text[], 982 -- Name: address; Type: TABLE; Schema: public; Owner: - 983 -- 984 985 CREATE TABLE public.address ( 986 name text DEFAULT ('address'::text || (nextval('public.address_seq'::regclass))::text), 987 "user" text NOT NULL, 888 988 expire timestamp with time zone 889 989 ) 890 INHERITS (objects); 891 892 893 -- 894 -- Name: TABLE aliases; Type: COMMENT; Schema: public; Owner: - 895 -- 896 897 COMMENT ON TABLE aliases IS 'Mail aliases'; 898 899 900 -- 901 -- Name: user; Type: TABLE; Schema: public; Owner: -; Tablespace: 902 -- 903 904 CREATE TABLE "user" ( 990 INHERITS (public.objects); 991 992 993 -- 994 -- Name: address_attributes_base; Type: TABLE; Schema: public; Owner: - 995 -- 996 997 CREATE TABLE public.address_attributes_base ( 998 ) 999 INHERITS (public.attributes); 1000 1001 1002 -- 1003 -- Name: user; Type: TABLE; Schema: public; Owner: - 1004 -- 1005 1006 CREATE TABLE public."user" ( 905 1007 name text, 906 1008 uidnumber integer NOT NULL, 907 1009 gidnumber integer NOT NULL, 908 1010 expire timestamp with time zone, 1011 endcircuit timestamp with time zone, 909 1012 CONSTRAINT uid_not_empty CHECK ((name <> ''::text)) 910 1013 ) 911 INHERITS (objects); 1014 INHERITS (public.objects); 1015 1016 1017 -- 1018 -- Name: address_attributes; Type: VIEW; Schema: public; Owner: - 1019 -- 1020 1021 CREATE VIEW public.address_attributes AS 1022 SELECT address."user" AS value, 1023 'user'::text AS attr, 1024 address.rev AS attr_key, 1025 address.ikey AS okey 1026 FROM public.address 1027 UNION ALL 1028 SELECT address.name AS value, 1029 'name'::text AS attr, 1030 address.rev AS attr_key, 1031 address.ikey AS okey 1032 FROM public.address 1033 UNION ALL 1034 SELECT address_attributes.value, 1035 address_attributes.attr, 1036 address_attributes.attr_key, 1037 address_attributes.okey 1038 FROM public.address_attributes_base address_attributes 1039 UNION ALL 1040 SELECT '1'::text AS value, 1041 'active'::text AS attr, 1042 address.rev AS attr_key, 1043 address.ikey AS okey 1044 FROM (public."user" 1045 JOIN public.address ON (("user".name = address."user"))) 1046 WHERE ("user".exported AND address.exported AND (("user".expire IS NULL) OR ("user".expire > now()))); 1047 1048 1049 -- 1050 -- Name: address_attributes_list; Type: TABLE; Schema: public; Owner: - 1051 -- 1052 1053 CREATE TABLE public.address_attributes_list ( 1054 rev integer DEFAULT nextval('public.revisions_rev_seq'::regclass), 1055 date timestamp with time zone DEFAULT now(), 1056 "create" timestamp with time zone DEFAULT now() 1057 ) 1058 INHERITS (public.attributes_list, public.revisions); 1059 1060 1061 -- 1062 -- Name: address_attributes_list_site; Type: TABLE; Schema: public; Owner: - 1063 -- 1064 1065 CREATE TABLE public.address_attributes_list_site ( 1066 ) 1067 INHERITS (public.address_attributes_list); 1068 1069 1070 -- 1071 -- Name: address_attributes_site; Type: TABLE; Schema: public; Owner: - 1072 -- 1073 1074 CREATE TABLE public.address_attributes_site ( 1075 ) 1076 INHERITS (public.address_attributes_base); 1077 1078 1079 -- 1080 -- Name: aliases; Type: TABLE; Schema: public; Owner: - 1081 -- 1082 1083 CREATE TABLE public.aliases ( 1084 forward text[], 1085 expire timestamp with time zone, 1086 description text 1087 ) 1088 INHERITS (public.objects); 1089 1090 1091 -- 1092 -- Name: TABLE aliases; Type: COMMENT; Schema: public; Owner: - 1093 -- 1094 1095 COMMENT ON TABLE public.aliases IS 'Mail aliases'; 1096 1097 1098 -- 1099 -- Name: aliases_attributes_base; Type: TABLE; Schema: public; Owner: - 1100 -- 1101 1102 CREATE TABLE public.aliases_attributes_base ( 1103 ) 1104 INHERITS (public.attributes); 912 1105 913 1106 … … 916 1109 -- 917 1110 918 CREATE VIEW aliases_attributes AS 919 SELECT "user".name AS value, 'user'::text AS attr, aliases.rev AS attr_key, aliases.ikey AS okey FROM (aliases JOIN "user" ON (((aliases.name = "user".name) OR (aliases.forward = ARRAY["user".name])))); 920 921 922 -- 923 -- Name: aliases_attributes_list; Type: TABLE; Schema: public; Owner: -; Tablespace: 924 -- 925 926 CREATE TABLE aliases_attributes_list ( 927 ikey integer, 1111 CREATE VIEW public.aliases_attributes AS 1112 SELECT "user".name AS value, 1113 'user'::text AS attr, 1114 aliases.rev AS attr_key, 1115 aliases.ikey AS okey 1116 FROM (public.aliases 1117 JOIN public."user" ON (((aliases.name = "user".name) OR (aliases.forward = ARRAY["user".name])))) 1118 UNION ALL 1119 SELECT aliases_attributes_base.value, 1120 aliases_attributes_base.attr, 1121 aliases_attributes_base.attr_key, 1122 aliases_attributes_base.okey 1123 FROM public.aliases_attributes_base 1124 UNION ALL 1125 SELECT aliases.name AS value, 1126 'name'::text AS attr, 1127 aliases.rev AS attr_key, 1128 aliases.ikey AS okey 1129 FROM public.aliases; 1130 1131 1132 -- 1133 -- Name: aliases_attributes_list; Type: TABLE; Schema: public; Owner: - 1134 -- 1135 1136 CREATE TABLE public.aliases_attributes_list ( 1137 ikey integer DEFAULT nextval('public.ikey_seq'::regclass), 928 1138 canonical text, 929 1139 description text 930 1140 ) 931 INHERITS ( revisions,attributes_list);1141 INHERITS (public.revisions, public.attributes_list); 932 1142 933 1143 … … 936 1146 -- 937 1147 938 CREATE VIEW all_obj_attributes AS 939 SELECT pg_class.relname, objects.name, attributes_list.description, attributes.attr_key, attributes.attr, attributes.value FROM (((attributes_list JOIN attributes ON ((attributes.attr = attributes_list.canonical))) JOIN pg_class ON ((attributes.tableoid = pg_class.oid))) JOIN objects ON ((objects.ikey = attributes.okey))); 940 941 942 -- 943 -- Name: group; Type: TABLE; Schema: public; Owner: -; Tablespace: 944 -- 945 946 CREATE TABLE "group" ( 1148 CREATE VIEW public.all_obj_attributes AS 1149 SELECT pg_class.relname, 1150 objects.name, 1151 attributes_list.description, 1152 attributes.attr_key, 1153 attributes.attr, 1154 attributes.value 1155 FROM (((public.attributes_list 1156 JOIN public.attributes ON ((attributes.attr = attributes_list.canonical))) 1157 JOIN pg_class ON ((attributes.tableoid = pg_class.oid))) 1158 JOIN public.objects ON ((objects.ikey = attributes.okey))); 1159 1160 1161 -- 1162 -- Name: attributes_attr_key_seq; Type: SEQUENCE; Schema: public; Owner: - 1163 -- 1164 1165 CREATE SEQUENCE public.attributes_attr_key_seq 1166 START WITH 1 1167 INCREMENT BY 1 1168 NO MINVALUE 1169 NO MAXVALUE 1170 CACHE 1; 1171 1172 1173 -- 1174 -- Name: attributes_attr_key_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - 1175 -- 1176 1177 ALTER SEQUENCE public.attributes_attr_key_seq OWNED BY public.attributes.attr_key; 1178 1179 1180 -- 1181 -- Name: attributes_values; Type: TABLE; Schema: public; Owner: - 1182 -- 1183 1184 CREATE TABLE public.attributes_values ( 1185 otype text NOT NULL, 1186 attributes text NOT NULL, 1187 value text NOT NULL 1188 ) 1189 INHERITS (public.revisions); 1190 1191 1192 -- 1193 -- Name: employment; Type: TABLE; Schema: public; Owner: - 1194 -- 1195 1196 CREATE TABLE public.employment ( 1197 name text, 1198 "user" text NOT NULL, 1199 firstday date DEFAULT now() NOT NULL, 1200 lastday date, 1201 CONSTRAINT employment_check CHECK (((lastday IS NULL) OR (firstday <= lastday))) 1202 ) 1203 INHERITS (public.objects); 1204 1205 1206 -- 1207 -- Name: employment_attributes; Type: TABLE; Schema: public; Owner: - 1208 -- 1209 1210 CREATE TABLE public.employment_attributes ( 1211 ) 1212 INHERITS (public.attributes); 1213 1214 1215 -- 1216 -- Name: employment_attributes_list; Type: TABLE; Schema: public; Owner: - 1217 -- 1218 1219 CREATE TABLE public.employment_attributes_list ( 1220 ) 1221 INHERITS (public.revisions, public.attributes_list); 1222 1223 1224 -- 1225 -- Name: group; Type: TABLE; Schema: public; Owner: - 1226 -- 1227 1228 CREATE TABLE public."group" ( 947 1229 name text, 948 1230 gidnumber integer NOT NULL, 949 1231 CONSTRAINT group_name_not_empty CHECK ((name <> ''::text)) 950 1232 ) 951 INHERITS ( objects);952 953 954 -- 955 -- Name: group_attributes_base; Type: TABLE; Schema: public; Owner: - ; Tablespace:956 -- 957 958 CREATE TABLE group_attributes_base (1233 INHERITS (public.objects); 1234 1235 1236 -- 1237 -- Name: group_attributes_base; Type: TABLE; Schema: public; Owner: - 1238 -- 1239 1240 CREATE TABLE public.group_attributes_base ( 959 1241 ) 960 INHERITS ( attributes);961 962 963 -- 964 -- Name: user_attributes_base; Type: TABLE; Schema: public; Owner: - ; Tablespace:965 -- 966 967 CREATE TABLE user_attributes_base (1242 INHERITS (public.attributes); 1243 1244 1245 -- 1246 -- Name: user_attributes_base; Type: TABLE; Schema: public; Owner: - 1247 -- 1248 1249 CREATE TABLE public.user_attributes_base ( 968 1250 ) 969 INHERITS ( attributes);1251 INHERITS (public.attributes); 970 1252 971 1253 … … 974 1256 -- 975 1257 976 CREATE VIEW group_attributes AS 977 (((SELECT ("group".gidnumber)::text AS value, 'gidnumber' AS attr, "group".rev AS attr_key, "group".ikey AS okey FROM "group" UNION ALL SELECT "group".name AS value, 'name' AS attr, "group".rev AS attr_key, "group".ikey AS okey FROM "group") UNION ALL SELECT '1'::text AS value, 'exported' AS attr, "group".rev AS attr_key, "group".ikey AS okey FROM "group" WHERE ("group".exported = true)) UNION ALL SELECT group_attributes.value, group_attributes.attr, group_attributes.attr_key, group_attributes.okey FROM group_attributes_base group_attributes) UNION ALL SELECT "user".name AS value, 'memberUID' AS attr, user_attributes_base.attr_key, "group".ikey AS okey FROM ((user_attributes_base JOIN "user" ON (("user".ikey = user_attributes_base.okey))) JOIN "group" ON (("group".name = user_attributes_base.value))) WHERE (user_attributes_base.attr = 'contratType'::text); 978 979 980 -- 981 -- Name: group_attributes_list; Type: TABLE; Schema: public; Owner: -; Tablespace: 982 -- 983 984 CREATE TABLE group_attributes_list ( 1258 CREATE VIEW public.group_attributes AS 1259 SELECT ("group".gidnumber)::text AS value, 1260 'gidnumber'::text AS attr, 1261 "group".rev AS attr_key, 1262 "group".ikey AS okey 1263 FROM public."group" 1264 UNION ALL 1265 SELECT "group".name AS value, 1266 'name'::text AS attr, 1267 "group".rev AS attr_key, 1268 "group".ikey AS okey 1269 FROM public."group" 1270 UNION ALL 1271 SELECT '1'::text AS value, 1272 'exported'::text AS attr, 1273 "group".rev AS attr_key, 1274 "group".ikey AS okey 1275 FROM public."group" 1276 WHERE ("group".exported = true) 1277 UNION ALL 1278 SELECT group_attributes.value, 1279 group_attributes.attr, 1280 group_attributes.attr_key, 1281 group_attributes.okey 1282 FROM public.group_attributes_base group_attributes 1283 UNION ALL 1284 SELECT "user".name AS value, 1285 'memberUID'::text AS attr, 1286 user_attributes_base.attr_key, 1287 "group".ikey AS okey 1288 FROM ((public.user_attributes_base 1289 JOIN public."user" ON (("user".ikey = user_attributes_base.okey))) 1290 JOIN public."group" ON (("group".name = user_attributes_base.value))) 1291 WHERE (user_attributes_base.attr = 'contratType'::text); 1292 1293 1294 -- 1295 -- Name: group_attributes_list; Type: TABLE; Schema: public; Owner: - 1296 -- 1297 1298 CREATE TABLE public.group_attributes_list ( 985 1299 ) 986 INHERITS ( revisions,attributes_list);987 988 989 -- 990 -- Name: group_attributes_sutypes; Type: TABLE; Schema: public; Owner: - ; Tablespace:991 -- 992 993 CREATE TABLE group_attributes_sutypes (1300 INHERITS (public.revisions, public.attributes_list); 1301 1302 1303 -- 1304 -- Name: group_attributes_sutypes; Type: TABLE; Schema: public; Owner: - 1305 -- 1306 1307 CREATE TABLE public.group_attributes_sutypes ( 994 1308 ) 995 INHERITS ( group_attributes_base);996 997 998 -- 999 -- Name: group_attributes_users; Type: TABLE; Schema: public; Owner: - ; Tablespace:1000 -- 1001 1002 CREATE TABLE group_attributes_users (1309 INHERITS (public.group_attributes_base); 1310 1311 1312 -- 1313 -- Name: group_attributes_users; Type: TABLE; Schema: public; Owner: - 1314 -- 1315 1316 CREATE TABLE public.group_attributes_users ( 1003 1317 ) 1004 INHERITS (group_attributes_base); 1005 1006 1007 -- 1008 -- Name: nethost; Type: TABLE; Schema: public; Owner: -; Tablespace: 1009 -- 1010 1011 CREATE TABLE nethost ( 1318 INHERITS (public.group_attributes_base); 1319 1320 1321 -- 1322 -- Name: nethost; Type: TABLE; Schema: public; Owner: - 1323 -- 1324 1325 CREATE TABLE public.nethost ( 1326 expire timestamp with time zone 1012 1327 ) 1013 INHERITS ( objects);1014 1015 1016 -- 1017 -- Name: nethost_attributes; Type: TABLE; Schema: public; Owner: - ; Tablespace:1018 -- 1019 1020 CREATE TABLE nethost_attributes (1328 INHERITS (public.objects); 1329 1330 1331 -- 1332 -- Name: nethost_attributes; Type: TABLE; Schema: public; Owner: - 1333 -- 1334 1335 CREATE TABLE public.nethost_attributes ( 1021 1336 ) 1022 INHERITS (attributes); 1023 1024 1025 -- 1026 -- Name: nethost_attributes_ips; Type: TABLE; Schema: public; Owner: -; Tablespace: 1027 -- 1028 1029 CREATE TABLE nethost_attributes_ips ( 1337 INHERITS (public.attributes); 1338 1339 1340 -- 1341 -- Name: nethost_attributes_macs; Type: TABLE; Schema: public; Owner: - 1342 -- 1343 1344 CREATE TABLE public.nethost_attributes_macs ( 1345 CONSTRAINT nethost_valid_mac_address CHECK (((value)::macaddr <> '00:00:00:00:00:00'::macaddr)) 1030 1346 ) 1031 INHERITS (nethost_attributes); 1032 1033 1034 -- 1035 -- Name: nethost_attributes_list; Type: TABLE; Schema: public; Owner: -; Tablespace: 1036 -- 1037 1038 CREATE TABLE nethost_attributes_list ( 1039 ikey integer, 1347 INHERITS (public.nethost_attributes); 1348 1349 1350 -- 1351 -- Name: macentry; Type: VIEW; Schema: public; Owner: - 1352 -- 1353 1354 CREATE VIEW public.macentry AS 1355 SELECT nethost.rev, 1356 nethost.date, 1357 nethost."create", 1358 nethost.ikey, 1359 nethost.exported, 1360 replace(nethost_attributes_macs.value, ':'::text, ''::text) AS name, 1361 nethost.createdby, 1362 nethost.modifiedby, 1363 nethost.expire, 1364 nethost.oalias, 1365 nethost.nodelete, 1366 nethost.internobject, 1367 nethost.oaliascache 1368 FROM (public.nethost_attributes_macs 1369 JOIN public.nethost ON ((nethost.ikey = nethost_attributes_macs.okey))) 1370 WHERE (nethost_attributes_macs.attr = 'macaddr'::text); 1371 1372 1373 -- 1374 -- Name: macentry_attributes; Type: VIEW; Schema: public; Owner: - 1375 -- 1376 1377 CREATE VIEW public.macentry_attributes AS 1378 SELECT nethost_attributes.value, 1379 nethost_attributes.attr_key, 1380 nethost_attributes.okey, 1381 nethost_attributes.attr 1382 FROM public.nethost_attributes; 1383 1384 1385 -- 1386 -- Name: nethost_attributes_ips; Type: TABLE; Schema: public; Owner: - 1387 -- 1388 1389 CREATE TABLE public.nethost_attributes_ips ( 1390 ) 1391 INHERITS (public.nethost_attributes); 1392 1393 1394 -- 1395 -- Name: nethost_attributes_list; Type: TABLE; Schema: public; Owner: - 1396 -- 1397 1398 CREATE TABLE public.nethost_attributes_list ( 1399 ikey integer DEFAULT nextval('public.ikey_seq'::regclass), 1040 1400 canonical text, 1041 1401 description text 1042 1402 ) 1043 INHERITS ( revisions,attributes_list);1044 1045 1046 -- 1047 -- Name: nethost_attributes_ macs; Type: TABLE; Schema: public; Owner: -; Tablespace:1048 -- 1049 1050 CREATE TABLE nethost_attributes_macs (CONSTRAINT nethost_valid_mac_address CHECK (((value)::macaddr <> '00:00:00:00:00:00'::macaddr))1403 INHERITS (public.revisions, public.attributes_list); 1404 1405 1406 -- 1407 -- Name: nethost_attributes_nethosts; Type: TABLE; Schema: public; Owner: - 1408 -- 1409 1410 CREATE TABLE public.nethost_attributes_nethosts ( 1051 1411 ) 1052 INHERITS ( nethost_attributes);1053 1054 1055 -- 1056 -- Name: net host_attributes_users; Type: TABLE; Schema: public; Owner: -; Tablespace:1057 -- 1058 1059 CREATE TABLE nethost_attributes_users(1412 INHERITS (public.nethost_attributes); 1413 1414 1415 -- 1416 -- Name: netzone; Type: TABLE; Schema: public; Owner: - 1417 -- 1418 1419 CREATE TABLE public.netzone ( 1060 1420 ) 1061 INHERITS ( nethost_attributes);1062 1063 1064 -- 1065 -- Name: netzone ; Type: TABLE; Schema: public; Owner: -; Tablespace:1066 -- 1067 1068 CREATE TABLE netzone(1421 INHERITS (public.objects); 1422 1423 1424 -- 1425 -- Name: netzone_attributes; Type: TABLE; Schema: public; Owner: - 1426 -- 1427 1428 CREATE TABLE public.netzone_attributes ( 1069 1429 ) 1070 INHERITS (objects); 1071 1072 1073 -- 1074 -- Name: netzone_attributes; Type: TABLE; Schema: public; Owner: -; Tablespace: 1075 -- 1076 1077 CREATE TABLE netzone_attributes ( 1430 INHERITS (public.attributes); 1431 1432 1433 -- 1434 -- Name: nethost_attributes_netzone; Type: VIEW; Schema: public; Owner: - 1435 -- 1436 1437 CREATE VIEW public.nethost_attributes_netzone AS 1438 SELECT netzone.name AS value, 1439 'netZone'::text AS attr, 1440 nethost_attributes_ips.attr_key, 1441 nethost_attributes_ips.okey 1442 FROM public.nethost_attributes_ips, 1443 public.netzone_attributes, 1444 public.netzone 1445 WHERE ((netzone.ikey = netzone_attributes.okey) AND (netzone_attributes.attr = 'net'::text) AND ((nethost_attributes_ips.value)::inet <<= (netzone_attributes.value)::inet)) 1446 EXCEPT 1447 SELECT netzone.name AS value, 1448 'netZone'::text AS attr, 1449 nethost_attributes_ips.attr_key, 1450 nethost_attributes_ips.okey 1451 FROM public.nethost_attributes_ips, 1452 public.netzone_attributes, 1453 public.netzone 1454 WHERE ((netzone.ikey = netzone_attributes.okey) AND (netzone_attributes.attr = 'netExclude'::text) AND ((nethost_attributes_ips.value)::inet <<= (netzone_attributes.value)::inet)); 1455 1456 1457 -- 1458 -- Name: nethost_attributes_read; Type: VIEW; Schema: public; Owner: - 1459 -- 1460 1461 CREATE VIEW public.nethost_attributes_read AS 1462 SELECT nethost_attributes.value, 1463 nethost_attributes.attr, 1464 nethost_attributes.attr_key, 1465 nethost_attributes.okey 1466 FROM public.nethost_attributes 1467 UNION 1468 SELECT nethost_attributes_netzone.value, 1469 nethost_attributes_netzone.attr, 1470 nethost_attributes_netzone.attr_key, 1471 nethost_attributes_netzone.okey 1472 FROM public.nethost_attributes_netzone; 1473 1474 1475 -- 1476 -- Name: nethost_attributes_users; Type: TABLE; Schema: public; Owner: - 1477 -- 1478 1479 CREATE TABLE public.nethost_attributes_users ( 1078 1480 ) 1079 INHERITS ( attributes);1080 1081 1082 -- 1083 -- Name: netzone_attributes_list; Type: TABLE; Schema: public; Owner: - ; Tablespace:1084 -- 1085 1086 CREATE TABLE netzone_attributes_list (1087 ikey integer ,1481 INHERITS (public.nethost_attributes); 1482 1483 1484 -- 1485 -- Name: netzone_attributes_list; Type: TABLE; Schema: public; Owner: - 1486 -- 1487 1488 CREATE TABLE public.netzone_attributes_list ( 1489 ikey integer DEFAULT nextval('public.ikey_seq'::regclass), 1088 1490 canonical text, 1089 1491 description text 1090 1492 ) 1091 INHERITS ( revisions,attributes_list);1092 1093 1094 -- 1095 -- Name: netzone_attributes_netzone; Type: TABLE; Schema: public; Owner: - ; Tablespace:1096 -- 1097 1098 CREATE TABLE netzone_attributes_netzone (1493 INHERITS (public.revisions, public.attributes_list); 1494 1495 1496 -- 1497 -- Name: netzone_attributes_netzone; Type: TABLE; Schema: public; Owner: - 1498 -- 1499 1500 CREATE TABLE public.netzone_attributes_netzone ( 1099 1501 ) 1100 INHERITS ( netzone_attributes);1101 1102 1103 -- 1104 -- Name: netzone_attributes_site; Type: TABLE; Schema: public; Owner: - ; Tablespace:1105 -- 1106 1107 CREATE TABLE netzone_attributes_site (1502 INHERITS (public.netzone_attributes); 1503 1504 1505 -- 1506 -- Name: netzone_attributes_site; Type: TABLE; Schema: public; Owner: - 1507 -- 1508 1509 CREATE TABLE public.netzone_attributes_site ( 1108 1510 ) 1109 INHERITS (netzone_attributes); 1511 INHERITS (public.netzone_attributes); 1512 1513 1514 -- 1515 -- Name: objectslogs; Type: TABLE; Schema: public; Owner: - 1516 -- 1517 1518 CREATE TABLE public.objectslogs ( 1519 logkey bigint NOT NULL, 1520 ikey bigint NOT NULL, 1521 otype text NOT NULL, 1522 name text NOT NULL, 1523 changetype text NOT NULL, 1524 username text NOT NULL, 1525 message text NOT NULL, 1526 logdate timestamp with time zone DEFAULT now() NOT NULL, 1527 irev bigint 1528 ); 1529 1530 1531 -- 1532 -- Name: objectlogs_logkey_seq; Type: SEQUENCE; Schema: public; Owner: - 1533 -- 1534 1535 CREATE SEQUENCE public.objectlogs_logkey_seq 1536 START WITH 1 1537 INCREMENT BY 1 1538 NO MINVALUE 1539 NO MAXVALUE 1540 CACHE 1; 1541 1542 1543 -- 1544 -- Name: objectlogs_logkey_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - 1545 -- 1546 1547 ALTER SEQUENCE public.objectlogs_logkey_seq OWNED BY public.objectslogs.logkey; 1110 1548 1111 1549 … … 1114 1552 -- 1115 1553 1116 CREATE VIEW objects_table AS 1117 SELECT objects.rev, objects.date, objects."create", objects.ikey, pg_class.relname, objects.name, objects.exported FROM (objects JOIN pg_class ON ((objects.tableoid = pg_class.oid))); 1118 1119 1120 -- 1121 -- Name: revaliases; Type: TABLE; Schema: public; Owner: -; Tablespace: 1122 -- 1123 1124 CREATE TABLE revaliases ( 1125 "as" text NOT NULL 1554 CREATE VIEW public.objects_table AS 1555 SELECT objects.rev, 1556 objects.date, 1557 objects."create", 1558 objects.ikey, 1559 pg_class.relname, 1560 objects.name, 1561 objects.exported 1562 FROM (public.objects 1563 JOIN pg_class ON ((objects.tableoid = pg_class.oid))); 1564 1565 1566 -- 1567 -- Name: passwordreset; Type: TABLE; Schema: public; Owner: - 1568 -- 1569 1570 CREATE TABLE public.passwordreset ( 1571 "user" text NOT NULL, 1572 id text NOT NULL 1126 1573 ) 1127 INHERITS (objects); 1574 INHERITS (public.revisions); 1575 1576 1577 -- 1578 -- Name: request; Type: TABLE; Schema: public; Owner: - 1579 -- 1580 1581 CREATE TABLE public.request ( 1582 id integer NOT NULL, 1583 "create" timestamp with time zone DEFAULT now() NOT NULL, 1584 name text NOT NULL, 1585 object text, 1586 apply timestamp with time zone DEFAULT now() NOT NULL, 1587 done timestamp with time zone, 1588 "user" text, 1589 applied boolean, 1590 reason text, 1591 automated boolean DEFAULT false NOT NULL, 1592 objrev bigint 1593 ); 1594 1595 1596 -- 1597 -- Name: request_attributes; Type: TABLE; Schema: public; Owner: - 1598 -- 1599 1600 CREATE TABLE public.request_attributes ( 1601 reqid bigint, 1602 attribute text NOT NULL, 1603 value text 1604 ); 1605 1606 1607 -- 1608 -- Name: request_id_seq; Type: SEQUENCE; Schema: public; Owner: - 1609 -- 1610 1611 CREATE SEQUENCE public.request_id_seq 1612 START WITH 1 1613 INCREMENT BY 1 1614 NO MINVALUE 1615 NO MAXVALUE 1616 CACHE 1; 1617 1618 1619 -- 1620 -- Name: request_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - 1621 -- 1622 1623 ALTER SEQUENCE public.request_id_seq OWNED BY public.request.id; 1624 1625 1626 -- 1627 -- Name: revaliases; Type: TABLE; Schema: public; Owner: - 1628 -- 1629 1630 CREATE TABLE public.revaliases ( 1631 "as" text NOT NULL, 1632 description text 1633 ) 1634 INHERITS (public.objects); 1128 1635 1129 1636 … … 1132 1639 -- 1133 1640 1134 CREATE VIEW revisions_table AS 1135 SELECT revisions.rev, revisions.date, revisions."create", revisions.ikey, pg_class.relname FROM (revisions JOIN pg_class ON ((revisions.tableoid = pg_class.oid))); 1136 1137 1138 -- 1139 -- Name: settings; Type: TABLE; Schema: public; Owner: -; Tablespace: 1140 -- 1141 1142 CREATE TABLE settings ( 1641 CREATE VIEW public.revisions_table AS 1642 SELECT revisions.rev, 1643 revisions.date, 1644 revisions."create", 1645 revisions.ikey, 1646 pg_class.relname 1647 FROM (public.revisions 1648 JOIN pg_class ON ((revisions.tableoid = pg_class.oid))); 1649 1650 1651 -- 1652 -- Name: service; Type: TABLE; Schema: public; Owner: - 1653 -- 1654 1655 CREATE TABLE public.service ( 1656 start date, 1657 "end" date 1658 ) 1659 INHERITS (public.objects); 1660 1661 1662 -- 1663 -- Name: service_attributes; Type: TABLE; Schema: public; Owner: - 1664 -- 1665 1666 CREATE TABLE public.service_attributes ( 1667 ) 1668 INHERITS (public.attributes); 1669 1670 1671 -- 1672 -- Name: service_attributes_list; Type: TABLE; Schema: public; Owner: - 1673 -- 1674 1675 CREATE TABLE public.service_attributes_list ( 1676 ikey integer DEFAULT nextval('public.ikey_seq'::regclass), 1677 canonical text, 1678 description text 1679 ) 1680 INHERITS (public.revisions, public.attributes_list); 1681 1682 1683 -- 1684 -- Name: service_attributes_users; Type: TABLE; Schema: public; Owner: - 1685 -- 1686 1687 CREATE TABLE public.service_attributes_users ( 1688 ) 1689 INHERITS (public.service_attributes); 1690 1691 1692 -- 1693 -- Name: settings; Type: TABLE; Schema: public; Owner: - 1694 -- 1695 1696 CREATE TABLE public.settings ( 1143 1697 varname text NOT NULL, 1144 1698 val text 1145 1699 ) 1146 INHERITS ( revisions);1147 1148 1149 -- 1150 -- Name: site; Type: TABLE; Schema: public; Owner: - ; Tablespace:1151 -- 1152 1153 CREATE TABLE site (1700 INHERITS (public.revisions); 1701 1702 1703 -- 1704 -- Name: site; Type: TABLE; Schema: public; Owner: - 1705 -- 1706 1707 CREATE TABLE public.site ( 1154 1708 name text 1155 1709 ) 1156 INHERITS ( objects);1157 1158 1159 -- 1160 -- Name: site_attributes; Type: TABLE; Schema: public; Owner: - ; Tablespace:1161 -- 1162 1163 CREATE TABLE site_attributes (1710 INHERITS (public.objects); 1711 1712 1713 -- 1714 -- Name: site_attributes; Type: TABLE; Schema: public; Owner: - 1715 -- 1716 1717 CREATE TABLE public.site_attributes ( 1164 1718 ) 1165 INHERITS ( attributes);1166 1167 1168 -- 1169 -- Name: site_attributes_list; Type: TABLE; Schema: public; Owner: - ; Tablespace:1170 -- 1171 1172 CREATE TABLE site_attributes_list (1719 INHERITS (public.attributes); 1720 1721 1722 -- 1723 -- Name: site_attributes_list; Type: TABLE; Schema: public; Owner: - 1724 -- 1725 1726 CREATE TABLE public.site_attributes_list ( 1173 1727 ) 1174 INHERITS (revisions, attributes_list); 1175 1176 1177 -- 1178 -- Name: su_type; Type: TABLE; Schema: public; Owner: -; Tablespace: 1179 -- 1180 1181 CREATE TABLE su_type ( 1728 INHERITS (public.revisions, public.attributes_list); 1729 1730 1731 -- 1732 -- Name: stat; Type: TABLE; Schema: public; Owner: - 1733 -- 1734 1735 CREATE TABLE public.stat ( 1736 name text 1737 ) 1738 INHERITS (public.objects); 1739 1740 1741 -- 1742 -- Name: stat_attributes; Type: TABLE; Schema: public; Owner: - 1743 -- 1744 1745 CREATE TABLE public.stat_attributes ( 1746 ) 1747 INHERITS (public.attributes); 1748 1749 1750 -- 1751 -- Name: stat_attributes_list; Type: TABLE; Schema: public; Owner: - 1752 -- 1753 1754 CREATE TABLE public.stat_attributes_list ( 1755 ) 1756 INHERITS (public.revisions, public.attributes_list); 1757 1758 1759 -- 1760 -- Name: statsentry; Type: TABLE; Schema: public; Owner: - 1761 -- 1762 1763 CREATE TABLE public.statsentry ( 1764 okey integer NOT NULL, 1765 id bigint DEFAULT nextval('public.revisions_rev_seq'::regclass) NOT NULL, 1766 tstamp timestamp with time zone DEFAULT now() NOT NULL 1767 ); 1768 1769 1770 -- 1771 -- Name: statvalues; Type: TABLE; Schema: public; Owner: - 1772 -- 1773 1774 CREATE TABLE public.statvalues ( 1775 sid bigint NOT NULL, 1776 value text NOT NULL, 1777 count bigint NOT NULL 1778 ); 1779 1780 1781 -- 1782 -- Name: su_type; Type: TABLE; Schema: public; Owner: - 1783 -- 1784 1785 CREATE TABLE public.su_type ( 1182 1786 name text, 1183 1787 description text 1184 1788 ) 1185 INHERITS ( objects);1789 INHERITS (public.objects); 1186 1790 1187 1791 … … 1190 1794 -- 1191 1795 1192 CREATE VIEW user_attributes AS 1193 (((((((((((SELECT ("user".uidnumber)::text AS value, 'uidnumber' AS attr, "user".rev AS attr_key, "user".ikey AS okey FROM "user" UNION ALL SELECT ("user".gidnumber)::text AS value, 'gidnumber' AS attr, "user".rev AS attr_key, "user".ikey AS okey FROM "user") UNION ALL SELECT "user".name AS value, 'name' AS attr, "user".rev AS attr_key, "user".ikey AS okey FROM "user") UNION ALL SELECT ("user".expire)::text AS value, 'expire' AS attr, "user".rev AS attr_key, "user".ikey AS okey FROM "user" WHERE ("user".expire IS NOT NULL)) UNION ALL SELECT '1'::text AS value, 'exported' AS attr, "user".rev AS attr_key, "user".ikey AS okey FROM "user" WHERE ("user".exported = true)) UNION ALL SELECT address_attributes_site.value, 'allsite' AS attr, "user".rev AS attr_key, "user".ikey AS okey FROM (("user" JOIN address ON ((address."user" = "user".name))) JOIN address_attributes_site ON ((address_attributes_site.okey = address.ikey))) WHERE ((address_attributes_site.attr = 'site'::text) AND (address.exported = true))) UNION ALL SELECT "group".name AS value, 'memberOf' AS attr, "user".rev AS attr_key, "user".ikey AS okey FROM (("user" JOIN group_attributes ON ((group_attributes.value = "user".name))) JOIN "group" ON ((group_attributes.okey = "group".ikey))) WHERE (group_attributes.attr = 'memberUID'::text)) UNION ALL SELECT user_attributes.value, user_attributes.attr, user_attributes.attr_key, user_attributes.okey FROM user_attributes_base user_attributes) UNION ALL SELECT "group".name AS value, 'departments' AS attr, "user".rev AS attr_key, "user".ikey AS okey FROM ((("group" JOIN group_attributes_sutypes ON (("group".ikey = group_attributes_sutypes.okey))) JOIN group_attributes_users ON ((("group".ikey = group_attributes_users.okey) AND (group_attributes_users.attr = 'memberUID'::text)))) JOIN "user" ON (("user".name = group_attributes_users.value))) WHERE ((group_attributes_sutypes.value = 'dpmt'::text) AND (group_attributes_sutypes.attr = 'sutype'::text))) UNION ALL SELECT "group".name AS value, 'cells' AS attr, "user".rev AS attr_key, "user".ikey AS okey FROM ((("group" JOIN group_attributes_sutypes ON (("group".ikey = group_attributes_sutypes.okey))) JOIN group_attributes_users ON ((("group".ikey = group_attributes_users.okey) AND (group_attributes_users.attr = 'memberUID'::text)))) JOIN "user" ON (("user".name = group_attributes_users.value))) WHERE ((group_attributes_sutypes.value = 'cell'::text) AND (group_attributes_sutypes.attr = 'sutype'::text))) UNION ALL SELECT "group".name AS value, 'managedObjects' AS attr, "user".rev AS attr_key, "user".ikey AS okey FROM (("user" JOIN group_attributes ON ((group_attributes.value = "user".name))) JOIN "group" ON ((group_attributes.okey = "group".ikey))) WHERE (group_attributes.attr = 'managedBy'::text)) UNION ALL SELECT (justify_interval((now() - "user".expire)))::text AS value, 'expired' AS attr, "user".rev AS attr_key, "user".ikey AS okey FROM "user" WHERE ("user".expire <= now())) UNION ALL SELECT (1)::text AS value, 'active' AS attr, "user".rev AS attr_key, "user".ikey AS okey FROM "user" WHERE ((("user".expire IS NULL) OR ("user".expire >= now())) AND ("user".exported = true)); 1194 1195 1196 -- 1197 -- Name: user_attributes_groups; Type: TABLE; Schema: public; Owner: -; Tablespace: 1198 -- 1199 1200 CREATE TABLE user_attributes_groups ( 1796 CREATE VIEW public.user_attributes AS 1797 SELECT ("user".uidnumber)::text AS value, 1798 'uidnumber'::text AS attr, 1799 "user".rev AS attr_key, 1800 "user".ikey AS okey 1801 FROM public."user" 1802 UNION ALL 1803 SELECT ("user".gidnumber)::text AS value, 1804 'gidnumber'::text AS attr, 1805 "user".rev AS attr_key, 1806 "user".ikey AS okey 1807 FROM public."user" 1808 UNION ALL 1809 SELECT "user".name AS value, 1810 'name'::text AS attr, 1811 "user".rev AS attr_key, 1812 "user".ikey AS okey 1813 FROM public."user" 1814 UNION ALL 1815 SELECT ("user".expire)::text AS value, 1816 'expire'::text AS attr, 1817 "user".rev AS attr_key, 1818 "user".ikey AS okey 1819 FROM public."user" 1820 WHERE ("user".expire IS NOT NULL) 1821 UNION ALL 1822 SELECT '1'::text AS value, 1823 'exported'::text AS attr, 1824 "user".rev AS attr_key, 1825 "user".ikey AS okey 1826 FROM public."user" 1827 WHERE ("user".exported = true) 1828 UNION ALL 1829 SELECT address_attributes_site.value, 1830 'allsite'::text AS attr, 1831 "user".rev AS attr_key, 1832 "user".ikey AS okey 1833 FROM ((public."user" 1834 JOIN public.address ON ((address."user" = "user".name))) 1835 JOIN public.address_attributes_site ON ((address_attributes_site.okey = address.ikey))) 1836 WHERE ((address_attributes_site.attr = 'site'::text) AND (address.exported = true)) 1837 UNION ALL 1838 SELECT "group".name AS value, 1839 'memberOf'::text AS attr, 1840 "user".rev AS attr_key, 1841 "user".ikey AS okey 1842 FROM ((public."user" 1843 JOIN public.group_attributes ON ((group_attributes.value = "user".name))) 1844 JOIN public."group" ON ((group_attributes.okey = "group".ikey))) 1845 WHERE (group_attributes.attr = 'memberUID'::text) 1846 UNION ALL 1847 SELECT user_attributes.value, 1848 user_attributes.attr, 1849 user_attributes.attr_key, 1850 user_attributes.okey 1851 FROM public.user_attributes_base user_attributes 1852 UNION ALL 1853 SELECT "group".name AS value, 1854 'departments'::text AS attr, 1855 "user".rev AS attr_key, 1856 "user".ikey AS okey 1857 FROM (((public."group" 1858 JOIN public.group_attributes_sutypes ON (("group".ikey = group_attributes_sutypes.okey))) 1859 JOIN public.group_attributes_users ON ((("group".ikey = group_attributes_users.okey) AND (group_attributes_users.attr = 'memberUID'::text)))) 1860 JOIN public."user" ON (("user".name = group_attributes_users.value))) 1861 WHERE ((group_attributes_sutypes.value = 'dpmt'::text) AND (group_attributes_sutypes.attr = 'sutype'::text)) 1862 UNION ALL 1863 SELECT "group".name AS value, 1864 'cells'::text AS attr, 1865 "user".rev AS attr_key, 1866 "user".ikey AS okey 1867 FROM (((public."group" 1868 JOIN public.group_attributes_sutypes ON (("group".ikey = group_attributes_sutypes.okey))) 1869 JOIN public.group_attributes_users ON ((("group".ikey = group_attributes_users.okey) AND (group_attributes_users.attr = 'memberUID'::text)))) 1870 JOIN public."user" ON (("user".name = group_attributes_users.value))) 1871 WHERE ((group_attributes_sutypes.value = 'cell'::text) AND (group_attributes_sutypes.attr = 'sutype'::text)) 1872 UNION ALL 1873 SELECT "group".name AS value, 1874 'managedObjects'::text AS attr, 1875 "user".rev AS attr_key, 1876 "user".ikey AS okey 1877 FROM ((public."user" 1878 JOIN public.group_attributes ON ((group_attributes.value = "user".name))) 1879 JOIN public."group" ON ((group_attributes.okey = "group".ikey))) 1880 WHERE (group_attributes.attr = 'managedBy'::text) 1881 UNION ALL 1882 SELECT (justify_interval((now() - "user".expire)))::text AS value, 1883 'expired'::text AS attr, 1884 "user".rev AS attr_key, 1885 "user".ikey AS okey 1886 FROM public."user" 1887 WHERE ("user".expire <= now()) 1888 UNION ALL 1889 SELECT (1)::text AS value, 1890 'active'::text AS attr, 1891 "user".rev AS attr_key, 1892 "user".ikey AS okey 1893 FROM public."user" 1894 WHERE ((("user".expire IS NULL) OR ("user".expire >= now())) AND ("user".exported = true)) 1895 UNION ALL 1896 SELECT (0)::text AS value, 1897 'active'::text AS attr, 1898 "user".rev AS attr_key, 1899 "user".ikey AS okey 1900 FROM public."user" 1901 WHERE ((("user".expire IS NOT NULL) AND ("user".expire <= now())) OR ("user".exported = false)); 1902 1903 1904 -- 1905 -- Name: user_attributes_groups; Type: TABLE; Schema: public; Owner: - 1906 -- 1907 1908 CREATE TABLE public.user_attributes_groups ( 1201 1909 ) 1202 INHERITS ( user_attributes_base);1203 1204 1205 -- 1206 -- Name: user_attributes_list; Type: TABLE; Schema: public; Owner: - ; Tablespace:1207 -- 1208 1209 CREATE TABLE user_attributes_list (1910 INHERITS (public.user_attributes_base); 1911 1912 1913 -- 1914 -- Name: user_attributes_list; Type: TABLE; Schema: public; Owner: - 1915 -- 1916 1917 CREATE TABLE public.user_attributes_list ( 1210 1918 ) 1211 INHERITS ( revisions,attributes_list);1212 1213 1214 -- 1215 -- Name: user_attributes_site; Type: TABLE; Schema: public; Owner: - ; Tablespace:1216 -- 1217 1218 CREATE TABLE user_attributes_site (1919 INHERITS (public.revisions, public.attributes_list); 1920 1921 1922 -- 1923 -- Name: user_attributes_site; Type: TABLE; Schema: public; Owner: - 1924 -- 1925 1926 CREATE TABLE public.user_attributes_site ( 1219 1927 ) 1220 INHERITS ( user_attributes_base);1221 1222 1223 -- 1224 -- Name: user_attributes_users; Type: TABLE; Schema: public; Owner: - ; Tablespace:1225 -- 1226 1227 CREATE TABLE user_attributes_users (1928 INHERITS (public.user_attributes_base); 1929 1930 1931 -- 1932 -- Name: user_attributes_users; Type: TABLE; Schema: public; Owner: - 1933 -- 1934 1935 CREATE TABLE public.user_attributes_users ( 1228 1936 ) 1229 INHERITS (user_attributes_base); 1230 1231 1232 -- 1233 -- Name: attr_key; Type: DEFAULT; Schema: public; Owner: - 1234 -- 1235 1236 ALTER TABLE address_attributes ALTER COLUMN attr_key SET DEFAULT nextval('attributes_attr_key_seq'::regclass); 1237 1238 1239 -- 1240 -- Name: attr_key; Type: DEFAULT; Schema: public; Owner: - 1241 -- 1242 1243 ALTER TABLE attributes ALTER COLUMN attr_key SET DEFAULT nextval('attributes_attr_key_seq'::regclass); 1244 1245 1246 -- 1247 -- Name: attr_key; Type: DEFAULT; Schema: public; Owner: - 1248 -- 1249 1250 ALTER TABLE group_attributes ALTER COLUMN attr_key SET DEFAULT nextval('attributes_attr_key_seq'::regclass); 1251 1252 1253 -- 1254 -- Name: rev; Type: DEFAULT; Schema: public; Owner: - 1255 -- 1256 1257 ALTER TABLE revisions ALTER COLUMN rev SET DEFAULT nextval('revisions_rev_seq'::regclass); 1258 1259 1260 -- 1261 -- Name: attr_key; Type: DEFAULT; Schema: public; Owner: - 1262 -- 1263 1264 ALTER TABLE user_attributes ALTER COLUMN attr_key SET DEFAULT nextval('attributes_attr_key_seq'::regclass); 1265 1266 1267 -- 1268 -- Name: acccreq_attributes_list_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 1269 -- 1270 1271 ALTER TABLE ONLY accreq_attributes_list 1937 INHERITS (public.user_attributes_base); 1938 1939 1940 -- 1941 -- Name: accreq rev; Type: DEFAULT; Schema: public; Owner: - 1942 -- 1943 1944 ALTER TABLE ONLY public.accreq ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 1945 1946 1947 -- 1948 -- Name: accreq date; Type: DEFAULT; Schema: public; Owner: - 1949 -- 1950 1951 ALTER TABLE ONLY public.accreq ALTER COLUMN date SET DEFAULT now(); 1952 1953 1954 -- 1955 -- Name: accreq create; Type: DEFAULT; Schema: public; Owner: - 1956 -- 1957 1958 ALTER TABLE ONLY public.accreq ALTER COLUMN "create" SET DEFAULT now(); 1959 1960 1961 -- 1962 -- Name: accreq ikey; Type: DEFAULT; Schema: public; Owner: - 1963 -- 1964 1965 ALTER TABLE ONLY public.accreq ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 1966 1967 1968 -- 1969 -- Name: accreq exported; Type: DEFAULT; Schema: public; Owner: - 1970 -- 1971 1972 ALTER TABLE ONLY public.accreq ALTER COLUMN exported SET DEFAULT true; 1973 1974 1975 -- 1976 -- Name: accreq internobject; Type: DEFAULT; Schema: public; Owner: - 1977 -- 1978 1979 ALTER TABLE ONLY public.accreq ALTER COLUMN internobject SET DEFAULT false; 1980 1981 1982 -- 1983 -- Name: accreq nodelete; Type: DEFAULT; Schema: public; Owner: - 1984 -- 1985 1986 ALTER TABLE ONLY public.accreq ALTER COLUMN nodelete SET DEFAULT false; 1987 1988 1989 -- 1990 -- Name: accreq_attributes attr_key; Type: DEFAULT; Schema: public; Owner: - 1991 -- 1992 1993 ALTER TABLE ONLY public.accreq_attributes ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 1994 1995 1996 -- 1997 -- Name: address rev; Type: DEFAULT; Schema: public; Owner: - 1998 -- 1999 2000 ALTER TABLE ONLY public.address ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2001 2002 2003 -- 2004 -- Name: address date; Type: DEFAULT; Schema: public; Owner: - 2005 -- 2006 2007 ALTER TABLE ONLY public.address ALTER COLUMN date SET DEFAULT now(); 2008 2009 2010 -- 2011 -- Name: address create; Type: DEFAULT; Schema: public; Owner: - 2012 -- 2013 2014 ALTER TABLE ONLY public.address ALTER COLUMN "create" SET DEFAULT now(); 2015 2016 2017 -- 2018 -- Name: address ikey; Type: DEFAULT; Schema: public; Owner: - 2019 -- 2020 2021 ALTER TABLE ONLY public.address ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2022 2023 2024 -- 2025 -- Name: address exported; Type: DEFAULT; Schema: public; Owner: - 2026 -- 2027 2028 ALTER TABLE ONLY public.address ALTER COLUMN exported SET DEFAULT true; 2029 2030 2031 -- 2032 -- Name: address internobject; Type: DEFAULT; Schema: public; Owner: - 2033 -- 2034 2035 ALTER TABLE ONLY public.address ALTER COLUMN internobject SET DEFAULT false; 2036 2037 2038 -- 2039 -- Name: address nodelete; Type: DEFAULT; Schema: public; Owner: - 2040 -- 2041 2042 ALTER TABLE ONLY public.address ALTER COLUMN nodelete SET DEFAULT false; 2043 2044 2045 -- 2046 -- Name: address_attributes attr_key; Type: DEFAULT; Schema: public; Owner: - 2047 -- 2048 2049 ALTER TABLE ONLY public.address_attributes ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2050 2051 2052 -- 2053 -- Name: address_attributes_base attr_key; Type: DEFAULT; Schema: public; Owner: - 2054 -- 2055 2056 ALTER TABLE ONLY public.address_attributes_base ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2057 2058 2059 -- 2060 -- Name: address_attributes_list ikey; Type: DEFAULT; Schema: public; Owner: - 2061 -- 2062 2063 ALTER TABLE ONLY public.address_attributes_list ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2064 2065 2066 -- 2067 -- Name: address_attributes_list_site ikey; Type: DEFAULT; Schema: public; Owner: - 2068 -- 2069 2070 ALTER TABLE ONLY public.address_attributes_list_site ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2071 2072 2073 -- 2074 -- Name: address_attributes_list_site rev; Type: DEFAULT; Schema: public; Owner: - 2075 -- 2076 2077 ALTER TABLE ONLY public.address_attributes_list_site ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2078 2079 2080 -- 2081 -- Name: address_attributes_list_site date; Type: DEFAULT; Schema: public; Owner: - 2082 -- 2083 2084 ALTER TABLE ONLY public.address_attributes_list_site ALTER COLUMN date SET DEFAULT now(); 2085 2086 2087 -- 2088 -- Name: address_attributes_list_site create; Type: DEFAULT; Schema: public; Owner: - 2089 -- 2090 2091 ALTER TABLE ONLY public.address_attributes_list_site ALTER COLUMN "create" SET DEFAULT now(); 2092 2093 2094 -- 2095 -- Name: address_attributes_site attr_key; Type: DEFAULT; Schema: public; Owner: - 2096 -- 2097 2098 ALTER TABLE ONLY public.address_attributes_site ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2099 2100 2101 -- 2102 -- Name: aliases rev; Type: DEFAULT; Schema: public; Owner: - 2103 -- 2104 2105 ALTER TABLE ONLY public.aliases ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2106 2107 2108 -- 2109 -- Name: aliases date; Type: DEFAULT; Schema: public; Owner: - 2110 -- 2111 2112 ALTER TABLE ONLY public.aliases ALTER COLUMN date SET DEFAULT now(); 2113 2114 2115 -- 2116 -- Name: aliases create; Type: DEFAULT; Schema: public; Owner: - 2117 -- 2118 2119 ALTER TABLE ONLY public.aliases ALTER COLUMN "create" SET DEFAULT now(); 2120 2121 2122 -- 2123 -- Name: aliases ikey; Type: DEFAULT; Schema: public; Owner: - 2124 -- 2125 2126 ALTER TABLE ONLY public.aliases ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2127 2128 2129 -- 2130 -- Name: aliases exported; Type: DEFAULT; Schema: public; Owner: - 2131 -- 2132 2133 ALTER TABLE ONLY public.aliases ALTER COLUMN exported SET DEFAULT true; 2134 2135 2136 -- 2137 -- Name: aliases internobject; Type: DEFAULT; Schema: public; Owner: - 2138 -- 2139 2140 ALTER TABLE ONLY public.aliases ALTER COLUMN internobject SET DEFAULT false; 2141 2142 2143 -- 2144 -- Name: aliases nodelete; Type: DEFAULT; Schema: public; Owner: - 2145 -- 2146 2147 ALTER TABLE ONLY public.aliases ALTER COLUMN nodelete SET DEFAULT false; 2148 2149 2150 -- 2151 -- Name: aliases_attributes_base attr_key; Type: DEFAULT; Schema: public; Owner: - 2152 -- 2153 2154 ALTER TABLE ONLY public.aliases_attributes_base ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2155 2156 2157 -- 2158 -- Name: aliases_attributes_list rev; Type: DEFAULT; Schema: public; Owner: - 2159 -- 2160 2161 ALTER TABLE ONLY public.aliases_attributes_list ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2162 2163 2164 -- 2165 -- Name: aliases_attributes_list date; Type: DEFAULT; Schema: public; Owner: - 2166 -- 2167 2168 ALTER TABLE ONLY public.aliases_attributes_list ALTER COLUMN date SET DEFAULT now(); 2169 2170 2171 -- 2172 -- Name: aliases_attributes_list create; Type: DEFAULT; Schema: public; Owner: - 2173 -- 2174 2175 ALTER TABLE ONLY public.aliases_attributes_list ALTER COLUMN "create" SET DEFAULT now(); 2176 2177 2178 -- 2179 -- Name: attributes attr_key; Type: DEFAULT; Schema: public; Owner: - 2180 -- 2181 2182 ALTER TABLE ONLY public.attributes ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2183 2184 2185 -- 2186 -- Name: attributes_values rev; Type: DEFAULT; Schema: public; Owner: - 2187 -- 2188 2189 ALTER TABLE ONLY public.attributes_values ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2190 2191 2192 -- 2193 -- Name: attributes_values date; Type: DEFAULT; Schema: public; Owner: - 2194 -- 2195 2196 ALTER TABLE ONLY public.attributes_values ALTER COLUMN date SET DEFAULT now(); 2197 2198 2199 -- 2200 -- Name: attributes_values create; Type: DEFAULT; Schema: public; Owner: - 2201 -- 2202 2203 ALTER TABLE ONLY public.attributes_values ALTER COLUMN "create" SET DEFAULT now(); 2204 2205 2206 -- 2207 -- Name: attributes_values ikey; Type: DEFAULT; Schema: public; Owner: - 2208 -- 2209 2210 ALTER TABLE ONLY public.attributes_values ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2211 2212 2213 -- 2214 -- Name: employment rev; Type: DEFAULT; Schema: public; Owner: - 2215 -- 2216 2217 ALTER TABLE ONLY public.employment ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2218 2219 2220 -- 2221 -- Name: employment date; Type: DEFAULT; Schema: public; Owner: - 2222 -- 2223 2224 ALTER TABLE ONLY public.employment ALTER COLUMN date SET DEFAULT now(); 2225 2226 2227 -- 2228 -- Name: employment create; Type: DEFAULT; Schema: public; Owner: - 2229 -- 2230 2231 ALTER TABLE ONLY public.employment ALTER COLUMN "create" SET DEFAULT now(); 2232 2233 2234 -- 2235 -- Name: employment ikey; Type: DEFAULT; Schema: public; Owner: - 2236 -- 2237 2238 ALTER TABLE ONLY public.employment ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2239 2240 2241 -- 2242 -- Name: employment exported; Type: DEFAULT; Schema: public; Owner: - 2243 -- 2244 2245 ALTER TABLE ONLY public.employment ALTER COLUMN exported SET DEFAULT true; 2246 2247 2248 -- 2249 -- Name: employment internobject; Type: DEFAULT; Schema: public; Owner: - 2250 -- 2251 2252 ALTER TABLE ONLY public.employment ALTER COLUMN internobject SET DEFAULT false; 2253 2254 2255 -- 2256 -- Name: employment nodelete; Type: DEFAULT; Schema: public; Owner: - 2257 -- 2258 2259 ALTER TABLE ONLY public.employment ALTER COLUMN nodelete SET DEFAULT false; 2260 2261 2262 -- 2263 -- Name: employment_attributes attr_key; Type: DEFAULT; Schema: public; Owner: - 2264 -- 2265 2266 ALTER TABLE ONLY public.employment_attributes ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2267 2268 2269 -- 2270 -- Name: employment_attributes_list rev; Type: DEFAULT; Schema: public; Owner: - 2271 -- 2272 2273 ALTER TABLE ONLY public.employment_attributes_list ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2274 2275 2276 -- 2277 -- Name: employment_attributes_list date; Type: DEFAULT; Schema: public; Owner: - 2278 -- 2279 2280 ALTER TABLE ONLY public.employment_attributes_list ALTER COLUMN date SET DEFAULT now(); 2281 2282 2283 -- 2284 -- Name: employment_attributes_list create; Type: DEFAULT; Schema: public; Owner: - 2285 -- 2286 2287 ALTER TABLE ONLY public.employment_attributes_list ALTER COLUMN "create" SET DEFAULT now(); 2288 2289 2290 -- 2291 -- Name: employment_attributes_list ikey; Type: DEFAULT; Schema: public; Owner: - 2292 -- 2293 2294 ALTER TABLE ONLY public.employment_attributes_list ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2295 2296 2297 -- 2298 -- Name: group rev; Type: DEFAULT; Schema: public; Owner: - 2299 -- 2300 2301 ALTER TABLE ONLY public."group" ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2302 2303 2304 -- 2305 -- Name: group date; Type: DEFAULT; Schema: public; Owner: - 2306 -- 2307 2308 ALTER TABLE ONLY public."group" ALTER COLUMN date SET DEFAULT now(); 2309 2310 2311 -- 2312 -- Name: group create; Type: DEFAULT; Schema: public; Owner: - 2313 -- 2314 2315 ALTER TABLE ONLY public."group" ALTER COLUMN "create" SET DEFAULT now(); 2316 2317 2318 -- 2319 -- Name: group ikey; Type: DEFAULT; Schema: public; Owner: - 2320 -- 2321 2322 ALTER TABLE ONLY public."group" ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2323 2324 2325 -- 2326 -- Name: group exported; Type: DEFAULT; Schema: public; Owner: - 2327 -- 2328 2329 ALTER TABLE ONLY public."group" ALTER COLUMN exported SET DEFAULT true; 2330 2331 2332 -- 2333 -- Name: group internobject; Type: DEFAULT; Schema: public; Owner: - 2334 -- 2335 2336 ALTER TABLE ONLY public."group" ALTER COLUMN internobject SET DEFAULT false; 2337 2338 2339 -- 2340 -- Name: group nodelete; Type: DEFAULT; Schema: public; Owner: - 2341 -- 2342 2343 ALTER TABLE ONLY public."group" ALTER COLUMN nodelete SET DEFAULT false; 2344 2345 2346 -- 2347 -- Name: group_attributes attr_key; Type: DEFAULT; Schema: public; Owner: - 2348 -- 2349 2350 ALTER TABLE ONLY public.group_attributes ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2351 2352 2353 -- 2354 -- Name: group_attributes_base attr_key; Type: DEFAULT; Schema: public; Owner: - 2355 -- 2356 2357 ALTER TABLE ONLY public.group_attributes_base ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2358 2359 2360 -- 2361 -- Name: group_attributes_list rev; Type: DEFAULT; Schema: public; Owner: - 2362 -- 2363 2364 ALTER TABLE ONLY public.group_attributes_list ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2365 2366 2367 -- 2368 -- Name: group_attributes_list date; Type: DEFAULT; Schema: public; Owner: - 2369 -- 2370 2371 ALTER TABLE ONLY public.group_attributes_list ALTER COLUMN date SET DEFAULT now(); 2372 2373 2374 -- 2375 -- Name: group_attributes_list create; Type: DEFAULT; Schema: public; Owner: - 2376 -- 2377 2378 ALTER TABLE ONLY public.group_attributes_list ALTER COLUMN "create" SET DEFAULT now(); 2379 2380 2381 -- 2382 -- Name: group_attributes_list ikey; Type: DEFAULT; Schema: public; Owner: - 2383 -- 2384 2385 ALTER TABLE ONLY public.group_attributes_list ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2386 2387 2388 -- 2389 -- Name: group_attributes_sutypes attr_key; Type: DEFAULT; Schema: public; Owner: - 2390 -- 2391 2392 ALTER TABLE ONLY public.group_attributes_sutypes ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2393 2394 2395 -- 2396 -- Name: group_attributes_users attr_key; Type: DEFAULT; Schema: public; Owner: - 2397 -- 2398 2399 ALTER TABLE ONLY public.group_attributes_users ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2400 2401 2402 -- 2403 -- Name: nethost rev; Type: DEFAULT; Schema: public; Owner: - 2404 -- 2405 2406 ALTER TABLE ONLY public.nethost ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2407 2408 2409 -- 2410 -- Name: nethost date; Type: DEFAULT; Schema: public; Owner: - 2411 -- 2412 2413 ALTER TABLE ONLY public.nethost ALTER COLUMN date SET DEFAULT now(); 2414 2415 2416 -- 2417 -- Name: nethost create; Type: DEFAULT; Schema: public; Owner: - 2418 -- 2419 2420 ALTER TABLE ONLY public.nethost ALTER COLUMN "create" SET DEFAULT now(); 2421 2422 2423 -- 2424 -- Name: nethost ikey; Type: DEFAULT; Schema: public; Owner: - 2425 -- 2426 2427 ALTER TABLE ONLY public.nethost ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2428 2429 2430 -- 2431 -- Name: nethost exported; Type: DEFAULT; Schema: public; Owner: - 2432 -- 2433 2434 ALTER TABLE ONLY public.nethost ALTER COLUMN exported SET DEFAULT true; 2435 2436 2437 -- 2438 -- Name: nethost internobject; Type: DEFAULT; Schema: public; Owner: - 2439 -- 2440 2441 ALTER TABLE ONLY public.nethost ALTER COLUMN internobject SET DEFAULT false; 2442 2443 2444 -- 2445 -- Name: nethost nodelete; Type: DEFAULT; Schema: public; Owner: - 2446 -- 2447 2448 ALTER TABLE ONLY public.nethost ALTER COLUMN nodelete SET DEFAULT false; 2449 2450 2451 -- 2452 -- Name: nethost_attributes attr_key; Type: DEFAULT; Schema: public; Owner: - 2453 -- 2454 2455 ALTER TABLE ONLY public.nethost_attributes ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2456 2457 2458 -- 2459 -- Name: nethost_attributes_ips attr_key; Type: DEFAULT; Schema: public; Owner: - 2460 -- 2461 2462 ALTER TABLE ONLY public.nethost_attributes_ips ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2463 2464 2465 -- 2466 -- Name: nethost_attributes_list rev; Type: DEFAULT; Schema: public; Owner: - 2467 -- 2468 2469 ALTER TABLE ONLY public.nethost_attributes_list ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2470 2471 2472 -- 2473 -- Name: nethost_attributes_list date; Type: DEFAULT; Schema: public; Owner: - 2474 -- 2475 2476 ALTER TABLE ONLY public.nethost_attributes_list ALTER COLUMN date SET DEFAULT now(); 2477 2478 2479 -- 2480 -- Name: nethost_attributes_list create; Type: DEFAULT; Schema: public; Owner: - 2481 -- 2482 2483 ALTER TABLE ONLY public.nethost_attributes_list ALTER COLUMN "create" SET DEFAULT now(); 2484 2485 2486 -- 2487 -- Name: nethost_attributes_macs attr_key; Type: DEFAULT; Schema: public; Owner: - 2488 -- 2489 2490 ALTER TABLE ONLY public.nethost_attributes_macs ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2491 2492 2493 -- 2494 -- Name: nethost_attributes_nethosts attr_key; Type: DEFAULT; Schema: public; Owner: - 2495 -- 2496 2497 ALTER TABLE ONLY public.nethost_attributes_nethosts ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2498 2499 2500 -- 2501 -- Name: nethost_attributes_users attr_key; Type: DEFAULT; Schema: public; Owner: - 2502 -- 2503 2504 ALTER TABLE ONLY public.nethost_attributes_users ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2505 2506 2507 -- 2508 -- Name: netzone rev; Type: DEFAULT; Schema: public; Owner: - 2509 -- 2510 2511 ALTER TABLE ONLY public.netzone ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2512 2513 2514 -- 2515 -- Name: netzone date; Type: DEFAULT; Schema: public; Owner: - 2516 -- 2517 2518 ALTER TABLE ONLY public.netzone ALTER COLUMN date SET DEFAULT now(); 2519 2520 2521 -- 2522 -- Name: netzone create; Type: DEFAULT; Schema: public; Owner: - 2523 -- 2524 2525 ALTER TABLE ONLY public.netzone ALTER COLUMN "create" SET DEFAULT now(); 2526 2527 2528 -- 2529 -- Name: netzone ikey; Type: DEFAULT; Schema: public; Owner: - 2530 -- 2531 2532 ALTER TABLE ONLY public.netzone ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2533 2534 2535 -- 2536 -- Name: netzone exported; Type: DEFAULT; Schema: public; Owner: - 2537 -- 2538 2539 ALTER TABLE ONLY public.netzone ALTER COLUMN exported SET DEFAULT true; 2540 2541 2542 -- 2543 -- Name: netzone internobject; Type: DEFAULT; Schema: public; Owner: - 2544 -- 2545 2546 ALTER TABLE ONLY public.netzone ALTER COLUMN internobject SET DEFAULT false; 2547 2548 2549 -- 2550 -- Name: netzone nodelete; Type: DEFAULT; Schema: public; Owner: - 2551 -- 2552 2553 ALTER TABLE ONLY public.netzone ALTER COLUMN nodelete SET DEFAULT false; 2554 2555 2556 -- 2557 -- Name: netzone_attributes attr_key; Type: DEFAULT; Schema: public; Owner: - 2558 -- 2559 2560 ALTER TABLE ONLY public.netzone_attributes ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2561 2562 2563 -- 2564 -- Name: netzone_attributes_list rev; Type: DEFAULT; Schema: public; Owner: - 2565 -- 2566 2567 ALTER TABLE ONLY public.netzone_attributes_list ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2568 2569 2570 -- 2571 -- Name: netzone_attributes_list date; Type: DEFAULT; Schema: public; Owner: - 2572 -- 2573 2574 ALTER TABLE ONLY public.netzone_attributes_list ALTER COLUMN date SET DEFAULT now(); 2575 2576 2577 -- 2578 -- Name: netzone_attributes_list create; Type: DEFAULT; Schema: public; Owner: - 2579 -- 2580 2581 ALTER TABLE ONLY public.netzone_attributes_list ALTER COLUMN "create" SET DEFAULT now(); 2582 2583 2584 -- 2585 -- Name: netzone_attributes_netzone attr_key; Type: DEFAULT; Schema: public; Owner: - 2586 -- 2587 2588 ALTER TABLE ONLY public.netzone_attributes_netzone ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2589 2590 2591 -- 2592 -- Name: netzone_attributes_site attr_key; Type: DEFAULT; Schema: public; Owner: - 2593 -- 2594 2595 ALTER TABLE ONLY public.netzone_attributes_site ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2596 2597 2598 -- 2599 -- Name: objects rev; Type: DEFAULT; Schema: public; Owner: - 2600 -- 2601 2602 ALTER TABLE ONLY public.objects ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2603 2604 2605 -- 2606 -- Name: objects date; Type: DEFAULT; Schema: public; Owner: - 2607 -- 2608 2609 ALTER TABLE ONLY public.objects ALTER COLUMN date SET DEFAULT now(); 2610 2611 2612 -- 2613 -- Name: objects create; Type: DEFAULT; Schema: public; Owner: - 2614 -- 2615 2616 ALTER TABLE ONLY public.objects ALTER COLUMN "create" SET DEFAULT now(); 2617 2618 2619 -- 2620 -- Name: objects ikey; Type: DEFAULT; Schema: public; Owner: - 2621 -- 2622 2623 ALTER TABLE ONLY public.objects ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2624 2625 2626 -- 2627 -- Name: objectslogs logkey; Type: DEFAULT; Schema: public; Owner: - 2628 -- 2629 2630 ALTER TABLE ONLY public.objectslogs ALTER COLUMN logkey SET DEFAULT nextval('public.objectlogs_logkey_seq'::regclass); 2631 2632 2633 -- 2634 -- Name: passwordreset rev; Type: DEFAULT; Schema: public; Owner: - 2635 -- 2636 2637 ALTER TABLE ONLY public.passwordreset ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2638 2639 2640 -- 2641 -- Name: passwordreset date; Type: DEFAULT; Schema: public; Owner: - 2642 -- 2643 2644 ALTER TABLE ONLY public.passwordreset ALTER COLUMN date SET DEFAULT now(); 2645 2646 2647 -- 2648 -- Name: passwordreset create; Type: DEFAULT; Schema: public; Owner: - 2649 -- 2650 2651 ALTER TABLE ONLY public.passwordreset ALTER COLUMN "create" SET DEFAULT now(); 2652 2653 2654 -- 2655 -- Name: passwordreset ikey; Type: DEFAULT; Schema: public; Owner: - 2656 -- 2657 2658 ALTER TABLE ONLY public.passwordreset ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2659 2660 2661 -- 2662 -- Name: request id; Type: DEFAULT; Schema: public; Owner: - 2663 -- 2664 2665 ALTER TABLE ONLY public.request ALTER COLUMN id SET DEFAULT nextval('public.request_id_seq'::regclass); 2666 2667 2668 -- 2669 -- Name: revaliases rev; Type: DEFAULT; Schema: public; Owner: - 2670 -- 2671 2672 ALTER TABLE ONLY public.revaliases ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2673 2674 2675 -- 2676 -- Name: revaliases date; Type: DEFAULT; Schema: public; Owner: - 2677 -- 2678 2679 ALTER TABLE ONLY public.revaliases ALTER COLUMN date SET DEFAULT now(); 2680 2681 2682 -- 2683 -- Name: revaliases create; Type: DEFAULT; Schema: public; Owner: - 2684 -- 2685 2686 ALTER TABLE ONLY public.revaliases ALTER COLUMN "create" SET DEFAULT now(); 2687 2688 2689 -- 2690 -- Name: revaliases ikey; Type: DEFAULT; Schema: public; Owner: - 2691 -- 2692 2693 ALTER TABLE ONLY public.revaliases ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2694 2695 2696 -- 2697 -- Name: revaliases exported; Type: DEFAULT; Schema: public; Owner: - 2698 -- 2699 2700 ALTER TABLE ONLY public.revaliases ALTER COLUMN exported SET DEFAULT true; 2701 2702 2703 -- 2704 -- Name: revaliases internobject; Type: DEFAULT; Schema: public; Owner: - 2705 -- 2706 2707 ALTER TABLE ONLY public.revaliases ALTER COLUMN internobject SET DEFAULT false; 2708 2709 2710 -- 2711 -- Name: revaliases nodelete; Type: DEFAULT; Schema: public; Owner: - 2712 -- 2713 2714 ALTER TABLE ONLY public.revaliases ALTER COLUMN nodelete SET DEFAULT false; 2715 2716 2717 -- 2718 -- Name: revisions rev; Type: DEFAULT; Schema: public; Owner: - 2719 -- 2720 2721 ALTER TABLE ONLY public.revisions ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2722 2723 2724 -- 2725 -- Name: service rev; Type: DEFAULT; Schema: public; Owner: - 2726 -- 2727 2728 ALTER TABLE ONLY public.service ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2729 2730 2731 -- 2732 -- Name: service date; Type: DEFAULT; Schema: public; Owner: - 2733 -- 2734 2735 ALTER TABLE ONLY public.service ALTER COLUMN date SET DEFAULT now(); 2736 2737 2738 -- 2739 -- Name: service create; Type: DEFAULT; Schema: public; Owner: - 2740 -- 2741 2742 ALTER TABLE ONLY public.service ALTER COLUMN "create" SET DEFAULT now(); 2743 2744 2745 -- 2746 -- Name: service ikey; Type: DEFAULT; Schema: public; Owner: - 2747 -- 2748 2749 ALTER TABLE ONLY public.service ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2750 2751 2752 -- 2753 -- Name: service exported; Type: DEFAULT; Schema: public; Owner: - 2754 -- 2755 2756 ALTER TABLE ONLY public.service ALTER COLUMN exported SET DEFAULT true; 2757 2758 2759 -- 2760 -- Name: service internobject; Type: DEFAULT; Schema: public; Owner: - 2761 -- 2762 2763 ALTER TABLE ONLY public.service ALTER COLUMN internobject SET DEFAULT false; 2764 2765 2766 -- 2767 -- Name: service nodelete; Type: DEFAULT; Schema: public; Owner: - 2768 -- 2769 2770 ALTER TABLE ONLY public.service ALTER COLUMN nodelete SET DEFAULT false; 2771 2772 2773 -- 2774 -- Name: service_attributes attr_key; Type: DEFAULT; Schema: public; Owner: - 2775 -- 2776 2777 ALTER TABLE ONLY public.service_attributes ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2778 2779 2780 -- 2781 -- Name: service_attributes_list rev; Type: DEFAULT; Schema: public; Owner: - 2782 -- 2783 2784 ALTER TABLE ONLY public.service_attributes_list ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2785 2786 2787 -- 2788 -- Name: service_attributes_list date; Type: DEFAULT; Schema: public; Owner: - 2789 -- 2790 2791 ALTER TABLE ONLY public.service_attributes_list ALTER COLUMN date SET DEFAULT now(); 2792 2793 2794 -- 2795 -- Name: service_attributes_list create; Type: DEFAULT; Schema: public; Owner: - 2796 -- 2797 2798 ALTER TABLE ONLY public.service_attributes_list ALTER COLUMN "create" SET DEFAULT now(); 2799 2800 2801 -- 2802 -- Name: service_attributes_users attr_key; Type: DEFAULT; Schema: public; Owner: - 2803 -- 2804 2805 ALTER TABLE ONLY public.service_attributes_users ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2806 2807 2808 -- 2809 -- Name: settings rev; Type: DEFAULT; Schema: public; Owner: - 2810 -- 2811 2812 ALTER TABLE ONLY public.settings ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2813 2814 2815 -- 2816 -- Name: settings date; Type: DEFAULT; Schema: public; Owner: - 2817 -- 2818 2819 ALTER TABLE ONLY public.settings ALTER COLUMN date SET DEFAULT now(); 2820 2821 2822 -- 2823 -- Name: settings create; Type: DEFAULT; Schema: public; Owner: - 2824 -- 2825 2826 ALTER TABLE ONLY public.settings ALTER COLUMN "create" SET DEFAULT now(); 2827 2828 2829 -- 2830 -- Name: settings ikey; Type: DEFAULT; Schema: public; Owner: - 2831 -- 2832 2833 ALTER TABLE ONLY public.settings ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2834 2835 2836 -- 2837 -- Name: site rev; Type: DEFAULT; Schema: public; Owner: - 2838 -- 2839 2840 ALTER TABLE ONLY public.site ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2841 2842 2843 -- 2844 -- Name: site date; Type: DEFAULT; Schema: public; Owner: - 2845 -- 2846 2847 ALTER TABLE ONLY public.site ALTER COLUMN date SET DEFAULT now(); 2848 2849 2850 -- 2851 -- Name: site create; Type: DEFAULT; Schema: public; Owner: - 2852 -- 2853 2854 ALTER TABLE ONLY public.site ALTER COLUMN "create" SET DEFAULT now(); 2855 2856 2857 -- 2858 -- Name: site ikey; Type: DEFAULT; Schema: public; Owner: - 2859 -- 2860 2861 ALTER TABLE ONLY public.site ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2862 2863 2864 -- 2865 -- Name: site exported; Type: DEFAULT; Schema: public; Owner: - 2866 -- 2867 2868 ALTER TABLE ONLY public.site ALTER COLUMN exported SET DEFAULT true; 2869 2870 2871 -- 2872 -- Name: site internobject; Type: DEFAULT; Schema: public; Owner: - 2873 -- 2874 2875 ALTER TABLE ONLY public.site ALTER COLUMN internobject SET DEFAULT false; 2876 2877 2878 -- 2879 -- Name: site nodelete; Type: DEFAULT; Schema: public; Owner: - 2880 -- 2881 2882 ALTER TABLE ONLY public.site ALTER COLUMN nodelete SET DEFAULT false; 2883 2884 2885 -- 2886 -- Name: site_attributes attr_key; Type: DEFAULT; Schema: public; Owner: - 2887 -- 2888 2889 ALTER TABLE ONLY public.site_attributes ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2890 2891 2892 -- 2893 -- Name: site_attributes_list rev; Type: DEFAULT; Schema: public; Owner: - 2894 -- 2895 2896 ALTER TABLE ONLY public.site_attributes_list ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2897 2898 2899 -- 2900 -- Name: site_attributes_list date; Type: DEFAULT; Schema: public; Owner: - 2901 -- 2902 2903 ALTER TABLE ONLY public.site_attributes_list ALTER COLUMN date SET DEFAULT now(); 2904 2905 2906 -- 2907 -- Name: site_attributes_list create; Type: DEFAULT; Schema: public; Owner: - 2908 -- 2909 2910 ALTER TABLE ONLY public.site_attributes_list ALTER COLUMN "create" SET DEFAULT now(); 2911 2912 2913 -- 2914 -- Name: site_attributes_list ikey; Type: DEFAULT; Schema: public; Owner: - 2915 -- 2916 2917 ALTER TABLE ONLY public.site_attributes_list ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2918 2919 2920 -- 2921 -- Name: stat rev; Type: DEFAULT; Schema: public; Owner: - 2922 -- 2923 2924 ALTER TABLE ONLY public.stat ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2925 2926 2927 -- 2928 -- Name: stat date; Type: DEFAULT; Schema: public; Owner: - 2929 -- 2930 2931 ALTER TABLE ONLY public.stat ALTER COLUMN date SET DEFAULT now(); 2932 2933 2934 -- 2935 -- Name: stat create; Type: DEFAULT; Schema: public; Owner: - 2936 -- 2937 2938 ALTER TABLE ONLY public.stat ALTER COLUMN "create" SET DEFAULT now(); 2939 2940 2941 -- 2942 -- Name: stat ikey; Type: DEFAULT; Schema: public; Owner: - 2943 -- 2944 2945 ALTER TABLE ONLY public.stat ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 2946 2947 2948 -- 2949 -- Name: stat exported; Type: DEFAULT; Schema: public; Owner: - 2950 -- 2951 2952 ALTER TABLE ONLY public.stat ALTER COLUMN exported SET DEFAULT true; 2953 2954 2955 -- 2956 -- Name: stat internobject; Type: DEFAULT; Schema: public; Owner: - 2957 -- 2958 2959 ALTER TABLE ONLY public.stat ALTER COLUMN internobject SET DEFAULT false; 2960 2961 2962 -- 2963 -- Name: stat nodelete; Type: DEFAULT; Schema: public; Owner: - 2964 -- 2965 2966 ALTER TABLE ONLY public.stat ALTER COLUMN nodelete SET DEFAULT false; 2967 2968 2969 -- 2970 -- Name: stat_attributes attr_key; Type: DEFAULT; Schema: public; Owner: - 2971 -- 2972 2973 ALTER TABLE ONLY public.stat_attributes ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 2974 2975 2976 -- 2977 -- Name: stat_attributes_list rev; Type: DEFAULT; Schema: public; Owner: - 2978 -- 2979 2980 ALTER TABLE ONLY public.stat_attributes_list ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 2981 2982 2983 -- 2984 -- Name: stat_attributes_list date; Type: DEFAULT; Schema: public; Owner: - 2985 -- 2986 2987 ALTER TABLE ONLY public.stat_attributes_list ALTER COLUMN date SET DEFAULT now(); 2988 2989 2990 -- 2991 -- Name: stat_attributes_list create; Type: DEFAULT; Schema: public; Owner: - 2992 -- 2993 2994 ALTER TABLE ONLY public.stat_attributes_list ALTER COLUMN "create" SET DEFAULT now(); 2995 2996 2997 -- 2998 -- Name: stat_attributes_list ikey; Type: DEFAULT; Schema: public; Owner: - 2999 -- 3000 3001 ALTER TABLE ONLY public.stat_attributes_list ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 3002 3003 3004 -- 3005 -- Name: su_type rev; Type: DEFAULT; Schema: public; Owner: - 3006 -- 3007 3008 ALTER TABLE ONLY public.su_type ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 3009 3010 3011 -- 3012 -- Name: su_type date; Type: DEFAULT; Schema: public; Owner: - 3013 -- 3014 3015 ALTER TABLE ONLY public.su_type ALTER COLUMN date SET DEFAULT now(); 3016 3017 3018 -- 3019 -- Name: su_type create; Type: DEFAULT; Schema: public; Owner: - 3020 -- 3021 3022 ALTER TABLE ONLY public.su_type ALTER COLUMN "create" SET DEFAULT now(); 3023 3024 3025 -- 3026 -- Name: su_type ikey; Type: DEFAULT; Schema: public; Owner: - 3027 -- 3028 3029 ALTER TABLE ONLY public.su_type ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 3030 3031 3032 -- 3033 -- Name: su_type exported; Type: DEFAULT; Schema: public; Owner: - 3034 -- 3035 3036 ALTER TABLE ONLY public.su_type ALTER COLUMN exported SET DEFAULT true; 3037 3038 3039 -- 3040 -- Name: su_type internobject; Type: DEFAULT; Schema: public; Owner: - 3041 -- 3042 3043 ALTER TABLE ONLY public.su_type ALTER COLUMN internobject SET DEFAULT false; 3044 3045 3046 -- 3047 -- Name: su_type nodelete; Type: DEFAULT; Schema: public; Owner: - 3048 -- 3049 3050 ALTER TABLE ONLY public.su_type ALTER COLUMN nodelete SET DEFAULT false; 3051 3052 3053 -- 3054 -- Name: user rev; Type: DEFAULT; Schema: public; Owner: - 3055 -- 3056 3057 ALTER TABLE ONLY public."user" ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 3058 3059 3060 -- 3061 -- Name: user date; Type: DEFAULT; Schema: public; Owner: - 3062 -- 3063 3064 ALTER TABLE ONLY public."user" ALTER COLUMN date SET DEFAULT now(); 3065 3066 3067 -- 3068 -- Name: user create; Type: DEFAULT; Schema: public; Owner: - 3069 -- 3070 3071 ALTER TABLE ONLY public."user" ALTER COLUMN "create" SET DEFAULT now(); 3072 3073 3074 -- 3075 -- Name: user ikey; Type: DEFAULT; Schema: public; Owner: - 3076 -- 3077 3078 ALTER TABLE ONLY public."user" ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 3079 3080 3081 -- 3082 -- Name: user exported; Type: DEFAULT; Schema: public; Owner: - 3083 -- 3084 3085 ALTER TABLE ONLY public."user" ALTER COLUMN exported SET DEFAULT true; 3086 3087 3088 -- 3089 -- Name: user internobject; Type: DEFAULT; Schema: public; Owner: - 3090 -- 3091 3092 ALTER TABLE ONLY public."user" ALTER COLUMN internobject SET DEFAULT false; 3093 3094 3095 -- 3096 -- Name: user nodelete; Type: DEFAULT; Schema: public; Owner: - 3097 -- 3098 3099 ALTER TABLE ONLY public."user" ALTER COLUMN nodelete SET DEFAULT false; 3100 3101 3102 -- 3103 -- Name: user_attributes attr_key; Type: DEFAULT; Schema: public; Owner: - 3104 -- 3105 3106 ALTER TABLE ONLY public.user_attributes ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 3107 3108 3109 -- 3110 -- Name: user_attributes_base attr_key; Type: DEFAULT; Schema: public; Owner: - 3111 -- 3112 3113 ALTER TABLE ONLY public.user_attributes_base ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 3114 3115 3116 -- 3117 -- Name: user_attributes_groups attr_key; Type: DEFAULT; Schema: public; Owner: - 3118 -- 3119 3120 ALTER TABLE ONLY public.user_attributes_groups ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 3121 3122 3123 -- 3124 -- Name: user_attributes_list rev; Type: DEFAULT; Schema: public; Owner: - 3125 -- 3126 3127 ALTER TABLE ONLY public.user_attributes_list ALTER COLUMN rev SET DEFAULT nextval('public.revisions_rev_seq'::regclass); 3128 3129 3130 -- 3131 -- Name: user_attributes_list date; Type: DEFAULT; Schema: public; Owner: - 3132 -- 3133 3134 ALTER TABLE ONLY public.user_attributes_list ALTER COLUMN date SET DEFAULT now(); 3135 3136 3137 -- 3138 -- Name: user_attributes_list create; Type: DEFAULT; Schema: public; Owner: - 3139 -- 3140 3141 ALTER TABLE ONLY public.user_attributes_list ALTER COLUMN "create" SET DEFAULT now(); 3142 3143 3144 -- 3145 -- Name: user_attributes_list ikey; Type: DEFAULT; Schema: public; Owner: - 3146 -- 3147 3148 ALTER TABLE ONLY public.user_attributes_list ALTER COLUMN ikey SET DEFAULT nextval('public.ikey_seq'::regclass); 3149 3150 3151 -- 3152 -- Name: user_attributes_site attr_key; Type: DEFAULT; Schema: public; Owner: - 3153 -- 3154 3155 ALTER TABLE ONLY public.user_attributes_site ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 3156 3157 3158 -- 3159 -- Name: user_attributes_users attr_key; Type: DEFAULT; Schema: public; Owner: - 3160 -- 3161 3162 ALTER TABLE ONLY public.user_attributes_users ALTER COLUMN attr_key SET DEFAULT nextval('public.attributes_attr_key_seq'::regclass); 3163 3164 3165 -- 3166 -- Name: accreq_attributes_list acccreq_attributes_list_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3167 -- 3168 3169 ALTER TABLE ONLY public.accreq_attributes_list 1272 3170 ADD CONSTRAINT acccreq_attributes_list_pkey PRIMARY KEY (canonical); 1273 3171 1274 3172 1275 3173 -- 1276 -- Name: accreq_attributes _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1277 -- 1278 1279 ALTER TABLE ONLY accreq_attributes3174 -- Name: accreq_attributes accreq_attributes_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3175 -- 3176 3177 ALTER TABLE ONLY public.accreq_attributes 1280 3178 ADD CONSTRAINT accreq_attributes_pkey PRIMARY KEY (attr_key); 1281 3179 1282 3180 1283 3181 -- 1284 -- Name: accreq _ikey_uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1285 -- 1286 1287 ALTER TABLE ONLY accreq3182 -- Name: accreq accreq_ikey_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3183 -- 3184 3185 ALTER TABLE ONLY public.accreq 1288 3186 ADD CONSTRAINT accreq_ikey_uniq UNIQUE (ikey); 1289 3187 1290 3188 1291 3189 -- 1292 -- Name: accreq _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1293 -- 1294 1295 ALTER TABLE ONLY accreq3190 -- Name: accreq accreq_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3191 -- 3192 3193 ALTER TABLE ONLY public.accreq 1296 3194 ADD CONSTRAINT accreq_pkey PRIMARY KEY (name); 1297 3195 1298 3196 1299 3197 -- 1300 -- Name: address_attr _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1301 -- 1302 1303 ALTER TABLE ONLY address_attributes_base3198 -- Name: address_attributes_base address_attr_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3199 -- 3200 3201 ALTER TABLE ONLY public.address_attributes_base 1304 3202 ADD CONSTRAINT address_attr_pkey PRIMARY KEY (attr_key); 1305 3203 1306 3204 1307 3205 -- 1308 -- Name: address_attr _site_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1309 -- 1310 1311 ALTER TABLE ONLY address_attributes_site3206 -- Name: address_attributes_site address_attr_site_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3207 -- 3208 3209 ALTER TABLE ONLY public.address_attributes_site 1312 3210 ADD CONSTRAINT address_attr_site_pkey PRIMARY KEY (attr_key); 1313 3211 1314 3212 1315 3213 -- 1316 -- Name: address_attributes_list _c_uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1317 -- 1318 1319 ALTER TABLE ONLY address_attributes_list3214 -- Name: address_attributes_list address_attributes_list_c_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3215 -- 3216 3217 ALTER TABLE ONLY public.address_attributes_list 1320 3218 ADD CONSTRAINT address_attributes_list_c_uniq UNIQUE (canonical); 1321 3219 1322 3220 1323 3221 -- 1324 -- Name: address_attributes_list _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1325 -- 1326 1327 ALTER TABLE ONLY address_attributes_list3222 -- Name: address_attributes_list address_attributes_list_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3223 -- 3224 3225 ALTER TABLE ONLY public.address_attributes_list 1328 3226 ADD CONSTRAINT address_attributes_list_pkey PRIMARY KEY (ikey); 1329 3227 1330 3228 1331 3229 -- 1332 -- Name: address_attributes_list_site _c_uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1333 -- 1334 1335 ALTER TABLE ONLY address_attributes_list_site3230 -- Name: address_attributes_list_site address_attributes_list_site_c_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3231 -- 3232 3233 ALTER TABLE ONLY public.address_attributes_list_site 1336 3234 ADD CONSTRAINT address_attributes_list_site_c_uniq UNIQUE (canonical); 1337 3235 1338 3236 1339 3237 -- 1340 -- Name: address_attributes_list_site _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1341 -- 1342 1343 ALTER TABLE ONLY address_attributes_list_site3238 -- Name: address_attributes_list_site address_attributes_list_site_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3239 -- 3240 3241 ALTER TABLE ONLY public.address_attributes_list_site 1344 3242 ADD CONSTRAINT address_attributes_list_site_pkey PRIMARY KEY (ikey); 1345 3243 1346 3244 1347 3245 -- 1348 -- Name: address _ikey_uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1349 -- 1350 1351 ALTER TABLE ONLY address3246 -- Name: address address_ikey_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3247 -- 3248 3249 ALTER TABLE ONLY public.address 1352 3250 ADD CONSTRAINT address_ikey_uniq UNIQUE (ikey); 1353 3251 1354 3252 1355 3253 -- 1356 -- Name: address _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1357 -- 1358 1359 ALTER TABLE ONLY address3254 -- Name: address address_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3255 -- 3256 3257 ALTER TABLE ONLY public.address 1360 3258 ADD CONSTRAINT address_pkey PRIMARY KEY (name); 1361 3259 1362 3260 1363 3261 -- 1364 -- Name: aliases_attributes_list_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 1365 -- 1366 1367 ALTER TABLE ONLY aliases_attributes_list 3262 -- Name: aliases_attributes_base aliases_attributes_base_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3263 -- 3264 3265 ALTER TABLE ONLY public.aliases_attributes_base 3266 ADD CONSTRAINT aliases_attributes_base_pkey PRIMARY KEY (attr_key); 3267 3268 3269 -- 3270 -- Name: aliases_attributes_list aliases_attributes_list_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3271 -- 3272 3273 ALTER TABLE ONLY public.aliases_attributes_list 1368 3274 ADD CONSTRAINT aliases_attributes_list_pkey PRIMARY KEY (ikey); 1369 3275 1370 3276 1371 3277 -- 1372 -- Name: aliases_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 1373 -- 1374 1375 ALTER TABLE ONLY aliases 3278 -- Name: aliases aliases_ikey_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3279 -- 3280 3281 ALTER TABLE ONLY public.aliases 3282 ADD CONSTRAINT aliases_ikey_uniq UNIQUE (ikey); 3283 3284 3285 -- 3286 -- Name: aliases aliases_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3287 -- 3288 3289 ALTER TABLE ONLY public.aliases 1376 3290 ADD CONSTRAINT aliases_pkey PRIMARY KEY (name); 1377 3291 1378 3292 1379 3293 -- 1380 -- Name: attributes_list _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1381 -- 1382 1383 ALTER TABLE ONLY attributes_list3294 -- Name: attributes_list attributes_list_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3295 -- 3296 3297 ALTER TABLE ONLY public.attributes_list 1384 3298 ADD CONSTRAINT attributes_list_pkey PRIMARY KEY (ikey); 1385 3299 1386 3300 1387 3301 -- 1388 -- Name: attributes _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1389 -- 1390 1391 ALTER TABLE ONLY attributes3302 -- Name: attributes attributes_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3303 -- 3304 3305 ALTER TABLE ONLY public.attributes 1392 3306 ADD CONSTRAINT attributes_pkey PRIMARY KEY (attr_key); 1393 3307 1394 3308 1395 3309 -- 1396 -- Name: g_attr_l_aliases_uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 1397 -- 1398 1399 ALTER TABLE ONLY aliases_attributes_list 3310 -- Name: attributes_values attributes_values_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3311 -- 3312 3313 ALTER TABLE ONLY public.attributes_values 3314 ADD CONSTRAINT attributes_values_pkey PRIMARY KEY (ikey); 3315 3316 3317 -- 3318 -- Name: employment_attributes_list employment_attr_l_c_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3319 -- 3320 3321 ALTER TABLE ONLY public.employment_attributes_list 3322 ADD CONSTRAINT employment_attr_l_c_uniq UNIQUE (canonical); 3323 3324 3325 -- 3326 -- Name: employment_attributes_list employment_attr_list_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3327 -- 3328 3329 ALTER TABLE ONLY public.employment_attributes_list 3330 ADD CONSTRAINT employment_attr_list_pkey PRIMARY KEY (ikey); 3331 3332 3333 -- 3334 -- Name: employment_attributes employment_attributes_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3335 -- 3336 3337 ALTER TABLE ONLY public.employment_attributes 3338 ADD CONSTRAINT employment_attributes_pkey PRIMARY KEY (attr_key); 3339 3340 3341 -- 3342 -- Name: employment employment_okey_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3343 -- 3344 3345 ALTER TABLE ONLY public.employment 3346 ADD CONSTRAINT employment_okey_uniq UNIQUE (ikey); 3347 3348 3349 -- 3350 -- Name: employment employment_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3351 -- 3352 3353 ALTER TABLE ONLY public.employment 3354 ADD CONSTRAINT employment_pkey PRIMARY KEY (name); 3355 3356 3357 -- 3358 -- Name: aliases_attributes_list g_attr_l_aliases_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3359 -- 3360 3361 ALTER TABLE ONLY public.aliases_attributes_list 1400 3362 ADD CONSTRAINT g_attr_l_aliases_uniq UNIQUE (canonical); 1401 3363 1402 3364 1403 3365 -- 1404 -- Name: g _attr_l_c_uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1405 -- 1406 1407 ALTER TABLE ONLY group_attributes_list3366 -- Name: group_attributes_list g_attr_l_c_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3367 -- 3368 3369 ALTER TABLE ONLY public.group_attributes_list 1408 3370 ADD CONSTRAINT g_attr_l_c_uniq UNIQUE (canonical); 1409 3371 1410 3372 1411 3373 -- 1412 -- Name: g_attr_l_nethost_uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1413 -- 1414 1415 ALTER TABLE ONLY nethost_attributes_list3374 -- Name: nethost_attributes_list g_attr_l_nethost_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3375 -- 3376 3377 ALTER TABLE ONLY public.nethost_attributes_list 1416 3378 ADD CONSTRAINT g_attr_l_nethost_uniq UNIQUE (canonical); 1417 3379 1418 3380 1419 3381 -- 1420 -- Name: g_attr_l_netzone_uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1421 -- 1422 1423 ALTER TABLE ONLY netzone_attributes_list3382 -- Name: netzone_attributes_list g_attr_l_netzone_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3383 -- 3384 3385 ALTER TABLE ONLY public.netzone_attributes_list 1424 3386 ADD CONSTRAINT g_attr_l_netzone_uniq UNIQUE (canonical); 1425 3387 1426 3388 1427 3389 -- 1428 -- Name: g_attr_list_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 1429 -- 1430 1431 ALTER TABLE ONLY group_attributes_list 3390 -- Name: service_attributes_list g_attr_l_service_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3391 -- 3392 3393 ALTER TABLE ONLY public.service_attributes_list 3394 ADD CONSTRAINT g_attr_l_service_uniq UNIQUE (canonical); 3395 3396 3397 -- 3398 -- Name: group_attributes_list g_attr_list_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3399 -- 3400 3401 ALTER TABLE ONLY public.group_attributes_list 1432 3402 ADD CONSTRAINT g_attr_list_pkey PRIMARY KEY (ikey); 1433 3403 1434 3404 1435 3405 -- 1436 -- Name: g oup_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1437 -- 1438 1439 ALTER TABLE ONLY "group"3406 -- Name: group goup_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3407 -- 3408 3409 ALTER TABLE ONLY public."group" 1440 3410 ADD CONSTRAINT goup_pkey PRIMARY KEY (name); 1441 3411 1442 3412 1443 3413 -- 1444 -- Name: group_attr butes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1445 -- 1446 1447 ALTER TABLE ONLY group_attributes_base3414 -- Name: group_attributes_base group_attrbutes_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3415 -- 3416 3417 ALTER TABLE ONLY public.group_attributes_base 1448 3418 ADD CONSTRAINT group_attrbutes_pkey PRIMARY KEY (attr_key); 1449 3419 1450 3420 1451 3421 -- 1452 -- Name: group_attributes_sutypes _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1453 -- 1454 1455 ALTER TABLE ONLY group_attributes_sutypes3422 -- Name: group_attributes_sutypes group_attributes_sutypes_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3423 -- 3424 3425 ALTER TABLE ONLY public.group_attributes_sutypes 1456 3426 ADD CONSTRAINT group_attributes_sutypes_pkey PRIMARY KEY (attr_key); 1457 3427 1458 3428 1459 3429 -- 1460 -- Name: group_attributes_user _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1461 -- 1462 1463 ALTER TABLE ONLY group_attributes_users3430 -- Name: group_attributes_users group_attributes_user_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3431 -- 3432 3433 ALTER TABLE ONLY public.group_attributes_users 1464 3434 ADD CONSTRAINT group_attributes_user_pkey PRIMARY KEY (attr_key); 1465 3435 1466 3436 1467 3437 -- 1468 -- Name: group_attributes_users _uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1469 -- 1470 1471 ALTER TABLE ONLY group_attributes_users3438 -- Name: group_attributes_users group_attributes_users_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3439 -- 3440 3441 ALTER TABLE ONLY public.group_attributes_users 1472 3442 ADD CONSTRAINT group_attributes_users_uniq UNIQUE (okey, attr, value); 1473 3443 1474 3444 1475 3445 -- 1476 -- Name: group _gid_uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1477 -- 1478 1479 ALTER TABLE ONLY "group"3446 -- Name: group group_gid_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3447 -- 3448 3449 ALTER TABLE ONLY public."group" 1480 3450 ADD CONSTRAINT group_gid_uniq UNIQUE (gidnumber); 1481 3451 1482 3452 1483 3453 -- 1484 -- Name: group _ikey_uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1485 -- 1486 1487 ALTER TABLE ONLY "group"3454 -- Name: group group_ikey_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3455 -- 3456 3457 ALTER TABLE ONLY public."group" 1488 3458 ADD CONSTRAINT group_ikey_uniq UNIQUE (ikey); 1489 3459 1490 3460 1491 3461 -- 1492 -- Name: nethost_attributes_ip _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1493 -- 1494 1495 ALTER TABLE ONLY nethost_attributes_ips3462 -- Name: nethost_attributes_ips nethost_attributes_ip_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3463 -- 3464 3465 ALTER TABLE ONLY public.nethost_attributes_ips 1496 3466 ADD CONSTRAINT nethost_attributes_ip_pkey PRIMARY KEY (attr_key); 1497 3467 1498 3468 1499 3469 -- 1500 -- Name: nethost_attributes_list _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1501 -- 1502 1503 ALTER TABLE ONLY nethost_attributes_list3470 -- Name: nethost_attributes_list nethost_attributes_list_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3471 -- 3472 3473 ALTER TABLE ONLY public.nethost_attributes_list 1504 3474 ADD CONSTRAINT nethost_attributes_list_pkey PRIMARY KEY (ikey); 1505 3475 1506 3476 1507 3477 -- 1508 -- Name: nethost_attributes_mac _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1509 -- 1510 1511 ALTER TABLE ONLY nethost_attributes_macs3478 -- Name: nethost_attributes_macs nethost_attributes_mac_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3479 -- 3480 3481 ALTER TABLE ONLY public.nethost_attributes_macs 1512 3482 ADD CONSTRAINT nethost_attributes_mac_pkey PRIMARY KEY (attr_key); 1513 3483 1514 3484 1515 3485 -- 1516 -- Name: nethost_attributes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 1517 -- 1518 1519 ALTER TABLE ONLY nethost_attributes 3486 -- Name: nethost_attributes_nethosts nethost_attributes_nethosts_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3487 -- 3488 3489 ALTER TABLE ONLY public.nethost_attributes_nethosts 3490 ADD CONSTRAINT nethost_attributes_nethosts_pkey PRIMARY KEY (attr_key); 3491 3492 3493 -- 3494 -- Name: nethost_attributes nethost_attributes_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3495 -- 3496 3497 ALTER TABLE ONLY public.nethost_attributes 1520 3498 ADD CONSTRAINT nethost_attributes_pkey PRIMARY KEY (attr_key); 1521 3499 1522 3500 1523 3501 -- 1524 -- Name: nethost_attributes_user _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1525 -- 1526 1527 ALTER TABLE ONLY nethost_attributes_users3502 -- Name: nethost_attributes_users nethost_attributes_user_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3503 -- 3504 3505 ALTER TABLE ONLY public.nethost_attributes_users 1528 3506 ADD CONSTRAINT nethost_attributes_user_pkey PRIMARY KEY (attr_key); 1529 3507 1530 3508 1531 3509 -- 1532 -- Name: nethost_attributes_users _uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1533 -- 1534 1535 ALTER TABLE ONLY nethost_attributes_users3510 -- Name: nethost_attributes_users nethost_attributes_users_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3511 -- 3512 3513 ALTER TABLE ONLY public.nethost_attributes_users 1536 3514 ADD CONSTRAINT nethost_attributes_users_uniq UNIQUE (okey, attr, value); 1537 3515 1538 3516 1539 3517 -- 1540 -- Name: nethost _ikey_uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1541 -- 1542 1543 ALTER TABLE ONLY nethost3518 -- Name: nethost nethost_ikey_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3519 -- 3520 3521 ALTER TABLE ONLY public.nethost 1544 3522 ADD CONSTRAINT nethost_ikey_uniq UNIQUE (ikey); 1545 3523 1546 3524 1547 3525 -- 1548 -- Name: nethost _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1549 -- 1550 1551 ALTER TABLE ONLY nethost3526 -- Name: nethost nethost_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3527 -- 3528 3529 ALTER TABLE ONLY public.nethost 1552 3530 ADD CONSTRAINT nethost_pkey PRIMARY KEY (name); 1553 3531 1554 3532 1555 3533 -- 1556 -- Name: netzone_attr _netzone_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1557 -- 1558 1559 ALTER TABLE ONLY netzone_attributes_netzone3534 -- Name: netzone_attributes_netzone netzone_attr_netzone_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3535 -- 3536 3537 ALTER TABLE ONLY public.netzone_attributes_netzone 1560 3538 ADD CONSTRAINT netzone_attr_netzone_pkey PRIMARY KEY (attr_key); 1561 3539 1562 3540 1563 3541 -- 1564 -- Name: netzone_attr _site_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1565 -- 1566 1567 ALTER TABLE ONLY netzone_attributes_site3542 -- Name: netzone_attributes_site netzone_attr_site_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3543 -- 3544 3545 ALTER TABLE ONLY public.netzone_attributes_site 1568 3546 ADD CONSTRAINT netzone_attr_site_pkey PRIMARY KEY (attr_key); 1569 3547 1570 3548 1571 3549 -- 1572 -- Name: netzone_attributes_list _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1573 -- 1574 1575 ALTER TABLE ONLY netzone_attributes_list3550 -- Name: netzone_attributes_list netzone_attributes_list_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3551 -- 3552 3553 ALTER TABLE ONLY public.netzone_attributes_list 1576 3554 ADD CONSTRAINT netzone_attributes_list_pkey PRIMARY KEY (ikey); 1577 3555 1578 3556 1579 3557 -- 1580 -- Name: netzone_attributes _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1581 -- 1582 1583 ALTER TABLE ONLY netzone_attributes3558 -- Name: netzone_attributes netzone_attributes_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3559 -- 3560 3561 ALTER TABLE ONLY public.netzone_attributes 1584 3562 ADD CONSTRAINT netzone_attributes_pkey PRIMARY KEY (attr_key); 1585 3563 1586 3564 1587 3565 -- 1588 -- Name: netzone _ikey_uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1589 -- 1590 1591 ALTER TABLE ONLY netzone3566 -- Name: netzone netzone_ikey_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3567 -- 3568 3569 ALTER TABLE ONLY public.netzone 1592 3570 ADD CONSTRAINT netzone_ikey_uniq UNIQUE (ikey); 1593 3571 1594 3572 1595 3573 -- 1596 -- Name: netzone _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1597 -- 1598 1599 ALTER TABLE ONLY netzone3574 -- Name: netzone netzone_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3575 -- 3576 3577 ALTER TABLE ONLY public.netzone 1600 3578 ADD CONSTRAINT netzone_pkey PRIMARY KEY (name); 1601 3579 1602 3580 1603 3581 -- 1604 -- Name: objects_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 1605 -- 1606 1607 ALTER TABLE ONLY objects 3582 -- Name: objectslogs objectlogs_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3583 -- 3584 3585 ALTER TABLE ONLY public.objectslogs 3586 ADD CONSTRAINT objectlogs_pkey PRIMARY KEY (logkey); 3587 3588 3589 -- 3590 -- Name: objects objects_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3591 -- 3592 3593 ALTER TABLE ONLY public.objects 1608 3594 ADD CONSTRAINT objects_pkey PRIMARY KEY (ikey); 1609 3595 1610 3596 1611 3597 -- 1612 -- Name: p_attr_l_c_uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1613 -- 1614 1615 ALTER TABLE ONLY user_attributes_list3598 -- Name: user_attributes_list p_attr_l_c_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3599 -- 3600 3601 ALTER TABLE ONLY public.user_attributes_list 1616 3602 ADD CONSTRAINT p_attr_l_c_uniq UNIQUE (canonical); 1617 3603 1618 3604 1619 3605 -- 1620 -- Name: p_attr_list_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1621 -- 1622 1623 ALTER TABLE ONLY user_attributes_list3606 -- Name: user_attributes_list p_attr_list_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3607 -- 3608 3609 ALTER TABLE ONLY public.user_attributes_list 1624 3610 ADD CONSTRAINT p_attr_list_pkey PRIMARY KEY (ikey); 1625 3611 1626 3612 1627 3613 -- 1628 -- Name: person_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 1629 -- 1630 1631 ALTER TABLE ONLY "user" 3614 -- Name: passwordreset passwordreset_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3615 -- 3616 3617 ALTER TABLE ONLY public.passwordreset 3618 ADD CONSTRAINT passwordreset_pkey PRIMARY KEY (id); 3619 3620 3621 -- 3622 -- Name: user person_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3623 -- 3624 3625 ALTER TABLE ONLY public."user" 1632 3626 ADD CONSTRAINT person_pkey PRIMARY KEY (name); 1633 3627 1634 3628 1635 3629 -- 1636 -- Name: person_uid_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1637 -- 1638 1639 ALTER TABLE ONLY "user"3630 -- Name: user person_uid_key; Type: CONSTRAINT; Schema: public; Owner: - 3631 -- 3632 3633 ALTER TABLE ONLY public."user" 1640 3634 ADD CONSTRAINT person_uid_key UNIQUE (uidnumber); 1641 3635 1642 3636 1643 3637 -- 1644 -- Name: revaliases_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 1645 -- 1646 1647 ALTER TABLE ONLY revaliases 3638 -- Name: request request_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3639 -- 3640 3641 ALTER TABLE ONLY public.request 3642 ADD CONSTRAINT request_pkey PRIMARY KEY (id); 3643 3644 3645 -- 3646 -- Name: revaliases revaliases_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3647 -- 3648 3649 ALTER TABLE ONLY public.revaliases 1648 3650 ADD CONSTRAINT revaliases_pkey PRIMARY KEY (name); 1649 3651 1650 3652 1651 3653 -- 1652 -- Name: revisions _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1653 -- 1654 1655 ALTER TABLE ONLY revisions3654 -- Name: revisions revisions_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3655 -- 3656 3657 ALTER TABLE ONLY public.revisions 1656 3658 ADD CONSTRAINT revisions_pkey PRIMARY KEY (ikey); 1657 3659 1658 3660 1659 3661 -- 1660 -- Name: s _attr_l_c_uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1661 -- 1662 1663 ALTER TABLE ONLY site_attributes_list3662 -- Name: site_attributes_list s_attr_l_c_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3663 -- 3664 3665 ALTER TABLE ONLY public.site_attributes_list 1664 3666 ADD CONSTRAINT s_attr_l_c_uniq UNIQUE (canonical); 1665 3667 1666 3668 1667 3669 -- 1668 -- Name: s _attr_list_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1669 -- 1670 1671 ALTER TABLE ONLY site_attributes_list3670 -- Name: site_attributes_list s_attr_list_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3671 -- 3672 3673 ALTER TABLE ONLY public.site_attributes_list 1672 3674 ADD CONSTRAINT s_attr_list_pkey PRIMARY KEY (ikey); 1673 3675 1674 3676 1675 3677 -- 1676 -- Name: settings_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 1677 -- 1678 1679 ALTER TABLE ONLY settings 3678 -- Name: service_attributes_list service_attributes_list_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3679 -- 3680 3681 ALTER TABLE ONLY public.service_attributes_list 3682 ADD CONSTRAINT service_attributes_list_pkey PRIMARY KEY (ikey); 3683 3684 3685 -- 3686 -- Name: service_attributes service_attributes_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3687 -- 3688 3689 ALTER TABLE ONLY public.service_attributes 3690 ADD CONSTRAINT service_attributes_pkey PRIMARY KEY (attr_key); 3691 3692 3693 -- 3694 -- Name: service_attributes_users service_attributes_user_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3695 -- 3696 3697 ALTER TABLE ONLY public.service_attributes_users 3698 ADD CONSTRAINT service_attributes_user_pkey PRIMARY KEY (attr_key); 3699 3700 3701 -- 3702 -- Name: service_attributes_users service_attributes_users_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3703 -- 3704 3705 ALTER TABLE ONLY public.service_attributes_users 3706 ADD CONSTRAINT service_attributes_users_uniq UNIQUE (okey, attr, value); 3707 3708 3709 -- 3710 -- Name: service service_ikey_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3711 -- 3712 3713 ALTER TABLE ONLY public.service 3714 ADD CONSTRAINT service_ikey_uniq UNIQUE (ikey); 3715 3716 3717 -- 3718 -- Name: service service_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3719 -- 3720 3721 ALTER TABLE ONLY public.service 3722 ADD CONSTRAINT service_pkey PRIMARY KEY (name); 3723 3724 3725 -- 3726 -- Name: settings settings_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3727 -- 3728 3729 ALTER TABLE ONLY public.settings 1680 3730 ADD CONSTRAINT settings_pkey PRIMARY KEY (varname); 1681 3731 1682 3732 1683 3733 -- 1684 -- Name: site_attributes _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1685 -- 1686 1687 ALTER TABLE ONLY site_attributes3734 -- Name: site_attributes site_attributes_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3735 -- 3736 3737 ALTER TABLE ONLY public.site_attributes 1688 3738 ADD CONSTRAINT site_attributes_pkey PRIMARY KEY (attr_key); 1689 3739 1690 3740 1691 3741 -- 1692 -- Name: site _okey_uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1693 -- 1694 1695 ALTER TABLE ONLY site3742 -- Name: site site_okey_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3743 -- 3744 3745 ALTER TABLE ONLY public.site 1696 3746 ADD CONSTRAINT site_okey_uniq UNIQUE (ikey); 1697 3747 1698 3748 1699 3749 -- 1700 -- Name: site _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1701 -- 1702 1703 ALTER TABLE ONLY site3750 -- Name: site site_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3751 -- 3752 3753 ALTER TABLE ONLY public.site 1704 3754 ADD CONSTRAINT site_pkey PRIMARY KEY (name); 1705 3755 1706 3756 1707 3757 -- 1708 -- Name: su_type_name_uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: 1709 -- 1710 1711 ALTER TABLE ONLY su_type 3758 -- Name: stat_attributes_list stat_attr_l_c_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3759 -- 3760 3761 ALTER TABLE ONLY public.stat_attributes_list 3762 ADD CONSTRAINT stat_attr_l_c_uniq UNIQUE (canonical); 3763 3764 3765 -- 3766 -- Name: stat_attributes_list stat_attr_list_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3767 -- 3768 3769 ALTER TABLE ONLY public.stat_attributes_list 3770 ADD CONSTRAINT stat_attr_list_pkey PRIMARY KEY (ikey); 3771 3772 3773 -- 3774 -- Name: stat_attributes stat_attributes_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3775 -- 3776 3777 ALTER TABLE ONLY public.stat_attributes 3778 ADD CONSTRAINT stat_attributes_pkey PRIMARY KEY (attr_key); 3779 3780 3781 -- 3782 -- Name: stat stat_okey_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3783 -- 3784 3785 ALTER TABLE ONLY public.stat 3786 ADD CONSTRAINT stat_okey_uniq UNIQUE (ikey); 3787 3788 3789 -- 3790 -- Name: stat stat_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3791 -- 3792 3793 ALTER TABLE ONLY public.stat 3794 ADD CONSTRAINT stat_pkey PRIMARY KEY (name); 3795 3796 3797 -- 3798 -- Name: statsentry statsentry_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3799 -- 3800 3801 ALTER TABLE ONLY public.statsentry 3802 ADD CONSTRAINT statsentry_pkey PRIMARY KEY (id); 3803 3804 3805 -- 3806 -- Name: statvalues statvalues_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3807 -- 3808 3809 ALTER TABLE ONLY public.statvalues 3810 ADD CONSTRAINT statvalues_pkey PRIMARY KEY (sid, value); 3811 3812 3813 -- 3814 -- Name: su_type su_type_name_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3815 -- 3816 3817 ALTER TABLE ONLY public.su_type 1712 3818 ADD CONSTRAINT su_type_name_uniq UNIQUE (name); 1713 3819 1714 3820 1715 3821 -- 1716 -- Name: su_type _pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1717 -- 1718 1719 ALTER TABLE ONLY su_type3822 -- Name: su_type su_type_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3823 -- 3824 3825 ALTER TABLE ONLY public.su_type 1720 3826 ADD CONSTRAINT su_type_pkey PRIMARY KEY (ikey); 1721 3827 1722 3828 1723 3829 -- 1724 -- Name: user_attr _groups_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1725 -- 1726 1727 ALTER TABLE ONLY user_attributes_groups3830 -- Name: user_attributes_groups user_attr_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3831 -- 3832 3833 ALTER TABLE ONLY public.user_attributes_groups 1728 3834 ADD CONSTRAINT user_attr_groups_pkey PRIMARY KEY (attr_key); 1729 3835 1730 3836 1731 3837 -- 1732 -- Name: user_attr _site_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1733 -- 1734 1735 ALTER TABLE ONLY user_attributes_site3838 -- Name: user_attributes_site user_attr_site_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3839 -- 3840 3841 ALTER TABLE ONLY public.user_attributes_site 1736 3842 ADD CONSTRAINT user_attr_site_pkey PRIMARY KEY (attr_key); 1737 3843 1738 3844 1739 3845 -- 1740 -- Name: user_attr _user_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1741 -- 1742 1743 ALTER TABLE ONLY user_attributes_users3846 -- Name: user_attributes_users user_attr_user_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3847 -- 3848 3849 ALTER TABLE ONLY public.user_attributes_users 1744 3850 ADD CONSTRAINT user_attr_user_pkey PRIMARY KEY (attr_key); 1745 3851 1746 3852 1747 3853 -- 1748 -- Name: user_attributes_ pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1749 -- 1750 1751 ALTER TABLE ONLY user_attributes_base3854 -- Name: user_attributes_base user_attributes_pkey; Type: CONSTRAINT; Schema: public; Owner: - 3855 -- 3856 3857 ALTER TABLE ONLY public.user_attributes_base 1752 3858 ADD CONSTRAINT user_attributes_pkey PRIMARY KEY (attr_key); 1753 3859 1754 3860 1755 3861 -- 1756 -- Name: user _ikey_uniq; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:1757 -- 1758 1759 ALTER TABLE ONLY "user"3862 -- Name: user user_ikey_uniq; Type: CONSTRAINT; Schema: public; Owner: - 3863 -- 3864 3865 ALTER TABLE ONLY public."user" 1760 3866 ADD CONSTRAINT user_ikey_uniq UNIQUE (ikey); 1761 3867 1762 3868 1763 3869 -- 1764 -- Name: address_attr_base_attr_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 1765 -- 1766 1767 CREATE INDEX address_attr_base_attr_idx ON address_attributes_base USING btree (attr); 1768 1769 1770 -- 1771 -- Name: address_exported_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 1772 -- 1773 1774 CREATE INDEX address_exported_idx ON address USING btree (exported); 1775 1776 1777 -- 1778 -- Name: aliases_exported_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 1779 -- 1780 1781 CREATE INDEX aliases_exported_idx ON aliases USING btree (exported); 1782 1783 1784 -- 1785 -- Name: aliases_forwards_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 1786 -- 1787 1788 CREATE INDEX aliases_forwards_idx ON aliases USING gin (forward); 1789 1790 1791 -- 1792 -- Name: aliases_forwards_lower_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 1793 -- 1794 1795 CREATE INDEX aliases_forwards_lower_idx ON aliases USING gin (string_to_array(lower(array_to_string(forward, ','::text)), ','::text)); 1796 1797 1798 -- 1799 -- Name: aliases_name_lower_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 1800 -- 1801 1802 CREATE UNIQUE INDEX aliases_name_lower_idx ON aliases USING btree (lower(name)); 1803 1804 1805 -- 1806 -- Name: aliases_rev_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 1807 -- 1808 1809 CREATE INDEX aliases_rev_idx ON aliases USING btree (rev); 1810 1811 1812 -- 1813 -- Name: fki_accreq_attr_okey_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1814 -- 1815 1816 CREATE INDEX fki_accreq_attr_okey_fkey ON accreq_attributes USING btree (okey); 1817 1818 1819 -- 1820 -- Name: fki_accreq_attributes_list_attr_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1821 -- 1822 1823 CREATE INDEX fki_accreq_attributes_list_attr_fkey ON accreq_attributes USING btree (attr); 1824 1825 1826 -- 1827 -- Name: fki_address_attr_site_okey_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1828 -- 1829 1830 CREATE INDEX fki_address_attr_site_okey_fkey ON address_attributes_site USING btree (okey); 1831 1832 1833 -- 1834 -- Name: fki_address_attributes_okey_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1835 -- 1836 1837 CREATE INDEX fki_address_attributes_okey_fkey ON address_attributes_base USING btree (okey); 1838 1839 1840 -- 1841 -- Name: fki_address_attributes_site_attr_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1842 -- 1843 1844 CREATE INDEX fki_address_attributes_site_attr_fkey ON address_attributes_site USING btree (attr); 1845 1846 1847 -- 1848 -- Name: fki_address_attributes_site_value_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1849 -- 1850 1851 CREATE INDEX fki_address_attributes_site_value_fkey ON address_attributes_site USING btree (value); 1852 1853 1854 -- 1855 -- Name: fki_address_user_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1856 -- 1857 1858 CREATE INDEX fki_address_user_fkey ON address USING btree ("user"); 1859 1860 1861 -- 1862 -- Name: fki_group_attr_okey_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1863 -- 1864 1865 CREATE INDEX fki_group_attr_okey_fkey ON group_attributes_base USING btree (okey); 1866 1867 1868 -- 1869 -- Name: fki_group_attr_sutypes_okey_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1870 -- 1871 1872 CREATE INDEX fki_group_attr_sutypes_okey_fkey ON group_attributes_sutypes USING btree (okey); 1873 1874 1875 -- 1876 -- Name: fki_group_attr_users_okey_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1877 -- 1878 1879 CREATE INDEX fki_group_attr_users_okey_fkey ON group_attributes_users USING btree (okey); 1880 1881 1882 -- 1883 -- Name: fki_group_attributes_sutypes_attr; Type: INDEX; Schema: public; Owner: -; Tablespace: 1884 -- 1885 1886 CREATE INDEX fki_group_attributes_sutypes_attr ON group_attributes_sutypes USING btree (attr); 1887 1888 1889 -- 1890 -- Name: fki_group_attributes_sutypes_sutype_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1891 -- 1892 1893 CREATE INDEX fki_group_attributes_sutypes_sutype_fkey ON group_attributes_sutypes USING btree (value); 1894 1895 1896 -- 1897 -- Name: fki_group_attributes_users_attr_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1898 -- 1899 1900 CREATE INDEX fki_group_attributes_users_attr_fkey ON group_attributes_users USING btree (attr); 1901 1902 1903 -- 1904 -- Name: fki_group_attributes_users_user_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1905 -- 1906 1907 CREATE INDEX fki_group_attributes_users_user_fkey ON group_attributes_users USING btree (value); 1908 1909 1910 -- 1911 -- Name: fki_nethost_attr_ip_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1912 -- 1913 1914 CREATE INDEX fki_nethost_attr_ip_fkey ON nethost_attributes_ips USING btree (okey); 1915 1916 1917 -- 1918 -- Name: fki_nethost_attr_mac_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1919 -- 1920 1921 CREATE INDEX fki_nethost_attr_mac_fkey ON nethost_attributes_macs USING btree (okey); 1922 1923 1924 -- 1925 -- Name: fki_nethost_attr_users_okey_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1926 -- 1927 1928 CREATE INDEX fki_nethost_attr_users_okey_fkey ON nethost_attributes_users USING btree (okey); 1929 1930 1931 -- 1932 -- Name: fki_nethost_attributes_attr_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1933 -- 1934 1935 CREATE INDEX fki_nethost_attributes_attr_fkey ON nethost_attributes USING btree (attr); 1936 1937 1938 -- 1939 -- Name: fki_nethost_attributes_users_attr_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1940 -- 1941 1942 CREATE INDEX fki_nethost_attributes_users_attr_fkey ON nethost_attributes_users USING btree (attr); 1943 1944 1945 -- 1946 -- Name: fki_nethost_attributes_users_user_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1947 -- 1948 1949 CREATE INDEX fki_nethost_attributes_users_user_fkey ON nethost_attributes_users USING btree (value); 1950 1951 1952 -- 1953 -- Name: fki_netzone_attr_netzone_okey_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1954 -- 1955 1956 CREATE INDEX fki_netzone_attr_netzone_okey_fkey ON netzone_attributes_netzone USING btree (okey); 1957 1958 1959 -- 1960 -- Name: fki_netzone_attr_site_okey_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1961 -- 1962 1963 CREATE INDEX fki_netzone_attr_site_okey_fkey ON netzone_attributes_site USING btree (okey); 1964 1965 1966 -- 1967 -- Name: fki_netzone_attributes_attr_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1968 -- 1969 1970 CREATE INDEX fki_netzone_attributes_attr_fkey ON netzone_attributes USING btree (attr); 1971 1972 1973 -- 1974 -- Name: fki_netzone_attributes_netzone_attr_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1975 -- 1976 1977 CREATE INDEX fki_netzone_attributes_netzone_attr_fkey ON netzone_attributes_netzone USING btree (attr); 1978 1979 1980 -- 1981 -- Name: fki_netzone_attributes_netzone_value_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1982 -- 1983 1984 CREATE INDEX fki_netzone_attributes_netzone_value_fkey ON netzone_attributes_netzone USING btree (value); 1985 1986 1987 -- 1988 -- Name: fki_netzone_attributes_site_attr_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1989 -- 1990 1991 CREATE INDEX fki_netzone_attributes_site_attr_fkey ON netzone_attributes_site USING btree (attr); 1992 1993 1994 -- 1995 -- Name: fki_netzone_attributes_site_value_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 1996 -- 1997 1998 CREATE INDEX fki_netzone_attributes_site_value_fkey ON netzone_attributes_site USING btree (value); 1999 2000 2001 -- 2002 -- Name: fki_revaliase_name_user_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 2003 -- 2004 2005 CREATE INDEX fki_revaliase_name_user_fkey ON revaliases USING btree (name); 2006 2007 2008 -- 2009 -- Name: fki_revaliases_user_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 2010 -- 2011 2012 CREATE INDEX fki_revaliases_user_fkey ON revaliases USING btree (name); 2013 2014 2015 -- 2016 -- Name: fki_site_attributes_attr_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 2017 -- 2018 2019 CREATE INDEX fki_site_attributes_attr_fkey ON site_attributes USING btree (attr); 2020 2021 2022 -- 2023 -- Name: fki_user_attr_groups_okey_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 2024 -- 2025 2026 CREATE INDEX fki_user_attr_groups_okey_fkey ON user_attributes_groups USING btree (okey); 2027 2028 2029 -- 2030 -- Name: fki_user_attr_okey_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 2031 -- 2032 2033 CREATE INDEX fki_user_attr_okey_fkey ON user_attributes_base USING btree (okey); 2034 2035 2036 -- 2037 -- Name: fki_user_attr_site_okey_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 2038 -- 2039 2040 CREATE INDEX fki_user_attr_site_okey_fkey ON user_attributes_site USING btree (okey); 2041 2042 2043 -- 2044 -- Name: fki_user_attr_users_okey_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 2045 -- 2046 2047 CREATE INDEX fki_user_attr_users_okey_fkey ON user_attributes_users USING btree (okey); 2048 2049 2050 -- 2051 -- Name: fki_user_attributes_attr_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 2052 -- 2053 2054 CREATE INDEX fki_user_attributes_attr_fkey ON user_attributes_base USING btree (attr); 2055 2056 2057 -- 2058 -- Name: fki_user_attributes_groups_attr_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 2059 -- 2060 2061 CREATE INDEX fki_user_attributes_groups_attr_fkey ON user_attributes_groups USING btree (attr); 2062 2063 2064 -- 2065 -- Name: fki_user_attributes_groups_value_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 2066 -- 2067 2068 CREATE INDEX fki_user_attributes_groups_value_fkey ON user_attributes_groups USING btree (value); 2069 2070 2071 -- 2072 -- Name: fki_user_attributes_site_attr_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 2073 -- 2074 2075 CREATE INDEX fki_user_attributes_site_attr_fkey ON user_attributes_site USING btree (attr); 2076 2077 2078 -- 2079 -- Name: fki_user_attributes_site_value_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 2080 -- 2081 2082 CREATE INDEX fki_user_attributes_site_value_fkey ON user_attributes_site USING btree (value); 2083 2084 2085 -- 2086 -- Name: fki_user_attributes_users_attr_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 2087 -- 2088 2089 CREATE INDEX fki_user_attributes_users_attr_fkey ON user_attributes_users USING btree (attr); 2090 2091 2092 -- 2093 -- Name: fki_user_attributes_users_value_fkey; Type: INDEX; Schema: public; Owner: -; Tablespace: 2094 -- 2095 2096 CREATE INDEX fki_user_attributes_users_value_fkey ON user_attributes_users USING btree (value); 2097 2098 2099 -- 2100 -- Name: group_attributes_base_value_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2101 -- 2102 2103 CREATE INDEX group_attributes_base_value_idx ON group_attributes_base USING btree (value); 2104 2105 2106 -- 2107 -- Name: group_exported_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2108 -- 2109 2110 CREATE INDEX group_exported_idx ON "group" USING btree (exported); 2111 2112 2113 -- 2114 -- Name: group_rev_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2115 -- 2116 2117 CREATE INDEX group_rev_idx ON "group" USING btree (rev); 2118 2119 2120 -- 2121 -- Name: nethost_attr_value_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2122 -- 2123 2124 CREATE INDEX nethost_attr_value_idx ON nethost_attributes USING btree (value); 2125 2126 2127 -- 2128 -- Name: nethost_attributes_ip_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2129 -- 2130 2131 CREATE UNIQUE INDEX nethost_attributes_ip_idx ON nethost_attributes_ips USING btree (((value)::inet)); 2132 2133 2134 -- 2135 -- Name: nethost_attributes_mac_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2136 -- 2137 2138 CREATE UNIQUE INDEX nethost_attributes_mac_idx ON nethost_attributes_macs USING btree (((value)::macaddr)); 2139 2140 2141 -- 2142 -- Name: nethost_cname_uniq_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2143 -- 2144 2145 CREATE UNIQUE INDEX nethost_cname_uniq_idx ON nethost_attributes USING btree (value) WHERE (attr = 'cname'::text); 2146 2147 2148 -- 2149 -- Name: netzone_attr_value_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2150 -- 2151 2152 CREATE INDEX netzone_attr_value_idx ON netzone_attributes USING btree (value); 2153 2154 2155 -- 2156 -- Name: netzone_attributes_net_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2157 -- 2158 2159 CREATE UNIQUE INDEX netzone_attributes_net_idx ON netzone_attributes USING btree (((value)::inet), attr, okey) WHERE (attr = 'net'::text); 2160 2161 2162 -- 2163 -- Name: netzone_attributes_netexclude_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2164 -- 2165 2166 CREATE UNIQUE INDEX netzone_attributes_netexclude_idx ON netzone_attributes USING btree (((value)::inet), attr, okey) WHERE (attr = 'netExclude'::text); 2167 2168 2169 -- 2170 -- Name: person_rev_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2171 -- 2172 2173 CREATE INDEX person_rev_idx ON "user" USING btree (rev); 2174 2175 2176 -- 2177 -- Name: revaliases_as_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2178 -- 2179 2180 CREATE INDEX revaliases_as_idx ON revaliases USING btree ("as"); 2181 2182 2183 -- 2184 -- Name: revaliases_as_lower_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2185 -- 2186 2187 CREATE INDEX revaliases_as_lower_idx ON revaliases USING btree (lower("as")); 2188 2189 2190 -- 2191 -- Name: revaliases_exported_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2192 -- 2193 2194 CREATE INDEX revaliases_exported_idx ON revaliases USING btree (exported); 2195 2196 2197 -- 2198 -- Name: revaliases_rev_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2199 -- 2200 2201 CREATE INDEX revaliases_rev_idx ON revaliases USING btree (rev); 2202 2203 2204 -- 2205 -- Name: site_attr_value_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2206 -- 2207 2208 CREATE INDEX site_attr_value_idx ON site_attributes USING btree (value); 2209 2210 2211 -- 2212 -- Name: site_exported_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2213 -- 2214 2215 CREATE INDEX site_exported_idx ON site USING btree (exported); 2216 2217 2218 -- 2219 -- Name: site_rev_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2220 -- 2221 2222 CREATE UNIQUE INDEX site_rev_idx ON site USING btree (rev); 2223 2224 2225 -- 2226 -- Name: user_attr_value_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2227 -- 2228 2229 CREATE INDEX user_attr_value_idx ON user_attributes_base USING btree (value); 2230 2231 2232 -- 2233 -- Name: user_expire_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2234 -- 2235 2236 CREATE INDEX user_expire_idx ON "user" USING btree (expire); 2237 2238 2239 -- 2240 -- Name: user_exported_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: 2241 -- 2242 2243 CREATE INDEX user_exported_idx ON "user" USING btree (exported); 2244 2245 2246 -- 2247 -- Name: address_attributes_insert; Type: RULE; Schema: public; Owner: - 2248 -- 2249 2250 CREATE RULE address_attributes_insert AS ON INSERT TO address_attributes DO INSTEAD INSERT INTO address_attributes_base (value, attr, attr_key, okey) VALUES (new.value, new.attr, new.attr_key, new.okey); 2251 2252 2253 -- 2254 -- Name: address_attributes_update; Type: RULE; Schema: public; Owner: - 2255 -- 2256 2257 CREATE RULE address_attributes_update AS ON UPDATE TO address_attributes DO INSTEAD UPDATE address_attributes_base SET value = new.value, attr = new.attr, attr_key = new.attr_key, okey = new.okey WHERE ((address_attributes_base.attr_key = old.attr_key) AND (address_attributes_base.attr = old.attr)); 2258 2259 2260 -- 2261 -- Name: address_atttributes_delete; Type: RULE; Schema: public; Owner: - 2262 -- 2263 2264 CREATE RULE address_atttributes_delete AS ON DELETE TO address_attributes DO INSTEAD DELETE FROM address_attributes_base WHERE ((address_attributes_base.attr_key = old.attr_key) AND (address_attributes_base.attr = old.attr)); 2265 2266 2267 -- 2268 -- Name: group_attributes_insert; Type: RULE; Schema: public; Owner: - 2269 -- 2270 2271 CREATE RULE group_attributes_insert AS ON INSERT TO group_attributes DO INSTEAD INSERT INTO group_attributes_base (value, attr, attr_key, okey) VALUES (new.value, new.attr, new.attr_key, new.okey); 2272 2273 2274 -- 2275 -- Name: group_attributes_update; Type: RULE; Schema: public; Owner: - 2276 -- 2277 2278 CREATE RULE group_attributes_update AS ON UPDATE TO group_attributes DO INSTEAD UPDATE group_attributes_base SET value = new.value, attr = new.attr, attr_key = new.attr_key, okey = new.okey WHERE ((group_attributes_base.attr_key = old.attr_key) AND (group_attributes_base.attr = old.attr)); 2279 2280 2281 -- 2282 -- Name: group_atttributes_delete; Type: RULE; Schema: public; Owner: - 2283 -- 2284 2285 CREATE RULE group_atttributes_delete AS ON DELETE TO group_attributes DO INSTEAD DELETE FROM group_attributes_base WHERE ((group_attributes_base.attr_key = old.attr_key) AND (group_attributes_base.attr = old.attr)); 2286 2287 2288 -- 2289 -- Name: user_attributes_insert; Type: RULE; Schema: public; Owner: - 2290 -- 2291 2292 CREATE RULE user_attributes_insert AS ON INSERT TO user_attributes DO INSTEAD INSERT INTO user_attributes_base (value, attr, attr_key, okey) VALUES (new.value, new.attr, new.attr_key, new.okey); 2293 2294 2295 -- 2296 -- Name: user_attributes_update; Type: RULE; Schema: public; Owner: - 2297 -- 2298 2299 CREATE RULE user_attributes_update AS ON UPDATE TO user_attributes DO INSTEAD UPDATE user_attributes_base SET value = new.value, attr = new.attr, attr_key = new.attr_key, okey = new.okey WHERE ((user_attributes_base.attr_key = old.attr_key) AND (user_attributes_base.attr = old.attr)); 2300 2301 2302 -- 2303 -- Name: user_atttributes_delete; Type: RULE; Schema: public; Owner: - 2304 -- 2305 2306 CREATE RULE user_atttributes_delete AS ON DELETE TO user_attributes DO INSTEAD DELETE FROM user_attributes_base WHERE ((user_attributes_base.attr_key = old.attr_key) AND (user_attributes_base.attr = old.attr)); 2307 2308 2309 -- 2310 -- Name: accreq_update_rev_tg; Type: TRIGGER; Schema: public; Owner: - 2311 -- 2312 2313 CREATE TRIGGER accreq_update_rev_tg 2314 BEFORE INSERT OR DELETE OR UPDATE ON accreq 2315 FOR EACH ROW 2316 EXECUTE PROCEDURE rev_tg_f(); 2317 2318 2319 -- 2320 -- Name: address_attr_update_ref_a_s; Type: TRIGGER; Schema: public; Owner: - 2321 -- 2322 2323 CREATE TRIGGER address_attr_update_ref_a_s 2324 AFTER INSERT OR DELETE OR UPDATE ON address_attributes_site 2325 FOR EACH ROW 2326 EXECUTE PROCEDURE address_attr_update_ref(); 2327 2328 2329 -- 2330 -- Name: address_attr_update_ref_tg; Type: TRIGGER; Schema: public; Owner: - 2331 -- 2332 2333 CREATE TRIGGER address_attr_update_ref_tg 2334 AFTER INSERT OR DELETE OR UPDATE ON address_attributes_base 2335 FOR EACH ROW 2336 EXECUTE PROCEDURE address_attr_update_ref(); 2337 2338 2339 -- 2340 -- Name: address_sort_fields_tg; Type: TRIGGER; Schema: public; Owner: - 2341 -- 2342 2343 CREATE TRIGGER address_sort_fields_tg 2344 BEFORE INSERT OR DELETE OR UPDATE ON address_attributes_base 2345 FOR EACH ROW 2346 EXECUTE PROCEDURE address_sort_fields(); 2347 2348 2349 -- 2350 -- Name: address_update_rev_tg; Type: TRIGGER; Schema: public; Owner: - 2351 -- 2352 2353 CREATE TRIGGER address_update_rev_tg 2354 BEFORE INSERT OR DELETE OR UPDATE ON address 2355 FOR EACH ROW 2356 EXECUTE PROCEDURE rev_tg_f(); 2357 2358 2359 -- 2360 -- Name: address_update_user_rev_tg; Type: TRIGGER; Schema: public; Owner: - 2361 -- 2362 2363 CREATE TRIGGER address_update_user_rev_tg 2364 AFTER INSERT OR DELETE OR UPDATE ON address 2365 FOR EACH ROW 2366 EXECUTE PROCEDURE address_update_user_rev(); 2367 2368 2369 -- 2370 -- Name: aliases_nickname_tg; Type: TRIGGER; Schema: public; Owner: - 2371 -- 2372 2373 CREATE TRIGGER aliases_nickname_tg 2374 AFTER DELETE OR UPDATE ON aliases 2375 FOR EACH ROW 2376 EXECUTE PROCEDURE aliases_nickname(); 2377 2378 2379 -- 2380 -- Name: aliases_rev_tg; Type: TRIGGER; Schema: public; Owner: - 2381 -- 2382 2383 CREATE TRIGGER aliases_rev_tg 2384 BEFORE INSERT OR DELETE OR UPDATE ON aliases 2385 FOR EACH ROW 2386 EXECUTE PROCEDURE rev_tg_f(); 2387 2388 2389 -- 2390 -- Name: department_group_upd_tg; Type: TRIGGER; Schema: public; Owner: - 2391 -- 2392 2393 CREATE TRIGGER department_group_upd_tg 2394 AFTER INSERT OR UPDATE ON user_attributes_groups 2395 FOR EACH ROW 2396 EXECUTE PROCEDURE department_group_upd_f(); 2397 2398 2399 -- 2400 -- Name: fmt_macaddr_tg; Type: TRIGGER; Schema: public; Owner: - 2401 -- 2402 2403 CREATE TRIGGER fmt_macaddr_tg 2404 BEFORE INSERT OR UPDATE ON nethost_attributes_macs 2405 FOR EACH ROW 2406 EXECUTE PROCEDURE fmt_macaddr(); 2407 2408 2409 -- 2410 -- Name: group_attr_update; Type: TRIGGER; Schema: public; Owner: - 2411 -- 2412 2413 CREATE TRIGGER group_attr_update 2414 AFTER INSERT OR DELETE OR UPDATE ON group_attributes_base 2415 FOR EACH ROW 2416 EXECUTE PROCEDURE group_attr_update_ref(); 2417 2418 2419 -- 2420 -- Name: group_attr_user_update_user_ref_tg; Type: TRIGGER; Schema: public; Owner: - 2421 -- 2422 2423 CREATE TRIGGER group_attr_user_update_user_ref_tg 2424 AFTER INSERT OR DELETE OR UPDATE ON group_attributes_users 2425 FOR EACH ROW 2426 EXECUTE PROCEDURE group_attr_user_update_user_ref(); 2427 2428 2429 -- 2430 -- Name: group_attributes_sutypes_update_ref; Type: TRIGGER; Schema: public; Owner: - 2431 -- 2432 2433 CREATE TRIGGER group_attributes_sutypes_update_ref 2434 AFTER INSERT OR DELETE OR UPDATE ON group_attributes_sutypes 2435 FOR EACH ROW 2436 EXECUTE PROCEDURE group_attr_update_ref(); 2437 2438 2439 -- 2440 -- Name: group_attributes_users_update_ref; Type: TRIGGER; Schema: public; Owner: - 2441 -- 2442 2443 CREATE TRIGGER group_attributes_users_update_ref 2444 AFTER INSERT OR DELETE OR UPDATE ON group_attributes_users 2445 FOR EACH ROW 2446 EXECUTE PROCEDURE group_attr_update_ref(); 2447 2448 2449 -- 2450 -- Name: group_rev_tg; Type: TRIGGER; Schema: public; Owner: - 2451 -- 2452 2453 CREATE TRIGGER group_rev_tg 2454 BEFORE DELETE OR UPDATE ON "group" 2455 FOR EACH ROW 2456 EXECUTE PROCEDURE rev_tg_f(); 2457 2458 2459 -- 2460 -- Name: group_sort_field_tg; Type: TRIGGER; Schema: public; Owner: - 2461 -- 2462 2463 CREATE TRIGGER group_sort_field_tg 2464 BEFORE INSERT OR DELETE OR UPDATE ON group_attributes_base 2465 FOR EACH ROW 2466 EXECUTE PROCEDURE group_sort_fields(); 2467 2468 2469 -- 2470 -- Name: nethost_attr_ip_update; Type: TRIGGER; Schema: public; Owner: - 2471 -- 2472 2473 CREATE TRIGGER nethost_attr_ip_update 2474 AFTER INSERT OR DELETE OR UPDATE ON nethost_attributes_ips 2475 FOR EACH ROW 2476 EXECUTE PROCEDURE nethost_attr_update_ref(); 2477 2478 2479 -- 2480 -- Name: nethost_attr_mac_update; Type: TRIGGER; Schema: public; Owner: - 2481 -- 2482 2483 CREATE TRIGGER nethost_attr_mac_update 2484 AFTER INSERT OR DELETE OR UPDATE ON nethost_attributes_macs 2485 FOR EACH ROW 2486 EXECUTE PROCEDURE nethost_attr_update_ref(); 2487 2488 2489 -- 2490 -- Name: nethost_attr_update; Type: TRIGGER; Schema: public; Owner: - 2491 -- 2492 2493 CREATE TRIGGER nethost_attr_update 2494 AFTER INSERT OR DELETE OR UPDATE ON nethost_attributes 2495 FOR EACH ROW 2496 EXECUTE PROCEDURE nethost_attr_update_ref(); 2497 2498 2499 -- 2500 -- Name: nethost_attributes_users_update_ref; Type: TRIGGER; Schema: public; Owner: - 2501 -- 2502 2503 CREATE TRIGGER nethost_attributes_users_update_ref 2504 AFTER INSERT OR DELETE OR UPDATE ON nethost_attributes_users 2505 FOR EACH ROW 2506 EXECUTE PROCEDURE nethost_attr_update_ref(); 2507 2508 2509 -- 2510 -- Name: nethost_sort_field_tg; Type: TRIGGER; Schema: public; Owner: - 2511 -- 2512 2513 CREATE TRIGGER nethost_sort_field_tg 2514 BEFORE INSERT OR DELETE OR UPDATE ON nethost_attributes 2515 FOR EACH ROW 2516 EXECUTE PROCEDURE nethost_sort_fields(); 2517 2518 2519 -- 2520 -- Name: nethost_upd_zone_tg_del; Type: TRIGGER; Schema: public; Owner: - 2521 -- 2522 2523 CREATE TRIGGER nethost_upd_zone_tg_del 2524 BEFORE DELETE ON nethost 2525 FOR EACH ROW 2526 EXECUTE PROCEDURE nethost_upd_zone(); 2527 2528 2529 -- 2530 -- Name: nethost_upd_zone_tg_insupd; Type: TRIGGER; Schema: public; Owner: - 2531 -- 2532 2533 CREATE TRIGGER nethost_upd_zone_tg_insupd 2534 AFTER INSERT OR UPDATE ON nethost 2535 FOR EACH ROW 2536 EXECUTE PROCEDURE nethost_upd_zone(); 2537 2538 2539 -- 2540 -- Name: nethost_update_rev_tg; Type: TRIGGER; Schema: public; Owner: - 2541 -- 2542 2543 CREATE TRIGGER nethost_update_rev_tg 2544 BEFORE INSERT OR DELETE OR UPDATE ON nethost 2545 FOR EACH ROW 2546 EXECUTE PROCEDURE rev_tg_f(); 2547 2548 2549 -- 2550 -- Name: nethostipdel_upd_zone_tg; Type: TRIGGER; Schema: public; Owner: - 2551 -- 2552 2553 CREATE TRIGGER nethostipdel_upd_zone_tg 2554 BEFORE DELETE ON nethost_attributes_ips 2555 FOR EACH ROW 2556 EXECUTE PROCEDURE nethostipdel_upd_zone(); 2557 2558 2559 -- 2560 -- Name: netzone_attr_update; Type: TRIGGER; Schema: public; Owner: - 2561 -- 2562 2563 CREATE TRIGGER netzone_attr_update 2564 AFTER INSERT OR DELETE OR UPDATE ON netzone_attributes 2565 FOR EACH ROW 2566 EXECUTE PROCEDURE netzone_attr_update_ref(); 2567 2568 2569 -- 2570 -- Name: netzone_attr_update_ref_a_s; Type: TRIGGER; Schema: public; Owner: - 2571 -- 2572 2573 CREATE TRIGGER netzone_attr_update_ref_a_s 2574 AFTER INSERT OR DELETE OR UPDATE ON netzone_attributes_site 2575 FOR EACH ROW 2576 EXECUTE PROCEDURE netzone_attr_update_ref(); 2577 2578 2579 -- 2580 -- Name: netzone_attr_update_ref_a_s; Type: TRIGGER; Schema: public; Owner: - 2581 -- 2582 2583 CREATE TRIGGER netzone_attr_update_ref_a_s 2584 AFTER INSERT OR DELETE OR UPDATE ON netzone_attributes_netzone 2585 FOR EACH ROW 2586 EXECUTE PROCEDURE netzone_attr_update_ref(); 2587 2588 2589 -- 2590 -- Name: netzone_sort_fields_tg; Type: TRIGGER; Schema: public; Owner: - 2591 -- 2592 2593 CREATE TRIGGER netzone_sort_fields_tg 2594 BEFORE INSERT OR DELETE OR UPDATE ON netzone_attributes 2595 FOR EACH ROW 2596 EXECUTE PROCEDURE netzone_sort_fields(); 2597 2598 2599 -- 2600 -- Name: netzone_update_rev_tg; Type: TRIGGER; Schema: public; Owner: - 2601 -- 2602 2603 CREATE TRIGGER netzone_update_rev_tg 2604 BEFORE INSERT OR DELETE OR UPDATE ON netzone 2605 FOR EACH ROW 2606 EXECUTE PROCEDURE rev_tg_f(); 2607 2608 2609 -- 2610 -- Name: person_attr_update; Type: TRIGGER; Schema: public; Owner: - 2611 -- 2612 2613 CREATE TRIGGER person_attr_update 2614 AFTER INSERT OR DELETE OR UPDATE ON user_attributes_base 2615 FOR EACH ROW 2616 EXECUTE PROCEDURE person_attr_update_ref(); 2617 2618 2619 -- 2620 -- Name: person_attr_update_ref_a_g; Type: TRIGGER; Schema: public; Owner: - 2621 -- 2622 2623 CREATE TRIGGER person_attr_update_ref_a_g 2624 AFTER INSERT OR DELETE OR UPDATE ON user_attributes_groups 2625 FOR EACH ROW 2626 EXECUTE PROCEDURE person_attr_update_ref(); 2627 2628 2629 -- 2630 -- Name: person_attr_update_ref_a_s; Type: TRIGGER; Schema: public; Owner: - 2631 -- 2632 2633 CREATE TRIGGER person_attr_update_ref_a_s 2634 AFTER INSERT OR DELETE OR UPDATE ON user_attributes_site 2635 FOR EACH ROW 2636 EXECUTE PROCEDURE person_attr_update_ref(); 2637 2638 2639 -- 2640 -- Name: person_attr_update_ref_a_u; Type: TRIGGER; Schema: public; Owner: - 2641 -- 2642 2643 CREATE TRIGGER person_attr_update_ref_a_u 2644 AFTER INSERT OR DELETE OR UPDATE ON user_attributes_users 2645 FOR EACH ROW 2646 EXECUTE PROCEDURE person_attr_update_ref(); 2647 2648 2649 -- 2650 -- Name: person_rev_tg; Type: TRIGGER; Schema: public; Owner: - 2651 -- 2652 2653 CREATE TRIGGER person_rev_tg 2654 BEFORE DELETE OR UPDATE ON "user" 2655 FOR EACH ROW 2656 EXECUTE PROCEDURE rev_tg_f(); 2657 2658 2659 -- 2660 -- Name: revaliases_rev_tg; Type: TRIGGER; Schema: public; Owner: - 2661 -- 2662 2663 CREATE TRIGGER revaliases_rev_tg 2664 BEFORE INSERT OR DELETE OR UPDATE ON revaliases 2665 FOR EACH ROW 2666 EXECUTE PROCEDURE rev_tg_f(); 2667 2668 2669 -- 2670 -- Name: revisions_rev_tg; Type: TRIGGER; Schema: public; Owner: - 2671 -- 2672 2673 CREATE TRIGGER revisions_rev_tg 2674 AFTER DELETE OR UPDATE ON revisions 2675 FOR EACH ROW 2676 EXECUTE PROCEDURE rev_tg_f(); 2677 2678 2679 -- 2680 -- Name: settings_revision_tg; Type: TRIGGER; Schema: public; Owner: - 2681 -- 2682 2683 CREATE TRIGGER settings_revision_tg 2684 BEFORE INSERT OR DELETE OR UPDATE ON settings 2685 FOR EACH ROW 2686 EXECUTE PROCEDURE rev_tg_f(); 2687 2688 2689 -- 2690 -- Name: site_attr_update; Type: TRIGGER; Schema: public; Owner: - 2691 -- 2692 2693 CREATE TRIGGER site_attr_update 2694 AFTER INSERT OR DELETE OR UPDATE ON site_attributes 2695 FOR EACH ROW 2696 EXECUTE PROCEDURE site_attr_update_ref(); 2697 2698 2699 -- 2700 -- Name: update_address_site_tg; Type: TRIGGER; Schema: public; Owner: - 2701 -- 2702 2703 CREATE TRIGGER update_address_site_tg 2704 BEFORE INSERT OR DELETE OR UPDATE ON site 2705 FOR EACH ROW 2706 EXECUTE PROCEDURE update_address_site(); 2707 2708 2709 -- 2710 -- Name: user_sort_field_tg; Type: TRIGGER; Schema: public; Owner: - 2711 -- 2712 2713 CREATE TRIGGER user_sort_field_tg 2714 BEFORE INSERT OR DELETE OR UPDATE ON user_attributes_base 2715 FOR EACH ROW 2716 EXECUTE PROCEDURE user_sort_fields(); 2717 2718 2719 -- 2720 -- Name: accreq_attr_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2721 -- 2722 2723 ALTER TABLE ONLY accreq_attributes 2724 ADD CONSTRAINT accreq_attr_okey_fkey FOREIGN KEY (okey) REFERENCES accreq(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 2725 2726 2727 -- 2728 -- Name: accreq_attributes_list_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2729 -- 2730 2731 ALTER TABLE ONLY accreq_attributes 2732 ADD CONSTRAINT accreq_attributes_list_attr_fkey FOREIGN KEY (attr) REFERENCES accreq_attributes_list(canonical); 2733 2734 2735 -- 2736 -- Name: address_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2737 -- 2738 2739 ALTER TABLE ONLY address_attributes_base 2740 ADD CONSTRAINT address_attr_fkey FOREIGN KEY (attr) REFERENCES address_attributes_list(canonical) ON UPDATE CASCADE; 2741 2742 2743 -- 2744 -- Name: address_attributes_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2745 -- 2746 2747 ALTER TABLE ONLY address_attributes_base 2748 ADD CONSTRAINT address_attributes_okey_fkey FOREIGN KEY (okey) REFERENCES address(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 2749 2750 2751 -- 2752 -- Name: address_attributes_site_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2753 -- 2754 2755 ALTER TABLE ONLY address_attributes_site 2756 ADD CONSTRAINT address_attributes_site_attr_fkey FOREIGN KEY (attr) REFERENCES address_attributes_list_site(canonical) ON UPDATE CASCADE; 2757 2758 2759 -- 2760 -- Name: address_attributes_site_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2761 -- 2762 2763 ALTER TABLE ONLY address_attributes_site 2764 ADD CONSTRAINT address_attributes_site_okey_fkey FOREIGN KEY (okey) REFERENCES address(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 2765 2766 2767 -- 2768 -- Name: address_attributes_site_value_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2769 -- 2770 2771 ALTER TABLE ONLY address_attributes_site 2772 ADD CONSTRAINT address_attributes_site_value_fkey FOREIGN KEY (value) REFERENCES site(name) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; 2773 2774 2775 -- 2776 -- Name: address_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2777 -- 2778 2779 ALTER TABLE ONLY address 2780 ADD CONSTRAINT address_user_fkey FOREIGN KEY ("user") REFERENCES "user"(name) ON UPDATE CASCADE ON DELETE CASCADE; 2781 2782 2783 -- 2784 -- Name: group_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2785 -- 2786 2787 ALTER TABLE ONLY group_attributes_base 2788 ADD CONSTRAINT group_attr_fkey FOREIGN KEY (attr) REFERENCES group_attributes_list(canonical) ON UPDATE CASCADE; 2789 2790 2791 -- 2792 -- Name: group_attr_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2793 -- 2794 2795 ALTER TABLE ONLY group_attributes_base 2796 ADD CONSTRAINT group_attr_okey_fkey FOREIGN KEY (okey) REFERENCES "group"(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 2797 2798 2799 -- 2800 -- Name: group_attr_sutypes_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2801 -- 2802 2803 ALTER TABLE ONLY group_attributes_sutypes 2804 ADD CONSTRAINT group_attr_sutypes_okey_fkey FOREIGN KEY (okey) REFERENCES "group"(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 2805 2806 2807 -- 2808 -- Name: group_attr_users_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2809 -- 2810 2811 ALTER TABLE ONLY group_attributes_users 2812 ADD CONSTRAINT group_attr_users_okey_fkey FOREIGN KEY (okey) REFERENCES "group"(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 2813 2814 2815 -- 2816 -- Name: group_attributes_sutypes_attr; Type: FK CONSTRAINT; Schema: public; Owner: - 2817 -- 2818 2819 ALTER TABLE ONLY group_attributes_sutypes 2820 ADD CONSTRAINT group_attributes_sutypes_attr FOREIGN KEY (attr) REFERENCES group_attributes_list(canonical) ON UPDATE CASCADE; 2821 2822 2823 -- 2824 -- Name: group_attributes_sutypes_sutype_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2825 -- 2826 2827 ALTER TABLE ONLY group_attributes_sutypes 2828 ADD CONSTRAINT group_attributes_sutypes_sutype_fkey FOREIGN KEY (value) REFERENCES su_type(name) ON UPDATE CASCADE ON DELETE CASCADE; 2829 2830 2831 -- 2832 -- Name: group_attributes_users_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2833 -- 2834 2835 ALTER TABLE ONLY group_attributes_users 2836 ADD CONSTRAINT group_attributes_users_attr_fkey FOREIGN KEY (attr) REFERENCES group_attributes_list(canonical) ON UPDATE CASCADE; 2837 2838 2839 -- 2840 -- Name: group_attributes_users_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2841 -- 2842 2843 ALTER TABLE ONLY group_attributes_users 2844 ADD CONSTRAINT group_attributes_users_user_fkey FOREIGN KEY (value) REFERENCES "user"(name) ON UPDATE CASCADE ON DELETE CASCADE; 2845 2846 2847 -- 2848 -- Name: nethost_attr_ip_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2849 -- 2850 2851 ALTER TABLE ONLY nethost_attributes_ips 2852 ADD CONSTRAINT nethost_attr_ip_fkey FOREIGN KEY (okey) REFERENCES nethost(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 2853 2854 2855 -- 2856 -- Name: nethost_attr_mac_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2857 -- 2858 2859 ALTER TABLE ONLY nethost_attributes_macs 2860 ADD CONSTRAINT nethost_attr_mac_fkey FOREIGN KEY (okey) REFERENCES nethost(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 2861 2862 2863 -- 2864 -- Name: nethost_attr_users_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2865 -- 2866 2867 ALTER TABLE ONLY nethost_attributes 2868 ADD CONSTRAINT nethost_attr_users_okey_fkey FOREIGN KEY (okey) REFERENCES nethost(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 2869 2870 2871 -- 2872 -- Name: nethost_attr_users_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2873 -- 2874 2875 ALTER TABLE ONLY nethost_attributes_users 2876 ADD CONSTRAINT nethost_attr_users_okey_fkey FOREIGN KEY (okey) REFERENCES nethost(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 2877 2878 2879 -- 2880 -- Name: nethost_attributes_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2881 -- 2882 2883 ALTER TABLE ONLY nethost_attributes 2884 ADD CONSTRAINT nethost_attributes_attr_fkey FOREIGN KEY (attr) REFERENCES nethost_attributes_list(canonical) ON UPDATE CASCADE; 2885 2886 2887 -- 2888 -- Name: nethost_attributes_users_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2889 -- 2890 2891 ALTER TABLE ONLY nethost_attributes_users 2892 ADD CONSTRAINT nethost_attributes_users_attr_fkey FOREIGN KEY (attr) REFERENCES nethost_attributes_list(canonical) ON UPDATE CASCADE; 2893 2894 2895 -- 2896 -- Name: nethost_attributes_users_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2897 -- 2898 2899 ALTER TABLE ONLY nethost_attributes_users 2900 ADD CONSTRAINT nethost_attributes_users_user_fkey FOREIGN KEY (value) REFERENCES "user"(name) ON UPDATE CASCADE ON DELETE CASCADE; 2901 2902 2903 -- 2904 -- Name: netzone_attr_users_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2905 -- 2906 2907 ALTER TABLE ONLY netzone_attributes 2908 ADD CONSTRAINT netzone_attr_users_okey_fkey FOREIGN KEY (okey) REFERENCES netzone(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 2909 2910 2911 -- 2912 -- Name: netzone_attributes_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2913 -- 2914 2915 ALTER TABLE ONLY netzone_attributes 2916 ADD CONSTRAINT netzone_attributes_attr_fkey FOREIGN KEY (attr) REFERENCES netzone_attributes_list(canonical) ON UPDATE CASCADE; 2917 2918 2919 -- 2920 -- Name: netzone_attributes_netzone_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2921 -- 2922 2923 ALTER TABLE ONLY netzone_attributes_netzone 2924 ADD CONSTRAINT netzone_attributes_netzone_attr_fkey FOREIGN KEY (attr) REFERENCES netzone_attributes_list(canonical) ON UPDATE CASCADE; 2925 2926 2927 -- 2928 -- Name: netzone_attributes_netzone_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2929 -- 2930 2931 ALTER TABLE ONLY netzone_attributes_netzone 2932 ADD CONSTRAINT netzone_attributes_netzone_okey_fkey FOREIGN KEY (okey) REFERENCES netzone(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 2933 2934 2935 -- 2936 -- Name: netzone_attributes_netzone_value_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2937 -- 2938 2939 ALTER TABLE ONLY netzone_attributes_netzone 2940 ADD CONSTRAINT netzone_attributes_netzone_value_fkey FOREIGN KEY (value) REFERENCES netzone(name) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; 2941 2942 2943 -- 2944 -- Name: netzone_attributes_site_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2945 -- 2946 2947 ALTER TABLE ONLY netzone_attributes_site 2948 ADD CONSTRAINT netzone_attributes_site_attr_fkey FOREIGN KEY (attr) REFERENCES netzone_attributes_list(canonical) ON UPDATE CASCADE; 2949 2950 2951 -- 2952 -- Name: netzone_attributes_site_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2953 -- 2954 2955 ALTER TABLE ONLY netzone_attributes_site 2956 ADD CONSTRAINT netzone_attributes_site_okey_fkey FOREIGN KEY (okey) REFERENCES netzone(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 2957 2958 2959 -- 2960 -- Name: netzone_attributes_site_value_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2961 -- 2962 2963 ALTER TABLE ONLY netzone_attributes_site 2964 ADD CONSTRAINT netzone_attributes_site_value_fkey FOREIGN KEY (value) REFERENCES site(name) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; 2965 2966 2967 -- 2968 -- Name: revaliase_name_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2969 -- 2970 2971 ALTER TABLE ONLY revaliases 2972 ADD CONSTRAINT revaliase_name_user_fkey FOREIGN KEY (name) REFERENCES "user"(name) ON UPDATE CASCADE ON DELETE CASCADE; 2973 2974 2975 -- 2976 -- Name: site_attr_users_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2977 -- 2978 2979 ALTER TABLE ONLY site_attributes 2980 ADD CONSTRAINT site_attr_users_okey_fkey FOREIGN KEY (okey) REFERENCES site(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 2981 2982 2983 -- 2984 -- Name: site_attributes_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2985 -- 2986 2987 ALTER TABLE ONLY site_attributes 2988 ADD CONSTRAINT site_attributes_attr_fkey FOREIGN KEY (attr) REFERENCES site_attributes_list(canonical) ON UPDATE CASCADE; 2989 2990 2991 -- 2992 -- Name: user_attr_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 2993 -- 2994 2995 ALTER TABLE ONLY user_attributes_base 2996 ADD CONSTRAINT user_attr_okey_fkey FOREIGN KEY (okey) REFERENCES "user"(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 2997 2998 2999 -- 3000 -- Name: user_attributes_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 3001 -- 3002 3003 ALTER TABLE ONLY user_attributes_base 3004 ADD CONSTRAINT user_attributes_attr_fkey FOREIGN KEY (attr) REFERENCES user_attributes_list(canonical) ON UPDATE CASCADE; 3005 3006 3007 -- 3008 -- Name: user_attributes_groups_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 3009 -- 3010 3011 ALTER TABLE ONLY user_attributes_groups 3012 ADD CONSTRAINT user_attributes_groups_attr_fkey FOREIGN KEY (attr) REFERENCES user_attributes_list(canonical) ON UPDATE CASCADE; 3013 3014 3015 -- 3016 -- Name: user_attributes_groups_value_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 3017 -- 3018 3019 ALTER TABLE ONLY user_attributes_groups 3020 ADD CONSTRAINT user_attributes_groups_value_fkey FOREIGN KEY (value) REFERENCES "group"(name) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; 3021 3022 3023 -- 3024 -- Name: user_attributes_site_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 3025 -- 3026 3027 ALTER TABLE ONLY user_attributes_site 3028 ADD CONSTRAINT user_attributes_site_attr_fkey FOREIGN KEY (attr) REFERENCES user_attributes_list(canonical) ON UPDATE CASCADE; 3029 3030 3031 -- 3032 -- Name: user_attributes_site_value_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 3033 -- 3034 3035 ALTER TABLE ONLY user_attributes_site 3036 ADD CONSTRAINT user_attributes_site_value_fkey FOREIGN KEY (value) REFERENCES site(name) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; 3037 3038 3039 -- 3040 -- Name: user_attributes_users_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 3041 -- 3042 3043 ALTER TABLE ONLY user_attributes_users 3044 ADD CONSTRAINT user_attributes_users_attr_fkey FOREIGN KEY (attr) REFERENCES user_attributes_list(canonical) ON UPDATE CASCADE; 3045 3046 3047 -- 3048 -- Name: user_attributes_users_value_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 3049 -- 3050 3051 ALTER TABLE ONLY user_attributes_users 3052 ADD CONSTRAINT user_attributes_users_value_fkey FOREIGN KEY (value) REFERENCES "user"(name) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; 3053 3054 3055 -- 3056 -- Name: user_site_attr_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 3057 -- 3058 3059 ALTER TABLE ONLY user_attributes_site 3060 ADD CONSTRAINT user_site_attr_okey_fkey FOREIGN KEY (okey) REFERENCES "user"(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 3061 3062 3063 -- 3064 -- Name: user_users_attr_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 3065 -- 3066 3067 ALTER TABLE ONLY user_attributes_users 3068 ADD CONSTRAINT user_users_attr_okey_fkey FOREIGN KEY (okey) REFERENCES "user"(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 3069 3070 3071 -- 3072 -- Name: user_users_attr_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 3073 -- 3074 3075 ALTER TABLE ONLY user_attributes_groups 3076 ADD CONSTRAINT user_users_attr_okey_fkey FOREIGN KEY (okey) REFERENCES "user"(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 3870 -- Name: address_attr_base_attr_idx; Type: INDEX; Schema: public; Owner: - 3871 -- 3872 3873 CREATE INDEX address_attr_base_attr_idx ON public.address_attributes_base USING btree (attr); 3874 3875 3876 -- 3877 -- Name: address_exported_idx; Type: INDEX; Schema: public; Owner: - 3878 -- 3879 3880 CREATE INDEX address_exported_idx ON public.address USING btree (exported); 3881 3882 3883 -- 3884 -- Name: aliases_attr_value_idx; Type: INDEX; Schema: public; Owner: - 3885 -- 3886 3887 CREATE INDEX aliases_attr_value_idx ON public.aliases_attributes_base USING btree (value); 3888 3889 3890 -- 3891 -- Name: aliases_attributes_base_attr_fkey; Type: INDEX; Schema: public; Owner: - 3892 -- 3893 3894 CREATE INDEX aliases_attributes_base_attr_fkey ON public.aliases_attributes_base USING btree (attr); 3895 3896 3897 -- 3898 -- Name: aliases_exported_idx; Type: INDEX; Schema: public; Owner: - 3899 -- 3900 3901 CREATE INDEX aliases_exported_idx ON public.aliases USING btree (exported); 3902 3903 3904 -- 3905 -- Name: aliases_forwards_idx; Type: INDEX; Schema: public; Owner: - 3906 -- 3907 3908 CREATE INDEX aliases_forwards_idx ON public.aliases USING gin (forward); 3909 3910 3911 -- 3912 -- Name: aliases_name_lower_idx; Type: INDEX; Schema: public; Owner: - 3913 -- 3914 3915 CREATE UNIQUE INDEX aliases_name_lower_idx ON public.aliases USING btree (lower(name)); 3916 3917 3918 -- 3919 -- Name: aliases_rev_idx; Type: INDEX; Schema: public; Owner: - 3920 -- 3921 3922 CREATE INDEX aliases_rev_idx ON public.aliases USING btree (rev); 3923 3924 3925 -- 3926 -- Name: attributes_values_idx; Type: INDEX; Schema: public; Owner: - 3927 -- 3928 3929 CREATE UNIQUE INDEX attributes_values_idx ON public.attributes_values USING btree (otype, attributes, value); 3930 3931 3932 -- 3933 -- Name: employment_attr_value_idx; Type: INDEX; Schema: public; Owner: - 3934 -- 3935 3936 CREATE INDEX employment_attr_value_idx ON public.employment_attributes USING btree (value); 3937 3938 3939 -- 3940 -- Name: employment_attributes_attr_fkey; Type: INDEX; Schema: public; Owner: - 3941 -- 3942 3943 CREATE INDEX employment_attributes_attr_fkey ON public.employment_attributes USING btree (attr); 3944 3945 3946 -- 3947 -- Name: employment_exported_idx; Type: INDEX; Schema: public; Owner: - 3948 -- 3949 3950 CREATE INDEX employment_exported_idx ON public.employment USING btree (exported); 3951 3952 3953 -- 3954 -- Name: employment_firstday_idx; Type: INDEX; Schema: public; Owner: - 3955 -- 3956 3957 CREATE INDEX employment_firstday_idx ON public.employment USING btree (firstday NULLS FIRST); 3958 3959 3960 -- 3961 -- Name: employment_lastday_idx; Type: INDEX; Schema: public; Owner: - 3962 -- 3963 3964 CREATE INDEX employment_lastday_idx ON public.employment USING btree (lastday); 3965 3966 3967 -- 3968 -- Name: employment_rev_idx; Type: INDEX; Schema: public; Owner: - 3969 -- 3970 3971 CREATE UNIQUE INDEX employment_rev_idx ON public.employment USING btree (rev); 3972 3973 3974 -- 3975 -- Name: fki_accreq_attr_okey_fkey; Type: INDEX; Schema: public; Owner: - 3976 -- 3977 3978 CREATE INDEX fki_accreq_attr_okey_fkey ON public.accreq_attributes USING btree (okey); 3979 3980 3981 -- 3982 -- Name: fki_accreq_attributes_list_attr_fkey; Type: INDEX; Schema: public; Owner: - 3983 -- 3984 3985 CREATE INDEX fki_accreq_attributes_list_attr_fkey ON public.accreq_attributes USING btree (attr); 3986 3987 3988 -- 3989 -- Name: fki_address_attr_site_okey_fkey; Type: INDEX; Schema: public; Owner: - 3990 -- 3991 3992 CREATE INDEX fki_address_attr_site_okey_fkey ON public.address_attributes_site USING btree (okey); 3993 3994 3995 -- 3996 -- Name: fki_address_attributes_okey_fkey; Type: INDEX; Schema: public; Owner: - 3997 -- 3998 3999 CREATE INDEX fki_address_attributes_okey_fkey ON public.address_attributes_base USING btree (okey); 4000 4001 4002 -- 4003 -- Name: fki_address_attributes_site_attr_fkey; Type: INDEX; Schema: public; Owner: - 4004 -- 4005 4006 CREATE INDEX fki_address_attributes_site_attr_fkey ON public.address_attributes_site USING btree (attr); 4007 4008 4009 -- 4010 -- Name: fki_address_attributes_site_value_fkey; Type: INDEX; Schema: public; Owner: - 4011 -- 4012 4013 CREATE INDEX fki_address_attributes_site_value_fkey ON public.address_attributes_site USING btree (value); 4014 4015 4016 -- 4017 -- Name: fki_address_user_fkey; Type: INDEX; Schema: public; Owner: - 4018 -- 4019 4020 CREATE INDEX fki_address_user_fkey ON public.address USING btree ("user"); 4021 4022 4023 -- 4024 -- Name: fki_employment; Type: INDEX; Schema: public; Owner: - 4025 -- 4026 4027 CREATE INDEX fki_employment ON public.employment_attributes USING btree (okey); 4028 4029 4030 -- 4031 -- Name: fki_group_attr_okey_fkey; Type: INDEX; Schema: public; Owner: - 4032 -- 4033 4034 CREATE INDEX fki_group_attr_okey_fkey ON public.group_attributes_base USING btree (okey); 4035 4036 4037 -- 4038 -- Name: fki_group_attr_sutypes_okey_fkey; Type: INDEX; Schema: public; Owner: - 4039 -- 4040 4041 CREATE INDEX fki_group_attr_sutypes_okey_fkey ON public.group_attributes_sutypes USING btree (okey); 4042 4043 4044 -- 4045 -- Name: fki_group_attr_users_okey_fkey; Type: INDEX; Schema: public; Owner: - 4046 -- 4047 4048 CREATE INDEX fki_group_attr_users_okey_fkey ON public.group_attributes_users USING btree (okey); 4049 4050 4051 -- 4052 -- Name: fki_group_attributes_sutypes_attr; Type: INDEX; Schema: public; Owner: - 4053 -- 4054 4055 CREATE INDEX fki_group_attributes_sutypes_attr ON public.group_attributes_sutypes USING btree (attr); 4056 4057 4058 -- 4059 -- Name: fki_group_attributes_sutypes_sutype_fkey; Type: INDEX; Schema: public; Owner: - 4060 -- 4061 4062 CREATE INDEX fki_group_attributes_sutypes_sutype_fkey ON public.group_attributes_sutypes USING btree (value); 4063 4064 4065 -- 4066 -- Name: fki_group_attributes_users_attr_fkey; Type: INDEX; Schema: public; Owner: - 4067 -- 4068 4069 CREATE INDEX fki_group_attributes_users_attr_fkey ON public.group_attributes_users USING btree (attr); 4070 4071 4072 -- 4073 -- Name: fki_group_attributes_users_user_fkey; Type: INDEX; Schema: public; Owner: - 4074 -- 4075 4076 CREATE INDEX fki_group_attributes_users_user_fkey ON public.group_attributes_users USING btree (value); 4077 4078 4079 -- 4080 -- Name: fki_nethost_attr_ip_fkey; Type: INDEX; Schema: public; Owner: - 4081 -- 4082 4083 CREATE INDEX fki_nethost_attr_ip_fkey ON public.nethost_attributes_ips USING btree (okey); 4084 4085 4086 -- 4087 -- Name: fki_nethost_attr_mac_fkey; Type: INDEX; Schema: public; Owner: - 4088 -- 4089 4090 CREATE INDEX fki_nethost_attr_mac_fkey ON public.nethost_attributes_macs USING btree (okey); 4091 4092 4093 -- 4094 -- Name: fki_nethost_attr_nethosts_fkey; Type: INDEX; Schema: public; Owner: - 4095 -- 4096 4097 CREATE INDEX fki_nethost_attr_nethosts_fkey ON public.nethost_attributes_nethosts USING btree (okey); 4098 4099 4100 -- 4101 -- Name: fki_nethost_attr_users_okey_fkey; Type: INDEX; Schema: public; Owner: - 4102 -- 4103 4104 CREATE INDEX fki_nethost_attr_users_okey_fkey ON public.nethost_attributes_users USING btree (okey); 4105 4106 4107 -- 4108 -- Name: fki_nethost_attributes_attr_fkey; Type: INDEX; Schema: public; Owner: - 4109 -- 4110 4111 CREATE INDEX fki_nethost_attributes_attr_fkey ON public.nethost_attributes USING btree (attr); 4112 4113 4114 -- 4115 -- Name: fki_nethost_attributes_users_attr_fkey; Type: INDEX; Schema: public; Owner: - 4116 -- 4117 4118 CREATE INDEX fki_nethost_attributes_users_attr_fkey ON public.nethost_attributes_users USING btree (attr); 4119 4120 4121 -- 4122 -- Name: fki_nethost_attributes_users_user_fkey; Type: INDEX; Schema: public; Owner: - 4123 -- 4124 4125 CREATE INDEX fki_nethost_attributes_users_user_fkey ON public.nethost_attributes_users USING btree (value); 4126 4127 4128 -- 4129 -- Name: fki_netzone_attr_netzone_okey_fkey; Type: INDEX; Schema: public; Owner: - 4130 -- 4131 4132 CREATE INDEX fki_netzone_attr_netzone_okey_fkey ON public.netzone_attributes_netzone USING btree (okey); 4133 4134 4135 -- 4136 -- Name: fki_netzone_attr_site_okey_fkey; Type: INDEX; Schema: public; Owner: - 4137 -- 4138 4139 CREATE INDEX fki_netzone_attr_site_okey_fkey ON public.netzone_attributes_site USING btree (okey); 4140 4141 4142 -- 4143 -- Name: fki_netzone_attributes_attr_fkey; Type: INDEX; Schema: public; Owner: - 4144 -- 4145 4146 CREATE INDEX fki_netzone_attributes_attr_fkey ON public.netzone_attributes USING btree (attr); 4147 4148 4149 -- 4150 -- Name: fki_netzone_attributes_netzone_attr_fkey; Type: INDEX; Schema: public; Owner: - 4151 -- 4152 4153 CREATE INDEX fki_netzone_attributes_netzone_attr_fkey ON public.netzone_attributes_netzone USING btree (attr); 4154 4155 4156 -- 4157 -- Name: fki_netzone_attributes_netzone_value_fkey; Type: INDEX; Schema: public; Owner: - 4158 -- 4159 4160 CREATE INDEX fki_netzone_attributes_netzone_value_fkey ON public.netzone_attributes_netzone USING btree (value); 4161 4162 4163 -- 4164 -- Name: fki_netzone_attributes_site_attr_fkey; Type: INDEX; Schema: public; Owner: - 4165 -- 4166 4167 CREATE INDEX fki_netzone_attributes_site_attr_fkey ON public.netzone_attributes_site USING btree (attr); 4168 4169 4170 -- 4171 -- Name: fki_netzone_attributes_site_value_fkey; Type: INDEX; Schema: public; Owner: - 4172 -- 4173 4174 CREATE INDEX fki_netzone_attributes_site_value_fkey ON public.netzone_attributes_site USING btree (value); 4175 4176 4177 -- 4178 -- Name: fki_request_id_fkey; Type: INDEX; Schema: public; Owner: - 4179 -- 4180 4181 CREATE INDEX fki_request_id_fkey ON public.request_attributes USING btree (reqid); 4182 4183 4184 -- 4185 -- Name: fki_request_name_fkey; Type: INDEX; Schema: public; Owner: - 4186 -- 4187 4188 CREATE INDEX fki_request_name_fkey ON public.request USING btree (name); 4189 4190 4191 -- 4192 -- Name: fki_request_user_fkey; Type: INDEX; Schema: public; Owner: - 4193 -- 4194 4195 CREATE INDEX fki_request_user_fkey ON public.request USING btree ("user"); 4196 4197 4198 -- 4199 -- Name: fki_revaliase_name_user_fkey; Type: INDEX; Schema: public; Owner: - 4200 -- 4201 4202 CREATE INDEX fki_revaliase_name_user_fkey ON public.revaliases USING btree (name); 4203 4204 4205 -- 4206 -- Name: fki_revaliases_user_fkey; Type: INDEX; Schema: public; Owner: - 4207 -- 4208 4209 CREATE INDEX fki_revaliases_user_fkey ON public.revaliases USING btree (name); 4210 4211 4212 -- 4213 -- Name: fki_service_attr_users_okey_fkey; Type: INDEX; Schema: public; Owner: - 4214 -- 4215 4216 CREATE INDEX fki_service_attr_users_okey_fkey ON public.service_attributes_users USING btree (okey); 4217 4218 4219 -- 4220 -- Name: fki_service_attributes_attr_fkey; Type: INDEX; Schema: public; Owner: - 4221 -- 4222 4223 CREATE INDEX fki_service_attributes_attr_fkey ON public.nethost_attributes USING btree (attr); 4224 4225 4226 -- 4227 -- Name: fki_service_attributes_users_attr_fkey; Type: INDEX; Schema: public; Owner: - 4228 -- 4229 4230 CREATE INDEX fki_service_attributes_users_attr_fkey ON public.service_attributes_users USING btree (attr); 4231 4232 4233 -- 4234 -- Name: fki_service_attributes_users_user_fkey; Type: INDEX; Schema: public; Owner: - 4235 -- 4236 4237 CREATE INDEX fki_service_attributes_users_user_fkey ON public.service_attributes_users USING btree (value); 4238 4239 4240 -- 4241 -- Name: fki_site_attributes_attr_fkey; Type: INDEX; Schema: public; Owner: - 4242 -- 4243 4244 CREATE INDEX fki_site_attributes_attr_fkey ON public.site_attributes USING btree (attr); 4245 4246 4247 -- 4248 -- Name: fki_user_attr_groups_okey_fkey; Type: INDEX; Schema: public; Owner: - 4249 -- 4250 4251 CREATE INDEX fki_user_attr_groups_okey_fkey ON public.user_attributes_groups USING btree (okey); 4252 4253 4254 -- 4255 -- Name: fki_user_attr_okey_fkey; Type: INDEX; Schema: public; Owner: - 4256 -- 4257 4258 CREATE INDEX fki_user_attr_okey_fkey ON public.user_attributes_base USING btree (okey); 4259 4260 4261 -- 4262 -- Name: fki_user_attr_site_okey_fkey; Type: INDEX; Schema: public; Owner: - 4263 -- 4264 4265 CREATE INDEX fki_user_attr_site_okey_fkey ON public.user_attributes_site USING btree (okey); 4266 4267 4268 -- 4269 -- Name: fki_user_attr_users_okey_fkey; Type: INDEX; Schema: public; Owner: - 4270 -- 4271 4272 CREATE INDEX fki_user_attr_users_okey_fkey ON public.user_attributes_users USING btree (okey); 4273 4274 4275 -- 4276 -- Name: fki_user_attributes_attr_fkey; Type: INDEX; Schema: public; Owner: - 4277 -- 4278 4279 CREATE INDEX fki_user_attributes_attr_fkey ON public.user_attributes_base USING btree (attr); 4280 4281 4282 -- 4283 -- Name: fki_user_attributes_groups_attr_fkey; Type: INDEX; Schema: public; Owner: - 4284 -- 4285 4286 CREATE INDEX fki_user_attributes_groups_attr_fkey ON public.user_attributes_groups USING btree (attr); 4287 4288 4289 -- 4290 -- Name: fki_user_attributes_groups_value_fkey; Type: INDEX; Schema: public; Owner: - 4291 -- 4292 4293 CREATE INDEX fki_user_attributes_groups_value_fkey ON public.user_attributes_groups USING btree (value); 4294 4295 4296 -- 4297 -- Name: fki_user_attributes_site_attr_fkey; Type: INDEX; Schema: public; Owner: - 4298 -- 4299 4300 CREATE INDEX fki_user_attributes_site_attr_fkey ON public.user_attributes_site USING btree (attr); 4301 4302 4303 -- 4304 -- Name: fki_user_attributes_site_value_fkey; Type: INDEX; Schema: public; Owner: - 4305 -- 4306 4307 CREATE INDEX fki_user_attributes_site_value_fkey ON public.user_attributes_site USING btree (value); 4308 4309 4310 -- 4311 -- Name: fki_user_attributes_users_attr_fkey; Type: INDEX; Schema: public; Owner: - 4312 -- 4313 4314 CREATE INDEX fki_user_attributes_users_attr_fkey ON public.user_attributes_users USING btree (attr); 4315 4316 4317 -- 4318 -- Name: fki_user_attributes_users_value_fkey; Type: INDEX; Schema: public; Owner: - 4319 -- 4320 4321 CREATE INDEX fki_user_attributes_users_value_fkey ON public.user_attributes_users USING btree (value); 4322 4323 4324 -- 4325 -- Name: group_attributes_base_value_idx; Type: INDEX; Schema: public; Owner: - 4326 -- 4327 4328 CREATE INDEX group_attributes_base_value_idx ON public.group_attributes_base USING btree (value); 4329 4330 4331 -- 4332 -- Name: group_exported_idx; Type: INDEX; Schema: public; Owner: - 4333 -- 4334 4335 CREATE INDEX group_exported_idx ON public."group" USING btree (exported); 4336 4337 4338 -- 4339 -- Name: group_rev_idx; Type: INDEX; Schema: public; Owner: - 4340 -- 4341 4342 CREATE INDEX group_rev_idx ON public."group" USING btree (rev); 4343 4344 4345 -- 4346 -- Name: nethost_attr_value_idx; Type: INDEX; Schema: public; Owner: - 4347 -- 4348 4349 CREATE INDEX nethost_attr_value_idx ON public.nethost_attributes USING btree (value); 4350 4351 4352 -- 4353 -- Name: nethost_attributes_ip_idx; Type: INDEX; Schema: public; Owner: - 4354 -- 4355 4356 CREATE UNIQUE INDEX nethost_attributes_ip_idx ON public.nethost_attributes_ips USING btree (((value)::inet)); 4357 4358 4359 -- 4360 -- Name: nethost_attributes_mac_idx; Type: INDEX; Schema: public; Owner: - 4361 -- 4362 4363 CREATE UNIQUE INDEX nethost_attributes_mac_idx ON public.nethost_attributes_macs USING btree (((value)::macaddr)); 4364 4365 4366 -- 4367 -- Name: nethost_cname_uniq_idx; Type: INDEX; Schema: public; Owner: - 4368 -- 4369 4370 CREATE UNIQUE INDEX nethost_cname_uniq_idx ON public.nethost_attributes USING btree (value, okey) WHERE (attr = 'cname'::text); 4371 4372 4373 -- 4374 -- Name: netzone_attr_value_idx; Type: INDEX; Schema: public; Owner: - 4375 -- 4376 4377 CREATE INDEX netzone_attr_value_idx ON public.netzone_attributes USING btree (value); 4378 4379 4380 -- 4381 -- Name: netzone_attributes_net_idx; Type: INDEX; Schema: public; Owner: - 4382 -- 4383 4384 CREATE UNIQUE INDEX netzone_attributes_net_idx ON public.netzone_attributes USING btree (((value)::inet), attr, okey) WHERE (attr = 'net'::text); 4385 4386 4387 -- 4388 -- Name: netzone_attributes_netexclude_idx; Type: INDEX; Schema: public; Owner: - 4389 -- 4390 4391 CREATE UNIQUE INDEX netzone_attributes_netexclude_idx ON public.netzone_attributes USING btree (((value)::inet), attr, okey) WHERE (attr = 'netExclude'::text); 4392 4393 4394 -- 4395 -- Name: objectlogs_name_idx; Type: INDEX; Schema: public; Owner: - 4396 -- 4397 4398 CREATE INDEX objectlogs_name_idx ON public.objectslogs USING btree (name); 4399 4400 4401 -- 4402 -- Name: objectslogs_ikey_idx; Type: INDEX; Schema: public; Owner: - 4403 -- 4404 4405 CREATE INDEX objectslogs_ikey_idx ON public.objectslogs USING btree (ikey); 4406 4407 4408 -- 4409 -- Name: objectslogs_otype_idx; Type: INDEX; Schema: public; Owner: - 4410 -- 4411 4412 CREATE INDEX objectslogs_otype_idx ON public.objectslogs USING btree (otype); 4413 4414 4415 -- 4416 -- Name: person_rev_idx; Type: INDEX; Schema: public; Owner: - 4417 -- 4418 4419 CREATE INDEX person_rev_idx ON public."user" USING btree (rev); 4420 4421 4422 -- 4423 -- Name: revaliases_as_idx; Type: INDEX; Schema: public; Owner: - 4424 -- 4425 4426 CREATE INDEX revaliases_as_idx ON public.revaliases USING btree ("as"); 4427 4428 4429 -- 4430 -- Name: revaliases_as_lower_idx; Type: INDEX; Schema: public; Owner: - 4431 -- 4432 4433 CREATE INDEX revaliases_as_lower_idx ON public.revaliases USING btree (lower("as")); 4434 4435 4436 -- 4437 -- Name: revaliases_exported_idx; Type: INDEX; Schema: public; Owner: - 4438 -- 4439 4440 CREATE INDEX revaliases_exported_idx ON public.revaliases USING btree (exported); 4441 4442 4443 -- 4444 -- Name: revaliases_rev_idx; Type: INDEX; Schema: public; Owner: - 4445 -- 4446 4447 CREATE INDEX revaliases_rev_idx ON public.revaliases USING btree (rev); 4448 4449 4450 -- 4451 -- Name: service_attr_value_idx; Type: INDEX; Schema: public; Owner: - 4452 -- 4453 4454 CREATE INDEX service_attr_value_idx ON public.nethost_attributes USING btree (value); 4455 4456 4457 -- 4458 -- Name: site_attr_value_idx; Type: INDEX; Schema: public; Owner: - 4459 -- 4460 4461 CREATE INDEX site_attr_value_idx ON public.site_attributes USING btree (value); 4462 4463 4464 -- 4465 -- Name: site_exported_idx; Type: INDEX; Schema: public; Owner: - 4466 -- 4467 4468 CREATE INDEX site_exported_idx ON public.site USING btree (exported); 4469 4470 4471 -- 4472 -- Name: site_rev_idx; Type: INDEX; Schema: public; Owner: - 4473 -- 4474 4475 CREATE UNIQUE INDEX site_rev_idx ON public.site USING btree (rev); 4476 4477 4478 -- 4479 -- Name: stat_attr_value_idx; Type: INDEX; Schema: public; Owner: - 4480 -- 4481 4482 CREATE INDEX stat_attr_value_idx ON public.stat_attributes USING btree (value); 4483 4484 4485 -- 4486 -- Name: stat_attributes_attr_fkey; Type: INDEX; Schema: public; Owner: - 4487 -- 4488 4489 CREATE INDEX stat_attributes_attr_fkey ON public.stat_attributes USING btree (attr); 4490 4491 4492 -- 4493 -- Name: stat_exported_idx; Type: INDEX; Schema: public; Owner: - 4494 -- 4495 4496 CREATE INDEX stat_exported_idx ON public.stat USING btree (exported); 4497 4498 4499 -- 4500 -- Name: stat_rev_idx; Type: INDEX; Schema: public; Owner: - 4501 -- 4502 4503 CREATE UNIQUE INDEX stat_rev_idx ON public.stat USING btree (rev); 4504 4505 4506 -- 4507 -- Name: user_attr_value_idx; Type: INDEX; Schema: public; Owner: - 4508 -- 4509 4510 CREATE INDEX user_attr_value_idx ON public.user_attributes_base USING btree (value); 4511 4512 4513 -- 4514 -- Name: user_expire_idx; Type: INDEX; Schema: public; Owner: - 4515 -- 4516 4517 CREATE INDEX user_expire_idx ON public."user" USING btree (expire); 4518 4519 4520 -- 4521 -- Name: user_exported_idx; Type: INDEX; Schema: public; Owner: - 4522 -- 4523 4524 CREATE INDEX user_exported_idx ON public."user" USING btree (exported); 4525 4526 4527 -- 4528 -- Name: address_attributes address_attributes_insert; Type: RULE; Schema: public; Owner: - 4529 -- 4530 4531 CREATE RULE address_attributes_insert AS 4532 ON INSERT TO public.address_attributes DO INSTEAD INSERT INTO public.address_attributes_base (value, attr, attr_key, okey) 4533 VALUES (new.value, new.attr, new.attr_key, new.okey); 4534 4535 4536 -- 4537 -- Name: address_attributes address_attributes_update; Type: RULE; Schema: public; Owner: - 4538 -- 4539 4540 CREATE RULE address_attributes_update AS 4541 ON UPDATE TO public.address_attributes DO INSTEAD UPDATE public.address_attributes_base SET value = new.value, attr = new.attr, attr_key = new.attr_key, okey = new.okey 4542 WHERE ((address_attributes_base.attr_key = old.attr_key) AND (address_attributes_base.attr = old.attr)); 4543 4544 4545 -- 4546 -- Name: address_attributes address_atttributes_delete; Type: RULE; Schema: public; Owner: - 4547 -- 4548 4549 CREATE RULE address_atttributes_delete AS 4550 ON DELETE TO public.address_attributes DO INSTEAD DELETE FROM public.address_attributes_base 4551 WHERE ((address_attributes_base.attr_key = old.attr_key) AND (address_attributes_base.attr = old.attr)); 4552 4553 4554 -- 4555 -- Name: aliases_attributes aliases_attributes_insert; Type: RULE; Schema: public; Owner: - 4556 -- 4557 4558 CREATE RULE aliases_attributes_insert AS 4559 ON INSERT TO public.aliases_attributes DO INSTEAD INSERT INTO public.aliases_attributes_base (value, attr, okey) 4560 VALUES (new.value, new.attr, new.okey); 4561 4562 4563 -- 4564 -- Name: aliases_attributes aliases_attributes_update; Type: RULE; Schema: public; Owner: - 4565 -- 4566 4567 CREATE RULE aliases_attributes_update AS 4568 ON UPDATE TO public.aliases_attributes DO INSTEAD UPDATE public.aliases_attributes_base SET value = new.value, attr = new.attr, attr_key = new.attr_key, okey = new.okey 4569 WHERE ((aliases_attributes_base.attr_key = old.attr_key) AND (aliases_attributes_base.attr = old.attr)); 4570 4571 4572 -- 4573 -- Name: aliases_attributes aliases_atttributes_delete; Type: RULE; Schema: public; Owner: - 4574 -- 4575 4576 CREATE RULE aliases_atttributes_delete AS 4577 ON DELETE TO public.aliases_attributes DO INSTEAD DELETE FROM public.aliases_attributes_base 4578 WHERE ((aliases_attributes_base.attr_key = old.attr_key) AND (aliases_attributes_base.attr = old.attr)); 4579 4580 4581 -- 4582 -- Name: group_attributes group_attributes_insert; Type: RULE; Schema: public; Owner: - 4583 -- 4584 4585 CREATE RULE group_attributes_insert AS 4586 ON INSERT TO public.group_attributes DO INSTEAD INSERT INTO public.group_attributes_base (value, attr, attr_key, okey) 4587 VALUES (new.value, new.attr, new.attr_key, new.okey); 4588 4589 4590 -- 4591 -- Name: group_attributes group_attributes_update; Type: RULE; Schema: public; Owner: - 4592 -- 4593 4594 CREATE RULE group_attributes_update AS 4595 ON UPDATE TO public.group_attributes DO INSTEAD UPDATE public.group_attributes_base SET value = new.value, attr = new.attr, attr_key = new.attr_key, okey = new.okey 4596 WHERE ((group_attributes_base.attr_key = old.attr_key) AND (group_attributes_base.attr = old.attr)); 4597 4598 4599 -- 4600 -- Name: group_attributes group_atttributes_delete; Type: RULE; Schema: public; Owner: - 4601 -- 4602 4603 CREATE RULE group_atttributes_delete AS 4604 ON DELETE TO public.group_attributes DO INSTEAD DELETE FROM public.group_attributes_base 4605 WHERE ((group_attributes_base.attr_key = old.attr_key) AND (group_attributes_base.attr = old.attr)); 4606 4607 4608 -- 4609 -- Name: user_attributes user_attributes_insert; Type: RULE; Schema: public; Owner: - 4610 -- 4611 4612 CREATE RULE user_attributes_insert AS 4613 ON INSERT TO public.user_attributes DO INSTEAD INSERT INTO public.user_attributes_base (value, attr, attr_key, okey) 4614 VALUES (new.value, new.attr, new.attr_key, new.okey); 4615 4616 4617 -- 4618 -- Name: user_attributes user_attributes_update; Type: RULE; Schema: public; Owner: - 4619 -- 4620 4621 CREATE RULE user_attributes_update AS 4622 ON UPDATE TO public.user_attributes DO INSTEAD UPDATE public.user_attributes_base SET value = new.value, attr = new.attr, attr_key = new.attr_key, okey = new.okey 4623 WHERE ((user_attributes_base.attr_key = old.attr_key) AND (user_attributes_base.attr = old.attr)); 4624 4625 4626 -- 4627 -- Name: user_attributes user_atttributes_delete; Type: RULE; Schema: public; Owner: - 4628 -- 4629 4630 CREATE RULE user_atttributes_delete AS 4631 ON DELETE TO public.user_attributes DO INSTEAD DELETE FROM public.user_attributes_base 4632 WHERE ((user_attributes_base.attr_key = old.attr_key) AND (user_attributes_base.attr = old.attr)); 4633 4634 4635 -- 4636 -- Name: accreq accreq_update_rev_tg; Type: TRIGGER; Schema: public; Owner: - 4637 -- 4638 4639 CREATE TRIGGER accreq_update_rev_tg BEFORE INSERT OR DELETE OR UPDATE ON public.accreq FOR EACH ROW EXECUTE PROCEDURE public.rev_tg_f(); 4640 4641 4642 -- 4643 -- Name: address_attributes_site address_attr_update_ref_a_s; Type: TRIGGER; Schema: public; Owner: - 4644 -- 4645 4646 CREATE TRIGGER address_attr_update_ref_a_s AFTER INSERT OR DELETE OR UPDATE ON public.address_attributes_site FOR EACH ROW EXECUTE PROCEDURE public.address_attr_update_ref(); 4647 4648 4649 -- 4650 -- Name: address_attributes_base address_attr_update_ref_tg; Type: TRIGGER; Schema: public; Owner: - 4651 -- 4652 4653 CREATE TRIGGER address_attr_update_ref_tg AFTER INSERT OR DELETE OR UPDATE ON public.address_attributes_base FOR EACH ROW EXECUTE PROCEDURE public.address_attr_update_ref(); 4654 4655 4656 -- 4657 -- Name: address_attributes_base address_sort_fields_tg; Type: TRIGGER; Schema: public; Owner: - 4658 -- 4659 4660 CREATE TRIGGER address_sort_fields_tg BEFORE INSERT OR DELETE OR UPDATE ON public.address_attributes_base FOR EACH ROW EXECUTE PROCEDURE public.address_sort_fields(); 4661 4662 4663 -- 4664 -- Name: address address_update_rev_tg; Type: TRIGGER; Schema: public; Owner: - 4665 -- 4666 4667 CREATE TRIGGER address_update_rev_tg BEFORE INSERT OR DELETE OR UPDATE ON public.address FOR EACH ROW EXECUTE PROCEDURE public.rev_tg_f(); 4668 4669 4670 -- 4671 -- Name: address address_update_user_rev_tg; Type: TRIGGER; Schema: public; Owner: - 4672 -- 4673 4674 CREATE TRIGGER address_update_user_rev_tg AFTER INSERT OR DELETE OR UPDATE ON public.address FOR EACH ROW EXECUTE PROCEDURE public.address_update_user_rev(); 4675 4676 4677 -- 4678 -- Name: aliases_attributes_base aliases_attr_update; Type: TRIGGER; Schema: public; Owner: - 4679 -- 4680 4681 CREATE TRIGGER aliases_attr_update AFTER INSERT OR DELETE OR UPDATE ON public.aliases_attributes_base FOR EACH ROW EXECUTE PROCEDURE public.aliases_attr_update_ref(); 4682 4683 4684 -- 4685 -- Name: aliases aliases_nickname_tg; Type: TRIGGER; Schema: public; Owner: - 4686 -- 4687 4688 CREATE TRIGGER aliases_nickname_tg AFTER DELETE OR UPDATE ON public.aliases FOR EACH ROW EXECUTE PROCEDURE public.aliases_nickname(); 4689 4690 4691 -- 4692 -- Name: aliases aliases_rev_tg; Type: TRIGGER; Schema: public; Owner: - 4693 -- 4694 4695 CREATE TRIGGER aliases_rev_tg BEFORE INSERT OR DELETE OR UPDATE ON public.aliases FOR EACH ROW EXECUTE PROCEDURE public.rev_tg_f(); 4696 4697 4698 -- 4699 -- Name: aliases aliases_user_tg; Type: TRIGGER; Schema: public; Owner: - 4700 -- 4701 4702 CREATE TRIGGER aliases_user_tg AFTER INSERT OR DELETE OR UPDATE ON public.aliases FOR EACH ROW EXECUTE PROCEDURE public.rev_tg_aliases_f(); 4703 4704 4705 -- 4706 -- Name: user_attributes_groups department_group_upd_tg; Type: TRIGGER; Schema: public; Owner: - 4707 -- 4708 4709 CREATE TRIGGER department_group_upd_tg AFTER INSERT OR UPDATE ON public.user_attributes_groups FOR EACH ROW EXECUTE PROCEDURE public.department_group_upd_f(); 4710 4711 4712 -- 4713 -- Name: employment_attributes employment_attr_update; Type: TRIGGER; Schema: public; Owner: - 4714 -- 4715 4716 CREATE TRIGGER employment_attr_update AFTER INSERT OR DELETE OR UPDATE ON public.employment_attributes FOR EACH ROW EXECUTE PROCEDURE public.employment_attr_update_ref(); 4717 4718 4719 -- 4720 -- Name: nethost_attributes_macs fmt_macaddr_tg; Type: TRIGGER; Schema: public; Owner: - 4721 -- 4722 4723 CREATE TRIGGER fmt_macaddr_tg BEFORE INSERT OR UPDATE ON public.nethost_attributes_macs FOR EACH ROW EXECUTE PROCEDURE public.fmt_macaddr(); 4724 4725 4726 -- 4727 -- Name: group_attributes_base group_attr_update; Type: TRIGGER; Schema: public; Owner: - 4728 -- 4729 4730 CREATE TRIGGER group_attr_update AFTER INSERT OR DELETE OR UPDATE ON public.group_attributes_base FOR EACH ROW EXECUTE PROCEDURE public.group_attr_update_ref(); 4731 4732 4733 -- 4734 -- Name: group_attributes_users group_attr_user_update_user_ref_tg; Type: TRIGGER; Schema: public; Owner: - 4735 -- 4736 4737 CREATE TRIGGER group_attr_user_update_user_ref_tg AFTER INSERT OR DELETE OR UPDATE ON public.group_attributes_users FOR EACH ROW EXECUTE PROCEDURE public.group_attr_user_update_user_ref(); 4738 4739 4740 -- 4741 -- Name: group_attributes_sutypes group_attributes_sutypes_update_ref; Type: TRIGGER; Schema: public; Owner: - 4742 -- 4743 4744 CREATE TRIGGER group_attributes_sutypes_update_ref AFTER INSERT OR DELETE OR UPDATE ON public.group_attributes_sutypes FOR EACH ROW EXECUTE PROCEDURE public.group_attr_update_ref(); 4745 4746 4747 -- 4748 -- Name: group_attributes_users group_attributes_users_update_ref; Type: TRIGGER; Schema: public; Owner: - 4749 -- 4750 4751 CREATE TRIGGER group_attributes_users_update_ref AFTER INSERT OR DELETE OR UPDATE ON public.group_attributes_users FOR EACH ROW EXECUTE PROCEDURE public.group_attr_update_ref(); 4752 4753 4754 -- 4755 -- Name: group group_rev_tg; Type: TRIGGER; Schema: public; Owner: - 4756 -- 4757 4758 CREATE TRIGGER group_rev_tg BEFORE DELETE OR UPDATE ON public."group" FOR EACH ROW EXECUTE PROCEDURE public.rev_tg_f(); 4759 4760 4761 -- 4762 -- Name: group_attributes_base group_sort_field_tg; Type: TRIGGER; Schema: public; Owner: - 4763 -- 4764 4765 CREATE TRIGGER group_sort_field_tg BEFORE INSERT OR DELETE OR UPDATE ON public.group_attributes_base FOR EACH ROW EXECUTE PROCEDURE public.group_sort_fields(); 4766 4767 4768 -- 4769 -- Name: nethost_attributes_ips nethost_attr_ip_update; Type: TRIGGER; Schema: public; Owner: - 4770 -- 4771 4772 CREATE TRIGGER nethost_attr_ip_update AFTER INSERT OR DELETE OR UPDATE ON public.nethost_attributes_ips FOR EACH ROW EXECUTE PROCEDURE public.nethost_attr_update_ref(); 4773 4774 4775 -- 4776 -- Name: nethost_attributes_macs nethost_attr_mac_update; Type: TRIGGER; Schema: public; Owner: - 4777 -- 4778 4779 CREATE TRIGGER nethost_attr_mac_update AFTER INSERT OR DELETE OR UPDATE ON public.nethost_attributes_macs FOR EACH ROW EXECUTE PROCEDURE public.nethost_attr_update_ref(); 4780 4781 4782 -- 4783 -- Name: nethost_attributes_nethosts nethost_attr_nethosts_update; Type: TRIGGER; Schema: public; Owner: - 4784 -- 4785 4786 CREATE TRIGGER nethost_attr_nethosts_update AFTER INSERT OR DELETE OR UPDATE ON public.nethost_attributes_nethosts FOR EACH ROW EXECUTE PROCEDURE public.nethost_attr_update_ref(); 4787 4788 4789 -- 4790 -- Name: nethost_attributes nethost_attr_update; Type: TRIGGER; Schema: public; Owner: - 4791 -- 4792 4793 CREATE TRIGGER nethost_attr_update AFTER INSERT OR DELETE OR UPDATE ON public.nethost_attributes FOR EACH ROW EXECUTE PROCEDURE public.nethost_attr_update_ref(); 4794 4795 4796 -- 4797 -- Name: nethost_attributes_users nethost_attributes_users_update_ref; Type: TRIGGER; Schema: public; Owner: - 4798 -- 4799 4800 CREATE TRIGGER nethost_attributes_users_update_ref AFTER INSERT OR DELETE OR UPDATE ON public.nethost_attributes_users FOR EACH ROW EXECUTE PROCEDURE public.nethost_attr_update_ref(); 4801 4802 4803 -- 4804 -- Name: nethost_attributes nethost_sort_field_tg; Type: TRIGGER; Schema: public; Owner: - 4805 -- 4806 4807 CREATE TRIGGER nethost_sort_field_tg BEFORE INSERT OR DELETE OR UPDATE ON public.nethost_attributes FOR EACH ROW EXECUTE PROCEDURE public.nethost_sort_fields(); 4808 4809 4810 -- 4811 -- Name: nethost nethost_upd_zone_tg_del; Type: TRIGGER; Schema: public; Owner: - 4812 -- 4813 4814 CREATE TRIGGER nethost_upd_zone_tg_del BEFORE DELETE ON public.nethost FOR EACH ROW EXECUTE PROCEDURE public.nethost_upd_zone(); 4815 4816 4817 -- 4818 -- Name: nethost nethost_upd_zone_tg_insupd; Type: TRIGGER; Schema: public; Owner: - 4819 -- 4820 4821 CREATE TRIGGER nethost_upd_zone_tg_insupd AFTER INSERT OR UPDATE ON public.nethost FOR EACH ROW EXECUTE PROCEDURE public.nethost_upd_zone(); 4822 4823 4824 -- 4825 -- Name: nethost nethost_update_rev_tg; Type: TRIGGER; Schema: public; Owner: - 4826 -- 4827 4828 CREATE TRIGGER nethost_update_rev_tg BEFORE INSERT OR DELETE OR UPDATE ON public.nethost FOR EACH ROW EXECUTE PROCEDURE public.rev_tg_f(); 4829 4830 4831 -- 4832 -- Name: nethost_attributes_ips nethostipdel_upd_zone_tg; Type: TRIGGER; Schema: public; Owner: - 4833 -- 4834 4835 CREATE TRIGGER nethostipdel_upd_zone_tg BEFORE DELETE ON public.nethost_attributes_ips FOR EACH ROW EXECUTE PROCEDURE public.nethostipdel_upd_zone(); 4836 4837 4838 -- 4839 -- Name: netzone_attributes netzone_attr_update; Type: TRIGGER; Schema: public; Owner: - 4840 -- 4841 4842 CREATE TRIGGER netzone_attr_update AFTER INSERT OR DELETE OR UPDATE ON public.netzone_attributes FOR EACH ROW EXECUTE PROCEDURE public.netzone_attr_update_ref(); 4843 4844 4845 -- 4846 -- Name: netzone_attributes_site netzone_attr_update_ref_a_s; Type: TRIGGER; Schema: public; Owner: - 4847 -- 4848 4849 CREATE TRIGGER netzone_attr_update_ref_a_s AFTER INSERT OR DELETE OR UPDATE ON public.netzone_attributes_site FOR EACH ROW EXECUTE PROCEDURE public.netzone_attr_update_ref(); 4850 4851 4852 -- 4853 -- Name: netzone_attributes_netzone netzone_attr_update_ref_a_s; Type: TRIGGER; Schema: public; Owner: - 4854 -- 4855 4856 CREATE TRIGGER netzone_attr_update_ref_a_s AFTER INSERT OR DELETE OR UPDATE ON public.netzone_attributes_netzone FOR EACH ROW EXECUTE PROCEDURE public.netzone_attr_update_ref(); 4857 4858 4859 -- 4860 -- Name: netzone_attributes netzone_sort_fields_tg; Type: TRIGGER; Schema: public; Owner: - 4861 -- 4862 4863 CREATE TRIGGER netzone_sort_fields_tg BEFORE INSERT OR DELETE OR UPDATE ON public.netzone_attributes FOR EACH ROW EXECUTE PROCEDURE public.netzone_sort_fields(); 4864 4865 4866 -- 4867 -- Name: netzone netzone_update_rev_tg; Type: TRIGGER; Schema: public; Owner: - 4868 -- 4869 4870 CREATE TRIGGER netzone_update_rev_tg BEFORE INSERT OR DELETE OR UPDATE ON public.netzone FOR EACH ROW EXECUTE PROCEDURE public.rev_tg_f(); 4871 4872 4873 -- 4874 -- Name: user_attributes_base person_attr_update; Type: TRIGGER; Schema: public; Owner: - 4875 -- 4876 4877 CREATE TRIGGER person_attr_update AFTER INSERT OR DELETE OR UPDATE ON public.user_attributes_base FOR EACH ROW EXECUTE PROCEDURE public.person_attr_update_ref(); 4878 4879 4880 -- 4881 -- Name: user_attributes_groups person_attr_update_ref_a_g; Type: TRIGGER; Schema: public; Owner: - 4882 -- 4883 4884 CREATE TRIGGER person_attr_update_ref_a_g AFTER INSERT OR DELETE OR UPDATE ON public.user_attributes_groups FOR EACH ROW EXECUTE PROCEDURE public.person_attr_update_ref(); 4885 4886 4887 -- 4888 -- Name: user_attributes_site person_attr_update_ref_a_s; Type: TRIGGER; Schema: public; Owner: - 4889 -- 4890 4891 CREATE TRIGGER person_attr_update_ref_a_s AFTER INSERT OR DELETE OR UPDATE ON public.user_attributes_site FOR EACH ROW EXECUTE PROCEDURE public.person_attr_update_ref(); 4892 4893 4894 -- 4895 -- Name: user_attributes_users person_attr_update_ref_a_u; Type: TRIGGER; Schema: public; Owner: - 4896 -- 4897 4898 CREATE TRIGGER person_attr_update_ref_a_u AFTER INSERT OR DELETE OR UPDATE ON public.user_attributes_users FOR EACH ROW EXECUTE PROCEDURE public.person_attr_update_ref(); 4899 4900 4901 -- 4902 -- Name: user person_rev_tg; Type: TRIGGER; Schema: public; Owner: - 4903 -- 4904 4905 CREATE TRIGGER person_rev_tg BEFORE DELETE OR UPDATE ON public."user" FOR EACH ROW EXECUTE PROCEDURE public.rev_tg_f(); 4906 4907 4908 -- 4909 -- Name: revaliases revaliases_rev_tg; Type: TRIGGER; Schema: public; Owner: - 4910 -- 4911 4912 CREATE TRIGGER revaliases_rev_tg BEFORE INSERT OR DELETE OR UPDATE ON public.revaliases FOR EACH ROW EXECUTE PROCEDURE public.rev_tg_f(); 4913 4914 4915 -- 4916 -- Name: revisions revisions_rev_tg; Type: TRIGGER; Schema: public; Owner: - 4917 -- 4918 4919 CREATE TRIGGER revisions_rev_tg AFTER DELETE OR UPDATE ON public.revisions FOR EACH ROW EXECUTE PROCEDURE public.rev_tg_f(); 4920 4921 4922 -- 4923 -- Name: service_attributes serivce_attr_update; Type: TRIGGER; Schema: public; Owner: - 4924 -- 4925 4926 CREATE TRIGGER serivce_attr_update AFTER INSERT OR DELETE OR UPDATE ON public.service_attributes FOR EACH ROW EXECUTE PROCEDURE public.service_attr_update_ref(); 4927 4928 4929 -- 4930 -- Name: service_attributes_users service_attributes_users_update_ref; Type: TRIGGER; Schema: public; Owner: - 4931 -- 4932 4933 CREATE TRIGGER service_attributes_users_update_ref AFTER INSERT OR DELETE OR UPDATE ON public.service_attributes_users FOR EACH ROW EXECUTE PROCEDURE public.service_attr_update_ref(); 4934 4935 4936 -- 4937 -- Name: service service_rev_tg; Type: TRIGGER; Schema: public; Owner: - 4938 -- 4939 4940 CREATE TRIGGER service_rev_tg BEFORE INSERT OR DELETE OR UPDATE ON public.service FOR EACH ROW EXECUTE PROCEDURE public.rev_tg_f(); 4941 4942 4943 -- 4944 -- Name: service_attributes service_sort_field_tg; Type: TRIGGER; Schema: public; Owner: - 4945 -- 4946 4947 CREATE TRIGGER service_sort_field_tg BEFORE INSERT OR DELETE OR UPDATE ON public.service_attributes FOR EACH ROW EXECUTE PROCEDURE public.service_sort_fields(); 4948 4949 4950 -- 4951 -- Name: settings settings_revision_tg; Type: TRIGGER; Schema: public; Owner: - 4952 -- 4953 4954 CREATE TRIGGER settings_revision_tg BEFORE INSERT OR DELETE OR UPDATE ON public.settings FOR EACH ROW EXECUTE PROCEDURE public.rev_tg_f(); 4955 4956 4957 -- 4958 -- Name: site_attributes site_attr_update; Type: TRIGGER; Schema: public; Owner: - 4959 -- 4960 4961 CREATE TRIGGER site_attr_update AFTER INSERT OR DELETE OR UPDATE ON public.site_attributes FOR EACH ROW EXECUTE PROCEDURE public.site_attr_update_ref(); 4962 4963 4964 -- 4965 -- Name: stat_attributes stat_attr_update; Type: TRIGGER; Schema: public; Owner: - 4966 -- 4967 4968 CREATE TRIGGER stat_attr_update AFTER INSERT OR DELETE OR UPDATE ON public.stat_attributes FOR EACH ROW EXECUTE PROCEDURE public.stat_attr_update_ref(); 4969 4970 4971 -- 4972 -- Name: site update_address_site_tg; Type: TRIGGER; Schema: public; Owner: - 4973 -- 4974 4975 CREATE TRIGGER update_address_site_tg BEFORE INSERT OR DELETE OR UPDATE ON public.site FOR EACH ROW EXECUTE PROCEDURE public.update_address_site(); 4976 4977 4978 -- 4979 -- Name: user_attributes_base user_sort_field_tg; Type: TRIGGER; Schema: public; Owner: - 4980 -- 4981 4982 CREATE TRIGGER user_sort_field_tg BEFORE INSERT OR DELETE OR UPDATE ON public.user_attributes_base FOR EACH ROW EXECUTE PROCEDURE public.user_sort_fields(); 4983 4984 4985 -- 4986 -- Name: accreq_attributes accreq_attr_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 4987 -- 4988 4989 ALTER TABLE ONLY public.accreq_attributes 4990 ADD CONSTRAINT accreq_attr_okey_fkey FOREIGN KEY (okey) REFERENCES public.accreq(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 4991 4992 4993 -- 4994 -- Name: accreq_attributes accreq_attributes_list_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 4995 -- 4996 4997 ALTER TABLE ONLY public.accreq_attributes 4998 ADD CONSTRAINT accreq_attributes_list_attr_fkey FOREIGN KEY (attr) REFERENCES public.accreq_attributes_list(canonical); 4999 5000 5001 -- 5002 -- Name: address_attributes_base address_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5003 -- 5004 5005 ALTER TABLE ONLY public.address_attributes_base 5006 ADD CONSTRAINT address_attr_fkey FOREIGN KEY (attr) REFERENCES public.address_attributes_list(canonical) ON UPDATE CASCADE; 5007 5008 5009 -- 5010 -- Name: address_attributes_base address_attributes_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5011 -- 5012 5013 ALTER TABLE ONLY public.address_attributes_base 5014 ADD CONSTRAINT address_attributes_okey_fkey FOREIGN KEY (okey) REFERENCES public.address(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5015 5016 5017 -- 5018 -- Name: address_attributes_site address_attributes_site_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5019 -- 5020 5021 ALTER TABLE ONLY public.address_attributes_site 5022 ADD CONSTRAINT address_attributes_site_attr_fkey FOREIGN KEY (attr) REFERENCES public.address_attributes_list_site(canonical) ON UPDATE CASCADE; 5023 5024 5025 -- 5026 -- Name: address_attributes_site address_attributes_site_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5027 -- 5028 5029 ALTER TABLE ONLY public.address_attributes_site 5030 ADD CONSTRAINT address_attributes_site_okey_fkey FOREIGN KEY (okey) REFERENCES public.address(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5031 5032 5033 -- 5034 -- Name: address_attributes_site address_attributes_site_value_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5035 -- 5036 5037 ALTER TABLE ONLY public.address_attributes_site 5038 ADD CONSTRAINT address_attributes_site_value_fkey FOREIGN KEY (value) REFERENCES public.site(name) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; 5039 5040 5041 -- 5042 -- Name: address address_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5043 -- 5044 5045 ALTER TABLE ONLY public.address 5046 ADD CONSTRAINT address_user_fkey FOREIGN KEY ("user") REFERENCES public."user"(name) ON UPDATE CASCADE ON DELETE CASCADE; 5047 5048 5049 -- 5050 -- Name: aliases_attributes_base aliases_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5051 -- 5052 5053 ALTER TABLE ONLY public.aliases_attributes_base 5054 ADD CONSTRAINT aliases_fkey FOREIGN KEY (okey) REFERENCES public.aliases(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5055 5056 5057 -- 5058 -- Name: employment_attributes employment; Type: FK CONSTRAINT; Schema: public; Owner: - 5059 -- 5060 5061 ALTER TABLE ONLY public.employment_attributes 5062 ADD CONSTRAINT employment FOREIGN KEY (okey) REFERENCES public.employment(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5063 5064 5065 -- 5066 -- Name: employment employment_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5067 -- 5068 5069 ALTER TABLE ONLY public.employment 5070 ADD CONSTRAINT employment_user_fkey FOREIGN KEY ("user") REFERENCES public."user"(name) ON UPDATE CASCADE ON DELETE CASCADE; 5071 5072 5073 -- 5074 -- Name: group_attributes_base group_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5075 -- 5076 5077 ALTER TABLE ONLY public.group_attributes_base 5078 ADD CONSTRAINT group_attr_fkey FOREIGN KEY (attr) REFERENCES public.group_attributes_list(canonical) ON UPDATE CASCADE; 5079 5080 5081 -- 5082 -- Name: group_attributes_base group_attr_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5083 -- 5084 5085 ALTER TABLE ONLY public.group_attributes_base 5086 ADD CONSTRAINT group_attr_okey_fkey FOREIGN KEY (okey) REFERENCES public."group"(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5087 5088 5089 -- 5090 -- Name: group_attributes_sutypes group_attr_sutypes_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5091 -- 5092 5093 ALTER TABLE ONLY public.group_attributes_sutypes 5094 ADD CONSTRAINT group_attr_sutypes_okey_fkey FOREIGN KEY (okey) REFERENCES public."group"(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5095 5096 5097 -- 5098 -- Name: group_attributes_users group_attr_users_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5099 -- 5100 5101 ALTER TABLE ONLY public.group_attributes_users 5102 ADD CONSTRAINT group_attr_users_okey_fkey FOREIGN KEY (okey) REFERENCES public."group"(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5103 5104 5105 -- 5106 -- Name: group_attributes_sutypes group_attributes_sutypes_attr; Type: FK CONSTRAINT; Schema: public; Owner: - 5107 -- 5108 5109 ALTER TABLE ONLY public.group_attributes_sutypes 5110 ADD CONSTRAINT group_attributes_sutypes_attr FOREIGN KEY (attr) REFERENCES public.group_attributes_list(canonical) ON UPDATE CASCADE; 5111 5112 5113 -- 5114 -- Name: group_attributes_sutypes group_attributes_sutypes_sutype_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5115 -- 5116 5117 ALTER TABLE ONLY public.group_attributes_sutypes 5118 ADD CONSTRAINT group_attributes_sutypes_sutype_fkey FOREIGN KEY (value) REFERENCES public.su_type(name) ON UPDATE CASCADE ON DELETE CASCADE; 5119 5120 5121 -- 5122 -- Name: group_attributes_users group_attributes_users_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5123 -- 5124 5125 ALTER TABLE ONLY public.group_attributes_users 5126 ADD CONSTRAINT group_attributes_users_attr_fkey FOREIGN KEY (attr) REFERENCES public.group_attributes_list(canonical) ON UPDATE CASCADE; 5127 5128 5129 -- 5130 -- Name: group_attributes_users group_attributes_users_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5131 -- 5132 5133 ALTER TABLE ONLY public.group_attributes_users 5134 ADD CONSTRAINT group_attributes_users_user_fkey FOREIGN KEY (value) REFERENCES public."user"(name) ON UPDATE CASCADE ON DELETE CASCADE; 5135 5136 5137 -- 5138 -- Name: nethost_attributes_ips nethost_attr_ip_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5139 -- 5140 5141 ALTER TABLE ONLY public.nethost_attributes_ips 5142 ADD CONSTRAINT nethost_attr_ip_fkey FOREIGN KEY (okey) REFERENCES public.nethost(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5143 5144 5145 -- 5146 -- Name: nethost_attributes_macs nethost_attr_mac_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5147 -- 5148 5149 ALTER TABLE ONLY public.nethost_attributes_macs 5150 ADD CONSTRAINT nethost_attr_mac_fkey FOREIGN KEY (okey) REFERENCES public.nethost(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5151 5152 5153 -- 5154 -- Name: nethost_attributes_nethosts nethost_attr_nethosts_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5155 -- 5156 5157 ALTER TABLE ONLY public.nethost_attributes_nethosts 5158 ADD CONSTRAINT nethost_attr_nethosts_fkey FOREIGN KEY (okey) REFERENCES public.nethost(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5159 5160 5161 -- 5162 -- Name: nethost_attributes_nethosts nethost_attr_nethosts_nethosts; Type: FK CONSTRAINT; Schema: public; Owner: - 5163 -- 5164 5165 ALTER TABLE ONLY public.nethost_attributes_nethosts 5166 ADD CONSTRAINT nethost_attr_nethosts_nethosts FOREIGN KEY (value) REFERENCES public.nethost(name) ON UPDATE CASCADE ON DELETE CASCADE; 5167 5168 5169 -- 5170 -- Name: nethost_attributes nethost_attr_users_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5171 -- 5172 5173 ALTER TABLE ONLY public.nethost_attributes 5174 ADD CONSTRAINT nethost_attr_users_okey_fkey FOREIGN KEY (okey) REFERENCES public.nethost(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5175 5176 5177 -- 5178 -- Name: nethost_attributes_users nethost_attr_users_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5179 -- 5180 5181 ALTER TABLE ONLY public.nethost_attributes_users 5182 ADD CONSTRAINT nethost_attr_users_okey_fkey FOREIGN KEY (okey) REFERENCES public.nethost(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5183 5184 5185 -- 5186 -- Name: nethost_attributes nethost_attributes_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5187 -- 5188 5189 ALTER TABLE ONLY public.nethost_attributes 5190 ADD CONSTRAINT nethost_attributes_attr_fkey FOREIGN KEY (attr) REFERENCES public.nethost_attributes_list(canonical) ON UPDATE CASCADE; 5191 5192 5193 -- 5194 -- Name: nethost_attributes_users nethost_attributes_users_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5195 -- 5196 5197 ALTER TABLE ONLY public.nethost_attributes_users 5198 ADD CONSTRAINT nethost_attributes_users_attr_fkey FOREIGN KEY (attr) REFERENCES public.nethost_attributes_list(canonical) ON UPDATE CASCADE; 5199 5200 5201 -- 5202 -- Name: nethost_attributes_users nethost_attributes_users_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5203 -- 5204 5205 ALTER TABLE ONLY public.nethost_attributes_users 5206 ADD CONSTRAINT nethost_attributes_users_user_fkey FOREIGN KEY (value) REFERENCES public."user"(name) ON UPDATE CASCADE ON DELETE CASCADE; 5207 5208 5209 -- 5210 -- Name: netzone_attributes netzone_attr_users_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5211 -- 5212 5213 ALTER TABLE ONLY public.netzone_attributes 5214 ADD CONSTRAINT netzone_attr_users_okey_fkey FOREIGN KEY (okey) REFERENCES public.netzone(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5215 5216 5217 -- 5218 -- Name: netzone_attributes netzone_attributes_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5219 -- 5220 5221 ALTER TABLE ONLY public.netzone_attributes 5222 ADD CONSTRAINT netzone_attributes_attr_fkey FOREIGN KEY (attr) REFERENCES public.netzone_attributes_list(canonical) ON UPDATE CASCADE; 5223 5224 5225 -- 5226 -- Name: netzone_attributes_netzone netzone_attributes_netzone_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5227 -- 5228 5229 ALTER TABLE ONLY public.netzone_attributes_netzone 5230 ADD CONSTRAINT netzone_attributes_netzone_attr_fkey FOREIGN KEY (attr) REFERENCES public.netzone_attributes_list(canonical) ON UPDATE CASCADE; 5231 5232 5233 -- 5234 -- Name: netzone_attributes_netzone netzone_attributes_netzone_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5235 -- 5236 5237 ALTER TABLE ONLY public.netzone_attributes_netzone 5238 ADD CONSTRAINT netzone_attributes_netzone_okey_fkey FOREIGN KEY (okey) REFERENCES public.netzone(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5239 5240 5241 -- 5242 -- Name: netzone_attributes_netzone netzone_attributes_netzone_value_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5243 -- 5244 5245 ALTER TABLE ONLY public.netzone_attributes_netzone 5246 ADD CONSTRAINT netzone_attributes_netzone_value_fkey FOREIGN KEY (value) REFERENCES public.netzone(name) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; 5247 5248 5249 -- 5250 -- Name: netzone_attributes_site netzone_attributes_site_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5251 -- 5252 5253 ALTER TABLE ONLY public.netzone_attributes_site 5254 ADD CONSTRAINT netzone_attributes_site_attr_fkey FOREIGN KEY (attr) REFERENCES public.netzone_attributes_list(canonical) ON UPDATE CASCADE; 5255 5256 5257 -- 5258 -- Name: netzone_attributes_site netzone_attributes_site_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5259 -- 5260 5261 ALTER TABLE ONLY public.netzone_attributes_site 5262 ADD CONSTRAINT netzone_attributes_site_okey_fkey FOREIGN KEY (okey) REFERENCES public.netzone(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5263 5264 5265 -- 5266 -- Name: netzone_attributes_site netzone_attributes_site_value_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5267 -- 5268 5269 ALTER TABLE ONLY public.netzone_attributes_site 5270 ADD CONSTRAINT netzone_attributes_site_value_fkey FOREIGN KEY (value) REFERENCES public.site(name) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; 5271 5272 5273 -- 5274 -- Name: passwordreset password_reset_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5275 -- 5276 5277 ALTER TABLE ONLY public.passwordreset 5278 ADD CONSTRAINT password_reset_user_fkey FOREIGN KEY ("user") REFERENCES public."user"(name) ON UPDATE CASCADE ON DELETE CASCADE; 5279 5280 5281 -- 5282 -- Name: request_attributes request_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5283 -- 5284 5285 ALTER TABLE ONLY public.request_attributes 5286 ADD CONSTRAINT request_id_fkey FOREIGN KEY (reqid) REFERENCES public.request(id) ON UPDATE CASCADE ON DELETE CASCADE; 5287 5288 5289 -- 5290 -- Name: request request_name_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5291 -- 5292 5293 ALTER TABLE ONLY public.request 5294 ADD CONSTRAINT request_name_fkey FOREIGN KEY (name) REFERENCES public.accreq(name) ON UPDATE CASCADE ON DELETE CASCADE; 5295 5296 5297 -- 5298 -- Name: request request_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5299 -- 5300 5301 ALTER TABLE ONLY public.request 5302 ADD CONSTRAINT request_user_fkey FOREIGN KEY ("user") REFERENCES public."user"(name) ON UPDATE CASCADE ON DELETE SET NULL; 5303 5304 5305 -- 5306 -- Name: revaliases revaliase_name_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5307 -- 5308 5309 ALTER TABLE ONLY public.revaliases 5310 ADD CONSTRAINT revaliase_name_user_fkey FOREIGN KEY (name) REFERENCES public."user"(name) ON UPDATE CASCADE ON DELETE CASCADE; 5311 5312 5313 -- 5314 -- Name: service_attributes service_attr_users_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5315 -- 5316 5317 ALTER TABLE ONLY public.service_attributes 5318 ADD CONSTRAINT service_attr_users_okey_fkey FOREIGN KEY (okey) REFERENCES public.service(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5319 5320 5321 -- 5322 -- Name: service_attributes_users service_attr_users_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5323 -- 5324 5325 ALTER TABLE ONLY public.service_attributes_users 5326 ADD CONSTRAINT service_attr_users_okey_fkey FOREIGN KEY (okey) REFERENCES public.service(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5327 5328 5329 -- 5330 -- Name: service_attributes service_attributes_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5331 -- 5332 5333 ALTER TABLE ONLY public.service_attributes 5334 ADD CONSTRAINT service_attributes_attr_fkey FOREIGN KEY (attr) REFERENCES public.service_attributes_list(canonical) ON UPDATE CASCADE; 5335 5336 5337 -- 5338 -- Name: service_attributes_users service_attributes_users_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5339 -- 5340 5341 ALTER TABLE ONLY public.service_attributes_users 5342 ADD CONSTRAINT service_attributes_users_attr_fkey FOREIGN KEY (attr) REFERENCES public.service_attributes_list(canonical) ON UPDATE CASCADE; 5343 5344 5345 -- 5346 -- Name: service_attributes_users service_attributes_users_user_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5347 -- 5348 5349 ALTER TABLE ONLY public.service_attributes_users 5350 ADD CONSTRAINT service_attributes_users_user_fkey FOREIGN KEY (value) REFERENCES public."user"(name) ON UPDATE CASCADE ON DELETE CASCADE; 5351 5352 5353 -- 5354 -- Name: site_attributes site_attr_users_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5355 -- 5356 5357 ALTER TABLE ONLY public.site_attributes 5358 ADD CONSTRAINT site_attr_users_okey_fkey FOREIGN KEY (okey) REFERENCES public.site(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5359 5360 5361 -- 5362 -- Name: site_attributes site_attributes_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5363 -- 5364 5365 ALTER TABLE ONLY public.site_attributes 5366 ADD CONSTRAINT site_attributes_attr_fkey FOREIGN KEY (attr) REFERENCES public.site_attributes_list(canonical) ON UPDATE CASCADE; 5367 5368 5369 -- 5370 -- Name: stat_attributes stat; Type: FK CONSTRAINT; Schema: public; Owner: - 5371 -- 5372 5373 ALTER TABLE ONLY public.stat_attributes 5374 ADD CONSTRAINT stat FOREIGN KEY (okey) REFERENCES public.stat(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5375 5376 5377 -- 5378 -- Name: statsentry stat; Type: FK CONSTRAINT; Schema: public; Owner: - 5379 -- 5380 5381 ALTER TABLE ONLY public.statsentry 5382 ADD CONSTRAINT stat FOREIGN KEY (okey) REFERENCES public.stat(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5383 5384 5385 -- 5386 -- Name: statvalues statvalues_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5387 -- 5388 5389 ALTER TABLE ONLY public.statvalues 5390 ADD CONSTRAINT statvalues_fkey FOREIGN KEY (sid) REFERENCES public.statsentry(id); 5391 5392 5393 -- 5394 -- Name: user_attributes_base user_attr_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5395 -- 5396 5397 ALTER TABLE ONLY public.user_attributes_base 5398 ADD CONSTRAINT user_attr_okey_fkey FOREIGN KEY (okey) REFERENCES public."user"(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5399 5400 5401 -- 5402 -- Name: user_attributes_base user_attributes_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5403 -- 5404 5405 ALTER TABLE ONLY public.user_attributes_base 5406 ADD CONSTRAINT user_attributes_attr_fkey FOREIGN KEY (attr) REFERENCES public.user_attributes_list(canonical) ON UPDATE CASCADE; 5407 5408 5409 -- 5410 -- Name: user_attributes_groups user_attributes_groups_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5411 -- 5412 5413 ALTER TABLE ONLY public.user_attributes_groups 5414 ADD CONSTRAINT user_attributes_groups_attr_fkey FOREIGN KEY (attr) REFERENCES public.user_attributes_list(canonical) ON UPDATE CASCADE; 5415 5416 5417 -- 5418 -- Name: user_attributes_groups user_attributes_groups_value_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5419 -- 5420 5421 ALTER TABLE ONLY public.user_attributes_groups 5422 ADD CONSTRAINT user_attributes_groups_value_fkey FOREIGN KEY (value) REFERENCES public."group"(name) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; 5423 5424 5425 -- 5426 -- Name: user_attributes_site user_attributes_site_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5427 -- 5428 5429 ALTER TABLE ONLY public.user_attributes_site 5430 ADD CONSTRAINT user_attributes_site_attr_fkey FOREIGN KEY (attr) REFERENCES public.user_attributes_list(canonical) ON UPDATE CASCADE; 5431 5432 5433 -- 5434 -- Name: user_attributes_site user_attributes_site_value_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5435 -- 5436 5437 ALTER TABLE ONLY public.user_attributes_site 5438 ADD CONSTRAINT user_attributes_site_value_fkey FOREIGN KEY (value) REFERENCES public.site(name) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; 5439 5440 5441 -- 5442 -- Name: user_attributes_users user_attributes_users_attr_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5443 -- 5444 5445 ALTER TABLE ONLY public.user_attributes_users 5446 ADD CONSTRAINT user_attributes_users_attr_fkey FOREIGN KEY (attr) REFERENCES public.user_attributes_list(canonical) ON UPDATE CASCADE; 5447 5448 5449 -- 5450 -- Name: user_attributes_users user_attributes_users_value_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5451 -- 5452 5453 ALTER TABLE ONLY public.user_attributes_users 5454 ADD CONSTRAINT user_attributes_users_value_fkey FOREIGN KEY (value) REFERENCES public."user"(name) ON UPDATE CASCADE ON DELETE CASCADE DEFERRABLE INITIALLY DEFERRED; 5455 5456 5457 -- 5458 -- Name: user_attributes_site user_site_attr_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5459 -- 5460 5461 ALTER TABLE ONLY public.user_attributes_site 5462 ADD CONSTRAINT user_site_attr_okey_fkey FOREIGN KEY (okey) REFERENCES public."user"(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5463 5464 5465 -- 5466 -- Name: user_attributes_users user_users_attr_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5467 -- 5468 5469 ALTER TABLE ONLY public.user_attributes_users 5470 ADD CONSTRAINT user_users_attr_okey_fkey FOREIGN KEY (okey) REFERENCES public."user"(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 5471 5472 5473 -- 5474 -- Name: user_attributes_groups user_users_attr_okey_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - 5475 -- 5476 5477 ALTER TABLE ONLY public.user_attributes_groups 5478 ADD CONSTRAINT user_users_attr_okey_fkey FOREIGN KEY (okey) REFERENCES public."user"(ikey) ON UPDATE CASCADE ON DELETE CASCADE; 3077 5479 3078 5480 … … 3081 5483 -- 3082 5484 3083 INSERT INTO settings (varname, val) VALUES ('schema_version', '3'); 3084 5485 5486 INSERT INTO public.settings (varname, val) VALUES ('public.schema_version', '28');
Note: See TracChangeset
for help on using the changeset viewer.