PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 1.0.90
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v1.0.90
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 1.1.0 All 77 releases
fluent-community / database / Migrations / FeedReactionsMigrator.php

FeedReactionsMigrator.php in FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses 1.0.90, at database/Migrations/FeedReactionsMigrator.php

37 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 // phpcs:disable
3 namespace FluentCommunity\Database\Migrations;
4
5 class FeedReactionsMigrator
6 {
7 /**
8 * @param bool $isForced
9 * @return void
10 */
11 public static function migrate($isForced = false)
12 {
13 global $wpdb;
14
15 $charsetCollate = $wpdb->get_charset_collate();
16 $table = $wpdb->prefix . 'fcom_post_reactions';
17
18 if ($wpdb->get_var("SHOW TABLES LIKE '$table'") != $table || $isForced) {
19 $sql = "CREATE TABLE $table (
20 `id` BIGINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
21 `user_id` BIGINT UNSIGNED NULL,
22 `object_id` BIGINT UNSIGNED NULL,
23 `parent_id` BIGINT UNSIGNED NULL,
24 `object_type` VARCHAR(100) default 'feed',
25 `type` VARCHAR(100) NULL DEFAULT 'like',
26 `ip_address` VARCHAR(100) NULL,
27 `created_at` TIMESTAMP NULL,
28 `updated_at` TIMESTAMP NULL,
29 INDEX `object_id` (`object_id`),
30 INDEX `object_type` (`object_type`),
31 INDEX `type` (`type`)
32 ) $charsetCollate;";
33 dbDelta($sql);
34 }
35 }
36 }
37