PluginProbe
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration / 1.23
FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration v1.23
2.0.15 2.0.12 2.0.10 2.0.4 2.0.1 2.0.0 1.95.3 1.95.2 1.95 1.91.6 trunk 1.11 1.12 1.13 1.20 1.21 1.22 1.23 1.30 1.31 1.32 1.35 1.40 1.41 1.45 All 41 releases
fluent-boards / database / Migrations / TeamMigrator.php

TeamMigrator.php in FluentBoards – Project Management, Task Management, Goal Tracking, Kanban Board, and, Team Collaboration 1.23, at database/Migrations/TeamMigrator.php

45 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentBoards\Database\Migrations;
4
5 class TeamMigrator
6 {
7 /**
8 * Task Activities Table.
9 *
10 * @param bool $isForced
11 * @return void
12 */
13 public static function migrate($isForced = true)
14 {
15 global $wpdb;
16
17 $charsetCollate = $wpdb->get_charset_collate();
18 $table = $wpdb->prefix . 'fbs_teams';
19
20 if ($wpdb->get_var($wpdb->prepare("SHOW TABLES LIKE %s", $table)) != $table || $isForced) {
21 $sql = "CREATE TABLE $table (
22 `id` INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
23 `parent_id` INT UNSIGNED NULL COMMENT 'Parent Team',
24 `title` VARCHAR(100) NOT NULL,
25 `description` TEXT NULL,
26 `type` VARCHAR(50) NOT NULL,
27 `visibility` VARCHAR(50) DEFAULT 'VISIBLE' COMMENT 'Visibility of the team (VISIBLE/SECRET)',
28 `notifications_enabled` TINYINT(1) DEFAULT 1,
29 `settings` TEXT NULL COMMENT 'Serialized',
30 `created_by` BIGINT UNSIGNED NOT NULL COMMENT 'Team Creator User ID',
31 `created_at` TIMESTAMP NULL,
32 `updated_at` TIMESTAMP NULL,
33 KEY `type` (`type`),
34 KEY `visibility` (`visibility`),
35 KEY `created_by` (`created_by`),
36 KEY `parent_id` (`parent_id`),
37 KEY `notifications_enabled` (`notifications_enabled`),
38 KEY `title` (`title`)
39 ) $charsetCollate;";
40 require_once ABSPATH . 'wp-admin/includes/upgrade.php';
41 dbDelta($sql);
42 }
43 }
44 }
45