
Alter Table [Student] ADD [Custom1] varchar(255) 
GO
Alter Table [Student] ADD [Custom2] varchar(255) 
GO
Alter Table [Student] ADD [Custom3] varchar(255) 
GO
Alter Table [Student] ADD [Custom4] varchar(255) 
GO
Alter Table [Student] ADD [Custom5] varchar(255) 
GO

Alter Table [Class] ADD [Custom1] varchar(255) 
GO
Alter Table [Class] ADD [Custom2] varchar(255) 
GO
Alter Table [Class] ADD [Custom3] varchar(255) 
GO
Alter Table [Class] ADD [Custom4] varchar(255) 
GO
Alter Table [Class] ADD [Custom5] varchar(255) 
GO

Alter Table [Potential] ADD [Custom1] varchar(255) 
GO
Alter Table [Potential] ADD [Custom2] varchar(255) 
GO
Alter Table [Potential] ADD [Custom3] varchar(255) 
GO
Alter Table [Potential] ADD [Custom4] varchar(255) 
GO
Alter Table [Potential] ADD [Custom5] varchar(255) 
GO

Alter Table [Potential] ADD [Gatherers] varchar(50) 
GO

Alter Table [Search] ADD [SearchType] int 
GO
Alter Table [Search] ADD [Params] varchar(255) 
GO

Update Search set SearchType = 0 where SearchType is null
GO


CREATE TABLE [dbo].[CustomFields](
[CustomID] [Int]   NOT NULL ,
[CustomName] [NVarChar] (255)  NULL ,
[CustomWidth] [Int]   NULL ,
[TableName] [NVarChar] (50)  NULL ,
[CustomIndex] [Int]   NULL ,
[CustomState] [Int]   NULL ,
[Verify] [Int]   NULL ,

CONSTRAINT [PK_CustomFields] PRIMARY KEY CLUSTERED 
(
	[CustomID] ASC
))
GO

Insert into CustomFields( CustomID, CustomName, CustomWidth, TableName, CustomIndex, CustomState, Verify)
values( 1, '自定义1：', 120, 'Student', 1, 0, 0)
GO
Insert into CustomFields( CustomID, CustomName, CustomWidth, TableName, CustomIndex, CustomState, Verify)
values( 2, '自定义2：', 120, 'Student', 2, 0, 0)
GO
Insert into CustomFields( CustomID, CustomName, CustomWidth, TableName, CustomIndex, CustomState, Verify)
values( 3, '自定义3：', 120, 'Student', 3, 0, 0)
GO
Insert into CustomFields( CustomID, CustomName, CustomWidth, TableName, CustomIndex, CustomState, Verify)
values( 4, '自定义4：', 120, 'Student', 4, 0, 0)
GO
Insert into CustomFields( CustomID, CustomName, CustomWidth, TableName, CustomIndex, CustomState, Verify)
values( 5, '自定义5：', 120, 'Student', 5, 0, 0)
GO

Insert into CustomFields( CustomID, CustomName, CustomWidth, TableName, CustomIndex, CustomState, Verify)
values( 6, '自定义1：', 120, 'Class', 1, 0, 0)
GO
Insert into CustomFields( CustomID, CustomName, CustomWidth, TableName, CustomIndex, CustomState, Verify)
values( 7, '自定义2：', 120, 'Class', 2, 0, 0)
GO
Insert into CustomFields( CustomID, CustomName, CustomWidth, TableName, CustomIndex, CustomState, Verify)
values( 8, '自定义3：', 120, 'Class', 3, 0, 0)
GO
Insert into CustomFields( CustomID, CustomName, CustomWidth, TableName, CustomIndex, CustomState, Verify)
values( 9, '自定义4：', 120, 'Class', 4, 0, 0)
GO
Insert into CustomFields( CustomID, CustomName, CustomWidth, TableName, CustomIndex, CustomState, Verify)
values( 10, '自定义5：', 120, 'Class', 5, 0, 0)
GO

Insert into CustomFields( CustomID, CustomName, CustomWidth, TableName, CustomIndex, CustomState, Verify)
values( 11, '自定义1：', 120, 'Potential', 1, 0, 0)
GO
Insert into CustomFields( CustomID, CustomName, CustomWidth, TableName, CustomIndex, CustomState, Verify)
values( 12, '自定义2：', 120, 'Potential', 2, 0, 0)
GO
Insert into CustomFields( CustomID, CustomName, CustomWidth, TableName, CustomIndex, CustomState, Verify)
values( 13, '自定义3：', 120, 'Potential', 3, 0, 0)
GO
Insert into CustomFields( CustomID, CustomName, CustomWidth, TableName, CustomIndex, CustomState, Verify)
values( 14, '自定义4：', 120, 'Potential', 4, 0, 0)
GO
Insert into CustomFields( CustomID, CustomName, CustomWidth, TableName, CustomIndex, CustomState, Verify)
values( 15, '自定义5：', 120, 'Potential', 5, 0, 0)
GO

Update DBInfo set DateAndTime='2013-05-28'
GO














