File: 20120219165548_create_answers.rb

package info (click to toggle)
ruby-sequenced 3.1.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,884 kB
  • sloc: ruby: 696; makefile: 3
file content (13 lines) | stat: -rw-r--r-- 285 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
class CreateAnswers < ActiveRecord::Migration
  def change
    create_table :answers do |t|
      t.references :question
      t.text :body
      t.integer :sequential_id

      t.timestamps
    end
    add_index :answers, :question_id
    add_index :answers, :sequential_id
  end
end