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

EF Migration cli init #1066

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

ODumpling
Copy link

TL;DR

This pull request modifies the Program.cs file to only initialize the database in the development environment when the --init argument is passed.

What changed

The condition to initialize the database in the development environment was changed. Previously, the database was initialized every time the application was run in the development environment. Now, it will only be initialized if the --init argument is passed when running the application.

A minor change was also made to remove an unnecessary line break.

How to test

To test this change, run the application in the development environment with and without the --init argument. When the --init argument is passed, the database should be initialized. When it is not passed, the database should not be initialized.

Why make this change

This change was made to give developers more control over when the database is initialized. This can be useful in situations where the developer does not want to reset the database every time they run the application.

> ## TL;DR
> This pull request modifies the `Program.cs` file to only initialize the database in the development environment when the `--init` argument is passed.
> 
> ## What changed
> The condition to initialize the database in the development environment was changed. Previously, the database was initialized every time the application was run in the development environment. Now, it will only be initialized if the `--init` argument is passed when running the application.
> 
> A minor change was also made to remove an unnecessary line break.
> 
> ## How to test
> To test this change, run the application in the development environment with and without the `--init` argument. When the `--init` argument is passed, the database should be initialized. When it is not passed, the database should not be initialized.
> 
> ## Why make this change
> This change was made to give developers more control over when the database is initialized. This can be useful in situations where the developer does not want to reset the database every time they run the application.
</details>
@ODumpling
Copy link
Author

fixes #1062

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.

None yet

1 participant