Skip to content

The column "junk_mailbox_id" on table "oc_mail_accounts" already exists #86

@guyvandenbosch-zichem

Description

@guyvandenbosch-zichem

Error enabling mail nexcloud hub 26 winter:

The column "junk_mailbox_id" on table "oc_mail_accounts" already exists

Database = mariadb 11.8-noble

nexcloud.log:

{"reqId":"oCwu0DMW9Mi2TEIs7Sjd","level":3,"time":"2026-03-24T10:29:43+00:00","remoteAddr":"192.168.0.1","user":"guy","app":"settings","method":"POST","url":"/settings/apps/enable","scriptName":"/index.php","message":"could not enable apps","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36","version":"33.0.0.16","exception":{"Exception":"Doctrine\DBAL\Schema\Exception\ColumnAlreadyExists","Message":"The column "junk_mailbox_id" on table "oc_mail_accounts" already exists.","Code":40,"Trace":[{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Schema/SchemaException.php","line":141,"function":"new","class":"Doctrine\DBAL\Schema\Exception\ColumnAlreadyExists","type":"::","args":["oc_mail_accounts","junk_mailbox_id"]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Schema/Table.php","line":482,"function":"columnAlreadyExists","class":"Doctrine\DBAL\Schema\SchemaException","type":"::","args":["oc_mail_accounts","junk_mailbox_id"]},{"file":"/var/www/html/3rdparty/doctrine/dbal/src/Schema/Table.php","line":344,"function":"addColumn","class":"Doctrine\DBAL\Schema\Table","type":"->","args":[{"class":"Doctrine\DBAL\Schema\Column"}]},{"file":"/var/www/html/custom_apps/mail/lib/Migration/Version3001Date20230307113544.php","line":23,"function":"addColumn","class":"Doctrine\DBAL\Schema\Table","type":"->","args":["junk_mailbox_id","integer",{"notnull":false,"default":null}]},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":427,"function":"changeSchema","class":"OCA\Mail\Migration\Version3001Date20230307113544","type":"->","args":[{"class":"OC\Migration\SimpleOutput"},{"class":"Closure"},{"tablePrefix":"oc"}]},{"file":"/var/www/html/lib/private/DB/MigrationService.php","line":393,"function":"migrateSchemaOnly","class":"OC\DB\MigrationService","type":"->","args":["latest"]},{"file":"/var/www/html/lib/private/Installer.php","line":546,"function":"migrate","class":"OC\DB\MigrationService","type":"->","args":["latest",true]},{"file":"/var/www/html/lib/private/Installer.php","line":93,"function":"installAppLastSteps","class":"OC\Installer","type":"->","args":["/var/www/html/custom_apps/mail",{"id":"mail","name":"Mail","summary":"\ud83d\udc8c A mail app for Nextcloud","description":"\ud83d\udc8c A mail app for Nextcloud\n\n- \ud83d\ude80 Integration with other Nextcloud apps! Currently Contacts, Calendar & Files \u2013 more to come.\n- \ud83d\udce5 Multiple mail accounts! Personal and company account? No problem, and a nice unified inbox. Connect any IMAP account.\n- \ud83d\udd12 Send & receive encrypted mails! Using the great Mailvelope browser extension.\n- \ud83d\ude48 We\u2019re not reinventing the wheel! Based on the great Horde libraries.\n- \ud83d\udcec Want to host your own mail server? We do not have to reimplement this as you could set up Mail-in-a-Box!\n\n## Ethical AI Rating\n\n### Priority Inbox\n\nPositive:\n* The software for training and inferencing of this model is open source.\n* The model is created and trained on-premises based on the user's own data.\n* The training data is accessible to the user, making it possible to check or correct for bias or optimise the performance and CO2 usage.\n\n### Thread Summaries (opt-in)\n\nRating: \ud83d\udfe2/\ud83d\udfe1/\ud83d\udfe0/\ud83d\udd34\n\nThe rating depends on the installed text processing backend. See the rating overview for details.\n\nLearn more about the Nextcloud Ethical AI Rating in our blog.\n\t","version":"5.7.4","0":"And 21 more entries, set log level to debug to see all entries"},null,"no"]},{"file":"/var/www/html/apps/settings/lib/Controller/AppSettingsController.php","line":582,"function":"installApp","class":"OC\Installer","type":"->","args":["mail"]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":205,"function":"enableApps","class":"OCA\Settings\Controller\AppSettingsController","type":"->","args":[["mail"],[]]},{"file":"/var/www/html/lib/private/AppFramework/Http/Dispatcher.php","line":118,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\Settings\Controller\AppSettingsController"},"enableApps"]},{"file":"/var/www/html/lib/private/AppFramework/App.php","line":153,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"class":"OCA\Settings\Controller\AppSettingsController"},"enableApps"]},{"file":"/var/www/html/lib/private/Route/Router.php","line":321,"function":"main","class":"OC\AppFramework\App","type":"::","args":["OCA\Settings\Controller\AppSettingsController","enableApps",{"class":"OC\AppFramework\DependencyInjection\DIContainer"},{"_route":"settings.appsettings.enableapps"}]},{"file":"/var/www/html/lib/base.php","line":1155,"function":"match","class":"OC\Route\Router","type":"->","args":["/settings/apps/enable"]},{"file":"/var/www/html/index.php","line":25,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/var/www/html/3rdparty/doctrine/dbal/src/Schema/Exception/ColumnAlreadyExists.php","Line":15,"message":"could not enable apps","exception":"{"class":"Doctrine\DBAL\Schema\Exception\ColumnAlreadyExists","message":"The column \"junk_mailbox_id\" on table \"oc_mail_accounts\" already exists.","code":40,"file":"/var/www/html/3rdparty/doctrine/dbal/src/Schema/Exception/ColumnAlreadyExists.php:15","trace":"#0 /var/www/html/3rdparty/doctrine/dbal/src/Schema/SchemaException.php(141): Doctrine\DBAL\Schema\Exception\ColumnAlreadyExists::new('oc_mail_account...', 'junk_mailbox_id')\n#1 /var/www/html/3rdparty/doctrine/dbal/src/Schema/Table.php(482): Doctrine\DBAL\Schema\SchemaException::columnAlreadyExists('oc_mail_account...', 'junk_mailbox_id')\n#2 /var/www/html/3rdparty/doctrine/dbal/src/Schema/Table.php(344): Doctrine\DBAL\Schema\Table->_addColumn(Object(Doctrine\DBAL\Schema\Column))\n#3 /var/www/html/custom_apps/mail/lib/Migration/Version3001Date20230307113544.php(23): Doctrine\DBAL\Schema\Table->addColumn('junk_mailbox_id', 'integer', Array)\n#4 /var/www/html/lib/private/DB/MigrationService.php(427): OCA\Mail\Migration\Version3001Date20230307113544->changeSchema(Object(OC\Migration\SimpleOutput), Object(Closure), Array)\n#5 /var/www/html/lib/private/DB/MigrationService.php(393): OC\DB\MigrationService->migrateSchemaOnly('latest')\n#6 /var/www/html/lib/private/Installer.php(546): OC\DB\MigrationService->migrate('latest', true)\n#7 /var/www/html/lib/private/Installer.php(93): OC\Installer->installAppLastSteps('/var/www/html/c...', Array, NULL, 'no')\n#8 /var/www/html/apps/settings/lib/Controller/AppSettingsController.php(582): OC\Installer->installApp('mail')\n#9 /var/www/html/lib/private/AppFramework/Http/Dispatcher.php(205): OCA\Settings\Controller\AppSettingsController->enableApps(Array, Array)\n#10 /var/www/html/lib/private/AppFramework/Http/Dispatcher.php(118): OC\AppFramework\Http\Dispatcher->executeController(Object(OCA\Settings\Controller\AppSettingsController), 'enableApps')\n#11 /var/www/html/lib/private/AppFramework/App.php(153): OC\AppFramework\Http\Dispatcher->dispatch(Object(OCA\Settings\Controller\AppSettingsController), 'enableApps')\n#12 /var/www/html/lib/private/Route/Router.php(321): OC\AppFramework\App::main('OCA\\Settings\\Co...', 'enableApps', Object(OC\AppFramework\DependencyInjection\DIContainer), Array)\n#13 /var/www/html/lib/base.php(1155): OC\Route\Router->match('/settings/apps/...')\n#14 /var/www/html/index.php(25): OC::handleRequest()\n#15 {main}"}","CustomMessage":"could not enable apps"}}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions