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

re-add OtrDbContextFactory with appsettings import & exception handling #432

Merged
merged 6 commits into from
Sep 28, 2024

Conversation

hburn7
Copy link
Collaborator

@hburn7 hburn7 commented Sep 27, 2024

Deployment fix, allows us to have a design-time dbcontextfactory which works both locally and in github actions :)

@hburn7 hburn7 requested a review from myssto September 27, 2024 02:09
@hburn7 hburn7 added the project:Database Items related to the Database project label Sep 27, 2024
Comment on lines 26 to 34
// If any errors are encountered (e.g. fetching the appsettings file fails),
// we want to return a default OtrContext.
//
// Without this specific implementation, the deployment will fail
// with a "Host can't be null" error.
//
// With this exception handling, the deployment will default to returning
// this value - this is enough for generating the migrations script
// used in deployments.
Copy link
Contributor

Choose a reason for hiding this comment

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

comment block

Database/OtrDbContextFactory.cs Outdated Show resolved Hide resolved
Database/Database.csproj Outdated Show resolved Hide resolved
hburn7 and others added 3 commits September 26, 2024 23:28
Co-authored-by: myssto <58118743+myssto@users.noreply.github.com>
@hburn7 hburn7 requested a review from myssto September 27, 2024 03:58
@hburn7 hburn7 merged commit c19934d into master Sep 28, 2024
2 checks passed
@hburn7 hburn7 deleted the fix/staging-deploy branch September 28, 2024 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
project:Database Items related to the Database project size/M
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants