UPGRADE-0.3.x-1.0.0.md
v0.3.x → v1.0.0This guide helps you safely upgrade your Unopim installation from any
v0.3.xversion tov1.0.0. You can follow the manual steps or you can use the automated upgrade script for version 0.3.x to 1.0.0.
Before starting the upgrade process:
mysqldump or your preferred method:mysqldump -u your_db_user -p your_db_name > backup.sql
Make sure to keep these backups safe in case something goes wrong during the upgrade.
.zip file for the release v1.0.0Copy the following files from your existing Unopim project to the newly extracted version:
.env filestorage/ folder (to keep your data intact like images)This ensures your environment settings and any uploaded files stay intact during the upgrade.
Navigate to the extracted folder, and install the necessary dependencies with Composer:
composer install
Run the following command to apply any necessary database schema updates:
php artisan migrate
Ensure that the system is cleared of any cached data and properly linked:
php artisan optimize:clear
php artisan storage:link
Unopim now uses two queues: system and default.
The system queue is used for processing internal jobs, such as product completeness score calculation.
Update your queue worker so it processes the system queue as well by using the --queue=system,default option.
If you have set up your queue worker through Supervisor, make sure to update the command in your Supervisor configuration file to include this option.
This ensures that the worker handles jobs from both queues. You may also choose to set up dedicated workers for each queue.
Example command:
php artisan queue:work --queue=system,default
If you are using a process manager like Supervisor to manage the queue:work command, restart the relevant service to apply the changes. Replace unopim-worker with your actual worker name, if different:
sudo supervisorctl restart unopim-worker
./upgrade_0.3.x_to_1.0.0.sh
Updated queue command:
php artisan queue:work --queue=system,default
After following these steps, your Unopim should be successfully upgraded to version v1.0.0.
Test your application thoroughly to make sure everything works as expected.