"./lnms migrate " issues

Hi,

I updated my LibreNMS docker container (x86 debian host) today and found that I had to update the DB which is fine but I’m getting the following error and I haven’t been able to find a fix

Everything seems to be working fine, I was on 1.55 or 1.58 from memory and upgraded to fix the graph timezone not being correct.

I’ve tried running the command as the default bash login for the docker & using ‘su librenms’
I’ve also run the command with --pretend switch and it appears to complete successfully but if I run ./daily.sh and then ./validate.sh I still get the ./lnms migrate error

Any suggestions on a resolution would be appreciated!

**Error Output **
bash-5.0# su librenms
/opt/librenms $ ./lnms migrate


  • Application In Production!     *
    

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

yes

Migrating: 2020_04_06_001048_the_great_index_rename

In Connection.php line 671:
SQLSTATE[42000]: Syntax error or access violation: 1091 Can’t DROP INDEX deleted; check that it exists (SQL: ALTER TABLE access_points DROP INDEX deleted, ADD INDEX access_points_deleted_index(deleted);
)

In PDOStatement.php line 129:
SQLSTATE[42000]: Syntax error or access violation: 1091 Can’t DROP INDEX deleted; check that it exists

In PDOStatement.php line 127:
SQLSTATE[42000]: Syntax error or access violation: 1091 Can’t DROP INDEX deleted; check that it exists

In SchemaException.php line 85:

There is no column with name ‘availability_perc’ on table ‘availability’.

/opt/librenms $

** ./validate **
/opt/librenms $ ./validate.php

Component Version
LibreNMS 1.66
DB Schema 2020_03_25_165300_add_column_to_ports (162)
PHP 7.3.20
Python 3.8.5
MySQL 10.2.33-MariaDB-1:10.2.33+maria~bionic
RRDTool 1.7.2
SNMP NET-SNMP 5.8

====================================

[OK] Installed from the official Docker image; no Composer required
[OK] Database connection successful
[FAIL] Your database is out of date!
[FIX]:
./lnms migrate
[WARN] IPv6 is disabled on your server, you will not be able to add IPv6 devices.
[WARN] Updates are managed through the official Docker image
/opt/librenms $