Skip to content
Snippets Groups Projects

Improve add_column documentation

Merged 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
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
Please register or sign in to reply
Loading