debian-mirror-gitlab/db/migrate/20200524104346_add_source_to_resource_state_event.rb
2020-08-09 17:44:08 +05:30

22 lines
486 B
Ruby

# frozen_string_literal: true
class AddSourceToResourceStateEvent < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
unless column_exists?(:resource_state_events, :source_commit)
add_column :resource_state_events, :source_commit, :text
end
add_text_limit :resource_state_events, :source_commit, 40
end
def down
remove_column :resource_state_events, :source_commit
end
end