File: 20130203095901_create_company.rb

package info (click to toggle)
ruby-nested-form 0.3.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 816 kB
  • sloc: javascript: 11,625; ruby: 659; makefile: 2
file content (14 lines) | stat: -rw-r--r-- 273 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
class CreateCompany < ActiveRecord::Migration
  def self.up
    create_table :companies do |t|
      t.string :name
    end

    add_column :projects, :company_id, :integer
  end

  def self.down
    remove_column :projects, :company_id
    drop_table :companies
  end
end