Skip to content

Commit 2966581

Browse files
committed
マイグレーションファイルのリファクタリング
1 parent 73c2059 commit 2966581

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
class ReverseShowMentorProfileForUsers < ActiveRecord::Migration[6.1]
22
def up
3-
execute "UPDATE users SET show_mentor_profile = NOT show_mentor_profile"
3+
User.update_all("show_mentor_profile = NOT show_mentor_profile")
44
end
55

66
def down
7-
execute "UPDATE users SET show_mentor_profile = NOT show_mentor_profile"
7+
User.update_all("show_mentor_profile = NOT show_mentor_profile")
88
end
99
end

0 commit comments

Comments
 (0)