
ALTER TABLE PaymentLog ADD COLUMN PayType int
GO

ALTER TABLE PaymentLog ADD COLUMN Trade_No VarChar(100)
GO

ALTER TABLE FeeItem ADD COLUMN QuantifiedType int default -1
GO

ALTER TABLE FeeItem ADD COLUMN UnitName VarChar(50)
GO

ALTER TABLE Payment ADD COLUMN RelaPaymentID int
GO

ALTER TABLE BillItem ADD COLUMN ExpiryDate DateTime
GO

ALTER TABLE BillItem ADD COLUMN KeyID int
GO

ALTER TABLE BillItem ADD COLUMN FeeItemQType int
GO

ALTER TABLE Bill ADD COLUMN PayMethod VarChar(50)
GO





ALTER TABLE Student ADD COLUMN LockState int default 1
GO

ALTER TABLE Student ADD COLUMN WeiXin VarChar(50)
GO

ALTER TABLE Student ADD COLUMN Height int
GO

ALTER TABLE Student ADD COLUMN Weight int
GO

ALTER TABLE Potential ADD COLUMN WeiXin VarChar(50)
GO

ALTER TABLE Class ADD COLUMN ProspectStuCount int default 0
GO

ALTER TABLE School ADD COLUMN HardwarePwd VarChar(50)
GO



CREATE TABLE [AppSending](
[AppMsgID]   COUNTER PRIMARY KEY  ,
[FriendID] Int   NULL DEFAULT 0,
[FriendName] VarChar (50)  NULL ,
[FriendType] Int   NULL ,
[TargetNo] Memo   NULL ,
[Content] Memo   NULL ,
[DateAndTime] DateTime   NULL,
[Errors] Int   NULL DEFAULT 0,
[ErrorNum] Int   NULL ,
[DataLevel] Int   NULL DEFAULT 0,
[UserLevel] Int   NULL DEFAULT 0,
[BatchAmount] Int   NULL DEFAULT 0,
[MyID] Int   NULL DEFAULT 0,
[MyName] VarChar (50)  NULL ,
[MyType] Int   NULL ,
[SchoolID] Int   NULL DEFAULT 0,
[ClassID] Int   NULL DEFAULT 0)
GO


CREATE TABLE [Voucher](
[VoucherID]   COUNTER PRIMARY KEY  ,
[VoucherGroupID] Int   NULL ,
[StudentID] Int   NULL ,
[OpenID] VarChar (100)  NULL ,
[UnionID] VarChar (100)  NULL ,
[DateAndTime] DateTime   NULL ,
[Money] Decimal (18,2)  NULL DEFAULT 0,
[Code] VarChar (100)  NULL ,
[State] Int   NULL DEFAULT 0,
[RecommendID] VarChar (100)  NULL ,
[NickName] VarChar (50)  NULL ,
[Sex] Int   NULL ,
[HeadImgUrl] VarChar (255)  NULL ,
[Province] VarChar (50)  NULL ,
[City] VarChar (50)  NULL ,
[Country] VarChar (50)  NULL )
GO

CREATE TABLE [VoucherGroup](
[VoucherGroupID]   COUNTER PRIMARY KEY  ,
[VoucherGroupName] VarChar (200)  NULL ,
[AdTitle] VarChar (255)  NULL ,
[StartDate] DateTime   NULL ,
[EndDate] DateTime   NULL ,
[CourseTypeID] Int   NULL ,
[CourseID] Int   NULL ,
[Remark] Memo   NULL ,
[Money] Decimal (18,2)  NULL DEFAULT 0,
[MaxMoney] Decimal (18,2)  NULL DEFAULT 0,
[TotalCount] Int   NULL ,
[ReceiveCount] Int   NULL DEFAULT 0)
GO

CREATE TABLE [WXUsers](
[OpenID] VarChar (100)  NULL ,
[UnionID] VarChar (100)  NULL ,
[DateAndTime] DateTime   NULL ,
[CID] Int   NULL ,
[CName] VarChar (50)  NULL ,
[Password] VarChar (50)  NULL ,
[UserType] Int   NULL ,
[NickName] VarChar (50)  NULL ,
[Sex] Int   NULL ,
[HeadImgUrl] VarChar (255)  NULL ,
[Province] VarChar (50)  NULL ,
[City] VarChar (50)  NULL ,
[Country] VarChar (50)  NULL ,
primary  key(OpenID,UnionID))
GO

CREATE TABLE [Printing](
[PrintID]   COUNTER PRIMARY KEY  ,
[Title] VarChar (255)  NULL ,
[Content] Memo   NULL ,
[DateAndTime] DateTime   NULL ,
[UserID] Int   NULL ,
[TrueName] VarChar (50)  NULL ,
[SchoolID] Int   NULL ,
[DocTypeID] Int   NULL ,
[BaseAddress] VarChar (255)  NULL ,
[Args] Memo   NULL )
GO

CREATE TABLE [SubStuAccount](
[StudentID] Int   NULL ,
[SubStudentID] Int   NULL ,
[SubStudentName] VarChar (50)  NULL ,
[SubSex] Int   NULL ,
[SubFace] VarChar (255)  NULL ,
primary  key(StudentID,SubStudentID))
GO

CREATE TABLE [GrabClass](
[GrabClassID]   COUNTER PRIMARY KEY  ,
[ClassID] Int   NULL ,
[StudentID] Int   NULL ,
[DateAndTime] DateTime   NULL )
GO

UPDATE StuRole SET FieldStates = '0,1,2,3,4,7,8,9,10,12,13,14,33,34,35,49,50,51,52,53,55,56,57,58' where StuRoleID = 1
GO

UPDATE StuRole SET FieldStates = '0,1,2,3,4,6,7,8,9,10,12,13,14,36,37,38,48,49,50,51,52,53,55,56,57,58' where StuRoleID = 2
GO


UPDATE FeeItem SET UnitName = '±Ê',QuantifiedType = -1
GO

UPDATE Student SET LockState = 1
GO


Update DBInfo set VersionID = '3.0', DateAndTime='2016-04-14'
GO









