Fix duplicate featured tags (#19403)

* Fix duplicate featured tags

* Add unique tag name validator

* Fix error message
This commit is contained in:
Takeshi Umeda
2022-10-22 21:30:59 +09:00
committed by GitHub
parent 1d34eff63f
commit 53e86747e4
3 changed files with 22 additions and 2 deletions

View File

@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 2022_10_12_181003) do
ActiveRecord::Schema.define(version: 2022_10_21_055441) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -442,7 +442,7 @@ ActiveRecord::Schema.define(version: 2022_10_12_181003) do
t.datetime "last_status_at"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["account_id"], name: "index_featured_tags_on_account_id"
t.index ["account_id", "tag_id"], name: "index_featured_tags_on_account_id_and_tag_id", unique: true
t.index ["tag_id"], name: "index_featured_tags_on_tag_id"
end