summaryrefslogtreecommitdiff
path: root/db/migrate/20200623121135_create_dynamic_partitions_schema.rb
blob: 931a55ebcf4e02518a5c35955ff6621e10f0df27 (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 CreateDynamicPartitionsSchema < ActiveRecord::Migration[6.0]
  include Gitlab::Database::SchemaHelpers

  DOWNTIME = false

  def up
    execute 'CREATE SCHEMA gitlab_partitions_dynamic'

    create_comment(:schema, :gitlab_partitions_dynamic, <<~EOS.strip)
      Schema to hold partitions managed dynamically from the application, e.g. for time space partitioning.
    EOS
  end

  def down
    execute 'DROP SCHEMA gitlab_partitions_dynamic'
  end
end