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

Upgrade from 8.2.11 to stable10 fails with postgresql #192

Open
jvillafanez opened this issue Jun 1, 2018 · 0 comments
Open

Upgrade from 8.2.11 to stable10 fails with postgresql #192

jvillafanez opened this issue Jun 1, 2018 · 0 comments
Assignees
Labels
Milestone

Comments

@jvillafanez
Copy link
Member

Steps to reproduce

  1. Install ownCloud 8.2.11 with postgresql
  2. Update to stable10 (10.0.8 - 10.0.9)
  3. Share a file

Expected behaviour

You can share a file

Actual behaviour

Error happens

Tests reveals the following stacktrace:

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'DELETE FROM "oc_notifications" WHERE ("app" = ?) AND ("user" = ?) AND ("object_type" = ?) AND ("object_id" = ?)' with params ["files_sharing", "test-share-user2", "local_share", "ocinternal:15877"]:

SQLSTATE[22P02]: Invalid text representation: 7 ERROR:  invalid input syntax for integer: "ocinternal:15877"

/drone/src/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractPostgreSQLDriver.php:99
/drone/src/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:184
/drone/src/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:158
/drone/src/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:1088
/drone/src/owncloud/lib/private/DB/Connection.php:207
/drone/src/owncloud/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Query/QueryBuilder.php:222
/drone/src/owncloud/lib/private/DB/QueryBuilder/QueryBuilder.php:141
/drone/src/owncloud/apps/notifications/lib/Handler.php:90
/drone/src/owncloud/apps/notifications/lib/App.php:67
/drone/src/owncloud/lib/private/Notification/Manager.php:284
/drone/src/owncloud/apps/files_sharing/lib/Service/NotificationPublisher.php:135
/drone/src/owncloud/apps/files_sharing/lib/Hooks.php:136
/drone/src/owncloud/lib/composer/symfony/event-dispatcher/EventDispatcher.php:212
/drone/src/owncloud/lib/composer/symfony/event-dispatcher/EventDispatcher.php:44
/drone/src/owncloud/lib/private/Share20/Manager.php:993
/drone/src/owncloud/apps/files_sharing/tests/SharedMountTest.php:92

It seems a migration step is missing. The "object_id" column of the "oc_notifications" table should be of the type string (or similar) not integer. This column was changed in ownCloud 9.0.x, but the migrations don't seem to take this into account.

Possible workarounds:

  • Update 8.2.11 -> 9.0.x -> 10.0.x
  • Manually change the type of the column in the DB.

Note that this problem should only affect to new shares created in 10.0.x. Shares creates during 8.2.11 should still be fine.

@jvillafanez jvillafanez added the bug label Jun 1, 2018
@jvillafanez jvillafanez added this to the backlog milestone Jun 1, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant