diff --git a/basics/keeping-up-to-date/update/upgrade-cli.md b/basics/keeping-up-to-date/update/upgrade-cli.md index 3eee352638..b762691eef 100644 --- a/basics/keeping-up-to-date/update/upgrade-cli.md +++ b/basics/keeping-up-to-date/update/upgrade-cli.md @@ -32,33 +32,33 @@ parameters, it displays the available commands and associated general options. Example of `bin/console` command execution: -```shell +```text $ php bin/console Usage: - command [options] [arguments] - + command [options] [arguments] + Options: - -h, --help Display this help message - -q, --quiet Do not output any message - -V, --version Display this application version - --ansi Force ANSI output - --no-ansi Disable ANSI output - -n, --no-interaction Do not ask any interactive question - -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug + -h, --help Display this help message + -q, --quiet Do not output any message + -V, --version Display this application version + --ansi Force ANSI output + --no-ansi Disable ANSI output + -n, --no-interaction Do not ask any interactive question + -v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug Available commands: - help Displays help for a command - list List commands + help Displays help for a command + list List commands backup - backup:create Create backup. - backup:list List existing backups. - backup:restore Restore your store. - backup:delete Remove a backup not anymore needed. + backup:create Create backup. + backup:list List existing backups. + backup:restore Restore your store. + backup:delete Remove a backup not anymore needed. update - update:check-new-version Display the version the shop can update to. - update:check-requirements Check all prerequisites for an update. - update:start Update your store. + update:check-new-version Display the version the shop can update to. + update:check-requirements Check all prerequisites for an update. + update:start Update your store. ``` ### List command @@ -67,21 +67,21 @@ This command lists the Update Assistant CLI commands. Example of list command execution: -```shell +```text $ php bin/console list Available commands: - help Displays help for a command - list List commands + help Displays help for a command + list List commands backup - backup:create Create backup. - backup:list List existing backups. - backup:restore Restore your store. - backup:delete Remove a backup not anymore needed. + backup:create Create backup. + backup:list List existing backups. + backup:restore Restore your store. + backup:delete Remove a backup not anymore needed. update - update:check-new-version Display the version the shop can update to. - update:check-requirements Check all prerequisites for an update. - update:start Update your store. + update:check-new-version Display the version the shop can update to. + update:check-requirements Check all prerequisites for an update. + update:start Update your store. ``` ### Help command @@ -91,7 +91,7 @@ Console component's built-in global options, and is therefore available for all Example of help command execution: -```shell +```text $ php bin/console backup:list help [command] ``` @@ -116,7 +116,7 @@ The Update Assistant CLI includes 4 commands dedicated to backup management: The `backup:create` command is used to create a backup of your PrestaShop store. These backup files are stored in the `/your-admin-directory/autoupgrade/backup` folder on your server. -```shell +```text $ php bin/console backup:create help backup:create: create a PrestaShop store backup @@ -145,7 +145,7 @@ file. You must specify the location (`--from-config-file=.../folder1/configfile` Example of `backup:create` command execution: -```shell +```text $ php bin/console backup:create admin123 --include-images=1 Your files, database, and images will be backed up. Starting backup... @@ -155,7 +155,7 @@ Starting backup... The `backup:list` command lists the backups available for your PrestaShop store. -```shell +```text $ php bin/console backup:list help backup:list: list all available backups for the store @@ -174,7 +174,7 @@ The `[ADMIN_DIR]` argument is mandatory and is used to target the correct resour Example of the `backup:list` command execution: -```shell +```text $ php bin/console backup:list admin123 ------------------+---------------+-----------------------------------------+ | Date | Version | File name | @@ -188,7 +188,7 @@ $ php bin/console backup:list admin123 The `backup:restore` command is used to restore your PrestaShop store from backup files in the `/your-admin-directory/autoupgrade/backup` folder on your server. -```shell +```text $ php bin/console backup:restore help backup:restore: restore the store to a previous state from a backup file @@ -209,26 +209,26 @@ The `[BACKUP_NAME]` argument is intended to target the backup file (file_name) t Example of `backup:restore` command execution: -```shell +```text $ php bin/console backup:restore admin123 autoupgrade_save_8.1.6_15/07/2024_8:00 The restoration of your store is complete ``` This command also supports the “interactive mode”, which provides you with a contextual action, such as: -```shell +```text $ php bin/console backup:restore admin123 Please select your backup: - [0] Date: 12/19/24 10:48:43, Version: 8.1.5, File name: V8.1.5_20241219-104843-XXX - [1] Date: 12/19/24 09:44:50, Version: 8.1.5, File name: V8.1.5_20241219-094450-XXX - [2] Exit the process + [0] Date: 12/19/24 10:48:43, Version: 8.1.5, File name: V8.1.5_20241219-104843-XXX + [1] Date: 12/19/24 09:44:50, Version: 8.1.5, File name: V8.1.5_20241219-094450-XXX + [2] Exit the process ``` ### backup:delete command The `backup:delete` command is used to delete a backup file from your PrestaShop store. -```shell +```text $ php bin/console backup:delete help backup:delete: delete a store backup file @@ -249,19 +249,19 @@ The `[BACKUP_NAME]` argument is intended to target the backup file (file_name) t Example of `backup:delete` command execution: -```shell +```text $ php bin/console backup:delete admin123 autoupgrade_save_8.1.6_15/07/2024_8:00 The backup file has been successfully deleted ``` This command also supports the “interactive mode”, which provides you with a contextual action, such as: -```shell +```text $ php bin/console backup:delete admin123 Please select your backup: - [0] Date: 12/19/24 10:48:43, Version: 8.1.5, File name: V8.1.5_20241219-104843-XXX - [1] Date: 12/19/24 09:44:50, Version: 8.1.5, File name: V8.1.5_20241219-094450-XXX - [2] Exit the process + [0] Date: 12/19/24 10:48:43, Version: 8.1.5, File name: V8.1.5_20241219-104843-XXX + [1] Date: 12/19/24 09:44:50, Version: 8.1.5, File name: V8.1.5_20241219-094450-XXX + [2] Exit the process ``` ## Update commands @@ -276,7 +276,7 @@ The Update Assistant CLI includes 3 commands dedicated to updates: The `update:check-new-version` command is used to check whether new updates are available for your store. -```shell +```text $ php bin/console update:check-new-version help update:check-new-version: list PrestaShop updates available for the store @@ -295,7 +295,7 @@ The `[ADMIN_DIR]` argument is mandatory and is used to target the correct resour Example of the `update:check-new-version` command execution: -```shell +```text $ php bin/console update:check-new-version admin123 -----------+----------+-------+---------------------------------------------------------------------------+ | Version | Channel | Type | Information | @@ -317,7 +317,7 @@ $ php bin/console update:check-new-version admin123 The `update:check-requirements` command is used to check that your store meets the technical requirements before updating. -```shell +```text $ php bin/console update:check-requirements help update:check-requirements: check if the store is compatible with the update requirements. @@ -351,7 +351,7 @@ recent version of PrestaShop compatible with the PHP version of your server. Example of execution of the `update:check-requirements` command, if all prerequisites have been successfully met: -```shell +```text $ php bin/console update:check-requirements admin123 Checking requirements... ✓ The requirements check is complete, you can update your store to this version of PrestaShop. @@ -359,10 +359,10 @@ Checking requirements... Example of execution of the `update:check-requirements` command, if some prerequisites are not met: -```shell +```text $ php bin/console update:check-requirements admin123 Checking requirements... -X PHP\'s "Safe mode" needs to be disabled. +X PHP's "Safe mode" needs to be disabled. X Maintenance mode needs to be enabled. Enable maintenance mode and add your maintenance IP in Shop parameters > General > Maintenance. ⚠ Your current version of the module is out of date. Update now Modules > Module Manager > Updates ``` @@ -371,7 +371,7 @@ X Maintenance mode needs to be enabled. Enable maintenance mode and add your mai The `update:start` command is used to update your PrestaShop store. -```shell +```text $ php bin/console update:start help update:start: launch a store update. @@ -410,7 +410,7 @@ version of PrestaShop compatible with the PHP version of your server. Example of `update:start` command execution: -```shell +```text $ php bin/console update:start admin123 Starting update... Destination version: 9.0.0 diff --git a/development/database/structure.md b/development/database/structure.md index 0abd366b2c..e1e15e8726 100644 --- a/development/database/structure.md +++ b/development/database/structure.md @@ -33,19 +33,18 @@ These files are used during the PrestaShop installation as well. Another file is being used to load data during the install process: `install/data/db_data.sql`. Some versions of PrestaShop do not use it so you might not always find it in the ZIP archive. -## Structure and content upgrades +## Structure and content updates ### Defining changes Once PrestaShop is installed, the default structure and content files we saw are not used anymore. -If a new release of PrestaShop must bring changes to the existing database, an upgrade file must be created along the `db_structure.sql` update. -This SQL file will be stored in the [auto upgrade](https://github.com/PrestaShop/autoupgrade/tree/dev/upgrade/sql) module in the folder `/upgrade/sql/`. +If a new release of PrestaShop must bring changes to the existing database, an update file must be created along the `db_structure.sql` update. +This SQL file will be stored in the [Update Assistant](https://github.com/PrestaShop/autoupgrade/tree/dev/upgrade/sql) module in the folder `/upgrade/sql/`. Its name is the PrestaShop version on which the change will be applied. -For instance, here is the file *[8.0.0.sql](https://github.com/PrestaShop/autoupgrade/blob/dev/upgrade/sql/8.0.0.sql)*, -used by shops upgrading to 8.0.0 or later: +For instance, here is the file *[8.0.0.sql](https://github.com/PrestaShop/autoupgrade/blob/dev/upgrade/sql/8.0.0.sql)*, used by stores updating to 8.0.0 or later: ```sql [...] @@ -60,14 +59,14 @@ DROP TABLE IF EXISTS `PREFIX_referrer_shop`; [...] ``` -In there we can read the SQL queries to execute when upgrading to 8.0.0. +In there we can read the SQL queries to execute when updating to 8.0.0. Each of them alters the structure and/or modify the existing data. In case you have complex algorithms to run, you can call PHP code with the `PHP:` keyword. To make the code callable, a dedicated file has to be created in `/upgrade/php/` with a function in it. This file and function must have -the same name as we saw in the SQL upgrade file. +the same name as we saw in the SQL update file. If we reuse the previous example, we will find the corresponding file *[/upgrade/php/ps_800_add_security_tab.php](https://github.com/PrestaShop/autoupgrade/blob/dev/upgrade/php/ps_800_add_security_tab.php)*: @@ -85,4 +84,4 @@ consider it was run without failure. ### Applying changes -Applying the changes is covered in [the upgrade page]({{< ref "/8/basics/keeping-up-to-date/upgrade#database-upgrade" >}}). +Applying the changes is covered in [the update page]({{< ref "/8/basics/keeping-up-to-date/update" >}}).