¡Hi everybody! I am just drinking more coffee☕ for this, I start... *** WARNING *** : you are working at your own risk, I only suggest some issues that I found. FIRST: Check if table 'tpolicy_modules' exists because I got error when creating it. I use MySQL 14.14 on Ubuntu 18.04:
>>mysql --version
mysql Ver 14.14 Distrib 5.7.30, for Linux (x86_64) using EditLine wrapper
There is a problem for default values (see https://dev.mysql.com/doc/refman/8.0/en/data-type-defaults.html ) for TEXT fields:
ERROR 1101 (42000): BLOB, TEXT, GEOMETRY or JSON column 'unit' can't have a default value
quick-and-dirty: I created that table erasing «default ''» ;-) this is an old issue for MySQL. SECOND: absolutely no problem for your case, this instruction fix very well:
ALTER TABLE tpolicy_modules ADD COLUMN `ip_target`varchar(100) default '';
BUT NEXT LINE yes, "Uh, Houston, we've had a problem":
ALTER TABLE tpolicy_modules ADD COLUMN `dynamic_next` bigint(20) NOT NULL default '0';
ERROR 1060 (42S21): Duplicate column name 'dynamic_next'
I thing that we need here a function for check first if field exists, something like explains here (I am not tested that code) BIG WORK but at long time harvest benefits (and avoid headaches!). Thanks for your attention! ?