How do you switch the updated_on timestamp off?
Added by Alan Chandler over 12 years ago
I'm working on the Migrate_from_Mantis script and am trying to make it so that the times of last update in my Mantis database get pulled over into the Redmine one.
I specifically do
ActivityRecord::Base.record_timestamps = false
at the start of the section which migrates the bugs, and turn it on again afterwards. Yet I still find the "updated_on" field in the new issues are all set to the time I am running the script.
Replies (1)
RE: How do you switch the updated_on timestamp off?
-
Added by Alan Chandler over 12 years ago
Alan Chandler wrote:
I'm working on the Migrate_from_Mantis script and am trying to make it so that the times of last update in my Mantis database get pulled over into the Redmine one.
I specifically do
[...]
at the start of the section which migrates the bugs, and turn it on again afterwards. Yet I still find the "updated_on" field in the new issues are all set to the time I am running the script.
It seems to critically depend on where you set the value on.
I've moved it outside of the Migrate module, before its declaration but after the require active record. It now seems to work,