one of the draft patches by @kamils-iRonin introduces SQL views via scenic gem. I think it’s a good step forward now when we finally have a single database, but I would like to bring this to attention to the broader group for discussion.
We do have the NullDB database adapter for running migrations/seeds but as long as this status view is not used it should not be any concern.
I don’t mind, but I’m bit worried we might start overusing views. I believe it should come with a description ideally in developer_docs how to use it and what is a good use case to use them.
Good point. I’m not sure if this is doable in an easy way. If you need some view in the plugin, you have to create a new one and you can use core views in your query.
Which on the other hand means creating a brand new ActiveRecord model which is not ideal. But IIUC this could be just a subclass with overloaded table_name and a new view which costs almost nothing as long as it is not materialized.