snipe-it icon indicating copy to clipboard operation
snipe-it copied to clipboard

Update error from 4.9.5 to 5.0.7

Open dvogelho opened this issue 6 years ago • 5 comments

I have tried to update our SnipeIT instance with php upgrade.php as usual. But this time, I'm facing several issues and I don't know how to resolve them. If you need anything else, logs, please let me know.

SnipeIT is running on a Debian 10 system, with Apache/2.4.38 (Debian) and PHP 7.3.19-1~deb10u1 (cli).

- At action 4 -cleaning up old cache files In AuthServiceProvider.php line 92: Call to undefined method Laravel\Passport\Passport::personalAccessTokensExpireIn()

- At action 5 - Updating composer dependencies [RuntimeException]
SHA384 is not supported by your openssl extension, could not verify the phar file integrity
self-update [-r|--rollback] [--clean-backups] [--no-progress] [--update-keys] [--stable] [--preview] [--snapshot] [--set-channel-only] [--] []

Illuminate\Foundation\ComposerScripts::postAutoloadDump Carbon 1 is deprecated, see how to migrate to Carbon 2. https://carbon.nesbot.com/docs/#api-carbon-2 You can run './vendor/bin/upgrade-carbon' to get help in updating carbon and other frameworks and libraries that depend on it.

- At action 6 - Migrating database In Connection.php line 669:

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 BLO
Bs (SQL: alter table settings add depreciation_method char(10) null default 'default')

In PDOStatement.php line 129:

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 BLO
Bs

In PDOStatement.php line 127:

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 BLO
Bs

dvogelho avatar Nov 23 '20 14:11 dvogelho

Any proposals for a solution? Or if you need specific logs, let me know and I will add them here.

dvogelho avatar Nov 25 '20 06:11 dvogelho

@dvogelho Well, it looks like there's a lot going wrong here. For the most part, the upgrade script is trying to tell you what's wrong. For the other things, a google search explained a lot of it.

Call to undefined method Laravel\Passport\Passport::personalAccessTokensExpireIn()

I'd say run these commands, try to do a git pull and then run the upgrade.php script again.

SHA384 is not supported by your openssl extension, could not verify the phar file integrity

https://stackoverflow.com/a/56964282/200021

Syntax error or access violation: 1118 Row size too large.

https://stackoverflow.com/a/25373052/200021

How many custom fields do you have?

Stack Overflow
I get the error when i run composer self-update on Windows 10 Here is the full error message
 composer self-update
 Updating to version 1.8.4 (stable channel).
 Downloading (100%)

...

Stack Overflow
I want to create a table of 325 column:

CREATE TABLE NAMESCHEMA.NAMETABLE (
ROW_ID TEXT NOT NULL , //this is the primary key

324 column of these types: CHAR(1), DATE...

snipe avatar Nov 25 '20 10:11 snipe

@snipe thanks for your comments, let me check them. We have 14 custom fields.

dvogelho avatar Nov 25 '20 10:11 dvogelho

Okay, 14 shouldn't be enough to cause problems.

You can also try this: https://snipe-it.readme.io/docs/installation-issues#during-database-migrations-max-key-length-is-1000-bytes

Snipe-IT Documentation
Common installation/upgrading issues and solutions

snipe avatar Nov 25 '20 10:11 snipe

@snipe The upgrade is working now.

  • we have updated the composer
  • changed the innodb_log_file_size from 48MB to 128MB
  • changed the table definitions image

the columns with longtext are type of text with a 64k now

After that we were able to complete the upgrade and after the upgrade the tables look like this

image

Thank you @snipe

dvogelho avatar Nov 26 '20 12:11 dvogelho