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.

Click to rate this post!
[Total: 1 Average: 4]