summaryrefslogtreecommitdiff
path: root/db/migrate/20200623170000_create_static_partitions_schema.rb
blob: d8878d2fe336cb8d68208bae644ca95867d3ed4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# frozen_string_literal: true

class CreateStaticPartitionsSchema < ActiveRecord::Migration[6.0]
  include Gitlab::Database::SchemaHelpers

  DOWNTIME = false

  def up
    execute 'CREATE SCHEMA gitlab_partitions_static'

    create_comment(:schema, :gitlab_partitions_static, <<~EOS.strip)
      Schema to hold static partitions, e.g. for hash partitioning
    EOS
  end

  def down
    execute 'DROP SCHEMA gitlab_partitions_static'
  end
end