aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/1.275_blubbermessenger_keys.php
blob: c79e9797e2b86480594641dc8ee2486d442cecf9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
class BlubbermessengerKeys extends Migration
{
    public function description()
    {
        return "Adds primary key to table 'blubber_mentions'";
    }

    public function up()
    {
        $query = "ALTER TABLE `blubber_mentions`
                  ADD COLUMN `mention_id` INT(11) UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT FIRST";
        DBManager::get()->exec($query);
    }

    public function down()
    {
        $query = "ALTER TABLE `blubber_mentions`
                  DROP COLUMN `mention_id`";
        DBManager::get()->exec($query);
    }
}