CREATE TABLE [dbo].[Dv_Plus_Avatar_Accouterment] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[PhotoID] [int] NULL ,
	[ItemID] [int] NULL ,
	[OuterLeft] [int] NULL ,
	[OuterTop] [int] NULL ,
	[OuterWidth] [int] NULL ,
	[OuterHeight] [int] NULL ,
	[InnerLeft] [int] NULL ,
	[InnerTop] [int] NULL ,
	[InnerWidth] [int] NULL ,
	[InnerHeight] [int] NULL ,
	[Direction] [int] NULL ,
	[SeqNo] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Dv_Plus_Avatar_Config] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Avatar_Setting] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[NextMatchDate] [datetime] NULL ,
	[NextMatchSeqNo] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Dv_Plus_Avatar_Favorite] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[ItemID] [int] NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddDate] [datetime] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Dv_Plus_Avatar_Items] (
	[ID] [int] NOT NULL ,
	[Name] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Sex] [int] NULL ,
	[Content] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Type] [int] NULL ,
	[Price1] [int] NULL ,
	[Price2] [int] NULL ,
	[Period] [int] NULL ,
	[Flag] [int] NULL ,
	[Quantity] [int] NULL ,
	[Vip] [int] NULL ,
	[DateAndTime] [datetime] NULL ,
	[TotalSales] [int] NULL ,
	[Class] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Dv_Plus_Avatar_MyItems] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[ItemID] [int] NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[FromUser] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Type] [int] NULL ,
	[AddDate] [datetime] NULL ,
	[FixDate] [datetime] NULL ,
	[Period] [int] NULL ,
	[Price] [int] NULL ,
	[SalePrice] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Dv_Plus_Avatar_Photo] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[FromUser] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Status] [int] NULL ,
	[UploadFile] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[Background] [int] NULL ,
	[BackBody] [int] NULL ,
	[ForeBody] [int] NULL ,
	[Foreground] [int] NULL ,
	[Width] [int] NULL ,
	[Height] [int] NULL ,
	[Child] [int] NULL ,
	[AddDate] [datetime] NULL ,
	[Confirmed] [int] NULL ,
	[EndDate] [datetime] NULL ,
	[PhotoNameLeft] [int] NULL ,
	[PhotoNameTop] [int] NULL ,
	[PhotoNameFont] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PhotoNameSize] [int] NULL ,
	[PhotoNameBold] [int] NULL ,
	[PhotoNameItalic] [int] NULL ,
	[PhotoNameColor] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PhotoNameDirection] [int] NULL ,
	[DateLeft] [int] NULL ,
	[DateTop] [int] NULL ,
	[DateFont] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[DateSize] [int] NULL ,
	[DateBold] [int] NULL ,
	[DateItalic] [int] NULL ,
	[DateColor] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[DateDirection] [int] NULL ,
	[FinishDate] [datetime] NULL ,
	[Finished] [int] NULL ,
	[URL] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Dv_Plus_Avatar_PhotoUser] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[PhotoID] [int] NULL ,
	[UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserAvaSetting] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Confirmed] [int] NULL ,
	[ConfirmTime] [datetime] NULL ,
	[OuterLeft] [int] NULL ,
	[OuterTop] [int] NULL ,
	[OuterWidth] [int] NULL ,
	[OuterHeight] [int] NULL ,
	[InnerLeft] [int] NULL ,
	[InnerTop] [int] NULL ,
	[InnerWidth] [int] NULL ,
	[InnerHeight] [int] NULL ,
	[Direction] [int] NULL ,
	[NameLeft] [int] NULL ,
	[NameTop] [int] NULL ,
	[NameFont] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[NameSize] [int] NULL ,
	[NameBold] [int] NULL ,
	[NameItalic] [int] NULL ,
	[NameColor] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[NameDirection] [int] NULL ,
	[LayerNo] [int] NULL ,
	[Finished] [int] NULL ,
	[Deleted] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Dv_Plus_Avatar_RemoteLogs] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[UserID] [int] NULL ,
	[PhotoID] [int] NULL ,
	[PhotoName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PhotoDate] [datetime] NULL ,
	[PhotoSponsor] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[PhotoParticipator] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[PhotoUserCount] [int] NULL ,
	[CreateDate] [datetime] NULL ,
	[UseMoney] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[Dv_Plus_Avatar_RemoteUser] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[UserID] [int] NULL ,
	[UserPassword] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[UserIP] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[AddDate] [datetime] NULL ,
	[UserStatus] [int] NULL ,
	[PhotoCount] [int] NULL ,
	[UseMoney] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Dv_Plus_Avatar_SubType] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[TypeID] [int] NULL ,
	[SubTypeName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[ParentSubType] [int] NULL ,
	[Orders] [int] NULL ,
	[Visible] [int] NULL ,
	[MyType] [int] NULL ,
	[QQType] [int] NULL ,
	[DefPrice1] [int] NULL ,
	[DefPrice2] [int] NULL ,
	[DefPeriod] [int] NULL ,
	[DefQuantity] [int] NULL ,
	[DefFlag] [int] NULL ,
	[DefVIP] [int] NULL ,
	[isBig] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[Dv_Plus_Avatar_Type] (
	[ID] [int] IDENTITY (1, 1) NOT NULL ,
	[TypeName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Orders] [int] NULL ,
	[Visible] [int] NULL 
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_Accouterment] WITH NOCHECK ADD 
	CONSTRAINT [PK_Dv_Plus_Avatar_Accouterment] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_Config] WITH NOCHECK ADD 
	CONSTRAINT [PK_Dv_Plus_Avatar_Config] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_Favorite] WITH NOCHECK ADD 
	CONSTRAINT [PK_Dv_Plus_Avatar_Favorite] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_Items] WITH NOCHECK ADD 
	CONSTRAINT [PK_Dv_Plus_Avatar_Items] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_MyItems] WITH NOCHECK ADD 
	CONSTRAINT [PK_Dv_Plus_Avatar_MyItems] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_Photo] WITH NOCHECK ADD 
	CONSTRAINT [PK_Dv_Plus_Avatar_Photo] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_PhotoUser] WITH NOCHECK ADD 
	CONSTRAINT [PK_Dv_Plus_Avatar_PhotoUser] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_RemoteLogs] WITH NOCHECK ADD 
	CONSTRAINT [PK_Dv_Plus_Avatar_RemoteLogs] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_RemoteUser] WITH NOCHECK ADD 
	CONSTRAINT [PK_Dv_Plus_Avatar_RemoteUser] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_SubType] WITH NOCHECK ADD 
	CONSTRAINT [PK_Dv_Plus_Avatar_SubType] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_Type] WITH NOCHECK ADD 
	CONSTRAINT [PK_Dv_Plus_Avatar_Type] PRIMARY KEY  CLUSTERED 
	(
		[ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_Accouterment] ADD 
	CONSTRAINT [DF_Dv_Plus_Avatar_Accouterment_PhotoID] DEFAULT (0) FOR [PhotoID],
	CONSTRAINT [DF_Dv_Plus_Avatar_Accouterment_ItemID] DEFAULT (0) FOR [ItemID],
	CONSTRAINT [DF_Dv_Plus_Avatar_Accouterment_OuterLeft] DEFAULT (0) FOR [OuterLeft],
	CONSTRAINT [DF_Dv_Plus_Avatar_Accouterment_OuterTop] DEFAULT (0) FOR [OuterTop],
	CONSTRAINT [DF_Dv_Plus_Avatar_Accouterment_OuterWidth] DEFAULT (0) FOR [OuterWidth],
	CONSTRAINT [DF_Dv_Plus_Avatar_Accouterment_OuterHeight] DEFAULT (0) FOR [OuterHeight],
	CONSTRAINT [DF_Dv_Plus_Avatar_Accouterment_InnerLeft] DEFAULT (0) FOR [InnerLeft],
	CONSTRAINT [DF_Dv_Plus_Avatar_Accouterment_InnerTop] DEFAULT (0) FOR [InnerTop],
	CONSTRAINT [DF_Dv_Plus_Avatar_Accouterment_InnerWidth] DEFAULT (0) FOR [InnerWidth],
	CONSTRAINT [DF_Dv_Plus_Avatar_Accouterment_InnerHeight] DEFAULT (0) FOR [InnerHeight],
	CONSTRAINT [DF_Dv_Plus_Avatar_Accouterment_Direction] DEFAULT (0) FOR [Direction],
	CONSTRAINT [DF_Dv_Plus_Avatar_Accouterment_SeqNo] DEFAULT (0) FOR [SeqNo]
GO

 CREATE  INDEX [Accouterment_PhotoID] ON [dbo].[Dv_Plus_Avatar_Accouterment]([PhotoID]) ON [PRIMARY]
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_Favorite] ADD 
	CONSTRAINT [DF_Dv_Plus_Avatar_Favorite_ItemID] DEFAULT (0) FOR [ItemID],
	CONSTRAINT [DF_Dv_Plus_Avatar_Favorite_AddDate] DEFAULT (getdate()) FOR [AddDate]
GO

 CREATE  INDEX [Favorite_ItemID] ON [dbo].[Dv_Plus_Avatar_Favorite]([ItemID]) ON [PRIMARY]
GO

 CREATE  INDEX [Favorite_UserName] ON [dbo].[Dv_Plus_Avatar_Favorite]([UserName]) ON [PRIMARY]
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_Items] ADD 
	CONSTRAINT [DF_Dv_Plus_Avatar_Items_Sex] DEFAULT (2) FOR [Sex],
	CONSTRAINT [DF_Dv_Plus_Avatar_Items_Type] DEFAULT (0) FOR [Type],
	CONSTRAINT [DF_Dv_Plus_Avatar_Items_Price1] DEFAULT (0) FOR [Price1],
	CONSTRAINT [DF_Dv_Plus_Avatar_Items_Price2] DEFAULT (0) FOR [Price2],
	CONSTRAINT [DF_Dv_Plus_Avatar_Items_Period] DEFAULT (10) FOR [Period],
	CONSTRAINT [DF_Dv_Plus_Avatar_Items_Flag] DEFAULT (1) FOR [Flag],
	CONSTRAINT [DF_Dv_Plus_Avatar_Items_Quantity] DEFAULT (15) FOR [Quantity],
	CONSTRAINT [DF_Dv_Plus_Avatar_Items_Vip] DEFAULT (0) FOR [Vip],
	CONSTRAINT [DF_Dv_Plus_Avatar_Items_DateAndTime] DEFAULT (getdate()) FOR [DateAndTime],
	CONSTRAINT [DF_Dv_Plus_Avatar_Items_TotalSales] DEFAULT (0) FOR [TotalSales],
	CONSTRAINT [DF_Dv_Plus_Avatar_Items_Class] DEFAULT (0) FOR [Class]
GO

 CREATE  INDEX [Items_Sex] ON [dbo].[Dv_Plus_Avatar_Items]([Sex]) ON [PRIMARY]
GO

 CREATE  INDEX [Items_Type] ON [dbo].[Dv_Plus_Avatar_Items]([Type]) ON [PRIMARY]
GO

 CREATE  INDEX [Items_Flag] ON [dbo].[Dv_Plus_Avatar_Items]([Flag]) ON [PRIMARY]
GO

 CREATE  INDEX [Items_TotalSales] ON [dbo].[Dv_Plus_Avatar_Items]([TotalSales]) ON [PRIMARY]
GO

 CREATE  INDEX [Items_Class] ON [dbo].[Dv_Plus_Avatar_Items]([Class]) ON [PRIMARY]
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_MyItems] ADD 
	CONSTRAINT [DF_Dv_Plus_Avatar_MyItems_ItemID] DEFAULT (0) FOR [ItemID],
	CONSTRAINT [DF_Dv_Plus_Avatar_MyItems_Type] DEFAULT (0) FOR [Type],
	CONSTRAINT [DF_Dv_Plus_Avatar_MyItems_AddDate] DEFAULT (getdate()) FOR [AddDate],
	CONSTRAINT [DF_Dv_Plus_Avatar_MyItems_FixDate] DEFAULT (getdate()) FOR [FixDate],
	CONSTRAINT [DF_Dv_Plus_Avatar_MyItems_Period] DEFAULT (0) FOR [Period],
	CONSTRAINT [DF_Dv_Plus_Avatar_MyItems_Price] DEFAULT (0) FOR [Price],
	CONSTRAINT [DF_Dv_Plus_Avatar_MyItems_SalePrice] DEFAULT (0) FOR [SalePrice]
GO

 CREATE  INDEX [MyItems_FromUser] ON [dbo].[Dv_Plus_Avatar_MyItems]([FromUser]) ON [PRIMARY]
GO

 CREATE  INDEX [MyItems_ItemID] ON [dbo].[Dv_Plus_Avatar_MyItems]([ItemID]) ON [PRIMARY]
GO

 CREATE  INDEX [MyItems_UserItem] ON [dbo].[Dv_Plus_Avatar_MyItems]([ItemID], [UserName]) ON [PRIMARY]
GO

 CREATE  INDEX [MyItems_Type] ON [dbo].[Dv_Plus_Avatar_MyItems]([Type]) ON [PRIMARY]
GO

 CREATE  INDEX [MyItems_UserName] ON [dbo].[Dv_Plus_Avatar_MyItems]([UserName]) ON [PRIMARY]
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_Photo] ADD 
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_Status] DEFAULT (0) FOR [Status],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_Background] DEFAULT (0) FOR [Background],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_BackBody] DEFAULT (0) FOR [BackBody],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_ForeBody] DEFAULT (0) FOR [ForeBody],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_Foreground] DEFAULT (0) FOR [Foreground],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_Width] DEFAULT (0) FOR [Width],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_Height] DEFAULT (0) FOR [Height],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_Child] DEFAULT (0) FOR [Child],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_Confirmed] DEFAULT (0) FOR [Confirmed],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_PhotoNameLeft] DEFAULT (0) FOR [PhotoNameLeft],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_PhotoNameTop] DEFAULT (0) FOR [PhotoNameTop],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_PhotoNameSize] DEFAULT (0) FOR [PhotoNameSize],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_PhotoNameBold] DEFAULT (0) FOR [PhotoNameBold],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_PhotoNameItalic] DEFAULT (0) FOR [PhotoNameItalic],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_PhotoNameDirection] DEFAULT (0) FOR [PhotoNameDirection],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_DateLeft] DEFAULT (0) FOR [DateLeft],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_DateTop] DEFAULT (0) FOR [DateTop],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_DateSize] DEFAULT (0) FOR [DateSize],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_DateBold] DEFAULT (0) FOR [DateBold],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_DateItalic] DEFAULT (0) FOR [DateItalic],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_DateDirection] DEFAULT (0) FOR [DateDirection],
	CONSTRAINT [DF_Dv_Plus_Avatar_Photo_Finished] DEFAULT (0) FOR [Finished]
GO

 CREATE  INDEX [Photo_UserEnd] ON [dbo].[Dv_Plus_Avatar_Photo]([EndDate], [FromUser], [Confirmed]) ON [PRIMARY]
GO

 CREATE  INDEX [Photo_UserConfirmed] ON [dbo].[Dv_Plus_Avatar_Photo]([Confirmed], [FromUser], [Status]) ON [PRIMARY]
GO

 CREATE  INDEX [Photo_UserURL] ON [dbo].[Dv_Plus_Avatar_Photo]([FromUser], [URL]) ON [PRIMARY]
GO

 CREATE  INDEX [Photo_Status] ON [dbo].[Dv_Plus_Avatar_Photo]([Status]) ON [PRIMARY]
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_PhotoUser] ADD 
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_PhotoID] DEFAULT (0) FOR [PhotoID],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_Confirmed] DEFAULT (0) FOR [Confirmed],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_OuterLeft] DEFAULT (0) FOR [OuterLeft],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_OuterTop] DEFAULT (0) FOR [OuterTop],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_OuterWidth] DEFAULT (0) FOR [OuterWidth],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_OuterHeight] DEFAULT (0) FOR [OuterHeight],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_InnerLeft] DEFAULT (0) FOR [InnerLeft],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_InnerTop] DEFAULT (0) FOR [InnerTop],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_InnerWidth] DEFAULT (0) FOR [InnerWidth],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_InnerHeight] DEFAULT (0) FOR [InnerHeight],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_Direction] DEFAULT (0) FOR [Direction],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_NameLeft] DEFAULT (0) FOR [NameLeft],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_NameTop] DEFAULT (0) FOR [NameTop],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_NameSize] DEFAULT (0) FOR [NameSize],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_NameBold] DEFAULT (0) FOR [NameBold],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_NameItalic] DEFAULT (0) FOR [NameItalic],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_NameDirection] DEFAULT (0) FOR [NameDirection],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_LayerNo] DEFAULT (0) FOR [LayerNo],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_Finished] DEFAULT (0) FOR [Finished],
	CONSTRAINT [DF_Dv_Plus_Avatar_PhotoUser_Deleted] DEFAULT (0) FOR [Deleted]
GO

 CREATE  INDEX [PhotoUser_PhotoID] ON [dbo].[Dv_Plus_Avatar_PhotoUser]([PhotoID]) ON [PRIMARY]
GO

 CREATE  INDEX [PhotoUser_UserConfirmed] ON [dbo].[Dv_Plus_Avatar_PhotoUser]([UserName], [Confirmed]) ON [PRIMARY]
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_RemoteLogs] ADD 
	CONSTRAINT [DF_Dv_Plus_Avatar_RemoteLogs_PhotoUserCount] DEFAULT (0) FOR [PhotoUserCount],
	CONSTRAINT [DF_Dv_Plus_Avatar_RemoteLogs_CreateDate] DEFAULT (getdate()) FOR [CreateDate]
GO

 CREATE  INDEX [RemoteLogs_UserID] ON [dbo].[Dv_Plus_Avatar_RemoteLogs]([UserID]) ON [PRIMARY]
GO

 CREATE  INDEX [RemoteLogs_PhotoID] ON [dbo].[Dv_Plus_Avatar_RemoteLogs]([PhotoID]) ON [PRIMARY]
GO

 CREATE  INDEX [RemoteLogs_PhotoSponsor] ON [dbo].[Dv_Plus_Avatar_RemoteLogs]([PhotoSponsor]) ON [PRIMARY]
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_RemoteUser] ADD 
	CONSTRAINT [DF_Dv_Plus_Avatar_RemoteUser_AddDate] DEFAULT (getdate()) FOR [AddDate],
	CONSTRAINT [DF_Dv_Plus_Avatar_RemoteUser_UserStatus] DEFAULT (0) FOR [UserStatus],
	CONSTRAINT [DF_Dv_Plus_Avatar_RemoteUser_PhotoCount] DEFAULT (0) FOR [PhotoCount],
	CONSTRAINT [DF_Dv_Plus_Avatar_RemoteUser_UseMoney] DEFAULT (0) FOR [UseMoney]
GO

 CREATE  INDEX [RemoteUser_UserID] ON [dbo].[Dv_Plus_Avatar_RemoteUser]([UserID]) ON [PRIMARY]
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_SubType] ADD 
	CONSTRAINT [DF_Dv_Plus_Avatar_SubType_TypeID] DEFAULT (0) FOR [TypeID],
	CONSTRAINT [DF_Dv_Plus_Avatar_SubType_ParentSubType] DEFAULT (0) FOR [ParentSubType],
	CONSTRAINT [DF_Dv_Plus_Avatar_SubType_Orders] DEFAULT (0) FOR [Orders],
	CONSTRAINT [DF_Dv_Plus_Avatar_SubType_Visible] DEFAULT (0) FOR [Visible],
	CONSTRAINT [DF_Dv_Plus_Avatar_SubType_MyType] DEFAULT (0) FOR [MyType],
	CONSTRAINT [DF_Dv_Plus_Avatar_SubType_QQType] DEFAULT (0) FOR [QQType],
	CONSTRAINT [DF_Dv_Plus_Avatar_SubType_DefPrice1] DEFAULT (0) FOR [DefPrice1],
	CONSTRAINT [DF_Dv_Plus_Avatar_SubType_DefPrice2] DEFAULT (0) FOR [DefPrice2],
	CONSTRAINT [DF_Dv_Plus_Avatar_SubType_isBig] DEFAULT (0) FOR [isBig]
GO

 CREATE  INDEX [SubType_TypeID] ON [dbo].[Dv_Plus_Avatar_SubType]([TypeID]) ON [PRIMARY]
GO

 CREATE  INDEX [SubType_MyType] ON [dbo].[Dv_Plus_Avatar_SubType]([MyType]) ON [PRIMARY]
GO

ALTER TABLE [dbo].[Dv_Plus_Avatar_Type] ADD 
	CONSTRAINT [DF_Dv_Plus_Avatar_Type_Orders] DEFAULT (0) FOR [Orders],
	CONSTRAINT [DF_Dv_Plus_Avatar_Type_Visible] DEFAULT (0) FOR [Visible]
GO

