Sha256: 489ac9633baee8bfa06f524cc4172569e516b3bafee97373a1a35e84664fec73

Contents?: true

Size: 339 Bytes

Versions: 108

Compression:

Stored size: 339 Bytes

Contents

class SetupHitsCountCache < ActiveRecord::Migration[5.0]
  def up
    ActiveRecord::Base.connection.execute <<-SQL.squish
    UPDATE insights_facets
    SET hits_count = (SELECT count(1)
                              FROM insights_hits
                              WHERE insights_hits.host_id = insights_facets.host_id)
    SQL
  end
end

Version data entries

108 entries across 108 versions & 1 rubygems

Version Path
foreman_rh_cloud-11.2.0 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-9.0.60 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-10.0.4 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-11.1.0 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-10.0.3 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-11.0.3 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-9.0.59 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-11.0.2 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-11.0.1 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-11.0.0 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-9.0.58 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-10.0.2 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-9.0.57 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-10.0.1 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-9.0.56 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-9.0.55 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-9.0.54 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-9.0.53 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-9.0.52 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb
foreman_rh_cloud-8.0.52 db/migrate/20201007121540_setup_hits_count_cache.foreman_rh_cloud.rb