sql/schéma.sql
changeset 188 74d06a8a4948
parent 163 5f0d5e1305b3
     1.1 --- a/sql/schéma.sql	Tue Jan 11 15:27:51 2011 +0100
     1.2 +++ b/sql/schéma.sql	Tue Jul 19 15:22:15 2011 +0200
     1.3 @@ -2,7 +2,7 @@
     1.4  -- PostgreSQL database dump
     1.5  --
     1.6  
     1.7 --- Started on 2011-01-11 15:26:21 CET
     1.8 +-- Started on 2011-01-15 14:24:29 CET
     1.9  
    1.10  SET statement_timeout = 0;
    1.11  SET client_encoding = 'UTF8';
    1.12 @@ -36,7 +36,7 @@
    1.13  ALTER DOMAIN nekurak.email OWNER TO nekurak;
    1.14  
    1.15  --
    1.16 --- TOC entry 1942 (class 0 OID 0)
    1.17 +-- TOC entry 1946 (class 0 OID 0)
    1.18  -- Dependencies: 366
    1.19  -- Name: DOMAIN email; Type: COMMENT; Schema: nekurak; Owner: nekurak
    1.20  --
    1.21 @@ -46,7 +46,7 @@
    1.22  
    1.23  --
    1.24  -- TOC entry 65 (class 1255 OID 35124)
    1.25 --- Dependencies: 411 10
    1.26 +-- Dependencies: 412 10
    1.27  -- Name: bezny_uzivatel(); Type: FUNCTION; Schema: nekurak; Owner: nekurak
    1.28  --
    1.29  
    1.30 @@ -64,7 +64,7 @@
    1.31  ALTER FUNCTION nekurak.bezny_uzivatel() OWNER TO nekurak;
    1.32  
    1.33  --
    1.34 --- TOC entry 1943 (class 0 OID 0)
    1.35 +-- TOC entry 1947 (class 0 OID 0)
    1.36  -- Dependencies: 65
    1.37  -- Name: FUNCTION bezny_uzivatel(); Type: COMMENT; Schema: nekurak; Owner: nekurak
    1.38  --
    1.39 @@ -73,7 +73,7 @@
    1.40  
    1.41  
    1.42  --
    1.43 --- TOC entry 1610 (class 1259 OID 35223)
    1.44 +-- TOC entry 1611 (class 1259 OID 35223)
    1.45  -- Dependencies: 10
    1.46  -- Name: clanek_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
    1.47  --
    1.48 @@ -92,8 +92,8 @@
    1.49  SET default_with_oids = false;
    1.50  
    1.51  --
    1.52 --- TOC entry 1609 (class 1259 OID 35205)
    1.53 --- Dependencies: 1897 10
    1.54 +-- TOC entry 1610 (class 1259 OID 35205)
    1.55 +-- Dependencies: 1899 10
    1.56  -- Name: clanek; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
    1.57  --
    1.58  
    1.59 @@ -107,8 +107,8 @@
    1.60  ALTER TABLE nekurak.clanek OWNER TO nekurak;
    1.61  
    1.62  --
    1.63 --- TOC entry 1945 (class 0 OID 0)
    1.64 --- Dependencies: 1609
    1.65 +-- TOC entry 1949 (class 0 OID 0)
    1.66 +-- Dependencies: 1610
    1.67  -- Name: TABLE clanek; Type: COMMENT; Schema: nekurak; Owner: nekurak
    1.68  --
    1.69  
    1.70 @@ -116,7 +116,7 @@
    1.71  
    1.72  
    1.73  --
    1.74 --- TOC entry 1607 (class 1259 OID 35183)
    1.75 +-- TOC entry 1608 (class 1259 OID 35183)
    1.76  -- Dependencies: 10
    1.77  -- Name: fotka_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
    1.78  --
    1.79 @@ -132,8 +132,8 @@
    1.80  ALTER TABLE nekurak.fotka_seq OWNER TO nekurak;
    1.81  
    1.82  --
    1.83 --- TOC entry 1608 (class 1259 OID 35185)
    1.84 --- Dependencies: 1895 1896 10
    1.85 +-- TOC entry 1609 (class 1259 OID 35185)
    1.86 +-- Dependencies: 1897 1898 10
    1.87  -- Name: fotka; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
    1.88  --
    1.89  
    1.90 @@ -148,8 +148,8 @@
    1.91  ALTER TABLE nekurak.fotka OWNER TO nekurak;
    1.92  
    1.93  --
    1.94 --- TOC entry 1948 (class 0 OID 0)
    1.95 --- Dependencies: 1608
    1.96 +-- TOC entry 1952 (class 0 OID 0)
    1.97 +-- Dependencies: 1609
    1.98  -- Name: TABLE fotka; Type: COMMENT; Schema: nekurak; Owner: nekurak
    1.99  --
   1.100  
   1.101 @@ -157,8 +157,8 @@
   1.102  
   1.103  
   1.104  --
   1.105 --- TOC entry 1949 (class 0 OID 0)
   1.106 --- Dependencies: 1608
   1.107 +-- TOC entry 1953 (class 0 OID 0)
   1.108 +-- Dependencies: 1609
   1.109  -- Name: COLUMN fotka.poradi; Type: COMMENT; Schema: nekurak; Owner: nekurak
   1.110  --
   1.111  
   1.112 @@ -166,7 +166,7 @@
   1.113  
   1.114  
   1.115  --
   1.116 --- TOC entry 1612 (class 1259 OID 35250)
   1.117 +-- TOC entry 1613 (class 1259 OID 35250)
   1.118  -- Dependencies: 10
   1.119  -- Name: hlasovani_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
   1.120  --
   1.121 @@ -181,8 +181,8 @@
   1.122  ALTER TABLE nekurak.hlasovani_seq OWNER TO nekurak;
   1.123  
   1.124  --
   1.125 --- TOC entry 1613 (class 1259 OID 35278)
   1.126 --- Dependencies: 1898 1899 10
   1.127 +-- TOC entry 1614 (class 1259 OID 35278)
   1.128 +-- Dependencies: 1900 1901 10
   1.129  -- Name: hlasovani; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.130  --
   1.131  
   1.132 @@ -198,8 +198,8 @@
   1.133  ALTER TABLE nekurak.hlasovani OWNER TO nekurak;
   1.134  
   1.135  --
   1.136 --- TOC entry 1952 (class 0 OID 0)
   1.137 --- Dependencies: 1613
   1.138 +-- TOC entry 1956 (class 0 OID 0)
   1.139 +-- Dependencies: 1614
   1.140  -- Name: COLUMN hlasovani.id; Type: COMMENT; Schema: nekurak; Owner: nekurak
   1.141  --
   1.142  
   1.143 @@ -209,8 +209,8 @@
   1.144  
   1.145  
   1.146  --
   1.147 --- TOC entry 1953 (class 0 OID 0)
   1.148 --- Dependencies: 1613
   1.149 +-- TOC entry 1957 (class 0 OID 0)
   1.150 +-- Dependencies: 1614
   1.151  -- Name: COLUMN hlasovani.hlas; Type: COMMENT; Schema: nekurak; Owner: nekurak
   1.152  --
   1.153  
   1.154 @@ -220,28 +220,13 @@
   1.155  
   1.156  
   1.157  --
   1.158 --- TOC entry 1616 (class 1259 OID 35396)
   1.159 +-- TOC entry 1617 (class 1259 OID 35398)
   1.160  -- Dependencies: 10
   1.161 --- Name: kategorie_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
   1.162 ---
   1.163 -
   1.164 -CREATE SEQUENCE kategorie_seq
   1.165 -    INCREMENT BY 1
   1.166 -    NO MAXVALUE
   1.167 -    NO MINVALUE
   1.168 -    CACHE 1;
   1.169 -
   1.170 -
   1.171 -ALTER TABLE nekurak.kategorie_seq OWNER TO nekurak;
   1.172 -
   1.173 ---
   1.174 --- TOC entry 1617 (class 1259 OID 35398)
   1.175 --- Dependencies: 1902 10
   1.176  -- Name: kategorie; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.177  --
   1.178  
   1.179  CREATE TABLE kategorie (
   1.180 -    id integer DEFAULT nextval('kategorie_seq'::regclass) NOT NULL,
   1.181 +    id integer NOT NULL,
   1.182      nazev character varying(32) NOT NULL
   1.183  );
   1.184  
   1.185 @@ -249,7 +234,7 @@
   1.186  ALTER TABLE nekurak.kategorie OWNER TO nekurak;
   1.187  
   1.188  --
   1.189 --- TOC entry 1956 (class 0 OID 0)
   1.190 +-- TOC entry 1959 (class 0 OID 0)
   1.191  -- Dependencies: 1617
   1.192  -- Name: TABLE kategorie; Type: COMMENT; Schema: nekurak; Owner: nekurak
   1.193  --
   1.194 @@ -258,7 +243,7 @@
   1.195  
   1.196  
   1.197  --
   1.198 --- TOC entry 1957 (class 0 OID 0)
   1.199 +-- TOC entry 1960 (class 0 OID 0)
   1.200  -- Dependencies: 1617
   1.201  -- Name: COLUMN kategorie.nazev; Type: COMMENT; Schema: nekurak; Owner: nekurak
   1.202  --
   1.203 @@ -268,7 +253,7 @@
   1.204  
   1.205  
   1.206  --
   1.207 --- TOC entry 1614 (class 1259 OID 35333)
   1.208 +-- TOC entry 1615 (class 1259 OID 35333)
   1.209  -- Dependencies: 10
   1.210  -- Name: komentar_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
   1.211  --
   1.212 @@ -283,8 +268,8 @@
   1.213  ALTER TABLE nekurak.komentar_seq OWNER TO nekurak;
   1.214  
   1.215  --
   1.216 --- TOC entry 1615 (class 1259 OID 35376)
   1.217 --- Dependencies: 1900 1901 10
   1.218 +-- TOC entry 1616 (class 1259 OID 35376)
   1.219 +-- Dependencies: 1902 1903 10
   1.220  -- Name: komentar; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.221  --
   1.222  
   1.223 @@ -301,8 +286,8 @@
   1.224  ALTER TABLE nekurak.komentar OWNER TO nekurak;
   1.225  
   1.226  --
   1.227 --- TOC entry 1960 (class 0 OID 0)
   1.228 --- Dependencies: 1615
   1.229 +-- TOC entry 1963 (class 0 OID 0)
   1.230 +-- Dependencies: 1616
   1.231  -- Name: TABLE komentar; Type: COMMENT; Schema: nekurak; Owner: nekurak
   1.232  --
   1.233  
   1.234 @@ -310,8 +295,8 @@
   1.235  
   1.236  
   1.237  --
   1.238 --- TOC entry 1961 (class 0 OID 0)
   1.239 --- Dependencies: 1615
   1.240 +-- TOC entry 1964 (class 0 OID 0)
   1.241 +-- Dependencies: 1616
   1.242  -- Name: COLUMN komentar.nadpis; Type: COMMENT; Schema: nekurak; Owner: nekurak
   1.243  --
   1.244  
   1.245 @@ -319,8 +304,8 @@
   1.246  
   1.247  
   1.248  --
   1.249 --- TOC entry 1962 (class 0 OID 0)
   1.250 --- Dependencies: 1615
   1.251 +-- TOC entry 1965 (class 0 OID 0)
   1.252 +-- Dependencies: 1616
   1.253  -- Name: COLUMN komentar.komentar; Type: COMMENT; Schema: nekurak; Owner: nekurak
   1.254  --
   1.255  
   1.256 @@ -329,7 +314,30 @@
   1.257  
   1.258  
   1.259  --
   1.260 --- TOC entry 1601 (class 1259 OID 35019)
   1.261 +-- TOC entry 1619 (class 1259 OID 35436)
   1.262 +-- Dependencies: 10
   1.263 +-- Name: kurackost; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.264 +--
   1.265 +
   1.266 +CREATE TABLE kurackost (
   1.267 +    id integer NOT NULL,
   1.268 +    popis character varying(64)
   1.269 +);
   1.270 +
   1.271 +
   1.272 +ALTER TABLE nekurak.kurackost OWNER TO nekurak;
   1.273 +
   1.274 +--
   1.275 +-- TOC entry 1967 (class 0 OID 0)
   1.276 +-- Dependencies: 1619
   1.277 +-- Name: TABLE kurackost; Type: COMMENT; Schema: nekurak; Owner: nekurak
   1.278 +--
   1.279 +
   1.280 +COMMENT ON TABLE kurackost IS 'Kuřáckost podniku – zda se tu kouří, nekouří, nebo jen částečně atd.';
   1.281 +
   1.282 +
   1.283 +--
   1.284 +-- TOC entry 1602 (class 1259 OID 35019)
   1.285  -- Dependencies: 10
   1.286  -- Name: podnik_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
   1.287  --
   1.288 @@ -344,8 +352,8 @@
   1.289  ALTER TABLE nekurak.podnik_seq OWNER TO nekurak;
   1.290  
   1.291  --
   1.292 --- TOC entry 1602 (class 1259 OID 35049)
   1.293 --- Dependencies: 1890 1891 1892 10
   1.294 +-- TOC entry 1603 (class 1259 OID 35049)
   1.295 +-- Dependencies: 1891 1892 1893 1894 10
   1.296  -- Name: podnik; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.297  --
   1.298  
   1.299 @@ -361,16 +369,16 @@
   1.300      spravce character varying(64),
   1.301      sirka double precision,
   1.302      delka double precision,
   1.303 -    stav character(1),
   1.304 -    CONSTRAINT stav_tg CHECK (((stav = ANY (ARRAY['k'::bpchar, 'n'::bpchar, 'o'::bpchar, 'c'::bpchar])) OR (stav IS NULL)))
   1.305 +    kurackost integer DEFAULT 0 NOT NULL,
   1.306 +    schvaleny boolean DEFAULT false NOT NULL
   1.307  );
   1.308  
   1.309  
   1.310  ALTER TABLE nekurak.podnik OWNER TO nekurak;
   1.311  
   1.312  --
   1.313 --- TOC entry 1965 (class 0 OID 0)
   1.314 --- Dependencies: 1602
   1.315 +-- TOC entry 1970 (class 0 OID 0)
   1.316 +-- Dependencies: 1603
   1.317  -- Name: COLUMN podnik.spravce; Type: COMMENT; Schema: nekurak; Owner: nekurak
   1.318  --
   1.319  
   1.320 @@ -378,19 +386,6 @@
   1.321  
   1.322  
   1.323  --
   1.324 --- TOC entry 1966 (class 0 OID 0)
   1.325 --- Dependencies: 1602
   1.326 --- Name: CONSTRAINT stav_tg ON podnik; Type: COMMENT; Schema: nekurak; Owner: nekurak
   1.327 ---
   1.328 -
   1.329 -COMMENT ON CONSTRAINT stav_tg ON podnik IS 'k = kuřácký
   1.330 -n = nekuřácký
   1.331 -o = oddělené části (důkladně)
   1.332 -c = částečně kuřácký (špatně oddělené, považujeme za kuřácký)
   1.333 -NULL = neznámý stav';
   1.334 -
   1.335 -
   1.336 ---
   1.337  -- TOC entry 1618 (class 1259 OID 35404)
   1.338  -- Dependencies: 10
   1.339  -- Name: podnik_kategorie; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.340 @@ -405,7 +400,7 @@
   1.341  ALTER TABLE nekurak.podnik_kategorie OWNER TO nekurak;
   1.342  
   1.343  --
   1.344 --- TOC entry 1605 (class 1259 OID 35101)
   1.345 +-- TOC entry 1606 (class 1259 OID 35101)
   1.346  -- Dependencies: 10
   1.347  -- Name: role; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.348  --
   1.349 @@ -419,8 +414,8 @@
   1.350  ALTER TABLE nekurak.role OWNER TO nekurak;
   1.351  
   1.352  --
   1.353 --- TOC entry 1969 (class 0 OID 0)
   1.354 --- Dependencies: 1605
   1.355 +-- TOC entry 1973 (class 0 OID 0)
   1.356 +-- Dependencies: 1606
   1.357  -- Name: TABLE role; Type: COMMENT; Schema: nekurak; Owner: nekurak
   1.358  --
   1.359  
   1.360 @@ -428,7 +423,7 @@
   1.361  
   1.362  
   1.363  --
   1.364 --- TOC entry 1603 (class 1259 OID 35080)
   1.365 +-- TOC entry 1604 (class 1259 OID 35080)
   1.366  -- Dependencies: 10
   1.367  -- Name: uzivatel_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
   1.368  --
   1.369 @@ -443,8 +438,8 @@
   1.370  ALTER TABLE nekurak.uzivatel_seq OWNER TO nekurak;
   1.371  
   1.372  --
   1.373 --- TOC entry 1604 (class 1259 OID 35091)
   1.374 --- Dependencies: 1893 1894 10
   1.375 +-- TOC entry 1605 (class 1259 OID 35091)
   1.376 +-- Dependencies: 1895 1896 10
   1.377  -- Name: uzivatel; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.378  --
   1.379  
   1.380 @@ -462,8 +457,8 @@
   1.381  ALTER TABLE nekurak.uzivatel OWNER TO nekurak;
   1.382  
   1.383  --
   1.384 --- TOC entry 1972 (class 0 OID 0)
   1.385 --- Dependencies: 1604
   1.386 +-- TOC entry 1976 (class 0 OID 0)
   1.387 +-- Dependencies: 1605
   1.388  -- Name: COLUMN uzivatel.prezdivka; Type: COMMENT; Schema: nekurak; Owner: nekurak
   1.389  --
   1.390  
   1.391 @@ -471,7 +466,7 @@
   1.392  
   1.393  
   1.394  --
   1.395 --- TOC entry 1606 (class 1259 OID 35106)
   1.396 +-- TOC entry 1607 (class 1259 OID 35106)
   1.397  -- Dependencies: 10
   1.398  -- Name: uzivatel_role; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.399  --
   1.400 @@ -485,8 +480,8 @@
   1.401  ALTER TABLE nekurak.uzivatel_role OWNER TO nekurak;
   1.402  
   1.403  --
   1.404 --- TOC entry 1974 (class 0 OID 0)
   1.405 --- Dependencies: 1606
   1.406 +-- TOC entry 1978 (class 0 OID 0)
   1.407 +-- Dependencies: 1607
   1.408  -- Name: TABLE uzivatel_role; Type: COMMENT; Schema: nekurak; Owner: nekurak
   1.409  --
   1.410  
   1.411 @@ -494,8 +489,8 @@
   1.412  
   1.413  
   1.414  --
   1.415 --- TOC entry 1918 (class 2606 OID 35227)
   1.416 --- Dependencies: 1609 1609
   1.417 +-- TOC entry 1919 (class 2606 OID 35227)
   1.418 +-- Dependencies: 1610 1610
   1.419  -- Name: clanek_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.420  --
   1.421  
   1.422 @@ -504,8 +499,8 @@
   1.423  
   1.424  
   1.425  --
   1.426 --- TOC entry 1914 (class 2606 OID 35190)
   1.427 --- Dependencies: 1608 1608
   1.428 +-- TOC entry 1915 (class 2606 OID 35190)
   1.429 +-- Dependencies: 1609 1609
   1.430  -- Name: fotka_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.431  --
   1.432  
   1.433 @@ -514,8 +509,8 @@
   1.434  
   1.435  
   1.436  --
   1.437 --- TOC entry 1916 (class 2606 OID 35204)
   1.438 --- Dependencies: 1608 1608 1608
   1.439 +-- TOC entry 1917 (class 2606 OID 35204)
   1.440 +-- Dependencies: 1609 1609 1609
   1.441  -- Name: fotka_poradi_uq; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.442  --
   1.443  
   1.444 @@ -524,8 +519,8 @@
   1.445  
   1.446  
   1.447  --
   1.448 --- TOC entry 1921 (class 2606 OID 35284)
   1.449 --- Dependencies: 1613 1613
   1.450 +-- TOC entry 1922 (class 2606 OID 35284)
   1.451 +-- Dependencies: 1614 1614
   1.452  -- Name: hlasovani_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.453  --
   1.454  
   1.455 @@ -534,7 +529,7 @@
   1.456  
   1.457  
   1.458  --
   1.459 --- TOC entry 1926 (class 2606 OID 35403)
   1.460 +-- TOC entry 1927 (class 2606 OID 35403)
   1.461  -- Dependencies: 1617 1617
   1.462  -- Name: kategorie_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.463  --
   1.464 @@ -544,8 +539,8 @@
   1.465  
   1.466  
   1.467  --
   1.468 --- TOC entry 1924 (class 2606 OID 35385)
   1.469 --- Dependencies: 1615 1615
   1.470 +-- TOC entry 1925 (class 2606 OID 35385)
   1.471 +-- Dependencies: 1616 1616
   1.472  -- Name: komentar_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.473  --
   1.474  
   1.475 @@ -554,7 +549,17 @@
   1.476  
   1.477  
   1.478  --
   1.479 --- TOC entry 1928 (class 2606 OID 35408)
   1.480 +-- TOC entry 1931 (class 2606 OID 35441)
   1.481 +-- Dependencies: 1619 1619
   1.482 +-- Name: kurackost_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.483 +--
   1.484 +
   1.485 +ALTER TABLE ONLY kurackost
   1.486 +    ADD CONSTRAINT kurackost_pk PRIMARY KEY (id);
   1.487 +
   1.488 +
   1.489 +--
   1.490 +-- TOC entry 1929 (class 2606 OID 35408)
   1.491  -- Dependencies: 1618 1618 1618
   1.492  -- Name: podnik_kategorie_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.493  --
   1.494 @@ -564,8 +569,8 @@
   1.495  
   1.496  
   1.497  --
   1.498 --- TOC entry 1904 (class 2606 OID 35058)
   1.499 --- Dependencies: 1602 1602
   1.500 +-- TOC entry 1905 (class 2606 OID 35058)
   1.501 +-- Dependencies: 1603 1603
   1.502  -- Name: podnik_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.503  --
   1.504  
   1.505 @@ -574,8 +579,8 @@
   1.506  
   1.507  
   1.508  --
   1.509 --- TOC entry 1910 (class 2606 OID 35105)
   1.510 --- Dependencies: 1605 1605
   1.511 +-- TOC entry 1911 (class 2606 OID 35105)
   1.512 +-- Dependencies: 1606 1606
   1.513  -- Name: skupina_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.514  --
   1.515  
   1.516 @@ -584,8 +589,8 @@
   1.517  
   1.518  
   1.519  --
   1.520 --- TOC entry 1906 (class 2606 OID 35098)
   1.521 --- Dependencies: 1604 1604
   1.522 +-- TOC entry 1907 (class 2606 OID 35098)
   1.523 +-- Dependencies: 1605 1605
   1.524  -- Name: uzivatel_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.525  --
   1.526  
   1.527 @@ -594,8 +599,8 @@
   1.528  
   1.529  
   1.530  --
   1.531 --- TOC entry 1908 (class 2606 OID 35100)
   1.532 --- Dependencies: 1604 1604
   1.533 +-- TOC entry 1909 (class 2606 OID 35100)
   1.534 +-- Dependencies: 1605 1605
   1.535  -- Name: uzivatel_prezdivka_uq; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.536  --
   1.537  
   1.538 @@ -604,8 +609,8 @@
   1.539  
   1.540  
   1.541  --
   1.542 --- TOC entry 1912 (class 2606 OID 35137)
   1.543 --- Dependencies: 1606 1606 1606
   1.544 +-- TOC entry 1913 (class 2606 OID 35137)
   1.545 +-- Dependencies: 1607 1607 1607
   1.546  -- Name: uzivatel_role_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.547  --
   1.548  
   1.549 @@ -614,8 +619,8 @@
   1.550  
   1.551  
   1.552  --
   1.553 --- TOC entry 1919 (class 1259 OID 35291)
   1.554 --- Dependencies: 1613
   1.555 +-- TOC entry 1920 (class 1259 OID 35291)
   1.556 +-- Dependencies: 1614
   1.557  -- Name: hlasovani_ip_idx; Type: INDEX; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.558  --
   1.559  
   1.560 @@ -623,8 +628,8 @@
   1.561  
   1.562  
   1.563  --
   1.564 --- TOC entry 1922 (class 1259 OID 35309)
   1.565 --- Dependencies: 1613
   1.566 +-- TOC entry 1923 (class 1259 OID 35309)
   1.567 +-- Dependencies: 1614
   1.568  -- Name: hlsovani_datum_idx; Type: INDEX; Schema: nekurak; Owner: nekurak; Tablespace: 
   1.569  --
   1.570  
   1.571 @@ -632,8 +637,8 @@
   1.572  
   1.573  
   1.574  --
   1.575 --- TOC entry 1938 (class 2620 OID 35125)
   1.576 --- Dependencies: 1604 65
   1.577 +-- TOC entry 1942 (class 2620 OID 35125)
   1.578 +-- Dependencies: 65 1605
   1.579  -- Name: uzivatel_insert; Type: TRIGGER; Schema: nekurak; Owner: nekurak
   1.580  --
   1.581  
   1.582 @@ -644,8 +649,8 @@
   1.583  
   1.584  
   1.585  --
   1.586 --- TOC entry 1932 (class 2606 OID 35191)
   1.587 --- Dependencies: 1903 1608 1602
   1.588 +-- TOC entry 1936 (class 2606 OID 35191)
   1.589 +-- Dependencies: 1904 1603 1609
   1.590  -- Name: fotka_podnik_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
   1.591  --
   1.592  
   1.593 @@ -654,8 +659,8 @@
   1.594  
   1.595  
   1.596  --
   1.597 --- TOC entry 1933 (class 2606 OID 35285)
   1.598 --- Dependencies: 1903 1602 1613
   1.599 +-- TOC entry 1937 (class 2606 OID 35285)
   1.600 +-- Dependencies: 1614 1603 1904
   1.601  -- Name: hlasovani_podnik_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
   1.602  --
   1.603  
   1.604 @@ -664,8 +669,8 @@
   1.605  
   1.606  
   1.607  --
   1.608 --- TOC entry 1934 (class 2606 OID 35386)
   1.609 --- Dependencies: 1615 1602 1903
   1.610 +-- TOC entry 1938 (class 2606 OID 35386)
   1.611 +-- Dependencies: 1904 1603 1616
   1.612  -- Name: komentar_podnik_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
   1.613  --
   1.614  
   1.615 @@ -674,8 +679,8 @@
   1.616  
   1.617  
   1.618  --
   1.619 --- TOC entry 1935 (class 2606 OID 35391)
   1.620 --- Dependencies: 1907 1604 1615
   1.621 +-- TOC entry 1939 (class 2606 OID 35391)
   1.622 +-- Dependencies: 1616 1908 1605
   1.623  -- Name: komentar_uzivatel_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
   1.624  --
   1.625  
   1.626 @@ -684,8 +689,8 @@
   1.627  
   1.628  
   1.629  --
   1.630 --- TOC entry 1937 (class 2606 OID 35414)
   1.631 --- Dependencies: 1618 1925 1617
   1.632 +-- TOC entry 1941 (class 2606 OID 35414)
   1.633 +-- Dependencies: 1926 1617 1618
   1.634  -- Name: podnik_kategorie_kategorie_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
   1.635  --
   1.636  
   1.637 @@ -694,8 +699,8 @@
   1.638  
   1.639  
   1.640  --
   1.641 --- TOC entry 1936 (class 2606 OID 35409)
   1.642 --- Dependencies: 1903 1602 1618
   1.643 +-- TOC entry 1940 (class 2606 OID 35409)
   1.644 +-- Dependencies: 1603 1618 1904
   1.645  -- Name: podnik_kategorie_podnik_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
   1.646  --
   1.647  
   1.648 @@ -704,8 +709,18 @@
   1.649  
   1.650  
   1.651  --
   1.652 --- TOC entry 1929 (class 2606 OID 35178)
   1.653 --- Dependencies: 1602 1604 1907
   1.654 +-- TOC entry 1933 (class 2606 OID 35458)
   1.655 +-- Dependencies: 1603 1619 1930
   1.656 +-- Name: podnik_kurackost_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
   1.657 +--
   1.658 +
   1.659 +ALTER TABLE ONLY podnik
   1.660 +    ADD CONSTRAINT podnik_kurackost_fk FOREIGN KEY (kurackost) REFERENCES kurackost(id);
   1.661 +
   1.662 +
   1.663 +--
   1.664 +-- TOC entry 1932 (class 2606 OID 35178)
   1.665 +-- Dependencies: 1603 1605 1908
   1.666  -- Name: podnik_uzivatel_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
   1.667  --
   1.668  
   1.669 @@ -714,8 +729,8 @@
   1.670  
   1.671  
   1.672  --
   1.673 --- TOC entry 1930 (class 2606 OID 35138)
   1.674 --- Dependencies: 1909 1606 1605
   1.675 +-- TOC entry 1934 (class 2606 OID 35138)
   1.676 +-- Dependencies: 1607 1910 1606
   1.677  -- Name: uzivatel_role_role_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
   1.678  --
   1.679  
   1.680 @@ -724,8 +739,8 @@
   1.681  
   1.682  
   1.683  --
   1.684 --- TOC entry 1931 (class 2606 OID 35143)
   1.685 --- Dependencies: 1907 1604 1606
   1.686 +-- TOC entry 1935 (class 2606 OID 35143)
   1.687 +-- Dependencies: 1605 1607 1908
   1.688  -- Name: uzivatel_role_uzivatel_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
   1.689  --
   1.690  
   1.691 @@ -734,7 +749,7 @@
   1.692  
   1.693  
   1.694  --
   1.695 --- TOC entry 1941 (class 0 OID 0)
   1.696 +-- TOC entry 1945 (class 0 OID 0)
   1.697  -- Dependencies: 10
   1.698  -- Name: nekurak; Type: ACL; Schema: -; Owner: nekurak
   1.699  --
   1.700 @@ -746,8 +761,8 @@
   1.701  
   1.702  
   1.703  --
   1.704 --- TOC entry 1944 (class 0 OID 0)
   1.705 --- Dependencies: 1610
   1.706 +-- TOC entry 1948 (class 0 OID 0)
   1.707 +-- Dependencies: 1611
   1.708  -- Name: clanek_seq; Type: ACL; Schema: nekurak; Owner: nekurak
   1.709  --
   1.710  
   1.711 @@ -758,8 +773,8 @@
   1.712  
   1.713  
   1.714  --
   1.715 --- TOC entry 1946 (class 0 OID 0)
   1.716 --- Dependencies: 1609
   1.717 +-- TOC entry 1950 (class 0 OID 0)
   1.718 +-- Dependencies: 1610
   1.719  -- Name: clanek; Type: ACL; Schema: nekurak; Owner: nekurak
   1.720  --
   1.721  
   1.722 @@ -770,8 +785,8 @@
   1.723  
   1.724  
   1.725  --
   1.726 --- TOC entry 1947 (class 0 OID 0)
   1.727 --- Dependencies: 1607
   1.728 +-- TOC entry 1951 (class 0 OID 0)
   1.729 +-- Dependencies: 1608
   1.730  -- Name: fotka_seq; Type: ACL; Schema: nekurak; Owner: nekurak
   1.731  --
   1.732  
   1.733 @@ -782,8 +797,8 @@
   1.734  
   1.735  
   1.736  --
   1.737 --- TOC entry 1950 (class 0 OID 0)
   1.738 --- Dependencies: 1608
   1.739 +-- TOC entry 1954 (class 0 OID 0)
   1.740 +-- Dependencies: 1609
   1.741  -- Name: fotka; Type: ACL; Schema: nekurak; Owner: nekurak
   1.742  --
   1.743  
   1.744 @@ -794,8 +809,8 @@
   1.745  
   1.746  
   1.747  --
   1.748 --- TOC entry 1951 (class 0 OID 0)
   1.749 --- Dependencies: 1612
   1.750 +-- TOC entry 1955 (class 0 OID 0)
   1.751 +-- Dependencies: 1613
   1.752  -- Name: hlasovani_seq; Type: ACL; Schema: nekurak; Owner: nekurak
   1.753  --
   1.754  
   1.755 @@ -806,8 +821,8 @@
   1.756  
   1.757  
   1.758  --
   1.759 --- TOC entry 1954 (class 0 OID 0)
   1.760 --- Dependencies: 1613
   1.761 +-- TOC entry 1958 (class 0 OID 0)
   1.762 +-- Dependencies: 1614
   1.763  -- Name: hlasovani; Type: ACL; Schema: nekurak; Owner: nekurak
   1.764  --
   1.765  
   1.766 @@ -818,19 +833,7 @@
   1.767  
   1.768  
   1.769  --
   1.770 --- TOC entry 1955 (class 0 OID 0)
   1.771 --- Dependencies: 1616
   1.772 --- Name: kategorie_seq; Type: ACL; Schema: nekurak; Owner: nekurak
   1.773 ---
   1.774 -
   1.775 -REVOKE ALL ON SEQUENCE kategorie_seq FROM PUBLIC;
   1.776 -REVOKE ALL ON SEQUENCE kategorie_seq FROM nekurak;
   1.777 -GRANT ALL ON SEQUENCE kategorie_seq TO nekurak;
   1.778 -GRANT USAGE ON SEQUENCE kategorie_seq TO nekurak_web;
   1.779 -
   1.780 -
   1.781 ---
   1.782 --- TOC entry 1958 (class 0 OID 0)
   1.783 +-- TOC entry 1961 (class 0 OID 0)
   1.784  -- Dependencies: 1617
   1.785  -- Name: kategorie; Type: ACL; Schema: nekurak; Owner: nekurak
   1.786  --
   1.787 @@ -838,12 +841,12 @@
   1.788  REVOKE ALL ON TABLE kategorie FROM PUBLIC;
   1.789  REVOKE ALL ON TABLE kategorie FROM nekurak;
   1.790  GRANT ALL ON TABLE kategorie TO nekurak;
   1.791 -GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE kategorie TO nekurak_web;
   1.792 +GRANT SELECT ON TABLE kategorie TO nekurak_web;
   1.793  
   1.794  
   1.795  --
   1.796 --- TOC entry 1959 (class 0 OID 0)
   1.797 --- Dependencies: 1614
   1.798 +-- TOC entry 1962 (class 0 OID 0)
   1.799 +-- Dependencies: 1615
   1.800  -- Name: komentar_seq; Type: ACL; Schema: nekurak; Owner: nekurak
   1.801  --
   1.802  
   1.803 @@ -854,8 +857,8 @@
   1.804  
   1.805  
   1.806  --
   1.807 --- TOC entry 1963 (class 0 OID 0)
   1.808 --- Dependencies: 1615
   1.809 +-- TOC entry 1966 (class 0 OID 0)
   1.810 +-- Dependencies: 1616
   1.811  -- Name: komentar; Type: ACL; Schema: nekurak; Owner: nekurak
   1.812  --
   1.813  
   1.814 @@ -866,8 +869,20 @@
   1.815  
   1.816  
   1.817  --
   1.818 --- TOC entry 1964 (class 0 OID 0)
   1.819 --- Dependencies: 1601
   1.820 +-- TOC entry 1968 (class 0 OID 0)
   1.821 +-- Dependencies: 1619
   1.822 +-- Name: kurackost; Type: ACL; Schema: nekurak; Owner: nekurak
   1.823 +--
   1.824 +
   1.825 +REVOKE ALL ON TABLE kurackost FROM PUBLIC;
   1.826 +REVOKE ALL ON TABLE kurackost FROM nekurak;
   1.827 +GRANT ALL ON TABLE kurackost TO nekurak;
   1.828 +GRANT SELECT ON TABLE kurackost TO nekurak_web;
   1.829 +
   1.830 +
   1.831 +--
   1.832 +-- TOC entry 1969 (class 0 OID 0)
   1.833 +-- Dependencies: 1602
   1.834  -- Name: podnik_seq; Type: ACL; Schema: nekurak; Owner: nekurak
   1.835  --
   1.836  
   1.837 @@ -878,8 +893,8 @@
   1.838  
   1.839  
   1.840  --
   1.841 --- TOC entry 1967 (class 0 OID 0)
   1.842 --- Dependencies: 1602
   1.843 +-- TOC entry 1971 (class 0 OID 0)
   1.844 +-- Dependencies: 1603
   1.845  -- Name: podnik; Type: ACL; Schema: nekurak; Owner: nekurak
   1.846  --
   1.847  
   1.848 @@ -890,7 +905,7 @@
   1.849  
   1.850  
   1.851  --
   1.852 --- TOC entry 1968 (class 0 OID 0)
   1.853 +-- TOC entry 1972 (class 0 OID 0)
   1.854  -- Dependencies: 1618
   1.855  -- Name: podnik_kategorie; Type: ACL; Schema: nekurak; Owner: nekurak
   1.856  --
   1.857 @@ -902,8 +917,8 @@
   1.858  
   1.859  
   1.860  --
   1.861 --- TOC entry 1970 (class 0 OID 0)
   1.862 --- Dependencies: 1605
   1.863 +-- TOC entry 1974 (class 0 OID 0)
   1.864 +-- Dependencies: 1606
   1.865  -- Name: role; Type: ACL; Schema: nekurak; Owner: nekurak
   1.866  --
   1.867  
   1.868 @@ -914,8 +929,8 @@
   1.869  
   1.870  
   1.871  --
   1.872 --- TOC entry 1971 (class 0 OID 0)
   1.873 --- Dependencies: 1603
   1.874 +-- TOC entry 1975 (class 0 OID 0)
   1.875 +-- Dependencies: 1604
   1.876  -- Name: uzivatel_seq; Type: ACL; Schema: nekurak; Owner: nekurak
   1.877  --
   1.878  
   1.879 @@ -926,8 +941,8 @@
   1.880  
   1.881  
   1.882  --
   1.883 --- TOC entry 1973 (class 0 OID 0)
   1.884 --- Dependencies: 1604
   1.885 +-- TOC entry 1977 (class 0 OID 0)
   1.886 +-- Dependencies: 1605
   1.887  -- Name: uzivatel; Type: ACL; Schema: nekurak; Owner: nekurak
   1.888  --
   1.889  
   1.890 @@ -938,8 +953,8 @@
   1.891  
   1.892  
   1.893  --
   1.894 --- TOC entry 1975 (class 0 OID 0)
   1.895 --- Dependencies: 1606
   1.896 +-- TOC entry 1979 (class 0 OID 0)
   1.897 +-- Dependencies: 1607
   1.898  -- Name: uzivatel_role; Type: ACL; Schema: nekurak; Owner: nekurak
   1.899  --
   1.900  
   1.901 @@ -949,7 +964,7 @@
   1.902  GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE uzivatel_role TO nekurak_web;
   1.903  
   1.904  
   1.905 --- Completed on 2011-01-11 15:26:23 CET
   1.906 +-- Completed on 2011-01-15 14:24:31 CET
   1.907  
   1.908  --
   1.909  -- PostgreSQL database dump complete