BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
703b39d4
Commit
703b39d4
authored
Sep 04, 2017
by
Alexis Reigel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
truncate gpg signature instead of destroy
parent
c4bb09bd
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
21 deletions
+2
-21
20170817123339_add_verification_status_to_gpg_signatures.rb
...170817123339_add_verification_status_to_gpg_signatures.rb
+1
-9
20170830084744_destroy_gpg_signatures.rb
db/post_migrate/20170830084744_destroy_gpg_signatures.rb
+1
-12
No files found.
db/migrate/20170817123339_add_verification_status_to_gpg_signatures.rb
View file @
703b39d4
...
...
@@ -4,20 +4,12 @@ class AddVerificationStatusToGpgSignatures < ActiveRecord::Migration
include
Gitlab
::
Database
::
MigrationHelpers
disable_ddl_transaction!
class
GpgSignature
<
ActiveRecord
::
Base
self
.
table_name
=
'gpg_signatures'
include
EachBatch
end
def
up
# First we remove all signatures because we need to re-verify them all
# again anyway (because of the updated verification logic).
#
# This makes adding the column with default values faster
GpgSignature
.
each_batch
do
|
relation
|
relation
.
delete_all
end
truncate
(
:gpg_signatures
)
add_column_with_default
(
:gpg_signatures
,
:verification_status
,
:smallint
,
default:
0
)
end
...
...
db/post_migrate/20170830084744_destroy_gpg_signatures.rb
View file @
703b39d4
class
DestroyGpgSignatures
<
ActiveRecord
::
Migration
DOWNTIME
=
false
include
Gitlab
::
Database
::
MigrationHelpers
disable_ddl_transaction!
class
GpgSignature
<
ActiveRecord
::
Base
self
.
table_name
=
'gpg_signatures'
include
EachBatch
end
def
up
GpgSignature
.
each_batch
do
|
relation
|
relation
.
delete_all
end
truncate
(
:gpg_signatures
)
end
def
down
...
...
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