info: FluentMigrator.Runner.MigrationRunner[1000] DataMigration migrating info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1004] Beginning Transaction info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003] BEGIN TRANSACTION info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1004] Rolling back transaction info: FluentMigrator.Runner.Processors.SqlServer.SqlServer2016Processor[1003] ROLLBACK TRANSACTION Unhandled exception. System.AggregateException: One or more errors occurred. (Invalid column name 'TaxDisplayTypeId'. Invalid column name 'LanguageId'. Invalid column name 'CurrencyId'. Invalid column name 'CustomCustomerAttributesXML'. Invalid column name 'TimeZoneId'. Invalid column name 'VatNumberStatusId'. Invalid column name 'VatNumber'. Invalid column name 'Fax'. Invalid column name 'Phone'. Invalid column name 'StateProvinceId'. Invalid column name 'CountryId'. Invalid column name 'County'. Invalid column name 'City'. Invalid column name 'ZipPostalCode'. Invalid column name 'StreetAddress2'. Invalid column name 'StreetAddress'. Invalid column name 'Company'. Invalid column name 'DateOfBirth'. Invalid column name 'Gender'. Invalid column name 'LastName'. Invalid column name 'FirstName'.) ---> Microsoft.Data.SqlClient.SqlException (0x80131904): Invalid column name 'TaxDisplayTypeId'. Invalid column name 'LanguageId'. Invalid column name 'CurrencyId'. Invalid column name 'CustomCustomerAttributesXML'. Invalid column name 'TimeZoneId'. Invalid column name 'VatNumberStatusId'. Invalid column name 'VatNumber'. Invalid column name 'Fax'. Invalid column name 'Phone'. Invalid column name 'StateProvinceId'. Invalid column name 'CountryId'. Invalid column name 'County'. Invalid column name 'City'. Invalid column name 'ZipPostalCode'. Invalid column name 'StreetAddress2'. Invalid column name 'StreetAddress'. Invalid column name 'Company'. Invalid column name 'DateOfBirth'. Invalid column name 'Gender'. Invalid column name 'LastName'. Invalid column name 'FirstName'. at Microsoft.Data.SqlClient.SqlCommand.<>c.<ExecuteDbDataReaderAsync>b__208_0(Task`1 result) at System.Threading.Tasks.ContinuationResultTaskFromResultTask`2.InnerInvoke() at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread) --- End of stack trace from previous location --- at LinqToDB.Data.DataConnection.ExecuteReaderAsync(CommandBehavior commandBehavior, CancellationToken cancellationToken) at LinqToDB.Data.DataConnection.ExecuteDataReaderAsync(CommandBehavior commandBehavior, CancellationToken cancellationToken) at LinqToDB.Data.DataConnection.ExecuteDataReaderAsync(CommandBehavior commandBehavior, CancellationToken cancellationToken) at LinqToDB.Data.DataConnection.QueryRunner.ExecuteReaderAsync(CancellationToken cancellationToken) at LinqToDB.Linq.QueryRunner.ExecuteQueryAsync[T](Query query, IDataContext dataContext, Mapper`1 mapper, Expression expression, Object[] ps, Object[] preambles, Int32 queryNumber, Func`2 func, TakeSkipDelegate skipAction, TakeSkipDelegate takeAction, CancellationToken cancellationToken) at LinqToDB.Linq.QueryRunner.ExecuteQueryAsync[T](Query query, IDataContext dataContext, Mapper`1 mapper, Expression expression, Object[] ps, Object[] preambles, Int32 queryNumber, Func`2 func, TakeSkipDelegate skipAction, TakeSkipDelegate takeAction, CancellationToken cancellationToken) at LinqToDB.Linq.ExpressionQuery`1.GetForEachAsync(Action`1 action, CancellationToken cancellationToken) at LinqToDB.AsyncExtensions.ToListAsync[TSource](IQueryable`1 source, CancellationToken token) at System.Linq.AsyncIQueryableExtensions.ToPagedListAsync[T](IQueryable`1 source, Int32 pageIndex, Int32 pageSize, Boolean getOnlyTotalCount) ClientConnectionId:afe13bdb-ac22-42c7-97f9-527f233795b8 Error Number:207,State:1,Class:16 --- End of inner exception stack trace --- at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) at System.Threading.Tasks.Task`1.GetResultCore(Boolean waitCompletionNotification) at Nop.Data.Migrations.UpgradeTo460.DataMigration.Up() at FluentMigrator.MigrationBase.GetUpExpressions(IMigrationContext context) at FluentMigrator.Runner.MigrationRunner.<>c.<ApplyMigrationUp>b__69_0(IMigration m, IMigrationContext c) at FluentMigrator.Runner.MigrationRunner.ExecuteMigration(IMigration migration, Action`2 getExpressions) at FluentMigrator.Runner.MigrationRunner.ApplyMigrationUp(IMigrationInfo migrationInfo, Boolean useTransaction) at FluentMigrator.Runner.MigrationRunner.Up(IMigration migration) at Nop.Data.Migrations.MigrationManager.ApplyUpMigrations(Assembly assembly, MigrationProcessType migrationProcessType, Boolean commitVersionOnly) at Nop.Web.Framework.Infrastructure.Extensions.ApplicationBuilderExtensions.StartEngine(IApplicationBuilder application) at Program.<Main>$(String[] args)
yes, I know that. but the readme.txt suggest this. If your database has a lot of "Customer" records, auto migration (during the first application start) can take a long time, so we have prepared scripts to update the database.
if I have only 18 customers on my DB then also this step is required. My question is auto migration will not work?
Yes, That auto migration does not work. reason behind it, nopCommerce SchemaMigration.cs class run after DataMigration.cs class. So, Here you have to set date time in DataMigration.cs file migration. Then it is work properly.
Hi. Yes, unfortunately we made such an inaccuracy. I did the analysis and found the historical sequence that led to this situation. We will try to restore the correct order for these two migrations in the next minor version (if it is released). In version 4.70, this problem will not be, since we have refactored the migration system and all migrations that change the structure of the database will now be performed before all others.
bellevuehobby wrote:
Thanks Ilyas. I found a commit made on January 9 that changed the code to read as follows: