add user_id to comments

This commit is contained in:
alan snape 2016-12-28 06:22:55 +00:00
parent fd9f43d7d9
commit e2bf712558
2 changed files with 7 additions and 1 deletions

View File

@ -0,0 +1,5 @@
class AddUserIdToComments < ActiveRecord::Migration
def change
add_column :comments, :user_id, :integer
end
end

View File

@ -11,13 +11,14 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20161228052102) do
ActiveRecord::Schema.define(version: 20161228062119) do
create_table "comments", force: :cascade do |t|
t.text "content"
t.integer "mission_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "user_id"
end
add_index "comments", ["mission_id"], name: "index_comments_on_mission_id"