Skip to content
This repository has been archived by the owner on Jun 24, 2020. It is now read-only.

How much information should we store? #1

Open
zackify opened this issue Sep 20, 2015 · 10 comments
Open

How much information should we store? #1

zackify opened this issue Sep 20, 2015 · 10 comments

Comments

@zackify
Copy link
Contributor

zackify commented Sep 20, 2015

Take a look at https://github.com/reactiflux/archive-bot/tree/master/migrations We're looking to store the following info:

Users

id username real_name avatar
slack id zach Zach Silveira http://

Messages

Each channel will be based off the messages channel using postgres' partitioning

id channel_id user_id attachments text ts subtype hidden
1 slack channel id slack user id from user's table json field with attachment info message text slack's timestamp message false

Channels
Info about each channel

id channel_id name description is_archived
1 slack channel id general discuss react false

How's this look so far? What do we need to add / change? @benigeri @tappleby

@benigeri
Copy link
Contributor

@zackify users + channels look good. I think we should add messags.subtype and messages.hidden though

@zackify
Copy link
Contributor Author

zackify commented Sep 20, 2015

@benigeri sure, how about making them json fields like the attachments?

@benigeri
Copy link
Contributor

why not just string fields?

@zackify
Copy link
Contributor Author

zackify commented Sep 20, 2015

Sorry, it's late, I'm not thinking :P I'll do it and push :)

@benigeri
Copy link
Contributor

thanks for doing all of this!

zackify added a commit that referenced this issue Sep 20, 2015
@tappleby
Copy link
Contributor

looks good so far. eventually we might want to handle message types like file_share which contain a file object.

@benigeri
Copy link
Contributor

👍 I think we can close this for now.

@tappleby
Copy link
Contributor

Messages

Even though these are partitioned by channel, do you think we should store a channel_id?

Channels

We probably want a channel_id that maps to the slack id eg. C024BE91L

@benigeri
Copy link
Contributor

@tappleby 👍 * 2

@zackify
Copy link
Contributor Author

zackify commented Sep 20, 2015

@benigeri don't close yet, I think there could be more things we may want to add or someone else may come up with an idea. Added the channel_id @tappleby

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants