blob: 5fc8970b8f976985fd60c527cc5eecf54f9f177b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
# 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
|