Skip to content
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

Open
wants to merge 18 commits into
base: master
Choose a base branch
from

Conversation

DavidPL-coder
Copy link
Contributor

@codecov-commenter
Copy link

codecov-commenter commented Jun 11, 2022

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

Copy link
Contributor Author

@DavidPL-coder DavidPL-coder left a comment

Choose a reason for hiding this comment

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

.

Copy link
Contributor Author

@DavidPL-coder DavidPL-coder left a 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.

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