Sha256: a9d0c30876aa1c431595ff526502194de4032fbde777d96db52b593c83761c03
Contents?: true
Size: 527 Bytes
Versions: 103
Compression:
Stored size: 527 Bytes
Contents
class AddSiteToSpotlightExhibits < ActiveRecord::Migration[4.2] def up add_column :spotlight_exhibits, :site_id, :integer add_index :spotlight_exhibits, :site_id add_default_site_to_exhibits end def down remove_column :spotlight_exhibits, :site_id, :integer end private def add_default_site_to_exhibits Spotlight::Site.reset_column_information Spotlight::Exhibit.reset_column_information Spotlight::Exhibit.find_each do |e| e.site = Spotlight::Site.instance end end end
Version data entries
103 entries across 103 versions & 1 rubygems