forked from dmongeau/Base
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdb.sql
More file actions
executable file
·55 lines (46 loc) · 1.44 KB
/
db.sql
File metadata and controls
executable file
·55 lines (46 loc) · 1.44 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
-- --------------------------------------------------------
--
-- Table structure for table `photos`
--
CREATE TABLE IF NOT EXISTS `photos` (
`phid` int(11) NOT NULL AUTO_INCREMENT,
`filename` varchar(255) NOT NULL,
`original` varchar(255) NOT NULL,
`width` int(11) NOT NULL,
`height` int(11) NOT NULL,
`size` int(11) NOT NULL,
`published` tinyint(1) NOT NULL,
`deleted` tinyint(1) NOT NULL,
`dateadded` datetime NOT NULL,
PRIMARY KEY (`phid`),
KEY `published` (`published`,`deleted`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`uid` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(255) NOT NULL,
`pwd` varchar(255) NOT NULL,
`role` varchar(100) NOT NULL,
`phid` int(11) NOT NULL,
`published` tinyint(1) NOT NULL,
`deleted` tinyint(1) NOT NULL,
`dateadded` datetime NOT NULL,
PRIMARY KEY (`uid`),
UNIQUE KEY `email` (`email`,`published`,`deleted`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `users_logins`
--
CREATE TABLE IF NOT EXISTS `users_logins` (
`ulid` int(11) NOT NULL AUTO_INCREMENT,
`uid` int(11) NOT NULL,
`ip` varchar(15) NOT NULL,
`useragent` varchar(255) NOT NULL,
`dateadded` datetime NOT NULL,
PRIMARY KEY (`ulid`),
KEY `uid` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;