From 9c7a04add75efcdda37a71dd2a7d384d52f0a8a4 Mon Sep 17 00:00:00 2001 From: "Michael J. Rubinsky" Date: Mon, 18 Oct 2010 23:44:26 -0400 Subject: [PATCH] Missed this field when upgrade scripts refactored to migrations. --- .../14_kronolith_upgrade_missingresourcefield.php | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 kronolith/migration/14_kronolith_upgrade_missingresourcefield.php 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 -- 2.11.0