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