Hello Magento Lovers,
Let's discuss Data Patch in this post. Data Patch is the replacement of the UpgradeData and InstallData.
A data patch is a class that contains data modification instructions. It is defined in a
<Vendor>/<Module_Name>/Setup/Patch/Data/<Patch_Name>.phpfile and implements
A schema patch contains custom schema modification instructions. These modifications can be complex. It is defined in a
<Vendor>/<Module_Name>/Setup/Patch/Schema/<Patch_Name>.phpfile and implements
Unlike the declarative schema approach, patches will only be applied once. A list of applied patches is stored in
Posted: May 01, 2020Categories: Database
Magento 2 updates features and standards in order to simplify the process and improve security. Magento 2 has introduced the declarative schema. The new declarative schema approach allows developers to declare the final desired state of the database and has the system adjust to it automatically, without performing redundant operations.