Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class CreateQuestions < ActiveRecord::Migration[5.2]
- def change
- create_table :questions do |t|
- t.string :title
- t.references :survey, foreign_key: true
- t.timestamps
- end
- end
- end
- class CreateAnswers < ActiveRecord::Migration[5.2]
- def change
- create_table :answers do |t|
- t.string :response
- t.references :question, foreign_key: true
- t.timestamps
- end
- end
- end
Add Comment
Please, Sign In to add comment