I am testing the update from VM3/J3 to VM4/J4. Currently, I have AwoCoupon 3.6.1 installed.
- Dump all tables of Awocoupon3
- Update to VM4/J4
- Install and visit the control panel of AwoCoupon
- Restore Awocoupon3 tables
- Reinstall Awocoupon4
- Visit the control panel of AwoCoupon
But it doesn't work well due to the following:
If I install the latest version of AwoCoupon (awocoupon-4.0.1.1), the installation fails when updating the database with the following message: Unknown column 'session_id' in 'where clause'.
If I install any of the previous versions of the 4.x branch, no error occurs, but when updating to 4.0.1.1, the error message "Unknown column 'session_id' in 'where clause'" reappears.
ALTER TABLE #__awocoupon_history DROP COLUMN session_id;
It seems that the session_id field is removed in version 3.6.1; in fact, it is not in the mysql.install.sql file.
I also see that in the update scripts for version 4.0.1.1, in the file admin/awocoupon/library/install/upgrade/sql/4.0.1.1.sql, the following SQL statement appears:
INSERT INTO #__awocoupon_history_tmp (estore, order_id, details, created_at)
SELECT estore, order_id, details, created_at
FROM #__awocoupon_history
WHERE session_id IS NOT NULL AND session_id!="" AND order_id IS NOT NULL AND order_id!=0;
But the #__awocoupon_history table does not have any session_id field.
How important is the content of the session_id field?
How can I solve it?