From: Michael J. Rubinsky Date: Tue, 19 Oct 2010 03:44:26 +0000 (-0400) Subject: Missed this field when upgrade scripts refactored to migrations. X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=9c7a04add75efcdda37a71dd2a7d384d52f0a8a4;p=horde.git Missed this field when upgrade scripts refactored to migrations. --- diff --git a/kronolith/migration/14_kronolith_upgrade_missingresourcefield.php b/kronolith/migration/14_kronolith_upgrade_missingresourcefield.php new file mode 100644 index 000000000..585650d81 --- /dev/null +++ b/kronolith/migration/14_kronolith_upgrade_missingresourcefield.php @@ -0,0 +1,37 @@ + + * @category Horde + * @license http://www.fsf.org/copyleft/gpl.html GPL + * @package Kronolith + */ +class KronolithUpgradeMissingResourceField extends Horde_Db_Migration_Base +{ + /** + * Upgrade. + */ + public function up() + { + $t = $this->_connection->table('kronolith_events'); + $cols = $t->getColumns(); + if (!in_array('event_resources', array_keys($cols))) { + $this->addColumn('kronolith_events', 'event_resources', 'text'); + } + } + + /** + * Downgrade + */ + public function down() + { + $this->removeColumn('kronolith_events', 'event_resources'); + } + +} \ No newline at end of file