add migrations and readme

This commit is contained in:
2024-06-19 22:57:29 +03:00
parent f29c3d19dd
commit 28eb54070a
8 changed files with 1353 additions and 1 deletions

View File

@ -1,2 +1,30 @@
# Backend
# ApiService
Database connection in appsettings.json:
username:postgres
password:postgres
host:localhost
port:5432
database:prod
if no migrations
dotnet ef migrations add UserContextMigration --context UserContext
dotnet ef database update --context UserContext
dotnet ef migrations add WeatherForecastContextMigration --context WeatherForecastContext
dotnet ef database update --context WeatherForecastContext
and etc for each dbcontext in project
if you have Migrations folder in ApiService project just call (in dev mode app) post: /api/db/migrate
/api/swagger - path to swagger