Contributing To AgileFlow(MySql DBinit Sql)

今天,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);
************************************************************************************

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值