Roundcube Community Forum

Release Support => Release Discussion => Topic started by: pauLee on April 16, 2013, 09:53:29 AM

Title: Missing table 'system' --> Upgrade to 0.9.0
Post by: pauLee on April 16, 2013, 09:53:29 AM
Hello,

I tried to install new version 0.9.0 on existing installtion 0.8.6. The webinstaller reports to me the following message when I try to update the database from the webinstaller:


Database schema update failed.
DB Schema:  NOT OK(Database schema differs)
Missing table 'system'

Shell I add that table manually to the db or what´s wrong there?


Cheers, Tom
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: chatwizrd on April 16, 2013, 11:50:19 AM
You obviously didnt follow the upgrade directions.

You need to inject whats in SQL/mysql/2013011000.sql
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: jameswill on April 17, 2013, 12:47:58 AM
Hi,


I think Upgrade script of roundcube should make this changes.
Is it possible for Roundcube team to make these changes in upgrade script so all users need not to import sql manually.

Please let us know if it is possible. It will make upgrade easier n friendly
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: ABerglund on April 17, 2013, 01:09:59 AM
The web installer will do these changes for you.
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: jameswill on April 17, 2013, 02:46:40 AM
Hi,

That is what i tried but it doesn't work.

Database schema update failed.

DB Schema:  NOT OK(Database schema differs)

    Missing table 'system'

Installer is not creating system table.

Can you check and make this changes in installer ?
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: jameswill on April 17, 2013, 07:39:49 AM
Hi,

Is there any update on this ?
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: jameswill on April 17, 2013, 11:50:08 PM
Hi,

Does anyone reply in this forum ?
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: JohnDoh on April 18, 2013, 02:17:40 AM
Quote
Does anyone reply in this forum ?

Impatient much?

When you ran the web installer you should of seen that message on the final, “test” step. It should look like the image attached to this post.

Do you see that button right underneath that says update? You need to select your existing version of RC and press the button. The installer will then try and run a shell script from the bin/ folder called “updatedb.sh” to try and update your database. (Note, the webserver user must have rights to execute that script).

If for any reason that fails you can run the SQL in SQL/mysql/2012080700.sql and SQL/mysql/2013011000.sql manually against your database to update it from 0.8 to 0.9
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: jameswill on April 18, 2013, 08:10:41 AM
Hi,

It still throws same error when i try to upgrade from 0.8.6 to 0.9.0 even if updatedb.sh has right permission.

Can you please make changes in upgrader so that it should be able to create system table ?
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: pauLee on April 18, 2013, 04:25:09 PM
The web installer will do these changes for you.
Yes, I also expected this. But no chance :(

I´am not very sure how to update the database manually, so I thought it would be a great way with the web installer.
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: JohnDoh on April 19, 2013, 03:05:07 AM
Quote
It still throws same error when i try to upgrade from 0.8.6 to 0.9.0 even if updatedb.sh has right permission.
So far in this thread i dont see where you have said any error messages you get. If you are not sure what i mean they try looking in the rc error logs and/or your httpd error logs.

Quote
Can you please make changes in upgrader so that it should be able to create system table ?
The devs will not change anything based on someone saying "it doesnt work". They will do the same as me, try it themselves. See that it works just fine and since you have given no more information there is nothing any one can do.

Also reading back through the thread i see it was sort of assumed you are using mysql as your database, is that right?
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: pauLee on April 19, 2013, 03:29:20 AM
So far in this thread i dont see where you have said any error messages you get. If you are not sure what i mean they try looking in the rc error logs and/or your httpd error logs.

Also reading back through the thread i see it was sort of assumed you are using mysql as your database, is that right?
I´am a little bit confused ...

You posted the correct screenshot with the error message:

Database schema update failed.
DB Schema:  NOT OK(Database schema differs)
Missing table 'system'

It´s the same message I get, if I try to update the database with the web installer. In the web installer I have choosen version 0.8.6 to update and pressed the update button ... and the result is:

"Database schema update failed."

What else do you need that you believe that the web installer does not do a correct job?


And yes, I´am using mysql.
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: alec on April 19, 2013, 05:19:09 AM
And there are no errors in logs? From Roundcube root directory execute `bin/updatedb.sh --package roundcube --version=0.8.6 --dir=./SQL`
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: pauLee on April 19, 2013, 05:25:11 AM
And there are no errors in logs? From Roundcube root directory execute `bin/updatedb.sh --package roundcube --version=0.8.6 --dir=./SQL`

I don´t have access to the console, so I can´t start any shell script. Which log you mean?
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: chatwizrd on April 19, 2013, 09:02:45 AM
You should inject what is in SQL/mysql/2013011000.sql then manually with phpmyadmin or something.
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: clifton11221 on April 19, 2013, 02:51:22 PM
You should inject what is in SQL/mysql/2013011000.sql then manually with phpmyadmin or something.

I had a similar problem (http://www.roundcubeforum.net/index.php/topic,11124.0.html) upgrading from v8.4.  I ran the SQL via phpmyadmin and now all is well.
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: mysitemanager on April 24, 2013, 07:30:13 AM
You should inject what is in SQL/mysql/2013011000.sql then manually with phpmyadmin or something.

I had a similar problem (http://www.roundcubeforum.net/index.php/topic,11124.0.html) upgrading from v8.4.  I ran the SQL via phpmyadmin and now all is well.
Same here, script wouldn't run from the web installer so I ran the script through PHPMyAdmin. I suspect it might have been a permissions error on the tmp folder as that needed setting too.
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: LonelyPixel on May 05, 2013, 03:42:44 AM
The information "it runs the script bin/updatedb.sh" was useful in a way. I uploaded all files with an FTP/SFTP client from my Windows computer. As every Linux developer should know, Windows doesn't have that rwx-style attributes. So all uploaded files don't have the x attribute set by default. This will prevent script files from being executed on Linux.

I manually set the x attribute for all files in bin/ (with the upload client) and then the database schema update worked just fine.

This information should have gone in the initial error message, instead of a halfhearted "update failed" or what it was. Or at least in the upgrade/upload instructions. Does that feedback help any user with the same problem, or the developers to give mor useful error messages?
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: alec on May 05, 2013, 07:44:36 AM
Next version will print a better error message.
Title: Re: Missing table 'system' --> Upgrade to 0.9.0
Post by: mkv on August 31, 2015, 07:25:32 AM
Is there any reason for NOT running the DB update using just PHP. It took me quite some time to figure out why upgrading from 0.84 to a more modern version did not work. The log revealed that the installer is trying to run a shell script using system() which in many (if not most) cases has been disabled in the PHP settings for security reasons.

Moreover, it is not at all obvious from the comments what one should do with the database upgrade (=which patches are needed). So what I did was dump the PHP-formatted system() command to a log file and run it manually. From the output I was able to see what to do and also what SQL scripts should be run.

The next problem arose with the mime_types. The server I am upgrading has not been running Apache for years but nginx instead. Copying the apache-provided mime.types to the installation directory and making a manual change in the config file seemed to sort out the problem. Having a better out-of-the-box nginx support would be a nice addition, nginx being so widely used these days - for a reason.

Markku