How to create table,alter table and drop the table using declarative schema??

If anyone have reference links or extension then please guide me.

I already referred below links.

inchoo Blog

dckap Blog

AncutaIonela GitHub

victortodoran Githunb

yireo-training GitHub

bdcrops GitHub

2 Answers 2


To drop a column in declarative schema you need to delete the column from db_schema.xml file and regenerate the db_schema_whitelist.json file.

Follow the steps below:
1. Delete the desired column from the db_schema.xml file
2. Run the command below

php bin/magento setup:db-declaration:generate-whitelist --module-name=Vendorname_Modulename

3.Run bin/magento setup:upgrade

The column will be dropped from the schema.


Check This Link

Configure declarative schema

Declarative Schema in Magento 2.3


Declarative Schema in Magento 2.3

  • have you created any custom extension using Declarative Schema?? Oct 17, 2019 at 12:55
  • Yes............................ Oct 17, 2019 at 13:00
  • Have you dropped any column or full table using it ? Oct 17, 2019 at 13:00
  • let me check... Oct 17, 2019 at 13:05
  • ok............. Oct 17, 2019 at 13:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.