EF Core 5 has various events, but they relate to DbContext. There are no events related to migrations (Migration).
I want to run custom code after all migrations are applied - whether triggered by code (context.Database.Migrate()) or the CLI (dotnet ef database update).
The workaround is to add an "empty" migration, and place my code in its Up method. But I would need to do that every time I add a migration.
Assuming there's no event or hook I can use (is there?), how can I run custom code after all migrations are applied?