comparison db/structure.sql @ 463:4608d12ebe03

Sync database
author nanaya <me@nanaya.pro>
date Mon, 10 Dec 2018 02:35:08 +0900
parents b1ef80121c79
children 92929378413e
comparison
equal deleted inserted replaced
462:e8d6c631a55b 463:4608d12ebe03
5 SET standard_conforming_strings = on; 5 SET standard_conforming_strings = on;
6 SELECT pg_catalog.set_config('search_path', '', false); 6 SELECT pg_catalog.set_config('search_path', '', false);
7 SET check_function_bodies = false; 7 SET check_function_bodies = false;
8 SET client_min_messages = warning; 8 SET client_min_messages = warning;
9 SET row_security = off; 9 SET row_security = off;
10
11 --
12 -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
13 --
14
15 CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
16
17
18 --
19 -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
20 --
21
22 COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
23
24
25 --
26 -- Name: hstore; Type: EXTENSION; Schema: -; Owner: -
27 --
28
29 CREATE EXTENSION IF NOT EXISTS hstore WITH SCHEMA public;
30
31
32 --
33 -- Name: EXTENSION hstore; Type: COMMENT; Schema: -; Owner: -
34 --
35
36 COMMENT ON EXTENSION hstore IS 'data type for storing sets of (key, value) pairs';
37
38 10
39 SET default_tablespace = ''; 11 SET default_tablespace = '';
40 12
41 SET default_with_oids = false; 13 SET default_with_oids = false;
42 14
59 CREATE TABLE public.pastes ( 31 CREATE TABLE public.pastes (
60 id integer NOT NULL, 32 id integer NOT NULL,
61 ip character varying(50) NOT NULL, 33 ip character varying(50) NOT NULL,
62 paste text NOT NULL, 34 paste text NOT NULL,
63 paste_hash character varying(150) NOT NULL, 35 paste_hash character varying(150) NOT NULL,
64 created_at timestamp with time zone NOT NULL, 36 created_at timestamp with time zone,
65 updated_at timestamp with time zone NOT NULL, 37 updated_at timestamp with time zone,
66 key character varying(100), 38 key character varying(100),
67 secret character varying(100), 39 secret character varying(100),
68 language character varying(100) 40 language character varying(100)
69 ); 41 );
70 42
128 ALTER TABLE ONLY public.schema_migrations 100 ALTER TABLE ONLY public.schema_migrations
129 ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version); 101 ADD CONSTRAINT schema_migrations_pkey PRIMARY KEY (version);
130 102
131 103
132 -- 104 --
133 -- Name: index_pastes_on_ip_and_hash; Type: INDEX; Schema: public; Owner: - 105 -- Name: index_pastes_on_ip_and_paste_hash; Type: INDEX; Schema: public; Owner: -
134 -- 106 --
135 107
136 CREATE UNIQUE INDEX index_pastes_on_ip_and_hash ON public.pastes USING btree (ip, paste_hash); 108 CREATE UNIQUE INDEX index_pastes_on_ip_and_paste_hash ON public.pastes USING btree (ip, paste_hash);
137 109
138 110
139 -- 111 --
140 -- Name: index_pastes_on_secret; Type: INDEX; Schema: public; Owner: - 112 -- Name: index_pastes_on_secret; Type: INDEX; Schema: public; Owner: -
141 -- 113 --