File: 20110710143903_initial_tables.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 (23 lines) | stat: -rw-r--r-- 410 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
class InitialTables < ActiveRecord::Migration
  def self.up
    create_table :projects do |t|
      t.string :name
    end

    create_table :tasks do |t|
      t.integer :project_id
      t.string :name
    end

    create_table :milestones do |t|
      t.integer :task_id
      t.string :name
    end
  end

  def self.down
    drop_table :projects
    drop_table :tasks
    drop_table :milestones
  end
end