aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/1.273_unrestricted_userdomains.php
blob: eb9550324504a1afcee959b2d29c262637ca669d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
<?php
class UnrestrictedUserdomains extends Migration
{
    public function up()
    {
        $query = "ALTER TABLE `userdomains`
                  ADD COLUMN `restricted_access` TINYINT(1) NOT NULL DEFAULT 1,
                  ADD COLUMN `mkdate` INT(11) UNSIGNED NOT NULL DEFAULT 0,
                  ADD COLUMN `chdate` INT(11) UNSIGNED NOT NULL DEFAULT 0";
        DBManager::get()->exec($query);
    }

    public function down()
    {
        $query = "ALTER TABLE `userdomains`
                  DROP COLUMN `restricted_access`,
                  DROP COLUMN `mkdate`,
                  DROP COLUMN `chdate`";
        DBManager::get()->exec($query);
    }
}