Sha256: 0910a7b25556d7eace8f8559697e5ff7569f273f68258194cb55cc549ced85d4

Contents?: true

Size: 396 Bytes

Versions: 6

Compression:

Stored size: 396 Bytes

Contents

class RemoveDefaultFromSpotlightExhibit < ActiveRecord::Migration
  def up
    return unless Spotlight::Exhibit.column_names.include? :default

    remove_column :spotlight_exhibits, :default
    remove_index :spotlight_exhibits, :default
  end
  
  def down
    add_column :spotlight_exhibits, :default, :boolean, default: true
    add_index :spotlight_exhibits, :default, unique: true
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
blacklight-spotlight-0.10.2 db/migrate/20151124101123_remove_default_from_spotlight_exhibit.rb
blacklight-spotlight-0.10.1 db/migrate/20151124101123_remove_default_from_spotlight_exhibit.rb
blacklight-spotlight-0.10.0 db/migrate/20151124101123_remove_default_from_spotlight_exhibit.rb
blacklight-spotlight-0.9.2 db/migrate/20151124101123_remove_default_from_spotlight_exhibit.rb
blacklight-spotlight-0.9.1 db/migrate/20151124101123_remove_default_from_spotlight_exhibit.rb
blacklight-spotlight-0.9.0 db/migrate/20151124101123_remove_default_from_spotlight_exhibit.rb