   
 /***************************************************
 *
 *	2004.11.01
 *	You should make the database named 'CharDelHostory' before you execute this script
 ***************************************************/
 GO
 
 USE CharDelHistory
 
 GO
 
 CREATE TABLE [dbo].[DelCharInfo] (
	[NewServerGroupID] TINYINT NOT NULL,
	[CID] [int] NOT NULL ,
	[Name] [varchar] (16)  NULL ,
	[Sex] [tinyint] NULL ,
	[Hair] [tinyint] NULL ,
	[Face] [tinyint] NULL ,
	[Race] [tinyint] NULL ,
	[Class] [smallint] NULL ,
	[Fame] [int] NULL ,
	[Mileage] [int] NULL ,
	[Guild] [int] NULL ,
	[Party] [int] NULL ,
	[Level] [tinyint] NULL ,
	[Equip] [binary] (30) NULL ,
	[Gold] [int] NULL ,
	[IP] [smallint] NULL ,
	[STR] [smallint] NULL ,
	[DEX] [smallint] NULL ,
	[CON] [smallint] NULL ,
	[Intell] [smallint] NULL ,
	[WIS] [smallint] NULL ,
	[HP] [smallint] NULL ,
	[MP] [smallint] NULL ,
	[Exp] [bigint] NULL ,
	[Chance] [tinyint] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[DelCharItem] (
	[NewServerGroupID] TINYINT NOT NULL,
	[CID] [int] NOT NULL ,
	[Quick] [binary] (100) NULL ,
	[Equip] [binary] (1440) NULL ,
	[Inventory] [binary] (5120) NULL ,
	[Extra] [binary] (512) NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[DelCharItemEx] (
	[NewServerGroupID] TINYINT NOT NULL ,
	[CID] [int] NOT NULL ,
	[Exchange] [binary] (1284) NULL ,
	[TempInven] [binary] (1440) NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[DelCharSkill] (
	[NewServerGroupID] TINYINT NOT NULL ,
	[CID] [int] NOT NULL ,
	[Skill] [binary] (84) NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[TblCharDelHistory_LOG] (
	[intCID] [int] NULL ,
	[intUID] [int] NULL ,
	[dateInsertTime] [smalldatetime] NULL ,
	[dateDeleteTime] [smalldatetime] NULL ,
	[NewServerGroupID]	TINYINT		NULL ,
	[OldServerGroupID]  TINYINT		NULL
) ON [PRIMARY]
GO

 CREATE  INDEX [IDX_DelCharInfo_CID] ON [dbo].[DelCharInfo]([CID],[NewServerGroupID]) ON [PRIMARY]
GO


 CREATE  INDEX [IDX_DelCharItem_CID] ON [dbo].[DelCharItem]([CID],[NewServerGroupID]) ON [PRIMARY]
GO

 CREATE  INDEX [IDX_DelCharItemEx_CID] ON [dbo].[DelCharItemEx]([CID],[NewServerGroupID]) ON [PRIMARY]
GO

 CREATE  INDEX [IDX_DelCharSkill_CID] ON [dbo].[DelCharSkill]([CID],[NewServerGroupID]) ON [PRIMARY]
GO

