PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 6.2.13
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v6.2.13
6.2.13 6.2.12 6.2.10 6.2.11 6.2.9 6.2.8 6.2.7 6.2.6 6.2.5 6.2.4 6.2.3 6.2.2 3.6.22 3.6.31 3.6.40 3.6.41 3.6.42 3.6.50 3.6.51 3.6.60 3.6.61 3.6.62 3.6.64 3.6.65 3.6.66 All 195 releases
fluentform / database / Migrations / Logs.php

Logs.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 6.2.13, at database/Migrations/Logs.php

41 lines 1.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentForm\Database\Migrations;
4
5 class Logs
6 {
7 /**
8 * Migrate the table.
9 *
10 * @return void
11 */
12 public static function migrate()
13 {
14 global $wpdb;
15
16 $charsetCollate = $wpdb->get_charset_collate();
17
18 $table = $wpdb->prefix . 'fluentform_logs';
19
20 // phpcs:ignore WordPress.DB.DirectDatabaseQuery.DirectQuery, WordPress.DB.DirectDatabaseQuery.NoCaching -- Migration file, direct query needed
21 if ($wpdb->get_var($wpdb->prepare("SHOW TABLES LIKE %s", $table)) != $table) {
22 // phpcs:ignore WordPress.DB.DirectDatabaseQuery.SchemaChange -- Migration file, schema change is the purpose
23 $sql = "CREATE TABLE $table (
24 `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
25 `parent_source_id` INT UNSIGNED NULL,
26 `source_type` VARCHAR(255) NULL,
27 `source_id` INT UNSIGNED NULL,
28 `component` VARCHAR(255) NULL,
29 `status` CHAR(30) NULL,
30 `title` VARCHAR(255) NOT NULL,
31 `description` LONGTEXT NULL,
32 `created_at` TIMESTAMP NULL,
33 PRIMARY KEY (`id`) ) $charsetCollate;";
34 require_once ABSPATH . 'wp-admin/includes/upgrade.php';
35 dbDelta($sql);
36 }
37
38 update_option('fluentform_db_fluentform_logs_added', true, 'no');
39 }
40 }
41