 IS_LIST CHAR(1),
 IS_QUERY CHAR(1),
 LIST_WIDTH NUMBER(10,2),
-QUERY_WIDTH NUMBER(10,2)
+QUERY_WIDTH NUMBER(10,2),
+IS_SORT CHAR(1)
 );
 ALTER TABLE MOD_TABLE_COLUMN ADD CONSTRAINT MOD_TABLE_COLUMN_ID PRIMARY KEY (ID);
 COMMENT ON TABLE MOD_TABLE_COLUMN IS '业务表字段';

VALUES ('eb4be21a761a4d239e5f9536f78af6a8',to_date('2016-04-11 09:21:13','yyyy-mm-dd hh24:mi:ss'),'system',to_date('2016-04-11 09:21:28','yyyy-mm-dd hh24:mi:ss'),'system',null,null,'demoJob2','示例任务2','com_job','triggerdemoJob2','0/5 * * * * ?',null,null,'PAUSED','com.seeyoui.kensite.framework.quartz.job.SimpleJob1',null,null);

INSERT INTO MOD_TABLE (ID,CREATE_DATE,CREATE_USER,UPDATE_DATE,UPDATE_USER,NAME,COMMENTS,PARENT_TABLE,PARENT_TABLE_FK,REMARKS,DEL_FLAG,CATEGORY) 
VALUES ('b0b0cf906df34ddfae7015002b7efb5c',to_date('2015-12-09 08:31:48','yyyy-mm-dd hh24:mi:ss'),'system',to_date('2015-12-09 08:31:48','yyyy-mm-dd hh24:mi:ss'),null,'BO_INTERFACE_CATALOG','接口目录',null,null,null,'0','普通表');

INSERT INTO MOD_TABLE (ID,CREATE_DATE,CREATE_USER,UPDATE_DATE,UPDATE_USER,NAME,COMMENTS,PARENT_TABLE,PARENT_TABLE_FK,REMARKS,DEL_FLAG,CATEGORY) 

INSERT INTO SYS_USER_ROLE (USER_ID,ROLE_ID) 
VALUES ('3a657ea8ddc745a698d51aeea2183f4d','d3f34652eb03447b9cc8bb7375df675d');

create or replace view v_cms_article_collections as
select basic_id,type,count(1) cou from cms_collections group by basic_id,type;

create or replace view v_cms_article_comment as
select basic_id,avg(score) score,count(1) cou from cms_comment where audit_state='N' group by basic_id;

create or replace view v_cms_article_tags as
select id,wm_concat(name) tag from (
select a.id,t.id||':'||t.name name from cms_article a left join cms_tagcloud t on a.tag_id like '%'||t.id||'%' where a.tag_id is not null
) group by id;

create or replace view v_cms_tag_article as
select a.id,t.id tag_id,t.name name from cms_article a left join cms_tagcloud t on a.tag_id like '%'||t.id||'%' where a.tag_id is not null;
