Merge remote-tracking branch 'origin/main' into feature/215

このコミットが含まれているのは:
2026-01-12 14:40:11 +09:00
コミット 74057cbce9
2個のファイルの変更30行の追加2行の削除
+28
ファイルの表示
@@ -0,0 +1,28 @@
class MakeTitleNullableInPosts < ActiveRecord::Migration[7.0]
def up
change_column_null :posts, :title, true
execute <<~SQL
UPDATE
posts
SET
title = NULL
WHERE
title = ''
SQL
end
def down
execute <<~SQL
UPDATE
posts
SET
title = ''
WHERE
title IS NULL
SQL
change_column_null :posts, :title, false
end
end