Sha256: 2ef6b86c2d0f3f628f067cc885d5427c9606efe024f4b27a7de697d90a299959

Contents?: true

Size: 412 Bytes

Versions: 11

Compression:

Stored size: 412 Bytes

Contents

class AddHouseholds < ActiveRecord::Migration
  def up
    create_table :households do |t|
      t.string :name
      t.references :organization
      t.timestamps
    end

    add_column :people, :household_id, :integer
    add_column :addresses, :household_id, :integer
  end

  def down
    remove_column :addresses, :household_id
    remove_column :people, :household_id
    drop_table :households
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
artfully_ose-1.3.0.pre4 db/migrate/20131015151550_add_households.rb
artfully_ose-1.3.0.pre3 db/migrate/20131015151550_add_households.rb
artfully_ose-1.3.0.pre2 db/migrate/20131015151550_add_households.rb
artfully_ose-1.3.0.pre1 db/migrate/20131015151550_add_households.rb
artfully_ose-1.2.0 db/migrate/20131015151550_add_households.rb
artfully_ose-1.2.0.beta.1 db/migrate/20131015151550_add_households.rb
artfully_ose-1.2.0.alpha.2 db/migrate/20131015151550_add_households.rb
artfully_ose-1.2.0.alpha.1 db/migrate/20131015151550_add_households.rb
artfully_ose-1.2.0.pre.27 db/migrate/20131015151550_add_households.rb
artfully_ose-1.2.0.pre.26 db/migrate/20131015151550_add_households.rb
artfully_ose-1.2.0.pre.24 db/migrate/20131015151550_add_households.rb