Skip to content

Upgrade to 7.0.0 fails on DB upgrade #9806

Description

@j-4

I followed the steps on http://doc.owncloud.org/server/7.0/admin_manual/maintenance/update.html to upgrade my instance.
Copied the config.php and my data directory to the new extracted folder and pointed the browser to this new directory -> click upgrade -> Fails
owncloud.log shows:

{"app":"core","message":"Simulated database structure update failed (exception 'Doctrine\DBAL\ConnectionException' with message 'There is no active transaction.' in /home/user0d/html/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/ConnectionException.php:42\nStack trace:\n#0 /home/user0d/html/owncloud/3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(984): Doctrine\DBAL\ConnectionException::noActiveTransaction()\n#1 /home/user0d/html/owncloud/lib/private/db/migrator.php(113): Doctrine\DBAL\Connection->commit()\n#2 /home/user0d/html/owncloud/lib/private/db/migrator.php(75): OC\DB\Migrator->checkTableMigrate(Object(Doctrine\DBAL\Schema\Table))\n#3 /home/user0d/html/owncloud/lib/private/db/mdb2schemamanager.php(110): OC\DB\Migrator->checkMigrate(Object(Doctrine\DBAL\Schema\Schema))\n#4 /home/user0d/html/owncloud/lib/private/db.php(337): OC\DB\MDB2SchemaManager->simulateUpdateDbFromStructure('/home/user0d/ha...')\n#5 /home/user0d/html/owncloud/lib/private/updater.php(186): OC_DB::simulateUpdateDbFromStructure('/home/user0d/ha...')\n#6 /home/user0d/html/owncloud/lib/private/updater.php(137): OC\Updater->doUpgrade('7.0.0.8', '6.0.4.1')\n#7 /home/user0d/html/owncloud/core/ajax/update.php(35): OC\Updater->upgrade()\n#8 {main})","level":4,"time":"2014-07-23T16:18:27+00:00"}

mysql5 database, apache server
If you need more informations, please shout :-)

Thanks for your great work!

Activity

  1. DeepDiver1975 commented on Jul 23, 2014

    @DeepDiver1975
    Contributor

    looks like mysql doesn't like this commit here:
    https://github.com/owncloud/core/blob/master/lib/private/db/migrator.php#L113

    That code should be guarded by an if statement ... will prepare a pull request

  2. added this to the milestone on Jul 23, 2014
  3. DeepDiver1975 commented on Jul 23, 2014

    @DeepDiver1975
    Contributor

    @j-4 feel free to apply this patch manually to your installation and rerun the upgrade procedure: https://github.com/owncloud/core/pull/9809/files

  4. j-4 commented on Jul 23, 2014

    @j-4
    Author

    H, thanks for your fast reply.

    I applied your patch, this issue seems to be gone now - however there is another database issue it seems. The update still fails.

    Unknown database type enum requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it.

    I cannot access the log entry atm, it will follow if you need it!
    Big thanks!

  5. DeepDiver1975 commented on Jul 23, 2014

    @DeepDiver1975
    Contributor

    hmm - are there any other tables in that database which do not belong to ownCloud?

  6. j-4 commented on Jul 23, 2014

    @j-4
    Author

    Great guess - yes!
    they have a different nametag however.

  7. DeepDiver1975 commented on Jul 23, 2014

    @DeepDiver1975
    Contributor
  8. DeepDiver1975 commented on Jul 23, 2014

    @DeepDiver1975
    Contributor

    @icewind1991 looks like we have issues with non owncloud tables and the migration - would you mind taking a look?

    There is a second issue where we are facing issue with unsupported type 'bit'

  9. DeepDiver1975 commented on Jul 23, 2014

    @DeepDiver1975
    Contributor

    There is a second issue where we are facing issue with unsupported type 'bit'

    #9812 (comment)

  10. j-4 commented on Jul 23, 2014

    @j-4
    Author

    to fix the enum issue you could try to apply these changes: https://github.com/owncloud/core/pull/7679/files

    Did not work :-(
    Here is the log entry:

    {"app":"core","message":"Simulated database structure update failed (exception 'OC\DB\MigrationException' with message 'Unknown database type enum requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it.' in /home/user0d/html/owncloud/lib/private/db/migrator.php:117\nStack trace:\n#0 /home/user0d/html/owncloud/lib/private/db/migrator.php(75): OC\DB\Migrator->checkTableMigrate(Object(Doctrine\DBAL\Schema\Table))\n#1 /home/user0d/html/owncloud/lib/private/db/mdb2schemamanager.php(141): OC\DB\Migrator->checkMigrate(Object(Doctrine\DBAL\Schema\Schema))\n#2 /home/user0d/html/owncloud/lib/private/db.php(337): OC\DB\MDB2SchemaManager->simulateUpdateDbFromStructure('/home/user0d/ha...')\n#3 /home/user0d/html/owncloud/lib/private/updater.php(186): OC_DB::simulateUpdateDbFromStructure('/home/user0d/ha...')\n#4 /home/user0d/html/owncloud/lib/private/updater.php(137): OC\Updater->doUpgrade('7.0.0.8', '6.0.4.1')\n#5 /home/user0d/html/owncloud/core/ajax/update.php(35): OC\Updater->upgrade()\n#6 {main})","level":4,"time":"2014-07-23T22:12:52+00:00"}

  11. DeepDiver1975 commented on Jul 23, 2014

    @DeepDiver1975
    Contributor

    Hmm - the only short term work around would be to split the databases.

  12. DeepDiver1975 commented on Jul 23, 2014

    @DeepDiver1975
    Contributor

    Assigning myself to fix this

  13. uusijani commented on Jul 24, 2014

    @uusijani

    I've worked around that enum error (since before owncloud 7 already) by adding this in 3rdparty/doctrine/dbal/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php:

    @@ -661,6 +661,7 @@
         protected function initializeDoctrineTypeMappings()
         {
             $this->doctrineTypeMapping = array(
    +            'enum' => 'string',
                 'tinyint'       => 'boolean',
                 'smallint'      => 'smallint',
                 'mediumint'     => 'integer',
  14. j-4 commented on Jul 24, 2014

    @j-4
    Author

    @uusijani Awesome! Thanks man, it works!

  15. DeepDiver1975 commented on Jul 24, 2014

    @DeepDiver1975
    Contributor

    will be fixed with 7.0.1

  16. StephaneCouturier commented on Jul 31, 2014

    @StephaneCouturier

    Hi, I met the same issues, so thank you for reporting and for the tips.

    I am running owncloud on a shared web host using mysql and I am trying to upgrade from latest oC6 to oC7.

    After changing the commit and the enum, I am still stuck with the upgrade:
    "
    This ownCloud instance is currently being updated, which may take a while.
    Please reload this page after a short time to continue using ownCloud.
    Contact your system administrator if this message persists or appeared unexpectedly.
    Thank you for your patience.
    "
    I have nothing in the owncloud.log (I cleared it before upgrading), so I don't know what to look fof.

    Thank you for your help,

  17. DeepDiver1975 commented on Jul 31, 2014

    @DeepDiver1975
    Contributor

    @StephaneCouturier in config/config.php please set the parameter maintenance_mode to false and reload the web page

  18. StephaneCouturier commented on Jul 31, 2014

    @StephaneCouturier

    Thank you, I tried changing "maintenance" => false,
    After this I came back to the screen to start the update again but the same thing happened.
    I have actually something in the log (I was looking at the wrong file previously):
    {"app":"PHP","message":"Zend OPcache API is restricted by "restrict_api" configuration directive at /home/xxxxxx/www/owncloud/lib/private/util.php#1370","level":3,"time":"2014-07-31T15:01:43+00:00"}

    Then I also tried to run the update after making sure I followed the full upgrade manual (removing all files/folder in your webroot except /data and /config)
    When Starting the update, I have now a new error message regarding a table that is not an ownCloud table (not starting with oc...)
    (This error message in visible on the web page, not in the owncloud.log)
    (I do have 'dbtableprefix' => 'oc_', in the config.php)

    An exception occurred while executing 'ALTER TABLE non_owncloud_table ENGINE=InnoDB;': SQLSTATE[HY000]: General error: 1214 The used table type doesn't support FULLTEXT indexes

    Thanks,

  19. locked as resolved and limited conversation to collaborators on Aug 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions