-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathf2o.sql
More file actions
458 lines (389 loc) · 13.9 KB
/
f2o.sql
File metadata and controls
458 lines (389 loc) · 13.9 KB
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
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Aug 07, 2017 at 08:50 PM
-- Server version: 10.1.24-MariaDB
-- PHP Version: 7.1.6
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: `f2o`
--
CREATE DATABASE IF NOT EXISTS `f2o` DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_520_ci;
USE `f2o`;
-- --------------------------------------------------------
--
-- Table structure for table `accounts`
--
CREATE TABLE `accounts` (
`uid` int(255) NOT NULL,
`email` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL,
`password` char(76) COLLATE utf8_unicode_520_ci NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL,
`title` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL,
`bio` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL,
`photo` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL DEFAULT 'user-default.png',
`cover` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL DEFAULT 'default-card-up.png',
`code` varchar(4) COLLATE utf8_unicode_520_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_520_ci;
--
-- RELATIONSHIPS FOR TABLE `accounts`:
--
--
-- Dumping data for table `accounts`
--
INSERT INTO `accounts` (`uid`, `email`, `password`, `name`, `title`, `bio`, `photo`, `cover`, `code`) VALUES
(1, '[email protected]', '$2y$10$Qf/CwhVreXlvWoLNV3hGJOapwehxrM1DkzoE9ZoEyat6lOreh/WF2', 'Demo', '', '', 'user-default.png', 'default-card-up.png', ''),
(2, '[email protected]', '$2y$10$wPFU79D64GjyCS0Ll9rwHuDraMJ52.fDjtoA1U54x2XTcn/zex5e.', 'Jonathan Soh', 'Programmer', 'Skydiver, tattoo addict, band member, Swiss design-head and New School grad. Working at the intersection of design and purpose to craft an inspiring, compelling and authentic brand narrative. I\'m fueled by craft beer, hip-hop and tortilla chips.', 'profile-2.jpg', 'cover-2.jpg', ''),
(3, '[email protected]', '$2y$10$sMSQ6lRF73zZfqCWIOhRs.wNRsmI.Ri/n1KxKqdSY0eiAc7YCoRXO', 'Mark Zuckerberg', 'Founder of Facebook', 'Born on May 14, 1984, in White Plains, New York, Mark Zuckerberg co-founded the social-networking website Facebook out of his college dorm room.', 'profile-3.jpg', 'cover-3.jpg', ''),
(4, '[email protected]', '$2y$10$yvTCM66tEvsnbYeCCIgH7Ol8DOlBHA0Pl0Km4YnmUMrrg0OGM6tCq', 'Bill Gates', 'Founder of Microsoft', 'Entrepreneur Bill Gates founded the world\'s largest software business, Microsoft, with Paul Allen, and subsequently became one of the richest men in the world.', 'profile-4.jpg', 'cover-4.png', ''),
(5, '[email protected]', '$2y$10$FfRb80dyPvfHVizHYct7Pe7CB1bCojuklmm3T9T4fZfsjReUwR3pW', 'Rob Janoff', 'Designer', 'Janoff designed the forgotten coloured stripes Apple logo. A testament to its simplicity and longevity (and it was created in only two weeks).', 'profile-5.jpg', 'cover-5.png', ''),
(6, '[email protected]', '$2y$10$sXEj2eGAPsAoQDwNOCkpHezPhw/J68k.g2lRteEb9yxSK2R6tG5IS', 'Joel', 'Full-Stack Developer', 'I am a Freelance Full-Stack Developer. I have been in the field since 2012 and I am armed with a broad range of expertise skills. I am capable of setting up a professional website, graphic designing, and programming. Within my leisure time, I enjoy design', 'profile-6.jpg', 'cover-6.png', '');
-- --------------------------------------------------------
--
-- Table structure for table `educations`
--
CREATE TABLE `educations` (
`uid` int(255) NOT NULL,
`acc_uid` int(255) NOT NULL,
`school` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL,
`degree` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL,
`field` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL,
`start_date` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL,
`end_date` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_520_ci;
--
-- RELATIONSHIPS FOR TABLE `educations`:
-- `acc_uid`
-- `accounts` -> `uid`
--
--
-- Dumping data for table `educations`
--
INSERT INTO `educations` (`uid`, `acc_uid`, `school`, `degree`, `field`, `start_date`, `end_date`) VALUES
(1, 2, 'ITE College Central', 'Higher Nitec', 'Information Technology', '2015-07-15', '2017-06-08'),
(2, 3, 'Harvard', 'Diploma', 'Information Technology', '2014-08-01', '2015-08-01'),
(3, 6, 'Nanyang Polytechnic', 'Diploma', 'Business Informatics', '2017-04-01', 'Present');
-- --------------------------------------------------------
--
-- Table structure for table `experiences`
--
CREATE TABLE `experiences` (
`uid` int(255) NOT NULL,
`acc_uid` int(255) NOT NULL,
`company` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL,
`title` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL,
`start_date` date NOT NULL,
`end_date` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_520_ci;
--
-- RELATIONSHIPS FOR TABLE `experiences`:
-- `acc_uid`
-- `accounts` -> `uid`
--
--
-- Dumping data for table `experiences`
--
INSERT INTO `experiences` (`uid`, `acc_uid`, `company`, `title`, `start_date`, `end_date`) VALUES
(1, 2, 'IBM', 'Elite Programmer', '2014-07-10', 'Present'),
(2, 3, 'Facebook', 'Co-Founder', '2014-08-21', 'Present'),
(3, 4, 'Microsoft', 'Founder', '2012-08-01', 'Present'),
(4, 6, 'J.Design', 'Founder', '2012-08-01', 'Present'),
(5, 6, 'F2O', 'Founder', '2017-06-01', 'Present');
-- --------------------------------------------------------
--
-- Table structure for table `messages`
--
CREATE TABLE `messages` (
`uid` int(255) NOT NULL,
`acc_uid` int(255) NOT NULL,
`name` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL,
`email` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL,
`subject` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL,
`message` varchar(2000) COLLATE utf8_unicode_520_ci NOT NULL,
`status` varchar(10) COLLATE utf8_unicode_520_ci NOT NULL DEFAULT 'new'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_520_ci;
--
-- RELATIONSHIPS FOR TABLE `messages`:
-- `acc_uid`
-- `accounts` -> `uid`
--
--
-- Dumping data for table `messages`
--
INSERT INTO `messages` (`uid`, `acc_uid`, `name`, `email`, `subject`, `message`, `status`) VALUES
(1, 6, 'Test', '[email protected]', 'Test Contact User Form', 'Testing if the contact user form is working', ''),
(2, 6, 'Jon', '[email protected]', 'Test Contact User Form Again', 'Once again I am testing if the contact user form is working as intended', 'new'),
(3, 6, 'Test Company', '[email protected]', 'Testing Contact User Form 3', 'Testing contact user form again, this is the third test.', 'new');
-- --------------------------------------------------------
--
-- Table structure for table `skill_types`
--
CREATE TABLE `skill_types` (
`uid` int(255) NOT NULL,
`type` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL,
`select_icon` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL,
`icon` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_520_ci;
--
-- RELATIONSHIPS FOR TABLE `skill_types`:
--
--
-- Dumping data for table `skill_types`
--
INSERT INTO `skill_types` (`uid`, `type`, `select_icon`, `icon`) VALUES
(1, 'Code', 'code.png', 'fa-code'),
(2, 'Design', 'design.png', 'fa-paint-brush'),
(3, 'Development', 'development.png', 'fa-cogs'),
(4, 'Writing', 'writing.png', 'fa-pencil');
-- --------------------------------------------------------
--
-- Table structure for table `skills`
--
CREATE TABLE `skills` (
`uid` int(255) NOT NULL,
`acc_uid` int(255) NOT NULL,
`skill` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL,
`type` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_520_ci;
--
-- RELATIONSHIPS FOR TABLE `skills`:
-- `acc_uid`
-- `accounts` -> `uid`
-- `type`
-- `skill_types` -> `type`
--
--
-- Dumping data for table `skills`
--
INSERT INTO `skills` (`uid`, `acc_uid`, `skill`, `type`) VALUES
(1, 2, 'Java', 'Code'),
(2, 2, 'Objective-C', 'Code'),
(3, 2, 'C#', 'Code'),
(4, 2, 'Javascript', 'Code'),
(5, 3, 'Javascript', 'Code'),
(6, 3, 'Social Site Development', 'Development'),
(7, 3, 'Web Design', 'Design'),
(8, 4, 'Operating System Development', 'Development'),
(9, 4, 'Shell Script', 'Code'),
(10, 5, 'Graphic Design', 'Design'),
(11, 6, 'Java', 'Code'),
(12, 6, 'Adobe Photoshop', 'Design'),
(13, 6, 'Adobe Illustrator', 'Design'),
(14, 6, 'Content Writing', 'Writing'),
(15, 6, 'Javascript', 'Code'),
(16, 6, 'Objective-C', 'Code'),
(17, 6, 'C#', 'Code'),
(18, 6, 'Python', 'Code'),
(19, 6, 'Website Development', 'Development'),
(20, 6, 'jQuery', 'Code'),
(21, 6, 'Ajax', 'Code');
-- --------------------------------------------------------
--
-- Table structure for table `social_types`
--
CREATE TABLE `social_types` (
`uid` int(255) NOT NULL,
`type` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_520_ci;
--
-- RELATIONSHIPS FOR TABLE `social_types`:
--
--
-- Dumping data for table `social_types`
--
INSERT INTO `social_types` (`uid`, `type`) VALUES
(1, 'Behance'),
(2, 'BitBucket'),
(3, 'DeviantArt'),
(4, 'Dribbble'),
(5, 'Email'),
(6, 'Etsy'),
(7, 'Facebook'),
(8, 'Flickr'),
(9, 'GitHub'),
(10, 'Google+'),
(11, 'Instagram'),
(12, 'Linkedin'),
(13, 'Pinterest'),
(14, 'Skype'),
(15, 'Snapchat'),
(16, 'SoundCloud'),
(17, 'Telegram'),
(18, 'Tumblr'),
(19, 'Twitter'),
(20, 'Website'),
(21, 'WhatsApp'),
(22, 'YouTube');
-- --------------------------------------------------------
--
-- Table structure for table `socials`
--
CREATE TABLE `socials` (
`uid` int(255) NOT NULL,
`acc_uid` int(255) NOT NULL,
`url` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL,
`type` varchar(255) COLLATE utf8_unicode_520_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_520_ci;
--
-- RELATIONSHIPS FOR TABLE `socials`:
-- `acc_uid`
-- `accounts` -> `uid`
-- `type`
-- `social_types` -> `type`
--
--
-- Dumping data for table `socials`
--
INSERT INTO `socials` (`uid`, `acc_uid`, `url`, `type`) VALUES
(1, 2, 'jon', 'BitBucket'),
(2, 2, 'jon', 'GitHub'),
(3, 2, '[email protected]', 'Email'),
(4, 3, 'zuck', 'Facebook'),
(5, 4, 'BillGates', 'Facebook'),
(6, 4, 'williamhgates', 'Linkedin'),
(7, 5, 'robjanoff', 'Twitter'),
(8, 5, 'rob.janoff.75', 'Facebook'),
(9, 6, 'Joel.Lifes', 'Facebook'),
(10, 6, 'jdesignera', 'Linkedin'),
(11, 6, 'tgm.joel', 'Skype'),
(12, 6, '[email protected]', 'Email'),
(13, 6, 'https://jdesignera.com', 'Website');
--
-- Indexes for dumped tables
--
--
-- Indexes for table `accounts`
--
ALTER TABLE `accounts`
ADD PRIMARY KEY (`uid`),
ADD UNIQUE KEY `email` (`email`);
--
-- Indexes for table `educations`
--
ALTER TABLE `educations`
ADD PRIMARY KEY (`uid`),
ADD KEY `acc_uid` (`acc_uid`);
--
-- Indexes for table `experiences`
--
ALTER TABLE `experiences`
ADD PRIMARY KEY (`uid`),
ADD KEY `acc_uid` (`acc_uid`);
--
-- Indexes for table `messages`
--
ALTER TABLE `messages`
ADD PRIMARY KEY (`uid`),
ADD KEY `acc_uid` (`acc_uid`);
--
-- Indexes for table `skill_types`
--
ALTER TABLE `skill_types`
ADD PRIMARY KEY (`uid`),
ADD KEY `type` (`type`);
--
-- Indexes for table `skills`
--
ALTER TABLE `skills`
ADD PRIMARY KEY (`uid`),
ADD KEY `acc_uid` (`acc_uid`),
ADD KEY `type` (`type`);
--
-- Indexes for table `social_types`
--
ALTER TABLE `social_types`
ADD PRIMARY KEY (`uid`),
ADD KEY `type` (`type`);
--
-- Indexes for table `socials`
--
ALTER TABLE `socials`
ADD PRIMARY KEY (`uid`),
ADD KEY `uid` (`acc_uid`),
ADD KEY `type` (`type`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `accounts`
--
ALTER TABLE `accounts`
MODIFY `uid` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `educations`
--
ALTER TABLE `educations`
MODIFY `uid` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `experiences`
--
ALTER TABLE `experiences`
MODIFY `uid` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
--
-- AUTO_INCREMENT for table `messages`
--
ALTER TABLE `messages`
MODIFY `uid` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `skill_types`
--
ALTER TABLE `skill_types`
MODIFY `uid` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `skills`
--
ALTER TABLE `skills`
MODIFY `uid` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;
--
-- AUTO_INCREMENT for table `social_types`
--
ALTER TABLE `social_types`
MODIFY `uid` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;
--
-- AUTO_INCREMENT for table `socials`
--
ALTER TABLE `socials`
MODIFY `uid` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `educations`
--
ALTER TABLE `educations`
ADD CONSTRAINT `educations_ibfk_1` FOREIGN KEY (`acc_uid`) REFERENCES `accounts` (`uid`);
--
-- Constraints for table `experiences`
--
ALTER TABLE `experiences`
ADD CONSTRAINT `experiences_ibfk_1` FOREIGN KEY (`acc_uid`) REFERENCES `accounts` (`uid`);
--
-- Constraints for table `messages`
--
ALTER TABLE `messages`
ADD CONSTRAINT `messages_ibfk_1` FOREIGN KEY (`acc_uid`) REFERENCES `accounts` (`uid`);
--
-- Constraints for table `skills`
--
ALTER TABLE `skills`
ADD CONSTRAINT `skills_ibfk_1` FOREIGN KEY (`acc_uid`) REFERENCES `accounts` (`uid`),
ADD CONSTRAINT `skills_ibfk_2` FOREIGN KEY (`type`) REFERENCES `skill_types` (`type`);
--
-- Constraints for table `socials`
--
ALTER TABLE `socials`
ADD CONSTRAINT `socials_ibfk_1` FOREIGN KEY (`acc_uid`) REFERENCES `accounts` (`uid`),
ADD CONSTRAINT `socials_ibfk_2` FOREIGN KEY (`type`) REFERENCES `social_types` (`type`);
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 */;