Skip to content

Commit

Permalink
πŸ§‘β€πŸ’» Only auto-initialise the database in DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
jasontaylordev committed Jul 16, 2023
1 parent c5d9eed commit 9cabc18
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Web/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,14 @@

var app = builder.Build();

#if DEBUG
await app.InitialiseDatabaseAsync();
#endif

// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseMigrationsEndPoint();

await app.InitialiseDatabaseAsync();
}
else
{
Expand Down

0 comments on commit 9cabc18

Please sign in to comment.