USE [BatchAdmin]
GO

/****** Object:  Table [dbo].[Keystone]    Script Date: 4/2/2014 11:53:41 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Keystone](
	[wsid] [bigint] NOT NULL,
	[keystoneid] [nvarchar](255) NULL,
 CONSTRAINT [PK_Keystone] PRIMARY KEY CLUSTERED 
(
	[wsid] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

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

ALTER TABLE [dbo].[Keystone] CHECK CONSTRAINT [FK_Keystone_Users]
GO

CREATE UNIQUE NONCLUSTERED INDEX [IX_Keystone] ON [dbo].[Keystone]
(
	[keystoneid] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO

