Sha256: 4e4ce80feb18befc106f1e86cf4381473ea93ea02ab797e059db844baed2b737

Contents?: true

Size: 519 Bytes

Versions: 41

Compression:

Stored size: 519 Bytes

Contents

class CreateAnswers < ActiveRecord::Migration
  def self.up
    create_table :answers do |t|
      t.integer :user_id, :null => false
      t.integer :question_id, :null => false
      t.text :body
      t.timestamps
      t.datetime :deleted_at
      t.boolean :shared, :default => true, :null => false
      t.string :state
      t.text :item_identifier_list
      t.text :url_list
    end
    add_index :answers, :user_id
    add_index :answers, :question_id
  end

  def self.down
    drop_table :answers
  end
end

Version data entries

41 entries across 41 versions & 1 rubygems

Version Path
enju_question-0.2.0 db/migrate/099_create_answers.rb
enju_question-0.2.0.beta.4 db/migrate/099_create_answers.rb
enju_question-0.2.0.beta.3 db/migrate/099_create_answers.rb
enju_question-0.2.0.beta.2 db/migrate/099_create_answers.rb
enju_question-0.2.0.beta.1 db/migrate/099_create_answers.rb
enju_question-0.1.1 db/migrate/099_create_answers.rb
enju_question-0.1.0 db/migrate/099_create_answers.rb
enju_question-0.1.0.pre15 db/migrate/099_create_answers.rb
enju_question-0.1.0.pre14 db/migrate/099_create_answers.rb
enju_question-0.1.0.pre13 db/migrate/099_create_answers.rb
enju_question-0.1.0.pre12 db/migrate/099_create_answers.rb
enju_question-0.1.0.pre11 db/migrate/099_create_answers.rb
enju_question-0.1.0.pre10 db/migrate/099_create_answers.rb
enju_question-0.1.0.pre9 db/migrate/099_create_answers.rb
enju_question-0.1.0.pre8 db/migrate/099_create_answers.rb
enju_question-0.1.0.pre7 db/migrate/099_create_answers.rb
enju_question-0.1.0.pre6 db/migrate/099_create_answers.rb
enju_question-0.1.0.pre5 db/migrate/099_create_answers.rb
enju_question-0.1.0.pre4 db/migrate/099_create_answers.rb
enju_question-0.1.0.pre3 db/migrate/099_create_answers.rb