masastack / MASA.Template

Apache License 2.0
17 stars 9 forks source link

no such table: IntegrationEventLog #6

Open rocklau opened 1 year ago

rocklau commented 1 year ago

Description

Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such table: IntegrationEventLog'. I created project with dotnet new masafx --web WASM --service Cqrs\&Ddd -mini -openapi -dapr -actor -auth -valid

Environment

.Template Name: masafx

.NET SDK Version:

6 Masa Template Version:

0.6.2788

Demo

[40mwarn: Masa.Contrib.Dispatcher.IntegrationEvents.Processor.InfiniteLoopProcessor[0]
      Processor 'Masa.Contrib.Dispatcher.IntegrationEvents.Processor.RetryByDataProcessor' failed
         at Microsoft.Data.Sqlite.SqliteException.ThrowExceptionForRC(Int32 rc, sqlite3 db)
      Microsoft.Data.Sqlite.SqliteException (0x80004005): SQLite Error 1: 'no such table: IntegrationEventLog'.
         at Microsoft.Data.Sqlite.SqliteCommand.PrepareAndEnumerateStatements(Stopwatch timer)+MoveNext()
         at Microsoft.Data.Sqlite.SqliteCommand.GetStatements(Stopwatch timer)+MoveNext()
         at Microsoft.Data.Sqlite.SqliteDataReader.NextResult()
         at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReader(CommandBehavior behavior)
         at Microsoft.Data.Sqlite.SqliteCommand.ExecuteReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
         at Microsoft.Data.Sqlite.SqliteCommand.ExecuteDbDataReaderAsync(CommandBehavior behavior, CancellationToken cancellationToken)
         at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
         at Microsoft.EntityFrameworkCore.Storage.RelationalCommand.ExecuteReaderAsync(RelationalCommandParameterObject parameterObject, CancellationToken cancellationToken)
         at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.InitializeReaderAsync(AsyncEnumerator enumerator, CancellationToken cancellationToken)
         at Microsoft.EntityFrameworkCore.Query.Internal.SingleQueryingEnumerable`1.AsyncEnumerator.MoveNextAsync()
         at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken)
         at Microsoft.EntityFrameworkCore.EntityFrameworkQueryableExtensions.ToListAsync[TSource](IQueryable`1 source, CancellationToken cancellationToken)
         at Masa.Contrib.Dispatcher.IntegrationEvents.EventLogs.EFCore.IntegrationEventLogService.RetrieveEventLogsFailedToPublishAsync(Int32 retryBatchSize, Int32 maxRetryTimes, Int32 minimumRetryInterval)
         at Masa.Contrib.Dispatcher.IntegrationEvents.Processor.RetryByDataProcessor.ExecuteAsync(IServiceProvider serviceProvider, CancellationToken stoppingToken)
         at Masa.Contrib.Dispatcher.IntegrationEvents.Processor.ProcessorBase.ExecuteAsync(CancellationToken stoppingToken)
         at Masa.Contrib.Dispatcher.IntegrationEvents.Processor.ProcessorBase.ExecuteAsync(CancellationToken stoppingToken)
         at Masa.Contrib.Dispatcher.IntegrationEvents.Processor.InfiniteLoopProcessor.ExecuteAsync(CancellationToken stoppingToken)
Masa.Contrib.Dispatcher.IntegrationEvents.Processor.InfiniteLoopProcessor: Warning: Processor 'Masa.Contrib.Dispatcher.IntegrationEvents.Processor.RetryByDataProcessor' failed
doddgu commented 1 year ago

@zhenlei520 PTAL

zhenlei520 commented 1 year ago

In this mode, the local message table is required to provide support, and the migration model needs to be generated and the database updated.

rocklau commented 1 year ago

How to do

MayueCif commented 1 year ago

How to do

https://learn.microsoft.com/zh-cn/ef/core/managing-schemas/migrations/?tabs=dotnet-core-cli