forked from firefoxbug/OpenCDN
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Twwy
committed
Aug 11, 2014
1 parent
ee513f0
commit daaa7c4
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
CREATE TABLE IF NOT EXISTS `domains` ( | ||
`domain_id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
`domain` varchar(255) NOT NULL, | ||
`ext` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:普通域名,1:泛域名', | ||
`create_time` int(10) unsigned NOT NULL DEFAULT '0', | ||
`last_update_time` int(10) unsigned NOT NULL DEFAULT '0', | ||
PRIMARY KEY (`domain_id`), | ||
UNIQUE KEY `name` (`domain`) | ||
) ENGINE=MyISAM DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE IF NOT EXISTS `routers` ( | ||
`router_id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
`domain_id` int(10) unsigned NOT NULL, | ||
`source_id` int(10) unsigned NOT NULL, | ||
`server_id` int(10) unsigned NOT NULL, | ||
`source_mode` tinyint(1) unsigned NOT NULL COMMENT '0:master,1:backup,2:hash', | ||
`create_time` int(10) unsigned NOT NULL DEFAULT '0', | ||
`last_update_time` int(10) unsigned NOT NULL DEFAULT '0', | ||
PRIMARY KEY (`router_id`), | ||
UNIQUE KEY `domain_id` (`domain_id`,`source_id`,`server_id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE IF NOT EXISTS `servers` ( | ||
`server_id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
`ip` varchar(255) NOT NULL, | ||
`token` char(32) NOT NULL, | ||
`last_update_time` int(10) unsigned NOT NULL DEFAULT '0', | ||
`create_time` int(10) unsigned NOT NULL DEFAULT '0', | ||
PRIMARY KEY (`server_id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; | ||
|
||
CREATE TABLE IF NOT EXISTS `sources` ( | ||
`source_id` int(10) unsigned NOT NULL AUTO_INCREMENT, | ||
`domain_id` int(10) unsigned NOT NULL, | ||
`address` varchar(255) NOT NULL COMMENT '源站IP或者域名', | ||
`create_time` int(10) unsigned NOT NULL DEFAULT '0', | ||
`last_update_time` int(10) unsigned NOT NULL DEFAULT '0', | ||
PRIMARY KEY (`source_id`), | ||
KEY `domain_id` (`domain_id`) | ||
) ENGINE=InnoDB DEFAULT CHARSET=utf8; |