
ALTER TABLE `NewsItem`
	ADD `TeamOid` bigint(19) NULL;
	
ALTER TABLE `NewsItem`
	ADD KEY `TEAM_NEWSITEM_FK` (`TeamOid`);
	
ALTER TABLE `NewsItem`
	ADD CONSTRAINT `FK_TEAM_NEWSITEM` FOREIGN KEY (`TeamOid`) REFERENCES `Team` (`Oid`) ON DELETE NO ACTION ON UPDATE NO ACTION;
	
ALTER TABLE `ServiceRecord`
	ADD `Relevance` int(10) DEFAULT NULL;
	
ALTER TABLE `ServiceRecordHistory`
	ADD `Relevance` int(10) DEFAULT NULL;
	
	
CREATE TABLE `UIElement` (
	`Oid` BIGINT(19) NOT NULL AUTO_INCREMENT,
	`Tid` INT(10) DEFAULT NULL,
	`IsActive` TINYINT(1) DEFAULT NULL,
	`Notice` VARCHAR(1024) DEFAULT NULL,
	`InsTs` DATETIME DEFAULT NULL,
	`InsUser` VARCHAR(256) DEFAULT NULL,
	`Version` BIGINT(19) DEFAULT NULL,
	`UdpUser` VARCHAR(256) DEFAULT NULL,
	`SystemEntryID` INT(10) DEFAULT NULL,
	`UIElementType` INT(10) DEFAULT NULL,
	`Xaml` TEXT DEFAULT NULL,
	`EmployeeOid` bigint(19) NULL,
	`TeamOid` bigint(19) NULL,
	PRIMARY KEY (`Oid`),
  KEY `EMPLOYEE_UIELEMENT_FK` (`EmployeeOid`),
  KEY `TEAM_UIELEMENT_FK` (`TeamOid`),
  CONSTRAINT `FK_EMPLOYEE_UIELEMENT` FOREIGN KEY (`EmployeeOid`) REFERENCES `Employee` (`Oid`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `FK_TEAM_UIELEMENT` FOREIGN KEY (`TeamOid`) REFERENCES `Team` (`Oid`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=INNODB AUTO_INCREMENT=1 DEFAULT CHARSET=LATIN1;