cirandas.net

ref: master

db/migrate/067_add_is_default_to_domains.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
class AddIsDefaultToDomains < ActiveRecord::Migration
  def self.up
    add_column :domains, :is_default, :boolean, :default => false
    execute('update domains set is_default = (1<0)') # set all to false
  end

  def self.down
    remove_column :domains, :is_default
  end
end