PluginProbe
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder / 1.2.4
Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder v1.2.4
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 / app / Databases / Migrations / FormMeta.php

FormMeta.php in Fluent Forms – Customizable Contact Forms, Survey, Quiz, & Conversational Form Builder 1.2.4, at app/Databases/Migrations/FormMeta.php

42 lines 1008 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentForm\App\Databases\Migrations;
4
5 class FormMeta
6 {
7
8 /**
9 * Migrate the table.
10 *
11 * @return void
12 */
13 public static function migrate()
14 {
15 global $wpdb;
16
17 $charsetCollate = $wpdb->get_charset_collate();
18
19 $table = $wpdb->prefix.'fluentform_form_meta';
20
21 $formTable = $wpdb->prefix.'fluentform_forms';
22
23 if ($wpdb->get_var("SHOW TABLES LIKE '$table'") != $table) {
24 $sql = "CREATE TABLE $table (
25 `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
26 `form_id` INT UNSIGNED NULL,
27 `meta_key` VARCHAR(255) NOT NULL,
28 `value` LONGTEXT NULL,
29 PRIMARY KEY (`id`),
30 INDEX `fluent_form_id_idx` (`form_id` ASC),
31 CONSTRAINT `fk_fluent_form_meta_form_id`
32 FOREIGN KEY (`form_id`)
33 REFERENCES $formTable (`id`)
34 ON DELETE CASCADE
35 ON UPDATE CASCADE) $charsetCollate;";
36
37 require_once(ABSPATH.'wp-admin/includes/upgrade.php');
38
39 dbDelta($sql);
40 }
41 }
42 }