-
Notifications
You must be signed in to change notification settings - Fork 30
/
infinitoadmin1.sql
285 lines (236 loc) · 9.05 KB
/
infinitoadmin1.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
-- phpMyAdmin SQL Dump
-- version 4.9.0.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Oct 06, 2019 at 07:24 PM
-- Server version: 10.4.6-MariaDB
-- PHP Version: 7.3.9
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: `infinitoadmin1`
--
-- --------------------------------------------------------
--
-- Table structure for table `announcements`
--
-- CREATE TABLE `announcements` (
-- `Id` int(11) NOT NULL,
-- `Title` varchar(50) DEFAULT NULL,
-- `Description` varchar(500) DEFAULT NULL,
-- `Date` timestamp NOT NULL DEFAULT current_timestamp(),
-- `FacebookUrl` varchar(500) DEFAULT NULL,
-- `InstaUrl` varchar(500) DEFAULT NULL,
-- `ImgAddress` varchar(500) DEFAULT NULL
-- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --
-- -- Dumping data for table `announcements`
-- --
-- INSERT INTO `announcements` (`Id`, `Title`, `Description`, `Date`, `FacebookUrl`, `InstaUrl`, `ImgAddress`) VALUES
-- (1, 'sdadadas', 'asdas', '2019-07-01 16:46:25', NULL, NULL, './img101.png'),
-- (2, 'HELLO', 'BYE', '2019-07-01 17:00:00', NULL, NULL, './img102.png'),
-- (3, NULL, 'sadfalsflk', '2019-07-01 17:11:00', NULL, NULL, './img103.png'),
-- (4, 'anc', 'cdb', '2019-07-01 17:12:16', NULL, NULL, NULL),
-- (5, 'infinito start', 'end', '2019-07-01 17:16:20', NULL, NULL, NULL),
-- (8, 'ab', 'cd', '2019-07-01 19:59:02', NULL, NULL, NULL),
-- (10, 'abcd', 'bacd', '2019-07-01 20:04:57', NULL, NULL, NULL),
-- (11, 'acbd', NULL, '2020-12-21 20:05:39', 'https://www.facebook.com/InfinitoIITPatna/photos/pb.538415856525272.-2207520000../1280715218961995/?type=3&theater', NULL, './images/blog/image1.jpeg'),
-- (12, 'goo', NULL, '2020-11-26 21:08:59','https://www.facebook.com/InfinitoIITPatna/photos/pb.538415856525272.-2207520000../1262553470778170/?type=3&theater', NULL, './images/blog/image2.jpeg'),
-- (13, 'as', NULL, '2020-11-19 21:35:59', 'https://www.facebook.com/InfinitoIITPatna/photos/pb.538415856525272.-2207520000../1257965257903658/?type=3&theater', NULL, './images/blog/image3.jpeg');
-- -- --------------------------------------------------------
-- --
-- -- Table structure for table `athletics`
-- --
-- CREATE TABLE `athletics` (
-- `Id` int(11) NOT NULL,
-- `RaceName` varchar(200) NOT NULL,
-- `Winner` varchar(200) NOT NULL,
-- `FirstRunnerUp` varchar(200) NOT NULL,
-- `SecondRunnerUp` varchar(200) NOT NULL,
-- `date` timestamp NOT NULL DEFAULT current_timestamp()
-- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --
-- -- Dumping data for table `athletics`
-- --
-- INSERT INTO `athletics` (`Id`, `RaceName`, `Winner`, `FirstRunnerUp`, `SecondRunnerUp`, `date`) VALUES
-- (3, '100M Boys', 'IIT Patna', 'NIT Patna', 'IIT BHU', '2019-10-06 17:07:25');
-- -- --------------------------------------------------------
-- TODO: Check if participants table is needed.
CREATE TABLE `participant`(
`infid` varchar(8) NOT NULL,
`NAME` varchar(20) NOT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- Participant Table
CREATE TABLE `participant`{
`Serial Number` INT(11) NOT NULL AUTO_INCREMENT,
`InfId` varchar(8) NOT NULL,
`Name` varchar(40) NOT NULL,
`Email` varchar(50) NOT NULL,
`Password` varchar(255) NOT NULL,
`College` varchar(50) NOT NULL,
`ID` varchar(50) NOT NULL,
`Phone Number` varchar(10) NOT NULL,
`Gender` varchar(10) NOT NULL,
`dt` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP
} ENGINE=InnoDB DEFAULT CHARSET=latin1;
---Team Table
CREATE TABLE `teamtable` (
`grpno` int(20) NOT NULL,
`p1` varchar(5) NOT NULL,
`p2` varchar(5) NOT NULL,
`p3` varchar(5) NOT NULL,
`p4` varchar(5) NOT NULL,
`p5` varchar(5) NOT NULL,
`game` int(2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
----Game Table
CREATE TABLE `gametable` (
`id` varchar(8) NOT NULL,
`g1` int(1) NOT NULL,
`g2` int(1) NOT NULL,
`g3` int(1) NOT NULL,
`g4` int(1) NOT NULL,
)ENGINE=InnoDB DEFAULT CHARSET=latin1;
INSERT INTO `participant` (`infid`,`name`) VALUES
('inf3001','A'),
('inf3051','B');
--
-- Table structure for table `participants`
--
-- CREATE TABLE `participants` (
-- `Id` int(20) NOT NULL,
-- `Name` varchar(100) NOT NULL,
-- `College` varchar(100) NOT NULL,
-- `isCaptain` tinyint(1) DEFAULT 0,
-- `InfCode` varchar(10) NOT NULL,
-- `Email` varchar(50) DEFAULT NULL,
-- `isConfirmed` int(2) DEFAULT NULL,
-- `Phone` varchar(50) NOT NULL,
-- `Gender` varchar(6) NOT NULL,
-- `CollegeId` varchar(200) NOT NULL
-- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --
-- -- Dumping data for table `participants`
-- --
-- INSERT INTO `participants` (`Id`, `Name`, `College`, `isCaptain`, `InfCode`, `Email`, `isConfirmed`, `Phone`, `Gender`, `CollegeId`) VALUES
-- (48, 'A', 'IIT Patna', 0, 'INF_3001', '[email protected]', NULL, '194932148012', 'Male', ''),
-- (49, 'B', 'IIT Patna', 0, 'INF_3049', '[email protected]', NULL, '93048124034', 'Male', ''),
-- (50, 'Prem', 'IIT Patna', 1, 'INF_3050', '[email protected]', NULL, '91293491234', 'Male', ''),
-- (51, 'Kamal Choudhury', 'IIT Patna', 0, 'INF_3051', '[email protected]', NULL, '741923841072943`', 'Male', ''),
-- (53, 'Subhnag', 'IIT Patna', 0, 'INF_3052', '[email protected]', NULL, '872431908234', 'Male', ''),
-- (54, 'Bilal', 'NIT Patna', 1, 'INF_3054', '[email protected]', NULL, '8723948109', 'Male', ''),
-- (55, 'Umar', 'IIT MADRAS', 0, 'INF_3055', '[email protected]', NULL, '87231947', 'Male', ''),
-- (56, 'Bhumika', 'NIT PATNA', 1, 'INF_3056', '[email protected]', NULL, '781209437102', 'Female', ''),
-- (57, 'Garima', 'IIT M', 0, 'INF_3057', '[email protected]', NULL, '871243932', 'Female', ''),
-- (58, 'Yashika', 'Dav', 1, 'INF_3058', '[email protected]', NULL, '637373838', 'Female', ''),
-- (59, 'Hamid', 'MIT Bhopal', 0, 'INF_3059', '[email protected]', NULL, '8741091', 'Male', 'MITL');
-- -- --------------------------------------------------------
-- --
-- -- Table structure for table `registered`
-- --
-- CREATE TABLE `registered` (
-- `Id` int(11) NOT NULL,
-- `Sport` varchar(30) NOT NULL,
-- `InfCode` varchar(30) NOT NULL,
-- `Aux` varchar(20) DEFAULT NULL
-- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --
-- -- Dumping data for table `registered`
-- --
-- INSERT INTO `registered` (`Id`, `Sport`, `InfCode`, `Aux`) VALUES
-- (5, 'athletics', 'INF_3049', 'Boys 100m'),
-- (6, 'athletics', 'INF_3001', 'Boys 100m'),
-- (7, 'athletics', 'INF_3049', 'Boys 100m'),
-- (8, 'athletics', 'INF_3001', 'Boys 100m'),
-- (21, 'athletics', 'INF_3058', 'Girls 1500m'),
-- (22, 'tabletennis', 'INF_3050', 'basketball'),
-- (23, 'tabletennis', 'INF_3051', 'basketball'),
-- (24, 'tabletennis', 'INF_3054', 'football'),
-- (25, 'tabletennis', 'INF_3055', 'football'),
-- (26, 'cricket', 'INF_3058', ''),
-- (27, 'cricket', 'INF_3057', ''),
-- (28, 'basketball', 'INF_3056', 'Male');
-- -- --------------------------------------------------------
-- --
-- -- Table structure for table `scores`
-- --
-- CREATE TABLE `scores` (
-- `Id` int(11) NOT NULL,
-- `Game` varchar(20) DEFAULT NULL,
-- `Team_1` varchar(50) DEFAULT NULL,
-- `Team_2` varchar(50) DEFAULT NULL,
-- `Score` varchar(40) DEFAULT NULL,
-- `Winner` varchar(50) NOT NULL,
-- `Time` timestamp NOT NULL DEFAULT current_timestamp()
-- ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --
-- -- Indexes for dumped tables
-- --
-- --
-- -- Indexes for table `announcements`
-- --
-- ALTER TABLE `announcements`
-- ADD PRIMARY KEY (`Id`);
-- --
-- -- Indexes for table `athletics`
-- --
-- ALTER TABLE `athletics`
-- ADD PRIMARY KEY (`Id`);
-- --
-- -- Indexes for table `participants`
-- --
-- ALTER TABLE `participants`
-- ADD PRIMARY KEY (`Id`);
-- --
-- -- Indexes for table `registered`
-- --
-- ALTER TABLE `registered`
-- ADD PRIMARY KEY (`Id`);
-- --
-- -- Indexes for table `scores`
-- --
-- ALTER TABLE `scores`
-- ADD KEY `In` (`Id`);
ALTER TABLE `teamtable`
ADD PRIMARY KEY (`grpno`);
ALTER TABLE `participant`
ADD PRIMARY KEY (`infid`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `announcements`
--
-- ALTER TABLE `announcements`
-- MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
-- --
-- -- AUTO_INCREMENT for table `athletics`
-- --
-- ALTER TABLE `athletics`
-- MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
-- --
-- -- AUTO_INCREMENT for table `participants`
-- --
-- ALTER TABLE `participants`
-- MODIFY `Id` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=60;
-- --
-- -- AUTO_INCREMENT for table `registered`
-- --
-- ALTER TABLE `registered`
-- MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;
-- --
-- -- AUTO_INCREMENT for table `scores`
-- --
-- ALTER TABLE `scores`
-- MODIFY `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 */;