Open Closed

Migration Issue after upgrading the solution 2.9.0 to 3.0.2 #283


User avatar
0
rajasekhard2015 created

ERR] Failed executing DbCommand (845ms) [Parameters=[], CommandType='Text', CommandTimeout='30'] CREATE TABLE [AbpAuditLogs] ( [Id] uniqueidentifier NOT NULL, [ExtraProperties] nvarchar(max) NULL, [ConcurrencyStamp] nvarchar(max) NULL, [ApplicationName] nvarchar(96) NULL, [UserId] uniqueidentifier NULL, [UserName] nvarchar(256) NULL, [TenantId] uniqueidentifier NULL, [TenantName] nvarchar(max) NULL, [ImpersonatorUserId] uniqueidentifier NULL, [ImpersonatorTenantId] uniqueidentifier NULL, [ExecutionTime] datetime2 NOT NULL, [ExecutionDuration] int NOT NULL, [ClientIpAddress] nvarchar(64) NULL, [ClientName] nvarchar(128) NULL, [ClientId] nvarchar(64) NULL, [CorrelationId] nvarchar(64) NULL, [BrowserInfo] nvarchar(512) NULL, [HttpMethod] nvarchar(16) NULL, [Url] nvarchar(256) NULL, [Exceptions] nvarchar(4000) NULL, [Comments] nvarchar(256) NULL, [HttpStatusCode] int NULL, CONSTRAINT [PK_AbpAuditLogs] PRIMARY KEY ([Id]) ); [08:28:52 ERR] There is already an object named 'AbpAuditLogs' in the database. Microsoft.Data.SqlClient.SqlException (0x80131904): There is already an object named 'AbpAuditLogs' in the database. at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at Microsoft.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at Microsoft.Data.SqlClient.SqlCommand.InternalEndExecuteNonQuery(IAsyncResult asyncResult, Boolean isInternal, String endMethod) at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryInternal(IAsyncResult asyncResult) at Microsoft.Data.SqlClient.SqlCommand.EndExecuteNonQueryAsync(IAsyncResult asyncResult) at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteNonQueryAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Migrations.Internal.MigrationCommandExecutor.ExecuteNonQueryAsync(IEnumerable1 migrationCommands, IRelationalConnection connection, CancellationToken cancellationToken) at Microsoft.EntityFrameworkCore.Migrations.Internal.Migrator.MigrateAsync(String targetMigration, CancellationToken cancellationToken) at MViable.EntityFrameworkCore.EntityFrameworkCoreMViableDbSchemaMigrator.MigrateAsync() in D:\Sandbox\mviable\src\MViable.EntityFrameworkCore.DbMigrations\EntityFrameworkCore\EntityFrameworkCoreMViableDbSchemaMigrator.cs:line 28 at MViable.Data.MViableDbMigrationService.MigrateDatabaseSchemaAsync(Tenant tenant) in D:\Sandbox\mviable\src\MViable.Domain\Data\MViableDbMigrationService.cs:line 84 at MViable.Data.MViableDbMigrationService.MigrateAsync() in D:\Sandbox\mviable\src\MViable.Domain\Data\MViableDbMigrationService.cs:line 40 at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task task) at Nito.AsyncEx.AsyncContext.<>c__DisplayClass15_0.<Run>b__0(Task t) at System.Threading.Tasks.ContinuationTaskFromTask.InnerInvoke() at System.Threading.Tasks.Task.<>c.<.cctor>b__274_0(Object obj) at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- 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 where exception was thrown --- at Nito.AsyncEx.Synchronous.TaskExtensions.WaitAndUnwrapException(Task task) at Nito.AsyncEx.AsyncContext.Run(Func1 action) at Volo.Abp.Threading.AsyncHelper.RunSync(Func1 action)


1 Answer(s)
  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    I can't reproduce your problem, can you provide steps to reproduce. I think there is something wrong with your migration file, it has nothing to do with the abp version

Made with ❤️ on ABP v9.1.0-preview. Updated on November 01, 2024, 05:35