Grocy: "no such table: recipes_nestings_resolved" after upgrading

Created on 29 Oct 2018  路  3Comments  路  Source: grocy/grocy

After upgrading using the update.sh script the tab Recipes cannot be opened anymore, as the table "recipes_nestings_resolved" was not created during the upgrade.

Slim Application Error
The application could not run because of the following error:

Details
Type: PDOException
Code: HY000
Message: SQLSTATE[HY000]: General error: 1 no such table: recipes_nestings_resolved
File: /var/www/grocy/vendor/morris/lessql/src/LessQL/Database.php
Line: 117
Trace
#0 /var/www/grocy/vendor/morris/lessql/src/LessQL/Database.php(117): PDO->prepare('SELECT * FROM `...')
#1 /var/www/grocy/vendor/morris/lessql/src/LessQL/Database.php(529): LessQL\Database->prepare('SELECT * FROM `...')
#2 /var/www/grocy/vendor/morris/lessql/src/LessQL/Result.php(162): LessQL\Database->select('recipes', Array)
#3 /var/www/grocy/vendor/morris/lessql/src/LessQL/Result.php(378): LessQL\Result->execute()
#4 /var/www/grocy/controllers/RecipesController.php(38): LessQL\Result->fetchAll()
#5 [internal function]: Grocy\Controllers\RecipesController->Overview(Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#6 /var/www/grocy/vendor/slim/slim/Slim/Handlers/Strategies/RequestResponse.php(41): call_user_func(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#7 /var/www/grocy/vendor/slim/slim/Slim/Route.php(356): Slim\Handlers\Strategies\RequestResponse->__invoke(Array, Object(Slim\Http\Request), Object(Slim\Http\Response), Array)
#8 /var/www/grocy/middleware/SessionAuthMiddleware.php(57): Slim\Route->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#9 [internal function]: Grocy\Middleware\SessionAuthMiddleware->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#10 /var/www/grocy/vendor/slim/slim/Slim/DeferredCallable.php(43): call_user_func_array(Object(Grocy\Middleware\SessionAuthMiddleware), Array)
#11 [internal function]: Slim\DeferredCallable->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#12 /var/www/grocy/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(70): call_user_func(Object(Slim\DeferredCallable), Object(Slim\Http\Request), Object(Slim\Http\Response), Object(Slim\Route))
#13 /var/www/grocy/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\Route->Slim\{closure}(Object(Slim\Http\Request), Object(Slim\Http\Response))
#14 /var/www/grocy/vendor/slim/slim/Slim/Route.php(334): Slim\Route->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#15 /var/www/grocy/vendor/slim/slim/Slim/App.php(515): Slim\Route->run(Object(Slim\Http\Request), Object(Slim\Http\Response))
#16 /var/www/grocy/vendor/slim/slim/Slim/MiddlewareAwareTrait.php(117): Slim\App->__invoke(Object(Slim\Http\Request), Object(Slim\Http\Response))
#17 /var/www/grocy/vendor/slim/slim/Slim/App.php(406): Slim\App->callMiddlewareStack(Object(Slim\Http\Request), Object(Slim\Http\Response))
#18 /var/www/grocy/vendor/slim/slim/Slim/App.php(314): Slim\App->process(Object(Slim\Http\Request), Object(Slim\Http\Response))
#19 /var/www/grocy/app.php(71): Slim\App->run()
#20 /var/www/grocy/public/index.php(3): require_once('/var/www/grocy/...')
#21 {main}
question

Most helpful comment

The view is in the database, client cache is not involved in this...

Maybe you just visited / in the meantime - as said, database migrations are only done on this route in the background...

All 3 comments

Cannot reproduce this, recipes_nestings_resolved is a new VIEW created in migration 43, migrations are done when visiting the root route (/) (also mentioned in README) - have you maybe directly opened the /recipes page?

Strange, it is working now as well on my server. Maybe the previous view was still cached by chrome?

The view is in the database, client cache is not involved in this...

Maybe you just visited / in the meantime - as said, database migrations are only done on this route in the background...

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jayaddison picture jayaddison  路  5Comments

OmgImAlexis picture OmgImAlexis  路  4Comments

jglauche picture jglauche  路  4Comments

skettydog picture skettydog  路  4Comments

OmgImAlexis picture OmgImAlexis  路  3Comments