Bug Issue with "is_featured" Column Not Renamed During Upgrade

Wanted

Customer
Hello,

After upgrading directly from DragonByte eCommerce 3.4.0 to 4.2.0, I noticed that all previously featured products appeared as unfeatured. Upon investigating the database, I observed that the table xf_dbtech_ecommerce_product still contains the old column is_featured alongside the new column featured.

This indicates that the column is_featured was not renamed to featured during the upgrade process, as it should have been per the upgrade script in 4000053Step1 for DragonByte eCommerce 4.0.0 Release Candidate 3:
PHP:
public function upgrade4000053Step1(): void
{
    $this->schemaManager()->alterTable('xf_dbtech_ecommerce_product', function (Alter $table)
    {
        $table->renameColumn('is_featured', 'featured');
    });
}

Impact of the Issue:
  • All previously featured products were no longer featured after the upgrade, requiring them to be manually marked as featured again.
  • Although there are no visible errors and this issue can be resolved by manually dropping the is_featured column, it may cause confusion for others upgrading from older versions.
Steps to Reproduce:
  1. Use DragonByte eCommerce 3.4.0 with some products marked as featured.
  2. Upgrade directly to DragonByte eCommerce 4.2.0.
  3. Observe that all previously featured products are not featured.
  4. Check the database table xf_dbtech_ecommerce_product to find both columns is_featured and featured present.
 
Ah, I think that’s because previous upgrade steps run applyTables() which will have created the featured column thus making the is_featured rename fail.

To be honest I’m not sure if that’s something I can action.
 
Update: I've looked into this and I think I can change the upgrade process to drop the old is_featured column if the new column already exists due to what I said in the previous post.

That being said;
All previously featured products were no longer featured after the upgrade, requiring them to be manually marked as featured again.
This is intentional. The new "Featured Content" system in XenForo stores additional data that cannot be automatically generated, so regardless of the upgrade route you'd always need to manually feature products again.
 
Hello @Wanted,

We hope your ticket regarding DragonByte eCommerce has been addressed to your satisfaction. This ticket has now been scheduled to be closed.

If your ticket has not been resolved, you can reply to this thread at any point in the next 7 days in order to reopen the ticket, afterwards this thread will be closed.

Please do not reply to this thread if your ticket has been resolved.

Thank you.


- DragonByte Technologies, Ltd.
 

DragonByte eCommerce

XenForo 2.0.6+ XenForo 2.1.x XenForo 2.2.x XenForo 2.3.x
Seller
DragonByte Technologies
Release date
Last update
Total downloads
2,970
Customer rating
4.86 star(s) 7 ratings
Back
Top