Project

General

Profile

Actions

Bug #7732

closed

DB migration error: undefined method `counter_cache_column' for nil:NilClass

Added by Dominic Cleal over 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
DB migrations
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

When migrating past #7247 on an RPM installation, you will hit the following error if any Puppet classes are imported:

==  FixCounters: migrating ====================================================
** Invoke fix_cached_counters (first_time)
** Invoke environment
** Execute fix_cached_counters
Correcting cached counters: (this may take a few minutes)
Architecture corrected
Environment corrected
Operatingsystem corrected
Domain corrected
Realm corrected
rake aborted!
An error has occurred, this and all later migrations canceled:

undefined method `counter_cache_column' for nil:NilClass
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/counter_cache.rb:32:in `block in reset_counters'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/counter_cache.rb:19:in `each'
/opt/rh/ruby193/root/usr/share/gems/gems/activerecord-3.2.8/lib/active_record/counter_cache.rb:19:in `reset_counters'
/usr/share/foreman/lib/tasks/fix_cached_counters.rake:8:in `block (2 levels) in <top (required)>'
/usr/share/foreman/lib/tasks/fix_cached_counters.rake:8:in `each'
/usr/share/foreman/lib/tasks/fix_cached_counters.rake:8:in `block in <top (required)>'

Related issues 1 (0 open1 closed)

Related to Foreman - Bug #7247: Create migration to fix incorrect counts caused by #5692 and related bugsClosedTomer Brisker08/25/2014Actions
Actions

Also available in: Atom PDF