Need Assistance with upgrading from 1.5 to 1.6

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
13 years ago
I am trying to upgrade form v 1.5 to 1.6 so that I could then upgrade to 1.7.

Now I tried to upgrade from 1.5 to v 1.6 and I am getting the error:

An error occured: Cannot insert the value NULL into column 'ShortDescription', table 'albert_store.dbo.Nop_Product'; column does not allow nulls. UPDATE fails.
The statement has been terminated.
Running scripts from file: C:\inetpub\wwwroot\nopCommerce_1.60\NopCommerceStore\install\Scripts\1.60\nopCommerce_upgrade.sql


I checked and the field allows nulls - the box for nulls is checked and there are nulls in the table under this column.
So how can it say cannot insert NULL

Any help appreciated.
13 years ago
Alpinhasov wrote:
I am trying to upgrade form v 1.5 to 1.6 so that I could then upgrade to 1.7.

Now I tried to upgrade from 1.5 to v 1.6 and I am getting the error:

An error occured: Cannot insert the value NULL into column 'ShortDescription', table 'albert_store.dbo.Nop_Product'; column does not allow nulls. UPDATE fails.
The statement has been terminated.
Running scripts from file: C:\inetpub\wwwroot\nopCommerce_1.60\NopCommerceStore\install\Scripts\1.60\nopCommerce_upgrade.sql


I checked and the field allows nulls - the box for nulls is checked and there are nulls in the table under this column.
So how can it say cannot insert NULL

Any help appreciated.

It sounds like the upgrade fails because you somehow have an existing record in the Nop_Product table with a NULL value for the ShortDescription field. The error comes up because the 1.50 to 1.60 upgrade script alters this field and reapplies the NOT NULL constraint (which will fail if a record has a NULL value in the field).

Run the following SQL query to see if are any records with a NULL value in their ShortDescription field:
SELECT     *
FROM       Nop_Product
WHERE     (ShortDescription IS NULL)




If you have records that are NULL, run the following query (make a backup of your database first) to set them to an empty string:
UPDATE Nop_Product
SET ShortDescription = ''
WHERE (ShortDescription IS NULL)

Then try the the 1.50 to 1.60 upgrade script.

.
13 years ago
Thank you.
I ran this for other rows as well and it's all working now. Had this issue once when upgraded to 1.7 as well.

It would be a good idea to have an upgrade documentation for possible issues like I had.

Thank you.
13 years ago
I have 3,000 product pictures. How can I upload them as a batch instead of one by one. Is there a script?
Thank you.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.