Troubles migrating database due to invalid timestamp

Hi,
I run lnms migrate

I get the following error :

librenms@ltsa-hq-libre-01:~$ lnms migrate


  • Application In Production!     *
    

Do you really wish to run this command? (yes/no) [no]:

yes

Migrating: 2021_02_09_122930_migrate_to_utf8mb4

In Connection.php line 678:

SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: ‘0000-00-00 00:00:00’ for column librenms.entityState.entStateLastChanged at row 93 (SQL: ALTER TABLE entityState
MODIFY entStateAlarm
text
CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci
NULL :wink:

In Exception.php line 18:

SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: ‘0000-00-00 00:00:00’ for column librenms.entityState.entStateLastChanged at row 93

In PDOConnection.php line 53:

SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: ‘0000-00-00 00:00:00’ for column librenms.entityState.entStateLastChanged at row 93

Not sure if this is a serious error,
but the pointing by browser to librenms.url
Shows the following error:

" make(Kernel::class); $response = tap($kernel->handle( $request = Request::capture() ))->send(); $kernel->terminate($request, $response); "

Any tips suggestions are welcome
Thank you

Please don’t delete tables from your database unless you have the exact error that was meant to fix.

Yes, your invalid time is preventing the 2021_02_09_122930_migrate_to_utf8mb4 migration from running.

You’ll need to fix that datetime value value on entityState .entStateLastChanged row 93

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