今天,AgileFlow项目的朋友dgpck@msn.com发来了AgileFlow的Mysql数据库的建表脚本,他建表测试成功,我代表AgileFlow项目组向dgpck@msn.com表示感谢,并代表个人向他对开源精神的支持表示敬意.
*******agile.sql:****************use agile;DROP TABLE agileActivity;CREATE TABLE agileActivity ( activityInsId varchar(100) default '' NOT NULL , processInsId varchar(100) default '' NOT NULL , status varchar(100) default NULL, acceptedUserId varchar(100) default NULL) ;create unique index agileActivity_key on agileActivity(activityInsId);
DROP TABLE processInstance;CREATE TABLE processInstance( processInsId varchar(100) default '' NOT NULL , parentProcessInsId varchar(100) default '' NULL, parentActivityInsId varchar(100) default '' NULL) ;create unique index processInstance_key on processInstance(processInsId);
DROP TABLE driveTypeTable;CREATE TABLE driveTypeTable( fromActivityInsId varchar(100) default '' NOT NULL , nextActivityDefId varchar(100) default '' NOT NULL) ;create unique index driveTypeTable_key on driveTypeTable(fromActivityInsId,nextActivityDefId);********************************************************************
*************res.sql************************************************use agile;/*删除资源对象表*/drop table res_object_relation;drop table res_role;drop table res_object_priv;drop table res_privilege_type;drop table res_user;drop table res_ou;drop table res_object;drop table res_id;commit;
create table res_id ( tableName varchar(100) not null, value int default 0 not null);/*初始化ID表*/insert into res_id values('res_object',4);insert into res_id values('res_object_priv',3);
create table res_object ( id int not null, type int null, tier int null);insert into res_object values(1,1,0);insert into res_object values(2,2,0);insert into res_object values(3,3,0);create table res_ou ( id int not null, name varchar(100) not null, description varchar(255) null, is_deleted int default 0 null);/*初始化最高组织*/insert into res_ou values(1,'AgileFlow','',0);create table res_user ( id int not null, name varchar(100) not null, loginName varchar(100) not null, phone varchar(20) null, email varchar(100) null, password varchar(128) not null);insert into res_user values(2,'系统管理员','hongsoft','','','21232f297a57a5a743894a0e4a801fc3');create table res_role ( id int not null, name varchar(100) not null, description varchar(100) null);insert into res_role values(3,'system management role','系统管理角色');
create table res_object_relation ( child_id int not null, parent_id int not null, is_extend int default 0 not null);/*将系统管理员加入组织AgileFlow*/insert into res_object_relation values(2,1,1);
create table res_privilege_type ( id int not null, name varchar(100) not null, description varchar(255) null);insert into res_privilege_type values(1,'系统管理','系统管理权限');create table res_object_priv ( id int not null, object_id int not null, priv_type_id int not null);insert into res_object_priv values(1,2,1);insert into res_object_priv values(2,3,1);************************************************************************************