forked from eduardorochasoares/easytopic
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathinit.sql
More file actions
232 lines (162 loc) · 4.63 KB
/
init.sql
File metadata and controls
232 lines (162 loc) · 4.63 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
--
-- PostgreSQL database cluster dump
--
-- Started on 2019-11-17 16:10:05 UTC
SET default_transaction_read_only = off;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
--
-- Roles
--
DO
$do$
BEGIN
IF NOT EXISTS (
SELECT -- SELECT list can stay empty for this
FROM pg_catalog.pg_roles
WHERE rolname = 'postgres') THEN
CREATE ROLE postgres;
ALTER ROLE postgres WITH SUPERUSER INHERIT CREATEROLE CREATEDB LOGIN REPLICATION BYPASSRLS PASSWORD 'md5354cba921004281fb8d562a63f6fdf70';
END IF;
END
$do$;
--
-- Databases
--
--
-- Database "template1" dump
--
\connect template1
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.0 (Debian 12.0-2.pgdg100+1)
-- Dumped by pg_dump version 12.0
-- Started on 2019-11-17 16:10:05 UTC
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_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 xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
-- Completed on 2019-11-17 16:10:05 UTC
--
-- PostgreSQL database dump complete
--
--
-- Database "postgres" dump
--
\connect postgres
--
-- PostgreSQL database dump
--
-- Dumped from database version 12.0 (Debian 12.0-2.pgdg100+1)
-- Dumped by pg_dump version 12.0
-- Started on 2019-11-17 16:10:05 UTC
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_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 xmloption = content;
SET client_min_messages = warning;
SET row_security = off;
SET default_tablespace = '';
SET default_table_access_method = heap;
--
-- TOC entry 203 (class 1259 OID 16386)
-- Name: jobs; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.jobs(
oid bigint NOT NULL,
type text NOT NULL,
status text NOT NULL,
file_id text,
project_id integer NOT NULL
);
ALTER TABLE public.jobs OWNER TO postgres;
--
-- TOC entry 202 (class 1259 OID 16384)
-- Name: jobs_oid_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.jobs_oid_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.jobs_oid_seq OWNER TO postgres;
--
-- TOC entry 2923 (class 0 OID 0)
-- Dependencies: 202
-- Name: jobs_oid_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.jobs_oid_seq OWNED BY public.jobs.oid;
--
-- TOC entry 205 (class 1259 OID 16397)
-- Name: project; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.project (
id bigint NOT NULL,
video_lesson text NOT NULL
);
ALTER TABLE public.project OWNER TO postgres;
--
-- TOC entry 204 (class 1259 OID 16395)
-- Name: project_id_seq; Type: SEQUENCE; Schema: public; Owner: postgres
--
CREATE SEQUENCE public.project_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE public.project_id_seq OWNER TO postgres;
--
-- TOC entry 2924 (class 0 OID 0)
-- Dependencies: 204
-- Name: project_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: postgres
--
ALTER SEQUENCE public.project_id_seq OWNED BY public.project.id;
--
-- TOC entry 2785 (class 2604 OID 16389)
-- Name: jobs oid; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.jobs ALTER COLUMN oid SET DEFAULT nextval('public.jobs_oid_seq'::regclass);
--
-- TOC entry 2786 (class 2604 OID 16400)
-- Name: project id; Type: DEFAULT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.project ALTER COLUMN id SET DEFAULT nextval('public.project_id_seq'::regclass);
--
-- TOC entry 2788 (class 2606 OID 16394)
-- Name: jobs jobs_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.jobs
ADD CONSTRAINT jobs_pkey PRIMARY KEY (oid);
--
-- TOC entry 2790 (class 2606 OID 16402)
-- Name: project project_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.project
ADD CONSTRAINT project_pkey PRIMARY KEY (id);
--
-- TOC entry 2791 (class 2606 OID 16403)
-- Name: jobs fk_project_id; Type: FK CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.jobs
ADD CONSTRAINT fk_project_id FOREIGN KEY (project_id) REFERENCES public.project(id) NOT VALID;
-- Completed on 2019-11-17 16:10:05 UTC
--
-- PostgreSQL database dump complete
--
-- Completed on 2019-11-17 16:10:05 UTC
--
-- PostgreSQL database cluster dump complete
--