
franta-hg@18: --
franta-hg@18: -- PostgreSQL database dump
franta-hg@18: --
franta-hg@18: 
franta-hg@163: -- Started on 2011-01-11 15:26:21 CET
franta-hg@18: 
franta-hg@18: SET statement_timeout = 0;
franta-hg@18: SET client_encoding = 'UTF8';
franta-hg@18: SET standard_conforming_strings = off;
franta-hg@18: SET check_function_bodies = false;
franta-hg@18: SET client_min_messages = warning;
franta-hg@18: SET escape_string_warning = off;
franta-hg@18: 
franta-hg@18: --
franta-hg@18: -- TOC entry 10 (class 2615 OID 35015)
franta-hg@18: -- Name: nekurak; Type: SCHEMA; Schema: -; Owner: nekurak
franta-hg@18: --
franta-hg@18: 
franta-hg@18: CREATE SCHEMA nekurak;
franta-hg@18: 
franta-hg@18: 
franta-hg@18: ALTER SCHEMA nekurak OWNER TO nekurak;
franta-hg@18: 
franta-hg@18: SET search_path = nekurak, pg_catalog;
franta-hg@18: 
franta-hg@18: --
franta-hg@115: -- TOC entry 366 (class 1247 OID 35086)
franta-hg@115: -- Dependencies: 367 10
franta-hg@62: -- Name: email; Type: DOMAIN; Schema: nekurak; Owner: nekurak
franta-hg@62: --
franta-hg@62: 
franta-hg@62: CREATE DOMAIN email AS character varying(255)
franta-hg@62: 	CONSTRAINT email_regexp CHECK (((VALUE)::text ~ '^[_a-zA-Z0-9\\.\\-]+@[_a-zA-Z0-9\\.\\-]+\\.[a-zA-Z]{2,4}$'::text));
franta-hg@62: 
franta-hg@62: 
franta-hg@62: ALTER DOMAIN nekurak.email OWNER TO nekurak;
franta-hg@62: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1942 (class 0 OID 0)
franta-hg@115: -- Dependencies: 366
franta-hg@62: -- Name: DOMAIN email; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@62: --
franta-hg@62: 
franta-hg@62: COMMENT ON DOMAIN email IS 'e-mailová adresa';
franta-hg@62: 
franta-hg@62: 
franta-hg@62: --
franta-hg@62: -- TOC entry 65 (class 1255 OID 35124)
franta-hg@154: -- Dependencies: 411 10
franta-hg@62: -- Name: bezny_uzivatel(); Type: FUNCTION; Schema: nekurak; Owner: nekurak
franta-hg@62: --
franta-hg@62: 
franta-hg@62: CREATE FUNCTION bezny_uzivatel() RETURNS trigger
franta-hg@62:     LANGUAGE plpgsql
franta-hg@62:     AS $$BEGIN
franta-hg@62: INSERT INTO uzivatel_role 
franta-hg@62: (role, prezdivka) 
franta-hg@62: VALUES
franta-hg@62: ('bezny', new.prezdivka);
franta-hg@62: RETURN new;
franta-hg@62: END;$$;
franta-hg@62: 
franta-hg@62: 
franta-hg@62: ALTER FUNCTION nekurak.bezny_uzivatel() OWNER TO nekurak;
franta-hg@62: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1943 (class 0 OID 0)
franta-hg@62: -- Dependencies: 65
franta-hg@62: -- Name: FUNCTION bezny_uzivatel(); Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@62: --
franta-hg@62: 
franta-hg@62: COMMENT ON FUNCTION bezny_uzivatel() IS 'Každému novému uživateli dáme automaticky roli „bezny“.';
franta-hg@62: 
franta-hg@62: 
franta-hg@71: --
franta-hg@154: -- TOC entry 1610 (class 1259 OID 35223)
franta-hg@115: -- Dependencies: 10
franta-hg@115: -- Name: clanek_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
franta-hg@115: --
franta-hg@115: 
franta-hg@115: CREATE SEQUENCE clanek_seq
franta-hg@115:     INCREMENT BY 1
franta-hg@115:     NO MAXVALUE
franta-hg@115:     NO MINVALUE
franta-hg@115:     CACHE 1;
franta-hg@115: 
franta-hg@115: 
franta-hg@115: ALTER TABLE nekurak.clanek_seq OWNER TO nekurak;
franta-hg@115: 
franta-hg@115: SET default_tablespace = '';
franta-hg@115: 
franta-hg@115: SET default_with_oids = false;
franta-hg@115: 
franta-hg@115: --
franta-hg@154: -- TOC entry 1609 (class 1259 OID 35205)
franta-hg@163: -- Dependencies: 1897 10
franta-hg@115: -- Name: clanek; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@115: --
franta-hg@115: 
franta-hg@115: CREATE TABLE clanek (
franta-hg@115:     id integer DEFAULT nextval('clanek_seq'::regclass) NOT NULL,
franta-hg@115:     nadpis character varying(255) NOT NULL,
franta-hg@115:     text text
franta-hg@115: );
franta-hg@115: 
franta-hg@115: 
franta-hg@115: ALTER TABLE nekurak.clanek OWNER TO nekurak;
franta-hg@115: 
franta-hg@115: --
franta-hg@163: -- TOC entry 1945 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1609
franta-hg@115: -- Name: TABLE clanek; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@115: --
franta-hg@115: 
franta-hg@154: COMMENT ON TABLE clanek IS 'Článek potažmo stránka – nějaký textový obsah (XHTML).';
franta-hg@115: 
franta-hg@115: 
franta-hg@115: --
franta-hg@154: -- TOC entry 1607 (class 1259 OID 35183)
franta-hg@71: -- Dependencies: 10
franta-hg@71: -- Name: fotka_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
franta-hg@71: --
franta-hg@71: 
franta-hg@71: CREATE SEQUENCE fotka_seq
franta-hg@71:     START WITH 1
franta-hg@71:     INCREMENT BY 1
franta-hg@71:     NO MAXVALUE
franta-hg@71:     NO MINVALUE
franta-hg@71:     CACHE 1;
franta-hg@71: 
franta-hg@71: 
franta-hg@71: ALTER TABLE nekurak.fotka_seq OWNER TO nekurak;
franta-hg@71: 
franta-hg@71: --
franta-hg@154: -- TOC entry 1608 (class 1259 OID 35185)
franta-hg@163: -- Dependencies: 1895 1896 10
franta-hg@71: -- Name: fotka; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@71: --
franta-hg@71: 
franta-hg@71: CREATE TABLE fotka (
franta-hg@71:     id integer DEFAULT nextval('fotka_seq'::regclass) NOT NULL,
franta-hg@71:     podnik integer NOT NULL,
franta-hg@71:     popis character varying(255),
franta-hg@71:     poradi integer DEFAULT 0 NOT NULL
franta-hg@71: );
franta-hg@71: 
franta-hg@71: 
franta-hg@71: ALTER TABLE nekurak.fotka OWNER TO nekurak;
franta-hg@71: 
franta-hg@71: --
franta-hg@163: -- TOC entry 1948 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1608
franta-hg@71: -- Name: TABLE fotka; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@71: --
franta-hg@71: 
franta-hg@71: COMMENT ON TABLE fotka IS 'Fotka podniku.';
franta-hg@71: 
franta-hg@71: 
franta-hg@71: --
franta-hg@163: -- TOC entry 1949 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1608
franta-hg@71: -- Name: COLUMN fotka.poradi; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@71: --
franta-hg@71: 
franta-hg@71: COMMENT ON COLUMN fotka.poradi IS 'Pořadí fotky v rámci daného podniku.';
franta-hg@71: 
franta-hg@71: 
franta-hg@115: --
franta-hg@154: -- TOC entry 1612 (class 1259 OID 35250)
franta-hg@115: -- Dependencies: 10
franta-hg@115: -- Name: hlasovani_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
franta-hg@115: --
franta-hg@115: 
franta-hg@115: CREATE SEQUENCE hlasovani_seq
franta-hg@115:     INCREMENT BY 1
franta-hg@115:     NO MAXVALUE
franta-hg@115:     NO MINVALUE
franta-hg@115:     CACHE 1;
franta-hg@115: 
franta-hg@115: 
franta-hg@115: ALTER TABLE nekurak.hlasovani_seq OWNER TO nekurak;
franta-hg@62: 
franta-hg@62: --
franta-hg@154: -- TOC entry 1613 (class 1259 OID 35278)
franta-hg@163: -- Dependencies: 1898 1899 10
franta-hg@62: -- Name: hlasovani; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@62: --
franta-hg@62: 
franta-hg@62: CREATE TABLE hlasovani (
franta-hg@115:     id integer DEFAULT nextval('hlasovani_seq'::regclass) NOT NULL,
franta-hg@62:     podnik integer NOT NULL,
franta-hg@62:     hlas boolean NOT NULL,
franta-hg@118:     datum timestamp without time zone DEFAULT now() NOT NULL,
franta-hg@115:     ip_adresa character varying(255) NOT NULL
franta-hg@62: );
franta-hg@62: 
franta-hg@62: 
franta-hg@62: ALTER TABLE nekurak.hlasovani OWNER TO nekurak;
franta-hg@62: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1952 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1613
franta-hg@115: -- Name: COLUMN hlasovani.id; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@115: --
franta-hg@115: 
franta-hg@115: COMMENT ON COLUMN hlasovani.id IS 'V této tabulce v princupu ID nepotřebujeme,
franta-hg@115: protože nebudeme adresovat konkrétní záznamy (a i kdyby, můžeme použít OID).
franta-hg@115: Ale číselné ID se nám bude hodit pro rychlejší nalezení posledního hlasu od dané IP adresy.';
franta-hg@115: 
franta-hg@115: 
franta-hg@115: --
franta-hg@163: -- TOC entry 1953 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1613
franta-hg@62: -- Name: COLUMN hlasovani.hlas; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@62: --
franta-hg@62: 
franta-hg@62: COMMENT ON COLUMN hlasovani.hlas IS 'Má být tento podnik nekuřácký?
franta-hg@62: true = nekuřácký
franta-hg@62: false = kouření povoleno';
franta-hg@62: 
franta-hg@62: 
franta-hg@62: --
franta-hg@154: -- TOC entry 1616 (class 1259 OID 35396)
franta-hg@154: -- Dependencies: 10
franta-hg@154: -- Name: kategorie_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
franta-hg@154: --
franta-hg@154: 
franta-hg@154: CREATE SEQUENCE kategorie_seq
franta-hg@154:     INCREMENT BY 1
franta-hg@154:     NO MAXVALUE
franta-hg@154:     NO MINVALUE
franta-hg@154:     CACHE 1;
franta-hg@154: 
franta-hg@154: 
franta-hg@154: ALTER TABLE nekurak.kategorie_seq OWNER TO nekurak;
franta-hg@154: 
franta-hg@154: --
franta-hg@154: -- TOC entry 1617 (class 1259 OID 35398)
franta-hg@163: -- Dependencies: 1902 10
franta-hg@154: -- Name: kategorie; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@154: --
franta-hg@154: 
franta-hg@154: CREATE TABLE kategorie (
franta-hg@154:     id integer DEFAULT nextval('kategorie_seq'::regclass) NOT NULL,
franta-hg@163:     nazev character varying(32) NOT NULL
franta-hg@154: );
franta-hg@154: 
franta-hg@154: 
franta-hg@154: ALTER TABLE nekurak.kategorie OWNER TO nekurak;
franta-hg@154: 
franta-hg@154: --
franta-hg@163: -- TOC entry 1956 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1617
franta-hg@154: -- Name: TABLE kategorie; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@154: --
franta-hg@154: 
franta-hg@154: COMMENT ON TABLE kategorie IS 'Kategorie podniku';
franta-hg@154: 
franta-hg@154: 
franta-hg@154: --
franta-hg@163: -- TOC entry 1957 (class 0 OID 0)
franta-hg@163: -- Dependencies: 1617
franta-hg@163: -- Name: COLUMN kategorie.nazev; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@163: --
franta-hg@163: 
franta-hg@163: COMMENT ON COLUMN kategorie.nazev IS 'jen pro info při přímé práci s SQL
franta-hg@163: aplikace bere názvy a popisy kategorií z lokalizačního souboru (na základě ID kategorie)';
franta-hg@163: 
franta-hg@163: 
franta-hg@163: --
franta-hg@154: -- TOC entry 1614 (class 1259 OID 35333)
franta-hg@137: -- Dependencies: 10
franta-hg@137: -- Name: komentar_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
franta-hg@137: --
franta-hg@137: 
franta-hg@137: CREATE SEQUENCE komentar_seq
franta-hg@137:     INCREMENT BY 1
franta-hg@137:     NO MAXVALUE
franta-hg@137:     NO MINVALUE
franta-hg@137:     CACHE 1;
franta-hg@137: 
franta-hg@137: 
franta-hg@137: ALTER TABLE nekurak.komentar_seq OWNER TO nekurak;
franta-hg@137: 
franta-hg@137: --
franta-hg@154: -- TOC entry 1615 (class 1259 OID 35376)
franta-hg@163: -- Dependencies: 1900 1901 10
franta-hg@137: -- Name: komentar; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@137: --
franta-hg@137: 
franta-hg@137: CREATE TABLE komentar (
franta-hg@137:     id integer DEFAULT nextval('komentar_seq'::regclass) NOT NULL,
franta-hg@137:     podnik integer NOT NULL,
franta-hg@137:     uzivatel character varying(64) NOT NULL,
franta-hg@137:     datum timestamp with time zone DEFAULT now() NOT NULL,
franta-hg@137:     nadpis character varying(255),
franta-hg@137:     komentar text NOT NULL
franta-hg@137: );
franta-hg@137: 
franta-hg@137: 
franta-hg@137: ALTER TABLE nekurak.komentar OWNER TO nekurak;
franta-hg@137: 
franta-hg@137: --
franta-hg@163: -- TOC entry 1960 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1615
franta-hg@137: -- Name: TABLE komentar; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@137: --
franta-hg@137: 
franta-hg@137: COMMENT ON TABLE komentar IS 'Komentář k podniku';
franta-hg@137: 
franta-hg@137: 
franta-hg@137: --
franta-hg@163: -- TOC entry 1961 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1615
franta-hg@137: -- Name: COLUMN komentar.nadpis; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@137: --
franta-hg@137: 
franta-hg@137: COMMENT ON COLUMN komentar.nadpis IS 'vždy jen prostý text';
franta-hg@137: 
franta-hg@137: 
franta-hg@137: --
franta-hg@163: -- TOC entry 1962 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1615
franta-hg@137: -- Name: COLUMN komentar.komentar; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@137: --
franta-hg@137: 
franta-hg@137: COMMENT ON COLUMN komentar.komentar IS 'Vlastní komentář. Vždy jen XHTML – převádíme na něj jak prostý text, tak Texy nebo cokoli jiného.
franta-hg@137: Jedná se o kus validního XML – má kořenový element <div/>';
franta-hg@137: 
franta-hg@137: 
franta-hg@137: --
franta-hg@154: -- TOC entry 1601 (class 1259 OID 35019)
franta-hg@18: -- Dependencies: 10
franta-hg@18: -- Name: podnik_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
franta-hg@18: --
franta-hg@18: 
franta-hg@18: CREATE SEQUENCE podnik_seq
franta-hg@18:     INCREMENT BY 1
franta-hg@18:     NO MAXVALUE
franta-hg@18:     NO MINVALUE
franta-hg@18:     CACHE 1;
franta-hg@18: 
franta-hg@18: 
franta-hg@18: ALTER TABLE nekurak.podnik_seq OWNER TO nekurak;
franta-hg@18: 
franta-hg@18: --
franta-hg@154: -- TOC entry 1602 (class 1259 OID 35049)
franta-hg@163: -- Dependencies: 1890 1891 1892 10
franta-hg@18: -- Name: podnik; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@18: --
franta-hg@18: 
franta-hg@18: CREATE TABLE podnik (
franta-hg@18:     id integer DEFAULT nextval('podnik_seq'::regclass) NOT NULL,
franta-hg@18:     nazev character varying(255) NOT NULL,
franta-hg@62:     popis character varying(255),
franta-hg@62:     url character varying(255),
franta-hg@62:     datum timestamp with time zone DEFAULT now(),
franta-hg@62:     ulice character varying(64),
franta-hg@62:     cislo_popisne integer,
franta-hg@71:     mesto character varying(64),
franta-hg@115:     spravce character varying(64),
franta-hg@115:     sirka double precision,
franta-hg@163:     delka double precision,
franta-hg@163:     stav character(1),
franta-hg@163:     CONSTRAINT stav_tg CHECK (((stav = ANY (ARRAY['k'::bpchar, 'n'::bpchar, 'o'::bpchar, 'c'::bpchar])) OR (stav IS NULL)))
franta-hg@18: );
franta-hg@18: 
franta-hg@18: 
franta-hg@18: ALTER TABLE nekurak.podnik OWNER TO nekurak;
franta-hg@18: 
franta-hg@18: --
franta-hg@163: -- TOC entry 1965 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1602
franta-hg@71: -- Name: COLUMN podnik.spravce; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@71: --
franta-hg@71: 
franta-hg@71: 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)';
franta-hg@71: 
franta-hg@71: 
franta-hg@71: --
franta-hg@163: -- TOC entry 1966 (class 0 OID 0)
franta-hg@163: -- Dependencies: 1602
franta-hg@163: -- Name: CONSTRAINT stav_tg ON podnik; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@163: --
franta-hg@163: 
franta-hg@163: COMMENT ON CONSTRAINT stav_tg ON podnik IS 'k = kuřácký
franta-hg@163: n = nekuřácký
franta-hg@163: o = oddělené části (důkladně)
franta-hg@163: c = částečně kuřácký (špatně oddělené, považujeme za kuřácký)
franta-hg@163: NULL = neznámý stav';
franta-hg@163: 
franta-hg@163: 
franta-hg@163: --
franta-hg@154: -- TOC entry 1618 (class 1259 OID 35404)
franta-hg@154: -- Dependencies: 10
franta-hg@154: -- Name: podnik_kategorie; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@154: --
franta-hg@154: 
franta-hg@154: CREATE TABLE podnik_kategorie (
franta-hg@154:     podnik integer NOT NULL,
franta-hg@154:     kategorie integer NOT NULL
franta-hg@154: );
franta-hg@154: 
franta-hg@154: 
franta-hg@154: ALTER TABLE nekurak.podnik_kategorie OWNER TO nekurak;
franta-hg@154: 
franta-hg@154: --
franta-hg@154: -- TOC entry 1605 (class 1259 OID 35101)
franta-hg@62: -- Dependencies: 10
franta-hg@62: -- Name: role; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@18: --
franta-hg@18: 
franta-hg@62: CREATE TABLE role (
franta-hg@62:     kod character varying(16) NOT NULL,
franta-hg@62:     popis character varying(255)
franta-hg@62: );
franta-hg@18: 
franta-hg@18: 
franta-hg@62: ALTER TABLE nekurak.role OWNER TO nekurak;
franta-hg@62: 
franta-hg@18: --
franta-hg@163: -- TOC entry 1969 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1605
franta-hg@62: -- Name: TABLE role; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@62: --
franta-hg@62: 
franta-hg@62: COMMENT ON TABLE role IS 'Role (skupiny) uživatelů ~ oprávnění';
franta-hg@62: 
franta-hg@62: 
franta-hg@62: --
franta-hg@154: -- TOC entry 1603 (class 1259 OID 35080)
franta-hg@62: -- Dependencies: 10
franta-hg@62: -- Name: uzivatel_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
franta-hg@62: --
franta-hg@62: 
franta-hg@62: CREATE SEQUENCE uzivatel_seq
franta-hg@62:     INCREMENT BY 1
franta-hg@62:     NO MAXVALUE
franta-hg@62:     NO MINVALUE
franta-hg@62:     CACHE 1;
franta-hg@62: 
franta-hg@62: 
franta-hg@62: ALTER TABLE nekurak.uzivatel_seq OWNER TO nekurak;
franta-hg@62: 
franta-hg@62: --
franta-hg@154: -- TOC entry 1604 (class 1259 OID 35091)
franta-hg@163: -- Dependencies: 1893 1894 10
franta-hg@62: -- Name: uzivatel; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@62: --
franta-hg@62: 
franta-hg@62: CREATE TABLE uzivatel (
franta-hg@62:     id integer DEFAULT nextval('uzivatel_seq'::regclass) NOT NULL,
franta-hg@62:     prezdivka character varying(64) NOT NULL,
franta-hg@62:     heslo character varying(512) NOT NULL,
franta-hg@62:     jmeno character varying(64),
franta-hg@62:     prijmeni character varying(64),
franta-hg@62:     email character varying(255),
franta-hg@62:     datum timestamp with time zone DEFAULT now() NOT NULL
franta-hg@62: );
franta-hg@62: 
franta-hg@62: 
franta-hg@62: ALTER TABLE nekurak.uzivatel OWNER TO nekurak;
franta-hg@62: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1972 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1604
franta-hg@62: -- Name: COLUMN uzivatel.prezdivka; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@62: --
franta-hg@62: 
franta-hg@62: COMMENT ON COLUMN uzivatel.prezdivka IS 'Uživatelské jméno';
franta-hg@62: 
franta-hg@62: 
franta-hg@62: --
franta-hg@154: -- TOC entry 1606 (class 1259 OID 35106)
franta-hg@62: -- Dependencies: 10
franta-hg@62: -- Name: uzivatel_role; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@62: --
franta-hg@62: 
franta-hg@62: CREATE TABLE uzivatel_role (
franta-hg@62:     role character varying(16) NOT NULL,
franta-hg@62:     prezdivka character varying(64) NOT NULL
franta-hg@62: );
franta-hg@62: 
franta-hg@62: 
franta-hg@62: ALTER TABLE nekurak.uzivatel_role OWNER TO nekurak;
franta-hg@62: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1974 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1606
franta-hg@62: -- Name: TABLE uzivatel_role; Type: COMMENT; Schema: nekurak; Owner: nekurak
franta-hg@62: --
franta-hg@62: 
franta-hg@62: COMMENT ON TABLE uzivatel_role IS 'Přiřazení uživatelských rolí (skupin).';
franta-hg@62: 
franta-hg@62: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1918 (class 2606 OID 35227)
franta-hg@154: -- Dependencies: 1609 1609
franta-hg@115: -- Name: clanek_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@115: --
franta-hg@115: 
franta-hg@115: ALTER TABLE ONLY clanek
franta-hg@115:     ADD CONSTRAINT clanek_pk PRIMARY KEY (id);
franta-hg@115: 
franta-hg@115: 
franta-hg@115: --
franta-hg@163: -- TOC entry 1914 (class 2606 OID 35190)
franta-hg@154: -- Dependencies: 1608 1608
franta-hg@71: -- Name: fotka_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@71: --
franta-hg@71: 
franta-hg@71: ALTER TABLE ONLY fotka
franta-hg@71:     ADD CONSTRAINT fotka_pk PRIMARY KEY (id);
franta-hg@71: 
franta-hg@71: 
franta-hg@71: --
franta-hg@163: -- TOC entry 1916 (class 2606 OID 35204)
franta-hg@154: -- Dependencies: 1608 1608 1608
franta-hg@72: -- Name: fotka_poradi_uq; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@72: --
franta-hg@72: 
franta-hg@72: ALTER TABLE ONLY fotka
franta-hg@72:     ADD CONSTRAINT fotka_poradi_uq UNIQUE (popis, poradi);
franta-hg@72: 
franta-hg@72: 
franta-hg@72: --
franta-hg@163: -- TOC entry 1921 (class 2606 OID 35284)
franta-hg@154: -- Dependencies: 1613 1613
franta-hg@115: -- Name: hlasovani_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@115: --
franta-hg@115: 
franta-hg@115: ALTER TABLE ONLY hlasovani
franta-hg@115:     ADD CONSTRAINT hlasovani_pk PRIMARY KEY (id);
franta-hg@115: 
franta-hg@115: 
franta-hg@115: --
franta-hg@163: -- TOC entry 1926 (class 2606 OID 35403)
franta-hg@154: -- Dependencies: 1617 1617
franta-hg@154: -- Name: kategorie_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@154: --
franta-hg@154: 
franta-hg@154: ALTER TABLE ONLY kategorie
franta-hg@154:     ADD CONSTRAINT kategorie_pk PRIMARY KEY (id);
franta-hg@154: 
franta-hg@154: 
franta-hg@154: --
franta-hg@163: -- TOC entry 1924 (class 2606 OID 35385)
franta-hg@154: -- Dependencies: 1615 1615
franta-hg@137: -- Name: komentar_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@137: --
franta-hg@137: 
franta-hg@137: ALTER TABLE ONLY komentar
franta-hg@137:     ADD CONSTRAINT komentar_pk PRIMARY KEY (id);
franta-hg@137: 
franta-hg@137: 
franta-hg@137: --
franta-hg@163: -- TOC entry 1928 (class 2606 OID 35408)
franta-hg@154: -- Dependencies: 1618 1618 1618
franta-hg@154: -- Name: podnik_kategorie_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@154: --
franta-hg@154: 
franta-hg@154: ALTER TABLE ONLY podnik_kategorie
franta-hg@154:     ADD CONSTRAINT podnik_kategorie_pk PRIMARY KEY (podnik, kategorie);
franta-hg@154: 
franta-hg@154: 
franta-hg@154: --
franta-hg@163: -- TOC entry 1904 (class 2606 OID 35058)
franta-hg@154: -- Dependencies: 1602 1602
franta-hg@18: -- Name: podnik_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@18: --
franta-hg@18: 
franta-hg@18: ALTER TABLE ONLY podnik
franta-hg@18:     ADD CONSTRAINT podnik_pk PRIMARY KEY (id);
franta-hg@18: 
franta-hg@18: 
franta-hg@19: --
franta-hg@163: -- TOC entry 1910 (class 2606 OID 35105)
franta-hg@154: -- Dependencies: 1605 1605
franta-hg@62: -- Name: skupina_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@62: --
franta-hg@62: 
franta-hg@62: ALTER TABLE ONLY role
franta-hg@62:     ADD CONSTRAINT skupina_pk PRIMARY KEY (kod);
franta-hg@62: 
franta-hg@62: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1906 (class 2606 OID 35098)
franta-hg@154: -- Dependencies: 1604 1604
franta-hg@62: -- Name: uzivatel_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@62: --
franta-hg@62: 
franta-hg@62: ALTER TABLE ONLY uzivatel
franta-hg@62:     ADD CONSTRAINT uzivatel_pk PRIMARY KEY (id);
franta-hg@62: 
franta-hg@62: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1908 (class 2606 OID 35100)
franta-hg@154: -- Dependencies: 1604 1604
franta-hg@62: -- Name: uzivatel_prezdivka_uq; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@62: --
franta-hg@62: 
franta-hg@62: ALTER TABLE ONLY uzivatel
franta-hg@62:     ADD CONSTRAINT uzivatel_prezdivka_uq UNIQUE (prezdivka);
franta-hg@62: 
franta-hg@62: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1912 (class 2606 OID 35137)
franta-hg@154: -- Dependencies: 1606 1606 1606
franta-hg@62: -- Name: uzivatel_role_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@62: --
franta-hg@62: 
franta-hg@62: ALTER TABLE ONLY uzivatel_role
franta-hg@62:     ADD CONSTRAINT uzivatel_role_pk PRIMARY KEY (role, prezdivka);
franta-hg@62: 
franta-hg@62: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1919 (class 1259 OID 35291)
franta-hg@154: -- Dependencies: 1613
franta-hg@115: -- Name: hlasovani_ip_idx; Type: INDEX; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@115: --
franta-hg@115: 
franta-hg@115: CREATE INDEX hlasovani_ip_idx ON hlasovani USING btree (ip_adresa);
franta-hg@115: 
franta-hg@115: 
franta-hg@115: --
franta-hg@163: -- TOC entry 1922 (class 1259 OID 35309)
franta-hg@154: -- Dependencies: 1613
franta-hg@118: -- Name: hlsovani_datum_idx; Type: INDEX; Schema: nekurak; Owner: nekurak; Tablespace: 
franta-hg@118: --
franta-hg@118: 
franta-hg@118: CREATE INDEX hlsovani_datum_idx ON hlasovani USING btree (date(datum));
franta-hg@118: 
franta-hg@118: 
franta-hg@118: --
franta-hg@163: -- TOC entry 1938 (class 2620 OID 35125)
franta-hg@154: -- Dependencies: 1604 65
franta-hg@62: -- Name: uzivatel_insert; Type: TRIGGER; Schema: nekurak; Owner: nekurak
franta-hg@62: --
franta-hg@62: 
franta-hg@62: CREATE TRIGGER uzivatel_insert
franta-hg@62:     AFTER INSERT ON uzivatel
franta-hg@62:     FOR EACH ROW
franta-hg@62:     EXECUTE PROCEDURE bezny_uzivatel();
franta-hg@62: 
franta-hg@62: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1932 (class 2606 OID 35191)
franta-hg@163: -- Dependencies: 1903 1608 1602
franta-hg@71: -- Name: fotka_podnik_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
franta-hg@71: --
franta-hg@71: 
franta-hg@71: ALTER TABLE ONLY fotka
franta-hg@71:     ADD CONSTRAINT fotka_podnik_fk FOREIGN KEY (podnik) REFERENCES podnik(id) ON DELETE CASCADE;
franta-hg@71: 
franta-hg@71: 
franta-hg@71: --
franta-hg@163: -- TOC entry 1933 (class 2606 OID 35285)
franta-hg@163: -- Dependencies: 1903 1602 1613
franta-hg@62: -- Name: hlasovani_podnik_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
franta-hg@62: --
franta-hg@62: 
franta-hg@62: ALTER TABLE ONLY hlasovani
franta-hg@62:     ADD CONSTRAINT hlasovani_podnik_fk FOREIGN KEY (podnik) REFERENCES podnik(id) ON DELETE CASCADE;
franta-hg@62: 
franta-hg@62: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1934 (class 2606 OID 35386)
franta-hg@163: -- Dependencies: 1615 1602 1903
franta-hg@137: -- Name: komentar_podnik_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
franta-hg@137: --
franta-hg@137: 
franta-hg@137: ALTER TABLE ONLY komentar
franta-hg@137:     ADD CONSTRAINT komentar_podnik_fk FOREIGN KEY (podnik) REFERENCES podnik(id);
franta-hg@137: 
franta-hg@137: 
franta-hg@137: --
franta-hg@163: -- TOC entry 1935 (class 2606 OID 35391)
franta-hg@163: -- Dependencies: 1907 1604 1615
franta-hg@137: -- Name: komentar_uzivatel_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
franta-hg@137: --
franta-hg@137: 
franta-hg@137: ALTER TABLE ONLY komentar
franta-hg@137:     ADD CONSTRAINT komentar_uzivatel_fk FOREIGN KEY (uzivatel) REFERENCES uzivatel(prezdivka);
franta-hg@137: 
franta-hg@137: 
franta-hg@137: --
franta-hg@163: -- TOC entry 1937 (class 2606 OID 35414)
franta-hg@163: -- Dependencies: 1618 1925 1617
franta-hg@154: -- Name: podnik_kategorie_kategorie_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
franta-hg@154: --
franta-hg@154: 
franta-hg@154: ALTER TABLE ONLY podnik_kategorie
franta-hg@154:     ADD CONSTRAINT podnik_kategorie_kategorie_fk FOREIGN KEY (kategorie) REFERENCES kategorie(id) ON DELETE CASCADE;
franta-hg@154: 
franta-hg@154: 
franta-hg@154: --
franta-hg@163: -- TOC entry 1936 (class 2606 OID 35409)
franta-hg@163: -- Dependencies: 1903 1602 1618
franta-hg@154: -- Name: podnik_kategorie_podnik_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
franta-hg@154: --
franta-hg@154: 
franta-hg@154: ALTER TABLE ONLY podnik_kategorie
franta-hg@154:     ADD CONSTRAINT podnik_kategorie_podnik_fk FOREIGN KEY (podnik) REFERENCES podnik(id) ON DELETE CASCADE;
franta-hg@154: 
franta-hg@154: 
franta-hg@154: --
franta-hg@163: -- TOC entry 1929 (class 2606 OID 35178)
franta-hg@163: -- Dependencies: 1602 1604 1907
franta-hg@71: -- Name: podnik_uzivatel_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
franta-hg@71: --
franta-hg@71: 
franta-hg@71: ALTER TABLE ONLY podnik
franta-hg@71:     ADD CONSTRAINT podnik_uzivatel_fk FOREIGN KEY (spravce) REFERENCES uzivatel(prezdivka) ON DELETE SET NULL;
franta-hg@71: 
franta-hg@71: 
franta-hg@71: --
franta-hg@163: -- TOC entry 1930 (class 2606 OID 35138)
franta-hg@163: -- Dependencies: 1909 1606 1605
franta-hg@62: -- Name: uzivatel_role_role_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
franta-hg@62: --
franta-hg@62: 
franta-hg@62: ALTER TABLE ONLY uzivatel_role
franta-hg@62:     ADD CONSTRAINT uzivatel_role_role_fk FOREIGN KEY (role) REFERENCES role(kod) ON UPDATE CASCADE ON DELETE CASCADE;
franta-hg@62: 
franta-hg@62: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1931 (class 2606 OID 35143)
franta-hg@163: -- Dependencies: 1907 1604 1606
franta-hg@62: -- Name: uzivatel_role_uzivatel_fk; Type: FK CONSTRAINT; Schema: nekurak; Owner: nekurak
franta-hg@62: --
franta-hg@62: 
franta-hg@62: ALTER TABLE ONLY uzivatel_role
franta-hg@62:     ADD CONSTRAINT uzivatel_role_uzivatel_fk FOREIGN KEY (prezdivka) REFERENCES uzivatel(prezdivka) ON UPDATE CASCADE ON DELETE CASCADE;
franta-hg@62: 
franta-hg@62: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1941 (class 0 OID 0)
franta-hg@19: -- Dependencies: 10
franta-hg@19: -- Name: nekurak; Type: ACL; Schema: -; Owner: nekurak
franta-hg@19: --
franta-hg@19: 
franta-hg@19: REVOKE ALL ON SCHEMA nekurak FROM PUBLIC;
franta-hg@19: REVOKE ALL ON SCHEMA nekurak FROM nekurak;
franta-hg@19: GRANT ALL ON SCHEMA nekurak TO nekurak;
franta-hg@19: GRANT USAGE ON SCHEMA nekurak TO nekurak_web;
franta-hg@19: 
franta-hg@19: 
franta-hg@19: --
franta-hg@163: -- TOC entry 1944 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1610
franta-hg@115: -- Name: clanek_seq; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@115: --
franta-hg@115: 
franta-hg@115: REVOKE ALL ON SEQUENCE clanek_seq FROM PUBLIC;
franta-hg@115: REVOKE ALL ON SEQUENCE clanek_seq FROM nekurak;
franta-hg@115: GRANT ALL ON SEQUENCE clanek_seq TO nekurak;
franta-hg@115: GRANT USAGE ON SEQUENCE clanek_seq TO nekurak_web;
franta-hg@115: 
franta-hg@115: 
franta-hg@115: --
franta-hg@163: -- TOC entry 1946 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1609
franta-hg@115: -- Name: clanek; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@115: --
franta-hg@115: 
franta-hg@115: REVOKE ALL ON TABLE clanek FROM PUBLIC;
franta-hg@115: REVOKE ALL ON TABLE clanek FROM nekurak;
franta-hg@115: GRANT ALL ON TABLE clanek TO nekurak;
franta-hg@115: GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE clanek TO nekurak_web;
franta-hg@115: 
franta-hg@115: 
franta-hg@115: --
franta-hg@163: -- TOC entry 1947 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1607
franta-hg@71: -- Name: fotka_seq; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@71: --
franta-hg@71: 
franta-hg@71: REVOKE ALL ON SEQUENCE fotka_seq FROM PUBLIC;
franta-hg@71: REVOKE ALL ON SEQUENCE fotka_seq FROM nekurak;
franta-hg@71: GRANT ALL ON SEQUENCE fotka_seq TO nekurak;
franta-hg@71: GRANT USAGE ON SEQUENCE fotka_seq TO nekurak_web;
franta-hg@71: 
franta-hg@71: 
franta-hg@71: --
franta-hg@163: -- TOC entry 1950 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1608
franta-hg@71: -- Name: fotka; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@71: --
franta-hg@71: 
franta-hg@71: REVOKE ALL ON TABLE fotka FROM PUBLIC;
franta-hg@71: REVOKE ALL ON TABLE fotka FROM nekurak;
franta-hg@71: GRANT ALL ON TABLE fotka TO nekurak;
franta-hg@71: GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE fotka TO nekurak_web;
franta-hg@71: 
franta-hg@71: 
franta-hg@71: --
franta-hg@163: -- TOC entry 1951 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1612
franta-hg@115: -- Name: hlasovani_seq; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@115: --
franta-hg@115: 
franta-hg@115: REVOKE ALL ON SEQUENCE hlasovani_seq FROM PUBLIC;
franta-hg@115: REVOKE ALL ON SEQUENCE hlasovani_seq FROM nekurak;
franta-hg@115: GRANT ALL ON SEQUENCE hlasovani_seq TO nekurak;
franta-hg@115: GRANT USAGE ON SEQUENCE hlasovani_seq TO nekurak_web;
franta-hg@115: 
franta-hg@115: 
franta-hg@115: --
franta-hg@163: -- TOC entry 1954 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1613
franta-hg@62: -- Name: hlasovani; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@62: --
franta-hg@62: 
franta-hg@62: REVOKE ALL ON TABLE hlasovani FROM PUBLIC;
franta-hg@62: REVOKE ALL ON TABLE hlasovani FROM nekurak;
franta-hg@62: GRANT ALL ON TABLE hlasovani TO nekurak;
franta-hg@137: GRANT SELECT,INSERT ON TABLE hlasovani TO nekurak_web;
franta-hg@62: 
franta-hg@62: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1955 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1616
franta-hg@154: -- Name: kategorie_seq; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@154: --
franta-hg@154: 
franta-hg@154: REVOKE ALL ON SEQUENCE kategorie_seq FROM PUBLIC;
franta-hg@154: REVOKE ALL ON SEQUENCE kategorie_seq FROM nekurak;
franta-hg@154: GRANT ALL ON SEQUENCE kategorie_seq TO nekurak;
franta-hg@154: GRANT USAGE ON SEQUENCE kategorie_seq TO nekurak_web;
franta-hg@154: 
franta-hg@154: 
franta-hg@154: --
franta-hg@163: -- TOC entry 1958 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1617
franta-hg@154: -- Name: kategorie; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@154: --
franta-hg@154: 
franta-hg@154: REVOKE ALL ON TABLE kategorie FROM PUBLIC;
franta-hg@154: REVOKE ALL ON TABLE kategorie FROM nekurak;
franta-hg@154: GRANT ALL ON TABLE kategorie TO nekurak;
franta-hg@154: GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE kategorie TO nekurak_web;
franta-hg@154: 
franta-hg@154: 
franta-hg@154: --
franta-hg@163: -- TOC entry 1959 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1614
franta-hg@137: -- Name: komentar_seq; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@137: --
franta-hg@137: 
franta-hg@137: REVOKE ALL ON SEQUENCE komentar_seq FROM PUBLIC;
franta-hg@137: REVOKE ALL ON SEQUENCE komentar_seq FROM nekurak;
franta-hg@137: GRANT ALL ON SEQUENCE komentar_seq TO nekurak;
franta-hg@137: GRANT USAGE ON SEQUENCE komentar_seq TO nekurak_web;
franta-hg@137: 
franta-hg@137: 
franta-hg@137: --
franta-hg@163: -- TOC entry 1963 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1615
franta-hg@137: -- Name: komentar; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@137: --
franta-hg@137: 
franta-hg@137: REVOKE ALL ON TABLE komentar FROM PUBLIC;
franta-hg@137: REVOKE ALL ON TABLE komentar FROM nekurak;
franta-hg@137: GRANT ALL ON TABLE komentar TO nekurak;
franta-hg@137: GRANT SELECT,INSERT ON TABLE komentar TO nekurak_web;
franta-hg@137: 
franta-hg@137: 
franta-hg@137: --
franta-hg@163: -- TOC entry 1964 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1601
franta-hg@19: -- Name: podnik_seq; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@19: --
franta-hg@19: 
franta-hg@19: REVOKE ALL ON SEQUENCE podnik_seq FROM PUBLIC;
franta-hg@19: REVOKE ALL ON SEQUENCE podnik_seq FROM nekurak;
franta-hg@19: GRANT ALL ON SEQUENCE podnik_seq TO nekurak;
franta-hg@19: GRANT USAGE ON SEQUENCE podnik_seq TO nekurak_web;
franta-hg@19: 
franta-hg@19: 
franta-hg@19: --
franta-hg@163: -- TOC entry 1967 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1602
franta-hg@19: -- Name: podnik; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@19: --
franta-hg@19: 
franta-hg@19: REVOKE ALL ON TABLE podnik FROM PUBLIC;
franta-hg@19: REVOKE ALL ON TABLE podnik FROM nekurak;
franta-hg@19: GRANT ALL ON TABLE podnik TO nekurak;
franta-hg@19: GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE podnik TO nekurak_web;
franta-hg@19: 
franta-hg@19: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1968 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1618
franta-hg@154: -- Name: podnik_kategorie; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@154: --
franta-hg@154: 
franta-hg@154: REVOKE ALL ON TABLE podnik_kategorie FROM PUBLIC;
franta-hg@154: REVOKE ALL ON TABLE podnik_kategorie FROM nekurak;
franta-hg@154: GRANT ALL ON TABLE podnik_kategorie TO nekurak;
franta-hg@154: GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE podnik_kategorie TO nekurak_web;
franta-hg@154: 
franta-hg@154: 
franta-hg@154: --
franta-hg@163: -- TOC entry 1970 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1605
franta-hg@62: -- Name: role; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@62: --
franta-hg@62: 
franta-hg@62: REVOKE ALL ON TABLE role FROM PUBLIC;
franta-hg@62: REVOKE ALL ON TABLE role FROM nekurak;
franta-hg@62: GRANT ALL ON TABLE role TO nekurak;
franta-hg@62: GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE role TO nekurak_web;
franta-hg@62: 
franta-hg@62: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1971 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1603
franta-hg@62: -- Name: uzivatel_seq; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@62: --
franta-hg@62: 
franta-hg@62: REVOKE ALL ON SEQUENCE uzivatel_seq FROM PUBLIC;
franta-hg@62: REVOKE ALL ON SEQUENCE uzivatel_seq FROM nekurak;
franta-hg@62: GRANT ALL ON SEQUENCE uzivatel_seq TO nekurak;
franta-hg@62: GRANT USAGE ON SEQUENCE uzivatel_seq TO nekurak_web;
franta-hg@62: 
franta-hg@62: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1973 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1604
franta-hg@62: -- Name: uzivatel; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@62: --
franta-hg@62: 
franta-hg@62: REVOKE ALL ON TABLE uzivatel FROM PUBLIC;
franta-hg@62: REVOKE ALL ON TABLE uzivatel FROM nekurak;
franta-hg@62: GRANT ALL ON TABLE uzivatel TO nekurak;
franta-hg@62: GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE uzivatel TO nekurak_web;
franta-hg@62: 
franta-hg@62: 
franta-hg@62: --
franta-hg@163: -- TOC entry 1975 (class 0 OID 0)
franta-hg@154: -- Dependencies: 1606
franta-hg@62: -- Name: uzivatel_role; Type: ACL; Schema: nekurak; Owner: nekurak
franta-hg@62: --
franta-hg@62: 
franta-hg@62: REVOKE ALL ON TABLE uzivatel_role FROM PUBLIC;
franta-hg@62: REVOKE ALL ON TABLE uzivatel_role FROM nekurak;
franta-hg@62: GRANT ALL ON TABLE uzivatel_role TO nekurak;
franta-hg@62: GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE uzivatel_role TO nekurak_web;
franta-hg@62: 
franta-hg@62: 
franta-hg@163: -- Completed on 2011-01-11 15:26:23 CET
franta-hg@18: 
franta-hg@18: --
franta-hg@18: -- PostgreSQL database dump complete
franta-hg@18: --
franta-hg@18: 




