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

class CreateNamespacesStorageLimitExclusions < Gitlab::Database::Migration[2.1]
  enable_lock_retries!

  def up
    create_table :namespaces_storage_limit_exclusions do |t|
      t.references :namespace,
                   foreign_key: { on_delete: :cascade },
                   index: true,
                   null: false
      t.text :reason, null: false, limit: 255
      t.timestamps_with_timezone null: false
    end
  end

  def down
    drop_table :namespaces_storage_limit_exclusions
  end
end