Clever works_

How to upgrade custom table in Magento 2


We will add the next column for our Hello table. To do this we need to create UpgradeSchema.php in app/code/CleverCode/HelloWorld/Setup with the following contents:

It’s important to add a comment to new column. Without a comment, the script won’t run. It needs to implement InstallSchemaInterface and if it’s needed, we can upgrade the script only for the specified module’s version. To do that we need to add the following lines:

It will run the upgrade script only if the version is equal to 1.1.0 or higher. To upgrade we need to type:

Related works_

BreakAwayDistributing B2B and B2C
selling platform

The SLK Solutions agency responsible for developing an online store hired us to help them with creating a selling platform dedicated to B2B and B2C clients. BreakAwayDistributing – agency operating from 1993 with main office located in Hamilton, Canada offers high quality products

Learn more

Internet flower shop
from SLK Solutions

SLK Solutions is an IT agency operating in the USA, which helps small and large business owners to implement new technologies. They asked us to support them with our experts with the complete implementation of an eCommerce project for their client.

Learn more