Repository navigation
Docs: the resource setup hosted service migrates message storage regardless of AutoCreate - #5445
Merged
Merged
Conversation
…rdless of AutoCreate managing.md said UseResourceSetupOnStartup() respects the AutoCreate policy and can stay registered in every environment. For Wolverine's message store it does not: the hosted service calls MessageStoreResource.Setup(), which always migrates with CreateOrUpdate. Under a DML-only database role that means a drifted schema fails startup with Weasel's InsufficientDatabasePrivilegeException. Replaces the claim with a warning describing that behavior and the alternative (build the schema in a deployment step, gate with db-assert), and adds the hosted service to the list of explicit setup operations in the AutoCreate tip. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
This was referenced Nov 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed
docs/guide/durability/managing.mdsaid thatUseResourceSetupOnStartup()runs "respecting theAutoCreatepolicy, so it can stay registered in every environment". That's not true for Wolverine's message storage. The hosted service callsMessageStoreResource.Setup(), which always migrates withCreateOrUpdate(src/Wolverine/Persistence/Durability/MessageStoreResource.cs), the same asresources setup.::: warningexplaining what happens under a database role that can't run DDL, and what to do instead (build the schema in a deployment step with an elevated role, gate withdb-assert)UseResourceSetupOnStartup()/AddResourceSetupOnStartup()hosted service to the list of explicit setup operations in the "Disable Automatic Storage Migration" tipWhy
A client runs EF Core migration bundles plus
resources setupunder a migrator role, then deploys services with DML-only PostgreSQL roles. Following the old wording would leave the setup service registered in those services.Verified
Against PostgreSQL (port 5433), Wolverine 6.63.0,
AutoBuildMessageStorageOnStartup = AutoCreate.None, a role with onlyUSAGEon the schema,SELECT/INSERT/UPDATE/DELETEon the tables, andUSAGE, SELECTon the sequences:AddResourceSetupOnStartup(): starts normallywolverine_recurring_messagesdropped (drift) +AddResourceSetupOnStartup(): startup fails withWeasel.Core.InsufficientDatabasePrivilegeException(42501: permission denied for schema ...)Docs only; the docs site was not rebuilt locally.
🤖 Generated with Claude Code