Sha256: 4a4869728e5ac9d8fe548e23f907e99dffd641f6b94ed9ee74f9e6b47765f804

Contents?: true

Size: 787 Bytes

Versions: 195

Compression:

Stored size: 787 Bytes

Contents

class ChangePoolColumnsToDates < ActiveRecord::Migration[4.2]
  def up
    unless connection.adapter_name.downcase.include?('sqlite')
      change_column(:katello_pools, :start_date, 'timestamp USING CAST(start_date AS timestamp without time zone)')
      change_column(:katello_pools, :end_date, 'timestamp USING CAST(end_date AS timestamp without time zone)')
    end
    add_index(:katello_pools, :start_date)
    add_index(:katello_pools, :end_date)
  end

  def down
    unless connection.adapter_name.downcase.include?('sqlite')
      change_column(:katello_pools, :start_date, :string, :limit => 255)
      change_column(:katello_pools, :end_date, :string, :limit => 255)
    end
    remove_index(:katello_pools, :start_date)
    remove_index(:katello_pools, :end_date)
  end
end

Version data entries

195 entries across 195 versions & 1 rubygems

Version Path
katello-4.14.2 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.15.0 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.15.0.rc2 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.15.0.rc1 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.14.1 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.14.0 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.14.0.rc3 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.14.0.rc2 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.14.0.rc1.1 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.14.0.rc1 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.13.1 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.13.0 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.12.1 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.13.0.rc1 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.12.0 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.12.0.rc3 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.12.0.rc2 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.12.0.rc1 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.11.1 db/migrate/20170222131211_change_pool_columns_to_dates.rb
katello-4.11.0 db/migrate/20170222131211_change_pool_columns_to_dates.rb