Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

occ upgrade to version 8 fails with mariadb #14810

Closed
Blindfreddy opened this issue Mar 11, 2015 · 3 comments
Closed

occ upgrade to version 8 fails with mariadb #14810

Blindfreddy opened this issue Mar 11, 2015 · 3 comments

Comments

@Blindfreddy
Copy link

Upgraded owncloud backend to version 8.0.0.7. Running occ upgrade fails with following message

sudo -u www-data ./occ upgrade
Turned on maintenance mode
An exception occurred while executing 'ALTER TABLE oc_oc_appconfig_od0cqzqaec3u0 RENAME INDEX appconfig_config_key_index TO oc_vmv4gtsaq3y21':

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_vmv4gtsaq3y21' at line 1
Turned off maintenance mode
Update failed

The SQL statement is obviously jibberish, neither the table nor the index exists. Table oc_appconfig exists, and it has an index appconfig_config_key_index:
MariaDB [owncloud]> show indexes from oc_appconfig;
+--------------+------------+----------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment | Index_comment |
+--------------+------------+----------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
| oc_appconfig | 0 | PRIMARY | 1 | appid | A | 41 | NULL | NULL | | BTREE | | |
| oc_appconfig | 0 | PRIMARY | 2 | configkey | A | 83 | NULL | NULL | | BTREE | | |
| oc_appconfig | 1 | appconfig_config_key_index | 1 | configkey | A | 83 | NULL | NULL | | BTREE | | |
| oc_appconfig | 1 | appconfig_appid_key | 1 | appid | A | 41 | NULL | NULL | | BTREE | | |
+--------------+------------+----------------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+---------------+
4 rows in set (0.01 sec)

@ghost
Copy link

ghost commented Mar 11, 2015

Hi,

this is a known issue with OC 8.0.0 #14003 and was fixed with the today released 8.0.2: https://owncloud.org/changelog/

@Blindfreddy
Copy link
Author

Thanks, and forgive me for not noticing that this is a duplicate. I appended --skip-migration-test and it updated successfully on 8.0.0.7

sudo -u www-data ./occ upgrade --skip-migration-test
Turned on maintenance mode
Updated database
Turned off maintenance mode
Update successful

@ghost
Copy link

ghost commented Mar 11, 2015

@Blindfreddy
I would have recommended to directly upgrade to OC 8.0.2 instead of skipping the migration test.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants