Open rlford opened 5 years ago
Hey @rickylford!
You are correct with your last sentence, about an incompatability between PartKeepr and MariaDB >= 10.3 (or more specifically between Doctrine and MariaDB >= 10.3). There is currently nothing else to say about this, as the bug has been fixed upstream in Doctrine, but we are still using the 2.5 branch (the latest symphony 2 compatible branch). To be able to fix this, somebody would have to port PartKeepr to Symphony 3... Which is a lot of work.
See https://github.com/partkeepr/PartKeepr/issues/916#issuecomment-351205416 and the following two comments; and additionally the original bugreport on doctrine: https://github.com/doctrine/orm/issues/6565
(Duplicate of #916, #963)
Sorry for not being able to help here :-(
I think a version check inside PartKeeper should warn the admin of the fact that the PHP version is incompatible with the doctrine dependency. This way theadmin has the chance to take steps and knows why things are going south.
I had the same issue, after a few others. Finally got everything to work using PHP 7.2, APCU and the APC backwards compatibility package, only to get the database schema issue. But I'm using MariaDB 10.4, so that explains it.
A version check in the installer, or even just a list somewhere in the installation docs that talks about some of these compatibility issue would be awesome! I went ahead and installed the latest versions of everything, only to find out that I had to downgrade to get it to work.
I get the same error.
I transferred my database from an installation with:
Partkeepr 1.4.0
MariaDB 10.1.38
PHP 7.0.33-0
Debian 4.9.65-3 (Stretch)
to an installation with:
Partkeepr 1.4.0
MariaDB 10.3.27
PHP 7.3.27-1
Debian 4.19.171-2 (Buster)
It's working fine but I get keep getting this message after Partkeepr login. How could it be fixed? Could I use a different version of MariaDB and/or PHP to fix it?
If I run
php app/console doctrine:schema:update --force
I get this
[Symfony\Component\Debug\Exception\ContextErrorException]
Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
and the setup fails at "Warming up the Cache".
Hi @jon-daemon,
Your first problem ("Your database schema...") is caused by MariaDB >= 10.3, your version is simply too new for PartKeepr's Doctrine version. A downgrade could work there.
Your second problem is most probably caused by a too new PHP version. The latest officially supported version of PHP is 7.1.
We know that these version requirements make it very hard to use and install currently, but different members of the community are working on upgrading the dependencies piece by piece.
I reinstalled it on Debian 9 with PHP 7.1 and MariaDB 10.1. I transferred my database from my other installation and everything is working fine.
For Debian 11 and VirtualBox user(that means you can snapshot your system to recover mess)
who following this tutorial https://wiki.partkeepr.org/wiki/PartKeepr_on_Debian_%22Stretch%22
Add the following line to /etc/apt/sources.list
:
# mariadb 10.1
deb http://ftp.debian.org/debian stretch main
deb http://security.debian.org/debian-security stretch/updates main
Use the two command to install 10.1:
sudo apt-get update
sudo apt-get install mariadb-server-10.1 mariadb-client-10.1
A standard Debian 11 installation can only install mariadb version minimal to 10.5 .
System Information
unreachable code after return statement extjs.js:22:366125 unreachable code after return statement main2.js:5644:12 unreachable code after return statement main2.js:32424:91 unreachable code after return statement main2.js:32684:91 unreachable code after return statement main2.js:5644:12
Please attach files, for example, screenshots to describe your issue. If you can, create a screenshot ob View->System Information.
https://i.imgur.com/UYpK9iQ.png
How to reproduce
This is on a fresh install. Whenever I login, I get the "Your database schema is not up-to-date! Please re-run setup immediately!" popup. I went back through the setup script and it showed green check marks next to all database operations. I also found another issue reported here, and ran these commands:
php app/console doctrine:schema:update --dump-sql
Output:
ALTER TABLE TempUploadedFile CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL; ALTER TABLE FOSUser CHANGE last_login last_login DATETIME DEFAULT NULL, CHANGE expires_at expires_at DATETIME DEFAULT NULL, CHANGE confirmation_token confirmation_token VARCHAR(255) DEFAULT NULL, CHANGE password_requested_at password_requested_at DATETIME DEFAULT NULL, CHANGE credentials_expire_at credentials_expire_at DATETIME DEFAULT NULL, CHANGE email_canonical email_canonical VARCHAR(255) DEFAULT NULL, CHANGE email email VARCHAR(255) DEFAULT NULL; ALTER TABLE PartKeeprUser CHANGE provider_id provider_id INT DEFAULT NULL, CHANGE password password VARCHAR(32) DEFAULT NULL, CHANGE email email VARCHAR(255) DEFAULT NULL, CHANGE lastSeen lastSeen DATETIME DEFAULT NULL; ALTER TABLE Footprint CHANGE category_id category_id INT DEFAULT NULL; ALTER TABLE FootprintAttachment CHANGE footprint_id footprint_id INT DEFAULT NULL, CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL; ALTER TABLE FootprintCategory CHANGE parent_id parent_id INT DEFAULT NULL, CHANGE root root INT DEFAULT NULL; ALTER TABLE FootprintImage CHANGE footprint_id footprint_id INT DEFAULT NULL, CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL; ALTER TABLE MetaPartParameterCriteria CHANGE part_id part_id INT DEFAULT NULL, CHANGE unit_id unit_id INT DEFAULT NULL, CHANGE value value DOUBLE PRECISION DEFAULT NULL, CHANGE normalizedValue normalizedValue DOUBLE PRECISION DEFAULT NULL, CHANGE siPrefix_id siPrefix_id INT DEFAULT NULL; ALTER TABLE Part CHANGE category_id category_id INT DEFAULT NULL, CHANGE footprint_id footprint_id INT DEFAULT NULL, CHANGE description description VARCHAR(255) DEFAULT NULL, CHANGE status status VARCHAR(255) DEFAULT NULL, CHANGE partCondition partCondition VARCHAR(255) DEFAULT NULL, CHANGE productionRemarks productionRemarks VARCHAR(255) DEFAULT NULL, CHANGE createDate createDate DATETIME DEFAULT NULL, CHANGE internalPartNumber internalPartNumber VARCHAR(255) DEFAULT NULL, CHANGE partUnit_id partUnit_id INT DEFAULT NULL, CHANGE storageLocation_id storageLocation_id INT DEFAULT NULL; ALTER TABLE PartAttachment CHANGE part_id part_id INT DEFAULT NULL, CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL, CHANGE isImage isImage TINYINT(1) DEFAULT NULL; ALTER TABLE PartCategory CHANGE parent_id parent_id INT DEFAULT NULL, CHANGE root root INT DEFAULT NULL; ALTER TABLE PartDistributor CHANGE distributor_id distributor_id INT DEFAULT NULL, CHANGE part_id part_id INT DEFAULT NULL, CHANGE orderNumber orderNumber VARCHAR(255) DEFAULT NULL, CHANGE price price NUMERIC(13, 4) DEFAULT NULL, CHANGE currency currency VARCHAR(3) DEFAULT NULL, CHANGE sku sku VARCHAR(255) DEFAULT NULL, CHANGE ignoreForReports ignoreForReports TINYINT(1) DEFAULT NULL; ALTER TABLE PartManufacturer CHANGE part_id part_id INT DEFAULT NULL, CHANGE manufacturer_id manufacturer_id INT DEFAULT NULL, CHANGE partNumber partNumber VARCHAR(255) DEFAULT NULL; ALTER TABLE PartParameter CHANGE part_id part_id INT DEFAULT NULL, CHANGE unit_id unit_id INT DEFAULT NULL, CHANGE value value DOUBLE PRECISION DEFAULT NULL, CHANGE normalizedValue normalizedValue DOUBLE PRECISION DEFAULT NULL, CHANGE maximumValue maximumValue DOUBLE PRECISION DEFAULT NULL, CHANGE normalizedMaxValue normalizedMaxValue DOUBLE PRECISION DEFAULT NULL, CHANGE minimumValue minimumValue DOUBLE PRECISION DEFAULT NULL, CHANGE normalizedMinValue normalizedMinValue DOUBLE PRECISION DEFAULT NULL, CHANGE siPrefix_id siPrefix_id INT DEFAULT NULL, CHANGE minSiPrefix_id minSiPrefix_id INT DEFAULT NULL, CHANGE maxSiPrefix_id maxSiPrefix_id INT DEFAULT NULL; ALTER TABLE StockEntry CHANGE part_id part_id INT DEFAULT NULL, CHANGE user_id user_id INT DEFAULT NULL, CHANGE price price NUMERIC(13, 4) DEFAULT NULL, CHANGE comment comment VARCHAR(255) DEFAULT NULL; ALTER TABLE Distributor CHANGE url url VARCHAR(255) DEFAULT NULL, CHANGE phone phone VARCHAR(255) DEFAULT NULL, CHANGE fax fax VARCHAR(255) DEFAULT NULL, CHANGE email email VARCHAR(255) DEFAULT NULL, CHANGE skuurl skuurl VARCHAR(255) DEFAULT NULL; ALTER TABLE Manufacturer CHANGE url url VARCHAR(255) DEFAULT NULL, CHANGE email email VARCHAR(255) DEFAULT NULL, CHANGE phone phone VARCHAR(255) DEFAULT NULL, CHANGE fax fax VARCHAR(255) DEFAULT NULL; ALTER TABLE ManufacturerICLogo CHANGE manufacturer_id manufacturer_id INT DEFAULT NULL, CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL; ALTER TABLE TempImage CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL; ALTER TABLE Project CHANGE user_id user_id INT DEFAULT NULL, CHANGE description description VARCHAR(255) DEFAULT NULL; ALTER TABLE ProjectAttachment CHANGE project_id project_id INT DEFAULT NULL, CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL; ALTER TABLE ProjectPart CHANGE project_id project_id INT DEFAULT NULL, CHANGE part_id part_id INT DEFAULT NULL, CHANGE remarks remarks VARCHAR(255) DEFAULT NULL, CHANGE overageType overageType VARCHAR(255) DEFAULT '' NOT NULL; ALTER TABLE ProjectRun CHANGE project_id project_id INT DEFAULT NULL; ALTER TABLE ProjectRunPart CHANGE part_id part_id INT DEFAULT NULL, CHANGE projectRun_id projectRun_id INT DEFAULT NULL; ALTER TABLE Report CHANGE name name VARCHAR(255) DEFAULT NULL; ALTER TABLE ReportPart CHANGE distributor_id distributor_id INT DEFAULT NULL, CHANGE report_id report_id INT DEFAULT NULL, CHANGE part_id part_id INT DEFAULT NULL; ALTER TABLE ReportProject CHANGE project_id project_id INT DEFAULT NULL, CHANGE report_id report_id INT DEFAULT NULL; ALTER TABLE StorageLocation CHANGE category_id category_id INT DEFAULT NULL; ALTER TABLE StorageLocationCategory CHANGE parent_id parent_id INT DEFAULT NULL, CHANGE root root INT DEFAULT NULL; ALTER TABLE StorageLocationImage CHANGE originalname originalname VARCHAR(255) DEFAULT NULL, CHANGE extension extension VARCHAR(255) DEFAULT NULL, CHANGE storageLocation_id storageLocation_id INT DEFAULT NULL; ALTER TABLE TipOfTheDayHistory CHANGE user_id user_id INT DEFAULT NULL; ALTER TABLE StatisticSnapshotUnit CHANGE statisticSnapshot_id statisticSnapshot_id INT DEFAULT NULL, CHANGE partUnit_id partUnit_id INT DEFAULT NULL; ALTER TABLE BatchJobQueryField CHANGE batchJob_id batchJob_id INT DEFAULT NULL; ALTER TABLE BatchJobUpdateField CHANGE batchJob_id batchJob_id INT DEFAULT NULL;
I then ran:
php app/console doctrine:schema:update --force
Output:
Updating database schema... Database schema updated successfully! "34" queries were executed
After this, I restarted PHP-fpm and Apache (and just for good measure, the entire server). I still receive the prompt when I login with PartKeepr. Re-running the setup again, I get green check marks, and running back through the above commands, I get the same output. Nothing changes, and it's an endless cycle of my DB schema being incorrect.
I am currently running:
MySQL Server version: 10.3.18-MariaDB MariaDB Server (I think I remember seeing something somewhere referencing MariaDB needing to be downgraded, or something along those lines, but can't find the link again). If at all possible, I'd prefer to not have to downgrade MariaDB if it can be avoided...