diff options
author | Douwe Maan <douwe@gitlab.com> | 2015-04-30 20:20:36 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2015-04-30 20:20:36 +0300 |
commit | 2f4426b7e4830f4ec9c318c944c0b53c8af261ab (patch) | |
tree | 7faf9b670bdbadc7137e5b856db27ce83f12906e /db/schema.rb | |
parent | f2cf6d75ecc6082897543f976e8e4bee7ac24e90 (diff) | |
parent | 44afcd2019d3c1c77c91f24a08e657331568c39f (diff) |
Merge branch 'fix-project-tags' into 'master'
Fix DB error when trying to tag a repository
Steps to reproduce: Go to a project settings, add tags, click on save changes
Observed behavior: Error 500
```
PG::Error: ERROR: column "taggings_count" does not exist
LINE 1: UPDATE "tags" SET "taggings_count" = COALESCE("taggings_coun...
```
Ran `rake acts_as_taggable_on_engine:install:migrations`, removed the first
migration that created the `tags` and `taggings` table, and added the rest.
* Closes #1512
* Closes #1550
* Closes https://github.com/gitlabhq/gitlabhq/issues/6867
* Closes https://github.com/gitlabhq/gitlabhq/issues/9194
See merge request !577
Diffstat (limited to 'db/schema.rb')
-rw-r--r-- | db/schema.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/db/schema.rb b/db/schema.rb index a2ed9efc933..02882186fc8 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -433,13 +433,16 @@ ActiveRecord::Schema.define(version: 20150429002313) do t.datetime "created_at" end - add_index "taggings", ["tag_id"], name: "index_taggings_on_tag_id", using: :btree + add_index "taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "taggings_idx", unique: true, using: :btree add_index "taggings", ["taggable_id", "taggable_type", "context"], name: "index_taggings_on_taggable_id_and_taggable_type_and_context", using: :btree create_table "tags", force: true do |t| - t.string "name" + t.string "name" + t.integer "taggings_count", default: 0 end + add_index "tags", ["name"], name: "index_tags_on_name", unique: true, using: :btree + create_table "users", force: true do |t| t.string "email", default: "", null: false t.string "encrypted_password", default: "", null: false |