aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/1.312_tic_11041.php
blob: 3c517a2bedba8bafbdd71bf56b491cc2e5100916 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<?php

class Tic11041 extends Migration
{
    public function description()
    {
        return 'Extends table lti_tool, add oauth_signature_method';
    }

    public function up()
    {
        $query = "ALTER TABLE `lti_tool`
                  ADD COLUMN `oauth_signature_method` VARCHAR(10) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT 'sha1'";
        DBManager::get()->exec($query);
    }

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