--3.0.0.091226
CREATE TABLE `umsysinfo` (
	`id` AUTOINCREMENT (1,   1) NOT NULL,
	`itype` Double  NULL ,
	`sname` varchar (50) NULL ,
	`slable` varchar (50) NULL ,
	`sbz` varchar (50) NULL 
) 
GO
--3.0.0.100210
CREATE TABLE `ftpfile` (
	`id` AUTOINCREMENT (1,   1) NOT NULL ,
	`sfilename` varchar (200)  NULL ,
	`sfileip` varchar (100)  NULL ,
	`srealname` varchar (200)  NULL ,
	`filepath` varchar (200)  NULL ,
	`ifilesize` Double NULL ,
	`ssendid` varchar (200)  NULL ,
	`ssendnick` varchar (200)  NULL ,
	`itype` Double NULL ,
	`irighttype` Double NULL ,
	`ssenddate` datetime NULL ,
	`sfilememo` varchar (250)  NULL ,
	`sfiletype` varchar (40)  NULL ,
	`igetnum` Double NULL ,
	`ifilevalue` Double NULL ,
	`itotalfilevalue` Double NULL ,
	`ifileversion` Double NULL ,
	`istatus` Double NULL 
) 
GO

CREATE TABLE `ftpfileall` (
	`id` AUTOINCREMENT (1,   1) NOT NULL ,
	`sfilename` varchar (200)  NULL ,
	`sfileip` varchar (100)  NULL ,
	`srealname` varchar (200)  NULL ,
	`ifilesize` Double NULL ,
	`ssendid` varchar (200)  NULL ,
	`ssendnick` varchar (200)  NULL ,
	`ssenddate` datetime NULL ,
	`sfilememo` varchar (250)  NULL ,
	`sfiletype` varchar (40)  NULL ,
	`igetnum` Double NULL ,
	`ifilevalue` Double NULL ,
	`itotalfilevalue` Double NULL ,
	`ifileversion` Double NULL ,
	`istatus` Double NULL 
) 
GO

CREATE TABLE `ftpfilegroup` (
	`id` AUTOINCREMENT (1,   1) NOT NULL ,
	`sfilename` varchar (200)  NULL ,
	`sfileip` varchar (100)  NULL ,
	`srealname` varchar (200)  NULL ,
	`ifilesize` Double NULL ,
	`ssendid` varchar (200)  NULL ,
	`ssendnick` varchar (200)  NULL ,
	`sgroupid` varchar (200)  NULL ,
	`ssenddate` datetime NULL ,
	`sfilememo` varchar (250)  NULL ,
	`sfiletype` varchar (40)  NULL ,
	`igetnum` Double NULL ,
	`ifileversion` Double NULL ,
	`istatus` Double NULL 
) 
GO

CREATE TABLE `ftpfileorg` (
	`id` AUTOINCREMENT (1,   1) NOT NULL ,
	`sfilename` varchar (200)  NULL ,
	`sfileip` varchar (100)  NULL ,
	`srealname` varchar (200)  NULL ,
	`ifilesize` Double NULL ,
	`ssendid` varchar (200)  NULL ,
	`ssendnick` varchar (200)  NULL ,
	`sorgid` varchar (200)  NULL ,
	`ssenddate` datetime NULL ,
	`sfilememo` varchar (250)  NULL ,
	`sfiletype` varchar (40)  NULL ,
	`igetnum` Double NULL ,
	`ifileversion` Double NULL ,
	`istatus` Double NULL 
) 
GO

CREATE TABLE `ftpfileorglist` (
	`sfilename` varchar (200)  NULL ,
	`ssendid` varchar (200)  NULL ,
	`sorgid` varchar (200)  NULL ,
	`itype` Double NULL 
) 
GO

CREATE TABLE `ftpfileuser` (
	`sfilename` varchar (200)  NULL ,
	`ssendid` varchar (200)  NULL ,
	`suserid` varchar (200)  NULL ,
	`itype` Double NULL 
) 
GO

CREATE TABLE `ftpfileversion` (
	`id` AUTOINCREMENT (1,   1) NOT NULL ,
	`ssendid` varchar (200)  NULL ,
	`sfilename` varchar (200)  NULL ,
	`srealname` varchar (200)  NULL ,
	`ifilesize` Double NULL ,
	`sfileversion` varchar (4)  NULL ,
	`itype` Double NULL 
) 
GO
--3.0.0.100423
CREATE TABLE `IPTABLE` (
`ID` Long NOT NULL, 
`StartIPNum` Currency NOT NULL, 
`StartIPText` VarChar (15) NULL, 
`EndIPNum` Currency NOT NULL, 
`EndIPText` VarChar (15) NULL, 
`Country` VarChar (255) NULL, 
`Local` VarChar (255) NULL )
GO
--3.0.0.100613
CREATE TABLE `MessageLog` (
`COLLECTION-OWNER` VarChar (200) NULL, 
`xml` LongText NULL, 
`message` LongText NULL, 
`sid` VarChar (50) NULL, 
`sfrom` VarChar (200) NULL, 
`sto` VarChar (200) NULL, 
`senddate` DateTime NULL, 
`sendip` VarChar (20) NULL )
GO
CREATE TABLE `DnsServer` (
`username` VarChar (20) NULL, 
`psword` VarChar (20) NULL, 
`usertype` Long NULL, 
`dnsname` VarChar (20) NULL, 
`dnsip` VarChar (20) NULL, 
`regdate` DateTime NULL, 
`lastdate` DateTime NULL, 
`istatus` Long NULL )
GO
CREATE TABLE `statistic` (
`id` Long NOT NULL, 
`sresource` VarChar (10) NULL, 
`sreferrer` VarChar (200) NULL, 
`surl` VarChar (100) NULL, 
`skeyword` VarChar (100) NULL, 
`sappName` VarChar (100) NULL, 
`sappCodeName` VarChar (100) NULL, 
`sappVersion` VarChar (100) NULL, 
`splatform` VarChar (100) NULL, 
`slanguage` VarChar (100) NULL, 
`logindate` DateTime NULL, 
`sip` VarChar (100) NULL, 
`iip` Double NULL, 
`sOrgid` VarChar (20) NULL, 
`sCountry` VarChar (255) NULL, 
`sLocal` VarChar (255) NULL )
GO
CREATE TABLE `tSysClassDict` (
`ClassID` Decimal (5,0) NOT NULL, 
`ClassName` VarChar (40) NOT NULL, 
`DatasetName` VarChar (40) NULL, 
`JkClassType` VarChar (1) NULL, 
`JkDatasetName` VarChar (40) NULL, 
`JkMemo` VarChar (200) NULL )
GO
CREATE TABLE `tSysClassPropDict` (
`ClassID` Decimal (5,0) NOT NULL, 
`DatasetName` VarChar (40) NOT NULL, 
`PropID` Decimal (5,0) NOT NULL, 
`PropName` VarChar (40) NOT NULL, 
`FieldName` VarChar (40) NOT NULL, 
`JkDatasetName` VarChar (40) NULL, 
`JkFieldName` VarChar (40) NULL, 
`JkPropType` VarChar (10) NULL, 
`JkDataWidth` Decimal (5,0) NULL, 
`JkJoin` VarChar (200) NULL, 
`encrypt` Bit NOT NULL, 
`encryptType` VarChar (10) NULL, 
`encryptPass` VarChar (40) NULL, 
`encryptDll` VarChar (40) NULL, 
`encryptFunction` VarChar (40) NULL )
GO
CREATE TABLE `tSysEnumType` (
`LangID` Decimal (5,0) NOT NULL, 
`EnumTypeID` Decimal (5,0) NOT NULL, 
`EnumTypeName` VarChar (40) NOT NULL, 
`VerNo` VarChar (20) NULL )
GO
CREATE TABLE `tSysEnumValue` (
`LangID` Decimal (5,0) NOT NULL, 
`EnumTypeID` Decimal (5,0) NOT NULL, 
`EnumValueID` VarChar (4) NOT NULL, 
`EnumValueName` VarChar (40) NOT NULL, 
`IsDefault` VarChar (1) NOT NULL, 
`DispIndex` Decimal (5,0) NOT NULL, 
`VerNo` VarChar (20) NULL )
GO
alter table organize add `url` VarChar (200) NULL;
GO 
alter table organize add `email` VarChar (200) NULL; 
GO
alter table organize add `worktel` VarChar (50) NULL; 
GO
alter table organize add `workadr` VarChar (50) NULL; 
GO
alter table organize add `industry` VarChar (60) NULL; 
GO
alter table organize add `username` VarChar (100) NULL;
GO

--3.0.0.100714
alter table organize add `yxdate` DateTime NULL;
GO
alter table organize add `usernum` Long NULL;
GO
alter table organize add `stype` Long NULL;
GO
alter table organize add `righttype` Long NULL;
GO

CREATE TABLE `orgright` (
`rightno` Long NOT NULL, 
`rightName` VarChar (50) NULL )
GO

CREATE TABLE `Orgrightlist` (
`righttype` Long NOT NULL, 
`rightname` VarChar (50) NULL, 
`rightno` Long NOT NULL )
GO

insert into orgright (rightno,rightname) values (1,'基本客服')
GO
insert into orgright (rightno,rightname) values (2,'客服管理')
GO
insert into orgright (rightno,rightname) values (3,'统计分析')
GO
insert into orgright (rightno,rightname) values (4,'扩展功能')
GO
insert into orgright (rightno,rightname) values (5,'增值功能')
GO
insert into orgrightlist (righttype,rightname,rightno) values (1,'基本功能',1)
GO
insert into orgrightlist (righttype,rightname,rightno) values (1,'基本功能',2)
GO
insert into orgrightlist (righttype,rightname,rightno) values (2,'扩展功能',1)
GO
insert into orgrightlist (righttype,rightname,rightno) values (2,'扩展功能',2)
GO
insert into orgrightlist (righttype,rightname,rightno) values (2,'扩展功能',3)
GO
insert into orgrightlist (righttype,rightname,rightno) values (2,'扩展功能',4)
GO
--3.0.0.100902
CREATE TABLE `appraise` (
`sappraise` VarChar (100) NULL, 
`susername` VarChar (100) NULL, 
`slevel` Long NULL, 
`scontent` VarChar (250) NULL, 
`appraisedate` DateTime NULL, 
`orgid` VarChar (20) NULL )
GO
--3.0.0.100908
alter table statistic add `ssourceurl` VarChar (200) NULL;
GO
alter table vcard add `OutLineMessaeg` VarChar (100) NULL ;
GO
alter table vcard add `OnLineMessaeg` VarChar (100) NULL ;
GO
alter table vcard add `IsOutMessage` Long NULL ;
GO
alter table vcard add `IsOnMessage` Long NULL ;
GO
--3.0.0.100928
alter table authreg add `friendstatus` Short;
GO
update authreg set friendstatus=2 where friendstatus is null;
GO
--3.0.0.101203
insert into tSysClassPropDict (ClassID, DatasetName, PropID, PropName, FieldName) values (1,'authreg',1,'用户','username');
GO
insert into tSysClassPropDict (ClassID, DatasetName, PropID, PropName, FieldName) values (1,'authreg',2,'密码','password');
GO
insert into tSysClassPropDict (ClassID, DatasetName, PropID, PropName, FieldName) values (1,'authreg',3,'昵称','nickname');
GO
insert into tSysClassPropDict (ClassID, DatasetName, PropID, PropName, FieldName) values (2,'authreg',1,'用户id','collectionowner');
GO
insert into tSysClassPropDict (ClassID, DatasetName, PropID, PropName, FieldName) values (2,'authreg',2,'好友id','jid');
GO
insert into tSysClassPropDict (ClassID, DatasetName, PropID, PropName, FieldName) values (2,'authreg',3,'昵称','name');
GO
insert into tSysClassDict (ClassID, ClassName, DatasetName) values (1,'用户表','authreg');
GO
insert into tSysClassDict (ClassID, ClassName, DatasetName) values (2,'好友表','rosteritems');
GO
--3.0.0.101225
alter table organize add `regdate` datetime NULL ;
GO
--3.0.0.110325
alter table authreg add `friendversion` Long NULL ;
GO
--3.0.0.110328
alter table authreg add `imsi` VarChar (50) NULL ;
GO
alter table authreg add `imsiType` Long NULL ;
GO
alter table authreg add `stel` VarChar (50) NULL ;
GO
--3.0.0.110408
alter table authreg add `voiptype` Long NULL ;
GO
alter table authreg add `voiptel` VarChar (50) NULL ;
GO
--3.0.0.110419
alter table authreg add `lastlogoutdate` datetime NULL ;
GO
--3.0.0.110513
alter table authreg add `splatform` VarChar (20) NULL ;
GO
alter table authreg add `stoken` VarChar (100) NULL ;
GO
--3.0.0.110517
CREATE TABLE `authregtel` (
`username` VarChar (20) NOT NULL, 
`stel` VarChar (20) NULL, 
`istatus` Long NULL, 
`regdate` DateTime NULL )
GO
CREATE TABLE `rosteritemstel` (
`username` VarChar (20) NULL, 
`stel` VarChar (20) NULL, 
`friendtel` VarChar (20) NULL, 
`istatus` Long NULL )
GO

--3.0.0.110528
alter table authregtel add `nickname` VarChar (20) NULL ;
GO
alter table authregtel add `regnum` Long NULL ;
GO
--3.0.0.110613
alter table authregtel add `splatform` VarChar (20) NULL;
GO
alter table authregtel add `stoken` VarChar (100) NULL;
GO
alter table authregtel add `lastdate` DateTime NULL;
GO
alter table authregtel add `loginnum` Long NULL ;
GO
--3.0.0.110615
alter table authregtel add `regstatus` Long NULL ;