USE [CJBatchAdmin]

CREATE TABLE [dbo].[OpenID](
	[wsid] [bigint] NOT NULL,
	[openid] [nvarchar](255) NOT NULL,
	CONSTRAINT [PK_OpenID] PRIMARY KEY CLUSTERED 
	(
		[wsid] ASC,
		[openid] ASC
	) ON [PRIMARY]
) ON [PRIMARY]
GO

CREATE UNIQUE NONCLUSTERED INDEX [IX_OpenID] ON [dbo].[OpenID]
(
	[openid] ASC
) ON [PRIMARY]
GO

ALTER TABLE [dbo].[OpenID]  WITH CHECK ADD  CONSTRAINT [FK_OpenID_Users] FOREIGN KEY([wsid])
REFERENCES [batch].[Users] ([WebServicesID])
ON DELETE CASCADE
GO

ALTER TABLE [dbo].[OpenID] CHECK CONSTRAINT [FK_OpenID_Users]
GO

ALTER TABLE [batch].[Jobs] 
  ALTER COLUMN [Message] VARCHAR(MAX)
GO

INSERT INTO [dbo].[Output] (OutputType, Description, Path, URL, Visible) SELECT 'GZIP','Comma Separated Values (GZIP)',Path,URL,Visible FROM [dbo].[Output] WHERE OutputType='CSV'
