aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/5.1.52_fix_for_biest3366.php
blob: c889844f17179bfc497e7902292524c507c9c694 (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
25
26
<?php

class FixForBiest3366 extends Migration
{
    public function description()
    {
        return 'Removes the database table "globalsearch_buzzwords"';
    }

    public function up()
    {
        DBManager::get()->exec('DROP TABLE IF EXISTS `globalsearch_buzzwords`');
    }

    public function down()
    {
        DBManager::get()->exec("CREATE TABLE IF NOT EXISTS `globalsearch_buzzwords` (
            `id` CHAR(32) COLLATE latin1_bin NOT NULL,
            `rights` ENUM('user','autor','tutor','dozent','admin','root') NOT NULL DEFAULT 'user',
            `name` varchar(255) NOT NULL DEFAULT '',
            `buzzwords` varchar(2048) NOT NULL DEFAULT '',
            `subtitle` varchar(255) DEFAULT NULL,
            `url` varchar(2048) NOT NULL DEFAULT '',
            PRIMARY KEY (`id`))");
    }
}