-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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 db:convert-type mysql -> UniqueConstraintViolationException #4914
Comments
This happens on the migration or afterwards? |
@nickvergessen this happens during the occ db:convert-type command, as soon as this error gets thrown it aborts the whole process and bails out with the error messages I have submitted. I had the same problem first with the oc_activity table but I could empty this table so I bypassed this issue but afaik it is not possible to empty the oc_filecache table, else I will have another type of issue (no files)... |
I can confirm I've had the same issue going from sqlite to mysql
|
@cbrompton What does the query return on your old database: SELECT * FROM `oc_filecache` WHERE `storage` = 9 AND `path_hash` = 'afe08a1c719049620553406d7946ef07' @hostingnuggets What does the query return on your old database: SELECT * FROM `oc_filecache` WHERE `fileid` = 463919 |
@nickvergessen below is the ouput of your query. I have modified the directory/filename for privacy reasons.
|
@nickvergessen was my output above helpful or do you need any more information? |
yeah a bit, but it is very odd. |
Okay the wrong hash aside. There is no order command on the import queries. The only think I can see is to hardcode order-by options for known tables. 😞 |
@MorrisJobke you have any other idea? |
No :/ |
From a user perspective is there any workaround on how I can migrate from PostgreSQL to MySQL without having to use the occ command? |
No. There is no other way than using our command line tool. |
@MorrisJobke I guess I will simply have to wait that you guys find the worm in this migration command. |
Well done guys! So this should fix my migration issue if I understand correctly? and is it possible that this feature will be available with Nextcloud 12.0.x or do I need to wait for Nextcloud 13? |
13 sadly, because the required changes are too big. |
No problem I will have to show a bit more patience in order to migrate away from PostgreSQL. |
You can try to hardcode it for the filecache, but then you will get a similar issue on the next table... So I would suggest to wait, thanks 😸 |
Steps to reproduce
Expected behaviour
Migrate Nextcloud PostgreSQL database to MySQL without any issues.
Actual behaviour
Server configuration
Operating system: Debian 7
Web server: nginx 1.8.1
Database: 9.1.24
PHP version: 5.6.30
Nextcloud version: 11.0.2
Updated from an older Nextcloud/ownCloud or fresh install: yes, updated
Where did you install Nextcloud from: from the shell
Signing status:
Signing status
List of activated apps:
App list
Nextcloud configuration:
Config report
Are you using external storage, if yes which one: local
Are you using encryption: no
Are you using an external user-backend, if yes which one: LDAP
LDAP configuration (delete this part if not used)
LDAP config
Client configuration
Browser: Firefox 45.0.9
Operating system: Debian 8
Logs
Web server error log
Web server error log
Nextcloud log (data/nextcloud.log)
Nextcloud log
Browser log
Browser log
The text was updated successfully, but these errors were encountered: