Allow punch out time to be null - fix for mysql strict date mode

This commit is contained in:
gamonoid
2017-10-03 08:17:58 +02:00
parent 45ea7e0f0d
commit 79ecf9cd6a
3 changed files with 24 additions and 1 deletions

View File

@@ -0,0 +1,23 @@
<?php
namespace Classes\Migration;
class v20171001_200201_update_attendance_out extends AbstractMigration{
public function up(){
$sql = <<<'SQL'
alter table Attendance modify column `out_time` datetime default NULL;
SQL;
return $this->executeQuery($sql);
}
public function down(){
$sql = <<<'SQL'
alter table Attendance modify column `out_time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00';
SQL;
return $this->executeQuery($sql);
}
}