4.20 to 4.30 upgrade - failed

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
3 years ago
JonQuick wrote:
Hi Tom,

Not an issue I've run into, I'll try it on my dev box and see what happens here..

Is the original db created under the dbo  schema? So objects are dbo.customer dbo.settings etc?

Jon


This is setup in a shared hosting environment. So this schema would be id_username in this case.
3 years ago
Hi Tom,

If I follow correctly, its possible the original db objects are created under the id_username schema. For example id_username.customers

And you need to run the 4.2 > 4.3 upgrade script under the security context of sa (which likely has a default schema of dbo.)

hmm,.. maybe top and tail the nopCommerce script with something like this:  (TRY ON A TEST SYSTEM FIRST)

EXECUTE AS USER = 'id_username';

<NOPCOMMERCE UPGRADE SCRIPT HERE>

REVERT
3 years ago
I tried that and it did not go so well.

Cannot execute as the database principal because the principal "xxxx_maskedusername" does not exist, this type of principal cannot be impersonated, or you do not have permission.

However, with that said. I logged in as the client with SSMS and was able to run the script and only got a single error and a warning this time. The site is upgraded and running yay!

(304 rows affected)

(168 rows affected)
Caution: Changing any part of an object name could break scripts and stored procedures.

Msg 4902, Level 16, State 1, Line 3241
Cannot find the object "dbo.RewardPointsHistory" because it does not exist or you do not have permissions.

Completion time: 2020-05-20T14:12:56.2208595-05:00
3 years ago
Result!

This is the only reference to RewardPointsHistory within the entire script.  I would try removing the dbo.    (just after ALTER TABLE), and run this particular snippet again (under the context of your user)


--new column
IF NOT EXISTS (SELECT 1 FROM sys.columns WHERE object_id=object_id('[RewardPointsHistory]') and NAME='UsedWithOrder')
BEGIN
  ALTER TABLE dbo.RewardPointsHistory ADD UsedWithOrder uniqueidentifier NULL
END
GO
3 years ago
JonQuick wrote:
Result!

This is the only reference to RewardPointsHistory within the entire script.  I would try removing the dbo.    (just after ALTER TABLE), and run this particular snippet again (under the context of your user)


--new column
IF NOT EXISTS (SELECT 1 FROM sys.columns WHERE object_id=object_id('[RewardPointsHistory]') and NAME='UsedWithOrder')
BEGIN
  ALTER TABLE dbo.RewardPointsHistory ADD UsedWithOrder uniqueidentifier NULL
END
GO


Commands completed successfully.
Completion time: 2020-05-20T14:33:19.1607571-05:00

I think we are golden now! Thank you very much for the assistance.
3 years ago
No problem at all Tom
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.