F/226 simple data migrations system#234
Conversation
…tion as example of using the migrations system.
…migrations system.
…ions) from InitEvents collection and a migration to this.
…ode) and related things.
Codecov Report
@@ Coverage Diff @@
## master #234 +/- ##
==========================================
- Coverage 53.20% 53.05% -0.15%
==========================================
Files 283 284 +1
Lines 5475 5481 +6
Branches 424 424
==========================================
- Hits 2913 2908 -5
- Misses 2457 2466 +9
- Partials 105 107 +2
Continue to review full report at Codecov.
|
| .UseAssembly(assemblyForMigrations) | ||
| .UseSchemeValidation(enabled: false) | ||
| .UseProgressHandler(context => | ||
| Log.Information($@"The migration with name ""{context.MigrationName}"" from {context.TargetVersion} version was processed as {context.CurrentNumber} from all {context.TotalCount} migrations.")) |
There was a problem hiding this comment.
Czy takie logi są wystarczające? Podałem taki log jako przykład, ale nie wiem czy trzeba coś zmienić. Inne logi tutaj też są wystarczające?
| new EnumRepresentationConvention(BsonType.String), | ||
| new CamelCaseElementNameConvention() | ||
| }; | ||
| // TODO: Do something when migrations throw exceptions. |
There was a problem hiding this comment.
Właśnie co zrobić gdy wystąpi wyjątek podczas migracji? Zakończyć aplikacje z odpowiednią informacją?
Poza tym swoją drogą jak teraz patrze w dokumentacje tej paczki to chyba będę musiał użyć try catch aby to obsłużyć zamiast tego if'a.
DavidPL-coder
left a comment
There was a problem hiding this comment.
Ten kod podaję do sprawdzenia jako prototyp tego co ma być później. Na razie potrzebuje odpowiedzi na moje pytania, aby móc przedstawić ostateczną wersje kodu.
#226