Provide a way to easily perform database migrations #5043
Labels
area/framework
Affects third party integration/development
area/modules
Affects module support/integration
enhancement
New feature or improvement
Milestone
Is your feature request related to a problem? Please describe.
Right now, users have to perform database migration for each individual module manually. Some aren't even aware that database migration is required when they upgrade, but notice it when faced with a nasty stack trace that prevents them from using the module any further. As discussed offline with @lippserd, this should facilitate through a hook implementation. I will describe below how this hook should operate based on my needs, without deep diving into the implementation detail. Nothing is decided yet, if someone has improvements, ideas, then feel free to supplement this.
Describe the solution you'd like
The purpose of this hook is quite straight forward. The user should be able to perform all required database migrations of the respective modules by just pressing a button. While I personally would like to have to confirm the pending DB migrations of all modules only once and Icinga Web 2 would then apply all of them automatically, though, doesn't necessarily have to be this way. Whether a database migration is required and its importance should be left to that module implementing this hook.
cog
icon).cog
icon listing all potential modules that require a DB migration with some brief explanations what the migration is needed for (maybe even providing an option to confirm all the pending migrations right there, or link to the appropriate module).In order for this to work seamlessly, all modules will need to maintain
schema_version
table similar to Icinga 2 and Icinga DB. Besides, Icinga Web 2 should also implement the required widgets so that all modules can use them in a consistent way.Additional context
Add any other context or screenshots about the feature request here.
The text was updated successfully, but these errors were encountered: