aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/5.3.6_add_consultation_lock_time.php
blob: 0eba290fac8bca4e692b9287160a6f5ab491c064 (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
final class AddConsultationLockTime extends Migration
{
    public function description()
    {
        return 'Adds a lock time for consultation blocks that prevents slots '
             . 'from being booked based on the current time.';
    }

    protected function up()
    {
        $query = "ALTER TABLE `consultation_blocks`
                  ADD COLUMN `lock_time` INT(11) UNSIGNED DEFAULT NULL AFTER `size`";
        DBManager::get()->exec($query);
    }

    protected function down()
    {
        $query = "ALTER TABLE `consultation_blocks`
                  DROP COLUMN `lock_time`";
        DBManager::get()->exec($query);
    }
}