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

add migrations bundle container #1254

Merged
merged 1 commit into from
Sep 29, 2023
Merged

Conversation

DmyMi
Copy link
Contributor

@DmyMi DmyMi commented Sep 28, 2023

To be able to easily apply migrations to test and prod environment without headache with creating custom tooling and/or SQL scripts.

  • Both AuthorizationServer and Migrations are publishable projects and ef migration bundle command does publish - this lead to file naming conflicts and some other errors. So current solution was to move OpenIdDictDbContext to AuthCommon project and remove AuthorizationServer reference in Migrations project. It also saved like 2-3 MB of final image size.
  • As bundle creates DB context with default connection string and replaces it only right before applying the migration, had to revert to simple connection string placeholder without any checks.
  • Removed unused context&migration that was tied to AuthorizationServer. Will remove it's components from codebase later.
  • Environment variables placeholders for connection string can be replaced at runtime
  • Add local EF Core CLI config to be installed for container build. Can also be used for development if unable to install it globally.

@DmyMi DmyMi requested a review from a team September 28, 2023 22:20
@github-actions github-actions bot requested a review from h4wk13 September 28, 2023 22:20
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot E 4 Security Hotspots
Code Smell A 1 Code Smell

0.0% 0.0% Coverage
0.0% 0.0% Duplication

warning The version of Java (11.0.20) you have used to run this analysis is deprecated and we will stop accepting it soon. Please update to at least Java 17.
Read more here

idea Catch issues before they fail your Quality Gate with our IDE extension sonarlint SonarLint

@DmyMi DmyMi merged commit c71f886 into develop Sep 29, 2023
5 of 6 checks passed
@DmyMi DmyMi deleted the dmin/migrations_bundle_docker branch September 29, 2023 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants