It should work since you have composer install included in the script. Although it doesn't hurt to have dbal installed, I don't think you'll actually need it since I'm pretty sure you really only need it if you want to change column names or column definitions.
Forge: script for adding column to production database table
Was reading this post below and feel I have a good understanding of the process of creating a new migration which then adds a column to an existing table. I know I'll have to test the nullable or default values for previous users, e.g. to ensure there are no errors.
This doc: https://laravel.com/docs/5.8/migrations#columns states you need to add this dependency composer require doctrine/dbal. I've done that locally.
When I get ready to push this to production does the below script cover this dbal?
It seems like a yes, as it's in the composer.json which would be pushed to master, but it's not something I want to get wrong.
cd /home/forge/bidbird.co
git pull origin master
composer install --no-interaction --prefer-dist --optimize-autoloader
php artisan config:cache -q --no-interaction
php artisan route:cache
npm run production
echo "" | sudo -S service php7.1-fpm reload
if [ -f artisan ]
then
php artisan migrate --force
fi
Thank you for any tips..
Please or to participate in this conversation.