Fix Wave 2 review: PG18 volume path, null guards, NotAuthorized redirect, drop docker-compose, port 5433 connection strings
This commit is contained in:
@@ -10,9 +10,9 @@ public class DeepDrftContextFactory : IDesignTimeDbContextFactory<DeepDrftContex
|
||||
// For 'dotnet ef' commands, set ConnectionStrings__DefaultConnection in your environment when
|
||||
// you need to actually hit the database (e.g. `dotnet ef database update`). For model-only
|
||||
// operations like `migrations add`, the placeholder below is sufficient — EF never connects.
|
||||
// Example: export ConnectionStrings__DefaultConnection="Host=localhost;Database=deepdrft_dev;Username=postgres;Password=yourpassword"
|
||||
// Example: export ConnectionStrings__DefaultConnection="Host=localhost;Port=5433;Database=postgres;Username=postgres;Password=yourpassword"
|
||||
var connectionString = Environment.GetEnvironmentVariable("ConnectionStrings__DefaultConnection")
|
||||
?? "Host=localhost;Database=deepdrft_dev;Username=postgres;Password=placeholder";
|
||||
?? "Host=localhost;Port=5433;Database=postgres;Username=postgres;Password=placeholder";
|
||||
|
||||
var optionsBuilder = new DbContextOptionsBuilder<DeepDrftContext>();
|
||||
optionsBuilder.UseNpgsql(connectionString);
|
||||
|
||||
Reference in New Issue
Block a user