# fluentform/5.2.8/database/Migrations/FormMeta.php

Fluent Forms – Customizable Contact Forms, Survey, Quiz, &amp; Conversational Form Builder, version 5.2.8. 34 lines.

- Page: https://pluginprobe.com/plugins/fluentform/5.2.8/code/database/Migrations/FormMeta.php
- Raw: https://pluginprobe.com/plugins/fluentform/5.2.8/raw/database/Migrations/FormMeta.php
- Modified: 2024-12-18T13:07:10+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/fluentform/5.2.8/code/database/Migrations/FormMeta.php#L10-L20`.

```php
<?php

namespace FluentForm\Database\Migrations;

class FormMeta
{
    /**
     * Migrate the table.
     *
     * @return void
     */
    public static function migrate()
    {
        global $wpdb;

        $charsetCollate = $wpdb->get_charset_collate();

        $table = $wpdb->prefix . 'fluentform_form_meta';

        if ($wpdb->get_var("SHOW TABLES LIKE '$table'") != $table) {
            $sql = "CREATE TABLE $table (
			  `id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
			  `form_id` INT UNSIGNED NULL,
			  `meta_key` VARCHAR(255) NOT NULL,
			  `value` LONGTEXT NULL,
			  PRIMARY KEY (`id`)) $charsetCollate;";

            require_once ABSPATH . 'wp-admin/includes/upgrade.php';

            dbDelta($sql);
        }
    }
}

```
