Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2017-08-20 13:28:25 +0300
committerStan Hu <stanhu@gmail.com>2017-08-20 13:32:31 +0300
commit718ecd4eb5976d1005664dfbd84ee9d9c263e3b9 (patch)
treeed2d68be41c22e1886df34920d1195374ae33984 /db/schema.rb
parent84336b848caec71b9c2af2d826cf81e6a258f6e2 (diff)
Fix Error 500s when attempting to destroy a protected tag
Due to a missing `on_delete: :cascade`, users would hit the error that looked like: ``` PG::ForeignKeyViolation: ERROR: update or delete on table "protected_tags" violates foreign key constraint "fk_rails_f7dfda8c51" on table "protected_tag_create_access_levels" DETAIL: Key (id)=(1385) is still referenced from table "protected_tag_create_access_levels". : DELETE FROM "protected_tags" WHERE "protected_tags"."id" = 1385 ``` Closes #36013
Diffstat (limited to 'db/schema.rb')
-rw-r--r--db/schema.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/schema.rb b/db/schema.rb
index 2ea6ae29dc7..80f8cde1818 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: 20170815060945) do
+ActiveRecord::Schema.define(version: 20170820100558) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -1726,7 +1726,7 @@ ActiveRecord::Schema.define(version: 20170815060945) do
add_foreign_key "protected_branch_push_access_levels", "protected_branches", name: "fk_9ffc86a3d9", on_delete: :cascade
add_foreign_key "protected_branches", "projects", name: "fk_7a9c6d93e7", on_delete: :cascade
add_foreign_key "protected_tag_create_access_levels", "namespaces", column: "group_id"
- add_foreign_key "protected_tag_create_access_levels", "protected_tags"
+ add_foreign_key "protected_tag_create_access_levels", "protected_tags", name: "fk_f7dfda8c51", on_delete: :cascade
add_foreign_key "protected_tag_create_access_levels", "users"
add_foreign_key "protected_tags", "projects", name: "fk_8e4af87648", on_delete: :cascade
add_foreign_key "push_event_payloads", "events_for_migration", column: "event_id", name: "fk_36c74129da", on_delete: :cascade