Dear Users and Developers,
I’m facing a migration four instances RT 3.2.2 to RT 3.8.8 with a number
of customizations.
Back-end database is MySQL and I have prepared a script for loading
database dumps from old MySQL 3.23.58 to 5.0.51 (Debian Lenny)
and then upgrading RT schema (rt-setup-database).
A next script will migrate from MySQL to PostgreSQL.
The PostgreSQL database cluster is initialized with cs_CZ.UTF-8 locale.
A problem arises with a column Attachments.Content with a pg type text.
DBD::Pg::st execute failed: ERROR: invalid byte sequence for encoding “UTF8”: 0xed2066
HINT: This error can also happen if the byte sequence does not match the encoding expected by the server, which is controlled by “client_encoding”…
I think the correct data-type should by bytea, but this data type has
a bit strange behavior. Nevertheless a data copy ends with success after
data-type change:
alter table attachments drop column content;
alter table attachments add column content bytea;
The problem with bytea is (at least in my script), that values needs
extra handling. Binding values to parameters of type bytea must by done
according manual page of DBD::Pg… (RT already uses bytea in the tables
session).
Other fields: ObjectCustomFieldValues.LargeContent, Attributes.Content?
Any suggestions?
Regards
Zito
rt-mysql2pg (6.6 KB)