Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing created_at and updated columns in forem_forums table #656

Open
edmondchui opened this issue Apr 23, 2015 · 4 comments
Open

Missing created_at and updated columns in forem_forums table #656

edmondchui opened this issue Apr 23, 2015 · 4 comments
Labels
Milestone

Comments

@edmondchui
Copy link

Is that intentional or oversight? created_at and updated_at exists in forem_categories, forem_topics, forem_posts.

@radar
Copy link
Collaborator

radar commented Apr 24, 2015

add_column :forem_forums, :created_at, :datetime, null: false
add_column :forem_forums, :updated_at, :datetime, null: false

We don't have a need for them in forums (or categories for that matter). So when I created the forums table I probably removed them from there, but didn't do it when I created the categories table.

@edmondchui
Copy link
Author

A possible use case for forem_forums to have timestamp could be when we use key-based caching (with updated_at being part of the cache key).

If there is any new or updated posts, we can touch the belonging topic and in turns the belonging forum. We can then use the timestamp-based cache key to check against the cache.

@radar
Copy link
Collaborator

radar commented Jul 13, 2015

That sounds like a good idea. Please submit a patch to add these keys.

@radar radar added this to the v1.0 milestone Jul 13, 2015
@cjbottaro
Copy link
Contributor

+1 on the key based caching. I recently looked at the source and none of the associations have touch: true on them... so need another PR for that.

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

No branches or pull requests

4 participants