blob: 7c12a2ef892384063b74159705ae7c331ff21ba3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?php
final class CoursewareAddOptionalComments extends Migration
{
public function description()
{
return 'Add column commentable to cw_blocks and cw_structural_elements';
}
protected function up()
{
DBManager::get()->exec("ALTER TABLE `cw_blocks` ADD `commentable` TINYINT(1) NOT NULL AFTER `visible`");
DBManager::get()->exec("ALTER TABLE `cw_structural_elements` ADD `commentable` TINYINT(1) NOT NULL AFTER `public`");
}
protected function down()
{
DBManager::get()->exec("ALTER TABLE `cw_blocks` DROP `commentable`");
DBManager::get()->exec("ALTER TABLE `cw_structural_elements` DROP `commentable`");
}
}
|