PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 2.11.0
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v2.11.0
2.11.0 2.10.0 2.10.01 2.9.1 2.9.0 2.8.1 2.8.0 2.7.7 2.7.5 2.7.0 2.6.01 2.6.0 2.5.0 2.4.01 trunk 1.0.90 1.0.91 1.0.92 1.0.93 1.0.94 1.0.95 1.0.96 1.0.97 1.0.98 1.0.99 All 78 releases
← All changes | database/Migrations/FeedMigrator.php +8 -1 1.0.992.11.0 View file →
@@ -42,9 +42,10 @@
42 42 INDEX `user_id` (`user_id`),
43 43 INDEX `slug` (`slug`),
44 44 INDEX `created_at` (`created_at`),
45 45 INDEX `idx_space_id_status` (`space_id`, `status`),
46 - INDEX `idx_space_id_status_privacy` (`space_id`, `status`, `privacy`)
46 + INDEX `idx_space_id_status_privacy` (`space_id`, `status`, `privacy`),
47 + INDEX `idx_status_updated_at` (`status`, `updated_at`)
47 48 ) $charsetCollate;";
48 49 dbDelta($sql);
49 50 } else {
50 51 // check if scheduled_at is exist or not
@@ -50,8 +51,14 @@
50 51 // check if scheduled_at is exist or not
51 52 $isMigrated = $wpdb->get_col($wpdb->prepare("SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() AND COLUMN_NAME='scheduled_at' AND TABLE_NAME=%s", $table));
52 53 if(!$isMigrated) {
53 54 $wpdb->query("ALTER TABLE {$table} ADD COLUMN `scheduled_at` DATETIME NULL AFTER `expired_at`");
55 + }
56 +
57 + // check if the ticker index (status, updated_at) exists or not
58 + $hasStatusUpdatedIndex = $wpdb->get_col($wpdb->prepare("SELECT INDEX_NAME FROM information_schema.STATISTICS WHERE TABLE_SCHEMA=DATABASE() AND TABLE_NAME=%s AND INDEX_NAME='idx_status_updated_at'", $table));
59 + if (!$hasStatusUpdatedIndex) {
60 + $wpdb->query("ALTER TABLE {$table} ADD INDEX `idx_status_updated_at` (`status`, `updated_at`)");
54 61 }
55 62 }
56 63 }
57 64 }