silverstripe-migrations icon indicating copy to clipboard operation
silverstripe-migrations copied to clipboard

Add post-build hook compatibility

Open patricknelson opened this issue 1 year ago • 0 comments

For SS v4, add ability for devs to hook into dev/build to execute migrations. Use onAfterBuild extension hook circa SS v4+, c.f. https://github.com/silverstripe/silverstripe-framework/blob/4.11/src/ORM/DatabaseAdmin.php#L406

Ensure that this can be enabled or disabled via YAML config. Document that you can enable on a per-environment basis (e.g. enabled for prod but not local dev) using SilverStripe's built-in environment or envorconstant (and etc) YAML exclusionary rules, per: https://docs.silverstripe.org/en/5/developer_guides/configuration/configuration/

environment, in which case the value(s) should be one of "live", "test" or "dev" to indicate the Silverstripe CMS mode the site must be in

patricknelson avatar Jul 24 '23 23:07 patricknelson