gabrielt Posted October 18, 2017 Report Posted October 18, 2017 (edited) Hi there, I am getting this error while trying to upgrade: Errors were found when detecting previous installations of Revive Adserver We have detected integrity issues with your database. This means that the layout of your database differs from what we expect it to be. This could be due to customization of your database. The install.log shows that there are 107 errors. See below. I haven't customized anything, and I don't know how to fix these issues. Please advise. Gabriel. ---- ========================================================================= Attempting to detect an existing Openads (aka. phpAdsNew) installation... PAN not detected Attempting to detect an existing Openads (aka. Max Media Manager 0.1) installation... MMM v0.1 not detected Attempting to detect an existing Openads (aka. Max Media Manager 0.3) installation... MMM v0.3 not detected Attempting to detect an existing Revive Adserver installation... schema file found: [redacted]/etc/changes/schema_tables_core_621.xml schema definition from cache TRUE successfully parsed the schema schema name: openads schema version: 621 schema status: final running integrity check comparing database [redacted] with schema [redacted]/etc/changes/schema_tables_core_621.xml column definition does not match: account_preference_assoc.account_id column definition does not match: account_user_assoc.account_id column definition does not match: account_user_permission_assoc.account_id column definition does not match: ad_category_assoc.category_id column definition does not match: affiliates.updated column definition does not match: affiliates_extra.affiliateid column definition does not match: agency.updated column definition does not match: audit.actionid column definition does not match: banners.acl_plugins column definition does not match: campaigns.updated [... snip ...] checking field: phpads_zones updated found field updated #! database integrity check detected problems with the database #! 107 fields to change Edited October 21, 2017 by Matteo Beccati Reduced post length for better readability Quote
Matteo Beccati Posted October 19, 2017 Report Posted October 19, 2017 @gabrielt Could you please share more info on the system? I.e. php version, database extension, database server version, and possibly send a schema-only database dump. Thanks. Quote
gabrielt Posted October 19, 2017 Author Report Posted October 19, 2017 (edited) PHP 7.1.10 MySQL: Percona 5.6.37 Extension: MySQLi schema-only database dump Note: it would be nice if we could attach files here... :-/ PS: I noticed that on the above dump the engine is set to MyISAM while we use InnoDB. Edited October 19, 2017 by gabrielt Quote
Matteo Beccati Posted October 19, 2017 Report Posted October 19, 2017 @gabrielt Thanks. So, apparently the mentioned database fields all have some sort of DEFAULT '0' or DEFAULT '0000-00-00 00:00:00', where they shouldn't. Is it something you added, or possibly something that Percona added? Quote
Richard Cook Posted October 19, 2017 Report Posted October 19, 2017 (edited) I'm having the exact same issue. I updated to 4.0.2 2 months ago, with no errors. Trying to update to 4.3 I get the same exact error messages regarding DB integrity. ========================================================================= Attempting to detect an existing Openads (aka. phpAdsNew) installation... PAN not detected Attempting to detect an existing Openads (aka. Max Media Manager 0.1) installation... MMM v0.1 not detected Attempting to detect an existing Openads (aka. Max Media Manager 0.3) installation... MMM v0.3 not detected Attempting to detect an existing Revive Adserver installation... schema file found: -----------/etc/changes/schema_tables_core_621.xml schema definition from cache TRUE successfully parsed the schema schema name: openads schema version: 621 schema status: final running integrity check comparing database ---------- with schema ----------/etc/changes/schema_tables_core_621.xml column definition does not match: account_preference_assoc.account_id [... similar info, see previous posts ...] Edited October 19, 2017 by Matteo Beccati Removed overlong details Quote
Richard Cook Posted October 19, 2017 Report Posted October 19, 2017 I noticed in the log that it does not acknowledge that it found a previous installation of Revive Ad server. Could this be part of the issue? From the install.log file for 4.3 (failed attempt): Attempting to detect an existing Revive Adserver installation... schema file found: -----------/etc/changes/schema_tables_core_621.xml From the install.log file for 4.0.2 (successful) Attempting to detect an existing Revive Adserver installation... Revive Adserver 4.0.1 detected This version can be upgraded Database settings and permissions are OK Quote
Richard Cook Posted October 19, 2017 Report Posted October 19, 2017 Sorry, I meant upgrading to 4.1, not 4.3 as I wrote in my previous posts. Rich Quote
gabrielt Posted October 19, 2017 Author Report Posted October 19, 2017 Hi @Matteo Beccati, I really appreciate your help. This might be due to either Percona or a legacy upgrade -- we've been using Revive since it was called phpAdsNew. I've never manipulated the database directly. Either way, I need instructions on how to fix this. Quote
Matteo Beccati Posted October 19, 2017 Report Posted October 19, 2017 @gabrielt Oh yes, I saw the nice phpads_ prefix. Fond memories! Anyway, I see two possibilities at the moment: Hold off on the upgrade, until we figure out where the issue comes from and see if we can fix it. Remove the defaults from all the listed fields. Option 1 could take some time, though. We had tested upgrades from OpenX Source 2.8.11 and various Revive Adserver versions with both MySQL and Postgres and never hit this issue. I've also performed a fresh install on Percona with default settings, but the defaults weren't added. Quote
gabrielt Posted October 19, 2017 Author Report Posted October 19, 2017 1 minute ago, Matteo Beccati said: Remove the defaults from all the listed fields. How do I do that? Quote
andrewatfornax Posted October 19, 2017 Report Posted October 19, 2017 1 hour ago, Richard Cook said: I noticed in the log that it does not acknowledge that it found a previous installation of Revive Ad server. Could this be part of the issue? Attempting to detect an existing Revive Adserver installation... Revive Adserver 4.0.1 detected This version can be upgraded Hi @Richard Cook, Looks to me like it _does_ find your 4.0.1 installation and attempts to upgrade it. You would not be seeing this issue if it wasn't attempting an upgrade. The issue appears to be that some databases do not have the expected database schema to match their version (and 4.1.0 fixes some issues to ensure that Revive Adserver now correctly detects those mismatches in expected database schema). 22 minutes ago, gabrielt said: How do I do that? Hi @gabrielt, https://stackoverflow.com/questions/41810796/mysql-remove-default-value-for-datetime-field Looks like that should work for other columns where the default is not expected. Quote
Richard Cook Posted October 19, 2017 Report Posted October 19, 2017 Hi @andrewatfornax, That log was from my 4.0.1 to 4.0.2 upgrade. The log after that, is from 4.0.2 to 4.1, which does not show the acknowledgement that it found 4.0.2. From the install.log file for 4.1 (failed attempt): Attempting to detect an existing Revive Adserver installation... schema file found: -----------/etc/changes/schema_tables_core_621.xml Quote
mibert Posted October 19, 2017 Report Posted October 19, 2017 (edited) I do have exactly same problem, when trying to upgrade from 4.0.2 to 4.1.0 Could this problem be related to the fact, that I have upgraded from MySQL 5.1 to 5.5 during the update from adserver 4.0.1 to 4.0.2. Anyway, the update from adserver 4.0.1 to 4.0.2. went very smooth as always. I hope that there is a solution to this issue soon. Best regards Michael Edited October 19, 2017 by mibert Quote
Matteo Beccati Posted October 19, 2017 Report Posted October 19, 2017 @mibert @Richard Cook Do you remember which was the first version of Revive / OpenX Source / OpenAds / phpAdsNew you installed? Quote
mibert Posted October 19, 2017 Report Posted October 19, 2017 Wow, this is very difficult to answer. I Am using this system already more than 10 years, means since the phpads time. Best regards Michael Quote
Matteo Beccati Posted October 19, 2017 Report Posted October 19, 2017 @mibert Thanks, that should be enough. That makes two of you having the issue using a database that was originally created during the phpAdsNew era. I'd suggest to keep using 4.0.2 until a fix or workaround is found. gabrielt 1 Quote
Richard Cook Posted October 19, 2017 Report Posted October 19, 2017 @Matteo Beccati I have artifcats going back to 2.0.11. Name From Version To Version Status Date 2007-11-14 09:31:58 2.0.11-pr1 2.3.32-beta upgrade complete 2007-11-14 09:31:58 Quote
gabrielt Posted October 19, 2017 Author Report Posted October 19, 2017 @Matteo Beccati Thanks for all your help. I will wait until an official solution is released, as clearly this is happening with other people as well, and the common thing is that we are all using Revive since it was phpAdsNew... Quote
Matteo Beccati Posted October 20, 2017 Report Posted October 20, 2017 For reference, I've created the issue on github: https://github.com/revive-adserver/revive-adserver/issues/900 mibert and gabrielt 1 1 Quote
gabrielt Posted October 21, 2017 Author Report Posted October 21, 2017 @Matteo Beccati Thank you so much for the amazing support. Quote
mibert Posted October 21, 2017 Report Posted October 21, 2017 Great, thank you very much best regards Michael Quote
Matteo Beccati Posted October 21, 2017 Report Posted October 21, 2017 Hello everyone! Chances are that we won't be able to release a 4.1.1 final next week, but in the meantime it would be great if you could test on your staging environment this pre-release package that should fix the upgrade problems that you reported (along with the actual upgrade from phpAdsNew itself, which was broken since 3.2). You can download the beta packages here: revive-adserver-4.1.1-beta.tar.bz2 (sha256: bf515eb36f6fc00fef0ee919e9ff50e612e31b5e54d10dff7f3726db8f7d6653) revive-adserver-4.1.1-beta.tar.gz (sha256: 4315a107d5459492994c7097268ed2f10b91b0bcaf5498ff18e557f126eb81a9) revive-adserver-4.1.1-beta.zip (sha256: 4111dc824175b98833c516e57a188951d34337d93fc171ca51101329955e47b5) gabrielt and mibert 1 1 Quote
mibert Posted October 22, 2017 Report Posted October 22, 2017 Hi Matteo, great, this version went through the update process no problem for me: Your Revive Adserver upgrade is complete!! Thank you VERY MUCH. I will wait for stable 4.1.1. for my life site. Best regards Michael andrewatfornax 1 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.