--3.0.0.091226
CREATE TABLE [umsysinfo] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[itype] [int] NULL ,
	[sname] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[slable] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sbz] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO
alter table orgreg add ipname varchar(100) null
GO
alter table orgreg add isok int null
GO
--3.0.0.100210
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ftpfile]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ftpfile]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ftpfileall]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ftpfileall]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ftpfilegroup]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ftpfilegroup]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ftpfileorg]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ftpfileorg]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ftpfileorglist]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ftpfileorglist]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ftpfileuser]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ftpfileuser]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ftpfileversion]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ftpfileversion]
GO

CREATE TABLE [dbo].[ftpfile] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[sfilename] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[sfileip] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[srealname] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[filepath] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ifilesize] [int] NULL ,
	[ssendid] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ssendnick] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[itype] [int] NULL ,
	[irighttype] [int] NULL ,
	[ssenddate] [datetime] NULL ,
	[sfilememo] [varchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[sfiletype] [varchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[igetnum] [int] NULL ,
	[ifilevalue] [int] NULL ,
	[itotalfilevalue] [int] NULL ,
	[ifileversion] [int] NULL ,
	[istatus] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[ftpfileall] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[sfilename] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[sfileip] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[srealname] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ifilesize] [int] NULL ,
	[ssendid] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ssendnick] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ssenddate] [datetime] NULL ,
	[sfilememo] [varchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[sfiletype] [varchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[igetnum] [int] NULL ,
	[ifilevalue] [int] NULL ,
	[itotalfilevalue] [int] NULL ,
	[ifileversion] [int] NULL ,
	[istatus] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[ftpfilegroup] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[sfilename] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[sfileip] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[srealname] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ifilesize] [int] NULL ,
	[ssendid] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ssendnick] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[sgroupid] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ssenddate] [datetime] NULL ,
	[sfilememo] [varchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[sfiletype] [varchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[igetnum] [int] NULL ,
	[ifileversion] [int] NULL ,
	[istatus] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[ftpfileorg] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[sfilename] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[sfileip] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[srealname] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ifilesize] [int] NULL ,
	[ssendid] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ssendnick] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[sorgid] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ssenddate] [datetime] NULL ,
	[sfilememo] [varchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[sfiletype] [varchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[igetnum] [int] NULL ,
	[ifileversion] [int] NULL ,
	[istatus] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[ftpfileorglist] (
	[sfilename] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ssendid] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[sorgid] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[itype] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[ftpfileuser] (
	[sfilename] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ssendid] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[suserid] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[itype] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[ftpfileversion] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[ssendid] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[sfilename] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[srealname] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[ifilesize] [int] NULL ,
	[sfileversion] [varchar] (4) COLLATE Chinese_PRC_CI_AS NULL ,
	[itype] [int] NULL 
) ON [PRIMARY]
GO


exec sp_addextendedproperty N'MS_Description', N'分值', N'user', N'dbo', N'table', N'ftpfile', N'column', N'ifilevalue'
GO
exec sp_addextendedproperty N'MS_Description', N'版本', N'user', N'dbo', N'table', N'ftpfile', N'column', N'ifileversion'
GO
exec sp_addextendedproperty N'MS_Description', N'下载次数', N'user', N'dbo', N'table', N'ftpfile', N'column', N'igetnum'
GO
exec sp_addextendedproperty N'MS_Description', N'文件权限类型0：全部；1：自己2：指定用户', N'user', N'dbo', N'table', N'ftpfile', N'column', N'irighttype'
GO
exec sp_addextendedproperty N'MS_Description', N'状态0：开始1：完成', N'user', N'dbo', N'table', N'ftpfile', N'column', N'istatus'
GO
exec sp_addextendedproperty N'MS_Description', N'已下载的分值', N'user', N'dbo', N'table', N'ftpfile', N'column', N'itotalfilevalue'
GO
exec sp_addextendedproperty N'MS_Description', N'文件共享类型1：本地；0：服务器', N'user', N'dbo', N'table', N'ftpfile', N'column', N'itype'
GO
exec sp_addextendedproperty N'MS_Description', N'文件类别（自定义）', N'user', N'dbo', N'table', N'ftpfile', N'column', N'sfiletype'


GO


exec sp_addextendedproperty N'MS_Description', N'分值', N'user', N'dbo', N'table', N'ftpfileall', N'column', N'ifilevalue'
GO
exec sp_addextendedproperty N'MS_Description', N'版本', N'user', N'dbo', N'table', N'ftpfileall', N'column', N'ifileversion'
GO
exec sp_addextendedproperty N'MS_Description', N'下载次数', N'user', N'dbo', N'table', N'ftpfileall', N'column', N'igetnum'
GO
exec sp_addextendedproperty N'MS_Description', N'状态0：开始1：完成', N'user', N'dbo', N'table', N'ftpfileall', N'column', N'istatus'
GO
exec sp_addextendedproperty N'MS_Description', N'已下载的分值', N'user', N'dbo', N'table', N'ftpfileall', N'column', N'itotalfilevalue'
GO
exec sp_addextendedproperty N'MS_Description', N'文件类别（自定义）', N'user', N'dbo', N'table', N'ftpfileall', N'column', N'sfiletype'


GO


exec sp_addextendedproperty N'MS_Description', N'版本', N'user', N'dbo', N'table', N'ftpfilegroup', N'column', N'ifileversion'
GO
exec sp_addextendedproperty N'MS_Description', N'下载次数', N'user', N'dbo', N'table', N'ftpfilegroup', N'column', N'igetnum'
GO
exec sp_addextendedproperty N'MS_Description', N'状态0：开始1：完成', N'user', N'dbo', N'table', N'ftpfilegroup', N'column', N'istatus'
GO
exec sp_addextendedproperty N'MS_Description', N'文件类别（自定义）', N'user', N'dbo', N'table', N'ftpfilegroup', N'column', N'sfiletype'


GO


exec sp_addextendedproperty N'MS_Description', N'版本', N'user', N'dbo', N'table', N'ftpfileorg', N'column', N'ifileversion'
GO
exec sp_addextendedproperty N'MS_Description', N'下载次数', N'user', N'dbo', N'table', N'ftpfileorg', N'column', N'igetnum'
GO
exec sp_addextendedproperty N'MS_Description', N'状态0：开始1：完成', N'user', N'dbo', N'table', N'ftpfileorg', N'column', N'istatus'
GO
exec sp_addextendedproperty N'MS_Description', N'文件类别（自定义）', N'user', N'dbo', N'table', N'ftpfileorg', N'column', N'sfiletype'


GO


exec sp_addextendedproperty N'MS_Description', N'类型1：个人，2：组群，3：全部,4:组织', N'user', N'dbo', N'table', N'ftpfileversion', N'column', N'itype'


GO
--3.0.0.100423
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[IPTABLE]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[IPTABLE]
GO

CREATE TABLE [dbo].[IPTABLE] (
	[ID] [int] NOT NULL ,
	[StartIPNum] [money] NOT NULL ,
	[StartIPText] [nvarchar] (15) COLLATE Chinese_PRC_CI_AS NULL ,
	[EndIPNum] [money] NOT NULL ,
	[EndIPText] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Country] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Local] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO
--3.0.0.100613
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[MessageLog]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[MessageLog]
GO

CREATE TABLE [dbo].[MessageLog] (
	[COLLECTION-OWNER] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[xml] [varchar] (2000) COLLATE Chinese_PRC_CI_AS NULL ,
	[message] [varchar] (2000) COLLATE Chinese_PRC_CI_AS NULL ,
	[sid] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sfrom] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[sto] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[senddate] [datetime] NULL ,
	[sendip] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO
alter table organize add [url] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL;
GO
alter table organize add [email] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ;
GO
alter table organize add [worktel] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ;
GO
alter table organize add [workadr] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ;
GO
alter table organize add [industry] [varchar] (60) COLLATE Chinese_PRC_CI_AS NULL;
GO
alter table organize add [username] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ;
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[DnsServer]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[DnsServer]
GO

CREATE TABLE [dbo].[DnsServer] (
	[username] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[psword] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[usertype] [int] NULL ,
	[dnsname] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[dnsip] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[regdate] [datetime] NULL ,
	[lastdate] [datetime] NULL ,
	[istatus] [int] NULL 
) ON [PRIMARY]
GO
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[statistic]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[statistic]
GO

CREATE TABLE [dbo].[statistic] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[sresource] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[sreferrer] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[surl] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[skeyword] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[sappName] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[sappCodeName] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[sappVersion] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[splatform] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[slanguage] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[logindate] [datetime] NULL ,
	[sip] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[iip] [float] NULL ,
	[sOrgid] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[sCountry] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[sLocal] [varchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tSysClassDict]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tSysClassDict]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tSysClassPropDict]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tSysClassPropDict]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tSysEnumType]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tSysEnumType]
GO

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tSysEnumValue]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tSysEnumValue]
GO

CREATE TABLE [dbo].[tSysClassDict] (
	[ClassID] [numeric](5, 0) NOT NULL ,
	[ClassName] [varchar] (40) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[DatasetName] [varchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[JkClassType] [varchar] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[JkDatasetName] [varchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[JkMemo] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tSysClassPropDict] (
	[ClassID] [numeric](5, 0) NOT NULL ,
	[DatasetName] [varchar] (40) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[PropID] [numeric](5, 0) NOT NULL ,
	[PropName] [varchar] (40) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[FieldName] [varchar] (40) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[JkDatasetName] [varchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[JkFieldName] [varchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[JkPropType] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[JkDataWidth] [numeric](5, 0) NULL ,
	[JkJoin] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[encrypt] [bit] NULL ,
	[encryptType] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[encryptPass] [varchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[encryptDll] [varchar] (40) COLLATE Chinese_PRC_CI_AS NULL ,
	[encryptFunction] [varchar] (40) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tSysEnumType] (
	[LangID] [numeric](5, 0) NOT NULL ,
	[EnumTypeID] [numeric](5, 0) NOT NULL ,
	[EnumTypeName] [varchar] (40) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[VerNo] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[tSysEnumValue] (
	[LangID] [numeric](5, 0) NOT NULL ,
	[EnumTypeID] [numeric](5, 0) NOT NULL ,
	[EnumValueID] [varchar] (4) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[EnumValueName] [varchar] (40) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[IsDefault] [varchar] (1) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[DispIndex] [numeric](5, 0) NOT NULL ,
	[VerNo] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO
--3.0.0.100713
alter table organize add [yxdate] [datetime] NULL
GO
alter table organize add [usernum] [int] NULL
GO
alter table organize add [stype] [int] NULL
GO
alter table organize add [righttype] [int] NULL
GO

CREATE TABLE [orgright] (
	[rightno] [int] NOT NULL ,
	[rightName] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_orgright] PRIMARY KEY  CLUSTERED 
	(
		[rightno]
	)  ON [PRIMARY] 
) ON [PRIMARY]
GO


CREATE TABLE [Orgrightlist] (
	[righttype] [int] NOT NULL ,
	[rightname] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[rightno] [int] NOT NULL ,
	CONSTRAINT [PK_Orgrightlist] PRIMARY KEY  CLUSTERED 
	(
		[righttype],
		[rightno]
	)  ON [PRIMARY] 
) ON [PRIMARY]
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
if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[appraise]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[appraise]
GO

CREATE TABLE [dbo].[appraise] (
	[sappraise] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[susername] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[slevel] [int] NULL ,
	[scontent] [varchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[appraisedate] [datetime] NULL ,
	[orgid] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO
--3.0.0.100908
alter table statistic add [ssourceurl] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL;
GO
alter table vcard add [OutLineMessaeg] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ;
GO
alter table vcard add [OnLineMessaeg] [varchar] (100) COLLATE Chinese_PRC_CI_AS NULL ;
GO
alter table vcard add [IsOutMessage] [int] NULL ;
GO
alter table vcard add [IsOnMessage] [int] NULL ;
GO
--3.0.0.100928
alter table authreg add [friendstatus] [int] NULL Default 1;
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] [int] NULL ;
--3.0.0.110328
alter table authreg add [imsi] [varchar] (50) NULL ;
GO
alter table authreg add [imsiType] [int] NULL ;
GO
alter table authreg add [stel] [varchar] (50) NULL ;
GO
--3.0.0.110408
alter table authreg add [voiptype] [int] 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) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[stel] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[istatus] [int] NULL CONSTRAINT [DF_authregtel_istatus] DEFAULT (0),
	[regdate] [datetime] NULL ,
	CONSTRAINT [PK_authregtel] PRIMARY KEY  CLUSTERED 
	(
		[username]
	)  ON [PRIMARY] 
) ON [PRIMARY]
GO
CREATE TABLE [rosteritemstel] (
	[username] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[stel] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[friendtel] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[istatus] [int] NULL CONSTRAINT [DF_rosteritemstel_istatus] DEFAULT (0)
) ON [PRIMARY]
GO
--3.0.0.110528
alter table authregtel add [nickname] [varchar] (20) NULL ;
GO
alter table authregtel add [regnum] [int] NULL ;
GO
--3.0.0.110612
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] [int] NULL ;
GO
--3.0.0.110615
alter table authregtel add [regstatus] [int] NULL;
