franta-hg@29
|
1 |
--
|
franta-hg@29
|
2 |
-- PostgreSQL database dump
|
franta-hg@29
|
3 |
--
|
franta-hg@29
|
4 |
|
franta-hg@43
|
5 |
-- Started on 2009-06-06 23:39:14 CEST
|
franta-hg@29
|
6 |
|
franta-hg@29
|
7 |
SET client_encoding = 'UTF8';
|
franta-hg@29
|
8 |
SET standard_conforming_strings = off;
|
franta-hg@29
|
9 |
SET check_function_bodies = false;
|
franta-hg@29
|
10 |
SET client_min_messages = warning;
|
franta-hg@29
|
11 |
SET escape_string_warning = off;
|
franta-hg@29
|
12 |
|
franta-hg@29
|
13 |
--
|
franta-hg@29
|
14 |
-- TOC entry 10 (class 2615 OID 16788)
|
franta-hg@29
|
15 |
-- Name: sqlvyukaaplikace; Type: SCHEMA; Schema: -; Owner: -
|
franta-hg@29
|
16 |
--
|
franta-hg@29
|
17 |
|
franta-hg@29
|
18 |
CREATE SCHEMA sqlvyukaaplikace;
|
franta-hg@29
|
19 |
|
franta-hg@29
|
20 |
|
franta-hg@29
|
21 |
SET search_path = sqlvyukaaplikace, pg_catalog;
|
franta-hg@29
|
22 |
|
franta-hg@29
|
23 |
--
|
franta-hg@43
|
24 |
-- TOC entry 1583 (class 1259 OID 16797)
|
franta-hg@29
|
25 |
-- Dependencies: 10
|
franta-hg@29
|
26 |
-- Name: historie_seq; Type: SEQUENCE; Schema: sqlvyukaaplikace; Owner: -
|
franta-hg@29
|
27 |
--
|
franta-hg@29
|
28 |
|
franta-hg@29
|
29 |
CREATE SEQUENCE historie_seq
|
franta-hg@29
|
30 |
INCREMENT BY 1
|
franta-hg@29
|
31 |
NO MAXVALUE
|
franta-hg@29
|
32 |
NO MINVALUE
|
franta-hg@29
|
33 |
CACHE 1;
|
franta-hg@29
|
34 |
|
franta-hg@29
|
35 |
|
franta-hg@29
|
36 |
SET default_tablespace = '';
|
franta-hg@29
|
37 |
|
franta-hg@29
|
38 |
SET default_with_oids = false;
|
franta-hg@29
|
39 |
|
franta-hg@29
|
40 |
--
|
franta-hg@43
|
41 |
-- TOC entry 1582 (class 1259 OID 16789)
|
franta-hg@43
|
42 |
-- Dependencies: 1854 1855 10
|
franta-hg@29
|
43 |
-- Name: historie; Type: TABLE; Schema: sqlvyukaaplikace; Owner: -; Tablespace:
|
franta-hg@29
|
44 |
--
|
franta-hg@29
|
45 |
|
franta-hg@29
|
46 |
CREATE TABLE historie (
|
franta-hg@29
|
47 |
id numeric DEFAULT nextval('historie_seq'::regclass) NOT NULL,
|
franta-hg@29
|
48 |
datum timestamp with time zone DEFAULT now(),
|
franta-hg@29
|
49 |
sql text,
|
franta-hg@29
|
50 |
id_sezeni character varying(255),
|
franta-hg@29
|
51 |
ip_adresa character varying(255)
|
franta-hg@29
|
52 |
);
|
franta-hg@29
|
53 |
|
franta-hg@29
|
54 |
|
franta-hg@29
|
55 |
--
|
franta-hg@43
|
56 |
-- TOC entry 1586 (class 1259 OID 16826)
|
franta-hg@43
|
57 |
-- Dependencies: 10
|
franta-hg@43
|
58 |
-- Name: pruvodce_seq; Type: SEQUENCE; Schema: sqlvyukaaplikace; Owner: -
|
franta-hg@43
|
59 |
--
|
franta-hg@43
|
60 |
|
franta-hg@43
|
61 |
CREATE SEQUENCE pruvodce_seq
|
franta-hg@43
|
62 |
INCREMENT BY 10
|
franta-hg@43
|
63 |
NO MAXVALUE
|
franta-hg@43
|
64 |
NO MINVALUE
|
franta-hg@43
|
65 |
CACHE 1;
|
franta-hg@43
|
66 |
|
franta-hg@43
|
67 |
|
franta-hg@43
|
68 |
--
|
franta-hg@43
|
69 |
-- TOC entry 1587 (class 1259 OID 16828)
|
franta-hg@43
|
70 |
-- Dependencies: 1857 10
|
franta-hg@43
|
71 |
-- Name: pruvodce; Type: TABLE; Schema: sqlvyukaaplikace; Owner: -; Tablespace:
|
franta-hg@43
|
72 |
--
|
franta-hg@43
|
73 |
|
franta-hg@43
|
74 |
CREATE TABLE pruvodce (
|
franta-hg@43
|
75 |
id numeric DEFAULT nextval('pruvodce_seq'::regclass) NOT NULL,
|
franta-hg@43
|
76 |
kod character varying(32),
|
franta-hg@43
|
77 |
nadpis character varying(255) NOT NULL,
|
franta-hg@43
|
78 |
obsah text NOT NULL
|
franta-hg@43
|
79 |
);
|
franta-hg@43
|
80 |
|
franta-hg@43
|
81 |
|
franta-hg@43
|
82 |
--
|
franta-hg@43
|
83 |
-- TOC entry 1870 (class 0 OID 0)
|
franta-hg@43
|
84 |
-- Dependencies: 1587
|
franta-hg@43
|
85 |
-- Name: TABLE pruvodce; Type: COMMENT; Schema: sqlvyukaaplikace; Owner: -
|
franta-hg@43
|
86 |
--
|
franta-hg@43
|
87 |
|
franta-hg@43
|
88 |
COMMENT ON TABLE pruvodce IS 'Nápověda, průvodce';
|
franta-hg@43
|
89 |
|
franta-hg@43
|
90 |
|
franta-hg@43
|
91 |
--
|
franta-hg@43
|
92 |
-- TOC entry 1871 (class 0 OID 0)
|
franta-hg@43
|
93 |
-- Dependencies: 1587
|
franta-hg@43
|
94 |
-- Name: COLUMN pruvodce.id; Type: COMMENT; Schema: sqlvyukaaplikace; Owner: -
|
franta-hg@43
|
95 |
--
|
franta-hg@43
|
96 |
|
franta-hg@43
|
97 |
COMMENT ON COLUMN pruvodce.id IS 'Pořadí kapitoly/lekce';
|
franta-hg@43
|
98 |
|
franta-hg@43
|
99 |
|
franta-hg@43
|
100 |
--
|
franta-hg@43
|
101 |
-- TOC entry 1872 (class 0 OID 0)
|
franta-hg@43
|
102 |
-- Dependencies: 1587
|
franta-hg@43
|
103 |
-- Name: COLUMN pruvodce.kod; Type: COMMENT; Schema: sqlvyukaaplikace; Owner: -
|
franta-hg@43
|
104 |
--
|
franta-hg@43
|
105 |
|
franta-hg@43
|
106 |
COMMENT ON COLUMN pruvodce.kod IS 'kód, na který se můžeme odkazovat';
|
franta-hg@43
|
107 |
|
franta-hg@43
|
108 |
|
franta-hg@43
|
109 |
--
|
franta-hg@43
|
110 |
-- TOC entry 1873 (class 0 OID 0)
|
franta-hg@43
|
111 |
-- Dependencies: 1587
|
franta-hg@43
|
112 |
-- Name: COLUMN pruvodce.nadpis; Type: COMMENT; Schema: sqlvyukaaplikace; Owner: -
|
franta-hg@43
|
113 |
--
|
franta-hg@43
|
114 |
|
franta-hg@43
|
115 |
COMMENT ON COLUMN pruvodce.nadpis IS 'Název kapitoly';
|
franta-hg@43
|
116 |
|
franta-hg@43
|
117 |
|
franta-hg@43
|
118 |
--
|
franta-hg@43
|
119 |
-- TOC entry 1874 (class 0 OID 0)
|
franta-hg@43
|
120 |
-- Dependencies: 1587
|
franta-hg@43
|
121 |
-- Name: COLUMN pruvodce.obsah; Type: COMMENT; Schema: sqlvyukaaplikace; Owner: -
|
franta-hg@43
|
122 |
--
|
franta-hg@43
|
123 |
|
franta-hg@43
|
124 |
COMMENT ON COLUMN pruvodce.obsah IS 'Vlastní text kapitoly';
|
franta-hg@43
|
125 |
|
franta-hg@43
|
126 |
|
franta-hg@43
|
127 |
--
|
franta-hg@43
|
128 |
-- TOC entry 1584 (class 1259 OID 16813)
|
franta-hg@29
|
129 |
-- Dependencies: 10
|
franta-hg@29
|
130 |
-- Name: tip_seq; Type: SEQUENCE; Schema: sqlvyukaaplikace; Owner: -
|
franta-hg@29
|
131 |
--
|
franta-hg@29
|
132 |
|
franta-hg@29
|
133 |
CREATE SEQUENCE tip_seq
|
franta-hg@29
|
134 |
INCREMENT BY 1
|
franta-hg@29
|
135 |
NO MAXVALUE
|
franta-hg@29
|
136 |
NO MINVALUE
|
franta-hg@29
|
137 |
CACHE 1;
|
franta-hg@29
|
138 |
|
franta-hg@29
|
139 |
|
franta-hg@29
|
140 |
--
|
franta-hg@43
|
141 |
-- TOC entry 1585 (class 1259 OID 16815)
|
franta-hg@43
|
142 |
-- Dependencies: 1856 10
|
franta-hg@29
|
143 |
-- Name: tip; Type: TABLE; Schema: sqlvyukaaplikace; Owner: -; Tablespace:
|
franta-hg@29
|
144 |
--
|
franta-hg@29
|
145 |
|
franta-hg@29
|
146 |
CREATE TABLE tip (
|
franta-hg@29
|
147 |
id numeric DEFAULT nextval('tip_seq'::regclass) NOT NULL,
|
franta-hg@29
|
148 |
text character varying(512) NOT NULL
|
franta-hg@29
|
149 |
);
|
franta-hg@29
|
150 |
|
franta-hg@29
|
151 |
|
franta-hg@29
|
152 |
--
|
franta-hg@43
|
153 |
-- TOC entry 1875 (class 0 OID 0)
|
franta-hg@43
|
154 |
-- Dependencies: 1585
|
franta-hg@29
|
155 |
-- Name: TABLE tip; Type: COMMENT; Schema: sqlvyukaaplikace; Owner: -
|
franta-hg@29
|
156 |
--
|
franta-hg@29
|
157 |
|
franta-hg@29
|
158 |
COMMENT ON TABLE tip IS 'Rady, tipy, odkazy a citáty… které budeme zobrazovat uživateli v náhodném pořadí.';
|
franta-hg@29
|
159 |
|
franta-hg@29
|
160 |
|
franta-hg@29
|
161 |
--
|
franta-hg@43
|
162 |
-- TOC entry 1876 (class 0 OID 0)
|
franta-hg@43
|
163 |
-- Dependencies: 1585
|
franta-hg@29
|
164 |
-- Name: COLUMN tip.text; Type: COMMENT; Schema: sqlvyukaaplikace; Owner: -
|
franta-hg@29
|
165 |
--
|
franta-hg@29
|
166 |
|
franta-hg@29
|
167 |
COMMENT ON COLUMN tip.text IS 'HTML text. Bude vložen do <p>odstavce</p>. → Pozor na validitu.';
|
franta-hg@29
|
168 |
|
franta-hg@29
|
169 |
|
franta-hg@29
|
170 |
--
|
franta-hg@43
|
171 |
-- TOC entry 1859 (class 2606 OID 16796)
|
franta-hg@43
|
172 |
-- Dependencies: 1582 1582
|
franta-hg@29
|
173 |
-- Name: historie_pk; Type: CONSTRAINT; Schema: sqlvyukaaplikace; Owner: -; Tablespace:
|
franta-hg@29
|
174 |
--
|
franta-hg@29
|
175 |
|
franta-hg@29
|
176 |
ALTER TABLE ONLY historie
|
franta-hg@29
|
177 |
ADD CONSTRAINT historie_pk PRIMARY KEY (id);
|
franta-hg@29
|
178 |
|
franta-hg@29
|
179 |
|
franta-hg@29
|
180 |
--
|
franta-hg@43
|
181 |
-- TOC entry 1865 (class 2606 OID 16838)
|
franta-hg@43
|
182 |
-- Dependencies: 1587 1587
|
franta-hg@43
|
183 |
-- Name: pruvodce_kod_uq; Type: CONSTRAINT; Schema: sqlvyukaaplikace; Owner: -; Tablespace:
|
franta-hg@43
|
184 |
--
|
franta-hg@43
|
185 |
|
franta-hg@43
|
186 |
ALTER TABLE ONLY pruvodce
|
franta-hg@43
|
187 |
ADD CONSTRAINT pruvodce_kod_uq UNIQUE (kod);
|
franta-hg@43
|
188 |
|
franta-hg@43
|
189 |
|
franta-hg@43
|
190 |
--
|
franta-hg@43
|
191 |
-- TOC entry 1867 (class 2606 OID 16836)
|
franta-hg@43
|
192 |
-- Dependencies: 1587 1587
|
franta-hg@43
|
193 |
-- Name: pruvodce_pk; Type: CONSTRAINT; Schema: sqlvyukaaplikace; Owner: -; Tablespace:
|
franta-hg@43
|
194 |
--
|
franta-hg@43
|
195 |
|
franta-hg@43
|
196 |
ALTER TABLE ONLY pruvodce
|
franta-hg@43
|
197 |
ADD CONSTRAINT pruvodce_pk PRIMARY KEY (id);
|
franta-hg@43
|
198 |
|
franta-hg@43
|
199 |
|
franta-hg@43
|
200 |
--
|
franta-hg@43
|
201 |
-- TOC entry 1861 (class 2606 OID 16823)
|
franta-hg@43
|
202 |
-- Dependencies: 1585 1585
|
franta-hg@29
|
203 |
-- Name: tip_pk; Type: CONSTRAINT; Schema: sqlvyukaaplikace; Owner: -; Tablespace:
|
franta-hg@29
|
204 |
--
|
franta-hg@29
|
205 |
|
franta-hg@29
|
206 |
ALTER TABLE ONLY tip
|
franta-hg@29
|
207 |
ADD CONSTRAINT tip_pk PRIMARY KEY (id);
|
franta-hg@29
|
208 |
|
franta-hg@29
|
209 |
|
franta-hg@29
|
210 |
--
|
franta-hg@43
|
211 |
-- TOC entry 1863 (class 2606 OID 16825)
|
franta-hg@43
|
212 |
-- Dependencies: 1585 1585
|
franta-hg@29
|
213 |
-- Name: tip_uq; Type: CONSTRAINT; Schema: sqlvyukaaplikace; Owner: -; Tablespace:
|
franta-hg@29
|
214 |
--
|
franta-hg@29
|
215 |
|
franta-hg@29
|
216 |
ALTER TABLE ONLY tip
|
franta-hg@29
|
217 |
ADD CONSTRAINT tip_uq UNIQUE (text);
|
franta-hg@29
|
218 |
|
franta-hg@29
|
219 |
|
franta-hg@43
|
220 |
-- Completed on 2009-06-06 23:39:14 CEST
|
franta-hg@29
|
221 |
|
franta-hg@29
|
222 |
--
|
franta-hg@29
|
223 |
-- PostgreSQL database dump complete
|
franta-hg@29
|
224 |
--
|
franta-hg@29
|
225 |
|