Sha256: 36c52c2bb8b1e411ebbe5ba02b0094fb5b06ae39086e9ae1952994ea4f5b891b
Contents?: true
Size: 676 Bytes
Versions: 11
Compression:
Stored size: 676 Bytes
Contents
class AddInMenuToSection < ActiveRecord::Migration def self.up unless columns(:website_sections).collect {|c| c.name}.include?('in_menu') add_column :website_sections, :in_menu, :boolean end unless columns(:website_section_versions).collect {|c| c.name}.include?('in_menu') add_column :website_section_versions, :in_menu, :boolean end end def self.down if columns(:website_sections).collect {|c| c.name}.include?('in_menu') remove_column :website_sections, :in_menu end if columns(:website_section_versions).collect {|c| c.name}.include?('in_menu') remove_column :website_section_versions, :in_menu end end end
Version data entries
11 entries across 11 versions & 1 rubygems