0

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

0

Check This Link

Configure declarative schema

Declarative Schema in Magento 2.3

DECLARATIVE SCHEMA IN MAGENTO 2.3

Declarative Schema in Magento 2.3

| improve this answer | |
  • have you created any custom extension using Declarative Schema?? – Biren Patel Oct 17 '19 at 12:55
  • Yes............................ – Rk Rathod Oct 17 '19 at 13:00
  • Have you dropped any column or full table using it ? – Biren Patel Oct 17 '19 at 13:00
  • let me check... – Rk Rathod Oct 17 '19 at 13:05
  • ok............. – Biren Patel Oct 17 '19 at 13:08
0

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.

| improve this answer | |

Your Answer

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

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