Home | Mirror | Search

11. logging 日誌表的設計

CREATE TABLE `logging` (
	`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
	`tag` ENUM('unknow','www','user','admin') NOT NULL DEFAULT 'unknow' COMMENT '日誌標籤',
	`time` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '產生時間',
	`facility` ENUM('bank','unionpay','sms','email') NOT NULL COMMENT '類別',
	`priority` ENUM('info','warning','error','critical','exception','debug') NOT NULL COMMENT '級別',
	`message` VARCHAR(512) NOT NULL COMMENT '內容',
	PRIMARY KEY (`id`)
)
COMMENT='日誌表'
COLLATE='utf8_general_ci'
ENGINE=InnoDB
AUTO_INCREMENT=2;
		
comments powered by Disqus