~ubuntu-branches/ubuntu/vivid/php-horde-nag/vivid-proposed

« back to all changes in this revision

Viewing changes to nag-4.1.3/migration/3_nag_upgrade_addalarmmethods.php

  • Committer: Package Import Robot
  • Author(s): Mathieu Parent
  • Date: 2014-03-11 21:27:39 UTC
  • mfrom: (1.1.6)
  • Revision ID: package-import@ubuntu.com-20140311212739-m6rbihspu5zjpvaq
Tags: 4.1.4-1
New upstream version 4.1.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
<?php
2
 
/**
3
 
 * Add individual alarm methods for tasks.
4
 
 *
5
 
 * Copyright 2010-2013 Horde LLC (http://www.horde.org/)
6
 
 *
7
 
 * See the enclosed file COPYING for license information (GPL). If you
8
 
 * did not receive this file, see http://www.horde.org/licenses/gpl.
9
 
 *
10
 
 * @author   Michael J. Rubinsky <mrubinsk@horde.org>
11
 
 * @category Horde
12
 
 * @license  http://www.horde.org/licenses/gpl GPL
13
 
 * @package  Nag
14
 
 */
15
 
class NagUpgradeAddAlarmMethods extends Horde_Db_Migration_Base
16
 
{
17
 
    /**
18
 
     * Upgrade.
19
 
     */
20
 
    public function up()
21
 
    {
22
 
        $t = $this->_connection->table('nag_tasks');
23
 
        $cols = $t->getColumns();
24
 
        if (!in_array('task_alarm_methods', array_keys($cols))) {
25
 
            $this->addColumn('nag_tasks', 'task_alarm_methods', 'text');
26
 
        }
27
 
    }
28
 
 
29
 
    /**
30
 
     * Downgrade
31
 
     */
32
 
    public function down()
33
 
    {
34
 
        $this->removeColumn('nag_tasks', 'task_alarm_methods');
35
 
    }
36
 
 
37
 
}
 
 
b'\\ No newline at end of file'