Deactivate an addon?

Robert9

Well-known member
Example:

A new addon extends xf_node with the field example.
I add datawriter_node with something like

protected function _getFields() {
$parent = parent::_getFields();
$parent['xf_node']['example'] = array('type' => self::TYPE_UINT, 'default' => 1);
return $parent;
}

Now i deactivate the addon, but the field is still in my table.
XF or another addon tries to write to this table. We dont have a default value for it? => Error?

Probably this could not be true, else we could never deactivate an addon without breaking the forum.
But sometimes this happens, sometimes not. How this is solved?
 
You set a default value or make the field nullable at database level when adding your field in your setup file.
 
Back
Top Bottom