create table COMMENT (
  `DATE` timestamp NULL default NULL,
  `ID_INTERNAL` int(11) NOT NULL auto_increment,
  `KEY_COMMENTED` int(11),
  `KEY_REPLIED` int(11),
  `KEY_WRITER` int(11),
  `TEXT` text,
  primary key (ID_INTERNAL),
  index (KEY_COMMENTED),
  index (KEY_REPLIED),
  index (KEY_WRITER)
) type=InnoDB ;



create table DEVELOPMENT_DAY (
  `DAY` timestamp NULL default NULL,
  `ID_INTERNAL` int(11) NOT NULL auto_increment,
  `KEY_EXECUTOR` int(11),
  `KEY_WORK_ITEM` int(11),
  `TIME` bigint(20),
  `TYPE` text,
  primary key (ID_INTERNAL),
  index (KEY_EXECUTOR),
  index (KEY_WORK_ITEM)
) type=InnoDB ;



create table DEVELOPMENT_EPISODE (
  `END` timestamp NULL default NULL,
  `ID_INTERNAL` int(11) NOT NULL auto_increment,
  `KEY_EXECUTOR` int(11),
  `KEY_WORK_ITEM` int(11),
  `START` timestamp NULL default NULL,
  primary key (ID_INTERNAL),
  index (KEY_EXECUTOR),
  index (KEY_WORK_ITEM)
) type=InnoDB ;



create table LOG (
  `DATE` timestamp NULL default NULL,
  `ID_INTERNAL` int(11) NOT NULL auto_increment,
  `KEY_NEW_ITERATION` int(11),
  `KEY_OLD_ITERATION` int(11),
  `KEY_PERSON` int(11),
  `KEY_WORK_ITEM` int(11),
  `NEW_VALUE` int(11),
  `OJB_CONCRETE_CLASS` text,
  `OLD_VALUE` int(11),
  primary key (ID_INTERNAL),
  index (KEY_NEW_ITERATION),
  index (KEY_OLD_ITERATION),
  index (KEY_PERSON),
  index (KEY_WORK_ITEM)
) type=InnoDB ;



create table PAWS_ROLE (
  `ID_INTERNAL` int(11) NOT NULL auto_increment,
  `KEY_ROOT_DOMAIN_OBJECT` int(11),
  `NAME` text,
  primary key (ID_INTERNAL),
  index (KEY_ROOT_DOMAIN_OBJECT)
) type=InnoDB ;



create table PERSON (
  `EMAIL` text,
  `ID_INTERNAL` int(11) NOT NULL auto_increment,
  `KEY_ROOT_DOMAIN_OBJECT` int(11),
  `NAME` text,
  `OJB_CONCRETE_CLASS` text,
  `PASSWORD` text,
  `USERNAME` text,
  primary key (ID_INTERNAL),
  index (KEY_ROOT_DOMAIN_OBJECT)
) type=InnoDB ;



create table PERSON_ROLES (
  `KEY_PAWS_ROLE` int(11),
  `KEY_PERSON` int(11),
  primary key (KEY_PERSON, KEY_PAWS_ROLE)
) type=InnoDB ;



create table SNAPSHOT (
  `COMPLETED` timestamp NULL default NULL,
  `DAY` timestamp NULL default NULL,
  `ESTIMATE` int(11),
  `ID_INTERNAL` int(11) NOT NULL auto_increment,
  `KEY_WORK_ITEM` int(11),
  `STATE` text,
  primary key (ID_INTERNAL),
  index (KEY_WORK_ITEM)
) type=InnoDB ;



create table TEAM_MEMBERS (
  `KEY_PERSON` int(11),
  `KEY_TEAM` int(11),
  primary key (KEY_PERSON, KEY_TEAM)
) type=InnoDB ;



create table WORK_ASSIGNMENT (
  `ID_INTERNAL` int(11) NOT NULL auto_increment,
  `KEY_PERFORMER` int(11),
  `KEY_WORK_ITEM` int(11),
  `WEIGHT` int(11),
  primary key (ID_INTERNAL),
  index (KEY_PERFORMER),
  index (KEY_WORK_ITEM)
) type=InnoDB ;



create table WORK_DEFINITION (
  `COMPLETED` timestamp NULL default NULL,
  `CREATION` timestamp NULL default NULL,
  `DESCRIPTION` text,
  `DUE` timestamp NULL default NULL,
  `END` timestamp NULL default NULL,
  `ESTIMATE` int(11),
  `ID_INTERNAL` int(11) NOT NULL auto_increment,
  `ITERATION_PERIOD` int(11),
  `KEY_CLIENT` int(11),
  `KEY_ITERATION` int(11),
  `KEY_OWNER` int(11),
  `KEY_PARENT` int(11),
  `KEY_PROJECT` int(11),
  `KEY_ROOT_DOMAIN_OBJECT` int(11),
  `KEY_TEAM` int(11),
  `KEY_THEME` int(11),
  `KEY_TYPE` int(11),
  `MEMBER_WORK` double,
  `MODIFICATION` timestamp NULL default NULL,
  `NAME` text,
  `OJB_CONCRETE_CLASS` text,
  `PRIORITY` text,
  `RELEASE_PERIOD` int(11),
  `RISK` text,
  `SCHEDULED` timestamp NULL default NULL,
  `START` timestamp NULL default NULL,
  `STATE` text,
  `VALUE` text,
  `VELOCITY` int(11),
  `VELOCITY_ESTIMATE` int(11),
  primary key (ID_INTERNAL),
  index (KEY_CLIENT),
  index (KEY_ITERATION),
  index (KEY_OWNER),
  index (KEY_PARENT),
  index (KEY_PROJECT),
  index (KEY_ROOT_DOMAIN_OBJECT),
  index (KEY_TEAM),
  index (KEY_THEME),
  index (KEY_TYPE)
) type=InnoDB ;



create table X_P_STORY_TYPE (
  `DESCRIPTION` text,
  `ID_INTERNAL` int(11) NOT NULL auto_increment,
  `KEY_ROOT_DOMAIN_OBJECT` int(11),
  `NAME` text,
  primary key (ID_INTERNAL),
  index (KEY_ROOT_DOMAIN_OBJECT)
) type=InnoDB ;



create table X_P_TASK_TYPE (
  `DESCRIPTION` text,
  `ID_INTERNAL` int(11) NOT NULL auto_increment,
  `KEY_ROOT_DOMAIN_OBJECT` int(11),
  `NAME` text,
  primary key (ID_INTERNAL),
  index (KEY_ROOT_DOMAIN_OBJECT)
) type=InnoDB ;



create table X_P_THEME (
  `DESCRIPTION` text,
  `ID_INTERNAL` int(11) NOT NULL auto_increment,
  `KEY_PROJECT` int(11),
  `NAME` text,
  primary key (ID_INTERNAL),
  index (KEY_PROJECT)
) type=InnoDB ;



