From 2889fadf27b2dbf8f698c5b7249199a2872f4a9f Mon Sep 17 00:00:00 2001 From: Rogier Neeleman Date: Thu, 7 Apr 2016 10:24:28 +0200 Subject: [PATCH] Decimal score --- .../20160407101300_decimal_score.php | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 application/migrations/20160407101300_decimal_score.php diff --git a/application/migrations/20160407101300_decimal_score.php b/application/migrations/20160407101300_decimal_score.php new file mode 100644 index 0000000..3ee4a9c --- /dev/null +++ b/application/migrations/20160407101300_decimal_score.php @@ -0,0 +1,49 @@ +dbforge->modify_column('vragen', array( + 'score' => array( + 'type' => 'DECIMAL', + 'constraint' => '4,2', + 'unsigned' => TRUE, + ), + )); + + $this->dbforge->modify_column('resultaat', array( + 'score' => array( + 'type' => 'DECIMAL', + 'constraint' => '4,2', + 'unsigned' => TRUE, + ), + )); + + } + + public function down() + { + $this->dbforge->modify_column('vragen', array( + 'score' => array( + 'type' => 'INT', + 'constraint' => '6', + 'unsigned' => TRUE, + ), + )); + + $this->dbforge->modify_column('resultaat', array( + 'score' => array( + 'type' => 'INT', + 'constraint' => '6', + 'unsigned' => TRUE, + ), + )); + + } +} \ No newline at end of file