Update 20200710130615_add_pro_users_feed_materialized_view.rb

This commit is contained in:
admin 2020-07-10 13:38:10 +00:00
parent d5293c2e1d
commit 02c71b8af9
1 changed files with 11 additions and 9 deletions

View File

@ -1,5 +1,6 @@
class AddProUsersFeedMaterializedView < ActiveRecord::Migration[5.2] class AddProUsersFeedMaterializedView < ActiveRecord::Migration[5.2]
def change def change
safety_assured {
execute <<-SQL execute <<-SQL
CREATE MATERIALIZED VIEW pro_feed_users_matview AS CREATE MATERIALIZED VIEW pro_feed_users_matview AS
SELECT id SELECT id
@ -9,5 +10,6 @@ class AddProUsersFeedMaterializedView < ActiveRecord::Migration[5.2]
OR accounts.is_verified=true OR accounts.is_verified=true
OR accounts.is_pro=true OR accounts.is_pro=true
SQL SQL
}
end end
end end