# fluent-community/2.6.01/database/Migrations/FeedSpaceMigrator.php

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

- Page: https://pluginprobe.com/plugins/fluent-community/2.6.01/code/database/Migrations/FeedSpaceMigrator.php
- Raw: https://pluginprobe.com/plugins/fluent-community/2.6.01/raw/database/Migrations/FeedSpaceMigrator.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/2.6.01/code/database/Migrations/FeedSpaceMigrator.php#L10-L20`.

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

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

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

        if ($wpdb->get_var("SHOW TABLES LIKE '$table'") != $table || $isForced) {
            $sql = "CREATE TABLE $table (
                `id` BIGINT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
                `created_by` BIGINT UNSIGNED NULL,
                `parent_id` BIGINT UNSIGNED NULL,
                `title` VARCHAR(194) NOT NULL,
                `slug` VARCHAR(194) NOT NULL,
                `logo` TEXT NULL,
                `cover_photo` TEXT NULL,
                `description` LONGTEXT NULL,
                `type` VARCHAR(100) NULL,
                `privacy` VARCHAR(100) NULL DEFAULT 'public',
                `status` VARCHAR(100) NULL DEFAULT 'published',
                `serial` INT(11) NULL DEFAULT 1,
                `settings` LONGTEXT NULL,
                `created_at` TIMESTAMP NULL,
                `updated_at` TIMESTAMP NULL,
                INDEX `title` (`title`),
                INDEX `status` (`status`)
            ) $charsetCollate;";
            dbDelta($sql);
        }
    }
}

```
