forked from GoogleCloudPlatform/spanner-migration-tool
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathcart.pg_dump
100 lines (72 loc) · 2.29 KB
/
cart.pg_dump
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
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.18
-- Dumped by pg_dump version 12.3 (Debian 12.3-1)
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 = '';
--
-- Name: cart; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.cart (
user_id character varying(20) NOT NULL,
product_id character varying(20) NOT NULL,
quantity bigint,
last_modified timestamp without time zone
);
ALTER TABLE public.cart OWNER TO postgres;
--
-- Name: products; Type: TABLE; Schema: public; Owner: postgres
--
CREATE TABLE public.products (
product_id character varying(20) NOT NULL,
description character varying(1000),
price numeric(10,2),
date_added date
);
ALTER TABLE public.products OWNER TO postgres;
--
-- Data for Name: cart; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.cart (user_id, product_id, quantity, last_modified) FROM stdin;
901e-a6cfc2b502dc abc-123 1 2020-07-20 05:10:26
901e-a6cfc2b502dc axd-673 2 2020-07-20 05:10:43
a86b-82493320a775 zxi-631 5 2020-07-20 05:10:46
\.
--
-- Data for Name: products; Type: TABLE DATA; Schema: public; Owner: postgres
--
COPY public.products (product_id, description, price, date_added) FROM stdin;
abc-123 Blue suede shoes 141.99 2020-06-06
axd-673 Antique typewriter 99.99 2020-06-07
zxi-631 Glass vase 55.50 2020-06-10
\.
--
-- Name: cart cart_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.cart
ADD CONSTRAINT cart_pkey PRIMARY KEY (user_id, product_id);
--
-- Name: products products_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
--
ALTER TABLE ONLY public.products
ADD CONSTRAINT products_pkey PRIMARY KEY (product_id);
--
-- Name: SCHEMA public; Type: ACL; Schema: -; Owner: cloudsqlsuperuser
--
REVOKE ALL ON SCHEMA public FROM cloudsqladmin;
REVOKE ALL ON SCHEMA public FROM PUBLIC;
GRANT ALL ON SCHEMA public TO cloudsqlsuperuser;
GRANT ALL ON SCHEMA public TO PUBLIC;
--
-- PostgreSQL database dump complete
--