mirror of
https://github.com/collinbarrett/FilterLists.git
synced 2026-03-11 09:04:27 +00:00
mv MigrationsAssembly to Data proj
This commit is contained in:
parent
332e0ed9fc
commit
b65225a5cd
67 changed files with 1 additions and 14 deletions
|
|
@ -1,13 +0,0 @@
|
|||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace FilterLists.Api.Migrations.Extensions
|
||||
{
|
||||
public static class MigrationBuilderExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// creates an index of specified prefix length
|
||||
/// </summary>
|
||||
public static void CreateIndex(this MigrationBuilder migrationBuilder, string name, string table, string column,
|
||||
int prefixLength) => migrationBuilder.Sql($"CREATE INDEX {name} ON {table} ({column}({prefixLength}));");
|
||||
}
|
||||
}
|
||||
|
|
@ -25,7 +25,7 @@ public static void AddFilterListsApiServices(this IServiceCollection services, I
|
|||
services.AddSingleton(c => config);
|
||||
services.AddDbContextPool<FilterListsDbContext>(o =>
|
||||
o.UseMySql(config.GetConnectionString("FilterListsConnection"),
|
||||
m => m.MigrationsAssembly("FilterLists.Api")
|
||||
m => m.MigrationsAssembly("FilterLists.Data")
|
||||
.ServerVersion(new ServerVersion(new Version(10, 4, 12), ServerType.MariaDb))));
|
||||
services.TryAddScoped<FilterListService>();
|
||||
services.TryAddScoped<LanguageService>();
|
||||
|
|
|
|||
Loading…
Reference in a new issue