docs
docs copied to clipboard
Document doctrine migrations on the Upgrade CLI page
See: https://github.com/PrestaShop/PrestaShop/pull/24948
There's no information about this in devdocs.
https://devdocs.prestashop.com/1.7/basics/keeping-up-to-date/upgrade/
well it says you have to run php install/upgrade/upgrade.php
, which should do the doctrine schema update...
Maybe we should detail more clearly what it does ?
Or add a section about useful doctrine commands in the doctrine page? https://devdocs.prestashop.com/1.7/modules/concepts/doctrine/
@matthieu-rolland in that case, why #24948 failed? 🤔
Or add a section about useful doctrine commands in the doctrine page? https://devdocs.prestashop.com/1.7/modules/concepts/doctrine/
yep, but still, IMO we should indicate about possible issues with doctrine update schema on upgrade page, it's not a first time
@matthieu-rolland in that case, why #24948 failed? 🤔
Because he did the SQL updates manually, using the SQL update queries in: install-dev/upgrade/sql/1.7.8.0.sql
He was missing columns added by doctrine because doctrine schema update was never executed
@matthieu-rolland There are different aspects:
-
install-dev/upgrade/upgrade.php
does not work in 1.7.8.0-beta.1 - It is important to know what it does, not only to be able to upgrade manually, but also to be aware, what (potentially destructive) SQL queries would be run
- It seems to me this is new to 1.7.8.x. I upgraded between 1.7.7.x versions, and
install-dev/upgrade/upgrade.php
never dropped custom columns
@matthieu-rolland There are different aspects:
install-dev/upgrade/upgrade.php
does not work in 1.7.8.0-beta.1- It is important to know what it does, not only to be able to upgrade manually, but also to be aware, what (potentially destructive) SQL queries would be run
- It seems to me this is new to 1.7.8.x. I upgraded between 1.7.7.x versions, and
install-dev/upgrade/upgrade.php
never dropped custom columns
ok... I didn't get that your PR was linked to this, from what you wrote in the issue I understood that you were trying to update the DB using install-dev/upgrade/sql/1.7.8.0.sql
only*
I agree that detailing what install-dev/upgrade/upgrade.php
in the upgrade docs would be good
edit: I re-read your issue I understand better what you were trying to achieve 👍 The commands I gave you are a nice "trick" when you are having problems and you're trying to fix your DB, but users shouldn't have to do this en the end, the upgrade script needs to be fixed
- It is important to know what it does, not only to be able to upgrade manually, but also to be aware, what (potentially destructive) SQL queries would be run
About this, I'm not so familiar with this upgrade script but according to the doc it seems like it generates a list of SQL queries ready to apply in a XML file:
https://devdocs.prestashop.com/1.7/basics/keeping-up-to-date/upgrade/#execution-log