Project

General

Profile

redmine db migration sqlite > mysql

Added by Guillermo Gómez over 14 years ago

I started my redmine couple of weeks ago with sqlite because it supposed to be just a "demo", now im facing the need to migrate this db to mysql.

I found it not trivial because different data types and schema creation syntax between sqlite and mysql and i was just wondering if someone else already faced/automated/solved this task.

I first started dumping sqlite db to fix it and import it in mysql, then i faced some not obvious problems for the non rdbms expert (like me). Then i managed just to create the db with rake task in a separate environment (redmine schema), whats missing is to import data from the sqlite dump file.

anyhow.... has someone any leads or clues to help on this regards

mXmas to u & yours

Guillermo


Replies (3)

RE: redmine db migration sqlite > mysql - Added by Michael Powell over 11 years ago

Any other relevant links? This one's dead. Thank you...

RE: redmine db migration sqlite > mysql - Added by PICCORO LenzMcKAY over 11 years ago

This post are very outdated but if it helps here comes:

  • dump db sqlite to sql file
  • copy to new file that dump, and then open it
  • removes all lines that are not inserts
  • go to new redmine insttalation and dumps mysql db, but specified no data dump before and drops to existing table
  • now this dump reentered to the new db (this cause to delete the default data and cleans new db redmine)
  • now load the inserts from sqlite data only and that's all done

So two extra tune may be required:

firts set public proyect (if all are public but if not u must specified)
$ mysql -p -u redmine redmine_default
MariaDB [redmine]> use redmine
MariaDB [redmine]> UPDATE projects SET is_public = 1 WHERE `is_public` = 0;
MariaDB [redmine]> UPDATE users SET admin = 1 \
WHERE admin = 0 \
AND (type != 'Group' AND type != 'AnonymousUser') \
AND login = 'admin';

Second all svn or git repositories must be re-specified again for all proyects, but this work for me only for debian lenny and squeeze (qith my modified fixed package).

i have a blog names BPM&projects that have this proces update in few days other two different methods using gems and ruby db port in few days

http://recursosempresas.blogspot.com/2012/08/software-gestor-de-proyectos-mudando.html

    (1-3/3)