Topic: database upgrade not complete

I've tried to install from 2.2.5 to 2.3CVS.

I've downloaded the unstable version, used the default config.php, entered the superadmin and checked the 2.2 to 2.3 database upgrade. This went all properly.

Now I try to login on the second company (company 1) then I still get "Access to application has been blocked until database upgrade is completed by system administrator."

I did redo the whole thing but with the same message and no clue where to search for. I hope you can give me some hints.
Gr. Bob

2 (edited by shopimport 02/16/2010 11:40:38 pm)

Re: database upgrade not complete

I dig more into the code. I noticed that 0_sys_prefs was properly updated to version_id = 2.3, but not for 1_sys_prefs, still on 2.2

Then in the upgrade script the function update_company_prefs( $params ) is called. Looks like here you would need the company as second parameter simular to the function get_company_pref($prefs = null, $tbpref = TB_PREF)

I manually changed version_id to 2.3 for company 1_ and could enter the company menu instead of the blocked message reported earlier.

Re: database upgrade not complete

I also noticed that one should not run the FORCE database install 2.2->2.3 after the normal install. This I did because the company kept blocked. The first time the install runs then the company preferances are moved from table 0_company to 0_sys_prefs and the 0_company is deleted. With a second (forced) run it will first remove 0_sys_prefs and then try to rebuild it from 0_company. However the 0_company is not there and thus the 0_sys_prefs cannot be rebuild. So always make backups before upgrading (yes I did).

Re: database upgrade not complete

I will check and fix the problem with version upgrade.
Forced upgrade is in fact last resort as it ignores some more important errors during update.
System upgrade should never be done without preliminary backup,
but for any case FA makes security backup file anyway before performing db upgrade (see in company/x/backup directory  - you should have here backup file made before exact upgrade).

Janusz

Re: database upgrade not complete

Indeed I see backup files generated by FA, very good! One minor issue (not even an issue for me), it dumps both company backups in the company/0/backup folder. I see both the database_0_20100217_0024.sql and database_1_20100217_0024.sql in company/0/backup  and no (new) ones in company/1/backup. I'm using the unstable CVS 2.3 md6 downloaded today 17-Feb-2010.

Re: database upgrade not complete

Company 0 is special company in only one aspect: administrators of this company are considered as site admins. It means that only admin of company 0 can perform system upgrade, and he is responsible for successful finishing of the process, or restoring databases after failure. This is why all backup files are stored under company/0.

Janusz