Skip to content

F/226 simple data migrations system#234

Open
DavidPL-coder wants to merge 18 commits into
Devscord-Team:masterfrom
DavidPL-coder:F/226-simple-data-migrations-system
Open

F/226 simple data migrations system#234
DavidPL-coder wants to merge 18 commits into
Devscord-Team:masterfrom
DavidPL-coder:F/226-simple-data-migrations-system

Conversation

@DavidPL-coder

Copy link
Copy Markdown
Contributor

@codecov-commenter

codecov-commenter commented Jun 11, 2022

Copy link
Copy Markdown

Codecov Report

Merging #234 (6e53ff5) into master (764dcac) will decrease coverage by 0.14%.
The diff coverage is 0.00%.

@@            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     
Impacted Files Coverage Δ
...man.DomainModel/Configuration/ConfigurationItem.cs 46.66% <ø> (ø)
....Integrations/Database/MongoDB/MongoConventions.cs 0.00% <0.00%> (ø)
...Discord/Areas/Users/Controllers/UsersController.cs 92.18% <0.00%> (-7.82%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 764dcac...6e53ff5. Read the comment docs.

.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."))

Copy link
Copy Markdown
Contributor Author

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.

Copy link
Copy Markdown
Contributor Author

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.

@DavidPL-coder DavidPL-coder left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.

@DavidPL-coder DavidPL-coder left a comment

Copy link
Copy Markdown
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants