Add latest changes from icehrm pro
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
$migrationList = [];
|
||||
$migrationList[] = 'v20180514_230002_add_conversation_tables';
|
||||
$migrationList[] = 'v20180507_230001_update_travel_record_type';
|
||||
$migrationList[] = 'v20180417_210501_update_menu_names';
|
||||
$migrationList[] = 'v20180325_210101_delete_leave_group_employee';
|
||||
$migrationList[] = 'v20180317_210200_leave_rule_experience';
|
||||
|
||||
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
namespace Classes\Migration;
|
||||
|
||||
class v20180507_230001_update_travel_record_type extends AbstractMigration{
|
||||
|
||||
public function up(){
|
||||
|
||||
$sql = <<<'SQL'
|
||||
Alter table EmployeeTravelRecords modify column `type` varchar(200) DEFAULT '';
|
||||
SQL;
|
||||
$this->executeQuery($sql);
|
||||
|
||||
$sql = <<<'SQL'
|
||||
Update Settings set value = '1' where name = 'System: Reset Module Names';
|
||||
SQL;
|
||||
return $this->executeQuery($sql);
|
||||
}
|
||||
|
||||
public function down(){
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
66
core/migrations/v20180514_230002_add_conversation_tables.php
Normal file
66
core/migrations/v20180514_230002_add_conversation_tables.php
Normal file
@@ -0,0 +1,66 @@
|
||||
<?php
|
||||
namespace Classes\Migration;
|
||||
|
||||
class v20180514_230002_add_conversation_tables extends AbstractMigration{
|
||||
|
||||
public function up(){
|
||||
|
||||
$sql = <<<'SQL'
|
||||
create table `Conversations` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`message` LONGTEXT NOT NULL,
|
||||
`type` varchar(35) NOT NULL,
|
||||
`attachment` varchar(100) NULL,
|
||||
`employee` bigint(20) NOT NULL,
|
||||
`target` bigint(20) NULL,
|
||||
`created` DATETIME default '0000-00-00 00:00:00',
|
||||
`updated` DATETIME default '0000-00-00 00:00:00',
|
||||
`timeint` BIGINT(20) NOT NULL,
|
||||
primary key (`id`),
|
||||
unique key `KEY_Conversations_attachment` (`attachment`),
|
||||
index `KEY_Conversations_type` (`type`),
|
||||
index `KEY_Conversations_employee` (`employee`),
|
||||
index `KEY_Conversations_target` (`target`),
|
||||
index `KEY_Conversations_target_type` (`target`,`type`),
|
||||
index `KEY_Conversations_timeint` (`timeint`),
|
||||
index `KEY_Conversations_timeint_type` (`timeint`, `type`)
|
||||
) engine=innodb default charset=utf8;
|
||||
SQL;
|
||||
$this->executeQuery($sql);
|
||||
|
||||
$sql = <<<'SQL'
|
||||
create table `ConversationUserStatus` (
|
||||
`id` bigint(20) NOT NULL AUTO_INCREMENT,
|
||||
`employee` bigint(20) NOT NULL,
|
||||
`status` varchar(15) NULL,
|
||||
`seen_at` DATETIME default '0000-00-00 00:00:00',
|
||||
primary key (`id`),
|
||||
unique key `KEY_ConversationLastSeen_employee` (`employee`),
|
||||
index `KEY_ConversationLastSeen_seen_at` (`seen_at`),
|
||||
index `KEY_ConversationLastSeen_status` (`seen_at`)
|
||||
) engine=innodb default charset=utf8;
|
||||
SQL;
|
||||
$this->executeQuery($sql);
|
||||
|
||||
$sql = <<<'SQL'
|
||||
Update Settings set value = '1' where name = 'System: Reset Module Names';
|
||||
SQL;
|
||||
$this->executeQuery($sql);
|
||||
|
||||
$sql = <<<'SQL'
|
||||
Update Settings set value = '1' where name = 'System: Add New Permissions';
|
||||
SQL;
|
||||
$this->executeQuery($sql);
|
||||
|
||||
$sql = <<<'SQL'
|
||||
INSERT INTO `SupportedLanguages` (`name`, `description`) VALUES ('fi', 'Finnish');
|
||||
SQL;
|
||||
return $this->executeQuery($sql);
|
||||
}
|
||||
|
||||
public function down(){
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user