praiadeseselle/wire/modules/System/SystemUpdater/SystemUpdate1.php
2022-03-08 15:55:41 +01:00

17 lines
441 B
PHP

<?php namespace ProcessWire;
/**
* Adds a 'data' column to the fieldgroups_fields table
*
*/
class SystemUpdate1 extends SystemUpdate {
public function execute() {
$result = $this->db->query("SHOW COLUMNS FROM fieldgroups_fields WHERE field='data'");
if(!$result->num_rows) {
$this->db->query("ALTER TABLE fieldgroups_fields ADD data TEXT");
$this->message("Added field template context support");
}
return true;
}
}