Feature #6852

Rake log task to log ActiveRecord changes

Added by Martin Ducar almost 4 years ago. Updated 8 days ago.

Status:Closed
Priority:Normal
Assignee:Martin Ducar
Category:DB migrations
Target version:1.6.0
Difficulty:trivial Team Backlog:
Triaged: Fixed in Releases:
Bugzilla link: Found in Releases:
Pull request:https://github.com/theforeman/foreman/pull/1633

Description

When testing idempotency of seed files in automated way, we have found out that best solution would be to have db:seed run twice second time with log of ActiveRecord sql commands. That way we can filter is second run tries to do another updates, inserts, deletes,.... This might be use-full also for debugging purposes.

Associated revisions

Revision e09d72ee
Added by Martin Ducar almost 4 years ago

fixes #6852 - `rake log` added to log ActiveRecord changes to stdout

History

#1 Updated by Dominic Cleal almost 4 years ago

Note that there's a test in core for idempotency of db:seed which uses an expectation on #save, so this should flag up the problem with a full stack trace when run (test/lib/tasks/seeds_test.rb).

#3 Updated by Martin Ducar almost 4 years ago

Ok, thanks for the hint than i think this feature is irrelevant

#4 Updated by Dominic Cleal almost 4 years ago

Nah, after seeing the PR, I think that'll still be useful for all sorts, I'm happy to keep it.

#5 Updated by Dominic Cleal almost 4 years ago

  • Status changed from New to Ready For Testing
  • Target version set to 1.7.5
  • Legacy Backlogs Release (now unused) set to 10
  • Pull request https://github.com/theforeman/foreman/pull/1633 added

#6 Updated by Martin Ducar almost 4 years ago

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

Also available in: Atom PDF