https://www.chiliproject.org/2011-09-15T19:21:46+02:00ChiliProjectChiliProject - Bug #627: Trac migration doesn't work with current CP releasehttps://www.chiliproject.org/issues/627?journal_id=103282011-09-15T19:21:46+02:00Chris Dähn
<ul><li><strong>Start date</strong> set to <i>2011-09-15</i></li><li><strong>Estimated time</strong> deleted ()</li><li><strong>Priority</strong> changed from <i>Normal</i> to <i>Normal</i></li><li><strong>Project</strong> set to <i>ChiliProject</i></li><li><strong>Target version</strong> deleted ()</li><li><strong>Assignee</strong> deleted ()</li><li><strong>% Done</strong> changed from <i>0</i> to <i>0</i></li><li><strong>Subject</strong> set to <i>Trac migration doesn't work with current CP release</i></li><li><strong>Category</strong> deleted ()</li><li><strong>Tracker</strong> set to <i>Bug</i></li><li><strong>Due date</strong> deleted ()</li><li><strong>Subproject of</strong> deleted ()</li><li><strong>Description</strong> set to <i>Due to changes in the model- and data-wise way the issue histories are stored...</i> <a href="/journals/10328/diff/description" class="lightbox-ajax">More</a></li><li><strong>Status</strong> changed from <i>Open</i> to <i>Open</i></li></ul> ChiliProject - Bug #627: Trac migration doesn't work with current CP releasehttps://www.chiliproject.org/issues/627?journal_id=26302011-09-16T21:24:38+02:00Chris Dähn
<ul></ul><p>Besides:<br />If this bug is worked around by using an old CP 1.5.2 release and then upgrading to CP 2.1.1, the database migration - in my case - failed with this error:</p>
<p>(currently I don't know where to place this problem, so this can/should be move accordingly)</p>
<pre>
chiliproject:/opt/chiliproject # rake --trace db:migrate RAILS_ENV=production
** Invoke db:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute db:migrate
== MergeWikiVersionsWithJournals: migrating ==================================
rake aborted!
An error has occurred, all later migrations canceled:
Mysql::Error: Column 'user_id' cannot be null: INSERT INTO `journals` (`created_at`, `notes`, `journaled_id`, `user_id`, `version`, `type`, `changes`, `activity_type`) VALUES('2007-08-07 17:29:48', NULL, 114, NULL, 0, 'WikiContentJournal', NULL, 'wiki_edits')
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/connection_adapters/abstract_adapter.rb:227:in `log'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/connection_adapters/mysql_adapter.rb:324:in `execute'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `insert_sql'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/connection_adapters/mysql_adapter.rb:334:in `insert_sql'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/connection_adapters/abstract/database_statements.rb:44:in `insert_without_query_dirty'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/connection_adapters/abstract/query_cache.rb:19:in `insert'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/base.rb:2961:in `create_without_timestamps'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/timestamp.rb:53:in `create_without_callbacks'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/callbacks.rb:266:in `create'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/base.rb:2927:in `create_or_update_without_callbacks'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/callbacks.rb:250:in `create_or_update'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/base.rb:2594:in `save_without_validation!'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/validations.rb:1100:in `save_without_dirty!'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/dirty.rb:87:in `save_without_transactions!'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/transactions.rb:200:in `save!'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/connection_adapters/abstract/database_statements.rb:136:in `transaction'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/transactions.rb:182:in `transaction'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/transactions.rb:200:in `save!'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/transactions.rb:208:in `rollback_active_record_state!'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/transactions.rb:200:in `save!'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/validations.rb:1071:in `create!'
./db/migrate//20100804112053_merge_wiki_versions_with_journals.rb:28:in `up_without_benchmarks'
./db/migrate//20100804112053_merge_wiki_versions_with_journals.rb:27:in `each'
./db/migrate//20100804112053_merge_wiki_versions_with_journals.rb:27:in `up_without_benchmarks'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/migration.rb:282:in `send'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/migration.rb:282:in `migrate'
/usr/lib/ruby/1.8/benchmark.rb:293:in `measure'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/migration.rb:282:in `migrate'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/migration.rb:365:in `__send__'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/migration.rb:365:in `migrate'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/migration.rb:491
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/migration.rb:567:in `call'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/migration.rb:567:in `ddl_transaction'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/migration.rb:490:in `migrate'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/migration.rb:477:in `each'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/migration.rb:477:in `migrate'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/migration.rb:401:in `up'
/usr/lib/ruby/gems/1.8/gems/activerecord-2.3.12/lib/active_record/migration.rb:383:in `migrate'
/usr/lib/ruby/gems/1.8/gems/rails-2.3.12/lib/tasks/databases.rake:112
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `call'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:205:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:200:in `execute'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:158:in `invoke_with_call_chain'
/usr/lib/ruby/1.8/monitor.rb:242:in `synchronize'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:151:in `invoke_with_call_chain'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/task.rb:144:in `invoke'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:112:in `invoke_task'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `each'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:90:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:84:in `top_level'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:62:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:129:in `standard_exception_handling'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/lib/rake/application.rb:59:in `run'
/usr/lib/ruby/gems/1.8/gems/rake-0.9.2/bin/rake:32
/usr/bin/rake:19:in `load'
/usr/bin/rake:19
Tasks: TOP => db:migrate
</pre> ChiliProject - Bug #627: Trac migration doesn't work with current CP releasehttps://www.chiliproject.org/issues/627?journal_id=26352011-09-17T12:49:44+02:00Felix Schäferfelix+chili@oh14.de
<ul></ul><p>This is strange. Do you have wiki pages that were created by subsequently deleted users on the trac instance? Can you confirm that you have wiki_versions in the imported DB before the migration that have an empty <code>user_id</code> field?</p> ChiliProject - Bug #627: Trac migration doesn't work with current CP releasehttps://www.chiliproject.org/issues/627?journal_id=26372011-09-18T19:24:30+02:00Chris Dähn
<ul></ul><p>You're right: One entry had a NULL value for author_id - thanks to an old Trac plugin which used a non existent user name as author. If fixed that entry and rerun the migration successful.</p>
<p>Thanks again Felix!</p> ChiliProject - Bug #627: Trac migration doesn't work with current CP releasehttps://www.chiliproject.org/issues/627?journal_id=30672011-12-07T03:22:37+01:00Guillaume BourqueGuillaume.Bourque@logisoftech.com
<ul></ul><p>Hi all,</p>
<p>since the migration is not working well, what is the best way to import from old trac ?</p>
<p>Here is my setup, I have a chiliproject installation 2.4 running with multiple project fine.</p>
<p>I have ~5 trac to migrate to this setup, what is the simplest way to go there ?</p>
<p>Pop in a new Chiliproject install v. 1.5 on some other server migrate the trac there and then import those project from my chiliproject 1.4 to my production chiliproject 2.4 ?</p>
<p>If that make sense how to I move a project from CP 1.4 to CP 2.4 ? I can plys with mysqldump no problem but would need some help.</p>
<p>Thanks for any recommendations.</p>
<p>Guillaume</p> ChiliProject - Bug #627: Trac migration doesn't work with current CP releasehttps://www.chiliproject.org/issues/627?journal_id=30742011-12-09T14:48:39+01:00Felix Schäferfelix+chili@oh14.de
<ul></ul><p>Salut Guillaume,</p>
<p>Guillaume Bourque wrote:</p>
<blockquote>
<p>since the migration is not working well, what is the best way to import from old trac ?</p>
</blockquote>
<p>The best way would be to fix the importer :-) There are some starting points in <a href="https://www.chiliproject.org/issues/516" class="issue status-1 priority-2" title="Issue with Trac migration: "TracMigrate is not missing constant TracTicketChange!" (Open)">#516</a>, see if you can help there, biggest help would be a Trac DB I could use to test the importer.</p>
<blockquote>
<p>If that make sense how to I move a project from CP 1.4 to CP 2.4 ?</p>
</blockquote>
<p>That won't work as there currently is no easy or predictably working well way to merge 2 ChiliProjects, even less import only one project from one to the other :-/</p>