master
1--
2-- PostgreSQL database dump
3--
4
5SET statement_timeout = 0;
6SET lock_timeout = 0;
7SET client_encoding = 'UTF8';
8SET standard_conforming_strings = on;
9SET check_function_bodies = false;
10SET client_min_messages = warning;
11
12--
13-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
14--
15
16CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
17
18
19--
20-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
21--
22
23COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
24
25
26SET search_path = public, pg_catalog;
27
28SET default_tablespace = '';
29
30SET default_with_oids = false;
31
32--
33-- Name: movies; Type: TABLE; Schema: public; Owner: vagrant; Tablespace:
34--
35
36CREATE TABLE movies (
37 id integer NOT NULL,
38 title character varying(255),
39 studio_id integer,
40 year integer
41);
42
43
44ALTER TABLE movies OWNER TO vagrant;
45
46--
47-- Name: movies_id_seq; Type: SEQUENCE; Schema: public; Owner: vagrant
48--
49
50CREATE SEQUENCE movies_id_seq
51 START WITH 1
52 INCREMENT BY 1
53 NO MINVALUE
54 NO MAXVALUE
55 CACHE 1;
56
57
58ALTER TABLE movies_id_seq OWNER TO vagrant;
59
60--
61-- Name: movies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vagrant
62--
63
64ALTER SEQUENCE movies_id_seq OWNED BY movies.id;
65
66
67--
68-- Name: schema_migrations; Type: TABLE; Schema: public; Owner: vagrant; Tablespace:
69--
70
71CREATE TABLE schema_migrations (
72 version character varying(255) NOT NULL
73);
74
75
76ALTER TABLE schema_migrations OWNER TO vagrant;
77
78--
79-- Name: studios; Type: TABLE; Schema: public; Owner: vagrant; Tablespace:
80--
81
82CREATE TABLE studios (
83 id integer NOT NULL,
84 title character varying(255)
85);
86
87
88ALTER TABLE studios OWNER TO vagrant;
89
90--
91-- Name: studios_id_seq; Type: SEQUENCE; Schema: public; Owner: vagrant
92--
93
94CREATE SEQUENCE studios_id_seq
95 START WITH 1
96 INCREMENT BY 1
97 NO MINVALUE
98 NO MAXVALUE
99 CACHE 1;
100
101
102ALTER TABLE studios_id_seq OWNER TO vagrant;
103
104--
105-- Name: studios_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vagrant
106--
107
108ALTER SEQUENCE studios_id_seq OWNED BY studios.id;
109
110
111--
112-- Name: users; Type: TABLE; Schema: public; Owner: vagrant; Tablespace:
113--
114
115CREATE TABLE users (
116 id integer NOT NULL,
117 password_digest character varying(255),
118 created_at timestamp without time zone,
119 updated_at timestamp without time zone
120);
121
122
123ALTER TABLE users OWNER TO vagrant;
124
125--
126-- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: vagrant
127--
128
129CREATE SEQUENCE users_id_seq
130 START WITH 1
131 INCREMENT BY 1
132 NO MINVALUE
133 NO MAXVALUE
134 CACHE 1;
135
136
137ALTER TABLE users_id_seq OWNER TO vagrant;
138
139--
140-- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: vagrant
141--
142
143ALTER SEQUENCE users_id_seq OWNED BY users.id;
144
145
146--
147-- Name: id; Type: DEFAULT; Schema: public; Owner: vagrant
148--
149
150ALTER TABLE ONLY movies ALTER COLUMN id SET DEFAULT nextval('movies_id_seq'::regclass);
151
152
153--
154-- Name: id; Type: DEFAULT; Schema: public; Owner: vagrant
155--
156
157ALTER TABLE ONLY studios ALTER COLUMN id SET DEFAULT nextval('studios_id_seq'::regclass);
158
159
160--
161-- Name: id; Type: DEFAULT; Schema: public; Owner: vagrant
162--
163
164ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
165
166
167--
168-- Data for Name: movies; Type: TABLE DATA; Schema: public; Owner: vagrant
169--
170
171COPY movies (id, title, studio_id, year) FROM stdin;
1721 The Shawshank Redemption 1 1994
1732 Chasing Amy 2 1997
1743 Man on Fire 3 2004
1754 Toy Story 4 1995
1765 Up 4 2006
1776 Cars 4 2009
1787 Monsters Inc. 4 2001
1798 Fantasia 5 1940
1809 Dumbo 5 1941
18110 Pinocchio 5 1940
182\.
183
184
185--
186-- Name: movies_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vagrant
187--
188
189SELECT pg_catalog.setval('movies_id_seq', 10, true);
190
191
192--
193-- Data for Name: schema_migrations; Type: TABLE DATA; Schema: public; Owner: vagrant
194--
195
196COPY schema_migrations (version) FROM stdin;
19720140208162237
19820131129024058
19920131129025934
20020140208154456
20120140208160437
202\.
203
204
205--
206-- Data for Name: studios; Type: TABLE DATA; Schema: public; Owner: vagrant
207--
208
209COPY studios (id, title) FROM stdin;
2101 Castle Rock
2112 MiramaxFilms
2123 RegencyEnterprises
2134 Pixar
2145 Disney
215\.
216
217
218--
219-- Name: studios_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vagrant
220--
221
222SELECT pg_catalog.setval('studios_id_seq', 1, false);
223
224
225--
226-- Data for Name: users; Type: TABLE DATA; Schema: public; Owner: vagrant
227--
228
229COPY users (id, password_digest, created_at, updated_at) FROM stdin;
230\.
231
232
233--
234-- Name: users_id_seq; Type: SEQUENCE SET; Schema: public; Owner: vagrant
235--
236
237SELECT pg_catalog.setval('users_id_seq', 1, false);
238
239
240--
241-- Name: movies_pkey; Type: CONSTRAINT; Schema: public; Owner: vagrant; Tablespace:
242--
243
244ALTER TABLE ONLY movies
245 ADD CONSTRAINT movies_pkey PRIMARY KEY (id);
246
247
248--
249-- Name: studios_pkey; Type: CONSTRAINT; Schema: public; Owner: vagrant; Tablespace:
250--
251
252ALTER TABLE ONLY studios
253 ADD CONSTRAINT studios_pkey PRIMARY KEY (id);
254
255
256--
257-- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: vagrant; Tablespace:
258--
259
260ALTER TABLE ONLY users
261 ADD CONSTRAINT users_pkey PRIMARY KEY (id);
262
263
264--
265-- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: vagrant; Tablespace:
266--
267
268CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (version);
269
270
271--
272-- Name: public; Type: ACL; Schema: -; Owner: postgres
273--
274
275REVOKE ALL ON SCHEMA public FROM PUBLIC;
276REVOKE ALL ON SCHEMA public FROM postgres;
277GRANT ALL ON SCHEMA public TO postgres;
278GRANT ALL ON SCHEMA public TO PUBLIC;
279
280
281--
282-- PostgreSQL database dump complete
283--
284