EfMigrationTests.cs 612 B

1234567891011121314151617
  1. using Jellyfin.Database.Providers.Sqlite.Migrations;
  2. using Jellyfin.Server.Implementations.Migrations;
  3. using Microsoft.EntityFrameworkCore;
  4. using Xunit;
  5. namespace Jellyfin.Server.Implementations.Tests.EfMigrations;
  6. public class EfMigrationTests
  7. {
  8. [Fact]
  9. public void CheckForUnappliedMigrations_SqLite()
  10. {
  11. var dbDesignContext = new SqliteDesignTimeJellyfinDbFactory();
  12. var context = dbDesignContext.CreateDbContext([]);
  13. Assert.False(context.Database.HasPendingModelChanges(), "There are unapplied changes to the EFCore model for SQLite. Please create a Migration.");
  14. }
  15. }