diff --git a/application/migrations/20160310160700_add_groep.php b/application/migrations/20160310160700_add_groep.php new file mode 100644 index 0000000..a07787f --- /dev/null +++ b/application/migrations/20160310160700_add_groep.php @@ -0,0 +1,42 @@ +dbforge->add_field(array( + 'id' => array( + 'type' => 'INT', + 'constraint' => '5', + 'unsigned' => TRUE, + 'auto_increment' => TRUE, + ), + 'regioid' => array( + 'type' => 'INT', + 'constraint' => '3', + 'unsigned' => TRUE, + ), + 'naam' => array( + 'type' => 'VARCHAR', + 'constraint' => '80', + ), + 'plaats' => array( + 'type' => 'VARCHAR', + 'constraint' => '80', + ), + )); + $this->dbforge->add_key('id', TRUE); + $this->dbforge->create_table('groep'); + + } + + public function down() + { + $this->dbforge->drop_table('groep'); + } +} \ No newline at end of file diff --git a/application/migrations/20160310161000_add_subgroep.php b/application/migrations/20160310161000_add_subgroep.php new file mode 100644 index 0000000..a98d25f --- /dev/null +++ b/application/migrations/20160310161000_add_subgroep.php @@ -0,0 +1,56 @@ +dbforge->add_field(array( + 'id' => array( + 'type' => 'INT', + 'constraint' => '5', + 'unsigned' => TRUE, + 'auto_increment' => TRUE, + ), + 'regioid' => array( + 'type' => 'INT', + 'constraint' => '3', + 'unsigned' => TRUE, + ), + 'groepid' => array( + 'type' => 'INT', + 'constraint' => '5', + 'unsigned' => TRUE, + ), + 'jaar' => array( + 'type' => 'INT', + 'constraint' => '4', + 'unsigned' => TRUE, + ), + 'naam' => array( + 'type' => 'VARCHAR', + 'constraint' => '80', + ), + 'themanaam' => array( + 'type' => 'VARCHAR', + 'constraint' => '80', + ), + 'nummer' => array( + 'type' => 'VARCHAR', + 'constraint' => '80', + ), + )); + $this->dbforge->add_key('id', TRUE); + $this->dbforge->create_table('subgroep'); + + } + + public function down() + { + $this->dbforge->drop_table('subgroep'); + } +} \ No newline at end of file diff --git a/application/migrations/20160310161500_add_lijst.php b/application/migrations/20160310161500_add_lijst.php new file mode 100644 index 0000000..5d90dab --- /dev/null +++ b/application/migrations/20160310161500_add_lijst.php @@ -0,0 +1,53 @@ +dbforge->add_field(array( + 'id' => array( + 'type' => 'INT', + 'constraint' => '6', + 'unsigned' => TRUE, + 'auto_increment' => TRUE, + ), + 'regioid' => array( + 'type' => 'INT', + 'constraint' => '3', + 'unsigned' => TRUE, + ), + 'jaar' => array( + 'type' => 'INT', + 'unsigned' => TRUE, + 'constraint' => '4', + ), + 'naam' => array( + 'type' => 'VARCHAR', + 'constraint' => '80', + ), + 'ronde' => array( + 'type' => 'INT', + 'constraint' => '1', + 'unsigned' => TRUE, + ), + 'actief' => array( + 'type' => 'INT', + 'constraint' => '1', + 'unsigned' => TRUE, + ), + )); + $this->dbforge->add_key('id', TRUE); + $this->dbforge->create_table('lijst'); + + } + + public function down() + { + $this->dbforge->drop_table('lijst'); + } +} \ No newline at end of file diff --git a/application/migrations/20160310162100_add_spelgebied.php b/application/migrations/20160310162100_add_spelgebied.php new file mode 100644 index 0000000..3f032d4 --- /dev/null +++ b/application/migrations/20160310162100_add_spelgebied.php @@ -0,0 +1,43 @@ +dbforge->add_field(array( + 'id' => array( + 'type' => 'INT', + 'constraint' => '6', + 'unsigned' => TRUE, + 'auto_increment' => TRUE, + ), + 'regioid' => array( + 'type' => 'INT', + 'constraint' => '3', + 'unsigned' => TRUE, + ), + 'jaar' => array( + 'type' => 'INT', + 'unsigned' => TRUE, + 'constraint' => '4', + ), + 'naam' => array( + 'type' => 'VARCHAR', + 'constraint' => '80', + ), + )); + $this->dbforge->add_key('id', TRUE); + $this->dbforge->create_table('spelgebied'); + + } + + public function down() + { + $this->dbforge->drop_table('spelgebied'); + } +} \ No newline at end of file diff --git a/application/migrations/20160310162300_add_onderdeel.php b/application/migrations/20160310162300_add_onderdeel.php new file mode 100644 index 0000000..32cd16d --- /dev/null +++ b/application/migrations/20160310162300_add_onderdeel.php @@ -0,0 +1,48 @@ +dbforge->add_field(array( + 'id' => array( + 'type' => 'INT', + 'constraint' => '6', + 'unsigned' => TRUE, + 'auto_increment' => TRUE, + ), + 'regioid' => array( + 'type' => 'INT', + 'constraint' => '3', + 'unsigned' => TRUE, + ), + 'spelgebiedid' => array( + 'type' => 'INT', + 'constraint' => '3', + 'unsigned' => TRUE, + ), + 'jaar' => array( + 'type' => 'INT', + 'unsigned' => TRUE, + 'constraint' => '4', + ), + 'naam' => array( + 'type' => 'VARCHAR', + 'constraint' => '80', + ), + )); + $this->dbforge->add_key('id', TRUE); + $this->dbforge->create_table('onderdeel'); + + } + + public function down() + { + $this->dbforge->drop_table('onderdeel'); + } +} \ No newline at end of file diff --git a/application/migrations/20160310162500_add_vragen.php b/application/migrations/20160310162500_add_vragen.php new file mode 100644 index 0000000..fc0b8f1 --- /dev/null +++ b/application/migrations/20160310162500_add_vragen.php @@ -0,0 +1,68 @@ +dbforge->add_field(array( + 'id' => array( + 'type' => 'INT', + 'constraint' => '6', + 'unsigned' => TRUE, + 'auto_increment' => TRUE, + ), + 'regioid' => array( + 'type' => 'INT', + 'constraint' => '3', + 'unsigned' => TRUE, + ), + 'onderdeelid' => array( + 'type' => 'INT', + 'constraint' => '6', + 'unsigned' => TRUE, + ), + 'lijstid' => array( + 'type' => 'INT', + 'constraint' => '6', + 'unsigned' => TRUE, + ), + 'volgorde' => array( + 'type' => 'INT', + 'constraint' => '6', + 'unsigned' => TRUE, + ), + 'jaar' => array( + 'type' => 'INT', + 'unsigned' => TRUE, + 'constraint' => '4', + ), + 'vraag' => array( + 'type' => 'VARCHAR', + 'constraint' => '80', + ), + 'antwoord' => array( + 'type' => 'INT', + 'constraint' => '1', + 'unsigned' => TRUE, + ), + 'score' => array( + 'type' => 'INT', + 'constraint' => '6', + 'unsigned' => TRUE, + ), + )); + $this->dbforge->add_key('id', TRUE); + $this->dbforge->create_table('vragen'); + + } + + public function down() + { + $this->dbforge->drop_table('vragen'); + } +} \ No newline at end of file diff --git a/application/migrations/20160310162800_add_resultaat.php b/application/migrations/20160310162800_add_resultaat.php new file mode 100644 index 0000000..2b6c1e9 --- /dev/null +++ b/application/migrations/20160310162800_add_resultaat.php @@ -0,0 +1,64 @@ +dbforge->add_field(array( + 'id' => array( + 'type' => 'INT', + 'constraint' => '6', + 'unsigned' => TRUE, + 'auto_increment' => TRUE, + ), + 'regioid' => array( + 'type' => 'INT', + 'constraint' => '3', + 'unsigned' => TRUE, + ), + 'vraagid' => array( + 'type' => 'INT', + 'constraint' => '6', + 'unsigned' => TRUE, + ), + 'ronde' => array( + 'type' => 'INT', + 'constraint' => '1', + 'unsigned' => TRUE, + ), + 'subgroepid' => array( + 'type' => 'INT', + 'constraint' => '5', + ), + 'timestamp' => array( + 'type' => 'DATETIME', + ), + 'score' => array( + 'type' => 'INT', + 'constraint' => '6', + 'unsigned' => TRUE, + ), + 'userid' => array( + 'type' => 'INT', + 'constraint' => '4', + ), + 'lokatie' => array( + 'type' => 'VARCHAR', + 'constraint' => '80', + ), + )); + $this->dbforge->add_key('id', TRUE); + $this->dbforge->create_table('resultaat'); + + } + + public function down() + { + $this->dbforge->drop_table('resultaat'); + } +} \ No newline at end of file