sql/schéma.sql
author František Kučera <franta-hg@frantovo.cz>
Sat, 16 Jan 2010 02:43:45 +0100
changeset 18 0deb8f6abcf5
child 19 5d93bf1c8093
permissions -rw-r--r--
Schéma databáze – začátek.
franta-hg@18
     1
--
franta-hg@18
     2
-- PostgreSQL database dump
franta-hg@18
     3
--
franta-hg@18
     4
franta-hg@18
     5
-- Started on 2010-01-16 02:43:00 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@18
    42
-- TOC entry 1847 (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@18
    92
-- Completed on 2010-01-16 02:43:01 CET
franta-hg@18
    93
franta-hg@18
    94
--
franta-hg@18
    95
-- PostgreSQL database dump complete
franta-hg@18
    96
--
franta-hg@18
    97