forked from piaskowyk/twitter-posts-analysis
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathschema.sql
More file actions
29 lines (27 loc) · 701 Bytes
/
Copy pathschema.sql
File metadata and controls
29 lines (27 loc) · 701 Bytes
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
CREATE TABLE public."user" (
id int8 NOT NULL,
"name" varchar NULL,
"location" varchar NULL,
description varchar NULL,
followers_count int4 NULL,
CONSTRAINT user_pkey PRIMARY KEY (id)
);
CREATE TABLE public.tweet (
id int8 NOT NULL,
"content" text NULL,
tags text NULL,
user_id int8 NULL,
created_at timestamp(0) NULL,
sentiment_neg float4 NULL,
sentiment_neu float4 NULL,
sentiment_pos float4 NULL,
sentiment_compound float4 NULL,
retweet_count int4 NULL,
favorite_count int4 NULL,
reply_count int4 NULL,
quote_count int4 NULL,
reply_to int8 NULL,
fetched_comments bool NULL,
CONSTRAINT tweet_pk PRIMARY KEY (id)
);
ALTER TABLE public.tweet ADD CONSTRAINT fk_tweet_user null;