You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
One of our models is connecting to a warehouse DB since it's for reporting and not to serve the app features.
That model is based on a materialized view.
When refreshing, we currently can't use Scenic.database to connect to the database because it defaults to the main DB (it seems).
It's not a major issue since we can simply use the connection from the model, but I am wondering if scenic supports this and I am missing something or if it doesn't.
# In one of my modelsdefself.refreshScenic.database.refresh_materialized_view(table_name,concurrently: false,cascade: false)end
Instead we have to do this workaround which works fine, but I wonder if there is a better way?
This is probably something we need to look into as Scenic dates back to before multiple database support was properly added to Rails. What you have is fine, but I think in our own fix for this we'd want to keep the SQL abstracted from this point. I wonder if it would make more sense for us to inject the model's connection.
One of our models is connecting to a warehouse DB since it's for reporting and not to serve the app features.
That model is based on a materialized view.
When refreshing, we currently can't use
Scenic.database
to connect to the database because it defaults to the main DB (it seems).It's not a major issue since we can simply use the connection from the model, but I am wondering if scenic supports this and I am missing something or if it doesn't.
Instead we have to do this workaround which works fine, but I wonder if there is a better way?
The text was updated successfully, but these errors were encountered: