added migration to replace existing file_extension containing nil with ''
This commit is contained in:
@ -0,0 +1,9 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class MigrateFiletypeExtensionsNotNil < ActiveRecord::Migration[7.0]
|
||||
def change
|
||||
FileType.all.find_all {|file_type| file_type.file_extension.nil? }.each do |file_type|
|
||||
file_type.update file_extension: ''
|
||||
end
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user