forked from gaochang0076/yoda-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinitdb.sql
More file actions
423 lines (294 loc) · 8.41 KB
/
Copy pathinitdb.sql
File metadata and controls
423 lines (294 loc) · 8.41 KB
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.5.8
-- Dumped by pg_dump version 9.5.8
-- Started on 2018-05-04 09:10:53 CST
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
--
-- TOC entry 1 (class 3079 OID 12403)
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- TOC entry 2203 (class 0 OID 0)
-- Dependencies: 1
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- TOC entry 185 (class 1259 OID 16589)
-- Name: dirauth; Type: TABLE; Schema: public; Owner: yoda
--
CREATE TABLE dirauth (
path text NOT NULL,
userid integer,
authority integer,
daid integer NOT NULL
);
ALTER TABLE dirauth OWNER TO yoda;
--
-- TOC entry 184 (class 1259 OID 16587)
-- Name: dirauth_id_seq; Type: SEQUENCE; Schema: public; Owner: yoda
--
CREATE SEQUENCE dirauth_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE dirauth_id_seq OWNER TO yoda;
--
-- TOC entry 2204 (class 0 OID 0)
-- Dependencies: 184
-- Name: dirauth_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: yoda
--
ALTER SEQUENCE dirauth_id_seq OWNED BY dirauth.daid;
--
-- TOC entry 181 (class 1259 OID 16548)
-- Name: model; Type: TABLE; Schema: public; Owner: yoda
--
CREATE TABLE models (
modelname text NOT NULL,
pipe text NOT NULL,
deft text
);
ALTER TABLE models OWNER TO yoda;
--
-- TOC entry 187 (class 1259 OID 16602)
-- Name: task; Type: TABLE; Schema: public; Owner: yoda
--
CREATE TABLE tasks (
taskid integer NOT NULL,
taskname text,
input text,
pipe text,
defts text
);
ALTER TABLE tasks OWNER TO yoda;
--
-- TOC entry 186 (class 1259 OID 16600)
-- Name: task_id_seq; Type: SEQUENCE; Schema: public; Owner: yoda
--
CREATE SEQUENCE task_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE task_id_seq OWNER TO yoda;
--
-- TOC entry 2205 (class 0 OID 0)
-- Dependencies: 186
-- Name: task_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: yoda
--
ALTER SEQUENCE task_id_seq OWNED BY tasks.taskid;
--
-- TOC entry 189 (class 1259 OID 16624)
-- Name: taskauth; Type: TABLE; Schema: public; Owner: yoda
--
CREATE TABLE taskauth (
taid integer NOT NULL,
userid integer,
taskid integer,
authority integer
);
ALTER TABLE taskauth OWNER TO yoda;
--
-- TOC entry 188 (class 1259 OID 16622)
-- Name: taskauth_id_seq; Type: SEQUENCE; Schema: public; Owner: yoda
--
CREATE SEQUENCE taskauth_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE taskauth_id_seq OWNER TO yoda;
--
-- TOC entry 2206 (class 0 OID 0)
-- Dependencies: 188
-- Name: taskauth_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: yoda
--
ALTER SEQUENCE taskauth_id_seq OWNED BY taskauth.taid;
--
-- TOC entry 183 (class 1259 OID 16558)
-- Name: user; Type: TABLE; Schema: public; Owner: yoda
--
CREATE TABLE users (
userid integer NOT NULL,
username text NOT NULL,
salt text,
password text,
font text,
color text,
authority integer
);
ALTER TABLE users OWNER TO yoda;
--
-- TOC entry 182 (class 1259 OID 16556)
-- Name: user_uid_seq; Type: SEQUENCE; Schema: public; Owner: yoda
--
CREATE SEQUENCE user_uid_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE user_uid_seq OWNER TO yoda;
--
-- TOC entry 2207 (class 0 OID 0)
-- Dependencies: 182
-- Name: user_uid_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: yoda
--
ALTER SEQUENCE user_uid_seq OWNED BY users.userid;
--
-- TOC entry 2054 (class 2604 OID 16592)
-- Name: daid; Type: DEFAULT; Schema: public; Owner: yoda
--
ALTER TABLE ONLY dirauth ALTER COLUMN daid SET DEFAULT nextval('dirauth_id_seq'::regclass);
--
-- TOC entry 2055 (class 2604 OID 16605)
-- Name: taskid; Type: DEFAULT; Schema: public; Owner: yoda
--
ALTER TABLE ONLY tasks ALTER COLUMN taskid SET DEFAULT nextval('task_id_seq'::regclass);
--
-- TOC entry 2056 (class 2604 OID 16627)
-- Name: taid; Type: DEFAULT; Schema: public; Owner: yoda
--
ALTER TABLE ONLY taskauth ALTER COLUMN taid SET DEFAULT nextval('taskauth_id_seq'::regclass);
--
-- TOC entry 2053 (class 2604 OID 16561)
-- Name: userid; Type: DEFAULT; Schema: public; Owner: yoda
--
ALTER TABLE ONLY users ALTER COLUMN userid SET DEFAULT nextval('user_uid_seq'::regclass);
--
-- TOC entry 2191 (class 0 OID 16589)
-- Dependencies: 185
-- Data for Name: dirauth; Type: TABLE DATA; Schema: public; Owner: yoda
--
COPY dirauth (path, userid, authority, daid) FROM stdin;
\.
--
-- TOC entry 2208 (class 0 OID 0)
-- Dependencies: 184
-- Name: dirauth_id_seq; Type: SEQUENCE SET; Schema: public; Owner: yoda
--
SELECT pg_catalog.setval('dirauth_id_seq', 1, false);
--
-- TOC entry 2187 (class 0 OID 16548)
-- Dependencies: 181
-- Data for Name: model; Type: TABLE DATA; Schema: public; Owner: yoda
--
COPY models (modelname, pipe, deft) FROM stdin;
\.
--
-- TOC entry 2193 (class 0 OID 16602)
-- Dependencies: 187
-- Data for Name: task; Type: TABLE DATA; Schema: public; Owner: yoda
--
COPY tasks (taskid, taskname, input, pipe, defts) FROM stdin;
\.
--
-- TOC entry 2209 (class 0 OID 0)
-- Dependencies: 186
-- Name: task_id_seq; Type: SEQUENCE SET; Schema: public; Owner: yoda
--
SELECT pg_catalog.setval('task_id_seq', 1, false);
--
-- TOC entry 2195 (class 0 OID 16624)
-- Dependencies: 189
-- Data for Name: taskauth; Type: TABLE DATA; Schema: public; Owner: yoda
--
COPY taskauth (taid, userid, taskid, authority) FROM stdin;
\.
--
-- TOC entry 2210 (class 0 OID 0)
-- Dependencies: 188
-- Name: taskauth_id_seq; Type: SEQUENCE SET; Schema: public; Owner: yoda
--
SELECT pg_catalog.setval('taskauth_id_seq', 1, false);
--
-- TOC entry 2189 (class 0 OID 16558)
-- Dependencies: 183
-- Data for Name: user; Type: TABLE DATA; Schema: public; Owner: yoda
--
COPY users (userid, username, salt, password, authority) FROM stdin;
1 admin 4HRZ0GN2BsxuA4WoxHmiVGpqq48= 5uOn44AaZMlkHEdqziQBS0tZJF8YOlJ4ZWCV/LASj3+CRzbbWQEzNRXIOu6eEMGj 7
\.
--
-- TOC entry 2211 (class 0 OID 0)
-- Dependencies: 182
-- Name: user_uid_seq; Type: SEQUENCE SET; Schema: public; Owner: yoda
--
SELECT pg_catalog.setval('user_uid_seq', 1, true);
--
-- TOC entry 2064 (class 2606 OID 16599)
-- Name: dirauth_folder_userid_location_key; Type: CONSTRAINT; Schema: public; Owner: yoda
--
ALTER TABLE ONLY dirauth
ADD CONSTRAINT dirauth_folder_userid_location_key UNIQUE (path, userid);
--
-- TOC entry 2060 (class 2606 OID 16566)
-- Name: primary; Type: CONSTRAINT; Schema: public; Owner: yoda
--
ALTER TABLE ONLY users
ADD CONSTRAINT "primary" PRIMARY KEY (userid);
--
-- TOC entry 2058 (class 2606 OID 16555)
-- Name: primary key; Type: CONSTRAINT; Schema: public; Owner: yoda
--
ALTER TABLE ONLY models
ADD CONSTRAINT "primary key" PRIMARY KEY (pipe);
--
-- TOC entry 2066 (class 2606 OID 16597)
-- Name: primary of dirauth; Type: CONSTRAINT; Schema: public; Owner: yoda
--
ALTER TABLE ONLY dirauth
ADD CONSTRAINT "primary of dirauth" PRIMARY KEY (daid);
--
-- TOC entry 2068 (class 2606 OID 16610)
-- Name: task_pkey; Type: CONSTRAINT; Schema: public; Owner: yoda
--
ALTER TABLE ONLY tasks
ADD CONSTRAINT task_pkey PRIMARY KEY (taskid);
--
-- TOC entry 2070 (class 2606 OID 16629)
-- Name: taskauth_pkey; Type: CONSTRAINT; Schema: public; Owner: yoda
--
ALTER TABLE ONLY taskauth
ADD CONSTRAINT taskauth_pkey PRIMARY KEY (taid);
--
-- TOC entry 2072 (class 2606 OID 16631)
-- Name: uniq; Type: CONSTRAINT; Schema: public; Owner: yoda
--
ALTER TABLE ONLY taskauth
ADD CONSTRAINT uniq UNIQUE (userid, taskid);
--
-- TOC entry 2062 (class 2606 OID 16568)
-- Name: uniq username; Type: CONSTRAINT; Schema: public; Owner: yoda
--
ALTER TABLE ONLY users
ADD CONSTRAINT "uniq username" UNIQUE (username);
--
-- TOC entry 2202 (class 0 OID 0)
-- Dependencies: 7
-- Name: public; Type: ACL; Schema: -; Owner: yoda
--
REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM yoda;
GRANT ALL ON SCHEMA public TO yoda;
GRANT ALL ON SCHEMA public TO PUBLIC;
-- Completed on 2018-05-04 09:10:53 CST
--
-- PostgreSQL database dump complete
--