Skip to content

Type mappings are not applied to platform when using migrations #29262

Closed

Description

@VicDeo

Basically #9806. Now for migrations only.

Steps to reproduce

  1. Install OC with MySQL
  2. Execute CREATE TABLE oc__enum_bit_test5kBmyPCe0uejl( bbit(1) DEFAULT NULL, e enum('1','2','3','4') COLLATE utf8_bin DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin
  3. Create a ISchemaMigration for any app, bump app version
  4. php occ upgrade

Expected behaviour

upgrade

Actual behaviour

2017-10-16T17:04:18+00:00 Doctrine\DBAL\DBALException: Unknown database type bit requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it.                                                                                                                         
2017-10-16T17:04:18+00:00 Update failed

Server configuration

Database:
mysql-community-server-5.6.37

ownCloud version: (see ownCloud admin page)
master

Where did you install ownCloud from:
git

{"reqId":"ag43VC4s1MjXyv6d29EM","level":3,"time":"2017-10-16T16:10:00+00:00","remoteAddr":"","user":"--","app":"core","method":"--","url":"--","message":"Exception: {"Exception":"Doctrine\DBAL\DBALException","Message":"Unknown database type bit requested, Doctrine\DBAL\Platforms\MySqlPlatform may not support it.","Code":0,"Trace":"
#0 /lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php(126): Doctrine\DBAL\Platforms\AbstractPlatform->getDoctrineTypeMapping('bit')
#1 /lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php(820): Doctrine\DBAL\Schema\MySqlSchemaManager->_getPortableTableColumnDefinition(Array)
#2 /lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php(175): Doctrine\DBAL\Schema\AbstractSchemaManager->_getPortableTableColumnList('oc__enum_bit_te...', 'octmp_mysql', Array)
#3 /lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php(281): Doctrine\DBAL\Schema\AbstractSchemaManager->listTableColumns('oc__enum_bit_te...')
#4 /lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php(268): Doctrine\DBAL\Schema\AbstractSchemaManager->listTableDetails('oc__enum_bit_te...')
#5 /lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php(1040): Doctrine\DBAL\Schema\AbstractSchemaManager->listTables()
#6 /lib/private/DB/Migrator.php(139): Doctrine\DBAL\Schema\AbstractSchemaManager->createSchema()
#7 /lib/private/DB/Connection.php(413): OC\DB\Migrator->createSchema()
#8 /lib/private/DB/MigrationService.php(400): OC\DB\Connection->createSchema()
#9 /lib/private/DB/MigrationService.php(358): OC\DB\MigrationService->executeStep(20170927201245)
#10 /lib/private/legacy/app.php(1074): OC\DB\MigrationService->migrate()
#11 /lib/private/Updater.php(307): OC_App::updateApp('dav')
#12 /lib/private/Updater.php(233): OC\Updater->doAppUpgrade()
#13 /lib/private/Updater.php(108): OC\Updater->doUpgrade('10.0.3.3', '10.0.3.3')
#14 /core/Command/Upgrade.php(254): OC\Updater->upgrade()
#15 /lib/composer/symfony/console/Command/Command.php(264): OC\Core\Command\Upgrade->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#16 /lib/composer/symfony/console/Application.php(874): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#17 /lib/composer/symfony/console/Application.php(228): Symfony\Component\Console\Application->doRunCommand(Object(OC\Core\Command\Upgrade), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#18 /lib/composer/symfony/console/Application.php(130): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#19 /lib/private/Console/Application.php(162): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#20 /console.php(106): OC\Console\Application->run()
#21 /occ(11): require_once('/home/deo/publi...')
#22 {main}","File":"/lib/composer/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php","Line":423}"}

Hint: 7d60f7a#diff-054ef00831a177b931682ea3550da06b

Activity

  1. added this to the triage milestone on Oct 16, 2017
  2. removed this from the triage milestone on Apr 10, 2018
  3. lock commented on Jul 30, 2019

    @lock

    This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions