sql/schéma.sql
author František Kučera <franta-hg@frantovo.cz>
Tue Jun 08 07:37:05 2010 +0200 (2010-06-08)
changeset 129 420d7024f6f4
parent 115 b278b6b2d552
child 137 5a7a24ac3a15
permissions -rw-r--r--
komentáře – formulář
     1 --
     2 -- PostgreSQL database dump
     3 --
     4 
     5 -- Started on 2010-04-29 14:41:40 CEST
     6 
     7 SET statement_timeout = 0;
     8 SET client_encoding = 'UTF8';
     9 SET standard_conforming_strings = off;
    10 SET check_function_bodies = false;
    11 SET client_min_messages = warning;
    12 SET escape_string_warning = off;
    13 
    14 --
    15 -- TOC entry 10 (class 2615 OID 35015)
    16 -- Name: nekurak; Type: SCHEMA; Schema: -; Owner: nekurak
    17 --
    18 
    19 CREATE SCHEMA nekurak;
    20 
    21 
    22 ALTER SCHEMA nekurak OWNER TO nekurak;
    23 
    24 SET search_path = nekurak, pg_catalog;
    25 
    26 --
    27 -- TOC entry 366 (class 1247 OID 35086)
    28 -- Dependencies: 367 10
    29 -- Name: email; Type: DOMAIN; Schema: nekurak; Owner: nekurak
    30 --
    31 
    32 CREATE DOMAIN email AS character varying(255)
    33 	CONSTRAINT email_regexp CHECK (((VALUE)::text ~ '^[_a-zA-Z0-9\\.\\-]+@[_a-zA-Z0-9\\.\\-]+\\.[a-zA-Z]{2,4}$'::text));
    34 
    35 
    36 ALTER DOMAIN nekurak.email OWNER TO nekurak;
    37 
    38 --
    39 -- TOC entry 1914 (class 0 OID 0)
    40 -- Dependencies: 366
    41 -- Name: DOMAIN email; Type: COMMENT; Schema: nekurak; Owner: nekurak
    42 --
    43 
    44 COMMENT ON DOMAIN email IS 'e-mailová adresa';
    45 
    46 
    47 --
    48 -- TOC entry 65 (class 1255 OID 35124)
    49 -- Dependencies: 10 402
    50 -- Name: bezny_uzivatel(); Type: FUNCTION; Schema: nekurak; Owner: nekurak
    51 --
    52 
    53 CREATE FUNCTION bezny_uzivatel() RETURNS trigger
    54     LANGUAGE plpgsql
    55     AS $$BEGIN
    56 INSERT INTO uzivatel_role 
    57 (role, prezdivka) 
    58 VALUES
    59 ('bezny', new.prezdivka);
    60 RETURN new;
    61 END;$$;
    62 
    63 
    64 ALTER FUNCTION nekurak.bezny_uzivatel() OWNER TO nekurak;
    65 
    66 --
    67 -- TOC entry 1915 (class 0 OID 0)
    68 -- Dependencies: 65
    69 -- Name: FUNCTION bezny_uzivatel(); Type: COMMENT; Schema: nekurak; Owner: nekurak
    70 --
    71 
    72 COMMENT ON FUNCTION bezny_uzivatel() IS 'Každému novému uživateli dáme automaticky roli „bezny“.';
    73 
    74 
    75 --
    76 -- TOC entry 1601 (class 1259 OID 35223)
    77 -- Dependencies: 10
    78 -- Name: clanek_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
    79 --
    80 
    81 CREATE SEQUENCE clanek_seq
    82     INCREMENT BY 1
    83     NO MAXVALUE
    84     NO MINVALUE
    85     CACHE 1;
    86 
    87 
    88 ALTER TABLE nekurak.clanek_seq OWNER TO nekurak;
    89 
    90 SET default_tablespace = '';
    91 
    92 SET default_with_oids = false;
    93 
    94 --
    95 -- TOC entry 1600 (class 1259 OID 35205)
    96 -- Dependencies: 1882 10
    97 -- Name: clanek; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
    98 --
    99 
   100 CREATE TABLE clanek (
   101     id integer DEFAULT nextval('clanek_seq'::regclass) NOT NULL,
   102     nadpis character varying(255) NOT NULL,
   103     text text
   104 );
   105 
   106 
   107 ALTER TABLE nekurak.clanek OWNER TO nekurak;
   108 
   109 --
   110 -- TOC entry 1917 (class 0 OID 0)
   111 -- Dependencies: 1600
   112 -- Name: TABLE clanek; Type: COMMENT; Schema: nekurak; Owner: nekurak
   113 --
   114 
   115 COMMENT ON TABLE clanek IS 'Článek potažmo stránka – nějaký textový obsah, (XúHTML.';
   116 
   117 
   118 --
   119 -- TOC entry 1598 (class 1259 OID 35183)
   120 -- Dependencies: 10
   121 -- Name: fotka_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
   122 --
   123 
   124 CREATE SEQUENCE fotka_seq
   125     START WITH 1
   126     INCREMENT BY 1
   127     NO MAXVALUE
   128     NO MINVALUE
   129     CACHE 1;
   130 
   131 
   132 ALTER TABLE nekurak.fotka_seq OWNER TO nekurak;
   133 
   134 --
   135 -- TOC entry 1599 (class 1259 OID 35185)
   136 -- Dependencies: 1880 1881 10
   137 -- Name: fotka; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
   138 --
   139 
   140 CREATE TABLE fotka (
   141     id integer DEFAULT nextval('fotka_seq'::regclass) NOT NULL,
   142     podnik integer NOT NULL,
   143     popis character varying(255),
   144     poradi integer DEFAULT 0 NOT NULL
   145 );
   146 
   147 
   148 ALTER TABLE nekurak.fotka OWNER TO nekurak;
   149 
   150 --
   151 -- TOC entry 1920 (class 0 OID 0)
   152 -- Dependencies: 1599
   153 -- Name: TABLE fotka; Type: COMMENT; Schema: nekurak; Owner: nekurak
   154 --
   155 
   156 COMMENT ON TABLE fotka IS 'Fotka podniku.';
   157 
   158 
   159 --
   160 -- TOC entry 1921 (class 0 OID 0)
   161 -- Dependencies: 1599
   162 -- Name: COLUMN fotka.poradi; Type: COMMENT; Schema: nekurak; Owner: nekurak
   163 --
   164 
   165 COMMENT ON COLUMN fotka.poradi IS 'Pořadí fotky v rámci daného podniku.';
   166 
   167 
   168 --
   169 -- TOC entry 1603 (class 1259 OID 35250)
   170 -- Dependencies: 10
   171 -- Name: hlasovani_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
   172 --
   173 
   174 CREATE SEQUENCE hlasovani_seq
   175     INCREMENT BY 1
   176     NO MAXVALUE
   177     NO MINVALUE
   178     CACHE 1;
   179 
   180 
   181 ALTER TABLE nekurak.hlasovani_seq OWNER TO nekurak;
   182 
   183 --
   184 -- TOC entry 1604 (class 1259 OID 35278)
   185 -- Dependencies: 1883 1884 10
   186 -- Name: hlasovani; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
   187 --
   188 
   189 CREATE TABLE hlasovani (
   190     id integer DEFAULT nextval('hlasovani_seq'::regclass) NOT NULL,
   191     podnik integer NOT NULL,
   192     hlas boolean NOT NULL,
   193     datum timestamp without time zone DEFAULT now() NOT NULL,
   194     ip_adresa character varying(255) NOT NULL
   195 );
   196 
   197 
   198 ALTER TABLE nekurak.hlasovani OWNER TO nekurak;
   199 
   200 --
   201 -- TOC entry 1924 (class 0 OID 0)
   202 -- Dependencies: 1604
   203 -- Name: COLUMN hlasovani.id; Type: COMMENT; Schema: nekurak; Owner: nekurak
   204 --
   205 
   206 COMMENT ON COLUMN hlasovani.id IS 'V této tabulce v princupu ID nepotřebujeme,
   207 protože nebudeme adresovat konkrétní záznamy (a i kdyby, můžeme použít OID).
   208 Ale číselné ID se nám bude hodit pro rychlejší nalezení posledního hlasu od dané IP adresy.';
   209 
   210 
   211 --
   212 -- TOC entry 1925 (class 0 OID 0)
   213 -- Dependencies: 1604
   214 -- Name: COLUMN hlasovani.hlas; Type: COMMENT; Schema: nekurak; Owner: nekurak
   215 --
   216 
   217 COMMENT ON COLUMN hlasovani.hlas IS 'Má být tento podnik nekuřácký?
   218 true = nekuřácký
   219 false = kouření povoleno';
   220 
   221 
   222 --
   223 -- TOC entry 1592 (class 1259 OID 35019)
   224 -- Dependencies: 10
   225 -- Name: podnik_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
   226 --
   227 
   228 CREATE SEQUENCE podnik_seq
   229     INCREMENT BY 1
   230     NO MAXVALUE
   231     NO MINVALUE
   232     CACHE 1;
   233 
   234 
   235 ALTER TABLE nekurak.podnik_seq OWNER TO nekurak;
   236 
   237 --
   238 -- TOC entry 1593 (class 1259 OID 35049)
   239 -- Dependencies: 1876 1877 10
   240 -- Name: podnik; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
   241 --
   242 
   243 CREATE TABLE podnik (
   244     id integer DEFAULT nextval('podnik_seq'::regclass) NOT NULL,
   245     nazev character varying(255) NOT NULL,
   246     popis character varying(255),
   247     url character varying(255),
   248     datum timestamp with time zone DEFAULT now(),
   249     ulice character varying(64),
   250     cislo_popisne integer,
   251     mesto character varying(64),
   252     spravce character varying(64),
   253     sirka double precision,
   254     delka double precision
   255 );
   256 
   257 
   258 ALTER TABLE nekurak.podnik OWNER TO nekurak;
   259 
   260 --
   261 -- TOC entry 1928 (class 0 OID 0)
   262 -- Dependencies: 1593
   263 -- Name: COLUMN podnik.spravce; Type: COMMENT; Schema: nekurak; Owner: nekurak
   264 --
   265 
   266 COMMENT ON COLUMN podnik.spravce IS 'Přezdívka uživatele, který je správcem tohoto podniku (zadal ho do systému nebo správcovství později dostal)';
   267 
   268 
   269 --
   270 -- TOC entry 1596 (class 1259 OID 35101)
   271 -- Dependencies: 10
   272 -- Name: role; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
   273 --
   274 
   275 CREATE TABLE role (
   276     kod character varying(16) NOT NULL,
   277     popis character varying(255)
   278 );
   279 
   280 
   281 ALTER TABLE nekurak.role OWNER TO nekurak;
   282 
   283 --
   284 -- TOC entry 1930 (class 0 OID 0)
   285 -- Dependencies: 1596
   286 -- Name: TABLE role; Type: COMMENT; Schema: nekurak; Owner: nekurak
   287 --
   288 
   289 COMMENT ON TABLE role IS 'Role (skupiny) uživatelů ~ oprávnění';
   290 
   291 
   292 --
   293 -- TOC entry 1594 (class 1259 OID 35080)
   294 -- Dependencies: 10
   295 -- Name: uzivatel_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
   296 --
   297 
   298 CREATE SEQUENCE uzivatel_seq
   299     INCREMENT BY 1
   300     NO MAXVALUE
   301     NO MINVALUE
   302     CACHE 1;
   303 
   304 
   305 ALTER TABLE nekurak.uzivatel_seq OWNER TO nekurak;
   306 
   307 --
   308 -- TOC entry 1595 (class 1259 OID 35091)
   309 -- Dependencies: 1878 1879 10
   310 -- Name: uzivatel; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
   311 --
   312 
   313 CREATE TABLE uzivatel (
   314     id integer DEFAULT nextval('uzivatel_seq'::regclass) NOT NULL,
   315     prezdivka character varying(64) NOT NULL,
   316     heslo character varying(512) NOT NULL,
   317     jmeno character varying(64),
   318     prijmeni character varying(64),
   319     email character varying(255),
   320     datum timestamp with time zone DEFAULT now() NOT NULL
   321 );
   322 
   323 
   324 ALTER TABLE nekurak.uzivatel OWNER TO nekurak;
   325 
   326 --
   327 -- TOC entry 1933 (class 0 OID 0)
   328 -- Dependencies: 1595
   329 -- Name: COLUMN uzivatel.prezdivka; Type: COMMENT; Schema: nekurak; Owner: nekurak
   330 --
   331 
   332 COMMENT ON COLUMN uzivatel.prezdivka IS 'Uživatelské jméno';
   333 
   334 
   335 --
   336 -- TOC entry 1597 (class 1259 OID 35106)
   337 -- Dependencies: 10
   338 -- Name: uzivatel_role; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
   339 --
   340 
   341 CREATE TABLE uzivatel_role (
   342     role character varying(16) NOT NULL,
   343     prezdivka character varying(64) NOT NULL
   344 );
   345 
   346 
   347 ALTER TABLE nekurak.uzivatel_role OWNER TO nekurak;
   348 
   349 --
   350 -- TOC entry 1935 (class 0 OID 0)
   351 -- Dependencies: 1597
   352 -- Name: TABLE uzivatel_role; Type: COMMENT; Schema: nekurak; Owner: nekurak
   353 --
   354 
   355 COMMENT ON TABLE uzivatel_role IS 'Přiřazení uživatelských rolí (skupin).';
   356 
   357 
   358 --
   359 -- TOC entry 1900 (class 2606 OID 35227)
   360 -- Dependencies: 1600 1600
   361 -- Name: clanek_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   362 --
   363 
   364 ALTER TABLE ONLY clanek
   365     ADD CONSTRAINT clanek_pk PRIMARY KEY (id);
   366 
   367 
   368 --
   369 -- TOC entry 1896 (class 2606 OID 35190)
   370 -- Dependencies: 1599 1599
   371 -- Name: fotka_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   372 --
   373 
   374 ALTER TABLE ONLY fotka
   375     ADD CONSTRAINT fotka_pk PRIMARY KEY (id);
   376 
   377 
   378 --
   379 -- TOC entry 1898 (class 2606 OID 35204)
   380 -- Dependencies: 1599 1599 1599
   381 -- Name: fotka_poradi_uq; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   382 --
   383 
   384 ALTER TABLE ONLY fotka
   385     ADD CONSTRAINT fotka_poradi_uq UNIQUE (popis, poradi);
   386 
   387 
   388 --
   389 -- TOC entry 1903 (class 2606 OID 35284)
   390 -- Dependencies: 1604 1604
   391 -- Name: hlasovani_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   392 --
   393 
   394 ALTER TABLE ONLY hlasovani
   395     ADD CONSTRAINT hlasovani_pk PRIMARY KEY (id);
   396 
   397 
   398 --
   399 -- TOC entry 1886 (class 2606 OID 35058)
   400 -- Dependencies: 1593 1593
   401 -- Name: podnik_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   402 --
   403 
   404 ALTER TABLE ONLY podnik
   405     ADD CONSTRAINT podnik_pk PRIMARY KEY (id);
   406 
   407 
   408 --
   409 -- TOC entry 1892 (class 2606 OID 35105)
   410 -- Dependencies: 1596 1596
   411 -- Name: skupina_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   412 --
   413 
   414 ALTER TABLE ONLY role
   415     ADD CONSTRAINT skupina_pk PRIMARY KEY (kod);
   416 
   417 
   418 --
   419 -- TOC entry 1888 (class 2606 OID 35098)
   420 -- Dependencies: 1595 1595
   421 -- Name: uzivatel_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   422 --
   423 
   424 ALTER TABLE ONLY uzivatel
   425     ADD CONSTRAINT uzivatel_pk PRIMARY KEY (id);
   426 
   427 
   428 --
   429 -- TOC entry 1890 (class 2606 OID 35100)
   430 -- Dependencies: 1595 1595
   431 -- Name: uzivatel_prezdivka_uq; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   432 --
   433 
   434 ALTER TABLE ONLY uzivatel
   435     ADD CONSTRAINT uzivatel_prezdivka_uq UNIQUE (prezdivka);
   436 
   437 
   438 --
   439 -- TOC entry 1894 (class 2606 OID 35137)
   440 -- Dependencies: 1597 1597 1597
   441 -- Name: uzivatel_role_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
   442 --
   443 
   444 ALTER TABLE ONLY uzivatel_role
   445     ADD CONSTRAINT uzivatel_role_pk PRIMARY KEY (role, prezdivka);
   446 
   447 
   448 --
   449 -- TOC entry 1901 (class 1259 OID 35291)
   450 -- Dependencies: 1604
   451 -- Name: hlasovani_ip_idx; Type: INDEX; Schema: nekurak; Owner: nekurak; Tablespace: 
   452 --
   453 
   454 CREATE INDEX hlasovani_ip_idx ON hlasovani USING btree (ip_adresa);
   455 
   456 
   457 --
   458 -- TOC entry 1904 (class 1259 OID 35309)
   459 -- Dependencies: 1604
   460 -- Name: hlsovani_datum_idx; Type: INDEX; Schema: nekurak; Owner: nekurak; Tablespace: 
   461 --
   462 
   463 CREATE INDEX hlsovani_datum_idx ON hlasovani USING btree (date(datum));
   464 
   465 
   466 --
   467 -- TOC entry 1910 (class 2620 OID 35125)
   468 -- Dependencies: 1595 65
   469 -- Name: uzivatel_insert; Type: TRIGGER; Schema: nekurak; Owner: nekurak
   470 --
   471 
   472 CREATE TRIGGER uzivatel_insert
   473     AFTER INSERT ON uzivatel
   474     FOR EACH ROW
   475     EXECUTE PROCEDURE bezny_uzivatel();
   476 
   477 
   478 --
   479 -- TOC entry 1908 (class 2606 OID 35191)
   480 -- Dependencies: 1599 1885 1593
   481 -- Name: fotka_podnik_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
   482 --
   483 
   484 ALTER TABLE ONLY fotka
   485     ADD CONSTRAINT fotka_podnik_fk FOREIGN KEY (podnik) REFERENCES podnik(id) ON DELETE CASCADE;
   486 
   487 
   488 --
   489 -- TOC entry 1909 (class 2606 OID 35285)
   490 -- Dependencies: 1885 1604 1593
   491 -- Name: hlasovani_podnik_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
   492 --
   493 
   494 ALTER TABLE ONLY hlasovani
   495     ADD CONSTRAINT hlasovani_podnik_fk FOREIGN KEY (podnik) REFERENCES podnik(id) ON DELETE CASCADE;
   496 
   497 
   498 --
   499 -- TOC entry 1905 (class 2606 OID 35178)
   500 -- Dependencies: 1889 1595 1593
   501 -- Name: podnik_uzivatel_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
   502 --
   503 
   504 ALTER TABLE ONLY podnik
   505     ADD CONSTRAINT podnik_uzivatel_fk FOREIGN KEY (spravce) REFERENCES uzivatel(prezdivka) ON DELETE SET NULL;
   506 
   507 
   508 --
   509 -- TOC entry 1906 (class 2606 OID 35138)
   510 -- Dependencies: 1597 1596 1891
   511 -- Name: uzivatel_role_role_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
   512 --
   513 
   514 ALTER TABLE ONLY uzivatel_role
   515     ADD CONSTRAINT uzivatel_role_role_fk FOREIGN KEY (role) REFERENCES role(kod) ON UPDATE CASCADE ON DELETE CASCADE;
   516 
   517 
   518 --
   519 -- TOC entry 1907 (class 2606 OID 35143)
   520 -- Dependencies: 1597 1889 1595
   521 -- Name: uzivatel_role_uzivatel_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
   522 --
   523 
   524 ALTER TABLE ONLY uzivatel_role
   525     ADD CONSTRAINT uzivatel_role_uzivatel_fk FOREIGN KEY (prezdivka) REFERENCES uzivatel(prezdivka) ON UPDATE CASCADE ON DELETE CASCADE;
   526 
   527 
   528 --
   529 -- TOC entry 1913 (class 0 OID 0)
   530 -- Dependencies: 10
   531 -- Name: nekurak; Type: ACL; Schema: -; Owner: nekurak
   532 --
   533 
   534 REVOKE ALL ON SCHEMA nekurak FROM PUBLIC;
   535 REVOKE ALL ON SCHEMA nekurak FROM nekurak;
   536 GRANT ALL ON SCHEMA nekurak TO nekurak;
   537 GRANT USAGE ON SCHEMA nekurak TO nekurak_web;
   538 
   539 
   540 --
   541 -- TOC entry 1916 (class 0 OID 0)
   542 -- Dependencies: 1601
   543 -- Name: clanek_seq; Type: ACL; Schema: nekurak; Owner: nekurak
   544 --
   545 
   546 REVOKE ALL ON SEQUENCE clanek_seq FROM PUBLIC;
   547 REVOKE ALL ON SEQUENCE clanek_seq FROM nekurak;
   548 GRANT ALL ON SEQUENCE clanek_seq TO nekurak;
   549 GRANT USAGE ON SEQUENCE clanek_seq TO nekurak_web;
   550 
   551 
   552 --
   553 -- TOC entry 1918 (class 0 OID 0)
   554 -- Dependencies: 1600
   555 -- Name: clanek; Type: ACL; Schema: nekurak; Owner: nekurak
   556 --
   557 
   558 REVOKE ALL ON TABLE clanek FROM PUBLIC;
   559 REVOKE ALL ON TABLE clanek FROM nekurak;
   560 GRANT ALL ON TABLE clanek TO nekurak;
   561 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE clanek TO nekurak_web;
   562 
   563 
   564 --
   565 -- TOC entry 1919 (class 0 OID 0)
   566 -- Dependencies: 1598
   567 -- Name: fotka_seq; Type: ACL; Schema: nekurak; Owner: nekurak
   568 --
   569 
   570 REVOKE ALL ON SEQUENCE fotka_seq FROM PUBLIC;
   571 REVOKE ALL ON SEQUENCE fotka_seq FROM nekurak;
   572 GRANT ALL ON SEQUENCE fotka_seq TO nekurak;
   573 GRANT USAGE ON SEQUENCE fotka_seq TO nekurak_web;
   574 
   575 
   576 --
   577 -- TOC entry 1922 (class 0 OID 0)
   578 -- Dependencies: 1599
   579 -- Name: fotka; Type: ACL; Schema: nekurak; Owner: nekurak
   580 --
   581 
   582 REVOKE ALL ON TABLE fotka FROM PUBLIC;
   583 REVOKE ALL ON TABLE fotka FROM nekurak;
   584 GRANT ALL ON TABLE fotka TO nekurak;
   585 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE fotka TO nekurak_web;
   586 
   587 
   588 --
   589 -- TOC entry 1923 (class 0 OID 0)
   590 -- Dependencies: 1603
   591 -- Name: hlasovani_seq; Type: ACL; Schema: nekurak; Owner: nekurak
   592 --
   593 
   594 REVOKE ALL ON SEQUENCE hlasovani_seq FROM PUBLIC;
   595 REVOKE ALL ON SEQUENCE hlasovani_seq FROM nekurak;
   596 GRANT ALL ON SEQUENCE hlasovani_seq TO nekurak;
   597 GRANT USAGE ON SEQUENCE hlasovani_seq TO nekurak_web;
   598 
   599 
   600 --
   601 -- TOC entry 1926 (class 0 OID 0)
   602 -- Dependencies: 1604
   603 -- Name: hlasovani; Type: ACL; Schema: nekurak; Owner: nekurak
   604 --
   605 
   606 REVOKE ALL ON TABLE hlasovani FROM PUBLIC;
   607 REVOKE ALL ON TABLE hlasovani FROM nekurak;
   608 GRANT ALL ON TABLE hlasovani TO nekurak;
   609 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE hlasovani TO nekurak_web;
   610 
   611 
   612 --
   613 -- TOC entry 1927 (class 0 OID 0)
   614 -- Dependencies: 1592
   615 -- Name: podnik_seq; Type: ACL; Schema: nekurak; Owner: nekurak
   616 --
   617 
   618 REVOKE ALL ON SEQUENCE podnik_seq FROM PUBLIC;
   619 REVOKE ALL ON SEQUENCE podnik_seq FROM nekurak;
   620 GRANT ALL ON SEQUENCE podnik_seq TO nekurak;
   621 GRANT USAGE ON SEQUENCE podnik_seq TO nekurak_web;
   622 
   623 
   624 --
   625 -- TOC entry 1929 (class 0 OID 0)
   626 -- Dependencies: 1593
   627 -- Name: podnik; Type: ACL; Schema: nekurak; Owner: nekurak
   628 --
   629 
   630 REVOKE ALL ON TABLE podnik FROM PUBLIC;
   631 REVOKE ALL ON TABLE podnik FROM nekurak;
   632 GRANT ALL ON TABLE podnik TO nekurak;
   633 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE podnik TO nekurak_web;
   634 
   635 
   636 --
   637 -- TOC entry 1931 (class 0 OID 0)
   638 -- Dependencies: 1596
   639 -- Name: role; Type: ACL; Schema: nekurak; Owner: nekurak
   640 --
   641 
   642 REVOKE ALL ON TABLE role FROM PUBLIC;
   643 REVOKE ALL ON TABLE role FROM nekurak;
   644 GRANT ALL ON TABLE role TO nekurak;
   645 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE role TO nekurak_web;
   646 
   647 
   648 --
   649 -- TOC entry 1932 (class 0 OID 0)
   650 -- Dependencies: 1594
   651 -- Name: uzivatel_seq; Type: ACL; Schema: nekurak; Owner: nekurak
   652 --
   653 
   654 REVOKE ALL ON SEQUENCE uzivatel_seq FROM PUBLIC;
   655 REVOKE ALL ON SEQUENCE uzivatel_seq FROM nekurak;
   656 GRANT ALL ON SEQUENCE uzivatel_seq TO nekurak;
   657 GRANT USAGE ON SEQUENCE uzivatel_seq TO nekurak_web;
   658 
   659 
   660 --
   661 -- TOC entry 1934 (class 0 OID 0)
   662 -- Dependencies: 1595
   663 -- Name: uzivatel; Type: ACL; Schema: nekurak; Owner: nekurak
   664 --
   665 
   666 REVOKE ALL ON TABLE uzivatel FROM PUBLIC;
   667 REVOKE ALL ON TABLE uzivatel FROM nekurak;
   668 GRANT ALL ON TABLE uzivatel TO nekurak;
   669 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE uzivatel TO nekurak_web;
   670 
   671 
   672 --
   673 -- TOC entry 1936 (class 0 OID 0)
   674 -- Dependencies: 1597
   675 -- Name: uzivatel_role; Type: ACL; Schema: nekurak; Owner: nekurak
   676 --
   677 
   678 REVOKE ALL ON TABLE uzivatel_role FROM PUBLIC;
   679 REVOKE ALL ON TABLE uzivatel_role FROM nekurak;
   680 GRANT ALL ON TABLE uzivatel_role TO nekurak;
   681 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE uzivatel_role TO nekurak_web;
   682 
   683 
   684 -- Completed on 2010-04-29 14:41:42 CEST
   685 
   686 --
   687 -- PostgreSQL database dump complete
   688 --
   689