aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/1.247_step_00330.php
blob: e80d7f76ed97861f404c159053c813b4d7857142 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?php
/**
 * @author Timo Hartge <hartge@data-quest.de>
 */
class StEP00330 extends Migration
{

    function description()
    {
        return 'Adds a visibility flag to lock semesters';
    }

    public function up()
    {
        $query = "ALTER TABLE `semester_data`
                    ADD `visible` TINYINT(2) UNSIGNED NOT NULL DEFAULT '1' AFTER `vorles_ende`";
        DBManager::get()->exec($query);
    }

    public function down()
    {
        DBManager::get()->exec("ALTER TABLE `semester_data` DROP `visible`");
    }
}