1
0

wan_stats.sql 527 B

12
  1. CREATE TABLE `Wan_stats` ( `id` INT NOT NULL AUTO_INCREMENT , `time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP , `router_id` INT NULL DEFAULT NULL , `interface_id` INT NULL DEFAULT NULL , `in` BIGINT UNSIGNED NOT NULL DEFAULT '0' , `out` BIGINT UNSIGNED NOT NULL DEFAULT '0' , `forward_in` BIGINT UNSIGNED NOT NULL DEFAULT '0' , `forward_out` BIGINT UNSIGNED NOT NULL DEFAULT '0' , PRIMARY KEY (`id`), INDEX `times` (`time`)) ENGINE = InnoDB;
  2. ALTER TABLE `Wan_stats` ADD UNIQUE `main` (`time`, `router_id`, `interface_id`);