Feng Forum

Support => Feng Office 2 => : interfaSys March 23, 2012, 02:24:19 PM

: Migration script is not using the table prefix found in config.php
: interfaSys March 23, 2012, 02:24:19 PM
The migration script fails because the table prefix is hardcoded in some (all?) of the commands. It should use the one found in config.php.
: Re: Migration script is not using the table prefix found in config.php
: franponce87 March 26, 2012, 02:56:17 PM
That's correct! Please check this thread out:
http://forums.fengoffice.com/index.php?topic=14846.0

Greetings,
Francisco
: Re: Migration script is not using the table prefix found in config.php
: interfaSys March 27, 2012, 08:27:37 AM
This is a slightly different problem. I'm not talking about post-upgrade changes.
The migration script will just not run if the table prefix for the current installation is not og_. Since the configuration file contains the current prefix. The migration script should use that to run the queries.
: Re: Migration script is not using the table prefix found in config.php
: Bithunter March 27, 2012, 09:34:58 AM
I´m facing the same problem. I was a OpenGoo user since the earlier versions, and I have a exclusive database for it. I have no prefix, but \public\upgrade\templates\db_migration\2_0_asado.php is hardcoded with og_ prefix. It should use instead the prefix defined in config.php (none, in my case).

Regards
: Re: Migration script is not using the table prefix found in config.php
: Henry March 27, 2012, 02:33:26 PM
hi,

if you need a quick solution you can run this little script.
It renames alle tables in your Database to og_*
If it was successful you can run the upgrade.

:
<?php 
$host 
'localhost';
$database 'database_name';
$db_user 'user';
$db_user_pw 'password';

$db = new mysqli($host,$db_user,$db_user_pw,$database);
$result $db->query('SHOW tables;');
$suchmuster '/^og_/';
 while (
$row $result->fetch_row()) {
        if (!
preg_match($suchmuster$row[0])){
$db->query('RENAME TABLE `'.$database.'`.`'.$row[0].'` TO `'.$database.'`.`og_'.$row[0].'` ;');
}
    }

?>


Henry
: Re: Migration script is not using the table prefix found in config.php
: seraphim March 28, 2012, 04:55:18 AM
I tried to run this migration script after renaming again, but it produces no output.

should this be normal??
: Re: Migration script is not using the table prefix found in config.php
: supadoctor March 29, 2012, 08:56:29 AM
Strange...but my users table after upgrading still with og_prefix and now FO 2.0 can't file fo_users...  ???
: Re: Migration script is not using the table prefix found in config.php
: supadoctor March 30, 2012, 02:14:33 AM
My attempts to upgrade 1.7.5 to 2.0.0.8 are failed... Fortunately I do not lost my DB! :)
To FO STUFF - you should improve upgrade script and process because many people use 1.7.x version (for me, I'm on 1.7.x more than 1,5 year) and without robust and safe upgrade procedure new version can stay unpopular and widely used  :-[
: Re: Migration script is not using the table prefix found in config.php
: mariaczi March 30, 2012, 07:27:36 AM
Upgrade script not correctly update prefix_timeslots table. After upgrade new table didn't have "id' column.
: Re: Migration script is not using the table prefix found in config.php
: bleeuwen October 18, 2012, 07:28:13 AM
Great post!!!
My migration from 1.7.5 to 2.2 failed.
With he given script I could easily give the old table the prefix 'og_'  so the first step of the migration was Succesfull.
THANKS for the script !!!! :)

After thsi I did the following:
- run public/upgrade/complete_migration.php (perform it several times is advizd)
- overwrite the  init.php and version.php with the new ones

Than all is OK

(If you do not overwrite the init.php file, selecting a special workspace does nog lead to filtering of files).
: cialis 5mg for what
: Baveskara July 27, 2022, 02:39:31 PM
buy priligy australia (https://priligy.homes) For people being referred back to primary care