blob: 4f0cb4d3d68b5c1be8d16af057517940e250d57d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# frozen_string_literal: true
class AddNotNullToBoardProjectRecentVisits < Gitlab::Database::Migration[2.0]
disable_ddl_transaction!
def up
add_not_null_constraint :board_project_recent_visits, :user_id, validate: false
add_not_null_constraint :board_project_recent_visits, :project_id, validate: false
add_not_null_constraint :board_project_recent_visits, :board_id, validate: false
end
def down
remove_not_null_constraint :board_project_recent_visits, :user_id
remove_not_null_constraint :board_project_recent_visits, :project_id
remove_not_null_constraint :board_project_recent_visits, :board_id
end
end
|