Class: QuestionableMigration
- Inherits:
-
ActiveRecord::Migration
- Object
- ActiveRecord::Migration
- QuestionableMigration
- Defined in:
- lib/templates/questionable_migration.rb
Instance Method Summary collapse
Instance Method Details
#change ⇒ Object
2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/templates/questionable_migration.rb', line 2 def change create_table :questions do |t| t.integer :questionable_id t.string :questionable_type t.string :subject t. end create_table :answers do |t| t.integer :question_id t.string :text t. end end |