Solved

FAIL SQL UPGRADE 22.04.5 to 22.04.6

  • 4 October 2022
  • 3 replies
  • 351 views

Badge +3

Bonjour,

 

J’ai un soucis d’upgrade de Centreon ; en effet une erreur apparait (voir PJ).



Lorsque je vais dans l’upgrade.log j’ai un soucis au niveau de ma colonne de ma table host :
 

2022-10-04 09:54|0|0|UPGRADE - 22.04.6: Impossible to update 'hosts' table - Code : 22003 - Error : SQLSTATE[22003]: Numeric value out of range: 1264 Out o
f range value for column 'notification_number' at row 57 - Trace : #0 /usr/share/centreon/www/class/centreonDB.class.php(309): PDO->query()
#1 /usr/share/centreon/www/install/php/Update-22.04.6.php(32): CentreonDB->query()
#2 /usr/share/centreon/src/Core/Platform/Infrastructure/Repository/DbWriteUpdateRepository.php(144): include_once('...')
#3 /usr/share/centreon/src/Core/Platform/Infrastructure/Repository/DbWriteUpdateRepository.php(61): Core\Platform\Infrastructure\Repository\DbWriteUpdateRe
pository->runScript()
#4 /usr/share/centreon/www/install/step_upgrade/process/process_step4.php(46): Core\Platform\Infrastructure\Repository\DbWriteUpdateRepository->runUpdate()
#5 {main}

 

Je ne suis pas trés à l’aise en SQL savez ce que je dois faire ?

Hello,


I have a problem with the Centreon upgrade; indeed an error appears (see PJ).

 

When I go to the upgrade.log I have a problem with my host table column:

2022-10-04 09:54|0|0|UPGRADE - 22.04.6: Impossible to update 'hosts' table - Code: 22003 - Error: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'notification_number' at row 57 - Trace : #0 /usr/share/centreon/www/class/centreonDB.class.php(309): PDO->query()
#1 /usr/share/centreon/www/install/php/Update-22.04.6.php(32): CentreonDB->query()
#2 /usr/share/centreon/src/Core/Platform/Infrastructure/Repository/DbWriteUpdateRepository.php(144): include_once('...')
#3 /usr/share/centreon/src/Core/Platform/Infrastructure/Repository/DbWriteUpdateRepository.php(61): CorePlatform/Infrastructure/Repository/DbWriteUpdateRe
pository->runScript()
#4 /usr/share/centreon/www/install/step_upgrade/process/process_step4.php(46): CorePlatformInfrastructureRepositoryDbWriteUpdateRepository->runUpdate()
#5 {main}


I'm not very comfortable with SQL, what should I do?

icon

Best answer by L3eO 4 October 2022, 13:43

View original

3 replies

Userlevel 6
Badge +18

Can you give me the current schema of centreon_storage.hosts table using following SQL request:

desc centreon_storage.hosts;

 

Badge +3

Ok i found solution to change smallint to BIGINT :

alter table hosts change column notification_number notification_number BIGINT NULL DEFAULT NULL;


And after that the same for the services table :

alter table services change column notification_number notification_number BIGINT NULL DEFAULT NULL;

Badge

Bonjour @L3eO 
Merci pour le partage.

 

Reply