|
11 | 11 | #
|
12 | 12 | # It's strongly recommended that you check this file into your version control system.
|
13 | 13 |
|
14 |
| -ActiveRecord::Schema.define(version: 20150414113518) do |
| 14 | +ActiveRecord::Schema.define(version: 20151218121134) do |
15 | 15 |
|
16 | 16 | create_table "comments", force: true do |t|
|
17 | 17 | t.integer "post_id", null: false
|
|
80 | 80 | create_table "taggings", force: true do |t|
|
81 | 81 | t.integer "tag_id"
|
82 | 82 | t.integer "taggable_id"
|
| 83 | + t.string "taggable_type", null: false |
| 84 | + t.integer "tagger_id" |
| 85 | + t.string "tagger_type" |
| 86 | + t.string "context", limit: 128 |
83 | 87 | t.datetime "created_at"
|
84 | 88 | end
|
85 | 89 |
|
86 |
| - add_index "taggings", ["tag_id"], name: "index_taggings_on_tag_id" |
87 |
| - add_index "taggings", ["taggable_id"], name: "index_taggings_on_taggable_id_and_taggable_type" |
| 90 | + add_index "taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true, using: :btree |
| 91 | + add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context", using: :btree |
88 | 92 |
|
89 | 93 | create_table "tags", force: true do |t|
|
90 | 94 | t.string "name"
|
91 |
| - t.integer "taggings_count", default: 0, null: false |
| 95 | + t.integer "taggings_count", default: 0 |
92 | 96 | end
|
93 | 97 |
|
94 |
| - add_index "tags", ["name"], name: "index_tags_on_name" |
| 98 | + add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree |
95 | 99 |
|
96 | 100 | create_table "undo_items", force: true do |t|
|
97 | 101 | t.string "type", null: false
|
|
0 commit comments