Created
June 21, 2016 03:16
-
-
Save gbrl/3d1dd97a093582e22313bdfbc5864318 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE users ( | |
phone char(13), | |
active boolean, | |
frequency integer, | |
news_weight integer, | |
entertainment_weight integer, | |
facts_weight integer, | |
romance_weight integer, | |
); | |
CREATE TABLE prompts ( | |
content text, | |
category char(13), | |
domain varchar, | |
url varchar, | |
ups integer | |
); | |
CREATE TABLE bursts ( | |
user_id integer, | |
prompt_ids integer[], | |
sent boolean default FALSE, | |
sent_at date, | |
created_at date | |
); | |
CREATE TABLE histories ( | |
user_id integer, | |
prompt_id integer | |
); | |
And add an ID column to bursts | |
ALTER TABLE bursts ADD COLUMN id SERIAL PRIMARY KEY; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment