Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20210311120153_initialize_conversion_of_events_id_to_bigint.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: f5ff0816047fa7ca2874f1e25f3382c121a7cb15 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# 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)

    remove_rename_triggers :events, trigger_name

    remove_column :events, :id_convert_to_bigint
  end
end