-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmydb.sql
204 lines (145 loc) · 4.1 KB
/
mydb.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.14
-- Dumped by pg_dump version 9.5.14
-- Started on 2018-08-19 09:03:52 +03
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SELECT pg_catalog.set_config('search_path', '', false);
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
--
-- TOC entry 1 (class 3079 OID 12397)
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- TOC entry 2167 (class 0 OID 0)
-- Dependencies: 1
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
SET default_tablespace = '';
SET default_with_oids = false;
--
-- TOC entry 183 (class 1259 OID 16531)
-- Name: boards; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.boards (
title character varying,
user_id bigint,
id bigint NOT NULL,
secret character varying
);
--
-- TOC entry 184 (class 1259 OID 16539)
-- Name: boards_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.boards_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 2168 (class 0 OID 0)
-- Dependencies: 184
-- Name: boards_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.boards_id_seq OWNED BY public.boards.id;
--
-- TOC entry 186 (class 1259 OID 16587)
-- Name: tasks; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.tasks (
id bigint NOT NULL,
board_id bigint,
title character varying,
content character varying,
status character varying,
"position" bigint
);
--
-- TOC entry 185 (class 1259 OID 16585)
-- Name: tasks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.tasks_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 2169 (class 0 OID 0)
-- Dependencies: 185
-- Name: tasks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.tasks_id_seq OWNED BY public.tasks.id;
--
-- TOC entry 182 (class 1259 OID 16403)
-- Name: users; Type: TABLE; Schema: public; Owner: -
--
CREATE TABLE public.users (
id bigint NOT NULL,
name character varying,
avatar character varying,
password character varying,
email character varying
);
--
-- TOC entry 181 (class 1259 OID 16401)
-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE public.users_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- TOC entry 2170 (class 0 OID 0)
-- Dependencies: 181
-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE public.users_id_seq OWNED BY public.users.id;
--
-- TOC entry 2038 (class 2604 OID 16606)
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.boards ALTER COLUMN id SET DEFAULT nextval('public.boards_id_seq'::regclass);
--
-- TOC entry 2039 (class 2604 OID 16607)
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.tasks ALTER COLUMN id SET DEFAULT nextval('public.tasks_id_seq'::regclass);
--
-- TOC entry 2037 (class 2604 OID 16608)
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.users ALTER COLUMN id SET DEFAULT nextval('public.users_id_seq'::regclass);
--
-- TOC entry 2043 (class 2606 OID 16549)
-- Name: boards_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.boards
ADD CONSTRAINT boards_pkey PRIMARY KEY (id);
--
-- TOC entry 2045 (class 2606 OID 16595)
-- Name: tasks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.tasks
ADD CONSTRAINT tasks_pkey PRIMARY KEY (id);
--
-- TOC entry 2041 (class 2606 OID 16442)
-- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY public.users
ADD CONSTRAINT users_pkey PRIMARY KEY (id);
-- Completed on 2018-08-19 09:03:53 +03
--
-- PostgreSQL database dump complete
--