未验证 提交 c53a66d2 编写于 作者: Y yubo 提交者: GitHub

remove sql.mon.collect_rule.created (#542)

上级 335b1133
...@@ -324,21 +324,20 @@ CREATE TABLE `collect_rule` ( ...@@ -324,21 +324,20 @@ CREATE TABLE `collect_rule` (
`nid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'nid', `nid` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT 'nid',
`step` int(11) NOT NULL DEFAULT '0' COMMENT 'step', `step` int(11) NOT NULL DEFAULT '0' COMMENT 'step',
`timeout` int(11) NOT NULL DEFAULT '0' COMMENT 'total timeout', `timeout` int(11) NOT NULL DEFAULT '0' COMMENT 'total timeout',
`collect_type` varchar(64) NOT NULL DEFAULT '' COMMENT 'collector name', `collect_type` varchar(64) NOT NULL DEFAULT '' COMMENT 'collect plugin name',
`name` varchar(255) NOT NULL DEFAULT '' COMMENT 'name', `name` varchar(255) NOT NULL DEFAULT '' COMMENT 'collect rule name',
`region` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'region', `region` varchar(32) NOT NULL DEFAULT 'default' COMMENT 'region',
`comment` varchar(512) NOT NULL DEFAULT '' COMMENT 'comment', `comment` varchar(512) NOT NULL DEFAULT '' COMMENT 'comment',
`data` blob NULL COMMENT 'data', `data` blob NULL COMMENT 'data',
`tags` varchar(512) NOT NULL DEFAULT '' COMMENT 'tags', `tags` varchar(512) NOT NULL DEFAULT '' COMMENT 'tags',
`creator` varchar(64) NOT NULL DEFAULT '' COMMENT 'creator', `creator` varchar(64) NOT NULL DEFAULT '' COMMENT 'creator',
`updater` varchar(64) NOT NULL DEFAULT '' COMMENT 'updater', `updater` varchar(64) NOT NULL DEFAULT '' COMMENT 'updater',
`created` datetime NOT NULL COMMENT 'created',
`created_at` bigint not null default 0, `created_at` bigint not null default 0,
`updated_at` bigint not null default 0, `updated_at` bigint not null default 0,
PRIMARY KEY (`id`), PRIMARY KEY (`id`),
KEY `idx_nid` (`nid`), KEY `idx_nid` (`nid`),
KEY `idx_collect_type` (`collect_type`) KEY `idx_collect_type` (`collect_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT 'api collect'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT 'collect rule';
CREATE TABLE `aggr_calc` ( CREATE TABLE `aggr_calc` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
......
...@@ -96,7 +96,7 @@ func GetCollectRules(typ string, nid int64, limit, offset int) (total int64, lis ...@@ -96,7 +96,7 @@ func GetCollectRules(typ string, nid int64, limit, offset int) (total int64, lis
return return
} }
err = search().Desc("created").Limit(limit, offset).Find(&list) err = search().Desc("updated_at").Limit(limit, offset).Find(&list)
return return
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册