aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/1.53_file_and_folder_priority.php
blob: c9daaa5436960382480fb7abea7406532f9920df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
<?
class FileAndFolderPriority extends Migration {
    function description() {
        return 'adding a column in table dokumente and folder so that they can be sorted (StEP00175 / TIC #851)';
    }

    function up() {
        $db = DBManager::get();
        $db->exec("ALTER TABLE `dokumente` ADD `priority` SMALLINT UNSIGNED NOT NULL DEFAULT 0");
        $db->exec("ALTER TABLE `folder` ADD `priority` SMALLINT UNSIGNED NOT NULL DEFAULT 0");
    }

    function down() {
        $db = DBManager::get();
        $db->exec("ALTER TABLE `dokumente` DROP `priority`");
        $db->exec("ALTER TABLE `folder` DROP `priority`");
    }
}
?>