Invalid column names on 3.9 -> 4.0 upgrade

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
6 years ago
After upgrading a 3.9 database to 4.0, I am now seeing the following errors on public virtual Customer GetCustomerByEmail(string email) in the CustomerService.cs:

SqlException: Invalid column name 'EmailToRevalidate'.
Invalid column name 'RequireReLogin'.
Invalid column name 'FailedLoginAttempts'.
Invalid column name 'CannotLoginUntilDateUtc'.
Invalid column name 'RegisteredInStoreId'.

I ran the update script again just to be sure.  Am I just missing columns after the upgrade?

Jeremy
6 years ago
Did the SQL run successfully or maybe there's some error?


6 years ago
It ran successfully with no errors, but I did notice that a few of the results returned "0 rows affected".  These were near the end.
6 years ago
I've been working through this adding the missing columns.  So far, I've added:

Customer.EmailToRevalidate
Customer.CannotLoginUntilDateUtc
Customer.RegisteredInStoreId
Customer.FailedLoginAttempts

When I try to add CustomerRole.EnablePasswordLifetime, I have to set it to allow nulls even though nopCommerce asks for it to be not null because I have a table full of customers who do not have this value previously.  This approach worked okay for Customer.RegisteredInStoreId and Customer.FailedLoginAttempts, but for CustomerRole.EnablePasswordLifetime I'm getting the error "ConstraintException: The 'EnablePasswordLifetime' property on 'CustomerRole' could not be set to a 'null' value. You must set this property to a non-null value of type 'System.Boolean'."

I'm concerned that this will continue to happen: every time I create and handle a missing column, I'll discover another one when I run the application.  I don't see these columns mentioned in the 4.0 upgrade script.  Have I missed something along the way?

Jeremy
2 years ago
Did you get anywhere with this? I am getting the same error going from 3.8 -> 3.9
2 years ago
sircles wrote:
Did you get anywhere with this? I am getting the same error going from 3.8 -> 3.9


What specific errors are you getting?

Have you run the scripts to 'upgrade' the DB from 3.8 > 3.9? If so, did they run successfully without errors?
2 years ago
Ignore me - I was still pointing at the 3.8 DB
2 years ago
sircles wrote:
Ignore me - I was still pointing at the 3.8 DB


This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.