cirandas.net

ref: master

db/migrate/20150429145001_add_mirror_to_block.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
class AddMirrorToBlock < ActiveRecord::Migration
  def up
    change_table :blocks do |t|
      t.boolean :mirror, :default => false
      t.references :mirror_block
      t.references :observers
    end
  end

  def down
    remove_column :blocks, :mirror
    remove_column :blocks, :mirror_block_id
    remove_column :blocks, :observers_id
  end
end