Key ‘x’ doesn’t exist in table ‘x’

Once after updating the ABillS billing system, when opening the Maintenance>Hardware>PON menu and selecting a device, an SQL error occurred:

SQL Error: [3]
[1176/main, ../../Abills/modules/Equipment/Pon_mng.pm, 674]
Key 'port_id' doesn't exist in table 'onu'
...

Embedded script did not fix the error:

cd /usr/abills/misc/db_check/
./db_check.pl

Therefore, I had to add the key manually:

ALTER TABLE equipment_pon_onu ADD KEY port_id (`port_id`);

A little later, another error occurred:

Key 'port' doesn't exist in table 'internet'

Was solved by adding the key:

ALTER TABLE `internet_main` ADD KEY port_id (`port`);

See also my other articles about ABillS

Leave a comment

Leave a Reply