Found during module-packaging Session 1.
UseSimpleModuleInfrastructure only initializes databases when !IsProduction() || provider == Sqlite (framework/SimpleModule.Hosting/SimpleModuleHostExtensions.cs). Session 1 added per-module MigrateAsync for module DbContexts that bundle migrations, but it inherits the same gating — so a packaged module installed into a production PostgreSQL host never gets its migrations applied at startup.
Planned resolution (Session 2): sm add applies module migrations explicitly at install time, and sm doctor reports pending module migrations. Consider also an opt-in SimpleModuleOptions flag for startup migration of module contexts in production.
Related: the EnsureCreated→Migrate transition caveat documented in docs/site/advanced/module-packaging.md.
Found during module-packaging Session 1.
UseSimpleModuleInfrastructureonly initializes databases when!IsProduction() || provider == Sqlite(framework/SimpleModule.Hosting/SimpleModuleHostExtensions.cs). Session 1 added per-moduleMigrateAsyncfor module DbContexts that bundle migrations, but it inherits the same gating — so a packaged module installed into a production PostgreSQL host never gets its migrations applied at startup.Planned resolution (Session 2):
sm addapplies module migrations explicitly at install time, andsm doctorreports pending module migrations. Consider also an opt-inSimpleModuleOptionsflag for startup migration of module contexts in production.Related: the EnsureCreated→Migrate transition caveat documented in docs/site/advanced/module-packaging.md.