Skip to content

Commit

Permalink
Fixed column does not exist migration error
Browse files Browse the repository at this point in the history
  • Loading branch information
brianna-dardin committed Jan 28, 2024
1 parent 70afd03 commit ac63b4b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion db/migrate/20231021222726_remove_author_id_from_chapters.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
class RemoveAuthorIdFromChapters < ActiveRecord::Migration[5.2]
def change
remove_column :chapters, :authorID, :integer
if ActiveRecord::Base.connection.column_exists?(:chapters, :authorID)
remove_column :chapters, :authorID
end
end
end

0 comments on commit ac63b4b

Please sign in to comment.