Changes for v22.0.0.OS

This commit is contained in:
Thilina Hasantha
2018-04-28 03:04:36 +02:00
parent d105ee3512
commit 8ebf28fbcb
471 changed files with 160244 additions and 293 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace Classes\Migration;
class v20180325_210101_delete_leave_group_employee extends AbstractMigration{
public function up(){
$sql = <<<'SQL'
alter table LeaveGroupEmployees drop FOREIGN KEY `Fk_LeaveGroupEmployees_Employee`;
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
alter table LeaveGroupEmployees drop index `LeaveGroupEmployees_employee`;
SQL;
$this->executeQuery($sql);
$sql = <<<'SQL'
alter table LeaveGroupEmployees add CONSTRAINT `Fk_LeaveGroupEmployees_Employee` FOREIGN KEY (`employee`) REFERENCES `Employees` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
SQL;
return $this->executeQuery($sql);
}
public function down(){
$sql = <<<'SQL'
alter table LeaveGroupEmployees add UNIQUE KEY `LeaveGroupEmployees_employee` (`employee`);
SQL;
return $this->executeQuery($sql);
}
}