CREATE TABLE `build` (
  `ReleaseID` int(8) unsigned NOT NULL default '0',
  `BuildID` int(8) unsigned NOT NULL auto_increment,
  `BuildName` varchar(20) default NULL,
  `Description` text NOT NULL,
  `DateReceived` varchar(19) NOT NULL default '',
  `DateFinished` varchar(19) NOT NULL default '',
  `Archive` char(1) NOT NULL default '',
  `DateCreated` varchar(19) NOT NULL default '',
  `LogTimeStamp` varchar(19) NOT NULL default '',
  PRIMARY KEY  (`BuildID`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

CREATE TABLE `discussion` (
  `DiscussionID` int(8) unsigned NOT NULL auto_increment,
  `ReqID` int(8) unsigned NOT NULL default '0',
  `Discussion` text,
  `Status` varchar(7) default NULL,
  `DiscSubject` varchar(255) default NULL,
  `Author` varchar(25) default NULL,
  `AssignTo` varchar(25) default NULL,
  `Date` varchar(19) default NULL,
  PRIMARY KEY  (`DiscussionID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `discussionpost` (
  `PostID` int(8) unsigned NOT NULL auto_increment,
  `DiscussionID` int(8) unsigned NOT NULL default '0',
  `Post` text,
  `Author` varchar(25) default NULL,
  `AssignTo` varchar(25) default NULL,
  `Date` varchar(19) default NULL,
  PRIMARY KEY  (`PostID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

CREATE TABLE `feedback` (
  `FeedbackID` smallint(4) unsigned NOT NULL auto_increment,
  `Author` varchar(15) default NULL,
  `Comment` text,
  `Project` varchar(15) default NULL,
  `TimeStamp` varchar(19) default NULL,
  PRIMARY KEY  (`FeedbackID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `field_tbl` (
  `field_id` int(8) unsigned NOT NULL auto_increment,
  `screen_id` int(8) unsigned NOT NULL default '0',
  `text_only` char(1) default NULL,
  `field_order` decimal(8,1) NOT NULL default '0.0',
  `field_name` varchar(64) default NULL,
  `field_desc` varchar(255) default NULL,
  PRIMARY KEY  (`field_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `function_tbl` (
  `function_id` int(8) unsigned NOT NULL auto_increment,
  `date_created` varchar(19) NOT NULL default '',
  `last_updated` varchar(19) NOT NULL default '',
  `last_updated_by` varchar(30) NOT NULL default '',
  `function_name` varchar(128) NOT NULL default '',
  `description` varchar(255) default NULL,
  PRIMARY KEY  (`function_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `guichecktable` (
  `GuiCheckID` int(8) unsigned NOT NULL auto_increment,
  `GuiCheckNumber` int(3) unsigned default NULL,
  `IconCode` varchar(6) default NULL,
  `TS_UniqueRunID` varchar(14) default NULL,
  `ObjectName` varchar(50) default NULL,
  `ExpectedValue` varchar(50) default NULL,
  `ActualValue` varchar(50) default NULL,
  `Status` varchar(10) default NULL,
  PRIMARY KEY  (`GuiCheckID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `individualrundocs` (
  `UniqueDocID` int(8) unsigned NOT NULL auto_increment,
  `TS_UniqueRunID` varchar(14) default '0',
  `TimeStamp` varchar(19) default NULL,
  `UploadedBy` varchar(50) default NULL,
  `FileName` varchar(255) default NULL,
  `DisplayName` varchar(150) default NULL,
  `Comments` varchar(255) default NULL,
  `Link` varchar(255) default NULL,
  PRIMARY KEY  (`UniqueDocID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `issues` (
  `id` int(6) unsigned NOT NULL auto_increment,
  `Name` varchar(150) default NULL,
  `Priority` varchar(50) default NULL,
  `Status` varchar(50) default NULL,
  `Details` varchar(255) default NULL,
  `Owner` varchar(50) default NULL,
  `Timestamp` varchar(19) default NULL,
  `Type` varchar(50) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `logs` (
  `LogID` int(8) unsigned NOT NULL auto_increment,
  `SessionID` int(10) unsigned default NULL,
  `Deletion` char(1) default NULL,
  `Creation` char(1) default NULL,
  `Upload` char(1) default NULL,
  `TimeStamp` varchar(19) default NULL,
  `User` varchar(30) default NULL,
  `Page` varchar(50) default NULL,
  `Action` text,
  PRIMARY KEY  (`LogID`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1;

CREATE TABLE `manualdoctype` (
  `ManualDocTypeID` smallint(4) unsigned NOT NULL auto_increment,
  `ProjectID` int(8) unsigned default NULL,
  `ManualDocTypeName` varchar(50) default '0',
  PRIMARY KEY  (`ManualDocTypeID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `manualtestdocs` (
  `ManualTestID` int(8) unsigned NOT NULL auto_increment,
  `TestID` int(8) unsigned NOT NULL default '0',
  `DisplayName` varchar(150) default 'NULL',
  PRIMARY KEY  (`ManualTestID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `manualtestdocs_version` (
  `VersionID` int(8) unsigned NOT NULL auto_increment,
  `ManualTestID` int(8) unsigned default NULL,
  `Version` decimal(4,2) default NULL,
  `TimeStamp` varchar(19) default NULL,
  `UploadedBy` varchar(50) default NULL,
  `FileName` varchar(150) default NULL,
  `Comments` text,
  `ManualDocTypeName` varchar(50) default NULL,
  PRIMARY KEY  (`VersionID`),
  KEY `manualtestid_timestamp` (`ManualTestID`,`TimeStamp`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

CREATE TABLE `project` (
  `project_id` int(4) unsigned NOT NULL auto_increment,
  `use_files` char(1) NOT NULL default 'Y',
  `show_custom_1` char(1) NOT NULL default 'Y',
  `show_custom_2` char(1) NOT NULL default 'Y',
  `show_custom_3` char(1) NOT NULL default 'Y',
  `show_custom_4` char(1) NOT NULL default 'Y',
  `show_custom_5` char(1) default 'Y',
  `show_custom_6` char(1) default 'Y',
  `show_window` char(1) NOT NULL default 'Y',
  `show_object` char(1) NOT NULL default 'Y',
  `show_memory_stats` char(1) NOT NULL default 'Y',
  `show_priority` char(1) NOT NULL default 'Y',
  `show_test_input` char(1) NOT NULL default 'Y',
  `status` char(1) NOT NULL default 'Y',
  `date_created` varchar(19) default NULL,
  `project_name` varchar(50) NOT NULL default '',
  `description` varchar(255) NOT NULL default '',
  `bug_url` varchar(255) default NULL,
  `deleted` char(1) NOT NULL default 'N',
  PRIMARY KEY  (`project_id`),
  UNIQUE KEY `project_name` (`project_name`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;


INSERT INTO `project` (`project_id`, `use_files`, `show_custom_1`, `show_custom_2`, `show_custom_3`, `show_custom_4`, `show_custom_5`, `show_custom_6`, `show_window`, `show_object`, `show_memory_stats`, `show_priority`, `show_test_input`, `status`, `date_created`, `project_name`, `description`, `bug_url`, `deleted`) VALUES (1, 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', 'Y', NULL, '{PROJECT_NAME}', 'Please insert details about the project here.', NULL, 'N');


CREATE TABLE `project_user_assoc` (
  `project_user_assoc_id` int(4) unsigned NOT NULL auto_increment,
  `project_id` int(4) unsigned NOT NULL default '0',
  `user_id` int(4) unsigned NOT NULL default '0',
  `delete_rights` char(1) default NULL,
  `email_testset` char(1) default NULL,
  `email_discussion` char(1) default NULL,
  `email_new_bug` char(1) NOT NULL default 'N',
  `email_update_bug` char(1) NOT NULL default 'N',
  `email_assigned_bug` char(1) NOT NULL default 'N',
  `email_bugnote_bug` char(1) NOT NULL default 'N',
  `email_status_bug` char(1) NOT NULL default 'N',
  `qa_tester` char(1) default NULL,
  `ba_owner` char(1) default NULL,
  `user_rights` varchar(25) default NULL,
  PRIMARY KEY  (`project_user_assoc_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;


INSERT INTO `project_user_assoc` (`project_user_assoc_id`, `project_id`, `user_id`, `delete_rights`, `email_testset`, `email_discussion`, `email_new_bug`, `email_update_bug`, `email_assigned_bug`, `email_bugnote_bug`, `email_status_bug`, `qa_tester`, `ba_owner`, `user_rights`) VALUES (1, 1, 1, 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', 'N', '10');


CREATE TABLE `release_tbl` (
  `project_id` int(8) unsigned NOT NULL default '0',
  `ReleaseID` int(8) unsigned NOT NULL auto_increment,
  `Archive` char(1) NOT NULL default 'N',
  `ReleaseName` varchar(20) NOT NULL default '',
  `Description` text NOT NULL,
  `DateReceived` varchar(19) NOT NULL default '',
  `DateCreated` varchar(19) NOT NULL default '',
  `LogTimeStamp` varchar(19) NOT NULL default '',
  `Platform` varchar(6) NOT NULL default '',
  `QASignoffDate` varchar(19) NOT NULL default '',
  `BASignoffDate` varchar(19) NOT NULL default '',
  `QASignoffBy` varchar(25) NOT NULL default '',
  `BASignoffBy` varchar(25) NOT NULL default '',
  `QASignoff` varchar(40) NOT NULL default '',
  `BASignoff` varchar(40) NOT NULL default '',
  `QASignoffComments` text NOT NULL,
  `BASignoffComments` text NOT NULL,
  PRIMARY KEY  (`ReleaseID`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `requirement` (
  `project_id` int(8) unsigned NOT NULL default '0',
  `ReqID` int(8) unsigned NOT NULL auto_increment,
  `ReqName` varchar(255) NOT NULL default '',
  `AreaCovered` int(11) unsigned NOT NULL default '0',
  `Type` int(8) unsigned NOT NULL default '0',
  `RecordOrFile` char(1) NOT NULL default 'R',
  `UnTestable` char(1) default 'N',
  `LockedBy` varchar(25) NOT NULL default '',
  `LockedDate` varchar(25) NOT NULL default '',
  `Priority` varchar(25) default NULL,
  `Parent` int(8) unsigned NOT NULL default '0',
  `DateCreated` varchar(19) default NULL,
  `LogTimeStamp` varchar(19) default NULL,
  `LastUpdated` varchar(19) default NULL,
  PRIMARY KEY  (`ReqID`),
  UNIQUE KEY `projectid` (`ReqName`,`project_id`),
  KEY `parent` (`Parent`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `requirementareacoverage` (
  `ReqAreaCoverageID` int(8) unsigned NOT NULL auto_increment,
  `ProjectID` int(8) unsigned default NULL,
  `AreaCoverage` varchar(50) default NULL,
  PRIMARY KEY  (`ReqAreaCoverageID`),
  UNIQUE KEY `projectid` (`ProjectID`,`AreaCoverage`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `requirementdocumenttype` (
  `ReqDocTypeID` smallint(4) unsigned NOT NULL auto_increment,
  `ProjectID` int(8) unsigned NOT NULL default '0',
  `ReqDocTypeName` varchar(50) NOT NULL default '',
  `RootDocument` char(1) NOT NULL default 'N',
  PRIMARY KEY  (`ReqDocTypeID`),
  UNIQUE KEY `projectid` (`ProjectID`,`ReqDocTypeName`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;


INSERT INTO `requirementdocumenttype` (`ReqDocTypeID`, `ProjectID`, `ReqDocTypeName`, `RootDocument`) VALUES (1, 2, 'Functional', 'N'),
(2, 2, 'Standards', 'N'),
(3, 2, 'System', 'N');


CREATE TABLE `requirementfunctionality` (
  `FunctionalityID` int(8) unsigned NOT NULL auto_increment,
  `ProjectID` int(8) unsigned NOT NULL default '0',
  `FunctionalityName` varchar(50) NOT NULL default '0',
  PRIMARY KEY  (`FunctionalityID`),
  UNIQUE KEY `projectid` (`ProjectID`,`FunctionalityName`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `requirementfunctionality_assoc` (
  `RequirementFunctionality_AssocID` int(6) unsigned NOT NULL auto_increment,
  `RequirementID` int(6) unsigned NOT NULL default '0',
  `RequirementFunctionalityID` int(6) unsigned NOT NULL default '0',
  PRIMARY KEY  (`RequirementFunctionality_AssocID`),
  UNIQUE KEY `reqid_reqfunctid` (`RequirementID`,`RequirementFunctionalityID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `requirementnotifications` (
  `ReqNotifyID` int(8) unsigned NOT NULL auto_increment,
  `ReqID` int(8) unsigned NOT NULL default '0',
  `UserID` int(8) NOT NULL default '0',
  PRIMARY KEY  (`ReqNotifyID`),
  UNIQUE KEY `userid_reqid` (`UserID`,`ReqID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `requirementversion` (
  `ReqVersionID` int(8) unsigned NOT NULL auto_increment,
  `ReqID` int(8) unsigned NOT NULL default '0',
  `Version` varchar(5) NOT NULL default '',
  `Latest` char(1) NOT NULL default '',
  `TimeStamp` varchar(19) default NULL,
  `Author` varchar(50) NOT NULL default '',
  `FileName` varchar(150) NOT NULL default '',
  `ReasonForChange` text NOT NULL,
  `Status` varchar(25) NOT NULL default '',
  `AssignedTo` varchar(255) NOT NULL default '',
  `Detail` text NOT NULL,
  `LastUpdated` varchar(19) default NULL,
  `LastUpdatedBy` varchar(30) NOT NULL default '',
  PRIMARY KEY  (`ReqVersionID`),
  KEY `ReqID` (`ReqID`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `requirementversion_release_assoc` (
  `RequirementVersion_Release_AssocID` int(6) unsigned NOT NULL auto_increment,
  `RequirementVersionID` int(6) unsigned NOT NULL default '0',
  `ReleaseID` int(6) unsigned NOT NULL default '0',
  PRIMARY KEY  (`RequirementVersion_Release_AssocID`),
  UNIQUE KEY `reqversionid_releaseid` (`RequirementVersionID`,`ReleaseID`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `reset_password` (
  `reset_id` int(11) NOT NULL auto_increment,
  `user` varchar(50) NOT NULL default '0',
  `reset_link` varchar(25) NOT NULL default '',
  `reset_used` char(1) NOT NULL default '',
  `expires` varchar(19) default NULL,
  PRIMARY KEY  (`reset_id`),
  UNIQUE KEY `reset_link` (`reset_link`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `step_tbl` (
  `step_id` int(8) unsigned NOT NULL auto_increment,
  `function_id` int(8) unsigned default NULL,
  `step_number` decimal(8,1) default NULL,
  `action` text,
  `inputs` text,
  `expected_result` text,
  `step_type` varchar(11) NOT NULL default '',
  PRIMARY KEY  (`step_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `test_function_assoc` (
  `test_func_assoc_id` int(8) unsigned NOT NULL auto_increment,
  `test_id` int(8) unsigned NOT NULL default '0',
  `function_id` int(8) unsigned NOT NULL default '0',
  `on_error` varchar(128) default NULL,
  PRIMARY KEY  (`test_func_assoc_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `testarea` (
  `AreaTestedID` smallint(4) unsigned NOT NULL auto_increment,
  `project_id` int(8) unsigned NOT NULL default '0',
  `AreaTestedName` varchar(50) default '0',
  PRIMARY KEY  (`AreaTestedID`),
  UNIQUE KEY `projectid` (`AreaTestedName`,`project_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `testenvironment` (
  `EnvironmentID` int(6) unsigned NOT NULL auto_increment,
  `ProjectID` int(8) unsigned default NULL,
  `EnvironmentName` char(50) default NULL,
  PRIMARY KEY  (`EnvironmentID`),
  UNIQUE KEY `projectid` (`EnvironmentName`,`ProjectID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `testmachine` (
  `MachineID` smallint(4) unsigned NOT NULL auto_increment,
  `ProjectID` int(8) unsigned default NULL,
  `MachineName` char(20) default NULL,
  `MachineLocation` char(25) default NULL,
  `MachineIPAddress` char(15) default NULL,
  PRIMARY KEY  (`MachineID`),
  KEY `projectid` (`ProjectID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `testplan` (
  `TestPlanID` int(8) unsigned NOT NULL auto_increment,
  `BuildID` int(8) unsigned default NULL,
  `TestPlanName` varchar(255) default NULL,
  PRIMARY KEY  (`TestPlanID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `testplanversion` (
  `TestPlanVersionID` int(8) unsigned NOT NULL auto_increment,
  `TestPlanID` int(8) unsigned default NULL,
  `Latest` char(1) default 'Y',
  `Version` char(3) default NULL,
  `UploadedDate` varchar(19) default NULL,
  `UploadedBy` varchar(30) default NULL,
  `FileName` varchar(255) default NULL,
  `Comments` varchar(255) default NULL,
  PRIMARY KEY  (`TestPlanVersionID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `testset` (
  `TestSetID` int(8) unsigned NOT NULL auto_increment,
  `BuildID` int(8) unsigned NOT NULL default '0',
  `TestSetOrderBy` int(19) NOT NULL default '0',
  `Archive` char(3) NOT NULL default '',
  `DateCreated` varchar(19) NOT NULL default '2002-01-01 12:00:00',
  `SignOffDate` varchar(19) NOT NULL default '',
  `TestSetName` varchar(30) NOT NULL default '0',
  `SignOffBy` varchar(19) NOT NULL default '',
  `TestSetStatus` varchar(40) NOT NULL default '',
  `SignOffComments` varchar(255) NOT NULL default '',
  `Description` text NOT NULL,
  `UniqueID` varchar(15) NOT NULL default '',
  `TestSetType` varchar(30) default NULL,
  PRIMARY KEY  (`TestSetID`),
  KEY `buildid` (`BuildID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `testset_testsuite_assoc` (
  `TestSet_TestSuite_AssocID` int(8) unsigned NOT NULL auto_increment,
  `TestSetID` int(8) unsigned NOT NULL default '0',
  `TestID` int(8) unsigned NOT NULL default '0',
  `Finished` smallint(1) unsigned default '0',
  `LogTimeStamp` varchar(19) default NULL,
  `root_cause` varchar(30) default NULL,
  `TestStatus` varchar(30) NOT NULL default 'Not Started',
  `AssignedTo` varchar(25) NOT NULL default '',
  `Comments` varchar(255) NOT NULL default '',
  PRIMARY KEY  (`TestSet_TestSuite_AssocID`,`TestSetID`),
  KEY `testid_idx` (`TestID`),
  KEY `testsetid` (`TestSetID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `teststatus` (
  `TestStatusID` int(8) unsigned NOT NULL auto_increment,
  `project_id` int(8) unsigned NOT NULL default '0',
  `TestStatus` varchar(20) default NULL,
  PRIMARY KEY  (`TestStatusID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `teststep` (
  `TestStepID` int(8) unsigned NOT NULL auto_increment,
  `TestStepParent` int(11) NOT NULL,
  `TestID` int(8) unsigned default NULL,
  `TestVersionID` int(8) unsigned default NULL,
  `TestStep_Number` char(255) default NULL,
  `Action` text,
  `Inputs` text,
  `Expected_Result` text,
  `StepType` varchar(11) NOT NULL default '',
  PRIMARY KEY  (`TestStepID`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `testsuite` (
  `TestID` int(8) unsigned NOT NULL auto_increment,
  `VersionCounter` int(10) unsigned NOT NULL,
  `project_id` int(8) unsigned NOT NULL default '0',
  `Deleted` char(3) NOT NULL default '',
  `Archive` char(3) NOT NULL default '',
  `CodeReview` char(3) NOT NULL default '',
  `BA_Approval` char(3) NOT NULL default '',
  `Steps` char(3) NOT NULL default '',
  `Script` char(3) NOT NULL default '',
  `LoadRunner` char(3) NOT NULL default '',
  `AutoPass` char(1) NOT NULL default '',
  `Duration` varchar(5) NOT NULL default '',
  `Purpose` text NOT NULL,
  `TestSuiteName` varchar(150) NOT NULL default '',
  `TestType` varchar(50) NOT NULL default '',
  `AreaTested` varchar(50) NOT NULL default '',
  `BAOwner` varchar(25) NOT NULL default '',
  `Scripter` varchar(25) NOT NULL default '',
  `Tester` varchar(25) default NULL,
  `ApprovedForAuto` varchar(20) NOT NULL default '',
  `Priority` varchar(11) NOT NULL default '',
  `Status` varchar(30) NOT NULL default '',
  `DateCreated` varchar(19) default NULL,
  `Comments` varchar(255) NOT NULL default '',
  `AssignedTo` varchar(15) NOT NULL default '',
  `AssignedBy` varchar(15) NOT NULL default '',
  `DateAssigned` varchar(10) NOT NULL default '',
  `ExpDateComplete` varchar(10) NOT NULL default '',
  `ActDateComplete` varchar(10) NOT NULL default '',
  `BASignOff` varchar(10) NOT NULL default '',
  `SignOffBy` varchar(30) default NULL,
  `SignOffDate` varchar(10) default NULL,
  `LastUpdated` varchar(19) default NULL,
  `LastUpdatedBy` varchar(30) NOT NULL default '',
  `UniqueID` varchar(15) NOT NULL default '',
  `TestStepLinkID` int(8) default NULL,
  `State` char(3) default NULL,
  `LockedBy` varchar(30) NOT NULL,
  `LockedDate` varchar(19) NOT NULL,
  `Pre` text NOT NULL,
  `Post` text NOT NULL,
  PRIMARY KEY  (`TestID`),
  UNIQUE KEY `TestSuiteName` (`TestSuiteName`),
  KEY `areatested` (`AreaTested`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `testsuite_requirement_assoc` (
  `TestSuite_Requirement_AssocID` int(8) unsigned NOT NULL auto_increment,
  `TestID` int(8) unsigned NOT NULL default '0',
  `ReqID` int(8) unsigned NOT NULL default '0',
  `PercentCovered` int(3) unsigned NOT NULL default '0',
  `UseCaseVersionCounter` int(10) unsigned NOT NULL,
  PRIMARY KEY  (`TestSuite_Requirement_AssocID`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `testsuite_versioncontrol` (
  `VersionDate` int(8) NOT NULL default '0',
  `TestID` int(8) unsigned NOT NULL default '0',
  `VersionCounter` int(10) unsigned NOT NULL,
  `project_id` int(8) unsigned NOT NULL default '0',
  `Deleted` char(3) NOT NULL default '',
  `Archive` char(3) NOT NULL default '',
  `CodeReview` char(3) NOT NULL default '',
  `BA_Approval` char(3) NOT NULL default '',
  `Steps` char(3) NOT NULL default '',
  `Script` char(3) NOT NULL default '',
  `LoadRunner` char(3) NOT NULL default '',
  `AutoPass` char(1) NOT NULL default '',
  `Duration` varchar(5) NOT NULL default '',
  `Purpose` text NOT NULL,
  `TestSuiteName` varchar(150) NOT NULL default '',
  `TestType` varchar(50) NOT NULL default '',
  `AreaTested` varchar(50) NOT NULL default '',
  `BAOwner` varchar(25) NOT NULL default '',
  `Scripter` varchar(25) NOT NULL default '',
  `Tester` varchar(25) default NULL,
  `ApprovedForAuto` varchar(20) NOT NULL default '',
  `Priority` varchar(11) NOT NULL default '',
  `Status` varchar(30) NOT NULL default '',
  `DateCreated` varchar(19) default NULL,
  `Comments` varchar(255) NOT NULL default '',
  `AssignedTo` varchar(15) NOT NULL default '',
  `AssignedBy` varchar(15) NOT NULL default '',
  `DateAssigned` varchar(10) NOT NULL default '',
  `ExpDateComplete` varchar(10) NOT NULL default '',
  `ActDateComplete` varchar(10) NOT NULL default '',
  `BASignOff` varchar(10) NOT NULL default '',
  `SignOffBy` varchar(30) default NULL,
  `SignOffDate` varchar(10) default NULL,
  `LastUpdated` varchar(19) default NULL,
  `LastUpdatedBy` varchar(30) NOT NULL default '',
  `UniqueID` varchar(15) NOT NULL default '',
  `TestStepLinkID` int(8) default NULL,
  `State` char(3) default NULL,
  `LockedBy` varchar(30) NOT NULL,
  `LockedDate` varchar(19) NOT NULL,
  `Pre` text NOT NULL,
  `Post` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


CREATE TABLE `testsuite_versioncontrol_requirement_assoc` (
  `VersionCounter` int(11) NOT NULL,
  `TestSuite_Requirement_AssocID` int(8) unsigned NOT NULL,
  `TestID` int(8) unsigned NOT NULL default '0',
  `ReqID` int(8) unsigned NOT NULL default '0',
  `PercentCovered` int(3) unsigned NOT NULL default '0',
  `UseCaseVersionCounter` int(10) unsigned NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


CREATE TABLE `testsuite_versioncontrol_step` (
  `VersionCounter` int(8) unsigned NOT NULL,
  `TestStepID` int(8) unsigned NOT NULL,
  `TestID` int(8) unsigned default NULL,
  `TestVersionID` int(8) unsigned default NULL,
  `TestStep_Number` decimal(8,1) default NULL,
  `Action` text,
  `Inputs` text,
  `Expected_Result` text,
  `StepType` varchar(11) NOT NULL default '',
  `TestStepParent` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;


CREATE TABLE `testsuiteresults` (
  `TestSuiteResultsID` int(8) unsigned NOT NULL auto_increment,
  `TestSetID` int(8) unsigned NOT NULL default '0',
  `project_id` int(8) unsigned NOT NULL default '0',
  `TestID` int(8) unsigned NOT NULL default '0',
  `LogTimeStamp` varchar(19) default NULL,
  `TestStatus` varchar(30) NOT NULL default 'Not Started',
  `assigned_to` varchar(25) NOT NULL default '',
  `root_cause` varchar(25) NOT NULL default '',
  `test_run_comment` varchar(255) NOT NULL default '',
  `Started` smallint(1) unsigned NOT NULL default '0',
  `Finished` smallint(1) unsigned NOT NULL default '0',
  `CVSVersion` decimal(4,2) NOT NULL default '0.00',
  `CheckedForAutoPass` char(1) NOT NULL default '',
  `OS` varchar(20) NOT NULL default '',
  `SP` varchar(15) NOT NULL default '',
  `nNumberID` varchar(8) NOT NULL default '',
  `UserID` varchar(10) NOT NULL default '',
  `MachineName` varchar(50) NOT NULL default '',
  `TestSuite` varchar(150) NOT NULL default '',
  `TestPath` varchar(255) NOT NULL default '',
  `Environment` varchar(20) NOT NULL default '',
  `RunID` varchar(25) NOT NULL default '',
  `TS_UniqueRunID` varchar(14) NOT NULL default '0',
  `TimeStarted` varchar(19) NOT NULL default '',
  `TimeFinished` varchar(19) NOT NULL default '',
  PRIMARY KEY  (`TestSuiteResultsID`),
  KEY `TS_UniqueRunID` (`TS_UniqueRunID`),
  KEY `testid` (`TestID`),
  KEY `testset_id` (`TestSetID`,`TS_UniqueRunID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `testtype` (
  `TestTypeID` int(6) unsigned NOT NULL auto_increment,
  `project_id` int(8) unsigned default NULL,
  `TestType` varchar(50) default NULL,
  PRIMARY KEY  (`TestTypeID`),
  UNIQUE KEY `projectid` (`TestType`,`project_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `testversion` (
  `TestVersionID` int(8) unsigned NOT NULL auto_increment,
  `TestID` int(8) unsigned default NULL,
  `Version` decimal(4,2) default NULL,
  `Latest` char(1) default NULL,
  `ActiveVersion` char(1) default NULL,
  `Comments` varchar(255) default NULL,
  `Status` varchar(25) NOT NULL default '',
  `AssignedTo` varchar(30) NOT NULL default '',
  `BASignOff` varchar(10) NOT NULL default '',
  `SignOffBy` varchar(30) NOT NULL default '',
  `Creator` varchar(30) NOT NULL default '',
  `DateCreated` varchar(19) NOT NULL default '',
  PRIMARY KEY  (`TestVersionID`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


CREATE TABLE `testworkflow` (
  `UniqueTestID` int(8) unsigned NOT NULL auto_increment,
  `Complete` char(1) NOT NULL default 'N',
  `TestName` varchar(150) default NULL,
  `BAToCreateTC` varchar(30) default NULL,
  `BACreateDateComp` varchar(10) default NULL,
  `QAToReviewTC` varchar(30) default NULL,
  `QAReviewDateComp` varchar(10) default NULL,
  `QAAutomated` varchar(30) default NULL,
  `QAAutoDateStart` varchar(10) default NULL,
  `QAAutoDateExp` varchar(10) default NULL,
  `QAAutoDateComp` varchar(10) default NULL,
  `BAToApprove` varchar(30) default NULL,
  `BAApprovalDate` varchar(10) default NULL,
  `Comments` varchar(255) default NULL,
  PRIMARY KEY  (`UniqueTestID`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

CREATE TABLE `user` (
  `user_id` int(4) unsigned NOT NULL auto_increment,
  `password` varchar(32) NOT NULL default '',
  `username` varchar(20) default NULL,
  `first_name` varchar(20) NOT NULL default '',
  `last_name` varchar(20) NOT NULL default '',
  `phone` varchar(25) NOT NULL default '',
  `menu_prefs` varchar(39) NOT NULL default '',
  `email` varchar(50) NOT NULL default '',
  `user_admin` varchar(25) NOT NULL default '',
  `default_project` int(6) unsigned NOT NULL default '0',
  `deleted` char(1) NOT NULL default 'N',
  `email_on_new` char(1) NOT NULL default '',
  `email_on_assigned_to` char(1) NOT NULL default '',
  `email_on_feedback` char(1) NOT NULL default '',
  `email_on_resolved` char(1) NOT NULL default '',
  `email_on_closed` char(1) NOT NULL default '',
  `email_on_reopened` char(1) NOT NULL default '',
  `email_on_bugnote` char(1) NOT NULL default '',
  `email_on_status` char(1) NOT NULL default '',
  `email_on_priority` char(1) NOT NULL default '',
  PRIMARY KEY  (`user_id`)
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;


INSERT INTO `user` (`user_id`, `password`, `username`, `first_name`, `last_name`, `phone`, `menu_prefs`, `email`, `user_admin`, `default_project`, `deleted`, `email_on_new`, `email_on_assigned_to`, `email_on_feedback`, `email_on_resolved`, `email_on_closed`, `email_on_reopened`, `email_on_bugnote`, `email_on_status`, `email_on_priority`) VALUES (1, '{ADMIN_PWD_MD5}', 'admin', 'Foo', 'Bar', '', '', 'Foo@Example.org', 'Y', 1, 'N', '', '', '', '', '', '', '', '', '');


CREATE TABLE `verifyresults` (
  `VerifyResultsID` int(11) unsigned NOT NULL auto_increment,
  `LogTimeStamp` varchar(19) default NULL,
  `TestStatus` varchar(6) NOT NULL default '',
  `LineNumber` int(5) unsigned NOT NULL default '0',
  `defect_id` int(8) unsigned NOT NULL default '0',
  `TotalPhyMem` int(11) unsigned NOT NULL default '0',
  `FreePhyMem` int(11) unsigned NOT NULL default '0',
  `TotalVirMem` int(11) unsigned NOT NULL default '0',
  `FreeVirMem` int(11) unsigned NOT NULL default '0',
  `CurMemUtil` int(11) unsigned NOT NULL default '0',
  `TotalPageFile` int(11) unsigned NOT NULL default '0',
  `FreePageFile` int(11) unsigned NOT NULL default '0',
  `Custom_5` char(2) default NULL,
  `Custom_3` varchar(8) NOT NULL default '',
  `Custom_1` varchar(13) NOT NULL default '',
  `Custom_2` varchar(20) NOT NULL default '',
  `Custom_6` varchar(20) NOT NULL default '',
  `Custom_4` varchar(20) NOT NULL default '',
  `ActualResult` varchar(255) NOT NULL default '',
  `Comment` varchar(255) NOT NULL default '',
  `Action` varchar(255) default NULL,
  `ExpectedResult` varchar(255) default NULL,
  `Window` varchar(100) NOT NULL default '',
  `Object` varchar(100) NOT NULL default '',
  `ObjType` varchar(25) default NULL,
  `StepNumber` varchar(25) default NULL,
  `TS_UniqueRunID` varchar(14) NOT NULL default '0',
  `TimeStamp` varchar(19) default NULL,
  PRIMARY KEY  (`VerifyResultsID`),
  KEY `teststatus` (`TestStatus`),
  KEY `ts_uniquerunid` (`TS_UniqueRunID`,`TestStatus`),
  KEY `defect` (`defect_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
