debian-mirror-gitlab/db/migrate/20210311120153_initialize_conversion_of_events_id_to_bigint.rb

22 lines
539 B
Ruby
Raw Normal View History

2021-04-29 21:17:54 +05:30
# frozen_string_literal: true
class InitializeConversionOfEventsIdToBigint < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
# Initialize the conversion of events.id to bigint
# Primary Key of the Events table
initialize_conversion_of_integer_to_bigint :events, :id
end
def down
trigger_name = rename_trigger_name(:events, :id, :id_convert_to_bigint)
2021-06-08 01:23:25 +05:30
remove_rename_triggers :events, trigger_name
2021-04-29 21:17:54 +05:30
remove_column :events, :id_convert_to_bigint
end
end