Can't add a user
hj-beckers opened this issue · 3 comments
Server: Ubuntu 20.04.3 (RaspberryPI)
PHP version 7.4.3
MariaDB version: 10.3.32
I installed the latest version. Trying to create a new user, the following error shows up in the log file:
{"reqId":"fzfP8FIJ2aiKZNpicgS7","level":3,"time":"2022-02-02T17:27:18+01:00","remoteAddr":"178.11.12.104","user":"me","app":"index","method":"POST","url":"/oc/index.php/apps/health/persons","message":"An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'enabled_module_medicine' in 'field list'","userAgent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36","version":"22.2.3.0","exception":{"Exception":"OC\DB\Exceptions\DbalException","Message":"An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'enabled_module_medicine' in 'field list'","Code":1054,"Trace":[{"file":"/var/www/html/oc/lib/private/DB/QueryBuilder/QueryBuilder.php","line":335,"function":"wrap","class":"OC\DB\Exceptions\DbalException","type":"::"},{"file":"/var/www/html/oc/lib/public/AppFramework/Db/QBMapper.php","line":139,"function":"executeStatement","class":"OC\DB\QueryBuilder\QueryBuilder","type":"->"},{"file":"/var/www/html/oc/apps/health/lib/Services/PersonsService.php","line":114,"function":"insert","class":"OCP\AppFramework\Db\QBMapper","type":"->"},{"file":"/var/www/html/oc/apps/health/lib/Controller/PersonsController.php","line":76,"function":"createPerson","class":"OCA\Health\Services\PersonsService","type":"->"},{"file":"/var/www/html/oc/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"create","class":"OCA\Health\Controller\PersonsController","type":"->"},{"file":"/var/www/html/oc/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/var/www/html/oc/lib/private/AppFramework/App.php","line":156,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/var/www/html/oc/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\AppFramework\App","type":"::"},{"file":"/var/www/html/oc/lib/base.php","line":1006,"function":"match","class":"OC\Route\Router","type":"->"},{"file":"/var/www/html/oc/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/oc/lib/private/DB/Exceptions/DbalException.php","Line":71,"Previous":{"Exception":"Doctrine\DBAL\Exception\InvalidFieldNameException","Message":"An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'enabled_module_medicine' in 'field list'","Code":1054,"Trace":[{"file":"/var/www/html/oc/3rdparty/doctrine/dbal/src/Connection.php","line":1780,"function":"convert","class":"Doctrine\DBAL\Driver\API\MySQL\ExceptionConverter","type":"->"},{"file":"/var/www/html/oc/3rdparty/doctrine/dbal/src/Connection.php","line":1719,"function":"handleDriverException","class":"Doctrine\DBAL\Connection","type":"->"},{"file":"/var/www/html/oc/3rdparty/doctrine/dbal/src/Connection.php","line":1173,"function":"convertExceptionDuringQuery","class":"Doctrine\DBAL\Connection","type":"->"},{"file":"/var/www/html/oc/lib/private/DB/Connection.php","line":267,"function":"executeStatement","class":"Doctrine\DBAL\Connection","type":"->"},{"file":"/var/www/html/oc/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":354,"function":"executeStatement","class":"OC\DB\Connection","type":"->"},{"file":"/var/www/html/oc/lib/private/DB/QueryBuilder/QueryBuilder.php","line":287,"function":"execute","class":"Doctrine\DBAL\Query\QueryBuilder","type":"->"},{"file":"/var/www/html/oc/lib/private/DB/QueryBuilder/QueryBuilder.php","line":333,"function":"execute","class":"OC\DB\QueryBuilder\QueryBuilder","type":"->"},{"file":"/var/www/html/oc/lib/public/AppFramework/Db/QBMapper.php","line":139,"function":"executeStatement","class":"OC\DB\QueryBuilder\QueryBuilder","type":"->"},{"file":"/var/www/html/oc/apps/health/lib/Services/PersonsService.php","line":114,"function":"insert","class":"OCP\AppFramework\Db\QBMapper","type":"->"},{"file":"/var/www/html/oc/apps/health/lib/Controller/PersonsController.php","line":76,"function":"createPerson","class":"OCA\Health\Services\PersonsService","type":"->"},{"file":"/var/www/html/oc/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"create","class":"OCA\Health\Controller\PersonsController","type":"->"},{"file":"/var/www/html/oc/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/var/www/html/oc/lib/private/AppFramework/App.php","line":156,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/var/www/html/oc/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\AppFramework\App","type":"::"},{"file":"/var/www/html/oc/lib/base.php","line":1006,"function":"match","class":"OC\Route\Router","type":"->"},{"file":"/var/www/html/oc/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/oc/3rdparty/doctrine/dbal/src/Driver/API/MySQL/ExceptionConverter.php","Line":65,"Previous":{"Exception":"Doctrine\DBAL\Driver\PDO\Exception","Message":"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'enabled_module_medicine' in 'field list'","Code":1054,"Trace":[{"file":"/var/www/html/oc/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":94,"function":"new","class":"Doctrine\DBAL\Driver\PDO\Exception","type":"::"},{"file":"/var/www/html/oc/3rdparty/doctrine/dbal/src/Connection.php","line":1163,"function":"execute","class":"Doctrine\DBAL\Driver\PDO\Statement","type":"->"},{"file":"/var/www/html/oc/lib/private/DB/Connection.php","line":267,"function":"executeStatement","class":"Doctrine\DBAL\Connection","type":"->"},{"file":"/var/www/html/oc/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":354,"function":"executeStatement","class":"OC\DB\Connection","type":"->"},{"file":"/var/www/html/oc/lib/private/DB/QueryBuilder/QueryBuilder.php","line":287,"function":"execute","class":"Doctrine\DBAL\Query\QueryBuilder","type":"->"},{"file":"/var/www/html/oc/lib/private/DB/QueryBuilder/QueryBuilder.php","line":333,"function":"execute","class":"OC\DB\QueryBuilder\QueryBuilder","type":"->"},{"file":"/var/www/html/oc/lib/public/AppFramework/Db/QBMapper.php","line":139,"function":"executeStatement","class":"OC\DB\QueryBuilder\QueryBuilder","type":"->"},{"file":"/var/www/html/oc/apps/health/lib/Services/PersonsService.php","line":114,"function":"insert","class":"OCP\AppFramework\Db\QBMapper","type":"->"},{"file":"/var/www/html/oc/apps/health/lib/Controller/PersonsController.php","line":76,"function":"createPerson","class":"OCA\Health\Services\PersonsService","type":"->"},{"file":"/var/www/html/oc/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"create","class":"OCA\Health\Controller\PersonsController","type":"->"},{"file":"/var/www/html/oc/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/var/www/html/oc/lib/private/AppFramework/App.php","line":156,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/var/www/html/oc/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\AppFramework\App","type":"::"},{"file":"/var/www/html/oc/lib/base.php","line":1006,"function":"match","class":"OC\Route\Router","type":"->"},{"file":"/var/www/html/oc/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/oc/3rdparty/doctrine/dbal/src/Driver/PDO/Exception.php","Line":26,"Previous":{"Exception":"PDOException","Message":"SQLSTATE[42S22]: Column not found: 1054 Unknown column 'enabled_module_medicine' in 'field list'","Code":"42S22","Trace":[{"file":"/var/www/html/oc/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","line":92,"function":"execute","class":"PDOStatement","type":"->"},{"file":"/var/www/html/oc/3rdparty/doctrine/dbal/src/Connection.php","line":1163,"function":"execute","class":"Doctrine\DBAL\Driver\PDO\Statement","type":"->"},{"file":"/var/www/html/oc/lib/private/DB/Connection.php","line":267,"function":"executeStatement","class":"Doctrine\DBAL\Connection","type":"->"},{"file":"/var/www/html/oc/3rdparty/doctrine/dbal/src/Query/QueryBuilder.php","line":354,"function":"executeStatement","class":"OC\DB\Connection","type":"->"},{"file":"/var/www/html/oc/lib/private/DB/QueryBuilder/QueryBuilder.php","line":287,"function":"execute","class":"Doctrine\DBAL\Query\QueryBuilder","type":"->"},{"file":"/var/www/html/oc/lib/private/DB/QueryBuilder/QueryBuilder.php","line":333,"function":"execute","class":"OC\DB\QueryBuilder\QueryBuilder","type":"->"},{"file":"/var/www/html/oc/lib/public/AppFramework/Db/QBMapper.php","line":139,"function":"executeStatement","class":"OC\DB\QueryBuilder\QueryBuilder","type":"->"},{"file":"/var/www/html/oc/apps/health/lib/Services/PersonsService.php","line":114,"function":"insert","class":"OCP\AppFramework\Db\QBMapper","type":"->"},{"file":"/var/www/html/oc/apps/health/lib/Controller/PersonsController.php","line":76,"function":"createPerson","class":"OCA\Health\Services\PersonsService","type":"->"},{"file":"/var/www/html/oc/lib/private/AppFramework/Http/Dispatcher.php","line":217,"function":"create","class":"OCA\Health\Controller\PersonsController","type":"->"},{"file":"/var/www/html/oc/lib/private/AppFramework/Http/Dispatcher.php","line":126,"function":"executeController","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/var/www/html/oc/lib/private/AppFramework/App.php","line":156,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->"},{"file":"/var/www/html/oc/lib/private/Route/Router.php","line":302,"function":"main","class":"OC\AppFramework\App","type":"::"},{"file":"/var/www/html/oc/lib/base.php","line":1006,"function":"match","class":"OC\Route\Router","type":"->"},{"file":"/var/www/html/oc/index.php","line":36,"function":"handleRequest","class":"OC","type":"::"}],"File":"/var/www/html/oc/3rdparty/doctrine/dbal/src/Driver/PDO/Statement.php","Line":92}}},"CustomMessage":"--"},"id":"61fab0f7836b4"}
I've already tried your suggestion in #21
hi, NC logs the db activities to avoid rerunning scripts.
You have to delete these logs, so NC thinks it never did the installing job.
Its not tested, but have a look at PREFIX_migrations and delete where app = 'health' in your db.
There were 10 entries from previous installtions.
There is a column missing. I don't know why. But do you have directly access to the db and can just add it manually?
Yes. Just give me the SQL statement.
I wonder if that ever could have run ...
the error
Error | index | OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'enabled_module_medicine' in 'field list'
is cleared, after I renamed the column name "enabled_module_medicin" in the db to "enabled_module_medicine" (note the missing e) which then matches the sql statement.
But now there is a new error:
OC\DB\Exceptions\DbalException: An exception occurred while executing a query: SQLSTATE[HY000]: General error: 1364 Field 'age' doesn't have a default value | vor einer Minute | |
---|---|---|
Could you give me a list of more "default values" or do I have to found them on my own with "trial and error" methods? |