%PDF- %PDF-
| Direktori : /home/opti/workflow/ |
| Current File : /home/opti/workflow/was-modified.sql |
-- phpMyAdmin SQL Dump
-- version 4.7.9
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 18, 2019 at 11:05 AM
-- Server version: 10.1.31-MariaDB
-- PHP Version: 7.2.3
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `was`
--
-- --------------------------------------------------------
--
-- Table structure for table `branches`
--
CREATE TABLE `branches` (
`id` int(11) NOT NULL,
`branch_name` varchar(255) DEFAULT NULL,
`branch_description` varchar(255) DEFAULT NULL,
`region_id` int(11) DEFAULT NULL,
`orgId` int(11) DEFAULT NULL,
`added_by_id` int(11) DEFAULT NULL,
`updated_by_id` int(11) DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`deleted_by_id` int(11) DEFAULT NULL,
`createdAt` datetime NOT NULL,
`updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `company`
--
CREATE TABLE `company` (
`id` int(11) NOT NULL,
`name` varchar(255) DEFAULT NULL,
`description` varchar(255) DEFAULT NULL,
`address` varchar(255) DEFAULT NULL,
`createdAt` datetime NOT NULL,
`updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `company`
--
INSERT INTO `company` (`id`, `name`, `description`, `address`, `createdAt`, `updatedAt`) VALUES
(1, 'Optisoft', 'A software development company', 'marina', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Table structure for table `departments`
--
CREATE TABLE `departments` (
`id` int(11) NOT NULL,
`department_name` varchar(255) DEFAULT NULL,
`department_description` varchar(255) DEFAULT NULL,
`orgId` int(11) DEFAULT NULL,
`added_by_id` int(11) DEFAULT NULL,
`updated_by_id` int(11) DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`deleted_by_id` int(11) DEFAULT NULL,
`createdAt` datetime NOT NULL,
`updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `notifications`
--
CREATE TABLE `notifications` (
`id` int(11) NOT NULL,
`sender_id` int(11) DEFAULT NULL,
`receiver_id` int(11) DEFAULT NULL,
`notification_type` varchar(150) DEFAULT NULL,
`notifiable_id` int(11) DEFAULT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `notifications`
--
INSERT INTO `notifications` (`id`, `sender_id`, `receiver_id`, `notification_type`, `notifiable_id`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'processname_leave_application', 1, '2019-02-13 10:09:49', '2019-02-13 10:09:49'),
(2, 1, 1, 'processname_cash_request', 1, '2019-02-15 09:29:39', '2019-02-15 09:29:39'),
(3, 1, 1, 'processname_cash_request', 2, '2019-02-15 09:31:17', '2019-02-15 09:31:17');
-- --------------------------------------------------------
--
-- Table structure for table `regions`
--
CREATE TABLE `regions` (
`id` int(11) NOT NULL,
`region_name` varchar(255) DEFAULT NULL,
`region_description` varchar(255) DEFAULT NULL,
`orgId` int(11) DEFAULT NULL,
`added_by_id` int(11) DEFAULT NULL,
`updated_by_id` int(11) DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`deleted_by_id` int(11) DEFAULT NULL,
`createdAt` datetime NOT NULL,
`updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `roles`
--
CREATE TABLE `roles` (
`id` int(11) NOT NULL,
`role_name` varchar(255) DEFAULT NULL,
`orgId` int(11) DEFAULT NULL,
`role_description` varchar(255) DEFAULT NULL,
`added_by_id` int(11) DEFAULT NULL,
`updated_by_id` int(11) DEFAULT NULL,
`createdAt` datetime NOT NULL,
`updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `rolesrights`
--
CREATE TABLE `rolesrights` (
`id` int(11) NOT NULL,
`can_create` tinyint(1) DEFAULT NULL,
`can_edit` tinyint(1) DEFAULT NULL,
`can_override` tinyint(1) DEFAULT NULL,
`can_view` tinyint(1) DEFAULT NULL,
`can_delete` tinyint(1) DEFAULT NULL,
`orgId` int(11) DEFAULT NULL,
`module_id` int(11) DEFAULT NULL,
`role_id` int(11) DEFAULT NULL,
`added_by_id` int(11) DEFAULT NULL,
`updated_by_id` int(11) DEFAULT NULL,
`createdAt` datetime NOT NULL,
`updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `saved_processes`
--
CREATE TABLE `saved_processes` (
`id` int(11) NOT NULL,
`table_name` varchar(250) NOT NULL,
`orgId` int(5) NOT NULL,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `sequelizemeta`
--
CREATE TABLE `sequelizemeta` (
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
--
-- Dumping data for table `sequelizemeta`
--
INSERT INTO `sequelizemeta` (`name`) VALUES
('20190215234358-create-roles.js'),
('20190215234400-create-roles-rights.js'),
('20190215234403-create-user-rights.js'),
('20190215234406-create-branches.js'),
('20190215234411-create-department.js'),
('20190215234413-create-units.js'),
('20190215234416-create-company.js'),
('20190215234418-create-users.js'),
('20190215234509-create-regions.js');
-- --------------------------------------------------------
--
-- Table structure for table `units`
--
CREATE TABLE `units` (
`id` int(11) NOT NULL,
`unit_name` varchar(255) DEFAULT NULL,
`unit_description` varchar(255) DEFAULT NULL,
`department_id` int(11) DEFAULT NULL,
`orgId` int(11) DEFAULT NULL,
`added_by_id` int(11) DEFAULT NULL,
`updated_by_id` int(11) DEFAULT NULL,
`deleted_at` datetime DEFAULT NULL,
`deleted_by_id` int(11) DEFAULT NULL,
`createdAt` datetime NOT NULL,
`updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `userrights`
--
CREATE TABLE `userrights` (
`id` int(11) NOT NULL,
`can_create` tinyint(1) DEFAULT NULL,
`can_edit` tinyint(1) DEFAULT NULL,
`can_override` tinyint(1) DEFAULT NULL,
`can_view` tinyint(1) DEFAULT NULL,
`can_delete` tinyint(1) DEFAULT NULL,
`orgId` int(11) DEFAULT NULL,
`user_id` int(11) DEFAULT NULL,
`added_by_id` int(11) DEFAULT NULL,
`updated_by_id` int(11) DEFAULT NULL,
`createdAt` datetime NOT NULL,
`updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) NOT NULL,
`firstName` varchar(255) DEFAULT NULL,
`lastName` varchar(255) DEFAULT NULL,
`phone` varchar(255) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`branch_id` int(11) DEFAULT NULL,
`orgId` int(11) DEFAULT NULL,
`user_role` int(11) DEFAULT NULL,
`createdAt` datetime DEFAULT NULL,
`updatedAt` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `firstName`, `lastName`, `phone`, `email`, `password`, `branch_id`, `orgId`, `user_role`, `createdAt`, `updatedAt`) VALUES
(1, 'Chris', 'Bassey', '08065913488', 'chrixsbassey@gmail.com', '$2b$10$xnQUdb/mM/31q2h/A/xK.etlV8jgiua06Jv5AKxasCLSdb1/7cz6S', NULL, 1, NULL, '0000-00-00 00:00:00', '0000-00-00 00:00:00');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `branches`
--
ALTER TABLE `branches`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `company`
--
ALTER TABLE `company`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `departments`
--
ALTER TABLE `departments`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `notifications`
--
ALTER TABLE `notifications`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `regions`
--
ALTER TABLE `regions`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `rolesrights`
--
ALTER TABLE `rolesrights`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `saved_processes`
--
ALTER TABLE `saved_processes`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `sequelizemeta`
--
ALTER TABLE `sequelizemeta`
ADD PRIMARY KEY (`name`),
ADD UNIQUE KEY `name` (`name`);
--
-- Indexes for table `units`
--
ALTER TABLE `units`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `userrights`
--
ALTER TABLE `userrights`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `branches`
--
ALTER TABLE `branches`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `company`
--
ALTER TABLE `company`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `departments`
--
ALTER TABLE `departments`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `notifications`
--
ALTER TABLE `notifications`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `regions`
--
ALTER TABLE `regions`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `rolesrights`
--
ALTER TABLE `rolesrights`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `saved_processes`
--
ALTER TABLE `saved_processes`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `units`
--
ALTER TABLE `units`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `userrights`
--
ALTER TABLE `userrights`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;