Sha256: 6f6abf6ee4a84e9b2598fc94a3edf416f39da9c48aa2d1c43bbef3efcfba48f4

Contents?: true

Size: 386 Bytes

Versions: 4

Compression:

Stored size: 386 Bytes

Contents

class MigrateEnvironments < ActiveRecord::Migration[6.0]
  class FakeTrend < ApplicationRecord
    self.table_name = 'trends'
  end

  def up
    FakeTrend.where(trendable_type: 'Environment').update_all(trendable_type: 'ForemanPuppet::Environment')
  end

  def down
    FakeTrend.where(trendable_type: 'ForemanPuppet::Environment').update_all(trendable_type: 'Environment')
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
foreman_statistics-2.1.0 db/migrate/20210523143005_migrate_environments.rb
foreman_statistics-2.0.1 db/migrate/20210523143005_migrate_environments.rb
foreman_statistics-2.0.0 db/migrate/20210523143005_migrate_environments.rb
foreman_statistics-1.2.0 db/migrate/20210523143005_migrate_environments.rb