added pro_users_feed_matview
This commit is contained in:
parent
6d6f2b8562
commit
d5293c2e1d
|
@ -0,0 +1,13 @@
|
|||
class AddProUsersFeedMaterializedView < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
execute <<-SQL
|
||||
CREATE MATERIALIZED VIEW pro_feed_users_matview AS
|
||||
SELECT id
|
||||
FROM accounts
|
||||
WHERE accounts.is_investor=true
|
||||
OR accounts.is_donor=true
|
||||
OR accounts.is_verified=true
|
||||
OR accounts.is_pro=true
|
||||
SQL
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue