Skip to content

Improve add_column documentation

Max Orefice requested to merge morefice/improve-add-columns-doc into master

What does this MR do and why?

This MR updates our database documentation to leverage if_not_exists instead of using column_exists?.

- add_column(:users, :updated_at, :datetime) unless column_exists?(:users, :updated_at)
+ add_column(:users, :updated_at, :datetime, if_not_exists: true)

Merge request reports

Loading