Skip to content

Commit 2e72b2e

Browse files
authored
Create 014_add_migration_config.php
add migration
1 parent 94eb9b8 commit 2e72b2e

1 file changed

Lines changed: 34 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<?php
2+
3+
/**
4+
* Create a Config for migration config.
5+
*
6+
* @author <rlucke@uos.de>
7+
*/
8+
9+
10+
class AddMigrationConfig extends Migration
11+
{
12+
public function description()
13+
{
14+
return 'add config for manual courseware content migration';
15+
}
16+
17+
public function up()
18+
{
19+
$description = 'Lehrende dürfen Courseware-Inhalte selber in ihren Veranstaltungen migrieren.';
20+
21+
Config::get()->create('COURSEWARE_MANUAL_MIGRATION', array(
22+
'type' => 'boolean', 'value' => 0, 'description' => $description, 'range' => 'global', 'section' => 'Courseware'
23+
));
24+
25+
SimpleORMap::expireTableScheme();
26+
}
27+
28+
public function down()
29+
{
30+
Config::get()->delete('COURSEWARE_MANUAL_MIGRATION');
31+
32+
SimpleORMap::expireTableScheme();
33+
}
34+
}

0 commit comments

Comments
 (0)