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

Restoring oc_news_folders column type #35

Open
FriedCircuits opened this issue Jun 29, 2019 · 1 comment
Open

Restoring oc_news_folders column type #35

FriedCircuits opened this issue Jun 29, 2019 · 1 comment

Comments

@FriedCircuits
Copy link

FriedCircuits commented Jun 29, 2019

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
nextcloud/news#519

@pbek
Copy link
Owner

pbek commented Jun 29, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants