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