Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Léo-Paul Géneau
gitlab-ce
Commits
d2b53bd7
Commit
d2b53bd7
authored
Mar 20, 2020
by
GitLab Bot
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add latest changes from gitlab-org/gitlab@master
parent
b060b8b7
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
289 additions
and
4 deletions
+289
-4
changelogs/unreleased/sh-add-index-unlock-token.yml
changelogs/unreleased/sh-add-index-unlock-token.yml
+5
-0
db/migrate/20200319203901_add_index_on_users_unlock_token.rb
db/migrate/20200319203901_add_index_on_users_unlock_token.rb
+18
-0
db/schema.rb
db/schema.rb
+2
-1
doc/topics/autodevops/index.md
doc/topics/autodevops/index.md
+25
-3
doc/topics/autodevops/upgrading_postgresql.md
doc/topics/autodevops/upgrading_postgresql.md
+239
-0
No files found.
changelogs/unreleased/sh-add-index-unlock-token.yml
0 → 100644
View file @
d2b53bd7
---
title
:
Add index on users.unlock_token
merge_request
:
276298
author
:
type
:
performance
db/migrate/20200319203901_add_index_on_users_unlock_token.rb
0 → 100644
View file @
d2b53bd7
# frozen_string_literal: true
class
AddIndexOnUsersUnlockToken
<
ActiveRecord
::
Migration
[
6.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
INDEX_NAME
=
'index_users_on_unlock_token'
disable_ddl_transaction!
def
up
add_concurrent_index
:users
,
:unlock_token
,
unique:
true
,
name:
INDEX_NAME
end
def
down
remove_concurrent_index
:users
,
:unlock_token
,
unique:
true
,
name:
INDEX_NAME
end
end
db/schema.rb
View file @
d2b53bd7
...
...
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2020_03_1
8_152134
)
do
ActiveRecord
::
Schema
.
define
(
version:
2020_03_1
9_203901
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"pg_trgm"
...
...
@@ -4441,6 +4441,7 @@ ActiveRecord::Schema.define(version: 2020_03_18_152134) do
t
.
index
[
"state"
],
name:
"index_users_on_state"
t
.
index
[
"static_object_token"
],
name:
"index_users_on_static_object_token"
,
unique:
true
t
.
index
[
"unconfirmed_email"
],
name:
"index_users_on_unconfirmed_email"
,
where:
"(unconfirmed_email IS NOT NULL)"
t
.
index
[
"unlock_token"
],
name:
"index_users_on_unlock_token"
,
unique:
true
t
.
index
[
"user_type"
],
name:
"index_users_on_user_type"
t
.
index
[
"username"
],
name:
"index_users_on_username"
t
.
index
[
"username"
],
name:
"index_users_on_username_trigram"
,
opclass: :gin_trgm_ops
,
using: :gin
...
...
doc/topics/autodevops/index.md
View file @
d2b53bd7
...
...
@@ -666,9 +666,10 @@ To use Auto Deploy on a Kubernetes 1.16+ cluster, you must:
This will opt-in to using a version of the PostgreSQL chart that supports Kubernetes
1.
16 and higher.
DANGER:
**Danger:**
Opting into
`AUTO_DEVOPS_POSTGRES_CHANNEL`
version
`2`
will delete
the version
`1`
PostgreSQL database. Please backup the contents of the PostgreSQL database
first before opting into version
`2`
, so that you can restore into the version
`2`
database.
DANGER:
**Danger:**
Opting into
`AUTO_DEVOPS_POSTGRES_CHANNEL`
version
`2`
will delete the version
`1`
PostgreSQL database. Please follow the
guide on
[
upgrading PostgreSQL
](
upgrading_postgresql.md
)
to backup and
restore your database before opting into version
`2`
.
#### Migrations
...
...
@@ -1100,6 +1101,27 @@ the database are preconfigured, but can be customized by setting the associated
postgres://user:password@postgres-host:postgres-port/postgres-database
```
#### Upgrading PostgresSQL
CAUTION:
**Deprecation**
The variable
`AUTO_DEVOPS_POSTGRES_CHANNEL`
that controls default provisioned
PostgreSQL currently defaults to
`1`
. This is scheduled to change to
`2`
in
[
GitLab 13.0
](
https://gitlab.com/gitlab-org/gitlab/-/issues/210499
)
.
The version of the chart used to provision PostgreSQL:
-
Is 0.7.1 in GitLab 12.8 and earlier.
-
Can be set to from 0.7.1 to 8.2.1 in GitLab 12.9 and later.
GitLab encourages users to
[
migrate their database
](
upgrading_postgresql.md
)
to the newer PostgreSQL.
To use the new PostgreSQL:
-
New projects can set the
`AUTO_DEVOPS_POSTGRES_CHANNEL`
variable to
`2`
.
-
Old projects can be upgraded by following the guide to
[
upgrading PostgresSQL
](
upgrading_postgresql.md
)
.
#### Using external PostgreSQL database providers
While Auto DevOps provides out-of-the-box support for a PostgreSQL container for
...
...
doc/topics/autodevops/upgrading_postgresql.md
0 → 100644
View file @
d2b53bd7
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment