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

how start use this project for development #41

Open
Alarak666 opened this issue Nov 11, 2024 · 0 comments
Open

how start use this project for development #41

Alarak666 opened this issue Nov 11, 2024 · 0 comments

Comments

@Alarak666
Copy link

Hello, I was able to start the project, but I can't start the migration, it destroys all the data and without them the project won't start, what should I do
@echo off

SET DATA_PROJECT_PATH=ModernWMS.Core\ModernWMS.Core.csproj

SET STARTUP_PROJECT_PATH=ModernWMS\ModernWMS.csproj

SET CONTEXT_NAME=ModernWMS.Core.DBContext.SqlDBContext

:: Удаление базы данных
dotnet ef database drop --force --context %CONTEXT_NAME% --project %DATA_PROJECT_PATH% --startup-project %STARTUP_PROJECT_PATH%

:: Удаление последней миграции
dotnet ef migrations remove --context %CONTEXT_NAME% --project %DATA_PROJECT_PATH% --startup-project %STARTUP_PROJECT_PATH%

:: Создание новой миграции
dotnet ef migrations add InitialCreate --context %CONTEXT_NAME% --project %DATA_PROJECT_PATH% --startup-project %STARTUP_PROJECT_PATH%

:: Обновление базы данных
dotnet ef database update --context %CONTEXT_NAME% --project %DATA_PROJECT_PATH% --startup-project %STARTUP_PROJECT_PATH%

pause

does not work without migration, some fields are missing_(

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

No branches or pull requests

1 participant