55 lines
1.9 KiB
Markdown
55 lines
1.9 KiB
Markdown
# Build & Development Documentation
|
||
|
||
## Implementation Plan
|
||
See [IMPLEMENTATION_PLAN.md](./IMPLEMENTATION_PLAN.md) for detailed Phase 1 MVP roadmap (23 phases, ~75 files).
|
||
|
||
---
|
||
|
||
# Entity Framework Core - Datenbank Migrationen und Updates
|
||
|
||
## EF Tools installieren/aktualisieren
|
||
```
|
||
dotnet tool update --global dotnet-ef --version 9.0.11
|
||
```
|
||
|
||
## Update-DB:
|
||
create migrations and update database for both DbContexts
|
||
|
||
### AppDbContext
|
||
create migrations for AppDbContext
|
||
```
|
||
dotnet ef migrations add [Initial_App] --project src/Koogle.Infrastructure --startup-project src/Koogle.Web --context AppDbContext --output-dir Data/Migrations
|
||
```
|
||
update database DEV:
|
||
```
|
||
dotnet ef database update -p src/Koogle.Infrastructure -s src/Koogle.Web --context AppDbContext
|
||
```
|
||
update database PROD:
|
||
```
|
||
dotnet ef database update -p src/Koogle.Infrastructure -s src/Koogle.Web --context AppDbContext --connection "Data Source=sql-koogle-prod.database.windows.net;Initial Catalog=db-koogle;User ID=sqladmin;Password=Magister7000#;Connect Timeout=30;Encrypt=True;Trust Server Certificate=False;Application Intent=ReadWrite;Multi Subnet Failover=False"
|
||
```
|
||
|
||
### AppIdentityDbContext
|
||
create migrations for AppIdentityDbContext:
|
||
```
|
||
dotnet ef migrations add [Initial_Auth] --project src/Koogle.Infrastructure --startup-project src/Koogle.Web --context AppIdentityDbContext --output-dir Identity/Migrations
|
||
```
|
||
update database DEV:
|
||
```
|
||
dotnet ef database update -p src/Koogle.Infrastructure -s src/Koogle.Web --context AppIdentityDbContext
|
||
```
|
||
update database PROD:
|
||
```
|
||
dotnet ef database update -p src/Koogle.Infrastructure -s src/Koogle.Web --context AppIdentityDbContext --connection "Data Source=sql-koogle-prod.database.windows.net;Initial Catalog=db-koogle;User ID=sqladmin;Password=Magister7000#;Connect Timeout=30;Encrypt=True;Trust Server Certificate=False;Application Intent=ReadWrite;Multi Subnet Failover=False"
|
||
```
|
||
|
||
|
||
# Tests
|
||
|
||
## Tests ausf<73>hren
|
||
```
|
||
dotnet test tests/Koogle.Application.Tests
|
||
```
|
||
|
||
|