gitlab-org--gitlab-foss/db/migrate/20210306121300_partition_web_hook_logs.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
446 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class PartitionWebHookLogs < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
include Gitlab::Database::PartitioningMigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
disable_ddl_transaction!
def up
partition_table_by_date :web_hook_logs, :created_at
end
def down
drop_partitioned_table_for :web_hook_logs
end
end