diff --git a/docs/recipe/typo3.md b/docs/recipe/typo3.md index 3dc1e1254..4be96c7fd 100644 --- a/docs/recipe/typo3.md +++ b/docs/recipe/typo3.md @@ -37,6 +37,7 @@ The [deploy](#deploy) task of **TYPO3** consists of: * [deploy:writable](/docs/recipe/deploy/writable.md#deploy-writable) – Makes writable dirs * [deploy:vendors](/docs/recipe/deploy/vendors.md#deploy-vendors) – Installs vendors * [typo3:cache:warmup](/docs/recipe/typo3.md#typo3-cache-warmup) – TYPO3 - Cache warmup for system caches +* [typo3:database:updateschema](/docs/recipe/typo3.md#typo3-database-updateschema) – TYPO3 - Update database schema * [typo3:extension:setup](/docs/recipe/typo3.md#typo3-extension-setup) – TYPO3 - Set up all extensions * [typo3:language:update](/docs/recipe/typo3.md#typo3-language-update) – TYPO3 - Update the language files of all activated extensions * [typo3:cache:flush](/docs/recipe/typo3.md#typo3-cache-flush) – TYPO3 - Clear all caches @@ -169,7 +170,7 @@ Composer install options for production. ### use_rsync -[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L118) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L117) If set in the config this recipe uses rsync. Default setting: false (uses the Git repository) @@ -180,7 +181,7 @@ false ### update_code_task -[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L120) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L119) @@ -190,7 +191,7 @@ return get('use_rsync') ? 'rsync' : 'deploy:update_code'; ### rsync -[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L148) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L147) @@ -210,11 +211,22 @@ return get('use_rsync') ? 'rsync' : 'deploy:update_code'; ``` +### typo3_updateschema_types +[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L164) + +List of schema update types. +`safe` includes all necessary operations, to add or change fields or tables. + +```php title="Default value" +'safe' +``` + + ## Tasks ### typo3\:update_code {#typo3-update_code} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L124) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L123) @@ -222,7 +234,7 @@ return get('use_rsync') ? 'rsync' : 'deploy:update_code'; ### typo3\:cache\:flush {#typo3-cache-flush} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L168) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L173) TYPO3 - Clear all caches. @@ -231,7 +243,7 @@ All run via [bin/php](/docs/recipe/common.md#bin/php) [release_path](/docs/recip ### typo3\:cache\:warmup {#typo3-cache-warmup} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L173) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L178) TYPO3 - Cache warmup for system caches. @@ -239,7 +251,7 @@ TYPO3 - Cache warmup for system caches. ### typo3\:language\:update {#typo3-language-update} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L178) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L183) TYPO3 - Update the language files of all activated extensions. @@ -247,15 +259,23 @@ TYPO3 - Update the language files of all activated extensions. ### typo3\:extension\:setup {#typo3-extension-setup} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L183) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L188) TYPO3 - Set up all extensions. +### typo3\:database\:updateschema {#typo3-database-updateschema} +[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L193) + +TYPO3 - Update database schema. + + + + ### deploy {#deploy} -[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L203) +[Source](https://github.com/deployphp/deployer/blob/master/recipe/typo3.php#L214) Deploys a TYPO3 project. @@ -268,10 +288,11 @@ Main deploy task for TYPO3. 5. Ensure writable dirs 6. Install vendors 7. Warm up TYPO3 caches -8. Run extension setup -9. Update language files -10. Flush caches -11. Unlock and clean up +8. Perform schema updates +9. Run extension setup +10. Update language files +11. Flush caches +12. Unlock and clean up This task is group task which contains next tasks: @@ -284,6 +305,7 @@ This task is group task which contains next tasks: * [deploy:writable](/docs/recipe/deploy/writable.md#deploy-writable) * [deploy:vendors](/docs/recipe/deploy/vendors.md#deploy-vendors) * [typo3:cache:warmup](/docs/recipe/typo3.md#typo3-cache-warmup) +* [typo3:database:updateschema](/docs/recipe/typo3.md#typo3-database-updateschema) * [typo3:extension:setup](/docs/recipe/typo3.md#typo3-extension-setup) * [typo3:language:update](/docs/recipe/typo3.md#typo3-language-update) * [typo3:cache:flush](/docs/recipe/typo3.md#typo3-cache-flush) diff --git a/recipe/typo3.php b/recipe/typo3.php index 08806313a..2b4f88765 100644 --- a/recipe/typo3.php +++ b/recipe/typo3.php @@ -110,7 +110,6 @@ */ set('composer_options', ' --no-dev --verbose --prefer-dist --no-progress --no-interaction --optimize-autoloader'); - /** * If set in the config this recipe uses rsync. * Default setting: false (uses the Git repository) @@ -158,6 +157,12 @@ 'timeout' => 600, ]); +/** + * List of schema update types. + * `safe` includes all necessary operations, to add or change fields or tables. + */ +set('typo3_updateschema_types', 'safe'); + /** * TYPO3 Commands @@ -184,6 +189,11 @@ run('{{bin/php}} {{release_path}}/{{bin/typo3}} extension:setup'); }); +desc('TYPO3 - Update database schema'); +task('typo3:database:updateschema', function () { + run('{{bin/php}} {{release_path}}/{{bin/typo3}} database:updateschema {{typo3_updateschema_types}}'); +}); + /** * Main deploy task for TYPO3. * @@ -194,10 +204,11 @@ * 5. Ensure writable dirs * 6. Install vendors * 7. Warm up TYPO3 caches - * 8. Run extension setup - * 9. Update language files - * 10. Flush caches - * 11. Unlock and clean up + * 8. Perform schema updates + * 9. Run extension setup + * 10. Update language files + * 11. Flush caches + * 12. Unlock and clean up */ desc('Deploys a TYPO3 project'); task('deploy', [ @@ -210,6 +221,7 @@ 'deploy:writable', 'deploy:vendors', 'typo3:cache:warmup', + 'typo3:database:updateschema', 'typo3:extension:setup', 'typo3:language:update', 'typo3:cache:flush',