Part-DB 1.0 was a complete rewrite of the old Part-DB (< 1.0.0), which you can find here. A lot of things changed internally, but Part-DB was always developed with compatibility in mind, so you can migrate smoothly to the new Part-DB version, and utilize its new features and improvements.
Some things changed however to the old version and some features are still missing, so be sure to read the following sections carefully before proceeding to upgrade.
- PHP 8.1 or higher is required now (Part-DB 0.5 required PHP 5.4+, Part-DB 0.6 PHP 7.0). Releases are available for Windows too, so almost everybody should be able to use PHP 8.1
- Console access highly required. The installation of composer and frontend dependencies require console access, also more sensitive stuff like database migration work via CLI now, so you should have console access on your server.
- Markdown/HTML is now used instead of BBCode for rich text in description and command fields. It is possible to migrate your existing BBCode to Markdown via
php bin/console php bin/console partdb:migrations:convert-bbcode.
- Server exceptions are not logged to event log anymore. For security reasons (exceptions can contain sensitive information) exceptions are only logged to server log (by default under ‘./var/log’), so only the server admins can access it.
- Profile labels are now saved in Database (before they were saved in a separate JSON file). The profiles of legacy Part-DB versions can not be imported into new Part-DB 1.0
- Label placeholders now use the
[[PLACEHOLDER]]format instead of
%PLACEHOLDER%. Also, some placeholders has changed.
- Configuration is now done via configuration files / environment variables instead of the WebUI (this maybe change in the future).
- Database updated are now done via console instead of the WebUI
- Permission system changed: You will have to newly set the permissions of all users and groups!
- Import / Export file format changed. Fields must be english now (unlike in legacy Part-DB versions, where german fields in CSV were possible) and you maybe have to change the header line/field names of your CSV files.
- No possibility to mark parts for ordering (yet)
- No support for 3D models of footprints (yet)
- No possibility to disable footprints, manufacturers globally (or per category). This should not have a big impact, when you forbid users to edit/create them.
- No resistor calculator or SMD labels tools
Once you have upgraded the database to the latest version, you will not be able to access the database with Part-DB 0.5.*. Doing so could lead to data corruption. So make a backup before you proceed the upgrade, so you will be able to revert the upgrade, when you are not happy with the new version
Beware that all user and group permissions will be reset, and you have to set the permissions again the new Part-DB as many permissions changed, and automatic migration is not possible.
- Upgrade your existing Part-DB version the newest Part-DB 0.5.* version (at the moment Part-DB 0.5.8), like described in the old Part-DB’s repository.
- Make a backup of your database and attachments. If something goes wrong during migration, you can use this backup to start over. If you have some more complex permission configuration, you maybe want to do screenshots of it, so you can redo it again later.
- Set up the new Part-DB like described in installation section. You will need to do the setup for a MySQL instance ( either via docker or direct installation). Set the
DATABASE_URLenvironment variable in your
docker-compose.yaml) to your existing database. ( e.g.
- Ensure that the correct base currency is configured (
BASE_CURRENCYenv), this must match the currency used in the old Part-DB version. If you used Euro, you do not need to change anything.
php bin/console cache:clearand
php bin/console doctrine:migrations:migrate.
php bin/console partdb:migrations:convert-bbcodeto convert the BBCode used in comments and part description to the newly used markdown.
- Copy the content of the
data/mediafolder from the old Part-DB instance into
public/mediafolder in the new version.
php bin/console cache:clear
- You should be able to log in to Part-DB now using your admin account and the old password. If you do not know the admin username, run
php bin/console partdb:users:listand look for the user with ID 1. You can reset the password of this user using
php bin/console partdb:users:set-password [username].
- All other users besides the admin user are disabled (meaning they can not log in). Go to “System->User” and “System-> Group” and check the permissions of the users (and change them if needed). If you are done enable the users again, by removing the disabled checkmark in the password section. If you have a lot of users you can enable them all at once using
php bin/console partdb:users:enable --all
It is not possible to access the database using the old Part-DB version. If you do so, this could damage your database. Therefore, it is recommended to remove the old Part-DB version, after everything works.
If you encounter any issues (especially during the database migration) or features do not work like intended, please open an issue ticket at GitHub.