diff --git a/script/fixes/009.rb b/script/fixes/009.rb index db246856a..46ee0767e 100644 --- a/script/fixes/009.rb +++ b/script/fixes/009.rb @@ -4,4 +4,4 @@ require File.expand_path(File.join(File.dirname(__FILE__), '..', '..', 'config', ActiveRecord::Base.connection.execute("set statement_timeout = 0") -ActiveRecord::Base.connection.execute("update wiki_pages set updater_id = creator_id") +ActiveRecord::Base.connection.execute("update wiki_pages set updater_id = (select _.updater_id from wiki_page_versions _ where _.wiki_page_id = wiki_pages.id order by _.updated_at desc limit 1)")