-
Notifications
You must be signed in to change notification settings - Fork 595
/
db.sql
64 lines (56 loc) · 1.45 KB
/
db.sql
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
-- Database: hack
-- DROP DATABASE hack;
CREATE DATABASE hack
WITH OWNER = postgres
ENCODING = 'UTF8'
TABLESPACE = pg_default
LC_COLLATE = 'en_US.UTF-8'
LC_CTYPE = 'en_US.UTF-8'
CONNECTION LIMIT = -1;
-- Table: events
CREATE TABLE events
(
id character varying(256) NOT NULL,
created_at timestamp with time zone,
updated_at timestamp with time zone,
town character varying(100),
area character varying(100),
status character varying(100),
last_update timestamp without time zone,
posted boolean,
CONSTRAINT events_pkey PRIMARY KEY (id)
)
WITH (
OIDS=FALSE
);
ALTER TABLE events
OWNER TO postgres;
-- Table: messages
CREATE TABLE messages
(
id character varying(256) NOT NULL,
created_at timestamp with time zone,
updated_at timestamp with time zone,
tw_from character varying(20),
tw_sms_sid character varying(256),
tw_account_sid character varying(256),
tw_to character varying(20),
tw_body character varying(180),
tw_from_city character varying(100),
tw_from_state character varying(100),
tw_from_zip character varying(15),
tw_from_country character varying(100),
tw_to_city character varying(100),
tw_to_state character varying(100),
tw_to_zip character varying(15),
tw_to_country character varying(100),
sent boolean,
valid boolean,
response character varying(180),
CONSTRAINT messages_pkey PRIMARY KEY (id)
)
WITH (
OIDS=FALSE
);
ALTER TABLE messages
OWNER TO postgres;