March 10, 2021 | 10 min read
This tutorial applies to Magento 2.2.x only. For Magento 2.3.x, see Declarative
3. Create file module.xml and registration.php
For the job of creating these 2 files, I have detailed instructions and explanations in the previous article. You can read it here.
4. Create file InstallSchema.php
You create this file according to the path: Oscprofessionals/Mymodule/Setup/InstallSchema.php.
We will create a table name magetop_blog with fields: id, title, description, created_at, status.
We will create a table name magetop_blog with fields: id, title, description, created_at, status.
use Magento\Framework\Setup\UpgradeSchemaInterface;
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
class UpgradeSchema implements UpgradeSchemaInterface
use Magento\Framework\Setup\ModuleContextInterface;
use Magento\Framework\Setup\SchemaSetupInterface;
class UpgradeSchema implements UpgradeSchemaInterface
We will insert data for the oscp_blog_categories table.

