qa iteration 2
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using StellaOps.Infrastructure.Postgres.Migrations;
|
||||
using StellaOps.Infrastructure.Postgres.Options;
|
||||
using StellaOps.Notify.Persistence.Postgres;
|
||||
using StellaOps.Notify.Persistence.Postgres.Repositories;
|
||||
@@ -26,6 +27,12 @@ public static class NotifyPersistenceExtensions
|
||||
services.Configure<PostgresOptions>(configuration.GetSection(sectionName));
|
||||
services.AddSingleton<NotifyDataSource>();
|
||||
|
||||
// Auto-migrate notify schema on startup
|
||||
services.AddStartupMigrations(
|
||||
schemaName: "notify",
|
||||
moduleName: "Notify",
|
||||
migrationsAssembly: typeof(NotifyDataSource).Assembly);
|
||||
|
||||
// Register repositories
|
||||
services.AddScoped<IChannelRepository, ChannelRepository>();
|
||||
services.AddScoped<IDeliveryRepository, DeliveryRepository>();
|
||||
|
||||
Reference in New Issue
Block a user