-- BA/20110304: We need to make LogNumberCreate a part of the Primary Key
--              or the new Swipe Card Manager will fail to insert cards.
IF EXISTS (SELECT name FROM SysIndexes(NOLOCK) WHERE name = 
          'PK_FolioCardXTab')
begin
         ALTER TABLE FolioCardXTab
         Drop CONSTRAINT [PK_FolioCardXTab]
end

ALTER TABLE FolioCardXTab WITH NOCHECK 
ADD CONSTRAINT [PK_FolioCardXTab] PRIMARY KEY CLUSTERED 
(
         [FolioNumber] DESC,
         [FK_Card] ASC,
         [LogNumberCreate] ASC
) ON [PRIMARY]
GO
