silverstripe-migrations
silverstripe-migrations copied to clipboard
Add post-build hook compatibility
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