0

I need to create an admin grid and for that i need to create a custom table using Declarative Schema in Magento 2.3. How to create a custom table using declarative schema and integrate the table with my custom admin grid in Magento 2.3?

Any help would be appreciated. Thanks in advance..!

  • what you have tried so far? – Amit Bera Jan 16 at 8:20
  • Hi @AmitBera, Thanks for your reply. I had created a custom module and added the db_schema.xml file in etc directory, by referring this link: dckap.com/blog/declarative-schema-magento-2. But the custom table which I had created was not created after running magento commands. – MagentoUser Jan 16 at 9:01
  • Check magento devdocs devdocs.magento.com/guides/v2.3/extension-dev-guide/… – Amit Bera Jan 16 at 10:19
  • I created db_schema.xml file and run the php bin/magento setup:db-declaration:generate-whitelist --module-name=MyVendor_MyModule before setup:upgrade. But the db_whitelist_schema.json was not created under etc directory of MyModule. I don't able to get that where I am going wrong? – MagentoUser Jan 17 at 7:18
  • 1
    dB whitelist scheme should run after set-up upgrade – Amit Bera Jan 17 at 7:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.