PluginProbe
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler / 1.6.5
FluentCart A New Era of eCommerce – Faster, Lighter, and Simpler v1.6.5
1.6.5 1.6.4 1.6.3 1.6.2 1.6.1 1.6.0 1.5.4 1.5.5 1.5.3 1.5.2 1.5.1 1.5.0 1.4.2 1.4.1 1.4.0 1.3.28 1.3.27 1.3.26 1.3.25 1.3.23 1.3.22 1.3.21 1.3.20 1.3.19 trunk All 48 releases
← All changes | database/Migrations/OrdersMigrator.php +12 -1 1.5.0 → 1.6.5 View file →
@@ -50,9 +50,10 @@
50 50
51 51 INDEX `{$indexPrefix}_invoice_no` (`invoice_no`(191) ASC),
52 52 INDEX `{$indexPrefix}_status_type` (`type` ASC),
53 53 INDEX `{$indexPrefix}_customer_id` (`customer_id` ASC),
54 - INDEX `{$indexPrefix}_date_created_completed` (`created_at` ASC, `completed_at` ASC)";
54 + INDEX `{$indexPrefix}_date_created_completed` (`created_at` ASC, `completed_at` ASC),
55 + INDEX `{$indexPrefix}_uuid` (`uuid` ASC)";
55 56 }
56 57
57 58 public static function migrated()
58 59 {
@@ -60,8 +61,9 @@
60 61 static::addTaxBehaviorColumn();
61 62 static::addReceiptNumberColumn();
62 63 static::renameDiscountTotalColumn();
63 64 static::addPaymentStatusIndex();
65 + static::addUuidIndex();
64 66 }
65 67
66 68 public static function addFeeTotalColumn()
67 69 {
@@ -90,6 +92,15 @@
90 92 public static function addPaymentStatusIndex()
91 93 {
92 94 // "ALTER TABLE %i ADD INDEX `fct_payment_status` (`payment_status`, `id`)"
93 95 static::addIndexIfNotExists('fct_payment_status', ['payment_status', 'id']);
96 + }
97 +
98 + public static function addUuidIndex()
99 + {
100 + // "ALTER TABLE %i ADD INDEX `{prefix}fct_ord__uuid` (`uuid`)"
101 + // Non-unique on purpose: speeds up the uuid collision check and every
102 + // by-value order lookup (receipts, webhooks, customer profile) without
103 + // enforcing a UNIQUE constraint.
104 + static::addIndexIfNotExists(static::getDbPrefix() . 'fct_ord__uuid', 'uuid');
94 105 }
95 106 }