It happens very often that the errors raised by the activation of the Debug mode inform the user that a specific table is missing in the database.
This information can appear after restoring a backup when you had disabled the statistics backup, or when importing a corrupted database, but also many other cases never identified since the user does not know what he did.
So, many castaways of the lost table quest find themselves on the official PrestaShop forum to ask for precious help to restart their business.
As there is no point in reminding them of the importance of regular backups to avoid this kind of inconvenience since they arrive after the blunder, Eolia, a pillar of the forum, preferred to develop a perfect service to generate the complete schema of the tables of versions 1.6 and 1.7 of Prestashop.
This service will allow you to retrieve the PrestaShop database schema in SQL format and simply import it into your database using phpMyadmin.
This schema is coded in such a way as to create only the native tables that are absent from the database during import.
The SQL script will not modify any table already present and therefore allows to correct this specific bug in the blink of an eye.
To retrieve the database schema corresponding to your version of PrestaShop and especially to your database, you will just have to choose two specific elements.
- Just choose if your PrestaShop installation is a version of the 1.6 branch or the 1.7 branch
- indicate the prefix of the tables that you defined during the installation of your PrestaShop store (most often it is ps_ but it can be customized).
If you don't know the prefix of your tables you can find it easily.
- Go to the database and simply identify it by the name of each table.
- On PrestaShop 1.7, go to the
//app/config/parameters.phpand refer to the line
'database_prefix' => 'ps_',
- On PrestaShop 1.6, go to the
//config/settings.inc.phpand refer to the line
All you have to do is take advantage of the service offered by Eolia: https://shop.devcustom.net/tables.php
Eolia makes me say that it does not guarantee 100% the structure of the exported databases because Prestashop has the annoying tendency to have fun with the structure of its database between minor versions so all this must be used with responsibility and intelligence and therefore Eolia cannot be responsible for any degradation of your database, it is up to you to do what is necessary before any intervention on your database.