Sha256: 0e6fa6a95369d9e875c902b423bbf25147c6db60010af487eb0e3f99c4c37cd4
Contents?: true
Size: 782 Bytes
Versions: 16
Compression:
Stored size: 782 Bytes
Contents
class ChangePoolColumnsToDates < ActiveRecord::Migration 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
16 entries across 16 versions & 1 rubygems