aboutsummaryrefslogtreecommitdiff
path: root/db/migrations/1.4_step_116_participant_view.php
blob: b419613526e3c8768d3a857e4329081f7b4d3494 (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
<?php
class Step116ParticipantView extends Migration
{
    public function description ()
    {
        return 'creates table necessary for StEP116';
    }

    public function up ()
    {
        $this->announce(" creating table...");

        DBManager::get()->exec("CREATE TABLE IF NOT EXISTS `teilnehmer_view` (
                                    `datafield_id` varchar(40) NOT NULL default '',
                                    `seminar_id` varchar(40) NOT NULL default '',
                                    `active` tinyint(4) default NULL,
                                    PRIMARY KEY  (`datafield_id`, `seminar_id`)
                                )");

        $this->announce("done.");

    }

    public function down ()
    {
        $this->announce(" removing table...");

        DBManager::get()->exec("DROP TABLE `teilnehmer_view`");

        $this->announce("done.");
    }
}