Allow punch out time to be null - fix for mysql strict date mode
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
<?php
|
||||
$migrationList = [];
|
||||
$migrationList[] = 'v20171001_200201_update_attendance_out';
|
||||
$migrationList[] = 'v20170918_200000_add_attendance_image_out';
|
||||
$migrationList[] = 'v20170908_200000_payroll_group';
|
||||
$migrationList[] = 'v20170702_190500_add_attendance_image';
|
||||
|
||||
23
migrations/v20171001_200201_update_attendance_out.php
Normal file
23
migrations/v20171001_200201_update_attendance_out.php
Normal 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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user