0

I had the Subscribe now - (Magedelight) module installed manually using the app/code folder. The Magento version was 2.4.3-p3 and I upgraded it to the latest 2.4.5-p1.

Also, I needed the extension to be updated so I removed it from the app/code (Just deleted the folder from app/code) and installed it through composer. When I push the changes, the build and setup:upgrade process goes fine, and the push becomes successful. (I'm using Adobe Commerce on cloud infrastructure Pro architecture)

But when I check the logs, it shows this error message and 2 more same as this one. And also the site is not loading.

In Processor.php line 129:
W:                                                                                
W:   The command "/bin/bash -c "set -o pipefail; php ./bin/magento setup:upgrade  
W:    --keep-generated --ansi --no-interaction  | tee -a /app/var/log/install_up  
W:   grade.log"" failed. Cache types config flushed successfully        
W:   Cache cleared successfully                                         
W:   Updating modules:                                                  
W:   Cache cleared successfully                                         
W:   Schema creation/updates:  
                                     
W:   SQLSTATE[42000]: Syntax error or access violation: 1061 Duplicate k  
W:   ey name 'MD_SUBSCRIBENOW_PRODUCT_SUBSCRIBERS_PROFILE_ID', query was: ALTER   
W:   TABLE `md_subscribenow_product_subscribers` MODIFY COLUMN `subscription_id`  
W:    int UNSIGNED NOT NULL  AUTO_INCREMENT COMMENT "Unique id for subscribers",  
W:    MODIFY COLUMN `profile_id` int  NOT NULL   COMMENT "Subscription profile I  
W:   D, Unique key", MODIFY COLUMN `customer_id` int  NOT NULL   COMMENT "Custom  
W:   er id of subscriber for website", MODIFY COLUMN `product_id` int  NOT NULL   
W:     COMMENT "Subscribed product id", MODIFY COLUMN `product_sku` text NOT NUL  
W:   L COMMENT "Product SKU", MODIFY COLUMN `product_name` text NULL COMMENT "Pr  
W:   oduct Name", MODIFY COLUMN `subscriber_name` text NOT NULL COMMENT "Subscri  
W:   ber full name", MODIFY COLUMN `subscriber_email` text NOT NULL COMMENT "Cus  
W:   tomer email address", MODIFY COLUMN `store_id` smallint  NOT NULL   COMMENT  
W:    "Store id from which subscriber has subscribed plan.", MODIFY COLUMN `paym  
W:   ent_method_code` text NOT NULL COMMENT "Payment Method code", MODIFY COLUMN  
W:    `subscription_start_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP  CO  
W:   MMENT "subscription start date for subscriber", MODIFY COLUMN `billing_peri  
W:   od_label` text NOT NULL COMMENT "Product Subscription billing period label"  
W:   , MODIFY COLUMN `base_billing_amount` decimal(12, 4)  NULL  COMMENT "Base b  
W:   illing amount for subscriber", MODIFY COLUMN `trial_period_label` text NOT   
W:   NULL COMMENT "Product Subscription billing period label", MODIFY COLUMN `ba  
W:   se_trial_billing_amount` decimal(12, 4)  NOT NULL  COMMENT "Product subscri  
W:   ption base trial period billing amount", MODIFY COLUMN `currency_code` text  
W:    NOT NULL COMMENT "Subscription order currency code", MODIFY COLUMN `base_c  
W:   urrency_code` text NULL COMMENT "Subscription order base currency code", MO  
W:   DIFY COLUMN `shipping_amount` decimal(12, 4)  NOT NULL  COMMENT "Subscripti  
W:   on order shipping amount", MODIFY COLUMN `tax_amount` decimal(12, 4)  NOT N  
W:   ULL  COMMENT "Subscription order tax amount", MODIFY COLUMN `initial_amount  
W:   ` decimal(12, 4)  NOT NULL  COMMENT "Subscription order initial amount", MO  
W:   DIFY COLUMN `base_initial_amount` decimal(12, 4)  NULL  COMMENT "Subscripti  
W:   on order base initial amount", MODIFY COLUMN `discount_amount` decimal(12,   
W:   4)  NOT NULL  COMMENT "Subscription order discount amount", MODIFY COLUMN `  
W:   next_occurrence_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP  COMMENT  
W:    "Next Occurence Date", MODIFY COLUMN `last_bill_date` timestamp NOT NULL D  
W:   EFAULT CURRENT_TIMESTAMP  COMMENT "Last Billing Paid Date", MODIFY COLUMN `  
W:   is_trial` BOOLEAN NULL DEFAULT 0 COMMENT "Is Trial flag", MODIFY COLUMN `sh  
W:   ipping_method_code` text NULL COMMENT "Shipping Method Code", MODIFY COLUMN  
W:    `payment_title` text NULL COMMENT "Payment Method Title", MODIFY COLUMN `t  
W:   otal_bill_count` int  NULL   COMMENT "Total Bill Count", MODIFY COLUMN `bas  
W:   e_shipping_amount` decimal(12, 4)  NULL  COMMENT "Base Shipping Amount", MO  
W:   DIFY COLUMN `base_tax_amount` decimal(12, 4)  NULL  COMMENT "Base Tax Amoun  
W:   t", MODIFY COLUMN `base_discount_amount` decimal(12, 4)  NULL  COMMENT "Bas  
W:   e Discount Amount", MODIFY COLUMN `initial_order_id` text NULL COMMENT "Ini  
W:   tial Order ID", MODIFY COLUMN `billing_address_id` int  NULL   COMMENT "Bil  
W:   ling Address Id", MODIFY COLUMN `shipping_address_id` int  NULL   COMMENT "  
W:   Payment Token", MODIFY COLUMN `is_update_billing_frequency` BOOLEAN NULL DE  
W:   FAULT 0 COMMENT "Can Update Billing Frequency?", MODIFY COLUMN `billing_fre  
W:   quency_cycle` text NULL COMMENT "Config Billing Frequency Cycle", MODIFY CO  
W:   LUMN `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP  COMMENT "Su  
W:   bscription created at", MODIFY COLUMN `updated_at` timestamp NOT NULL DEFAU  
W:   LT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT "Subscription upda  
W:   ted at", ADD COLUMN `subscription_end_date` date NULL COMMENT "If admin all  
W:   owed customer to set end date it will stored date in this column", ADD INDE  
W:   X `MD_SUBSCRIBENOW_PRODUCT_SUBSCRIBERS_PROFILE_ID` (`profile_id`), COMMENT=  
W:   ''

After doing some research, I found that this happens because of the old database of the same extension that was left behind. Because the older version of this extension doesn't have a mechanism to remove databases after uninstallation.

So is there any way to remove these databases manually or some other way to overcome this issue?

2 Answers 2

0

It's not about removing a database but about removing a table.

If the table data is not needed anymore, just remove the table and probably the new installation will just re-create it. But always make a backup first when you do such an operation.

You can't do it manually from your magento backoffice but you can do it by connecting to some kind of friendly database interface like phpmyadmin.

1
  • Thank you for the suggestion. But how can I connect with the database of a integration branch in Pro Architecture?
    – Lasith
    Commented Nov 29, 2022 at 13:37
0

Yes you do not need to remove database, check for extension table. Step 1: Take backup Step 2: Drop Table Step 3: Run setup:upgrade upgrade will create same schema again.

1
  • Actually, I can't use any setup:upgrade or any Magento commands through SSH because it gives a permission error (only have read permission).
    – Lasith
    Commented Nov 29, 2022 at 13:38

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.