Skip to content
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

Open
wants to merge 2 commits into
base: 9.x
Choose a base branch
from

Conversation

M0rgan01
Copy link

@M0rgan01 M0rgan01 commented Jun 6, 2024

Questions Answers
Branch? 9.x
Description? Add upgrade module contribution part
Fixed ticket? -

image

@github-actions github-actions bot added the 9.x label Jun 6, 2024

## 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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Contributor

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

Copy link
Author

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

Copy link
Contributor

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).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.

Copy link
Contributor

@kpodemski kpodemski left a 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.

Copy link
Contributor

@kpodemski kpodemski left a 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:

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants