-
Notifications
You must be signed in to change notification settings - Fork 12
/
mysql.sql
103 lines (86 loc) · 2.75 KB
/
mysql.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
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
--
-- Database: `rddtsync`
--
-- --------------------------------------------------------
--
-- Table structure for table `authcodes`
--
CREATE TABLE IF NOT EXISTS `authcodes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`userid` int(10) unsigned NOT NULL,
`username` varchar(30) NOT NULL,
`authhash` varchar(20) NOT NULL,
`description` text NOT NULL,
`lastused` int(10) unsigned DEFAULT '0',
`created` int(10) unsigned DEFAULT '0',
`createdby` text,
PRIMARY KEY (`id`),
KEY `userid` (`userid`),
KEY `authhash` (`authhash`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `faq`
--
CREATE TABLE IF NOT EXISTS `faq` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`question` text NOT NULL,
`answer` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `links`
--
CREATE TABLE IF NOT EXISTS `links` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`linkid` varchar(20) NOT NULL,
`userid` int(10) unsigned NOT NULL,
`lastvisit` int(10) unsigned NOT NULL,
`lastcommenttime` int(10) unsigned NOT NULL,
`lastcommentcount` int(6) unsigned NOT NULL,
`firstvisit` int(10) unsigned NOT NULL,
`lastcall` text NOT NULL,
`developers` text NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `linkid` (`linkid`,`userid`),
KEY `links` (`linkid`),
KEY `userid` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `logincodes`
--
CREATE TABLE IF NOT EXISTS `logincodes` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`userid` int(10) unsigned NOT NULL,
`authhash` varchar(64) NOT NULL,
`lastlogin` int(10) unsigned NOT NULL,
`created` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `authhash` (`authhash`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
-- --------------------------------------------------------
--
-- Table structure for table `user`
--
CREATE TABLE IF NOT EXISTS `user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(30) NOT NULL,
`passhash` text NOT NULL,
`salt` text NOT NULL,
`email` text,
`lastlogin` int(10) unsigned DEFAULT '0',
`lastactivity` int(10) unsigned DEFAULT '0',
`lastip` varchar(15) DEFAULT NULL,
`numlink` int(8) unsigned DEFAULT '0',
`numcomments` int(8) unsigned DEFAULT '0',
`loginattempts` int(2) unsigned DEFAULT '0',
`created` int(10) unsigned NOT NULL DEFAULT '0',
`createdby` text,
`resethash` text,
`canreset` int(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;