# fluent-community/1.0.96/database/Migrations/FeedReactionsMigrator.php

FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS &amp; Online Courses, version 1.0.96. 37 lines.

- Page: https://pluginprobe.com/plugins/fluent-community/1.0.96/code/database/Migrations/FeedReactionsMigrator.php
- Raw: https://pluginprobe.com/plugins/fluent-community/1.0.96/raw/database/Migrations/FeedReactionsMigrator.php
- Modified: 2024-11-07T12:38:44+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-community/1.0.96/code/database/Migrations/FeedReactionsMigrator.php#L10-L20`.

```php
<?php
// phpcs:disable
namespace FluentCommunity\Database\Migrations;

class FeedReactionsMigrator
{
    /**
     * @param bool $isForced
     * @return void
     */
    public static function migrate($isForced = false)
    {
        global $wpdb;

        $charsetCollate = $wpdb->get_charset_collate();
        $table = $wpdb->prefix . 'fcom_post_reactions';

        if ($wpdb->get_var("SHOW TABLES LIKE '$table'") != $table || $isForced) {
            $sql = "CREATE TABLE $table (
                `id` BIGINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
                `user_id` BIGINT UNSIGNED NULL,
                `object_id` BIGINT UNSIGNED NULL,
                `parent_id` BIGINT UNSIGNED NULL,
                `object_type` VARCHAR(100) default 'feed',
                `type` VARCHAR(100) NULL DEFAULT 'like',
                `ip_address` VARCHAR(100) NULL,
                `created_at` TIMESTAMP NULL,
                `updated_at` TIMESTAMP NULL,
                INDEX `object_id` (`object_id`),
                INDEX `object_type` (`object_type`),
                INDEX `type` (`type`)
            ) $charsetCollate;";
            dbDelta($sql);
        }
    }
}

```
