Problem upgrading to from

Hello all!

I’m trying to upgrade our OJS3 installation from to, both through web interface and command line and it ends up with the following error:

ERROR: Upgrade failed: DB: SQLSTATE[01000]: Warning: 1265 Data truncated for column ‘assoc_id’ at row 1 (SQL: ALTER TABLE email_log CHANGE assoc_type assoc_type BIGINT NOT NULL, CHANGE assoc_id assoc_id BIGINT NOT NULL)

I’ve searched the forums and found something similar here:

But I’m not sure if the same solution could be applied to this problem.

Thanks in advance

a little follow up … I tried upgrading from to and it worked as expected … but then, upgrading from to failed again with the same error.

Hi @hilongo,

It sounds like you have some incomplete/invalid entries in your email_log table. Run the following query:

select count(*) from email_log where assoc_id is null;

This should indicate the problem rows. You may want to remove them (after restoring your database from backup, before running the upgrade script).

Alec Smecher
Public Knowledge Project Team


Thanks @asmecher as always … the problem with the email_log has been solved … but I’m still unable to upgrade … but that’s material for a new post … coming soon.

Thanks again!

1 Like