DB schema update failing after docker pull to current

Previous on 25.4. I have run the usual

docker compose down
docker compose pull
docker compose up -d

which I do periodically but this time it is not working. Seem to be stuck in a loop trying to upgrade the DB schema:

Waiting 60s for database to be ready...
Database ready!
Updating database schema...

   INFO  Running migrations.  

  2025_06_11_025425_hr_device_table_add_status_default .......... 42.83ms FAIL

In Connection.php line 824:
                                                                               
  SQLSTATE[22001]: String data, right truncated: 1406 Data too long for colum  
  n 'hrDeviceType' at row 5738 (Connection: mysql, SQL: alter table `hrDevice  
  ` modify `hrDeviceType` varchar(32) not null)                                
                                                                               

In Connection.php line 570:
                                                                               
  SQLSTATE[22001]: String data, right truncated: 1406 Data too long for colum  
  n 'hrDeviceType' at row 5738                                                 
                                                                               

[cont-init.d] 04-svc-main.sh: exited 1.

Culprit was an entry that was too long for the new data type.

MariaDB [librenms]> select hrDevice_id , hrDeviceType from hrDevice;
.....
|       11237 | hrDeviceNetwork                                          |
|       11246 | joint-iso-ccitt.3848679438.841888046.842346035.774975029 |
+-------------+----------------------------------------------------------+
5738 rows in set (0.003 sec)
MariaDB [librenms]> delete from hrDevice where hrDevice_id = 11246;
Query OK, 1 row affected (0.001 sec)

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.