sql/schéma.sql
author František Kučera <franta-hg@frantovo.cz>
Tue Jan 26 20:27:54 2010 +0100 (2010-01-26)
changeset 20 2b441592f632
parent 18 0deb8f6abcf5
child 62 d9df3f7b67dd
permissions -rw-r--r--
Přidáno SuperDAO.
     1 --
     2 -- PostgreSQL database dump
     3 --
     4 
     5 -- Started on 2010-01-25 17:42:09 CET
     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 1568 (class 1259 OID 35019)
    28 -- Dependencies: 10
    29 -- Name: podnik_seq; Type: SEQUENCE; Schema: nekurak; Owner: nekurak
    30 --
    31 
    32 CREATE SEQUENCE podnik_seq
    33     INCREMENT BY 1
    34     NO MAXVALUE
    35     NO MINVALUE
    36     CACHE 1;
    37 
    38 
    39 ALTER TABLE nekurak.podnik_seq OWNER TO nekurak;
    40 
    41 --
    42 -- TOC entry 1848 (class 0 OID 0)
    43 -- Dependencies: 1568
    44 -- Name: podnik_seq; Type: SEQUENCE SET; Schema: nekurak; Owner: nekurak
    45 --
    46 
    47 SELECT pg_catalog.setval('podnik_seq', 3, true);
    48 
    49 
    50 SET default_tablespace = '';
    51 
    52 SET default_with_oids = false;
    53 
    54 --
    55 -- TOC entry 1569 (class 1259 OID 35021)
    56 -- Dependencies: 1840 1841 10
    57 -- Name: podnik; Type: TABLE; Schema: nekurak; Owner: nekurak; Tablespace: 
    58 --
    59 
    60 CREATE TABLE podnik (
    61     id integer DEFAULT nextval('podnik_seq'::regclass) NOT NULL,
    62     nazev character varying(255) NOT NULL,
    63     datum timestamp with time zone DEFAULT now()
    64 );
    65 
    66 
    67 ALTER TABLE nekurak.podnik OWNER TO nekurak;
    68 
    69 --
    70 -- TOC entry 1844 (class 0 OID 35021)
    71 -- Dependencies: 1569
    72 -- Data for Name: podnik; Type: TABLE DATA; Schema: nekurak; Owner: nekurak
    73 --
    74 
    75 COPY podnik (id, nazev, datum) FROM stdin;
    76 1	Na Kovárně	2010-01-16 02:40:12.271326+01
    77 2	U přátelského potkana	2010-01-16 02:40:43.326281+01
    78 3	Na Růžku	2010-01-16 02:40:48.104577+01
    79 \.
    80 
    81 
    82 --
    83 -- TOC entry 1843 (class 2606 OID 35027)
    84 -- Dependencies: 1569 1569
    85 -- Name: podnik_pk; Type: CONSTRAINT; Schema: nekurak; Owner: nekurak; Tablespace: 
    86 --
    87 
    88 ALTER TABLE ONLY podnik
    89     ADD CONSTRAINT podnik_pk PRIMARY KEY (id);
    90 
    91 
    92 --
    93 -- TOC entry 1847 (class 0 OID 0)
    94 -- Dependencies: 10
    95 -- Name: nekurak; Type: ACL; Schema: -; Owner: nekurak
    96 --
    97 
    98 REVOKE ALL ON SCHEMA nekurak FROM PUBLIC;
    99 REVOKE ALL ON SCHEMA nekurak FROM nekurak;
   100 GRANT ALL ON SCHEMA nekurak TO nekurak;
   101 GRANT USAGE ON SCHEMA nekurak TO nekurak_web;
   102 
   103 
   104 --
   105 -- TOC entry 1849 (class 0 OID 0)
   106 -- Dependencies: 1568
   107 -- Name: podnik_seq; Type: ACL; Schema: nekurak; Owner: nekurak
   108 --
   109 
   110 REVOKE ALL ON SEQUENCE podnik_seq FROM PUBLIC;
   111 REVOKE ALL ON SEQUENCE podnik_seq FROM nekurak;
   112 GRANT ALL ON SEQUENCE podnik_seq TO nekurak;
   113 GRANT USAGE ON SEQUENCE podnik_seq TO nekurak_web;
   114 
   115 
   116 --
   117 -- TOC entry 1850 (class 0 OID 0)
   118 -- Dependencies: 1569
   119 -- Name: podnik; Type: ACL; Schema: nekurak; Owner: nekurak
   120 --
   121 
   122 REVOKE ALL ON TABLE podnik FROM PUBLIC;
   123 REVOKE ALL ON TABLE podnik FROM nekurak;
   124 GRANT ALL ON TABLE podnik TO nekurak;
   125 GRANT SELECT,INSERT,DELETE,UPDATE ON TABLE podnik TO nekurak_web;
   126 
   127 
   128 -- Completed on 2010-01-25 17:42:10 CET
   129 
   130 --
   131 -- PostgreSQL database dump complete
   132 --
   133