diff --git a/backend/cinemateket/Program.cs b/backend/cinemateket/Program.cs index 85a4a6b..841b818 100644 --- a/backend/cinemateket/Program.cs +++ b/backend/cinemateket/Program.cs @@ -36,11 +36,8 @@ var services = builder.Services.BuildServiceProvider(); using (var scope = services.CreateScope()) { var context = scope.ServiceProvider.GetRequiredService(); - - if (context.Database.EnsureCreated()) - { - context.Database.Migrate(); - } + context.Database.EnsureDeleted(); // cursed + context.Database.Migrate(); // Check if movies are already inserted to avoid duplicate insertion if (!context.Movies.Any())