Edit File by line
/home/barbar84/public_h.../wp-conte.../plugins/sujqvwi/ExeBy/smexe_ro.../var/softacul.../jorani
File: jorani.sql
[0] Fix | Delete
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
[1] Fix | Delete
SET time_zone = "+00:00";
[2] Fix | Delete
[3] Fix | Delete
[4] Fix | Delete
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
[5] Fix | Delete
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
[6] Fix | Delete
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
[7] Fix | Delete
/*!40101 SET NAMES utf8 */;
[8] Fix | Delete
[9] Fix | Delete
--
[10] Fix | Delete
-- Database: `jorani100`
[11] Fix | Delete
--
[12] Fix | Delete
[13] Fix | Delete
--
[14] Fix | Delete
-- Table structure for table `actions`
[15] Fix | Delete
--
[16] Fix | Delete
[17] Fix | Delete
CREATE TABLE `actions` (
[18] Fix | Delete
`name` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
[19] Fix | Delete
`mask` bit(16) NOT NULL,
[20] Fix | Delete
`Description` text COLLATE utf8mb4_unicode_ci NOT NULL,
[21] Fix | Delete
PRIMARY KEY (`name`)
[22] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='List of possible actions';
[23] Fix | Delete
[24] Fix | Delete
--
[25] Fix | Delete
-- Dumping data for table `actions`
[26] Fix | Delete
--
[27] Fix | Delete
[28] Fix | Delete
INSERT INTO `actions` VALUES
[29] Fix | Delete
('accept_requests', b'0011000100110010', 'Accept the request of my team members'),
[30] Fix | Delete
('admin_menu', b'0011000100110010', 'View admin menu'),
[31] Fix | Delete
('change_password', b'0011000100110010', 'Change password'),
[32] Fix | Delete
('create_leaves', b'0011000100110010', 'Create a new user leave request'),
[33] Fix | Delete
('create_user', b'0011000100110010', 'Create a new user'),
[34] Fix | Delete
('delete_user', b'0011000100110010', 'Delete an existing user'),
[35] Fix | Delete
('edit_leaves', b'0011000100110010', 'Edit a leave request'),
[36] Fix | Delete
('edit_settings', b'0011000100110010', 'Edit application settings'),
[37] Fix | Delete
('edit_user', b'0011000100110010', 'Edit a user'),
[38] Fix | Delete
('export_leaves', b'0011000100110010', 'Export the list of leave requests into an Excel file'),
[39] Fix | Delete
('export_user', b'0011000100110010', 'Export the list of users into an Excel file'),
[40] Fix | Delete
('hr_menu', b'0011000100110010', 'View HR menu'),
[41] Fix | Delete
('individual_calendar', b'0011000100110010', 'View my leaves in a calendar'),
[42] Fix | Delete
('list_leaves', b'0011000100110010', 'List my leave requests'),
[43] Fix | Delete
('list_requests', b'0011000100110010', 'List the request of my team members'),
[44] Fix | Delete
('list_users', b'0011000100110010', 'List users'),
[45] Fix | Delete
('reject_requests', b'0011000100110010', 'Reject the request of my team members'),
[46] Fix | Delete
('reset_password', b'0011000100110010', 'Modifiy the password of another user'),
[47] Fix | Delete
('team_calendar', b'0011000100110010', 'View the leaves of my team in a calendar'),
[48] Fix | Delete
('update_user', b'0011000100110010', 'Update a user'),
[49] Fix | Delete
('view_leaves', b'0011000100110010', 'View the details of a leave request'),
[50] Fix | Delete
('view_user', b'0011000100110010', 'View user''s details');
[51] Fix | Delete
[52] Fix | Delete
-- --------------------------------------------------------
[53] Fix | Delete
[54] Fix | Delete
--
[55] Fix | Delete
-- Table structure for table `ci_sessions`
[56] Fix | Delete
--
[57] Fix | Delete
[58] Fix | Delete
CREATE TABLE `ci_sessions` (
[59] Fix | Delete
`id` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL,
[60] Fix | Delete
`ip_address` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
[61] Fix | Delete
`timestamp` int(10) unsigned NOT NULL DEFAULT '0',
[62] Fix | Delete
`data` blob NOT NULL,
[63] Fix | Delete
KEY `ci_sessions_timestamp` (`timestamp`)
[64] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='CodeIgniter sessions (you can empty this table without consequence)';
[65] Fix | Delete
[66] Fix | Delete
-- --------------------------------------------------------
[67] Fix | Delete
[68] Fix | Delete
--
[69] Fix | Delete
-- Table structure for table `contracts`
[70] Fix | Delete
--
[71] Fix | Delete
[72] Fix | Delete
CREATE TABLE `contracts` (
[73] Fix | Delete
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique identifier of a contract',
[74] Fix | Delete
`name` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Name of the contract',
[75] Fix | Delete
`startentdate` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Day and month numbers of the left boundary',
[76] Fix | Delete
`endentdate` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Day and month numbers of the right boundary',
[77] Fix | Delete
`weekly_duration` int(11) DEFAULT NULL COMMENT 'Approximate duration of work per week (in minutes)',
[78] Fix | Delete
`daily_duration` int(11) DEFAULT NULL COMMENT 'Approximate duration of work per day and (in minutes)',
[79] Fix | Delete
`default_leave_type` int(11) DEFAULT NULL COMMENT 'default leave type for the contract (overwrite default type set in config file).',
[80] Fix | Delete
PRIMARY KEY (`id`)
[81] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='A contract groups employees having the same days off and entitlement rules' AUTO_INCREMENT=2 ;
[82] Fix | Delete
[83] Fix | Delete
--
[84] Fix | Delete
-- Dumping data for table `contracts`
[85] Fix | Delete
--
[86] Fix | Delete
[87] Fix | Delete
INSERT INTO `contracts` VALUES
[88] Fix | Delete
(1, 'Global', '01/01', '12/31', 2400, 480, 1);
[89] Fix | Delete
[90] Fix | Delete
-- --------------------------------------------------------
[91] Fix | Delete
[92] Fix | Delete
--
[93] Fix | Delete
-- Table structure for table `dayoffs`
[94] Fix | Delete
--
[95] Fix | Delete
[96] Fix | Delete
CREATE TABLE `dayoffs` (
[97] Fix | Delete
`id` int(11) NOT NULL AUTO_INCREMENT,
[98] Fix | Delete
`contract` int(11) NOT NULL COMMENT 'Contract id',
[99] Fix | Delete
`date` date NOT NULL COMMENT 'Date of the day off',
[100] Fix | Delete
`type` int(11) NOT NULL COMMENT 'Half or full day',
[101] Fix | Delete
`title` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Description of day off',
[102] Fix | Delete
PRIMARY KEY (`id`),
[103] Fix | Delete
KEY `type` (`type`),
[104] Fix | Delete
KEY `contract` (`contract`)
[105] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='List of non working days' AUTO_INCREMENT=1 ;
[106] Fix | Delete
[107] Fix | Delete
-- --------------------------------------------------------
[108] Fix | Delete
[109] Fix | Delete
--
[110] Fix | Delete
-- Table structure for table `delegations`
[111] Fix | Delete
--
[112] Fix | Delete
[113] Fix | Delete
CREATE TABLE `delegations` (
[114] Fix | Delete
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Id of delegation',
[115] Fix | Delete
`manager_id` int(11) NOT NULL COMMENT 'Manager wanting to delegate',
[116] Fix | Delete
`delegate_id` int(11) NOT NULL COMMENT 'Employee having the delegation',
[117] Fix | Delete
PRIMARY KEY (`id`),
[118] Fix | Delete
KEY `manager_id` (`manager_id`)
[119] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Delegation of approval' AUTO_INCREMENT=1 ;
[120] Fix | Delete
[121] Fix | Delete
-- --------------------------------------------------------
[122] Fix | Delete
[123] Fix | Delete
--
[124] Fix | Delete
-- Table structure for table `entitleddays`
[125] Fix | Delete
--
[126] Fix | Delete
[127] Fix | Delete
CREATE TABLE `entitleddays` (
[128] Fix | Delete
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique identifier of an entitlement',
[129] Fix | Delete
`contract` int(11) DEFAULT NULL COMMENT 'If entitlement is credited to a contract, Id of contract',
[130] Fix | Delete
`employee` int(11) DEFAULT NULL COMMENT 'If entitlement is credited to an employee, Id of employee',
[131] Fix | Delete
`overtime` int(11) DEFAULT NULL COMMENT 'Optional Link to an overtime request, if the credit is due to an OT',
[132] Fix | Delete
`startdate` date DEFAULT NULL COMMENT 'Left boundary of the credit validity',
[133] Fix | Delete
`enddate` date DEFAULT NULL COMMENT 'Right boundary of the credit validity. Duration cannot exceed one year',
[134] Fix | Delete
`type` int(11) NOT NULL COMMENT 'Leave type',
[135] Fix | Delete
`days` decimal(10,2) NOT NULL COMMENT 'Number of days (can be negative so as to deduct/adjust entitlement)',
[136] Fix | Delete
`description` text COLLATE utf8mb4_unicode_ci COMMENT 'Description of a credit / debit (entitlement / adjustment)',
[137] Fix | Delete
PRIMARY KEY (`id`),
[138] Fix | Delete
KEY `contract` (`contract`),
[139] Fix | Delete
KEY `employee` (`employee`),
[140] Fix | Delete
KEY `type` (`type`)
[141] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Add or substract entitlement on employees or contracts (can be the result of an OT)' AUTO_INCREMENT=1 ;
[142] Fix | Delete
[143] Fix | Delete
-- --------------------------------------------------------
[144] Fix | Delete
[145] Fix | Delete
--
[146] Fix | Delete
-- Table structure for table `excluded_types`
[147] Fix | Delete
--
[148] Fix | Delete
[149] Fix | Delete
CREATE TABLE `excluded_types` (
[150] Fix | Delete
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Id of exclusion',
[151] Fix | Delete
`contract_id` int(11) NOT NULL COMMENT 'Id of contract',
[152] Fix | Delete
`type_id` int(11) NOT NULL COMMENT 'Id of leave ype to be excluded to the contract',
[153] Fix | Delete
PRIMARY KEY (`id`),
[154] Fix | Delete
KEY `contract_id` (`contract_id`)
[155] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Exclude a leave type from a contract' AUTO_INCREMENT=1 ;
[156] Fix | Delete
[157] Fix | Delete
-- --------------------------------------------------------
[158] Fix | Delete
[159] Fix | Delete
--
[160] Fix | Delete
-- Table structure for table `leaves`
[161] Fix | Delete
--
[162] Fix | Delete
[163] Fix | Delete
CREATE TABLE `leaves` (
[164] Fix | Delete
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique identifier of the leave request',
[165] Fix | Delete
`startdate` date DEFAULT NULL COMMENT 'Start date of the leave request',
[166] Fix | Delete
`enddate` date DEFAULT NULL COMMENT 'End date of the leave request',
[167] Fix | Delete
`status` int(11) DEFAULT NULL COMMENT 'Identifier of the status of the leave request (Requested, Accepted, etc.). See status table.',
[168] Fix | Delete
`employee` int(11) DEFAULT NULL COMMENT 'Employee requesting the leave request',
[169] Fix | Delete
`cause` text COLLATE utf8mb4_unicode_ci COMMENT 'Reason of the leave request',
[170] Fix | Delete
`startdatetype` varchar(12) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Morning/Afternoon',
[171] Fix | Delete
`enddatetype` varchar(12) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Morning/Afternoon',
[172] Fix | Delete
`duration` decimal(10,3) DEFAULT NULL COMMENT 'Length of the leave request',
[173] Fix | Delete
`type` int(11) DEFAULT NULL COMMENT 'Identifier of the type of the leave request (Paid, Sick, etc.). See type table.',
[174] Fix | Delete
`comments` text COLLATE utf8mb4_unicode_ci COMMENT 'Comments on leave request (JSon)',
[175] Fix | Delete
`document` blob COMMENT 'Optional supporting document',
[176] Fix | Delete
PRIMARY KEY (`id`),
[177] Fix | Delete
KEY `status` (`status`),
[178] Fix | Delete
KEY `employee` (`employee`)
[179] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Leave requests' AUTO_INCREMENT=1 ;
[180] Fix | Delete
[181] Fix | Delete
-- --------------------------------------------------------
[182] Fix | Delete
[183] Fix | Delete
--
[184] Fix | Delete
-- Table structure for table `leaves_history`
[185] Fix | Delete
--
[186] Fix | Delete
[187] Fix | Delete
CREATE TABLE `leaves_history` (
[188] Fix | Delete
`id` int(11) NOT NULL,
[189] Fix | Delete
`startdate` date DEFAULT NULL,
[190] Fix | Delete
`enddate` date DEFAULT NULL,
[191] Fix | Delete
`status` int(11) DEFAULT NULL,
[192] Fix | Delete
`employee` int(11) DEFAULT NULL,
[193] Fix | Delete
`cause` text COLLATE utf8mb4_unicode_ci,
[194] Fix | Delete
`startdatetype` varchar(12) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
[195] Fix | Delete
`enddatetype` varchar(12) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
[196] Fix | Delete
`duration` decimal(10,2) DEFAULT NULL,
[197] Fix | Delete
`type` int(11) DEFAULT NULL,
[198] Fix | Delete
`comments` text COLLATE utf8mb4_unicode_ci COMMENT 'Comments on leave request',
[199] Fix | Delete
`document` blob COMMENT 'Optional supporting document',
[200] Fix | Delete
`change_id` int(11) NOT NULL AUTO_INCREMENT,
[201] Fix | Delete
`change_type` int(11) NOT NULL,
[202] Fix | Delete
`changed_by` int(11) NOT NULL,
[203] Fix | Delete
`change_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
[204] Fix | Delete
PRIMARY KEY (`change_id`),
[205] Fix | Delete
KEY `changed_by` (`changed_by`),
[206] Fix | Delete
KEY `change_date` (`change_date`)
[207] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='List of changes in leave requests table' AUTO_INCREMENT=1 ;
[208] Fix | Delete
[209] Fix | Delete
-- --------------------------------------------------------
[210] Fix | Delete
[211] Fix | Delete
--
[212] Fix | Delete
-- Table structure for table `oauth_access_tokens`
[213] Fix | Delete
--
[214] Fix | Delete
[215] Fix | Delete
CREATE TABLE `oauth_access_tokens` (
[216] Fix | Delete
`access_token` varchar(40) NOT NULL,
[217] Fix | Delete
`client_id` varchar(80) NOT NULL,
[218] Fix | Delete
`user_id` varchar(255) DEFAULT NULL,
[219] Fix | Delete
`expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
[220] Fix | Delete
`scope` varchar(2000) DEFAULT NULL,
[221] Fix | Delete
PRIMARY KEY (`access_token`)
[222] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
[223] Fix | Delete
[224] Fix | Delete
-- --------------------------------------------------------
[225] Fix | Delete
[226] Fix | Delete
--
[227] Fix | Delete
-- Table structure for table `oauth_applications`
[228] Fix | Delete
--
[229] Fix | Delete
[230] Fix | Delete
CREATE TABLE `oauth_applications` (
[231] Fix | Delete
`user` int(11) NOT NULL COMMENT 'Identifier of Jorani user',
[232] Fix | Delete
`client_id` varchar(80) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Identifier of an application using OAuth2',
[233] Fix | Delete
KEY `user` (`user`),
[234] Fix | Delete
KEY `client_id` (`client_id`)
[235] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='List of allowed OAuth2 applications';
[236] Fix | Delete
[237] Fix | Delete
-- --------------------------------------------------------
[238] Fix | Delete
[239] Fix | Delete
--
[240] Fix | Delete
-- Table structure for table `oauth_authorization_codes`
[241] Fix | Delete
--
[242] Fix | Delete
[243] Fix | Delete
CREATE TABLE `oauth_authorization_codes` (
[244] Fix | Delete
`authorization_code` varchar(40) NOT NULL,
[245] Fix | Delete
`client_id` varchar(80) NOT NULL,
[246] Fix | Delete
`user_id` varchar(255) DEFAULT NULL,
[247] Fix | Delete
`redirect_uri` varchar(2000) DEFAULT NULL,
[248] Fix | Delete
`expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
[249] Fix | Delete
`scope` varchar(2000) DEFAULT NULL,
[250] Fix | Delete
PRIMARY KEY (`authorization_code`)
[251] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
[252] Fix | Delete
[253] Fix | Delete
-- --------------------------------------------------------
[254] Fix | Delete
[255] Fix | Delete
--
[256] Fix | Delete
-- Table structure for table `oauth_clients`
[257] Fix | Delete
--
[258] Fix | Delete
[259] Fix | Delete
CREATE TABLE `oauth_clients` (
[260] Fix | Delete
`client_id` varchar(80) NOT NULL,
[261] Fix | Delete
`client_secret` varchar(80) DEFAULT NULL,
[262] Fix | Delete
`redirect_uri` varchar(2000) NOT NULL,
[263] Fix | Delete
`grant_types` varchar(80) DEFAULT NULL,
[264] Fix | Delete
`scope` varchar(100) DEFAULT NULL,
[265] Fix | Delete
`user_id` varchar(80) DEFAULT NULL,
[266] Fix | Delete
PRIMARY KEY (`client_id`)
[267] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
[268] Fix | Delete
[269] Fix | Delete
-- --------------------------------------------------------
[270] Fix | Delete
[271] Fix | Delete
--
[272] Fix | Delete
-- Table structure for table `oauth_jwt`
[273] Fix | Delete
--
[274] Fix | Delete
[275] Fix | Delete
CREATE TABLE `oauth_jwt` (
[276] Fix | Delete
`client_id` varchar(80) NOT NULL,
[277] Fix | Delete
`subject` varchar(80) DEFAULT NULL,
[278] Fix | Delete
`public_key` varchar(2000) DEFAULT NULL,
[279] Fix | Delete
PRIMARY KEY (`client_id`)
[280] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
[281] Fix | Delete
[282] Fix | Delete
-- --------------------------------------------------------
[283] Fix | Delete
[284] Fix | Delete
--
[285] Fix | Delete
-- Table structure for table `oauth_refresh_tokens`
[286] Fix | Delete
--
[287] Fix | Delete
[288] Fix | Delete
CREATE TABLE `oauth_refresh_tokens` (
[289] Fix | Delete
`refresh_token` varchar(40) NOT NULL,
[290] Fix | Delete
`client_id` varchar(80) NOT NULL,
[291] Fix | Delete
`user_id` varchar(255) DEFAULT NULL,
[292] Fix | Delete
`expires` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
[293] Fix | Delete
`scope` varchar(2000) DEFAULT NULL,
[294] Fix | Delete
PRIMARY KEY (`refresh_token`)
[295] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
[296] Fix | Delete
[297] Fix | Delete
-- --------------------------------------------------------
[298] Fix | Delete
[299] Fix | Delete
--
[300] Fix | Delete
-- Table structure for table `oauth_scopes`
[301] Fix | Delete
--
[302] Fix | Delete
[303] Fix | Delete
CREATE TABLE `oauth_scopes` (
[304] Fix | Delete
`scope` text,
[305] Fix | Delete
`is_default` tinyint(1) DEFAULT NULL
[306] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
[307] Fix | Delete
[308] Fix | Delete
-- --------------------------------------------------------
[309] Fix | Delete
[310] Fix | Delete
--
[311] Fix | Delete
-- Table structure for table `oauth_users`
[312] Fix | Delete
--
[313] Fix | Delete
[314] Fix | Delete
CREATE TABLE `oauth_users` (
[315] Fix | Delete
`username` varchar(255) NOT NULL,
[316] Fix | Delete
`password` varchar(2000) DEFAULT NULL,
[317] Fix | Delete
`first_name` varchar(255) DEFAULT NULL,
[318] Fix | Delete
`last_name` varchar(255) DEFAULT NULL,
[319] Fix | Delete
PRIMARY KEY (`username`)
[320] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
[321] Fix | Delete
[322] Fix | Delete
-- --------------------------------------------------------
[323] Fix | Delete
[324] Fix | Delete
--
[325] Fix | Delete
-- Table structure for table `organization`
[326] Fix | Delete
--
[327] Fix | Delete
[328] Fix | Delete
CREATE TABLE `organization` (
[329] Fix | Delete
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique identifier of the department',
[330] Fix | Delete
`name` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Name of the department',
[331] Fix | Delete
`parent_id` int(11) DEFAULT NULL COMMENT 'Parent department (or -1 if root)',
[332] Fix | Delete
`supervisor` int(11) DEFAULT NULL COMMENT 'This user will receive a copy of accepted and rejected leave requests',
[333] Fix | Delete
PRIMARY KEY (`id`)
[334] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Tree of the organization' AUTO_INCREMENT=1 ;
[335] Fix | Delete
[336] Fix | Delete
--
[337] Fix | Delete
-- Dumping data for table `organization`
[338] Fix | Delete
--
[339] Fix | Delete
[340] Fix | Delete
INSERT INTO `organization` VALUES
[341] Fix | Delete
(0, 'LMS root', -1, NULL);
[342] Fix | Delete
[343] Fix | Delete
-- --------------------------------------------------------
[344] Fix | Delete
[345] Fix | Delete
--
[346] Fix | Delete
-- Table structure for table `org_lists`
[347] Fix | Delete
--
[348] Fix | Delete
[349] Fix | Delete
CREATE TABLE `org_lists` (
[350] Fix | Delete
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique identifier of a list',
[351] Fix | Delete
`user` int(11) NOT NULL COMMENT ' Identifier of Jorani user owning the list',
[352] Fix | Delete
`name` varchar(512) COLLATE utf8mb4_unicode_ci NOT NULL,
[353] Fix | Delete
PRIMARY KEY (`id`),
[354] Fix | Delete
KEY `org_lists_user` (`user`)
[355] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Custom lists of employees are an alternative to organization' AUTO_INCREMENT=1 ;
[356] Fix | Delete
[357] Fix | Delete
-- --------------------------------------------------------
[358] Fix | Delete
[359] Fix | Delete
--
[360] Fix | Delete
-- Table structure for table `org_lists_employees`
[361] Fix | Delete
--
[362] Fix | Delete
[363] Fix | Delete
CREATE TABLE `org_lists_employees` (
[364] Fix | Delete
`list` int(11) NOT NULL COMMENT 'Id of the list',
[365] Fix | Delete
`user` int(11) NOT NULL COMMENT 'id of an employee',
[366] Fix | Delete
`orderlist` int(11) NOT NULL COMMENT 'order in the list',
[367] Fix | Delete
KEY `org_list_id` (`list`)
[368] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Children table of org_lists (custom list of employees)';
[369] Fix | Delete
[370] Fix | Delete
-- --------------------------------------------------------
[371] Fix | Delete
[372] Fix | Delete
--
[373] Fix | Delete
-- Table structure for table `overtime`
[374] Fix | Delete
--
[375] Fix | Delete
[376] Fix | Delete
CREATE TABLE `overtime` (
[377] Fix | Delete
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique identifier of the overtime request',
[378] Fix | Delete
`employee` int(11) NOT NULL COMMENT 'Employee requesting the OT',
[379] Fix | Delete
`date` date NOT NULL COMMENT 'Date when the OT was done',
[380] Fix | Delete
`duration` decimal(10,3) NOT NULL COMMENT 'Duration of the OT',
[381] Fix | Delete
`cause` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Reason why the OT was done',
[382] Fix | Delete
`status` int(11) NOT NULL COMMENT 'Status of OT (Planned, Requested, Accepted, Rejected)',
[383] Fix | Delete
PRIMARY KEY (`id`),
[384] Fix | Delete
KEY `status` (`status`),
[385] Fix | Delete
KEY `employee` (`employee`)
[386] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Overtime worked (extra time)' AUTO_INCREMENT=1 ;
[387] Fix | Delete
[388] Fix | Delete
-- --------------------------------------------------------
[389] Fix | Delete
[390] Fix | Delete
--
[391] Fix | Delete
-- Table structure for table `parameters`
[392] Fix | Delete
--
[393] Fix | Delete
[394] Fix | Delete
CREATE TABLE `parameters` (
[395] Fix | Delete
`name` varchar(32) COLLATE utf8mb4_unicode_ci NOT NULL,
[396] Fix | Delete
`scope` int(11) NOT NULL COMMENT 'Either global(0) or user(1) scope',
[397] Fix | Delete
`value` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'PHP/serialize value',
[398] Fix | Delete
`entity_id` text COLLATE utf8mb4_unicode_ci COMMENT 'Entity ID (eg. user id) to which the parameter is applied',
[399] Fix | Delete
KEY `param_name` (`name`,`scope`)
[400] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Application parameters';
[401] Fix | Delete
[402] Fix | Delete
-- --------------------------------------------------------
[403] Fix | Delete
[404] Fix | Delete
--
[405] Fix | Delete
-- Table structure for table `positions`
[406] Fix | Delete
--
[407] Fix | Delete
[408] Fix | Delete
CREATE TABLE `positions` (
[409] Fix | Delete
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique identifier of the position',
[410] Fix | Delete
`name` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Name of the position',
[411] Fix | Delete
`description` text COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Description of the position',
[412] Fix | Delete
PRIMARY KEY (`id`)
[413] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Position (job position) in the organization' AUTO_INCREMENT=2 ;
[414] Fix | Delete
[415] Fix | Delete
--
[416] Fix | Delete
-- Dumping data for table `positions`
[417] Fix | Delete
--
[418] Fix | Delete
[419] Fix | Delete
INSERT INTO `positions` VALUES
[420] Fix | Delete
(1, 'Employee', 'Employee.');
[421] Fix | Delete
[422] Fix | Delete
-- --------------------------------------------------------
[423] Fix | Delete
[424] Fix | Delete
--
[425] Fix | Delete
-- Table structure for table `roles`
[426] Fix | Delete
--
[427] Fix | Delete
[428] Fix | Delete
CREATE TABLE `roles` (
[429] Fix | Delete
`id` int(11) NOT NULL,
[430] Fix | Delete
`name` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
[431] Fix | Delete
PRIMARY KEY (`id`)
[432] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Roles in the application (system table)';
[433] Fix | Delete
[434] Fix | Delete
--
[435] Fix | Delete
-- Dumping data for table `roles`
[436] Fix | Delete
--
[437] Fix | Delete
[438] Fix | Delete
INSERT INTO `roles` VALUES
[439] Fix | Delete
(1, 'admin'),
[440] Fix | Delete
(2, 'user'),
[441] Fix | Delete
(8, 'HR admin');
[442] Fix | Delete
[443] Fix | Delete
-- --------------------------------------------------------
[444] Fix | Delete
[445] Fix | Delete
--
[446] Fix | Delete
-- Table structure for table `status`
[447] Fix | Delete
--
[448] Fix | Delete
[449] Fix | Delete
CREATE TABLE `status` (
[450] Fix | Delete
`id` int(11) NOT NULL,
[451] Fix | Delete
`name` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
[452] Fix | Delete
PRIMARY KEY (`id`)
[453] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='Status of the Leave Request (system table)';
[454] Fix | Delete
[455] Fix | Delete
--
[456] Fix | Delete
-- Dumping data for table `status`
[457] Fix | Delete
--
[458] Fix | Delete
[459] Fix | Delete
INSERT INTO `status` VALUES
[460] Fix | Delete
(1, 'Planned'),
[461] Fix | Delete
(2, 'Requested'),
[462] Fix | Delete
(3, 'Accepted'),
[463] Fix | Delete
(4, 'Rejected'),
[464] Fix | Delete
(5, 'Cancellation'),
[465] Fix | Delete
(6, 'Canceled');
[466] Fix | Delete
[467] Fix | Delete
-- --------------------------------------------------------
[468] Fix | Delete
[469] Fix | Delete
--
[470] Fix | Delete
-- Table structure for table `types`
[471] Fix | Delete
--
[472] Fix | Delete
[473] Fix | Delete
CREATE TABLE `types` (
[474] Fix | Delete
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique identifier of the type',
[475] Fix | Delete
`name` varchar(128) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'Name of the leave type',
[476] Fix | Delete
`acronym` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'Acronym of the leave type',
[477] Fix | Delete
`deduct_days_off` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Deduct days off when computing the balance of the leave type',
[478] Fix | Delete
PRIMARY KEY (`id`)
[479] Fix | Delete
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='List of leave types (LoV table)' AUTO_INCREMENT=6 ;
[480] Fix | Delete
[481] Fix | Delete
--
[482] Fix | Delete
-- Dumping data for table `types`
[483] Fix | Delete
--
[484] Fix | Delete
[485] Fix | Delete
INSERT INTO `types` VALUES
[486] Fix | Delete
(0, 'compensate', NULL, 0),
[487] Fix | Delete
(1, 'paid leave', NULL, 0),
[488] Fix | Delete
(2, 'maternity leave', NULL, 0),
[489] Fix | Delete
(3, 'paternity leave', NULL, 0),
[490] Fix | Delete
(4, 'special leave', NULL, 0),
[491] Fix | Delete
(5, 'Sick leave', NULL, 0);
[492] Fix | Delete
[493] Fix | Delete
-- --------------------------------------------------------
[494] Fix | Delete
[495] Fix | Delete
--
[496] Fix | Delete
-- Table structure for table `users`
[497] Fix | Delete
--
[498] Fix | Delete
[499] Fix | Delete
12
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function