-
Notifications
You must be signed in to change notification settings - Fork 478
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add upgrade module contribution part #1821
base: 9.x
Are you sure you want to change the base?
Conversation
M0rgan01
commented
Jun 6, 2024
•
edited
Loading
edited
Questions | Answers |
---|---|
Branch? | 9.x |
Description? | Add upgrade module contribution part |
Fixed ticket? | - |
|
||
## How to determine which content is affected and what needs to be added ? | ||
|
||
When there's a modification to the `db-structure.sql` file or if a Doctrine entity has been modified, added, or deleted, it impacts the database structure. Modifying the list of hooks and feature flags has consequences on the upgrade process as well. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When there's a modification to the `db-structure.sql` file or if a Doctrine entity has been modified, added, or deleted, it impacts the database structure. Modifying the list of hooks and feature flags has consequences on the upgrade process as well. | |
When there's a modification to the `db-structure.sql` file or if a Doctrine entity has been modified, added, or deleted, it impacts the database structure. Modifying the list of hooks, feature flags, new configurations (or generally new base fixtures) has consequences on the upgrade process as well. |
|
||
{{% notice tip %}} | ||
The Core command prestashop:schema:update-without-foreign allows you to update the database according to modifications made to the Doctrine entities during the development phase. It outputs the queries executed for each change detected. | ||
Please note, after restarting the command the requests will have already been executed and the output will be empty. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On v9 there are no two options --dump-sql
and --force
I don't know if it's worth describing them here. But fi you don't use the --force
option what you claim here is wrong, the DB will not be modifed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the clarification, the doc goes back before the creation of PR removing the execution of the doctrine command from the core
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah and the PR is not merged yet anyway PrestaShop/PrestaShop#36233
But I anticipate the future new behaviour
|
||
Also known as the “1-click upgrade module”, the autoupgrade module is responsible for running the upgrade process on PrestaShop stores. This is likely where upgrade migration files must be added where the pull-request is labeled with 'Needs autoupgrade PR'. | ||
|
||
Contributions related to the upgrade process should be targeted towards the [Autoupgrade repository](https://github.com/PrestaShop/autoupgrade). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Contributions related to the upgrade process should be targeted towards the [Autoupgrade repository](https://github.com/PrestaShop/autoupgrade). | |
Contributions related to the upgrade process should be targeted towards the [Autoupgrade repository](https://github.com/PrestaShop/autoupgrade), and more specifically in one of these upgrade scripts https://github.com/PrestaShop/autoupgrade/tree/dev/upgrade/sql. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great addition @M0rgan01 !
I will allow myself to block this until I can review it. I will have some suggestions, but I'm occupied with another subject now. I'll get back to this as soon as possible, probably early next week.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firstly, sorry for getting back to you so late. I've reviewed the PR, but then I deleted all my suggestions.
Let's split this part in two. Processes that are important if a user changes data structures should go here.
There might be a need to modify this page, a bit of writing that if PR has data structure changes and that there is related pull request available, both PRs must be validated one after another.
I think this piece of content, now, has a mix of:
- autoupgrade doc
- user doc
- maintainers guide
So, eventually, I suggest thinking about:
- moving the contributing part to relevant places inside the "Contributing" section
- some of the content should go to https://devdocs.prestashop-project.org/8/basics/keeping-up-to-date/upgrade-module/
- adding the information about the label to the maintainer's guide
This way, we could avoid creating an extra section, which is always tricky because we mention many things that we should also cross-link between other pages.
Let me know what you think.
Thanks for this proposotion @kpodemski! |