]> cat aescling's git repositories - mastodon.git/commitdiff
Fix old migrations failing because of strong_migrations update (#12787)
authorThibG <thib@sitedethib.com>
Fri, 10 Jan 2020 20:52:24 +0000 (21:52 +0100)
committerYamagishi Kazutoshi <ykzts@desire.sh>
Fri, 10 Jan 2020 20:52:24 +0000 (05:52 +0900)
Fixes #12768

Some migrations were overlooked in #12692

db/migrate/20180206000000_change_user_id_nonnullable.rb
db/migrate/20191031163205_change_list_account_follow_nullable.rb

index 4eecb615457053abeaa4e6c40e72c4f6c1a64c53..2d2cf20d38cd47c1dd8db9c9161a7ba6585eea91 100644 (file)
@@ -1,6 +1,8 @@
 class ChangeUserIdNonnullable < ActiveRecord::Migration[5.1]
   def change
-    change_column_null :invites, :user_id, false
-    change_column_null :web_settings, :user_id, false
+    safety_assured do
+      change_column_null :invites, :user_id, false
+      change_column_null :web_settings, :user_id, false
+    end
   end
 end
index ff89115467d789ef133bc8eaface9538b3b56c27..65ff933658fe45f7effd8f438abb6553511dd7fd 100644 (file)
@@ -1,5 +1,7 @@
 class ChangeListAccountFollowNullable < ActiveRecord::Migration[5.1]
   def change
-    change_column_null :list_accounts, :follow_id, true
+    safety_assured do
+      change_column_null :list_accounts, :follow_id, true
+    end
   end
 end