Unable to install Shipping.FixedByWeightByTotal

1 month ago
I have recently upgraded our shop from 3.8 to 4.2.  I want to use fix price shipping.  I previously purchased Shipping Director to do some more advanced shipping costings, but I have decided to simplify!

When I try to install the Shipping.FixedByWeightByTotal plugin i get the following error:

System.Data.SqlClient.SqlException (0x80131904): There is already an object named 'ShippingByWeightByTotalRecord' in the database.
   at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
   at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
   at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
   at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
   at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite, String methodName)
   at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.Execute(IRelationalConnection connection, DbCommandMethod executeMethod, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.Storage.Internal.RelationalCommand.ExecuteNonQuery(IRelationalConnection connection, IReadOnlyDictionary`2 parameterValues)
   at Microsoft.EntityFrameworkCore.RelationalDatabaseFacadeExtensions.ExecuteSqlCommand(DatabaseFacade databaseFacade, RawSqlString sql, IEnumerable`1 parameters)
   at Nop.Plugin.Shipping.FixedByWeightByTotal.Data.ShippingByWeightByTotalObjectContext.ExecuteSqlCommand(RawSqlString sql, Boolean doNotEnsureTransaction, Nullable`1 timeout, Object[] parameters)
   at Nop.Data.Extensions.DbContextExtensions.ExecuteSqlScript(IDbContext context, String sql) in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Data\Extensions\DbContextExtensions.cs:line 286
   at Nop.Plugin.Shipping.FixedByWeightByTotal.FixedByWeightByTotalComputationMethod.Install()
   at Nop.Services.Plugins.PluginService.InstallPlugins() in C:\andrei\nopcommerce\sources\src\Libraries\Nop.Services\Plugins\PluginService.cs:line 422
ClientConnectionId:a8d5246c-fe48-489f-b45b-c9922ea0f007
Error Number:2714,State:6,Class:16

Is anyone able to help me fix this please!
1 month ago
The table named "ShippingByWeightByTotalRecord" already is in the database. So when you are trying to install the plugin it is trying to create the table again and throw this error. So at nop.web==>App_Datat==>plugins.json add the plugin system name which is "Shipping.FixedByWeightByTotal" and make sure that the json formate of nop.web==>App_Datat==>plugins.json is ok or you can delete the table and install the plugin again, which will be not ideal for the situation as there may have some important data as you are migrating from 3.8 to 4.2 .
1 month ago
Thank you so much for your help.  I had to delete (well rename) the database table in the end to make it work, but it was empty anyway, so I wasn't too concerned!

That's a massive headache resolved, so thank you again.