-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgru_h1_hivemind.sql
119 lines (96 loc) · 3.26 KB
/
gru_h1_hivemind.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
-- phpMyAdmin SQL Dump
-- version 4.0.8
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Oct 21, 2014 at 11:37 PM
-- Server version: 5.6.14-log
-- PHP Version: 5.4.14
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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 utf8 */;
--
-- Database: `gru_h1_hivemind`
--
-- --------------------------------------------------------
--
-- Table structure for table `accounts`
--
CREATE TABLE IF NOT EXISTS `accounts` (
`accountID` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`password` char(64) COLLATE utf8_unicode_ci NOT NULL,
`salt` char(16) COLLATE utf8_unicode_ci NOT NULL,
`status` varchar(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'brood',
`confirmed` tinyint(1) NOT NULL DEFAULT '0',
`confirm_key` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`accountID`),
UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=240 ;
-- --------------------------------------------------------
--
-- Table structure for table `friends`
--
CREATE TABLE IF NOT EXISTS `friends` (
`accountID` int(11) NOT NULL,
`friends` text,
PRIMARY KEY (`accountID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `profile`
--
CREATE TABLE IF NOT EXISTS `profile` (
`alias` text,
`bio` text,
`joinDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`accountID` int(11) NOT NULL,
PRIMARY KEY (`accountID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `reports`
--
CREATE TABLE IF NOT EXISTS `reports` (
`reportID` int(11) NOT NULL AUTO_INCREMENT,
`submitter` int(11) NOT NULL,
`postID` int(11) NOT NULL,
`reason` varchar(100) NOT NULL,
`details` varchar(255) DEFAULT NULL,
PRIMARY KEY (`reportID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=2 ;
-- --------------------------------------------------------
--
-- Table structure for table `threads`
--
CREATE TABLE IF NOT EXISTS `threads` (
`board` varchar(30) NOT NULL DEFAULT 'b',
`threadID` int(11) NOT NULL,
`accountID` int(75) NOT NULL,
`postID` int(11) NOT NULL AUTO_INCREMENT,
`postIndex` int(11) NOT NULL,
`comment` text,
`image` varchar(255) DEFAULT NULL,
`postDate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`postID`),
KEY `accountID` (`accountID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=283 ;
--
-- Constraints for dumped tables
--
--
-- Constraints for table `friends`
--
ALTER TABLE `friends`
ADD CONSTRAINT `friends_ibfk_1` FOREIGN KEY (`accountID`) REFERENCES `accounts` (`accountID`);
--
-- Constraints for table `profile`
--
ALTER TABLE `profile`
ADD CONSTRAINT `profile_ibfk_1` FOREIGN KEY (`accountID`) REFERENCES `accounts` (`accountID`);
/*!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 */;