Chapter 4. Building Module Updates
In Chapter 2, Hooks, to create a SQL table, we used phpMyAdmin (any SQL manager tool will do). However, you will agree that it isn't very handy for the merchant who wants to install the module. There are no PrestaShop official methods to create, delete, or update a database table in a module. I will show you the one used in most of the native PrestaShop modules.
In this chapter, we will see how to do the following:
- Create a SQL table when the module is installed
- Delete a SQL table when the module is uninstalled
- Alter the existing SQL table when the module is updated