Open arkeyme opened 3 years ago
You need to run migrations, which will add that missing column for you - php artisan migrate
Unfortunetely, I already did it, but it failed too, with this exception:
root@host_test:/var/www/snipeit# php artisan down
Application is now in maintenance mode.
root@host_test:/var/www/snipeit# php artisan migrate
**************************************
* Application In Production! *
**************************************
Do you really wish to run this command? (yes/no) [no]:
> yes
Migrating: 2018_08_20_204842_add_depreciation_option_to_settings
Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs (SQL: alter table `settings` add `depreciation_method` char(10) null default 'default')
at /var/www/snipeit/vendor/laravel/framework/src/Illuminate/Database/Connection.php:669
665| // If an exception occurs when attempting to run a query, we'll format the error
666| // message to include the bindings with SQL, which will make this exception a
667| // lot more helpful to the developer instead of just the database's errors.
668| catch (Exception $e) {
> 669| throw new QueryException(
670| $query, $this->prepareBindings($bindings), $e
671| );
672| }
673|
Exception trace:
1 Doctrine\DBAL\Driver\PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs")
/var/www/snipeit/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:131
2 PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs")
/var/www/snipeit/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:129
Please use the argument -v to see more details.
We've seen that one before - there's a (terrible) article on MariaDB's website here about it. This points to the recommended solution - changing the table's ROW_FORMAT
to DYNAMIC
- https://mariadb.com/kb/en/troubleshooting-row-size-too-large-errors-with-innodb/#converting-the-table-to-the-dynamic-row-format
So you'll want to run this at a SQL prompt:
ALTER TABLE settings ROW_FORMAT=DYNAMIC;
Then, you should be able to run your migrations again. You may also find that some other migrations have a similar issue - find out which table they're referring to, and make the same alteration - then you'll be able to complete migrations.
MariaDB KnowledgeBaseFixing "Row size too large (> 8126). Changing some columns to TEXT or BLOB may help."
Thank you!
mysql
use snipeit;
ALTER TABLE settings ROW_FORMAT=DYNAMIC;
Helps me
Thank you!
mysql use snipeit; ALTER TABLE settings ROW_FORMAT=DYNAMIC;
Helps me
Hello Arkeyme im having a similar problem with you while migrating, I have the same error :
Illuminate\Database\QueryException : SQLSTATE[42000]: Syntax error or access violation: 1118 Row size too large. The maximum row size for the used table type, not counting BLOBs, is 8126. This includes storage overhead, check the manual
When I try the commands you mention on mysql ( using phpmyadmin window) I get the following error:
Table mydatabasename.settings doesn't exists
Did this worked for you? I see you reopened the issue 6 days ago.
Note: Im trying to upgrade from 4.7.4 to current stable 5.0.12
Please confirm you have done the following before posting your bug report:
Describe the bug I was tried to update snip-it from v4.8.0 to v5.1.4 using this guide: https://snipe-it.readme.io/docs/switching-to-a-git-install
After that all is seems to be fine except LDAP setting which has not to be working. I cant login using my LDAP account, which obviously worked before upgrade. I tried to change and save settings on LDAP config page and got 500 error. After I enabled Debug mode I see this:
I saved this page to the snip-it-error.zip file
Also, migration is failed too:
Expected behavior Is to able log in using my LDAP account, and to save LDAP settings. Screenshots But it obviously enabled:
If applicable, add screenshots to help explain your problem.
Server (please complete the following information):
Error Messages
WITH DEBUG TURNED ON, if you're getting an error in your browser, include that error
If a stacktrace is provided in the error, include that too.
Any errors that appear in your browser's error console.
Include any additional information you can find in
storage/logs
and your webserver's logs.Only one Log
php -m
(this should display what modules you have enabled.)[Zend Modules] Zend OPcache