debian-mirror-gitlab/db/migrate/20210303165301_add_not_null_constraint_to_cluster_token_name.rb
2021-04-17 20:07:23 +05:30

19 lines
440 B
Ruby

# frozen_string_literal: true
class AddNotNullConstraintToClusterTokenName < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
# This will add the `NOT NULL` constraint WITHOUT validating it
add_not_null_constraint :cluster_agent_tokens, :name, validate: false
end
def down
remove_not_null_constraint :cluster_agent_tokens, :name
end
end