summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/frontend.gitlab-ci.yml2
-rw-r--r--.gitlab/ci/global.gitlab-ci.yml6
-rw-r--r--.ruby-version2
-rw-r--r--changelogs/unreleased/sh-update-foreign-key-personal-access-tokens.yml5
-rw-r--r--db/migrate/20191227140254_update_personal_access_tokens_user_id_foreign_key.rb20
-rw-r--r--db/schema.rb2
-rw-r--r--doc/user/project/clusters/serverless/aws.md1
8 files changed, 32 insertions, 8 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index f59e8759e6d..ba0bc3b8c3e 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,4 +1,4 @@
-image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.3-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-postgresql-9.6-graphicsmagick-1.3.33"
+image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-postgresql-9.6-graphicsmagick-1.3.33"
stages:
- sync
diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml
index f8811fc57ed..9bdeb4d9b00 100644
--- a/.gitlab/ci/frontend.gitlab-ci.yml
+++ b/.gitlab/ci/frontend.gitlab-ci.yml
@@ -13,7 +13,7 @@
- .default-before_script
- .assets-compile-cache
- .only:changes-code-backstage-qa
- image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.3-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-graphicsmagick-1.3.33-docker-19.03.1
+ image: registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-graphicsmagick-1.3.33-docker-19.03.1
stage: prepare
services:
- docker:19.03.0-dind
diff --git a/.gitlab/ci/global.gitlab-ci.yml b/.gitlab/ci/global.gitlab-ci.yml
index 9ebd28c7258..0673cce0e2e 100644
--- a/.gitlab/ci/global.gitlab-ci.yml
+++ b/.gitlab/ci/global.gitlab-ci.yml
@@ -22,7 +22,7 @@
# Jobs that only need to pull cache
.default-cache:
cache:
- key: "debian-stretch-ruby-2.6.3-node-12.x"
+ key: "debian-stretch-ruby-2.6.5-node-12.x"
paths:
- .go/pkg/mod
- vendor/ruby
@@ -202,7 +202,7 @@
- name: redis:alpine
.use-pg10:
- image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.3-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-postgresql-10-graphicsmagick-1.3.33"
+ image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-postgresql-10-graphicsmagick-1.3.33"
services:
- name: postgres:10.9
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
@@ -216,7 +216,7 @@
- name: elasticsearch:5.6.12
.use-pg10-ee:
- image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.3-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-postgresql-10-graphicsmagick-1.3.33"
+ image: "registry.gitlab.com/gitlab-org/gitlab-build-images:ruby-2.6.5-golang-1.12-git-2.24-lfs-2.9-chrome-73.0-node-12.x-yarn-1.16-postgresql-10-graphicsmagick-1.3.33"
services:
- name: postgres:10.9
command: ["postgres", "-c", "fsync=off", "-c", "synchronous_commit=off", "-c", "full_page_writes=off"]
diff --git a/.ruby-version b/.ruby-version
index ec1cf33c3f6..57cf282ebbc 100644
--- a/.ruby-version
+++ b/.ruby-version
@@ -1 +1 @@
-2.6.3
+2.6.5
diff --git a/changelogs/unreleased/sh-update-foreign-key-personal-access-tokens.yml b/changelogs/unreleased/sh-update-foreign-key-personal-access-tokens.yml
new file mode 100644
index 00000000000..d9a339cd867
--- /dev/null
+++ b/changelogs/unreleased/sh-update-foreign-key-personal-access-tokens.yml
@@ -0,0 +1,5 @@
+---
+title: Update foreign key constraint for personal access tokens
+merge_request: 22305
+author:
+type: fixed
diff --git a/db/migrate/20191227140254_update_personal_access_tokens_user_id_foreign_key.rb b/db/migrate/20191227140254_update_personal_access_tokens_user_id_foreign_key.rb
new file mode 100644
index 00000000000..fbf17b28274
--- /dev/null
+++ b/db/migrate/20191227140254_update_personal_access_tokens_user_id_foreign_key.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+class UpdatePersonalAccessTokensUserIdForeignKey < ActiveRecord::Migration[5.2]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+ CONSTRAINT_NAME = 'fk_personal_access_tokens_user_id'
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_foreign_key(:personal_access_tokens, :users, column: :user_id, on_delete: :cascade, name: CONSTRAINT_NAME)
+ remove_foreign_key_if_exists(:personal_access_tokens, column: :user_id, on_delete: nil)
+ end
+
+ def down
+ add_concurrent_foreign_key(:personal_access_tokens, :users, column: :user_id, on_delete: nil)
+ remove_foreign_key_if_exists(:personal_access_tokens, column: :user_id, on_delete: :cascade, name: CONSTRAINT_NAME)
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 2f9c5fa8f5a..5a877870e6c 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -4687,7 +4687,7 @@ ActiveRecord::Schema.define(version: 2019_12_29_140154) do
add_foreign_key "pages_domains", "projects", name: "fk_ea2f6dfc6f", on_delete: :cascade
add_foreign_key "path_locks", "projects", name: "fk_5265c98f24", on_delete: :cascade
add_foreign_key "path_locks", "users"
- add_foreign_key "personal_access_tokens", "users"
+ add_foreign_key "personal_access_tokens", "users", name: "fk_personal_access_tokens_user_id", on_delete: :cascade
add_foreign_key "plan_limits", "plans", on_delete: :cascade
add_foreign_key "pool_repositories", "projects", column: "source_project_id", on_delete: :nullify
add_foreign_key "pool_repositories", "shards", on_delete: :restrict
diff --git a/doc/user/project/clusters/serverless/aws.md b/doc/user/project/clusters/serverless/aws.md
index 0b74f1e73eb..220ce2593bb 100644
--- a/doc/user/project/clusters/serverless/aws.md
+++ b/doc/user/project/clusters/serverless/aws.md
@@ -121,7 +121,6 @@ This example code does the following:
- Installs the Serverless Framework.
- Deploys the serverless function to your AWS account using the AWS credentials
defined above.
- - Deploys the serverless function to your AWS account using the AWS credentials defined above
### Setting up your AWS credentials with your GitLab account