-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
F/226 simple data migrations system #234
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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