Added documentation about manually deleting the var/cache folder while upgrading from 1 to 2

This is related to issue #1084
This commit is contained in:
Jan Böhmer 2025-10-18 20:15:21 +02:00
parent 351e084ab1
commit d8e093e0c5

View file

@ -48,14 +48,15 @@ The upgrade process works very similar to a normal (minor release) upgrade.
1. Make a backup of your existing Part-DB installation, including the database, data directories and the configuration files and `.env.local` file. 1. Make a backup of your existing Part-DB installation, including the database, data directories and the configuration files and `.env.local` file.
The `php bin/console partdb:backup` command can help you with this. The `php bin/console partdb:backup` command can help you with this.
2. Pull the v2 version. For git installation you can do this with `git checkout v2.0.0` (or newer version) 2. Pull the v2 version. For git installation you can do this with `git checkout v2.0.0` (or newer version)
3. Run `composer install --no-dev -o` to update the dependencies. 3. Remove the `var/cache/` directory inside the Part-DB installation to ensure that no old cache files remain.
4. Run `yarn install` and `yarn build` to update the frontend assets. 4. Run `composer install --no-dev -o` to update the dependencies.
5. Rund `php bin/console doctrine:migrations:migrate` to update the database schema. 5. Run `yarn install` and `yarn build` to update the frontend assets.
6. Clear the cache with `php bin/console cache:clear`. 6. Rund `php bin/console doctrine:migrations:migrate` to update the database schema.
7. Open your Part-DB instance in the browser and log in as an admin user. 7. Clear the cache with `php bin/console cache:clear`.
8. Go to the user or group permissions page, and give yourself (and other administrators) the right to change system settings (under "System" and "Configuration"). 8. Open your Part-DB instance in the browser and log in as an admin user.
9. You can now go to the settings page (under "System" and "Settings") and check if all settings are correct. 9. Go to the user or group permissions page, and give yourself (and other administrators) the right to change system settings (under "System" and "Configuration").
10. Parameters which were previously set via environment variables are greyed out and cannot be changed in the web interface. 10. You can now go to the settings page (under "System" and "Settings") and check if all settings are correct.
11. Parameters which were previously set via environment variables are greyed out and cannot be changed in the web interface.
If you want to change them, you must migrate them to the settings interface as described below. If you want to change them, you must migrate them to the settings interface as described below.
### Docker installation ### Docker installation
@ -87,3 +88,15 @@ After the migration run successfully, the contents of your environment variables
Go through the environment variables listed by the command and remove them from your environment variable configuration (e.g. `.env.local` file or docker compose file), or just comment them out for now. Go through the environment variables listed by the command and remove them from your environment variable configuration (e.g. `.env.local` file or docker compose file), or just comment them out for now.
If you want to keep some environment variables, just leave them as they are, they will still work as before, the migration command only affects the settings stored in the database. If you want to keep some environment variables, just leave them as they are, they will still work as before, the migration command only affects the settings stored in the database.
## Troubleshooting
### cache:clear fails: You have requested a non-existent parameter "jbtronics.settings.proxy_dir".
If you receive an error like
```
In App_KernelProdContainer.php line 2839:
You have requested a non-existent parameter "jbtronics.settings.proxy_dir".
```
when running `php bin/console cache:clear` or `composer install`. You have to manually delete the `var/cache/`
directory inside your Part-DB installation and try again.