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 / TermFeedMigrator.php

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

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