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
Boxiang Sun
gitlab-ce
Commits
03f4ad43
Commit
03f4ad43
authored
Nov 29, 2018
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add encrypted token field to ci_builds table
parent
14db2a42
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
1 deletion
+31
-1
db/migrate/20181129104854_add_token_encrypted_to_ci_builds.rb
...igrate/20181129104854_add_token_encrypted_to_ci_builds.rb
+11
-0
db/migrate/20181129104944_add_index_to_ci_builds_token_encrypted.rb
.../20181129104944_add_index_to_ci_builds_token_encrypted.rb
+17
-0
db/schema.rb
db/schema.rb
+3
-1
No files found.
db/migrate/20181129104854_add_token_encrypted_to_ci_builds.rb
0 → 100644
View file @
03f4ad43
# frozen_string_literal: true
class
AddTokenEncryptedToCiBuilds
<
ActiveRecord
::
Migration
[
5.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
def
change
add_column
:ci_builds
,
:token_encrypted
,
:string
end
end
db/migrate/20181129104944_add_index_to_ci_builds_token_encrypted.rb
0 → 100644
View file @
03f4ad43
# frozen_string_literal: true
class
AddIndexToCiBuildsTokenEncrypted
<
ActiveRecord
::
Migration
[
5.0
]
include
Gitlab
::
Database
::
MigrationHelpers
DOWNTIME
=
false
disable_ddl_transaction!
def
up
add_concurrent_index
:ci_builds
,
:token_encrypted
,
unique:
true
end
def
down
remove_concurrent_index
:ci_builds
,
:token_encrypted
end
end
db/schema.rb
View file @
03f4ad43
...
...
@@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord
::
Schema
.
define
(
version:
2018112
6153547
)
do
ActiveRecord
::
Schema
.
define
(
version:
2018112
9104944
)
do
# These are extensions that must be enabled in order to support this database
enable_extension
"plpgsql"
...
...
@@ -345,6 +345,7 @@ ActiveRecord::Schema.define(version: 20181126153547) do
t
.
boolean
"protected"
t
.
integer
"failure_reason"
t
.
datetime_with_timezone
"scheduled_at"
t
.
string
"token_encrypted"
t
.
index
[
"artifacts_expire_at"
],
name:
"index_ci_builds_on_artifacts_expire_at"
,
where:
"(artifacts_file <> ''::text)"
,
using: :btree
t
.
index
[
"auto_canceled_by_id"
],
name:
"index_ci_builds_on_auto_canceled_by_id"
,
using: :btree
t
.
index
[
"commit_id"
,
"stage_idx"
,
"created_at"
],
name:
"index_ci_builds_on_commit_id_and_stage_idx_and_created_at"
,
using: :btree
...
...
@@ -360,6 +361,7 @@ ActiveRecord::Schema.define(version: 20181126153547) do
t
.
index
[
"stage_id"
],
name:
"index_ci_builds_on_stage_id"
,
using: :btree
t
.
index
[
"status"
,
"type"
,
"runner_id"
],
name:
"index_ci_builds_on_status_and_type_and_runner_id"
,
using: :btree
t
.
index
[
"token"
],
name:
"index_ci_builds_on_token"
,
unique:
true
,
using: :btree
t
.
index
[
"token_encrypted"
],
name:
"index_ci_builds_on_token_encrypted"
,
unique:
true
,
using: :btree
t
.
index
[
"updated_at"
],
name:
"index_ci_builds_on_updated_at"
,
using: :btree
t
.
index
[
"user_id"
],
name:
"index_ci_builds_on_user_id"
,
using: :btree
end
...
...
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