blob: bf758972c6abc6a04453ca0504a819d00242fecc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<?php
class AddCoursewareTemplates extends \Migration
{
public function description()
{
return 'Create Courseware template database tables';
}
public function up()
{
$db = \DBManager::get();
$db->exec("CREATE TABLE `cw_templates` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`purpose` ENUM('content', 'template', 'oer', 'portfolio', 'draft', 'other') COLLATE latin1_bin,
`structure` MEDIUMTEXT NOT NULL,
`mkdate` int(11) NOT NULL,
`chdate` int(11) NOT NULL,
PRIMARY KEY (`id`)
)
");
}
public function down()
{
$db = \DBManager::get();
$db->exec("DROP TABLE IF EXISTS `cw_templates`");
}
}
|