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

Rollup table per model. #17

Closed
phlegx opened this issue Apr 9, 2024 · 1 comment
Closed

Rollup table per model. #17

phlegx opened this issue Apr 9, 2024 · 1 comment

Comments

@phlegx
Copy link

phlegx commented Apr 9, 2024

I wonder if there is a way to have different tables instead of store all rollups to one single table?

E.g.:

  • User rollups to table user_rollups
  • Order rollups to table order_rollups
  • etc.

like other gems do (mobility, statesman, closure_tree):

  • mobility: product_translations
  • statesman: user_transitions
  • closure_tree: organization_hierarchies
class User < ApplicationRecord
  self.rollup_table = :user_rollups
end

User::Rollup.series("New users", interval: "week")

Nice gem @ankane, congratulations!

@ankane
Copy link
Owner

ankane commented Apr 12, 2024

Hi @phlegx, you could try forking and adding, but it's not something I'd like to support (don't want the additional complexity).

@ankane ankane closed this as completed Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants