Hi Johan,
I had the same, the problem is pretty much what you see - the port_group_port table is not there for the lnms script to alter.
My fix was (Thanks to tigerdjohnson):
-
Login to mysql
libreuser@libreserver:~$ mysql -p -
After entering your password select the librenms database
MariaDB [(none)]> use librenms; -
At this prompt
MariaDB [librenms]>
Paste the port_group_port table creation schema as per tigerdjohnson’s reply above
CREATE TABLE port_group_port (
port_group_id int(10) unsigned NOT NULL,
port_id int(10) unsigned NOT NULL,
PRIMARY KEY (port_group_id,port_id),
KEY port_group_port_port_group_id_index (port_group_id),
KEY port_group_port_port_id_index (port_id),
CONSTRAINT port_group_port_port_group_id_foreign FOREIGN KEY (port_group_id) REFERENCES port_groups (id) ON DELETE CASCADE,
CONSTRAINT port_group_port_port_id_foreign FOREIGN KEY (port_id) REFERENCES ports (port_id) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
- Quit mysql and run ./lnms migrate again.
All the best,
Mark