aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/5.5.34_remove_table_wiki_links.php
blob: 961a5b407d93c785ce18062f61b083d1087dfcd9 (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
<?php
final class RemoveTableWikiLinks extends Migration
{
    public function description()
    {
        return 'Removes the table "wiki_links"';
    }

    protected function up()
    {
        $query = "DROP TABLE `wiki_links`";
        DBManager::get()->exec($query);
    }

    protected function down()
    {
        $query = "CREATE TABLE `wiki_links` (
                    `range_id` CHAR(32) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
                    `from_page_id` INT(10) UNSIGNED NOT NULL,
                    `to_page_id` INT(10) UNSIGNED NOT NULL,
                    PRIMARY KEY (`range_id`,`to_page_id`,`from_page_id`)
                  )";
        DBManager::get()->exec($query);
    }
}