Skip to content

Commit

Permalink
Update db/migrate/20240806161142_add_file_name_to_uploaded_files.rb
Browse files Browse the repository at this point in the history
Co-authored-by: Rob Kaufman <[email protected]>
  • Loading branch information
kirkkwang and orangewolf authored Dec 18, 2024
1 parent ca22cd2 commit 9caffed
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions db/migrate/20240806161142_add_file_name_to_uploaded_files.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
class AddFileNameToUploadedFiles < ActiveRecord::Migration[5.2]
def change
if table_exists?(:uploaded_files)
add_column :uploaded_files, :filename, :string unless column_exists?(:uploaded_files, :filename)
end
add_column :uploaded_files, :filename, :string if table_exists?(:uploaded_files) && !column_exists?(:uploaded_files, :filename)
end
end

0 comments on commit 9caffed

Please sign in to comment.