PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.15.3
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.15.3
V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 2.10.2 All 137 releases
← All changes | includes/Core/Database/DB.php +14 -4 2.02.15.3 View file →
@@ -11,15 +11,17 @@
11 11
12 12 /**
13 13 * Database Migration
14 14 */
15 -final class DB {
15 +final class DB
16 +{
16 17 /**
17 18 * Undocumented function
18 19 *
19 20 * @return void
20 21 */
21 - public static function migrate() {
22 + public static function migrate()
23 + {
22 24 global $wpdb;
23 25 global $bitforms_db_version;
24 26 $collate = '';
25 27
@@ -135,9 +137,9 @@
135 137 `user_id` bigint(20) unsigned DEFAULT NULL,
136 138 `user_ip` varchar(255) DEFAULT NULL,
137 139 `user_location` text DEFAULT NULL,
138 140 `user_device` varchar(50) DEFAULT NULL,
139 - `referer` varchar(255) DEFAULT NULL,
141 + `referer` TEXT DEFAULT NULL,
140 142 `status` tinyint(1) DEFAULT 0,/* 0 not viewed, 1 viewed, 2 trashed */
141 143 `created_at` datetime DEFAULT NULL,
142 144 `updated_at` datetime DEFAULT NULL,
143 145 PRIMARY KEY (`id`),
@@ -194,9 +196,9 @@
194 196 `updated_at` DATETIME NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
195 197 PRIMARY KEY (`id`),
196 198 KEY `form_id` (`form_id`),
197 199 KEY `entry_id` (`entry_id`)
198 - ) $collate;",
200 + ) $collate;"
199 201 ];
200 202
201 203 $table_schema_update = [
202 204 "ALTER TABLE `{$wpdb->prefix}bitforms_form_entry_log`
@@ -241,8 +243,16 @@
241 243 "ALTER TABLE `{$wpdb->prefix}bitforms_workflows`
242 244 ADD `workflow_order` INT(11) DEFAULT NULL AFTER `workflow_condition`"
243 245 );
244 246 }
247 +
248 + if ($installed_db_version && version_compare('2.2', $installed_db_version, '>=')) {
249 + $wpdb->query(
250 + "ALTER TABLE `{$wpdb->prefix}bitforms_form_entries`
251 + MODIFY `referer` TEXT DEFAULT NULL"
252 + );
253 + }
254 +
245 255 update_site_option(
246 256 'bitforms_db_version',
247 257 $bitforms_db_version
248 258 );