-
Notifications
You must be signed in to change notification settings - Fork 0
/
project_management (1).sql
190 lines (159 loc) · 7.58 KB
/
project_management (1).sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
-- phpMyAdmin SQL Dump
-- version 5.0.2
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3307
-- Generation Time: Dec 12, 2021 at 12:14 PM
-- Server version: 10.4.11-MariaDB
-- PHP Version: 7.4.4
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `project_management`
--
-- --------------------------------------------------------
--
-- Table structure for table `projects`
--
CREATE TABLE `projects` (
`id` int(11) UNSIGNED NOT NULL,
`project_name` varchar(255) DEFAULT NULL,
`project_manager` varchar(255) DEFAULT NULL,
`start_date` date DEFAULT NULL,
`end_date` date NOT NULL,
`budget` float DEFAULT NULL,
`status` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `projects`
--
INSERT INTO `projects` (`id`, `project_name`, `project_manager`, `start_date`, `end_date`, `budget`, `status`) VALUES
(15, 'Multipage responsive website', 'Mike O Donnell', '2021-12-09', '2022-01-17', 34000, 'Finished'),
(16, 'Existing template redesign for school website', 'Mike O Donnell', '2022-01-22', '2022-02-23', 10000, 'Pending'),
(17, 'Web scraping application', 'Mike O Donnell', '2021-12-10', '2022-03-15', 50000, 'Finished'),
(18, 'E-commerce store for pendo organisation', 'Mike O Donnell', '2021-12-19', '2022-03-25', 75000, 'Pending'),
(19, 'Lost animals application', 'Mike O Donnell', '2022-01-01', '2022-03-04', 40000, 'Pending'),
(20, 'Freelance application', 'Mike O Donnell', '2022-01-05', '2022-04-13', 50000, 'Finished'),
(21, 'News aggregator website', 'Mike O Donnell', '2022-02-24', '2022-05-25', 70000, 'Pending'),
(22, 'Game library app', 'Mike O Donnell', '2022-02-13', '2022-05-26', 40000, 'Pending'),
(23, 'Finance budgeting app', 'Mike O Donnell', '2022-02-13', '2022-05-12', 100000, 'Pending'),
(24, 'Grocery application', 'Mike O Donnell', '2021-12-16', '2022-02-18', 60000, 'Pending'),
(25, 'Quiz application for zentex', 'Mike O Donnell', '2022-01-13', '2022-03-31', 65000, 'Pending'),
(26, 'Restaurant website for Kibwezi restaurant', 'Mike O Donnell', '2022-01-26', '2022-05-13', 40000, 'Pending'),
(27, 'Mpesa integration for Caltex e-commerce website', 'Mike O Donnell', '2022-01-06', '2022-05-10', 15000, 'Pending'),
(28, 'Payroll application ', 'Mike O Donnell', '2022-02-03', '2022-05-14', 80000, 'Finished'),
(29, 'Android game ', 'Mike O Donnell', '2022-02-17', '2022-04-15', 70000, 'Pending'),
(31, 'Payments integration for m-kazi organization', 'Mike O Donnell', '2022-01-20', '2022-04-29', 20000, 'Finished'),
(32, 'Tourism website upgrade for kws', 'Michael Itindi', '2022-01-13', '2022-03-16', 24000, 'Pending'),
(33, 'Customer billing system for uwezo organizatin', 'Michael Itindi', '2022-01-19', '2022-04-16', 50000, 'Pending'),
(34, 'Dairy system for tanaka farmers sacco', 'Michael Itindi', '2022-03-17', '2022-06-18', 80000, 'Pending');
-- --------------------------------------------------------
--
-- Table structure for table `tasks`
--
CREATE TABLE `tasks` (
`id` int(11) UNSIGNED NOT NULL,
`task_name` varchar(255) DEFAULT NULL,
`projectname` varchar(255) DEFAULT NULL,
`emp_name` varchar(255) DEFAULT NULL,
`instruction` varchar(255) DEFAULT NULL,
`status` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `tasks`
--
INSERT INTO `tasks` (`id`, `task_name`, `projectname`, `emp_name`, `instruction`, `status`) VALUES
(11, 'Hosting and email', 'Multipage responsive website', 'Tester hash', 'Get hosting and email set up', 'Not started');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`id` int(11) UNSIGNED NOT NULL,
`email` varchar(255) DEFAULT NULL,
`username` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`role` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`id`, `email`, `username`, `password`, `role`) VALUES
(9, '[email protected]', 'Tester hash', '$2y$10$MSJt.V09zgoVL2Yim0xMfu6RiPpRdGM4EL3EJQvg2Cvg9dQ0Wei2.', 'employee'),
(10, '[email protected]', 'Mike O Donnell', '$2y$10$BG42YUyGauM94qKUhYprYOjKWkOJGFBdPL.nMr2qeGjMpSmrQylE2', 'project_manager'),
(16, '[email protected]', 'Arny Rugge', '$2y$10$S/VficeUH1bKUrpeSYFiJeJICVsim.zrAqU26uJBYfIvNUM4ictVa', 'employee'),
(17, '[email protected]', 'Michael Itindi', '$2y$10$PquvEJIPQTguPcWRy6VbNOe4/4gvOYNAfVtcT/xDVQrwEM70NdpAm', 'project_manager'),
(18, '[email protected]', 'Neila Whelpdale', '$2y$10$MGh0aNdOKyhCRgYhT6GwLeBpPLoy6iWRxqLB6joGnqmPcVhpOcmIC', 'employee'),
(19, '[email protected]', 'Isaqo Elema', '$2y$10$AhnluHERfkeiyM3SLyi6V.5On3ulOeHftwaGH4knrAHmY/5aEogYK', 'project_manager'),
(20, '[email protected]', 'Nissy Tille', '$2y$10$wSNRYwpEo3Yx6i0VBhAS4OwWQ3IiVYbMqJEAQu1uiQM1lpBnmLf/y', 'employee'),
(21, '[email protected]', 'Ashton Concannon', '$2y$10$jOh2Sw4U/44d1HFpFjgS.eFQxVt7pmxB2ROEwGk0LXxxQFslgxVsO', 'employee'),
(22, '[email protected]', 'Nickolas Manilow', '$2y$10$/d/1gNo7MiuS8rb.kFOny.sjrn5FtLz.Ck3/JmOUYGJHfSWEeZydu', 'employee'),
(23, '[email protected]', 'Derick Macharia', '$2y$10$G5DEg76H79l7N34TCSJ8Quc/vjFnEjYN1X3Vwp1Twd49jN2.WCkUq', 'project_manager'),
(24, '[email protected]', 'Bogey Goretti', '$2y$10$3.VxUd0Eq0fBmSK7987HeOZp6ttoT3qB4Mql3jC.6agISlwxwO8xC', 'employee'),
(25, '[email protected]', 'Kath Maneylaws', '$2y$10$VdJWd701eWPz.wLtp/tQguzRk0.v6CV.ffA6N4nNc7w14KiS515JS', 'employee'),
(26, '[email protected]', 'Sutherland Grinston', '$2y$10$WN2ScV.9ulNjAzXP74jp0uTsYuvu3UscKRje3OhOdpr0DeurYwbaO', 'employee'),
(28, '[email protected]', 'Daniel James', '$2y$10$QdRF8N6T/2yJHN4bDCMkxuw9CFPIZxmOJDbIt.n4HFBWBIXu.7tJO', 'project_manager');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `projects`
--
ALTER TABLE `projects`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `project_name` (`project_name`),
ADD KEY `projects_ibfk_1` (`project_manager`);
--
-- Indexes for table `tasks`
--
ALTER TABLE `tasks`
ADD PRIMARY KEY (`id`),
ADD KEY `tasks_ibfk_2` (`projectname`),
ADD KEY `tasks_ibfk_3` (`emp_name`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `username` (`username`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `projects`
--
ALTER TABLE `projects`
MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=35;
--
-- AUTO_INCREMENT for table `tasks`
--
ALTER TABLE `tasks`
MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `projects`
--
ALTER TABLE `projects`
ADD CONSTRAINT `projects_ibfk_1` FOREIGN KEY (`project_manager`) REFERENCES `users` (`username`) ON DELETE CASCADE ON UPDATE CASCADE;
--
-- Constraints for table `tasks`
--
ALTER TABLE `tasks`
ADD CONSTRAINT `tasks_ibfk_2` FOREIGN KEY (`projectname`) REFERENCES `projects` (`project_name`) ON DELETE CASCADE ON UPDATE CASCADE,
ADD CONSTRAINT `tasks_ibfk_3` FOREIGN KEY (`emp_name`) REFERENCES `users` (`username`) ON DELETE CASCADE ON UPDATE CASCADE;
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 */;