diff --git a/CyberBoom/DbContext/User.cs b/CyberBoom/DbContext/User.cs index 69dc2d6..f13d0fe 100644 --- a/CyberBoom/DbContext/User.cs +++ b/CyberBoom/DbContext/User.cs @@ -104,7 +104,13 @@ public class ApplicationContext : IdentityDbContext public ApplicationContext(DbContextOptions options) : base(options) { - Database.Migrate(); + try{ + Database.Migrate(); + } + catch + { + Database.EnsureCreated(); + } } protected override void OnModelCreating(ModelBuilder builder)