-
Notifications
You must be signed in to change notification settings - Fork 8
/
elite_classroom.sql
308 lines (249 loc) · 8.79 KB
/
elite_classroom.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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1:3306
-- Generation Time: Sep 29, 2022 at 05:22 AM
-- Server version: 10.5.12-MariaDB-cll-lve
-- PHP Version: 7.2.34
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: `u298279946_elite_classroo`
--
-- --------------------------------------------------------
--
-- Table structure for table `classes`
--
CREATE TABLE `classes` (
`user_id` int(11) NOT NULL,
`class_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
`joined_on` datetime NOT NULL DEFAULT current_timestamp(),
`class_name` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `classes`
--
INSERT INTO `classes` (`user_id`, `class_code`, `joined_on`, `class_name`) VALUES
(2, '528', '2021-02-04 06:08:36', 'DAA'),
(2, '525', '2021-02-04 06:08:45', 'Soft Skills'),
(2, '123', '2021-02-04 06:08:56', 'Maths'),
(1, '123', '2021-02-04 06:09:22', 'Maths'),
(1, '525', '2021-02-04 06:09:31', 'Soft Skills');
-- --------------------------------------------------------
--
-- Table structure for table `classroom`
--
CREATE TABLE `classroom` (
`class_code` varchar(30) NOT NULL,
`class_name` varchar(255) NOT NULL,
`prof_id` int(11) NOT NULL,
`created_on` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `classroom`
--
INSERT INTO `classroom` (`class_code`, `class_name`, `prof_id`, `created_on`) VALUES
('123', 'Maths', 123, '2021-02-03 15:38:36'),
('525', 'Soft Skills', 123, '2021-02-03 19:41:36'),
('528', 'DAA', 123, '2021-02-03 19:42:06');
-- --------------------------------------------------------
--
-- Table structure for table `class_works`
--
CREATE TABLE `class_works` (
`work_id` int(11) NOT NULL,
`class_code` varchar(255) NOT NULL,
`title` text NOT NULL,
`description` text NOT NULL,
`type` int(11) NOT NULL,
`attachment` varchar(255) NOT NULL,
`created_date` datetime NOT NULL DEFAULT current_timestamp(),
`due_date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `current_schedule`
--
CREATE TABLE `current_schedule` (
`week_no` int(11) NOT NULL,
`sun` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`mon` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`tue` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`wed` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`thu` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`fri` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`sat` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`class_code` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
`description` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT '',
`class_link` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`last_modified_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `current_schedule`
--
INSERT INTO `current_schedule` (`week_no`, `sun`, `mon`, `tue`, `wed`, `thu`, `fri`, `sat`, `class_code`, `description`, `class_link`, `last_modified_on`) VALUES
(7, '7:30PM 5:30PM', '10:30 AM', '', '', '', '', '', '525', '', '', '2021-02-24 07:19:53'),
(8, '5:30 PM', '', '', '', '', '', '', '528', '', '', '2021-02-24 07:19:53'),
(7, '', '9:00 AM', '', '', '', '', '', '528', '', '', '2021-02-24 07:19:53'),
(7, '9:00 AM', '', '', '', '', '', '', '528', '', '', '2021-02-24 07:19:53'),
(8, '10:00 AM', '', '', '', '', '', '', '528', '', '', '2021-02-24 07:19:53'),
(8, '', '', '', '', '3:00 PM', '', '', '525', '', '', '2021-02-24 07:19:53'),
(8, '', '', '', '', '5:00 PM', '', '', '525', '', '', '2021-02-24 07:19:53'),
(8, '', '', '', '', '5:00 PM', '', '', '525', '', '', '2021-02-24 07:19:53');
-- --------------------------------------------------------
--
-- Table structure for table `main_schedule`
--
CREATE TABLE `main_schedule` (
`schedule_id` int(255) NOT NULL,
`sun` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`mon` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`tue` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`wed` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`thu` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`fri` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`sat` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '',
`class_code` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
`created_on` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
--
-- Dumping data for table `main_schedule`
--
INSERT INTO `main_schedule` (`schedule_id`, `sun`, `mon`, `tue`, `wed`, `thu`, `fri`, `sat`, `class_code`, `created_on`) VALUES
(1, '', '12:00 PM', '9:00 AM', '9:00 AM', '', '', '', '525', '2021-02-07 13:26:10'),
(2, '', '', '', '', '10:30 AM', '10:30 AM', '10:30 AM', '528', '2021-02-23 11:58:18');
-- --------------------------------------------------------
--
-- Table structure for table `notes`
--
CREATE TABLE `notes` (
`notes_id` int(11) NOT NULL,
`class_code` varchar(30) NOT NULL,
`attachment_id` varchar(255) NOT NULL,
`posted_on` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
-- --------------------------------------------------------
--
-- Table structure for table `prof`
--
CREATE TABLE `prof` (
`prof_id` int(11) NOT NULL,
`email` varchar(255) NOT NULL,
`password` varchar(255) NOT NULL,
`timestamp` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `prof`
--
INSERT INTO `prof` (`prof_id`, `email`, `password`, `timestamp`) VALUES
(123, '[email protected]', 'abcd', '2021-02-03 15:33:38');
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE `users` (
`user_id` int(11) NOT NULL,
`email` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`google_token` varchar(255) NOT NULL,
`timestamp` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Dumping data for table `users`
--
INSERT INTO `users` (`user_id`, `email`, `name`, `google_token`, `timestamp`) VALUES
(1, '[email protected]', 'Abhishek', '123456', '2021-02-03 06:29:43'),
(2, '[email protected]', 'Bhavya', '2019UGCS102', '2021-02-03 19:48:45');
-- --------------------------------------------------------
--
-- Table structure for table `work_submission`
--
CREATE TABLE `work_submission` (
`submission_id` int(11) NOT NULL,
`user_id` int(11) NOT NULL,
`work_id` int(11) NOT NULL,
`work` text NOT NULL,
`attachment` varchar(255) NOT NULL,
`submitted_on` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `classroom`
--
ALTER TABLE `classroom`
ADD PRIMARY KEY (`class_code`);
--
-- Indexes for table `class_works`
--
ALTER TABLE `class_works`
ADD PRIMARY KEY (`work_id`);
--
-- Indexes for table `main_schedule`
--
ALTER TABLE `main_schedule`
ADD PRIMARY KEY (`schedule_id`);
--
-- Indexes for table `notes`
--
ALTER TABLE `notes`
ADD PRIMARY KEY (`notes_id`);
--
-- Indexes for table `prof`
--
ALTER TABLE `prof`
ADD PRIMARY KEY (`prof_id`);
--
-- Indexes for table `users`
--
ALTER TABLE `users`
ADD PRIMARY KEY (`user_id`);
--
-- Indexes for table `work_submission`
--
ALTER TABLE `work_submission`
ADD PRIMARY KEY (`submission_id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `class_works`
--
ALTER TABLE `class_works`
MODIFY `work_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `main_schedule`
--
ALTER TABLE `main_schedule`
MODIFY `schedule_id` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `notes`
--
ALTER TABLE `notes`
MODIFY `notes_id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `prof`
--
ALTER TABLE `prof`
MODIFY `prof_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=124;
--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `work_submission`
--
ALTER TABLE `work_submission`
MODIFY `submission_id` int(11) NOT NULL AUTO_INCREMENT;
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 */;