• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

curt / Viae / 19527137380

20 Nov 2025 05:53AM UTC coverage: 51.56%. First build
19527137380

push

github

web-flow
feat: provide minimal locus and vestigium views (#1)

62 of 109 branches covered (56.88%)

Branch coverage included in aggregate %.

500 of 981 new or added lines in 61 files covered. (50.97%)

500 of 981 relevant lines covered (50.97%)

19.89 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/endpoint/src/Viae.Persistence/ViaeDbContextFactory.cs
1
// Copyright © 2025 Curt Gilman
2
// SPDX-License-Identifier: AGPL-3.0-only
3
// Viae: A geo-centric, journey-focused, federated blog platform
4

5
using Microsoft.EntityFrameworkCore;
6
using Microsoft.EntityFrameworkCore.Design;
7
using Viae.Domain.Models;
8

9
namespace Viae.Persistence;
10

11
/// <summary>
12
/// Design-time factory for creating ViaeDbContext instances for EF Core tools.
13
/// This is used by migrations and other design-time tools.
14
/// </summary>
15
public class ViaeDbContextFactory : IDesignTimeDbContextFactory<ViaeDbContext>
16
{
17
    public ViaeDbContext CreateDbContext(string[] args)
18
    {
NEW
19
        var postgresPort = Environment.GetEnvironmentVariable("Postgres__Port") ?? "5432";
×
NEW
20
        var postgresPassword = Environment.GetEnvironmentVariable("Postgres__Password") ?? "viae";
×
21

NEW
22
        var optionsBuilder = new DbContextOptionsBuilder<ViaeDbContext>();
×
23

24
        // Use a default connection string for migrations
25
        // This will be overridden at runtime by the actual application configuration
NEW
26
        optionsBuilder.UseNpgsql(
×
NEW
27
            $"Host=localhost;Port={postgresPort};Database=viae;Username=viae;Password={postgresPassword}",
×
NEW
28
            npgsqlOptions =>
×
NEW
29
            {
×
NEW
30
                npgsqlOptions.UseNetTopologySuite();
×
NEW
31
                npgsqlOptions.MapEnum<Origo>();
×
NEW
32
            }
×
NEW
33
        );
×
34

NEW
35
        return new ViaeDbContext(optionsBuilder.Options);
×
36
    }
37
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc