nextbackup icon indicating copy to clipboard operation
nextbackup copied to clipboard

Restoring oc_news_folders column type

Open FriedCircuits opened this issue 6 years ago • 1 comments

I am trying to restore the oc_news tables to a new server and have come across the following issue. Server 1: Postgres 10 The structure.xml has the column opened as integer DB shows column as Boolean

Server 2: MySQL 5.7 Unable to restore because it expects the insert to be a integer but error shows the column as Boolean.

I believe MySQL uses only tinyints but I though that the backup/restore wasn't dependent on DB engine.

Table(s) could not be restored: Inserting data row failed: An exception occurred while executing 'INSERT INTO oc_news_folders (id,parent_id,name,user_id,opened,deleted_at,last_modified) SELECT ?,?,?,?,?,?,? FROM oc_news_folders WHERE id = ? AND parent_id = ? AND name = ? AND user_id = ? AND opened = ? AND deleted_at = ? AND last_modified = ? HAVING COUNT(*) = 0' with params [7, 0, "Gadgets", "username", false, 0, 1561702366343680, 7, 0, "Gadgets", "username", false, 0, 1561702366343680]: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'opened' at row 1

Similar errors with the other oc_news tables but I haven't investigated as much. The reason for this is because using News unread/starred import doesn't seem to work.

Ref https://github.com/nextcloud/news/issues/519

FriedCircuits avatar Jun 29 '19 20:06 FriedCircuits

Sounds like a problem in the Nextcloud (private) API and I'm not sure I can do anything about it. May be something like in #14.

pbek avatar Jun 29 '19 21:06 pbek