From 1b15e08a976252ae9df9ad2817f4e08717910033 Mon Sep 17 00:00:00 2001 From: HuJiaxuan Date: Tue, 27 Dec 2016 11:11:44 +0000 Subject: [PATCH] define controllers --- db/migrate/20161227104629_add_type_to_notes.rb | 5 +++++ db/schema.rb | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20161227104629_add_type_to_notes.rb diff --git a/db/migrate/20161227104629_add_type_to_notes.rb b/db/migrate/20161227104629_add_type_to_notes.rb new file mode 100644 index 0000000..dc744ed --- /dev/null +++ b/db/migrate/20161227104629_add_type_to_notes.rb @@ -0,0 +1,5 @@ +class AddTypeToNotes < ActiveRecord::Migration + def change + add_column :notes, :type, :integer + end +end diff --git a/db/schema.rb b/db/schema.rb index df4b582..7a740bc 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20161226023254) do +ActiveRecord::Schema.define(version: 20161227104629) do create_table "comments", force: :cascade do |t| t.text "content" @@ -42,6 +42,7 @@ ActiveRecord::Schema.define(version: 20161226023254) do t.integer "user_id" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.integer "type" end add_index "notes", ["user_id"], name: "index_notes_on_user_id"