2
0

EfMigrationTests.cs 579 B

123456789101112131415161718
  1. using System;
  2. using System.Threading.Tasks;
  3. using Jellyfin.Server.Implementations.Migrations;
  4. using Microsoft.EntityFrameworkCore;
  5. using Xunit;
  6. namespace Jellyfin.Server.Implementations.Tests.EfMigrations;
  7. public class EfMigrationTests
  8. {
  9. [Fact]
  10. public void CheckForUnappliedMigrations()
  11. {
  12. var dbDesignContext = new DesignTimeJellyfinDbFactory();
  13. var context = dbDesignContext.CreateDbContext([]);
  14. Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EfCore model. Please create a Migration.");
  15. }
  16. }