What are update scripts?
Update scripts are used for automatically updating data when breaking changes are introduced by Statamic or by addons. This feature was introduced for Statamic 3.1, and new installations will have all of this preconfigured out-of-the-box. For older installations, you may need to manually configure update scripts in your app:
Updating your composer.json
Add this pre-update-cmd
under the scripts
section of your composer.json
:
"scripts": { "pre-update-cmd": [ "Statamic\\Console\\Composer\\Scripts::preUpdateCmd" ], ...}
Running update scripts for the first time
If the above script was not already registered in your composer.json, you'll need to manually trigger update scripts in your app by running:
php please updates:run 3.0
This is a one-time thing and will be automatically triggered by future Statamic updates.