-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtable.sql
78 lines (67 loc) · 2.53 KB
/
table.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
SET NAMES utf8;
SET time_zone = '+00:00';
SET foreign_key_checks = 0;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS `chat`;
CREATE TABLE `chat` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`content` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`mktime` datetime NOT NULL,
`author` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `forum`;
CREATE TABLE `forum` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`title` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`content` text COLLATE utf8_unicode_ci NOT NULL,
`block` int(11) NOT NULL,
`level` int(4) NOT NULL,
`mktime` datetime NOT NULL,
`author` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `forum_block`;
CREATE TABLE `forum_block` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`blockname` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`position` tinyint(4) NOT NULL,
`mktime` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO `forum_block` (`id`, `blockname`, `position`, `mktime`) VALUES
(1, '預設區塊', 0, now());
DROP TABLE IF EXISTS `forum_reply`;
CREATE TABLE `forum_reply` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`post_id` int(11) NOT NULL,
`content` text COLLATE utf8_unicode_ci NOT NULL,
`mktime` datetime NOT NULL,
`author` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `member`;
CREATE TABLE `member` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`username` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
`password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`web_site` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`avatar` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`rekey` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
`level` tinyint(4) NOT NULL,
`joined` datetime NOT NULL,
`last_login` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
DROP TABLE IF EXISTS `notice`;
CREATE TABLE `notice` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`url` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`content` text COLLATE utf8_unicode_ci NOT NULL,
`status` tinyint(4) NOT NULL,
`send_from` int(11) NOT NULL,
`send_to` int(11) NOT NULL,
`mktime` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;