2018-11-13 07:27:31 +00:00
|
|
|
class AddVerificationStatusToGpgSignatures < ActiveRecord::Migration[4.2]
|
2017-08-24 12:19:48 +00:00
|
|
|
DOWNTIME = false
|
|
|
|
|
2017-08-31 13:50:24 +00:00
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
|
|
|
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
|
2017-09-04 09:45:17 +00:00
|
|
|
truncate(:gpg_signatures)
|
2017-08-31 13:50:24 +00:00
|
|
|
|
|
|
|
add_column_with_default(:gpg_signatures, :verification_status, :smallint, default: 0)
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
remove_column(:gpg_signatures, :verification_status)
|
2017-08-24 12:19:48 +00:00
|
|
|
end
|
|
|
|
end
|