Site icon MageComp Blog

Inserting Data in Existing Table During Magento 2 Extension Installation

Inserting Data in Existing Table During Magento 2 Extension Installation

Inserting Data in Existing Table During Magento 2 Extension Installation

Installation scripts comes in picture when you are working with custom extension in Magento 2 and wanted to load it with pre-added data in tables and later on you persist data in database. Once you add data through scripts, the available data get filled by default and then you can add more records as per requirement. In short, whenever you want to set initial default values to the database tables of your extension, the need for data script occurs.

Here, we will learn to create data install script and use it while extension installation.


	
Exit mobile version