1.1 --- a/sql/schéma.sql Wed Jun 03 22:32:35 2009 +0200
1.2 +++ b/sql/schéma.sql Sat Jun 06 23:40:52 2009 +0200
1.3 @@ -2,7 +2,7 @@
1.4 -- PostgreSQL database dump
1.5 --
1.6
1.7 --- Started on 2009-05-31 22:35:00 CEST
1.8 +-- Started on 2009-06-06 23:39:14 CEST
1.9
1.10 SET client_encoding = 'UTF8';
1.11 SET standard_conforming_strings = off;
1.12 @@ -21,7 +21,7 @@
1.13 SET search_path = sqlvyukaaplikace, pg_catalog;
1.14
1.15 --
1.16 --- TOC entry 1579 (class 1259 OID 16797)
1.17 +-- TOC entry 1583 (class 1259 OID 16797)
1.18 -- Dependencies: 10
1.19 -- Name: historie_seq; Type: SEQUENCE; Schema: sqlvyukaaplikace; Owner: -
1.20 --
1.21 @@ -38,8 +38,8 @@
1.22 SET default_with_oids = false;
1.23
1.24 --
1.25 --- TOC entry 1578 (class 1259 OID 16789)
1.26 --- Dependencies: 1848 1849 10
1.27 +-- TOC entry 1582 (class 1259 OID 16789)
1.28 +-- Dependencies: 1854 1855 10
1.29 -- Name: historie; Type: TABLE; Schema: sqlvyukaaplikace; Owner: -; Tablespace:
1.30 --
1.31
1.32 @@ -53,7 +53,79 @@
1.33
1.34
1.35 --
1.36 --- TOC entry 1580 (class 1259 OID 16813)
1.37 +-- TOC entry 1586 (class 1259 OID 16826)
1.38 +-- Dependencies: 10
1.39 +-- Name: pruvodce_seq; Type: SEQUENCE; Schema: sqlvyukaaplikace; Owner: -
1.40 +--
1.41 +
1.42 +CREATE SEQUENCE pruvodce_seq
1.43 + INCREMENT BY 10
1.44 + NO MAXVALUE
1.45 + NO MINVALUE
1.46 + CACHE 1;
1.47 +
1.48 +
1.49 +--
1.50 +-- TOC entry 1587 (class 1259 OID 16828)
1.51 +-- Dependencies: 1857 10
1.52 +-- Name: pruvodce; Type: TABLE; Schema: sqlvyukaaplikace; Owner: -; Tablespace:
1.53 +--
1.54 +
1.55 +CREATE TABLE pruvodce (
1.56 + id numeric DEFAULT nextval('pruvodce_seq'::regclass) NOT NULL,
1.57 + kod character varying(32),
1.58 + nadpis character varying(255) NOT NULL,
1.59 + obsah text NOT NULL
1.60 +);
1.61 +
1.62 +
1.63 +--
1.64 +-- TOC entry 1870 (class 0 OID 0)
1.65 +-- Dependencies: 1587
1.66 +-- Name: TABLE pruvodce; Type: COMMENT; Schema: sqlvyukaaplikace; Owner: -
1.67 +--
1.68 +
1.69 +COMMENT ON TABLE pruvodce IS 'Nápověda, průvodce';
1.70 +
1.71 +
1.72 +--
1.73 +-- TOC entry 1871 (class 0 OID 0)
1.74 +-- Dependencies: 1587
1.75 +-- Name: COLUMN pruvodce.id; Type: COMMENT; Schema: sqlvyukaaplikace; Owner: -
1.76 +--
1.77 +
1.78 +COMMENT ON COLUMN pruvodce.id IS 'Pořadí kapitoly/lekce';
1.79 +
1.80 +
1.81 +--
1.82 +-- TOC entry 1872 (class 0 OID 0)
1.83 +-- Dependencies: 1587
1.84 +-- Name: COLUMN pruvodce.kod; Type: COMMENT; Schema: sqlvyukaaplikace; Owner: -
1.85 +--
1.86 +
1.87 +COMMENT ON COLUMN pruvodce.kod IS 'kód, na který se můžeme odkazovat';
1.88 +
1.89 +
1.90 +--
1.91 +-- TOC entry 1873 (class 0 OID 0)
1.92 +-- Dependencies: 1587
1.93 +-- Name: COLUMN pruvodce.nadpis; Type: COMMENT; Schema: sqlvyukaaplikace; Owner: -
1.94 +--
1.95 +
1.96 +COMMENT ON COLUMN pruvodce.nadpis IS 'Název kapitoly';
1.97 +
1.98 +
1.99 +--
1.100 +-- TOC entry 1874 (class 0 OID 0)
1.101 +-- Dependencies: 1587
1.102 +-- Name: COLUMN pruvodce.obsah; Type: COMMENT; Schema: sqlvyukaaplikace; Owner: -
1.103 +--
1.104 +
1.105 +COMMENT ON COLUMN pruvodce.obsah IS 'Vlastní text kapitoly';
1.106 +
1.107 +
1.108 +--
1.109 +-- TOC entry 1584 (class 1259 OID 16813)
1.110 -- Dependencies: 10
1.111 -- Name: tip_seq; Type: SEQUENCE; Schema: sqlvyukaaplikace; Owner: -
1.112 --
1.113 @@ -66,8 +138,8 @@
1.114
1.115
1.116 --
1.117 --- TOC entry 1581 (class 1259 OID 16815)
1.118 --- Dependencies: 1850 10
1.119 +-- TOC entry 1585 (class 1259 OID 16815)
1.120 +-- Dependencies: 1856 10
1.121 -- Name: tip; Type: TABLE; Schema: sqlvyukaaplikace; Owner: -; Tablespace:
1.122 --
1.123
1.124 @@ -78,8 +150,8 @@
1.125
1.126
1.127 --
1.128 --- TOC entry 1859 (class 0 OID 0)
1.129 --- Dependencies: 1581
1.130 +-- TOC entry 1875 (class 0 OID 0)
1.131 +-- Dependencies: 1585
1.132 -- Name: TABLE tip; Type: COMMENT; Schema: sqlvyukaaplikace; Owner: -
1.133 --
1.134
1.135 @@ -87,8 +159,8 @@
1.136
1.137
1.138 --
1.139 --- TOC entry 1860 (class 0 OID 0)
1.140 --- Dependencies: 1581
1.141 +-- TOC entry 1876 (class 0 OID 0)
1.142 +-- Dependencies: 1585
1.143 -- Name: COLUMN tip.text; Type: COMMENT; Schema: sqlvyukaaplikace; Owner: -
1.144 --
1.145
1.146 @@ -96,8 +168,8 @@
1.147
1.148
1.149 --
1.150 --- TOC entry 1852 (class 2606 OID 16796)
1.151 --- Dependencies: 1578 1578
1.152 +-- TOC entry 1859 (class 2606 OID 16796)
1.153 +-- Dependencies: 1582 1582
1.154 -- Name: historie_pk; Type: CONSTRAINT; Schema: sqlvyukaaplikace; Owner: -; Tablespace:
1.155 --
1.156
1.157 @@ -106,8 +178,28 @@
1.158
1.159
1.160 --
1.161 --- TOC entry 1854 (class 2606 OID 16823)
1.162 --- Dependencies: 1581 1581
1.163 +-- TOC entry 1865 (class 2606 OID 16838)
1.164 +-- Dependencies: 1587 1587
1.165 +-- Name: pruvodce_kod_uq; Type: CONSTRAINT; Schema: sqlvyukaaplikace; Owner: -; Tablespace:
1.166 +--
1.167 +
1.168 +ALTER TABLE ONLY pruvodce
1.169 + ADD CONSTRAINT pruvodce_kod_uq UNIQUE (kod);
1.170 +
1.171 +
1.172 +--
1.173 +-- TOC entry 1867 (class 2606 OID 16836)
1.174 +-- Dependencies: 1587 1587
1.175 +-- Name: pruvodce_pk; Type: CONSTRAINT; Schema: sqlvyukaaplikace; Owner: -; Tablespace:
1.176 +--
1.177 +
1.178 +ALTER TABLE ONLY pruvodce
1.179 + ADD CONSTRAINT pruvodce_pk PRIMARY KEY (id);
1.180 +
1.181 +
1.182 +--
1.183 +-- TOC entry 1861 (class 2606 OID 16823)
1.184 +-- Dependencies: 1585 1585
1.185 -- Name: tip_pk; Type: CONSTRAINT; Schema: sqlvyukaaplikace; Owner: -; Tablespace:
1.186 --
1.187
1.188 @@ -116,8 +208,8 @@
1.189
1.190
1.191 --
1.192 --- TOC entry 1856 (class 2606 OID 16825)
1.193 --- Dependencies: 1581 1581
1.194 +-- TOC entry 1863 (class 2606 OID 16825)
1.195 +-- Dependencies: 1585 1585
1.196 -- Name: tip_uq; Type: CONSTRAINT; Schema: sqlvyukaaplikace; Owner: -; Tablespace:
1.197 --
1.198
1.199 @@ -125,7 +217,7 @@
1.200 ADD CONSTRAINT tip_uq UNIQUE (text);
1.201
1.202
1.203 --- Completed on 2009-05-31 22:35:01 CEST
1.204 +-- Completed on 2009-06-06 23:39:14 CEST
1.205
1.206 --
1.207 -- PostgreSQL database dump complete