Sha256: 2df972d358bdb8eb4a8e341692f5b43409446c838aa98ad37c1af2252450f031
Contents?: true
Size: 653 Bytes
Versions: 9
Compression:
Stored size: 653 Bytes
Contents
class MigrateCoreTypes < ActiveRecord::Migration[6.0] class FakeTrend < ApplicationRecord self.table_name = 'trends' end def up Permission.where(:resource_type => 'Trend').update_all(:resource_type => 'ForemanStatistics::Trend') %w[ForemanTrend FactTrend Trend].each do |t| FakeTrend.where(:type => t).update_all(:type => "ForemanStatistics::#{t}") end end def down Permission.where(:resource_type => 'ForemanStatistics::Trend').update_all(:resource_type => 'Trend') %w[ForemanTrend FactTrend Trend].each do |t| FakeTrend.where(:type => "ForemanStatistics::#{t}").update_all(:type => t) end end end
Version data entries
9 entries across 9 versions & 1 rubygems