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

Updating Nextcloud 12.0.5 to 13.0.0.rc2 fails on Postgres #7960

Closed
BernhardPosselt opened this issue Jan 19, 2018 · 6 comments
Closed

Updating Nextcloud 12.0.5 to 13.0.0.rc2 fails on Postgres #7960

BernhardPosselt opened this issue Jan 19, 2018 · 6 comments
Assignees

Comments

@BernhardPosselt
Copy link
Member

Upgraded to the latest git commit today from 12.0.4 to 12.0.5, then went for stable13. The update fails with

Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE oc_jobs ALTER id TYPE BIGSERIAL':  SQLSTATE[42704]: Undefined object: 7 ERROR:  type "bigserial" does not exist

@MorrisJobke asked me to post these links:

I suppose the migration steps do not work properly for postgres and you didnt run into these issues because you started with a fresh 12.x.x installation

Server configuration

Operating system: Debian stable

Web server: Apache

Database: Postgres 9.6

PHP version: 5.6

Where did you install Nextcloud from: git

Enabled:

  • bookmarks: 0.10.1
  • calendar: 1.5.7
  • caniupdate: 0.1.1
  • comments: 1.2.0
  • contacts: 2.0.1
  • dav: 1.3.1
  • federatedfilesharing: 1.2.0
  • files: 1.7.2
  • files_sharing: 1.4.0
  • lookup_server_connector: 1.0.0
  • news: 12.0.0
  • oauth2: 1.0.5
  • provisioning_api: 1.2.0
  • sharebymail: 1.2.0
  • spreed: 2.0.2
  • systemtags: 1.2.0
  • theming: 1.3.0
  • twofactor_backupcodes: 1.1.1
  • workflowengine: 1.2.0

Disabled:

  • admin_audit
  • encryption
  • federation
  • files_encryption
  • files_external
  • files_trashbin
  • files_versions
  • testing
  • updatenotification
  • user_ldap
{
    "system": {
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": [
            "domain.com"
        ],
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "overwritewebroot": "",
        "dbtype": "pgsql",
        "version": "12.0.5.1",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbtableprefix": "oc_",
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "theme": "",
        "maintenance": false,
        "forcessl": true,
        "overwrite.cli.url": "\/owncloud",
        "loglevel": 0,
        "debug": false,
        "appstoreurl": "https:\/\/apps.nextcloud.com\/api\/v0",
        "htaccess.RewriteBase": "\/owncloud"
    }
}

Are you using encryption: no

Client configuration

Browser: Firefox stable

Operating system: Arch Linux

@BernhardPosselt
Copy link
Member Author

cc @nickvergessen

@nickvergessen
Copy link
Member

Stacktrace?

@BernhardPosselt
Copy link
Member Author

Don't think a stack trace will really help here. It happens in the migration code. If you want one I'll post one tomorrow

@BernhardPosselt
Copy link
Member Author

{
   "reqId":"2fUQbJUYga0eD3eYrAB8",
   "level":3,
   "time":"2018-01-20T11:25:52+00:00",
   "remoteAddr":"2a02:8388:6a82:3580:8ad7:f6ff:fec7:3749",
   "user":"--",
   "app":"core",
   "method":"GET",
   "url":"\/owncloud\/core\/ajax\/update.php?requesttoken=s1trTBIQ71iyFHJsyymhu8pM9hidShMXLF7nhWXpi4o%3D%3A5z1dGntUqG%2F3WDg1%2FmGZ6qU7kVL6YV9Nbh%2Bd1g7C5ec%3D",
   "message":"Exception: {\"Exception\":\"Doctrine\\\\DBAL\\\\Exception\\\\DriverException\",\"Message\":\"An exception occurred while executing 'ALTER TABLE oc_jobs ALTER id TYPE BIGSERIAL':\\n\\nSQLSTATE[42704]: Undefined object: 7 ERROR:  type \\\"bigserial\\\" does not exist\",\"Code\":0,\"Trace\":\"#0 \\\/var\\\/www\\\/html\\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/DBALException.php(128): Doctrine\\\\DBAL\\\\Driver\\\\AbstractPostgreSQLDriver->convertException('An exception oc...', Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException))\\n#1 \\\/var\\\/www\\\/html\\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Connection.php(964): Doctrine\\\\DBAL\\\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOPgSql\\\\Driver), Object(Doctrine\\\\DBAL\\\\Driver\\\\PDOException), 'ALTER TABLE oc_...')\\n#2 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/DB\\\/Migrator.php(260): Doctrine\\\\DBAL\\\\Connection->query('ALTER TABLE oc_...')\\n#3 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/DB\\\/Migrator.php(83): OC\\\\DB\\\\Migrator->applySchema(Object(Doctrine\\\\DBAL\\\\Schema\\\\Schema))\\n#4 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/DB\\\/Connection.php(446): OC\\\\DB\\\\Migrator->migrate(Object(Doctrine\\\\DBAL\\\\Schema\\\\Schema))\\n#5 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/DB\\\/MigrationService.php(434): OC\\\\DB\\\\Connection->migrateToSchema(Object(Doctrine\\\\DBAL\\\\Schema\\\\Schema))\\n#6 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/DB\\\/MigrationService.php(389): OC\\\\DB\\\\MigrationService->executeStep('13000Date201709...')\\n#7 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Updater.php(312): OC\\\\DB\\\\MigrationService->migrate()\\n#8 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Updater.php(260): OC\\\\Updater->doCoreUpgrade()\\n#9 \\\/var\\\/www\\\/html\\\/owncloud\\\/lib\\\/private\\\/Updater.php(139): OC\\\\Updater->doUpgrade('13.0.0.11', '12.0.5.1')\\n#10 \\\/var\\\/www\\\/html\\\/owncloud\\\/core\\\/ajax\\\/update.php(212): OC\\\\Updater->upgrade()\\n#11 {main}\",\"File\":\"\\\/var\\\/www\\\/html\\\/owncloud\\\/3rdparty\\\/doctrine\\\/dbal\\\/lib\\\/Doctrine\\\/DBAL\\\/Driver\\\/AbstractPostgreSQLDriver.php\",\"Line\":91}",
   "userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:57.0) Gecko\/20100101 Firefox\/57.0",
   "version":"12.0.5.1"
}

@nickvergessen
Copy link
Member

Fixed by git submodule update

@MorrisJobke
Copy link
Member

Just use the built in updater and you would not run into such easy problems ;) https://docs.nextcloud.com/server/12/admin_manual/maintenance/update.html

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

3 participants