Project

General

Profile

Refactor #12344

Use Rails 4 update_all syntax migrations

Added by Daniel Lobato Garcia about 4 years ago. Updated over 1 year ago.

Status:
Closed
Priority:
Normal
Category:
Rails
Target version:
Difficulty:
Triaged:
Bugzilla link:
Fixed in Releases:
Found in Releases:

Description

update_all(old,new) is no longer valid. It should be changed to where(old).update_all(new)


Related issues

Related to Foreman - Feature #4151: Add STI to reports and allow for registering new report typesClosed2014-01-21

Associated revisions

Revision c3a34b76 (diff)
Added by Daniel Lobato Garcia about 4 years ago

Fixes #12344 - Use Rails 4 update_all syntax in migrations

Problem
Rails 3 syntax allows `update_all(old,new)`, however on Rails 4 the only
way to accomplish that is `where(old).update_all(new)`. Reports STI
contains a migration with this.

Solution
Change the migration to use the `where(old).update_all(new)` syntax

History

#1 Updated by The Foreman Bot about 4 years ago

  • Status changed from New to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/2875 added
  • Pull request deleted ()

#2 Updated by Dominic Cleal about 4 years ago

  • Assignee set to Daniel Lobato Garcia
  • Legacy Backlogs Release (now unused) set to 71

#3 Updated by Dominic Cleal about 4 years ago

  • Related to Feature #4151: Add STI to reports and allow for registering new report types added

#4 Updated by Daniel Lobato Garcia about 4 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100

Also available in: Atom PDF