-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtasksdb database - SQL Dump File - PhpMyAdmin Export.sql
229 lines (190 loc) · 11.1 KB
/
tasksdb database - SQL Dump File - PhpMyAdmin Export.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
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: localhost
-- Generation Time: Jul 07, 2023 at 10:01 PM
-- Server version: 8.0.28
-- PHP Version: 8.1.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: `tasksdb`
--
-- --------------------------------------------------------
--
-- Table structure for table `tblimages`
--
CREATE TABLE `tblimages` (
`id` bigint NOT NULL COMMENT 'Image ID Number - Primary Key',
`title` varchar(255) NOT NULL COMMENT 'Image Title',
`filename` varchar(30) NOT NULL COMMENT 'Image Filename',
`mimetype` varchar(255) NOT NULL COMMENT 'Image Mime Type - e.g. image/png',
`taskid` bigint NOT NULL COMMENT 'Task ID Number - Foreign Key'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Table to store task images';
--
-- Dumping data for table `tblimages`
--
INSERT INTO `tblimages` (`id`, `title`, `filename`, `mimetype`, `taskid`) VALUES
(9, 'test updating the image title', 'updated_filename.jpg', 'image/jpeg', 1),
(10, 'test image title', 'cat.jpg', 'image/jpeg', 1),
(14, 'Sweeping the floor', 'sweeping.jpg', 'image/jpeg', 8),
(15, 'Do the homework UPDATED', 'homework-UPDATED.jpg', 'image/jpeg', 8),
(16, 'Study some topics', 'study.jpg', 'image/jpeg', 7);
-- --------------------------------------------------------
--
-- Table structure for table `tblsessions`
--
CREATE TABLE `tblsessions` (
`id` bigint NOT NULL COMMENT 'Session ID',
`userid` bigint NOT NULL COMMENT 'User ID (foreign key to `id` column in `users` table)',
`accesstoken` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'Access Token',
`accesstokenexpiry` datetime NOT NULL COMMENT 'Access Token Expiry Date/Time',
`refreshtoken` varchar(100) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'Refresh Token',
`refreshtokenexpiry` datetime NOT NULL COMMENT 'Refresh Token Expiry Date/Time'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Sessions Table';
--
-- Dumping data for table `tblsessions`
--
INSERT INTO `tblsessions` (`id`, `userid`, `accesstoken`, `accesstokenexpiry`, `refreshtoken`, `refreshtokenexpiry`) VALUES
(13, 4, 'M2FhZjVhZGM0NGNiMjE0YmYxMTYzZjhkMDcwMTA3ZDI3MzFiZDYxMGUwMmFhZGNmMTY1NzU1MjI2NA==', '2022-07-11 17:31:04', 'YWMzZWFlMGUxZTdjNzZlNDIxMGYyY2FiMWZhMzhiN2YwY2IzZGZiYTExYmQ5Yj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0MTY4ODc1ODk4OQ==', '2023-07-21 22:43:09');
-- --------------------------------------------------------
--
-- Table structure for table `tbltasks`
--
CREATE TABLE `tbltasks` (
`id` bigint NOT NULL COMMENT 'Task ID - Primary Key',
`title` varchar(255) NOT NULL COMMENT 'Task Title',
`description` mediumtext COMMENT 'Task Description',
`deadline` datetime DEFAULT NULL COMMENT 'Task Deadline Date',
`completed` enum('Y','N') NOT NULL DEFAULT 'N' COMMENT 'Task Completion STATUS',
`userid` bigint NOT NULL COMMENT 'User ID of owner of task'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Tasks table';
--
-- Dumping data for table `tbltasks`
--
INSERT INTO `tbltasks` (`id`, `title`, `description`, `deadline`, `completed`, `userid`) VALUES
(1, 'New Task 1 Title updated', NULL, NULL, 'N', 4),
(2, 'Michael\'s task to cut the lawn', NULL, NULL, 'N', 4),
(3, 'John\'s task to paint the fence', NULL, NULL, 'N', 5),
(6, 'test title', NULL, NULL, 'Y', 6),
(7, 'A task title example', NULL, NULL, 'N', 6),
(8, 'A task title example', 'New Task 8 Description updated', NULL, 'Y', 6);
-- --------------------------------------------------------
--
-- Table structure for table `tblusers`
--
CREATE TABLE `tblusers` (
`id` bigint NOT NULL COMMENT 'User ID',
`fullname` varchar(255) NOT NULL COMMENT 'Users Full Name',
`username` varchar(255) NOT NULL COMMENT 'Users Username',
`password` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL COMMENT 'Users Password',
`useractive` enum('Y','N') NOT NULL DEFAULT 'Y' COMMENT 'Is User Active',
`loginattempts` int NOT NULL DEFAULT '0' COMMENT 'Attempts to login'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Users Table';
--
-- Dumping data for table `tblusers`
--
INSERT INTO `tblusers` (`id`, `fullname`, `username`, `password`, `useractive`, `loginattempts`) VALUES
(4, 'Michael Jones', 'michael', '$2y$10$GAqE6GuAJECSlSZB/Y7Y0uBVnxtIoleZky0uiJ5UtaksHOKXDegCC', 'Y', 0),
(5, 'John Smith', 'john', '$2y$10$LenFpsHEdlX3BvYVM3aVkO7zzirRZgTagwPs0WEhGwDXjCZtQzspm', 'Y', 0),
(6, 'Ahmed Yahya', 'Ahmed', '$2y$10$7tB2RomsZ7CnzZAEbRkdd.EDVKnL9edOrisIlY90MMvTyDO0LRlSe', 'Y', 0);
--
-- Indexes for dumped tables
--
--
-- Indexes for table `tblimages`
--
ALTER TABLE `tblimages`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `filenamefortaskid` (`taskid`,`filename`);
--
-- Indexes for table `tblsessions`
--
ALTER TABLE `tblsessions`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `accesstoken` (`accesstoken`),
ADD UNIQUE KEY `refreshtoken` (`refreshtoken`),
ADD KEY `sessionuserid_fk` (`userid`);
--
-- Indexes for table `tbltasks`
--
ALTER TABLE `tbltasks`
ADD PRIMARY KEY (`id`),
ADD KEY `taskuserid_fk` (`userid`);
--
-- Indexes for table `tblusers`
--
ALTER TABLE `tblusers`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `username` (`username`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `tblimages`
--
ALTER TABLE `tblimages`
MODIFY `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'Image ID Number - Primary Key', AUTO_INCREMENT=18;
--
-- AUTO_INCREMENT for table `tblsessions`
--
ALTER TABLE `tblsessions`
MODIFY `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'Session ID', AUTO_INCREMENT=36;
--
-- AUTO_INCREMENT for table `tbltasks`
--
ALTER TABLE `tbltasks`
MODIFY `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'Task ID - Primary Key', AUTO_INCREMENT=9;
--
-- AUTO_INCREMENT for table `tblusers`
--
ALTER TABLE `tblusers`
MODIFY `id` bigint NOT NULL AUTO_INCREMENT COMMENT 'User ID', AUTO_INCREMENT=7;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `tblimages`
--
ALTER TABLE `tblimages`
ADD CONSTRAINT `imagetaskid_fk` FOREIGN KEY (`taskid`) REFERENCES `tbltasks` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `tblsessions`
--
ALTER TABLE `tblsessions`
ADD CONSTRAINT `sessionuserid_fk` FOREIGN KEY (`userid`) REFERENCES `tblusers` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;
--
-- Constraints for table `tbltasks`
--
ALTER TABLE `tbltasks`
ADD CONSTRAINT `taskuserid_fk` FOREIGN KEY (`userid`) REFERENCES `tblusers` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT;
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 */;