Page tree

If you want to migrate a translate5 installation on windows to a linux server, commonly all database tables are lower case in the mysql DB under windows.

For the migration the translate5 installation under windows and under the linux server should be the same version.

The following PHP script does a conversion of the lowercase table names in a dumped SQL file, make in doubt a backup of your SQL file.

Migrate lowercase table names to default camelCase
<?php 
$file = 'test.sql';						// → Change the file name to your needs
$sql = file_get_contents($file);
$tablenames = [							// → get a uptodate table name list from your Linux installation, IMPORTANT: including the ` (back-tic) charcters
										// → Also important: the fresh Linux installation does not contain any  LEK_segment_view_... table, 
										//                   so get the list from the Windows Installation and replace there just lek with LEK
'`LEK_browser_log`',
'`LEK_segment_view_01eaaf01aaec1b845f41fce384d4c631`',
....
'`sessionUserLock`',
];
file_put_contents($file, str_replace(array_map('strtolower', $tablenames), $tablenames, $sql));




  • No labels