Mysql2pg

Hey there,

is this Howto suitable for 3.6.3?

https://www.safernet.org.br/twiki/bin/view/Colaborar/RT_MySQL2Pg
(from: http://wiki.bestpractical.com/view/MySQLToPg)

Best regards,
joey

Heyas,

for those who are interested:

I succesfully migrated a Mysql 2 Postgres with this howto. The only
thing i had to changed was a invalid date-field in the mysql-database.

j0ey.de wrote:

is this Howto suitable for 3.6.3?
https://www.safernet.org.br/twiki/bin/view/Colaborar/RT_MySQL2Pg
(from: http://wiki.bestpractical.com/view/MySQLToPg)

Greets,
joey

В сообщении от Tuesday 22 January 2008 20:25:18 j0ey.de написал(а):

Hey there,

is this Howto suitable for 3.6.3?

https://www.safernet.org.br/twiki/bin/view/Colaborar/RT_MySQL2Pg
(from: http://wiki.bestpractical.com/view/MySQLToPg)

Best regards,
joey


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

yes

Best Regards, Artem A. Kuzyakov
System Administrator
AGAVA - Software Company
http://www.agava.ru/

dimmus@agava.com
Tel.: +7 (495) 408-17-90

j0ey.de wrote:

is this Howto suitable for 3.6.3?

It’s what I based my move on, however, I did end up with some extra
hackery to get it to work properly, including extra indexes but that’s
something I’m told should be evaluated on a “per DB” basis, and I
suspect ours is nothing like yours.

Rather than using the SQL they provided I just took it straight from the
RT install process.

The mysql2pg script it’s self works, however you’ll probably need to
update the table names.

I ended up creating a dedicated MySQL slave that I would run the test
migration/upgrade off. This meant that I could stop the replication and
have a static content while testing.

And as Jesse mentions on the Wiki, Binary attachments get messed up, It
took me a while to realize why my database had dropped from 10 Gig to 1 Gig.

Attached is the script I used to fix the attachments. It comes with the
standard “worked for me” disclaimer. I also had a modification in
Attachments_Local.pm to make ContentEncoding, and Content Writable.

{{{ sub _LocalAccessible

sub _LocalAccessible {
{
Content => { ‘read’=>1, ‘write’ => 1 },
ContentEncoding => { ‘read’=>1, ‘write’ => 1 },
};
}

}}}

If I understand one of Jesse’s earlier messages correctly you could
probably add the following to my script.

{
no warnings qw/redefine/;
use RT::Attachment;
sub RT::Attachment::_LocalAccessible {
{
Content => { ‘read’=>1, ‘write’ => 1 },
ContentEncoding => { ‘read’=>1, ‘write’ => 1 },
};
}
}

Mark
Mark Chappell
Unix Systems Administrator

my2pg-attachments (4.41 KB)