cirandas.net

ref: master

db/migrate/048_add_custom_header_and_footer_to_profile.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
class AddCustomHeaderAndFooterToProfile < ActiveRecord::Migration

  TABLES = [ :profiles, :environments ]

  def self.up
    TABLES.each do |item|
      add_column item, :custom_header, :text
      add_column item, :custom_footer, :text
    end
  end

  def self.down
    TABLES.each do |item|
      remove_column item, :custom_header
      remove_column item, :custom_footer
    end
  end
end