forked from wcypierre/Feathur
-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.sql
263 lines (240 loc) · 8.72 KB
/
data.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
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
CREATE TABLE IF NOT EXISTS `accounts` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`username` varchar(65) NOT NULL,
`email_address` varchar(130) NOT NULL,
`password` varchar(130) NOT NULL,
`permissions` int(2) NOT NULL DEFAULT '0',
`salt` varchar(65) NOT NULL,
`activation_code` varchar(130) NOT NULL,
`forgot` varchar(130) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=73;
INSERT INTO `accounts` (`id`, `username`, `email_address`, `password`, `permissions`, `salt`) VALUES
(1, 'Admin', '[email protected]', '6UkIdjBU6DahbrMTbPLI/wv0ZYEfzuTg3l5hdMQixE7', 7, 'BKUIVStg0KV3n3vAUr6bWtJ5IjTDkf');
CREATE TABLE IF NOT EXISTS `blocks` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`name` varchar(65) NOT NULL,
`gateway` varchar(65) NOT NULL,
`netmask` varchar(65) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
CREATE TABLE IF NOT EXISTS `history` (
`id` int(32) NOT NULL AUTO_INCREMENT,
`server_id` int(16) NOT NULL,
`status` int(2) NOT NULL,
`timestamp` int(16) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=629 ;
CREATE TABLE IF NOT EXISTS `ipaddresses` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`vps_id` int(8) NOT NULL,
`block_id` int(8) NOT NULL,
`ip_address` varchar(65) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=58 ;
CREATE TABLE IF NOT EXISTS `servers` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`name` varchar(65) NOT NULL,
`user` varchar(65) NOT NULL,
`ip_address` varchar(65) NOT NULL,
`key` varchar(65) NOT NULL,
`type` varchar(65) NOT NULL,
`password` int(2) NOT NULL DEFAULT '0',
`url` varchar(255) NOT NULL,
`port` int(4) NOT NULL,
`status_type` varchar(16) NOT NULL,
`location` varchar(130) NOT NULL,
`status` int(2) NOT NULL,
`status_warning` int(2) NOT NULL,
`last_check` int(16) NOT NULL,
`previous_check` int(16) NOT NULL,
`up_since` int(16) NOT NULL,
`down_since` int(16) NOT NULL,
`alert_after` int(16) NOT NULL,
`load_alert` varchar(16) NOT NULL,
`ram_alert` varchar(8) NOT NULL,
`hard_disk_alert` varchar(8) NOT NULL,
`display_memory` int(2) NOT NULL,
`display_load` int(2) NOT NULL,
`display_hard_disk` int(2) NOT NULL,
`display_network_uptime` int(2) NOT NULL,
`display_hardware_uptime` int(11) NOT NULL,
`display_location` int(2) NOT NULL,
`display_history` int(2) NOT NULL,
`display_statistics` int(2) NOT NULL,
`display_hs` int(2) NOT NULL,
`display_bandwidth` int(2) NOT NULL,
`hardware_uptime` varchar(32) NOT NULL,
`total_memory` varchar(32) NOT NULL,
`free_memory` varchar(32) NOT NULL,
`load_average` varchar(32) NOT NULL,
`hard_disk_free` varchar(32) NOT NULL,
`hard_disk_total` varchar(32) NOT NULL,
`bandwidth` int(64) NOT NULL,
`last_bandwidth` int(64) NOT NULL,
`container_bandwidth` int(2) NOT NULL,
`bandwidth_timestamp` int(32) NOT NULL,
`volume_group` varchar(65) NOT NULL,
`qemu_path` varchar(65) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;
CREATE TABLE IF NOT EXISTS `server_blocks` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`server_id` int(8) NOT NULL,
`block_id` int(8) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
CREATE TABLE IF NOT EXISTS `server_commands` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`server_id` int(8) NOT NULL,
`command` text NOT NULL,
`interval` int(8) NOT NULL,
`last` int(16) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;
CREATE TABLE IF NOT EXISTS `server_logs` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`server_id` int(8) NOT NULL,
`entry` text NOT NULL,
`command` text NOT NULL,
`timestamp` int(16) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1204 ;
CREATE TABLE IF NOT EXISTS `settings` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`setting_name` varchar(65) NOT NULL,
`setting_value` varchar(65) NOT NULL,
`setting_group` varchar(65) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=23 ;
INSERT INTO `settings` (`id`, `setting_name`, `setting_value`, `setting_group`) VALUES
(1, 'title', 'Feathur', 'site_settings'),
(2, 'description', 'VPS Management', 'site_settings'),
(3, 'template', 'default', 'site_settings'),
(4, 'container_id', '101', 'site_settings'),
(5, 'admin_template', 'admin', 'site_settings'),
(6, 'history_difference', '5', 'site_settings'),
(7, 'max_history', '30', 'site_settings'),
(8, 'max_statistics', '30', 'site_settings'),
(9, 'panel_url', 'localhost', 'site_settings'),
(10, 'maintenance', '0', 'site_settings'),
(11, 'automatic_updates', '1', 'site_settings'),
(12, 'current_version', '0.5.6.4', 'site_settings'),
(13, 'last_update_check', '0', 'site_settings'),
(14, 'last_template_sync', '0', 'site_settings'),
(15, 'mail', '0', 'site_settings'),
(16, 'mail_username', '', 'site_settings'),
(17, 'mail_password', '', 'site_settings'),
(18, 'update_type', 'develop', 'site_settings'),
(19, 'bandwidth_accounting', 'both', 'site_settings'),
(20, 'license', '0', 'site_settings'),
(21, 'refresh_time', '10', 'site_settings'),
(22, 'panel_mode', 'https://', 'site_settings');
CREATE TABLE IF NOT EXISTS `statistics` (
`id` int(16) NOT NULL AUTO_INCREMENT,
`server_id` int(8) NOT NULL,
`status` int(2) NOT NULL,
`hardware_uptime` varchar(32) NOT NULL,
`total_memory` varchar(32) NOT NULL,
`free_memory` varchar(32) NOT NULL,
`load_average` varchar(32) NOT NULL,
`hard_disk_free` varchar(32) NOT NULL,
`hard_disk_total` varchar(32) NOT NULL,
`bandwidth` int(32) NOT NULL,
`timestamp` int(16) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=17331 ;
CREATE TABLE IF NOT EXISTS `templates` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`name` varchar(65) NOT NULL,
`path` varchar(65) NOT NULL,
`type` varchar(65) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=16 ;
CREATE TABLE IF NOT EXISTS `transfers` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`vps_id` int(8) NOT NULL,
`from_server` int(8) NOT NULL,
`to_server` int(8) NOT NULL,
`phase` int(2) NOT NULL,
`completed` int(2) NOT NULL,
`cleanup` int(2) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;
CREATE TABLE IF NOT EXISTS `vps` (
`id` int(8) NOT NULL AUTO_INCREMENT,
`user_id` int(8) NOT NULL,
`server_id` int(8) NOT NULL,
`container_id` int(8) NOT NULL,
`hostname` varchar(130) NOT NULL,
`primary_ip` varchar(65) NOT NULL,
`type` varchar(8) NOT NULL,
`ram` int(8) NOT NULL,
`swap` int(8) NOT NULL,
`disk` varchar(8) NOT NULL,
`cpuunits` int(8) NOT NULL,
`cpulimit` int(8) NOT NULL,
`bandwidthlimit` decimal(65,4) NOT NULL,
`nameserver` varchar(65) NOT NULL,
`numiptent` int(8) NOT NULL,
`numproc` int(8) NOT NULL,
`inodes` int(8) NOT NULL,
`template_id` int(8) NOT NULL,
`suspended` int(2) NOT NULL,
`suspending_admin` int(8) NOT NULL,
`bandwidth_usage` decimal(65,4) NOT NULL,
`last_bandwidth` decimal(65,4) NOT NULL,
`rebuilding` int(8) NOT NULL,
`mac` varchar(65) NOT NULL,
`vnc_port` int(16) NOT NULL,
`boot_order` varchar(65) NOT NULL,
`disk_driver` varchar(65) NOT NULL,
`network_driver` varchar(65) NOT NULL,
`private_network` int(2) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=90 ;
CREATE TABLE IF NOT EXISTS `vps_logs` (
`id` int(16) NOT NULL AUTO_INCREMENT,
`timestamp` int(16) NOT NULL,
`vps_id` int(8) NOT NULL,
`command` text NOT NULL,
`entry` text NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=356 ;
CREATE TABLE IF NOT EXISTS `attempts` (
`id` INT( 16 ) NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`ip_address` VARCHAR( 65 ) NOT NULL ,
`timestamp` INT( 16 ) NOT NULL ,
`type` VARCHAR( 65 ) NOT NULL
) ENGINE = MYISAM ;
USE dns;
create table domains (
id INT auto_increment,
name VARCHAR(255) NOT NULL,
master VARCHAR(128) DEFAULT NULL,
last_check INT DEFAULT NULL,
type VARCHAR(6) NOT NULL,
notified_serial INT DEFAULT NULL,
account VARCHAR(40) DEFAULT NULL,
primary key (id)
) Engine=InnoDB;
CREATE UNIQUE INDEX name_index ON domains(name);
CREATE TABLE records (
id INT auto_increment,
domain_id INT DEFAULT NULL,
name VARCHAR(255) DEFAULT NULL,
type VARCHAR(10) DEFAULT NULL,
content VARCHAR(64000) DEFAULT NULL,
ttl INT DEFAULT NULL,
prio INT DEFAULT NULL,
change_date INT DEFAULT NULL,
primary key(id)
) Engine=InnoDB;
CREATE INDEX rec_name_index ON records(name);
CREATE INDEX nametype_index ON records(name,type);
CREATE INDEX domain_id ON records(domain_id);
create table supermasters (
ip VARCHAR(25) NOT NULL,
nameserver VARCHAR(255) NOT NULL,
account VARCHAR(40) DEFAULT NULL
) Engine=InnoDB;