gitlab-org--gitlab-foss/db/migrate/20210713211008_create_banned_users.rb

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

21 lines
514 B
Ruby
Raw Normal View History

# frozen_string_literal: true
class CreateBannedUsers < ActiveRecord::Migration[6.1]
include Gitlab::Database::MigrationHelpers
def up
with_lock_retries do
create_table :banned_users, id: false do |t|
t.timestamps_with_timezone null: false
t.references :user, primary_key: true, default: nil, foreign_key: { on_delete: :cascade }, type: :bigint, index: false, null: false
end
end
end
def down
with_lock_retries do
drop_table :banned_users
end
end
end