Defect #6996

Migration trac(sqlite3) -> redmine(postgresql) doesnt escape ' char

Added by Marek Hobler almost 7 years ago. Updated almost 7 years ago.

Status:ClosedStart date:2010-11-28
Priority:HighDue date:
Assignee:-% Done:

0%

Category:Importers
Target version:1.0.5
Resolution:Fixed Affected version:1.0.4

Description

During migration:

krtek:/opt/redmine/redmine-1.0# export LANG=C; rake redmine:migrate_from_trac RAILS_ENV="production" 
(in /opt/redmine/redmine-1.0)

WARNING: a new project will be added to Redmine during this process.
Are you sure you want to continue ? [y/N] y                        

Trac directory []: /var/lib/trac/dm_library/
Trac database adapter (sqlite, sqlite3, mysql, postgresql) [sqlite]: sqlite3
Trac database encoding [UTF-8]: 
Target project identifier []: dmlibrary

Migrating components..............
Migrating milestones.........
Migrating custom fields..
Migrating tickets................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................
Migrating wiki..................................................................................rake aborted!
SQLite3::SQLException: near "a": syntax error: SELECT DISTINCT attachment.* FROM attachment WHERE attachment.type = 'wiki' AND attachment.id = 'Jak nauczyć Visual Studio obsługiwać Boost'a'

(See full trace by running task with --trace)
2010-11-28 17:17:46-17:26:20 export LANG=C; rake redmine:migrate_from_trac RAILS_ENV="production" # 1

current software:
2010-11-28 17:43:30 export RAILS_ENV="production"
krtek:/opt/redmine/redmine-1.0# ruby script/about
About your application's environment
Ruby version 1.8.7 (i486-linux)
RubyGems version 1.3.4
Rack version 1.0
Rails version 2.3.5
Active Record version 2.3.5
Active Resource version 2.3.5
Action Mailer version 2.3.5
Active Support version 2.3.5
Application root /opt/redmine/redmine-1.0
Environment production
Database adapter postgresql
Database schema version 20100705164950

About your Redmine plugins
Redmine Charts 0.1.0
Screenshot Paste 1.1.0
Stuff To Do Plugin 0.4.0
Redmine Graphs plugin 0.1.0
2010-11-28 17:43:37 ruby script/about

I use 8.3.11-0lenny1 version of postgresql.

migrate_from_trac.patch Magnifier (1.62 KB) Jean-Philippe Lang, 2010-11-28 17:55

Associated revisions

Revision 4449
Added by Jean-Philippe Lang almost 7 years ago

Escapes attachment ids in TracMigrate (#6996).

History

#1 Updated by Jean-Philippe Lang almost 7 years ago

Can you try with the attached patch?

#2 Updated by Marek Hobler almost 7 years ago

Jean-Philippe Lang wrote:

Can you try with the attached patch?

thanks! it helped :)

#3 Updated by Jean-Philippe Lang almost 7 years ago

  • Target version set to 1.0.5

#4 Updated by Jean-Philippe Lang almost 7 years ago

  • Status changed from New to Closed
  • Affected version (unused) set to 1.0.4
  • Resolution set to Fixed
  • Affected version set to 1.0.4

Committed in r4449.

#5 Updated by Jean-Philippe Lang almost 7 years ago

  • Category set to Importers

Also available in: Atom PDF