Update 7.0.4 -> 8.0.0 fails with MySQL Syntax error
I followed this idea to circumvent the update problems with the Debian package: https://github.com/owncloud/core/issues/13992#issuecomment-73555360
On running sudo -u www-data php /var/www/owncloud/occ upgrade I get:
An exception occurred while executing 'ALTER TABLE oc_appconfig_8x7jr6mhsg7k5 RENAME INDEX appconfig_config_key_index TO oc_6kz2t44isgfiv':
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INDEX appconfig_config_key_index TO oc_6kz2t44isgfiv' at line 1
The trailing numbers in the table name and the index name change on every new invocation and keep failing. Can anyone give a hint what might have gone wrong here?
hmmm - where is that rename coming from?
Related to our migration testing? @icewind1991 please have a look - THX
@jojomi in case you have a backup of your data (which you for sure have :speak_no_evil: ) - you coud try to skip the migration testing by appending the command line option --skip-migration-test
That command line option fixed it for me:
# sudo -u www-data php /var/www/owncloud/occ upgrade --skip-migration-test
Turned on maintenance mode
Updated database
Turned off maintenance mode
Update successful
Files are still there, so seem to be the other data. Fingers crossed!
Thank you :)
@jojomi: you are using mariadb 10, right?
@DeepDiver1975: I already discussed this in irc. Doctrine dbal 2.5.0 wrongly assumes that mariadb10 supports mysql 5.7 features.
See: https://github.com/doctrine/migrations/issues/196 https://github.com/doctrine/dbal/pull/742 https://github.com/doctrine/dbal/releases https://github.com/owncloud/core/issues/13071 https://github.com/owncloud/core/issues/13303
Same issue on my server, i am running mariaDB 10
we are working on integration of doctrine 2.5.1 for OC8.1 - we are running into some other issues there .... see #13537
so we have to wait for 8.1? to skip the migration test does not seem to be the safe way for the data ;)
@wallenium: backing up and trying with skip in a test environment? :-)
@wallenium it is safe in case you have a backup to revert to.
Would be an option, but time intensive ;) Waiting seems to be the better solution, as there seems to be a couple of other bugs, too ;)
Yes, I am using MariaDB 10.
Would be an option, but time intensive ;) Waiting seems to be the better solution, as there seems to be a couple of other bugs, too ;)
8.1 is scheduled for May ... shipping 2.5.1 with 8.0.1 (delivery in March) is currently out of scope.
Would be an option, but time intensive ;)
Well - you know - backups are always recommended ... don't blame us if data got eaten :speak_no_evil:
I know. i have backups ;) i cloned the system and tried to upgrade, upgrade was successful, seems to work. Thanks for your help.
I was able to bypass this table alter query error with the --skip-migration-test flag and am using MariaDB 10.0.16.
An exception occurred while executing 'ALTER TABLE oc_oc_appconfig_l3h0qk9vmxu2a RENAME INDEX appconfig_config_key_index TO oc_xd5q455qah20r': SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'INDEX appconfig_config_key_index TO oc_xd5q455qah20r' at line 1
Anyone have an account at the forums and could post that there? I see tons of duplicate posts there about this issue. :speak_no_evil:
@DeepDiver1975 is it possible to add a check or a warning for 8.0.1 ?
Upgrading from 7.0.4 to 8.0.0~beta2 (and then later to 8.0.0 final) worked for me on my server with mariadb-5.5.33-2.2.x86_64 on openSUSE 13.1 x86_64
--skip-migration-test did it for me
@DeepDiver1975 is it possible to add a check or a warning for 8.0.1 ?
Will have a look at this once we are sure we cannot ship dbal 2.5.1 for 8.0.1