Database upgrade mechanism #29

Open
opened 2026-08-23 11:01:53 +02:00 by c.fahner · 0 comments
Owner

Modules should be able to declare "database upgrades" that are applied after the schema is altered to the latest version. Modules should be able to declare an upgrade as "idempotent" so that tools can by default reject retries of non-idempotent upgrades.

A default module (called "tools"?) should be available that implements this as a CLI command. It should track which upgrades have already been applied through the upgrade class name.

This command should provide the option to clean up or truncate tables or columns after the upgrades have been applied successfully (this is where the UpgradeOptions from the OCD library come in). This should be behind a flag that has to be enabled explicitly.

Modules should be able to declare "database upgrades" that are applied after the schema is altered to the latest version. Modules should be able to declare an upgrade as "idempotent" so that tools can by default reject retries of non-idempotent upgrades. A default module (called "tools"?) should be available that implements this as a CLI command. It should track which upgrades have already been applied through the upgrade class name. This command should provide the option to clean up or truncate tables or columns after the upgrades have been applied successfully (this is where the `UpgradeOptions` from the OCD library come in). This should be behind a flag that has to be enabled explicitly.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
slendium/framework#29
No description provided.