debian-mirror-gitlab/db/migrate/20220628120708_create_namespace_bans.rb

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

16 lines
442 B
Ruby
Raw Normal View History

2022-08-13 15:12:31 +05:30
# frozen_string_literal: true
class CreateNamespaceBans < Gitlab::Database::Migration[2.0]
UNIQUE_INDEX_NAME = 'index_namespace_bans_on_namespace_id_and_user_id'
def change
create_table :namespace_bans do |t|
t.bigint :namespace_id, null: false
t.bigint :user_id, null: false, index: true
t.timestamps_with_timezone
t.index [:namespace_id, :user_id], unique: true, name: UNIQUE_INDEX_NAME
end
end
end