add migrations and readme
This commit is contained in:
28
README.md
28
README.md
@ -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
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user