Removed the SeriesMetadata migration since users have updated to v0.4.1. Any other users will require a scan to get the SeriesMetadata generated. (#275)

This commit is contained in:
Joseph Milazzo 2021-06-07 13:16:50 -05:00 committed by GitHub
parent e4a9c468fe
commit 4606b54603
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 0 additions and 19 deletions

View File

@ -7,7 +7,6 @@ using API.Entities;
using API.Entities.Enums;
using API.Services;
using Microsoft.AspNetCore.Identity;
using Microsoft.EntityFrameworkCore;
namespace API.Data
{
@ -56,21 +55,5 @@ namespace API.Data
await context.SaveChangesAsync();
}
public static async Task SeedSeriesMetadata(DataContext context)
{
await context.Database.EnsureCreatedAsync();
context.Database.EnsureCreated();
var series = await context.Series
.Include(s => s.Metadata).ToListAsync();
foreach (var s in series)
{
s.Metadata ??= new SeriesMetadata();
}
await context.SaveChangesAsync();
}
}
}

View File

@ -61,8 +61,6 @@ namespace API
await context.Database.MigrateAsync();
await Seed.SeedRoles(roleManager);
await Seed.SeedSettings(context);
// TODO: Remove this in v0.4.2
await Seed.SeedSeriesMetadata(context);
}
catch (Exception ex)
{