ChiliProject is not maintained anymore. Please be advised that there will be no more updates.

We do not recommend that you setup new ChiliProject instances and we urge all existing users to migrate their data to a maintained system, e.g. Redmine. We will provide a migration script later. In the meantime, you can use the instructions by Christian Daehn.

Double initial journal for migrated wiki history (Bug #542)


Added by Felix Schäfer at 2011-07-28 04:20 pm. Updated at 2011-07-29 04:37 pm.


Status:Closed Start date:2011-07-28
Priority:Normal Due date:
Assignee:Felix Schäfer % Done:

0%

Category:Journals / History
Target version:2.1.0
Remote issue URL: Affected version:2.0.0

Description

The initial journal is created twice for objects that were acts_as_versioned (in core: WikiContents), once in the migration to create initial journals for activity-providing models (source:/db/migrate/20100714111653_build_initial_journals_for_acts_as_journalized.rb) and once in the migration to convert WikiContentVersions to Journals (source:/db/migrate/20100804112053_merge_wiki_versions_with_journals.rb).

The least sucky way to work around that would be to test the objects providing activity (first migration) if they include ActsAsVersioned and not "add" an initial journal as it is already provided by acts_as_versioned, that leaves us with data that's already been migrated with the faulty migration. For core, that concerns only the WikiContents, and as those don't have a created_at attribute, the corresponding initial journals created in the migration didn't get backdated, i.e. the newest initial journal is the wrong one.


Associated revisions

Revision 55f9ecbe
Added by Felix Schäfer at 2011-07-29 03:00 pm

Remove double initial WikiContentJournals. #542

Revision ff6d75ca
Added by Felix Schäfer at 2011-07-29 06:00 pm

Only build initial journals for core classes. #542

History

Updated by Felix Schäfer at 2011-07-29 01:01 pm

The migration in 55f9ecbe23e558e099a92e241db1ffec2348c76e will remove the newest of any more than 1 initial WikiContentJournal.

  • Status changed from Open to Closed

Updated by Felix Schäfer at 2011-07-29 01:13 pm

Just realized that the currently existing migration still needs to be corrected to avoid the creation of said initial journal.

  • Status changed from Closed to Open

Updated by Felix Schäfer at 2011-07-29 02:52 pm

Ok, as there is absolutely no way to find out which acts_as_activity models also were acts_as_versioned, Holger proposed to migrate only objects of the core classes in the core migration and to document how to upgrade to ChiliProject 2.x for plugin authors that have acts_as_acticity and/or acts_as_versioned.

Updated by Felix Schäfer at 2011-07-29 04:37 pm

Everything OK on test data, confirmed on MySQL by me and postgreSQL by Eric.

  • Status changed from Open to Closed

Also available in: Atom PDF