-
Notifications
You must be signed in to change notification settings - Fork 1
/
demo.sql
166 lines (138 loc) · 5.97 KB
/
demo.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
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
-- phpMyAdmin SQL Dump
-- version 3.4.11.1deb1
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2013 年 01 月 09 日 12:00
-- 服务器版本: 5.5.28
-- PHP 版本: 5.4.6-1ubuntu1.1
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 */;
--
-- 数据库: `Vdragon_NetAdminIPTableCorporate`
--
-- --------------------------------------------------------
--
-- 表的结构 `feedback`
--
CREATE TABLE IF NOT EXISTS `feedback` (
`ID` varchar(20) NOT NULL DEFAULT '',
`reply_id` varchar(20) NOT NULL DEFAULT '',
`message` varchar(100) DEFAULT NULL,
`time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
`reply_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`ID`,`reply_id`,`time`,`reply_time`),
KEY `reply_id` (`reply_id`,`reply_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- 转存表中的数据 `feedback`
--
INSERT INTO `feedback` (`ID`, `reply_id`, `message`, `time`, `reply_time`) VALUES
('', 'ff', '123', '2013-01-09 11:51:25', '2012-12-24 02:05:19'),
('', 'ff', '1234', '2013-01-09 11:52:22', '2012-12-24 02:05:19'),
('', 'vdragon', '1234', '2013-01-09 08:15:40', '2012-12-31 05:12:16'),
('', 'V字龍', '喵', '2013-01-09 08:51:09', '2013-01-09 08:37:08'),
('', 'V字龍', '喵', '2013-01-09 08:58:42', '2013-01-09 08:37:08');
-- --------------------------------------------------------
--
-- 表的结构 `ips`
--
CREATE TABLE IF NOT EXISTS `ips` (
`ip` varchar(16) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`used` int(11) NOT NULL,
`func` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`ports` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`owner` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
`place` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci DEFAULT NULL,
KEY `ip` (`ip`),
KEY `owner` (`owner`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- 转存表中的数据 `ips`
--
INSERT INTO `ips` (`ip`, `used`, `func`, `ports`, `owner`, `place`) VALUES
('140.121.80.1', 1, '測試用主機', '80', 'Vdragon', 'IND'),
('140.121.80.2', 1, 'web server', '80', 'Vdragon', 'no idea'),
('140.121.80.22', 0, NULL, NULL, NULL, NULL),
('140.121.80.3', 1, 'demo', '80', 'pika1021', '131'),
('140.121.80.4', 0, NULL, NULL, NULL, NULL),
('140.121.80.5', 1, 'web server', '80', 'Vdragon', 'no idea'),
('140.121.80.6', 0, NULL, NULL, NULL, NULL),
('140.121.80.7', 0, NULL, NULL, NULL, NULL),
('140.121.80.8', 0, NULL, NULL, NULL, NULL),
('140.121.80.9', 0, NULL, NULL, NULL, NULL),
('140.121.80.10', 0, NULL, NULL, NULL, NULL),
('140.121.80.11', 1, '電腦營 2012', '80, 22', 'user', 'no idea'),
('140.121.80.12', 0, NULL, NULL, NULL, NULL),
('140.121.80.13', 0, NULL, NULL, NULL, NULL),
('140.121.80.14', 0, NULL, NULL, NULL, NULL),
('140.121.80.15', 1, 'web server++', '80', 'Vdragon', 'no idea'),
('140.121.80.16', 0, NULL, NULL, NULL, NULL),
('140.121.80.17', 0, NULL, NULL, NULL, NULL),
('140.121.80.18', 0, NULL, NULL, NULL, NULL),
('140.121.80.19', 0, NULL, NULL, NULL, NULL),
('140.121.80.20', 0, NULL, NULL, NULL, NULL);
-- --------------------------------------------------------
--
-- 表的结构 `messager`
--
CREATE TABLE IF NOT EXISTS `messager` (
`ID` varchar(20) NOT NULL DEFAULT '',
`message` varchar(100) DEFAULT NULL,
`time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
PRIMARY KEY (`ID`,`time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- 转存表中的数据 `messager`
--
INSERT INTO `messager` (`ID`, `message`, `time`) VALUES
('ff', 'ffff', '2012-12-24 02:02:18'),
('ff', 'ffff', '2012-12-24 02:05:19'),
('ffff', 'fffffff', '2012-12-24 02:05:52'),
('vdragon', '123', '2012-12-31 05:12:16'),
('vdragon', 'sadfsd', '2012-12-31 05:14:45'),
('vdragon', '1234', '2012-12-31 05:25:18'),
('vdragon', '1234', '2012-12-31 05:27:14'),
('vdragon', '1234', '2012-12-31 05:29:36'),
('Vdragon', '123', '2013-01-07 01:07:10'),
('Vdragon', '測試留言板留言(登入狀態)', '2013-01-09 08:40:21'),
('V字龍', '有人在嗎?在的話喵一下', '2013-01-09 08:37:08');
-- --------------------------------------------------------
--
-- 表的结构 `users`
--
CREATE TABLE IF NOT EXISTS `users` (
`name` varchar(20) COLLATE utf8_unicode_ci NOT NULL COMMENT '帳號名稱',
`passwd` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '帳號密碼',
`mail` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '電子郵件地址',
`phone` varchar(11) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT '連絡電話',
`display_name` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='使用者資料';
--
-- 转存表中的数据 `users`
--
INSERT INTO `users` (`name`, `passwd`, `mail`, `phone`, `display_name`) VALUES
('pika1021', '$6$nyanyanyanyanyan$Ja4P9JqArbCn4KrUI18rrhoPK83blfqOOiF3H.wTv3jxJW923iar0g9GVD6VNrAGOiQs30xL4a1p7Ov/gG5PW1', '[email protected]', '+8869202340', NULL),
('user', '$6$nyanyanyanyanyan$5otm6pE5FsiXe2.XKRgFjNM2Ju.QyKZzQuTOkkPaEnGKCGhETohQtPs3pGXKsOM/dQwmsbEfvl08fFcsKhTBA/', '', '', '測試使用者'),
('Vdragon', '$6$nyanyanyanyanyan$Ja4P9JqArbCn4KrUI18rrhoPK83blfqOOiF3H.wTv3jxJW923iar0g9GVD6VNrAGOiQs30xL4a1p7Ov/gG5PW1', '[email protected]', '+8869202340', NULL);
--
-- 限制导出的表
--
--
-- 限制表 `feedback`
--
ALTER TABLE `feedback`
ADD CONSTRAINT `feedback_ibfk_1` FOREIGN KEY (`reply_id`, `reply_time`) REFERENCES `messager` (`ID`, `time`);
--
-- 限制表 `ips`
--
ALTER TABLE `ips`
ADD CONSTRAINT `ips_ibfk_1` FOREIGN KEY (`owner`) REFERENCES `users` (`name`) ON DELETE CASCADE ON UPDATE CASCADE;
/*!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 */;