New Release - Forma 2.4.1

fg123
Newbie
Posts: 4
Joined: Fri Jan 10, 2020 11:23 am

Re: New Release - Forma 2.4.1

Post by fg123 »

Hi there,
just running upgrade from 2.4.0 to 2.4.1 - please help.


Upgrade database error


Upgrading to version: 2.4.1
Result: ERROR !!!

Upgrade db with file: /var/www/html/forma/formalms/upgrade/data/upg_data/20401_db.sqlDuplicate entry 'smtp_auto_tls' for key 'PRIMARY' Duplicate entry 'smtp_debug' for key 'PRIMARY'
------

fg123
Newbie
Posts: 4
Joined: Fri Jan 10, 2020 11:23 am

Re: New Release - Forma 2.4.1

Post by fg123 »

Well, I removed smtp_debug and smtp_auto_tls from core_settings table and the update ran. Maybe you should use IGNORE in the SQL script as well?


fg123 wrote:
Fri Mar 20, 2020 4:03 pm
Hi there,
just running upgrade from 2.4.0 to 2.4.1 - please help.


Upgrade database error


Upgrading to version: 2.4.1
Result: ERROR !!!

Upgrade db with file: /var/www/html/forma/formalms/upgrade/data/upg_data/20401_db.sqlDuplicate entry 'smtp_auto_tls' for key 'PRIMARY' Duplicate entry 'smtp_debug' for key 'PRIMARY'
------

alfa24
Senior Boarder
Posts: 621
Joined: Fri Nov 24, 2017 8:45 am
Version: forma.lms 1.4.2

Re: New Release - Forma 2.4.1

Post by alfa24 »

Post content of /upgrade/data/upg_data/20401_db.sql to get help
I'm Jasmines, the One. If you need, you can contact me.

fg123
Newbie
Posts: 4
Joined: Fri Jan 10, 2020 11:23 am

Re: New Release - Forma 2.4.1

Post by fg123 »

The two lines producing errors don't have the "IGNORE" in it.

INSERT IGNORE INTO core_setting (param_name, param_value, value_type, max_size, pack, regroup, sequence, param_load, hide_in_modify, extra_info)
VALUES ('smtp_host', '', 'string', 255, 'Smtp Host', 14, 1, 1, 0, '');

INSERT IGNORE INTO core_setting (param_name, param_value, value_type, max_size, pack, regroup, sequence, param_load, hide_in_modify, extra_info)
VALUES ('smtp_port', '', 'string', 255, 'Smtp Port', 14, 2, 1, 0, '');

INSERT IGNORE INTO core_setting (param_name, param_value, value_type, max_size, pack, regroup, sequence, param_load, hide_in_modify, extra_info)
VALUES ('smtp_secure', '', 'string', 255, 'Smtp Secure', 14, 3, 1, 0, '');

INSERT IGNORE INTO core_setting (param_name, param_value, value_type, max_size, pack, regroup, sequence, param_load, hide_in_modify, extra_info)
VALUES ('smtp_user', '', 'string', 255, 'Smtp User', 14, 4, 1, 0, '');

INSERT IGNORE INTO core_setting (param_name, param_value, value_type, max_size, pack, regroup, sequence, param_load, hide_in_modify, extra_info)
VALUES ('smtp_pwd', '', 'string', 255, 'Smtp Password', 14, 5, 1, 0, '');

INSERT INTO `core_setting` (`param_name`, `param_value`, `value_type`, `max_size`, `pack`, `regroup`, `sequence`, `param_load`, `hide_in_modify`, `extra_info`)
VALUES ('smtp_auto_tls', '', 'on_off', 255, 'Smtp Auto TLS', 14, 7, 1, 0, '');

INSERT INTO `core_setting` (`param_name`, `param_value`, `value_type`, `max_size`, `pack`, `regroup`, `sequence`, `param_load`, `hide_in_modify`, `extra_info`)
VALUES ('smtp_debug', '0', 'string', 255, 'Smtp Debug', 14, 8, 1, 0, '');

alfa24
Senior Boarder
Posts: 621
Joined: Fri Nov 24, 2017 8:45 am
Version: forma.lms 1.4.2

Re: New Release - Forma 2.4.1

Post by alfa24 »

replace the following:

INSERT INTO `core_setting` (`param_name`, `param_value`, `value_type`, `max_size`, `pack`, `regroup`, `sequence`, `param_load`, `hide_in_modify`, `extra_info`)
VALUES ('smtp_auto_tls', '', 'on_off', 255, 'Smtp Auto TLS', 14, 7, 1, 0, '');

INSERT INTO `core_setting` (`param_name`, `param_value`, `value_type`, `max_size`, `pack`, `regroup`, `sequence`, `param_load`, `hide_in_modify`, `extra_info`)
VALUES ('smtp_debug', '0', 'string', 255, 'Smtp Debug', 14, 8, 1, 0, '');

with:

INSERT IGNORE INTO `core_setting` (`param_name`, `param_value`, `value_type`, `max_size`, `pack`, `regroup`, `sequence`, `param_load`, `hide_in_modify`, `extra_info`)
VALUES ('smtp_auto_tls', '', 'on_off', 255, 'Smtp Auto TLS', 14, 7, 1, 0, '');

INSERT IGNORE INTO `core_setting` (`param_name`, `param_value`, `value_type`, `max_size`, `pack`, `regroup`, `sequence`, `param_load`, `hide_in_modify`, `extra_info`)
VALUES ('smtp_debug', '0', 'string', 255, 'Smtp Debug', 14, 8, 1, 0, '');
I'm Jasmines, the One. If you need, you can contact me.

fg123
Newbie
Posts: 4
Joined: Fri Jan 10, 2020 11:23 am

Re: New Release - Forma 2.4.1

Post by fg123 »

Yes sure - thanks, as I've written before, my upgrade ran through as soon as I deleted the values in the table, but maybe you should change the upgrade script in the installation zip file.
Regards
Frank

alfa24
Senior Boarder
Posts: 621
Joined: Fri Nov 24, 2017 8:45 am
Version: forma.lms 1.4.2

Re: New Release - Forma 2.4.1

Post by alfa24 »

I'm not responsible of the upgrade script, just help others.
I'm Jasmines, the One. If you need, you can contact me.

Post Reply