Today, dgpck@msn.com, a friend of the agileflow project, sent MySQL from agileflow
Database Table creation script. The table creation test is successful. On behalf of the agileflow project team
Dgpck@msn.com expressed gratitude and paid tribute to his personal support for the Open Source spirit.
* ****** 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;
/* Delete the resource object table */
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
);
/* Initialize the ID table */
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
);
/* Initialize the highest Organization */
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, 'System Postmaster ', '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', '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
);
/* Add the system administrator to the organization's 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, 'System management', 'System managementauthor ');
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 );
Insert into res_object_priv values (2, 3, 1 );
**************************************** **************************************** ****