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

Migrate old metadata table to the new ones #41465

Merged
merged 1 commit into from
Nov 16, 2023
Merged

Conversation

artonge
Copy link
Contributor

@artonge artonge commented Nov 14, 2023

Signed-off-by: Louis Chemineau louis@chmn.me

@artonge artonge self-assigned this Nov 14, 2023
@artonge artonge added 3. to review Waiting for reviews php Pull requests that update Php code feature: files labels Nov 14, 2023
@artonge artonge added this to the Nextcloud 28 milestone Nov 14, 2023
@artonge
Copy link
Contributor Author

artonge commented Nov 14, 2023

Pinging nick just for DB expertise

Copy link
Member

@nickvergessen nickvergessen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing autoloader update

core/Migrations/Version280000Date20231114145605.php Outdated Show resolved Hide resolved
core/Migrations/Version280000Date20231114135824.php Outdated Show resolved Hide resolved
This was referenced Nov 14, 2023
@artonge artonge marked this pull request as draft November 15, 2023 09:05
@artonge artonge force-pushed the artonge/migrate_metadata branch 5 times, most recently from 1df1bbf to 28c15df Compare November 15, 2023 17:30
@artonge artonge marked this pull request as ready for review November 15, 2023 17:31
@artonge artonge requested review from a team, Altahrim and sorbaugh and removed request for a team November 16, 2023 08:03
Signed-off-by: Louis Chemineau <louis@chmn.me>
@artonge artonge merged commit 9c3350b into master Nov 16, 2023
50 checks passed
@artonge artonge deleted the artonge/migrate_metadata branch November 16, 2023 10:20
@MichaIng
Copy link
Member

MichaIng commented Nov 19, 2023

It seems we have a chicken&egg issue here when upgrading via web UI: The page throws an internal server error, caused by the missing files_metadata table, before the migration can be even applied:

{"reqId":"HxcBDrK6I4FzTVtUfi8b","level":4,"time":"2023-11-19T23:46:40+01:00","remoteAddr":"192.168.1.1","user":"--","app":"core","method":"GET","url":"/nextcloud/index.php/apps/files/preview-service-worker.js","message":"An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 OPR/106.0.0.0 (Edition developer)","version":"28.0.0.3","exception":{"Exception":"Doctrine\\DBAL\\Exception\\TableNotFoundException","Message":"An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist","Code":1146,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1938,"function":"convert","class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1880,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1105,"function":"convertExceptionDuringQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php","line":171,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1324,"function":"get","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1374,"function":"getCacheEntry","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/Root.php","line":203,"function":"getFileInfo","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php","line":161,"function":"get","class":"OC\\Files\\Node\\Root","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/AppData/AppData.php","line":132,"function":"get","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php","line":365,"function":"getFolder","class":"OC\\Files\\AppData\\AppData","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php","line":101,"function":"getRootFolder","class":"OCA\\Theming\\ImageManager","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php","line":432,"function":"getImage","class":"OCA\\Theming\\ImageManager","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php","line":403,"function":"getCustomFavicon","class":"OCA\\Theming\\ThemingDefaults","type":"->"},{"file":"/var/www/nextcloud/lib/private/URLGenerator.php","line":222,"function":"replaceImagePath","class":"OCA\\Theming\\ThemingDefaults","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/template/functions.php","line":249,"function":"imagePath","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/nextcloud/core/templates/layout.guest.php","line":20,"function":"image_path"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":180,"args":["/var/www/nextcloud/core/templates/layout.guest.php"],"function":"include"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":150,"function":"load","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":139,"function":"fetchPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":170,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php","line":211,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":182,"function":"render","class":"OCP\\AppFramework\\Http\\TemplateResponse","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1117,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php","Line":49,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist","Code":1146,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":132,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1098,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php","line":171,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1324,"function":"get","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1374,"function":"getCacheEntry","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/Root.php","line":203,"function":"getFileInfo","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php","line":161,"function":"get","class":"OC\\Files\\Node\\Root","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/AppData/AppData.php","line":132,"function":"get","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php","line":365,"function":"getFolder","class":"OC\\Files\\AppData\\AppData","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php","line":101,"function":"getRootFolder","class":"OCA\\Theming\\ImageManager","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php","line":432,"function":"getImage","class":"OCA\\Theming\\ImageManager","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php","line":403,"function":"getCustomFavicon","class":"OCA\\Theming\\ThemingDefaults","type":"->"},{"file":"/var/www/nextcloud/lib/private/URLGenerator.php","line":222,"function":"replaceImagePath","class":"OCA\\Theming\\ThemingDefaults","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/template/functions.php","line":249,"function":"imagePath","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/nextcloud/core/templates/layout.guest.php","line":20,"function":"image_path"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":180,"args":["/var/www/nextcloud/core/templates/layout.guest.php"],"function":"include"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":150,"function":"load","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":139,"function":"fetchPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":170,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php","line":211,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":182,"function":"render","class":"OCP\\AppFramework\\Http\\TemplateResponse","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1117,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":28,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist","Code":"42S02","Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":130,"function":"execute","class":"PDOStatement","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1098,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php","line":171,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1324,"function":"get","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1374,"function":"getCacheEntry","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/Root.php","line":203,"function":"getFileInfo","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php","line":161,"function":"get","class":"OC\\Files\\Node\\Root","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/AppData/AppData.php","line":132,"function":"get","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php","line":365,"function":"getFolder","class":"OC\\Files\\AppData\\AppData","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php","line":101,"function":"getRootFolder","class":"OCA\\Theming\\ImageManager","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php","line":432,"function":"getImage","class":"OCA\\Theming\\ImageManager","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php","line":403,"function":"getCustomFavicon","class":"OCA\\Theming\\ThemingDefaults","type":"->"},{"file":"/var/www/nextcloud/lib/private/URLGenerator.php","line":222,"function":"replaceImagePath","class":"OCA\\Theming\\ThemingDefaults","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/template/functions.php","line":249,"function":"imagePath","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/nextcloud/core/templates/layout.guest.php","line":20,"function":"image_path"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":180,"args":["/var/www/nextcloud/core/templates/layout.guest.php"],"function":"include"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":150,"function":"load","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":139,"function":"fetchPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":170,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/public/AppFramework/Http/TemplateResponse.php","line":211,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":182,"function":"render","class":"OCP\\AppFramework\\Http\\TemplateResponse","type":"->"},{"file":"/var/www/nextcloud/lib/private/AppFramework/App.php","line":184,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->"},{"file":"/var/www/nextcloud/lib/private/Route/Router.php","line":315,"function":"main","class":"OC\\AppFramework\\App","type":"::"},{"file":"/var/www/nextcloud/lib/base.php","line":1117,"function":"match","class":"OC\\Route\\Router","type":"->"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","Line":130}},"message":"An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist","exception":{},"CustomMessage":"An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist"}}
{"reqId":"HxcBDrK6I4FzTVtUfi8b","level":3,"time":"2023-11-19T23:46:40+01:00","remoteAddr":"192.168.1.1","user":"--","app":"core","method":"GET","url":"/nextcloud/index.php/apps/files/preview-service-worker.js","message":"Exception thrown: Doctrine\\DBAL\\Exception\\TableNotFoundException","userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/119.0.0.0 Safari/537.36 OPR/106.0.0.0 (Edition developer)","version":"28.0.0.3","exception":{"Exception":"Doctrine\\DBAL\\Exception\\TableNotFoundException","Message":"An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist","Code":1146,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1938,"function":"convert","class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1880,"function":"handleDriverException","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1105,"function":"convertExceptionDuringQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php","line":171,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1324,"function":"get","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1374,"function":"getCacheEntry","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/Root.php","line":203,"function":"getFileInfo","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php","line":161,"function":"get","class":"OC\\Files\\Node\\Root","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/AppData/AppData.php","line":132,"function":"get","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php","line":365,"function":"getFolder","class":"OC\\Files\\AppData\\AppData","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php","line":101,"function":"getRootFolder","class":"OCA\\Theming\\ImageManager","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php","line":432,"function":"getImage","class":"OCA\\Theming\\ImageManager","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php","line":403,"function":"getCustomFavicon","class":"OCA\\Theming\\ThemingDefaults","type":"->"},{"file":"/var/www/nextcloud/lib/private/URLGenerator.php","line":222,"function":"replaceImagePath","class":"OCA\\Theming\\ThemingDefaults","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/template/functions.php","line":249,"function":"imagePath","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/nextcloud/core/templates/layout.guest.php","line":20,"function":"image_path"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":180,"args":["/var/www/nextcloud/core/templates/layout.guest.php"],"function":"include"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":150,"function":"load","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":139,"function":"fetchPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":170,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":258,"function":"printPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":1123,"function":"printErrorPage","class":"OC_Template","type":"::"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php","Line":49,"Previous":{"Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception","Message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist","Code":1146,"Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":132,"function":"new","class":"Doctrine\\DBAL\\Driver\\PDO\\Exception","type":"::"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1098,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php","line":171,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1324,"function":"get","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1374,"function":"getCacheEntry","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/Root.php","line":203,"function":"getFileInfo","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php","line":161,"function":"get","class":"OC\\Files\\Node\\Root","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/AppData/AppData.php","line":132,"function":"get","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php","line":365,"function":"getFolder","class":"OC\\Files\\AppData\\AppData","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php","line":101,"function":"getRootFolder","class":"OCA\\Theming\\ImageManager","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php","line":432,"function":"getImage","class":"OCA\\Theming\\ImageManager","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php","line":403,"function":"getCustomFavicon","class":"OCA\\Theming\\ThemingDefaults","type":"->"},{"file":"/var/www/nextcloud/lib/private/URLGenerator.php","line":222,"function":"replaceImagePath","class":"OCA\\Theming\\ThemingDefaults","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/template/functions.php","line":249,"function":"imagePath","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/nextcloud/core/templates/layout.guest.php","line":20,"function":"image_path"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":180,"args":["/var/www/nextcloud/core/templates/layout.guest.php"],"function":"include"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":150,"function":"load","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":139,"function":"fetchPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":170,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":258,"function":"printPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":1123,"function":"printErrorPage","class":"OC_Template","type":"::"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":28,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist","Code":"42S02","Trace":[{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":130,"function":"execute","class":"PDOStatement","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php","line":1098,"function":"execute","class":"Doctrine\\DBAL\\Driver\\PDO\\Statement","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/Connection.php","line":261,"function":"executeQuery","class":"Doctrine\\DBAL\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":337,"function":"executeQuery","class":"OC\\DB\\Connection","type":"->"},{"file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":377,"function":"executeQuery","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php","line":280,"function":"execute","class":"Doctrine\\DBAL\\Query\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php","line":171,"function":"execute","class":"OC\\DB\\QueryBuilder\\QueryBuilder","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1324,"function":"get","class":"OC\\Files\\Cache\\Cache","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/View.php","line":1374,"function":"getCacheEntry","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/Root.php","line":203,"function":"getFileInfo","class":"OC\\Files\\View","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php","line":161,"function":"get","class":"OC\\Files\\Node\\Root","type":"->"},{"file":"/var/www/nextcloud/lib/private/Files/AppData/AppData.php","line":132,"function":"get","class":"OC\\Files\\Node\\LazyFolder","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php","line":365,"function":"getFolder","class":"OC\\Files\\AppData\\AppData","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php","line":101,"function":"getRootFolder","class":"OCA\\Theming\\ImageManager","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php","line":432,"function":"getImage","class":"OCA\\Theming\\ImageManager","type":"->"},{"file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php","line":403,"function":"getCustomFavicon","class":"OCA\\Theming\\ThemingDefaults","type":"->"},{"file":"/var/www/nextcloud/lib/private/URLGenerator.php","line":222,"function":"replaceImagePath","class":"OCA\\Theming\\ThemingDefaults","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/template/functions.php","line":249,"function":"imagePath","class":"OC\\URLGenerator","type":"->"},{"file":"/var/www/nextcloud/core/templates/layout.guest.php","line":20,"function":"image_path"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":180,"args":["/var/www/nextcloud/core/templates/layout.guest.php"],"function":"include"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":150,"function":"load","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":139,"function":"fetchPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":170,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/private/Template/Base.php","line":132,"function":"fetchPage","class":"OC_Template","type":"->"},{"file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php","line":258,"function":"printPage","class":"OC\\Template\\Base","type":"->"},{"file":"/var/www/nextcloud/lib/base.php","line":1123,"function":"printErrorPage","class":"OC_Template","type":"::"},{"file":"/var/www/nextcloud/index.php","line":37,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","Line":130}},"CustomMessage":"Exception thrown: Doctrine\\DBAL\\Exception\\TableNotFoundException"}}

Ah least it works via occ upgrade from the console, unlocking the website again.

Btw, is it intended that there is now both: file_metadata as well as files_metadata?

| oc_file_locks               |
| oc_file_metadata            |
| oc_filecache                |
| oc_filecache_extended       |
| oc_files_metadata           |
| oc_files_metadata_index     |

@artonge
Copy link
Contributor Author

artonge commented Nov 20, 2023

I think a similar issue has already been fixed. @ArtificialOwl maybe when could add another check?

Btw, is it intended that there is now both: file_metadata as well as files_metadata?
Yes, the former is supposed to be deleted.

FYI, the logs are not caused by this PR.

@nickvergessen
Copy link
Member

It's of course a bit weird that GET /nextcloud/index.php/apps/files/preview-service-worker.js is ran on any page, including the updater...

@MichaIng
Copy link
Member

MichaIng commented Dec 2, 2023

I retested on a fresh default Nextcloud 27 installation, switched to beta channel, and ran into the same error with NC 28 RC2. The web interface, where one should be able to run the database upgrade/migrations, throws:
image

Overall 3 log entries are created when accessing the web UI once:

{
  "reqId":"a8I9W7EWv1mow3hiaxI8",
  "level":3,
  "time":"2023-12-02T15:39:55+00:00",
  "remoteAddr":"192.168.1.46",
  "user":"--",
  "app":"index",
  "method":"GET",
  "url":"/nextcloud/",
  "message":"An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist",
  "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 OPR/106.0.0.0 (Edition developer)",
  "version":"27.1.4.1",
  "exception":{
    "Exception":"Doctrine\\DBAL\\Exception\\TableNotFoundException",
    "Message":"An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist",
    "Code":1146,
    "Trace":[
      {
        "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
        "line":1938,
        "function":"convert",
        "class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
        "line":1880,
        "function":"handleDriverException",
        "class":"Doctrine\\DBAL\\Connection",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
        "line":1105,
        "function":"convertExceptionDuringQuery",
        "class":"Doctrine\\DBAL\\Connection",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/DB/Connection.php",
        "line":261,
        "function":"executeQuery",
        "class":"Doctrine\\DBAL\\Connection",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
        "line":337,
        "function":"executeQuery",
        "class":"OC\\DB\\Connection",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
        "line":377,
        "function":"executeQuery",
        "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
        "line":280,
        "function":"execute",
        "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
        "line":171,
        "function":"execute",
        "class":"OC\\DB\\QueryBuilder\\QueryBuilder",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Files/View.php",
        "line":1324,
        "function":"get",
        "class":"OC\\Files\\Cache\\Cache",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Files/View.php",
        "line":1374,
        "function":"getCacheEntry",
        "class":"OC\\Files\\View",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Files/Node/Root.php",
        "line":203,
        "function":"getFileInfo",
        "class":"OC\\Files\\View",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php",
        "line":161,
        "function":"get",
        "class":"OC\\Files\\Node\\Root",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Files/AppData/AppData.php",
        "line":132,
        "function":"get",
        "class":"OC\\Files\\Node\\LazyFolder",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php",
        "line":365,
        "function":"getFolder",
        "class":"OC\\Files\\AppData\\AppData",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php",
        "line":101,
        "function":"getRootFolder",
        "class":"OCA\\Theming\\ImageManager",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php",
        "line":432,
        "function":"getImage",
        "class":"OCA\\Theming\\ImageManager",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php",
        "line":403,
        "function":"getCustomFavicon",
        "class":"OCA\\Theming\\ThemingDefaults",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/URLGenerator.php",
        "line":231,
        "function":"replaceImagePath",
        "class":"OCA\\Theming\\ThemingDefaults",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/legacy/template/functions.php",
        "line":249,
        "function":"imagePath",
        "class":"OC\\URLGenerator",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/core/templates/layout.guest.php",
        "line":20,
        "function":"image_path"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Template/Base.php",
        "line":180,
        "args":[
          "/var/www/nextcloud/core/templates/layout.guest.php"
        ],
        "function":"include"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Template/Base.php",
        "line":150,
        "function":"load",
        "class":"OC\\Template\\Base",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
        "line":139,
        "function":"fetchPage",
        "class":"OC\\Template\\Base",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
        "line":170,
        "function":"fetchPage",
        "class":"OC_Template",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Template/Base.php",
        "line":132,
        "function":"fetchPage",
        "class":"OC_Template",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/base.php",
        "line":413,
        "function":"printPage",
        "class":"OC\\Template\\Base",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/base.php",
        "line":1019,
        "function":"printUpgradePage",
        "class":"OC",
        "type":"::"
      },
      {
        "file":"/var/www/nextcloud/index.php",
        "line":37,
        "function":"handleRequest",
        "class":"OC",
        "type":"::"
      }
    ],
    "File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php",
    "Line":49,
    "Previous":{
      "Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception",
      "Message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist",
      "Code":1146,
      "Trace":[
        {
          "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
          "line":132,
          "function":"new",
          "class":"Doctrine\\DBAL\\Driver\\PDO\\Exception",
          "type":"::"
        },
        {
          "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
          "line":1098,
          "function":"execute",
          "class":"Doctrine\\DBAL\\Driver\\PDO\\Statement",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/DB/Connection.php",
          "line":261,
          "function":"executeQuery",
          "class":"Doctrine\\DBAL\\Connection",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
          "line":337,
          "function":"executeQuery",
          "class":"OC\\DB\\Connection",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
          "line":377,
          "function":"executeQuery",
          "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
          "line":280,
          "function":"execute",
          "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
          "line":171,
          "function":"execute",
          "class":"OC\\DB\\QueryBuilder\\QueryBuilder",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Files/View.php",
          "line":1324,
          "function":"get",
          "class":"OC\\Files\\Cache\\Cache",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Files/View.php",
          "line":1374,
          "function":"getCacheEntry",
          "class":"OC\\Files\\View",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Files/Node/Root.php",
          "line":203,
          "function":"getFileInfo",
          "class":"OC\\Files\\View",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php",
          "line":161,
          "function":"get",
          "class":"OC\\Files\\Node\\Root",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Files/AppData/AppData.php",
          "line":132,
          "function":"get",
          "class":"OC\\Files\\Node\\LazyFolder",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php",
          "line":365,
          "function":"getFolder",
          "class":"OC\\Files\\AppData\\AppData",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php",
          "line":101,
          "function":"getRootFolder",
          "class":"OCA\\Theming\\ImageManager",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php",
          "line":432,
          "function":"getImage",
          "class":"OCA\\Theming\\ImageManager",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php",
          "line":403,
          "function":"getCustomFavicon",
          "class":"OCA\\Theming\\ThemingDefaults",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/URLGenerator.php",
          "line":231,
          "function":"replaceImagePath",
          "class":"OCA\\Theming\\ThemingDefaults",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/legacy/template/functions.php",
          "line":249,
          "function":"imagePath",
          "class":"OC\\URLGenerator",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/core/templates/layout.guest.php",
          "line":20,
          "function":"image_path"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Template/Base.php",
          "line":180,
          "args":[
            "/var/www/nextcloud/core/templates/layout.guest.php"
          ],
          "function":"include"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Template/Base.php",
          "line":150,
          "function":"load",
          "class":"OC\\Template\\Base",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
          "line":139,
          "function":"fetchPage",
          "class":"OC\\Template\\Base",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
          "line":170,
          "function":"fetchPage",
          "class":"OC_Template",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Template/Base.php",
          "line":132,
          "function":"fetchPage",
          "class":"OC_Template",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/base.php",
          "line":413,
          "function":"printPage",
          "class":"OC\\Template\\Base",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/base.php",
          "line":1019,
          "function":"printUpgradePage",
          "class":"OC",
          "type":"::"
        },
        {
          "file":"/var/www/nextcloud/index.php",
          "line":37,
          "function":"handleRequest",
          "class":"OC",
          "type":"::"
        }
      ],
      "File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php",
      "Line":28,
      "Previous":{
        "Exception":"PDOException",
        "Message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist",
        "Code":"42S02",
        "Trace":[
          {
            "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
            "line":130,
            "function":"execute",
            "class":"PDOStatement",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
            "line":1098,
            "function":"execute",
            "class":"Doctrine\\DBAL\\Driver\\PDO\\Statement",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/DB/Connection.php",
            "line":261,
            "function":"executeQuery",
            "class":"Doctrine\\DBAL\\Connection",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
            "line":337,
            "function":"executeQuery",
            "class":"OC\\DB\\Connection",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
            "line":377,
            "function":"executeQuery",
            "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
            "line":280,
            "function":"execute",
            "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
            "line":171,
            "function":"execute",
            "class":"OC\\DB\\QueryBuilder\\QueryBuilder",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Files/View.php",
            "line":1324,
            "function":"get",
            "class":"OC\\Files\\Cache\\Cache",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Files/View.php",
            "line":1374,
            "function":"getCacheEntry",
            "class":"OC\\Files\\View",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Files/Node/Root.php",
            "line":203,
            "function":"getFileInfo",
            "class":"OC\\Files\\View",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php",
            "line":161,
            "function":"get",
            "class":"OC\\Files\\Node\\Root",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Files/AppData/AppData.php",
            "line":132,
            "function":"get",
            "class":"OC\\Files\\Node\\LazyFolder",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php",
            "line":365,
            "function":"getFolder",
            "class":"OC\\Files\\AppData\\AppData",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php",
            "line":101,
            "function":"getRootFolder",
            "class":"OCA\\Theming\\ImageManager",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php",
            "line":432,
            "function":"getImage",
            "class":"OCA\\Theming\\ImageManager",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php",
            "line":403,
            "function":"getCustomFavicon",
            "class":"OCA\\Theming\\ThemingDefaults",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/URLGenerator.php",
            "line":231,
            "function":"replaceImagePath",
            "class":"OCA\\Theming\\ThemingDefaults",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/legacy/template/functions.php",
            "line":249,
            "function":"imagePath",
            "class":"OC\\URLGenerator",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/core/templates/layout.guest.php",
            "line":20,
            "function":"image_path"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Template/Base.php",
            "line":180,
            "args":[
              "/var/www/nextcloud/core/templates/layout.guest.php"
            ],
            "function":"include"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Template/Base.php",
            "line":150,
            "function":"load",
            "class":"OC\\Template\\Base",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
            "line":139,
            "function":"fetchPage",
            "class":"OC\\Template\\Base",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
            "line":170,
            "function":"fetchPage",
            "class":"OC_Template",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Template/Base.php",
            "line":132,
            "function":"fetchPage",
            "class":"OC_Template",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/base.php",
            "line":413,
            "function":"printPage",
            "class":"OC\\Template\\Base",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/base.php",
            "line":1019,
            "function":"printUpgradePage",
            "class":"OC",
            "type":"::"
          },
          {
            "file":"/var/www/nextcloud/index.php",
            "line":37,
            "function":"handleRequest",
            "class":"OC",
            "type":"::"
          }
        ],
        "File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
        "Line":130
      }
    },
    "message":"An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist",
    "exception":{
      
    },
    "CustomMessage":"An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist"
  }
}{
  "reqId":"a8I9W7EWv1mow3hiaxI8",
  "level":3,
  "time":"2023-12-02T15:39:55+00:00",
  "remoteAddr":"192.168.1.46",
  "user":"--",
  "app":"core",
  "method":"GET",
  "url":"/nextcloud/",
  "message":"Exception thrown: Doctrine\\DBAL\\Exception\\TableNotFoundException",
  "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 OPR/106.0.0.0 (Edition developer)",
  "version":"27.1.4.1",
  "exception":{
    "Exception":"Doctrine\\DBAL\\Exception\\TableNotFoundException",
    "Message":"An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist",
    "Code":1146,
    "Trace":[
      {
        "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
        "line":1938,
        "function":"convert",
        "class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
        "line":1880,
        "function":"handleDriverException",
        "class":"Doctrine\\DBAL\\Connection",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
        "line":1105,
        "function":"convertExceptionDuringQuery",
        "class":"Doctrine\\DBAL\\Connection",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/DB/Connection.php",
        "line":261,
        "function":"executeQuery",
        "class":"Doctrine\\DBAL\\Connection",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
        "line":337,
        "function":"executeQuery",
        "class":"OC\\DB\\Connection",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
        "line":377,
        "function":"executeQuery",
        "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
        "line":280,
        "function":"execute",
        "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
        "line":171,
        "function":"execute",
        "class":"OC\\DB\\QueryBuilder\\QueryBuilder",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Files/View.php",
        "line":1324,
        "function":"get",
        "class":"OC\\Files\\Cache\\Cache",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Files/View.php",
        "line":1374,
        "function":"getCacheEntry",
        "class":"OC\\Files\\View",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Files/Node/Root.php",
        "line":203,
        "function":"getFileInfo",
        "class":"OC\\Files\\View",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php",
        "line":161,
        "function":"get",
        "class":"OC\\Files\\Node\\Root",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Files/AppData/AppData.php",
        "line":132,
        "function":"get",
        "class":"OC\\Files\\Node\\LazyFolder",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php",
        "line":365,
        "function":"getFolder",
        "class":"OC\\Files\\AppData\\AppData",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php",
        "line":101,
        "function":"getRootFolder",
        "class":"OCA\\Theming\\ImageManager",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php",
        "line":432,
        "function":"getImage",
        "class":"OCA\\Theming\\ImageManager",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php",
        "line":403,
        "function":"getCustomFavicon",
        "class":"OCA\\Theming\\ThemingDefaults",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/URLGenerator.php",
        "line":231,
        "function":"replaceImagePath",
        "class":"OCA\\Theming\\ThemingDefaults",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/legacy/template/functions.php",
        "line":249,
        "function":"imagePath",
        "class":"OC\\URLGenerator",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/core/templates/layout.guest.php",
        "line":20,
        "function":"image_path"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Template/Base.php",
        "line":180,
        "args":[
          "/var/www/nextcloud/core/templates/layout.guest.php"
        ],
        "function":"include"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Template/Base.php",
        "line":150,
        "function":"load",
        "class":"OC\\Template\\Base",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
        "line":139,
        "function":"fetchPage",
        "class":"OC\\Template\\Base",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
        "line":170,
        "function":"fetchPage",
        "class":"OC_Template",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Template/Base.php",
        "line":132,
        "function":"fetchPage",
        "class":"OC_Template",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/base.php",
        "line":413,
        "function":"printPage",
        "class":"OC\\Template\\Base",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/base.php",
        "line":1019,
        "function":"printUpgradePage",
        "class":"OC",
        "type":"::"
      },
      {
        "file":"/var/www/nextcloud/index.php",
        "line":37,
        "function":"handleRequest",
        "class":"OC",
        "type":"::"
      }
    ],
    "File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php",
    "Line":49,
    "Previous":{
      "Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception",
      "Message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist",
      "Code":1146,
      "Trace":[
        {
          "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
          "line":132,
          "function":"new",
          "class":"Doctrine\\DBAL\\Driver\\PDO\\Exception",
          "type":"::"
        },
        {
          "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
          "line":1098,
          "function":"execute",
          "class":"Doctrine\\DBAL\\Driver\\PDO\\Statement",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/DB/Connection.php",
          "line":261,
          "function":"executeQuery",
          "class":"Doctrine\\DBAL\\Connection",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
          "line":337,
          "function":"executeQuery",
          "class":"OC\\DB\\Connection",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
          "line":377,
          "function":"executeQuery",
          "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
          "line":280,
          "function":"execute",
          "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
          "line":171,
          "function":"execute",
          "class":"OC\\DB\\QueryBuilder\\QueryBuilder",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Files/View.php",
          "line":1324,
          "function":"get",
          "class":"OC\\Files\\Cache\\Cache",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Files/View.php",
          "line":1374,
          "function":"getCacheEntry",
          "class":"OC\\Files\\View",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Files/Node/Root.php",
          "line":203,
          "function":"getFileInfo",
          "class":"OC\\Files\\View",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php",
          "line":161,
          "function":"get",
          "class":"OC\\Files\\Node\\Root",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Files/AppData/AppData.php",
          "line":132,
          "function":"get",
          "class":"OC\\Files\\Node\\LazyFolder",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php",
          "line":365,
          "function":"getFolder",
          "class":"OC\\Files\\AppData\\AppData",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php",
          "line":101,
          "function":"getRootFolder",
          "class":"OCA\\Theming\\ImageManager",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php",
          "line":432,
          "function":"getImage",
          "class":"OCA\\Theming\\ImageManager",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php",
          "line":403,
          "function":"getCustomFavicon",
          "class":"OCA\\Theming\\ThemingDefaults",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/URLGenerator.php",
          "line":231,
          "function":"replaceImagePath",
          "class":"OCA\\Theming\\ThemingDefaults",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/legacy/template/functions.php",
          "line":249,
          "function":"imagePath",
          "class":"OC\\URLGenerator",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/core/templates/layout.guest.php",
          "line":20,
          "function":"image_path"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Template/Base.php",
          "line":180,
          "args":[
            "/var/www/nextcloud/core/templates/layout.guest.php"
          ],
          "function":"include"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Template/Base.php",
          "line":150,
          "function":"load",
          "class":"OC\\Template\\Base",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
          "line":139,
          "function":"fetchPage",
          "class":"OC\\Template\\Base",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
          "line":170,
          "function":"fetchPage",
          "class":"OC_Template",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Template/Base.php",
          "line":132,
          "function":"fetchPage",
          "class":"OC_Template",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/base.php",
          "line":413,
          "function":"printPage",
          "class":"OC\\Template\\Base",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/base.php",
          "line":1019,
          "function":"printUpgradePage",
          "class":"OC",
          "type":"::"
        },
        {
          "file":"/var/www/nextcloud/index.php",
          "line":37,
          "function":"handleRequest",
          "class":"OC",
          "type":"::"
        }
      ],
      "File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php",
      "Line":28,
      "Previous":{
        "Exception":"PDOException",
        "Message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist",
        "Code":"42S02",
        "Trace":[
          {
            "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
            "line":130,
            "function":"execute",
            "class":"PDOStatement",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
            "line":1098,
            "function":"execute",
            "class":"Doctrine\\DBAL\\Driver\\PDO\\Statement",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/DB/Connection.php",
            "line":261,
            "function":"executeQuery",
            "class":"Doctrine\\DBAL\\Connection",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
            "line":337,
            "function":"executeQuery",
            "class":"OC\\DB\\Connection",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
            "line":377,
            "function":"executeQuery",
            "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
            "line":280,
            "function":"execute",
            "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
            "line":171,
            "function":"execute",
            "class":"OC\\DB\\QueryBuilder\\QueryBuilder",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Files/View.php",
            "line":1324,
            "function":"get",
            "class":"OC\\Files\\Cache\\Cache",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Files/View.php",
            "line":1374,
            "function":"getCacheEntry",
            "class":"OC\\Files\\View",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Files/Node/Root.php",
            "line":203,
            "function":"getFileInfo",
            "class":"OC\\Files\\View",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php",
            "line":161,
            "function":"get",
            "class":"OC\\Files\\Node\\Root",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Files/AppData/AppData.php",
            "line":132,
            "function":"get",
            "class":"OC\\Files\\Node\\LazyFolder",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php",
            "line":365,
            "function":"getFolder",
            "class":"OC\\Files\\AppData\\AppData",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php",
            "line":101,
            "function":"getRootFolder",
            "class":"OCA\\Theming\\ImageManager",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php",
            "line":432,
            "function":"getImage",
            "class":"OCA\\Theming\\ImageManager",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php",
            "line":403,
            "function":"getCustomFavicon",
            "class":"OCA\\Theming\\ThemingDefaults",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/URLGenerator.php",
            "line":231,
            "function":"replaceImagePath",
            "class":"OCA\\Theming\\ThemingDefaults",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/legacy/template/functions.php",
            "line":249,
            "function":"imagePath",
            "class":"OC\\URLGenerator",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/core/templates/layout.guest.php",
            "line":20,
            "function":"image_path"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Template/Base.php",
            "line":180,
            "args":[
              "/var/www/nextcloud/core/templates/layout.guest.php"
            ],
            "function":"include"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Template/Base.php",
            "line":150,
            "function":"load",
            "class":"OC\\Template\\Base",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
            "line":139,
            "function":"fetchPage",
            "class":"OC\\Template\\Base",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
            "line":170,
            "function":"fetchPage",
            "class":"OC_Template",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Template/Base.php",
            "line":132,
            "function":"fetchPage",
            "class":"OC_Template",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/base.php",
            "line":413,
            "function":"printPage",
            "class":"OC\\Template\\Base",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/base.php",
            "line":1019,
            "function":"printUpgradePage",
            "class":"OC",
            "type":"::"
          },
          {
            "file":"/var/www/nextcloud/index.php",
            "line":37,
            "function":"handleRequest",
            "class":"OC",
            "type":"::"
          }
        ],
        "File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
        "Line":130
      }
    },
    "CustomMessage":"Exception thrown: Doctrine\\DBAL\\Exception\\TableNotFoundException"
  }
}{
  "reqId":"a8I9W7EWv1mow3hiaxI8",
  "level":3,
  "time":"2023-12-02T15:39:55+00:00",
  "remoteAddr":"192.168.1.46",
  "user":"--",
  "app":"core",
  "method":"GET",
  "url":"/nextcloud/",
  "message":"Exception thrown: Doctrine\\DBAL\\Exception\\TableNotFoundException",
  "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36 OPR/106.0.0.0 (Edition developer)",
  "version":"27.1.4.1",
  "exception":{
    "Exception":"Doctrine\\DBAL\\Exception\\TableNotFoundException",
    "Message":"An exception occurred while executing a query: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist",
    "Code":1146,
    "Trace":[
      {
        "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
        "line":1938,
        "function":"convert",
        "class":"Doctrine\\DBAL\\Driver\\API\\MySQL\\ExceptionConverter",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
        "line":1880,
        "function":"handleDriverException",
        "class":"Doctrine\\DBAL\\Connection",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
        "line":1105,
        "function":"convertExceptionDuringQuery",
        "class":"Doctrine\\DBAL\\Connection",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/DB/Connection.php",
        "line":261,
        "function":"executeQuery",
        "class":"Doctrine\\DBAL\\Connection",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
        "line":337,
        "function":"executeQuery",
        "class":"OC\\DB\\Connection",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
        "line":377,
        "function":"executeQuery",
        "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
        "line":280,
        "function":"execute",
        "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
        "line":171,
        "function":"execute",
        "class":"OC\\DB\\QueryBuilder\\QueryBuilder",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Files/View.php",
        "line":1324,
        "function":"get",
        "class":"OC\\Files\\Cache\\Cache",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Files/View.php",
        "line":1374,
        "function":"getCacheEntry",
        "class":"OC\\Files\\View",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Files/Node/Root.php",
        "line":203,
        "function":"getFileInfo",
        "class":"OC\\Files\\View",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php",
        "line":161,
        "function":"get",
        "class":"OC\\Files\\Node\\Root",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Files/AppData/AppData.php",
        "line":132,
        "function":"get",
        "class":"OC\\Files\\Node\\LazyFolder",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php",
        "line":365,
        "function":"getFolder",
        "class":"OC\\Files\\AppData\\AppData",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php",
        "line":101,
        "function":"getRootFolder",
        "class":"OCA\\Theming\\ImageManager",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php",
        "line":432,
        "function":"getImage",
        "class":"OCA\\Theming\\ImageManager",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php",
        "line":403,
        "function":"getCustomFavicon",
        "class":"OCA\\Theming\\ThemingDefaults",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/URLGenerator.php",
        "line":231,
        "function":"replaceImagePath",
        "class":"OCA\\Theming\\ThemingDefaults",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/legacy/template/functions.php",
        "line":249,
        "function":"imagePath",
        "class":"OC\\URLGenerator",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/core/templates/layout.guest.php",
        "line":20,
        "function":"image_path"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Template/Base.php",
        "line":180,
        "args":[
          "/var/www/nextcloud/core/templates/layout.guest.php"
        ],
        "function":"include"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Template/Base.php",
        "line":150,
        "function":"load",
        "class":"OC\\Template\\Base",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
        "line":139,
        "function":"fetchPage",
        "class":"OC\\Template\\Base",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
        "line":170,
        "function":"fetchPage",
        "class":"OC_Template",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/Template/Base.php",
        "line":132,
        "function":"fetchPage",
        "class":"OC_Template",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
        "line":291,
        "function":"printPage",
        "class":"OC\\Template\\Base",
        "type":"->"
      },
      {
        "file":"/var/www/nextcloud/index.php",
        "line":87,
        "function":"printExceptionErrorPage",
        "class":"OC_Template",
        "type":"::"
      }
    ],
    "File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php",
    "Line":49,
    "Previous":{
      "Exception":"Doctrine\\DBAL\\Driver\\PDO\\Exception",
      "Message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist",
      "Code":1146,
      "Trace":[
        {
          "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
          "line":132,
          "function":"new",
          "class":"Doctrine\\DBAL\\Driver\\PDO\\Exception",
          "type":"::"
        },
        {
          "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
          "line":1098,
          "function":"execute",
          "class":"Doctrine\\DBAL\\Driver\\PDO\\Statement",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/DB/Connection.php",
          "line":261,
          "function":"executeQuery",
          "class":"Doctrine\\DBAL\\Connection",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
          "line":337,
          "function":"executeQuery",
          "class":"OC\\DB\\Connection",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
          "line":377,
          "function":"executeQuery",
          "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
          "line":280,
          "function":"execute",
          "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
          "line":171,
          "function":"execute",
          "class":"OC\\DB\\QueryBuilder\\QueryBuilder",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Files/View.php",
          "line":1324,
          "function":"get",
          "class":"OC\\Files\\Cache\\Cache",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Files/View.php",
          "line":1374,
          "function":"getCacheEntry",
          "class":"OC\\Files\\View",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Files/Node/Root.php",
          "line":203,
          "function":"getFileInfo",
          "class":"OC\\Files\\View",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php",
          "line":161,
          "function":"get",
          "class":"OC\\Files\\Node\\Root",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Files/AppData/AppData.php",
          "line":132,
          "function":"get",
          "class":"OC\\Files\\Node\\LazyFolder",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php",
          "line":365,
          "function":"getFolder",
          "class":"OC\\Files\\AppData\\AppData",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php",
          "line":101,
          "function":"getRootFolder",
          "class":"OCA\\Theming\\ImageManager",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php",
          "line":432,
          "function":"getImage",
          "class":"OCA\\Theming\\ImageManager",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php",
          "line":403,
          "function":"getCustomFavicon",
          "class":"OCA\\Theming\\ThemingDefaults",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/URLGenerator.php",
          "line":231,
          "function":"replaceImagePath",
          "class":"OCA\\Theming\\ThemingDefaults",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/legacy/template/functions.php",
          "line":249,
          "function":"imagePath",
          "class":"OC\\URLGenerator",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/core/templates/layout.guest.php",
          "line":20,
          "function":"image_path"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Template/Base.php",
          "line":180,
          "args":[
            "/var/www/nextcloud/core/templates/layout.guest.php"
          ],
          "function":"include"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Template/Base.php",
          "line":150,
          "function":"load",
          "class":"OC\\Template\\Base",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
          "line":139,
          "function":"fetchPage",
          "class":"OC\\Template\\Base",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
          "line":170,
          "function":"fetchPage",
          "class":"OC_Template",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/Template/Base.php",
          "line":132,
          "function":"fetchPage",
          "class":"OC_Template",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
          "line":291,
          "function":"printPage",
          "class":"OC\\Template\\Base",
          "type":"->"
        },
        {
          "file":"/var/www/nextcloud/index.php",
          "line":87,
          "function":"printExceptionErrorPage",
          "class":"OC_Template",
          "type":"::"
        }
      ],
      "File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php",
      "Line":28,
      "Previous":{
        "Exception":"PDOException",
        "Message":"SQLSTATE[42S02]: Base table or view not found: 1146 Table 'nextcloud.oc_files_metadata' doesn't exist",
        "Code":"42S02",
        "Trace":[
          {
            "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
            "line":130,
            "function":"execute",
            "class":"PDOStatement",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Connection.php",
            "line":1098,
            "function":"execute",
            "class":"Doctrine\\DBAL\\Driver\\PDO\\Statement",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/DB/Connection.php",
            "line":261,
            "function":"executeQuery",
            "class":"Doctrine\\DBAL\\Connection",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
            "line":337,
            "function":"executeQuery",
            "class":"OC\\DB\\Connection",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php",
            "line":377,
            "function":"executeQuery",
            "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/DB/QueryBuilder/QueryBuilder.php",
            "line":280,
            "function":"execute",
            "class":"Doctrine\\DBAL\\Query\\QueryBuilder",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Files/Cache/Cache.php",
            "line":171,
            "function":"execute",
            "class":"OC\\DB\\QueryBuilder\\QueryBuilder",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Files/View.php",
            "line":1324,
            "function":"get",
            "class":"OC\\Files\\Cache\\Cache",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Files/View.php",
            "line":1374,
            "function":"getCacheEntry",
            "class":"OC\\Files\\View",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Files/Node/Root.php",
            "line":203,
            "function":"getFileInfo",
            "class":"OC\\Files\\View",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Files/Node/LazyFolder.php",
            "line":161,
            "function":"get",
            "class":"OC\\Files\\Node\\Root",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Files/AppData/AppData.php",
            "line":132,
            "function":"get",
            "class":"OC\\Files\\Node\\LazyFolder",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php",
            "line":365,
            "function":"getFolder",
            "class":"OC\\Files\\AppData\\AppData",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/apps/theming/lib/ImageManager.php",
            "line":101,
            "function":"getRootFolder",
            "class":"OCA\\Theming\\ImageManager",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php",
            "line":432,
            "function":"getImage",
            "class":"OCA\\Theming\\ImageManager",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/apps/theming/lib/ThemingDefaults.php",
            "line":403,
            "function":"getCustomFavicon",
            "class":"OCA\\Theming\\ThemingDefaults",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/URLGenerator.php",
            "line":231,
            "function":"replaceImagePath",
            "class":"OCA\\Theming\\ThemingDefaults",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/legacy/template/functions.php",
            "line":249,
            "function":"imagePath",
            "class":"OC\\URLGenerator",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/core/templates/layout.guest.php",
            "line":20,
            "function":"image_path"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Template/Base.php",
            "line":180,
            "args":[
              "/var/www/nextcloud/core/templates/layout.guest.php"
            ],
            "function":"include"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Template/Base.php",
            "line":150,
            "function":"load",
            "class":"OC\\Template\\Base",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
            "line":139,
            "function":"fetchPage",
            "class":"OC\\Template\\Base",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
            "line":170,
            "function":"fetchPage",
            "class":"OC_Template",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/Template/Base.php",
            "line":132,
            "function":"fetchPage",
            "class":"OC_Template",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/lib/private/legacy/OC_Template.php",
            "line":291,
            "function":"printPage",
            "class":"OC\\Template\\Base",
            "type":"->"
          },
          {
            "file":"/var/www/nextcloud/index.php",
            "line":87,
            "function":"printExceptionErrorPage",
            "class":"OC_Template",
            "type":"::"
          }
        ],
        "File":"/var/www/nextcloud/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php",
        "Line":130
      }
    },
    "CustomMessage":"Exception thrown: Doctrine\\DBAL\\Exception\\TableNotFoundException"
  }
}

Yes, this PR does not cause the logs/error, but it does not solve it (which it aims to) when using the web updater, since the new table is expected before this migration can run. Let me know whether I should open a new issue for this, as it is serious and must block NC 28 release.

@nickvergessen
Copy link
Member

Please raise a new issue, add the feedback 28 label and ping AndyScherzinger

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews feature: files php Pull requests that update Php code
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants