- Download and extract the master branch of this tool.
- Dump the userguide MySQL database:
mysqldump --xml -u USERNAME userguide >userguide_db.xml
- Run the tool (
php converter.php
) with arguments-i userguide_db.xml -o userguide_pg.sql
- Create a database called
userguide
on the Postgres server. psql -d userguide -f userguide_pg.sql
- Make sure
userguide
owns all tables, and updateconfig.php
. - Run these commands on the database:
ALTER TABLE translate_langs ALTER COLUMN lang_code TYPE varchar(5);
ALTER TABLE translate_users ALTER COLUMN real_name SET DEFAULT '''';
UPDATE translate_langs SET lang_code=trim(both from lang_code);
- Run this query on the database and execute all the commands it outputs:
SELECT 'ALTER TABLE translate_strings ALTER COLUMN "' ||column_name|| '" SET DEFAULT '''';' FROM information_schema.columns WHERE table_name='translate_strings' AND column_name LIKE 'translation_%';