Update upating_unit3d_version.md
This commit is contained in:
parent
a0fe76783d
commit
0b55074e5f
|
@ -5,24 +5,7 @@ _Whether you're upgrading from UNIT3D v8.3.3 to v9.0.1 or updating your PHP envi
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> backup.
|
> backup.
|
||||||
|
|
||||||
## 1. Create a Backup
|
## Prerequisites
|
||||||
|
|
||||||
UNIT3D provides built-in backup tools through PHP Artisan.
|
|
||||||
|
|
||||||
## 2. Table of Contents
|
|
||||||
|
|
||||||
- [Prerequisites](#3-prerequisites)
|
|
||||||
- [Update Procedures](#4-update-procedures)
|
|
||||||
- [4.1 Enter Maintenance Mode & Prepare Meilisearch](#41-enter-maintenance-mode--prepare-meilisearch)
|
|
||||||
- [4.2 Update PHP to 8.4](#42-update-php-to-84)
|
|
||||||
- [4.3 Update UNIT3D](#43-update-unit3d)
|
|
||||||
- [4.4 Database Migration Fix](#44-database-migration-fix)
|
|
||||||
- [Post-Update Procedures](#5-post-update-procedures)
|
|
||||||
- [Troubleshooting](#6-troubleshooting)
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
## 3. Prerequisites
|
|
||||||
|
|
||||||
- Complete backup in `~/tempBackup`
|
- Complete backup in `~/tempBackup`
|
||||||
- Sudo privileges
|
- Sudo privileges
|
||||||
|
@ -34,11 +17,13 @@ UNIT3D provides built-in backup tools through PHP Artisan.
|
||||||
curl, apt, nginx, mysql/mariadb, nano/micro
|
curl, apt, nginx, mysql/mariadb, nano/micro
|
||||||
```
|
```
|
||||||
|
|
||||||
---
|
## 1. Create a Backup
|
||||||
|
|
||||||
## 4. Update Procedures
|
UNIT3D provides built-in backup tools through PHP Artisan.
|
||||||
|
|
||||||
### 4.1 Enter Maintenance Mode & Prepare Meilisearch
|
## 2. Update Procedures
|
||||||
|
|
||||||
|
### 2.1 Enter Maintenance Mode & Prepare Meilisearch
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /var/www/html
|
cd /var/www/html
|
||||||
|
@ -65,7 +50,7 @@ sudo chmod +x /usr/local/bin/meilisearch
|
||||||
sudo systemctl start meilisearch
|
sudo systemctl start meilisearch
|
||||||
```
|
```
|
||||||
|
|
||||||
### 4.2 Update PHP to 8.4
|
### 2.2 Update PHP to 8.4
|
||||||
|
|
||||||
Add PHP Repository & Update Package Lists:
|
Add PHP Repository & Update Package Lists:
|
||||||
|
|
||||||
|
@ -81,14 +66,15 @@ sudo dpkg -l | grep php | tee ~/tempBackup/packages.txt
|
||||||
sudo apt install php8.4-common php8.4-cli php8.4-fpm php8.4-{redis,bcmath,curl,dev,gd,igbinary,intl,mbstring,mysql,opcache,readline,xml,zip}
|
sudo apt install php8.4-common php8.4-cli php8.4-fpm php8.4-{redis,bcmath,curl,dev,gd,igbinary,intl,mbstring,mysql,opcache,readline,xml,zip}
|
||||||
```
|
```
|
||||||
|
|
||||||
**NGINX Configuration Update:**
|
### 2.3 NGINX Configuration Update
|
||||||
1. Edit Nginx configuration file::
|
|
||||||
|
#### **Edit Nginx configuration file:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo nano /etc/nginx/sites-available/default
|
sudo nano /etc/nginx/sites-available/default
|
||||||
```
|
```
|
||||||
|
|
||||||
2. Update the `fastcgi_pass` directive to use the PHP 8.4 socket
|
#### **Update the `fastcgi_pass` directive to use the PHP 8.4 socket:**
|
||||||
|
|
||||||
> **Note:**
|
> **Note:**
|
||||||
> Locate the line
|
> Locate the line
|
||||||
|
@ -102,14 +88,16 @@ For example, to point to the PHP 8.4 FPM socket:
|
||||||
```nginx
|
```nginx
|
||||||
fastcgi_pass unix:/var/run/php/php8.4-fpm.sock;
|
fastcgi_pass unix:/var/run/php/php8.4-fpm.sock;
|
||||||
```
|
```
|
||||||
|
|
||||||
Save and exit the editor.
|
Save and exit the editor.
|
||||||
|
|
||||||
3. Test the Nginx configuration:
|
#### **Test the Nginx configuration:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo nginx -t
|
sudo nginx -t
|
||||||
```
|
```
|
||||||
|
|
||||||
4. Restart Nginx and PHP-FPM, and Remove PHP 8.3:
|
#### **Restart Nginx and PHP-FPM, and Remove PHP 8.3:**
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
sudo nginx -t
|
sudo nginx -t
|
||||||
|
@ -120,17 +108,28 @@ sudo apt purge '^php8.3.*'
|
||||||
php -v
|
php -v
|
||||||
```
|
```
|
||||||
|
|
||||||
### 4.3 Update UNIT3D
|
## 3. Update UNIT3D
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cd /var/www/html
|
cd /var/www/html
|
||||||
php artisan git:update
|
php artisan git:update
|
||||||
```
|
```
|
||||||
|
During the update process, UNIT3D differences all files and prompts the user to choose whether to keep the current version or update to the new one; typically, it is recommended to update all files, but before beginning the update, the most recent backup should be copied to `~/tempBackup`, and after the update, the list of file conflicts is saved as `~/tempBackup/fileConflicts.txt` so that, once the process is complete, these files can be reviewed to determine which changes should be merged or discarded.
|
||||||
|
|
||||||
### 4.4 Database Migration Fix
|
### 4. Database Migration Fix
|
||||||
|
|
||||||
During the update, you might encounter an error related to the tickets table
|
During the update, you might encounter an error related to the tickets table
|
||||||
|
|
||||||
|
```sql
|
||||||
|
2025_02_17_074140_update_columns_to_boolean ......................................................................................... 38.50ms FAIL
|
||||||
|
|
||||||
|
In Connection.php line 825:
|
||||||
|
SQLSTATE[22004]: Null value not allowed: 1138 Invalid use of NULL value (Connection: mysql, SQL: alter table `tickets` modify `staff_read` tinyint(1) not null default '0')
|
||||||
|
|
||||||
|
In Connection.php line 571:
|
||||||
|
SQLSTATE[22004]: Null value not allowed: 1138 Invalid use of NULL value
|
||||||
|
```
|
||||||
|
|
||||||
**Resolve NULL values in tickets table:**
|
**Resolve NULL values in tickets table:**
|
||||||
|
|
||||||
1. Log in to MySQL:
|
1. Log in to MySQL:
|
||||||
|
|
Loading…
Reference in New Issue