[dbo].[PlasticTokenTypeGatewayMap]
CREATE TABLE [dbo].[PlasticTokenTypeGatewayMap]
(
[TokenTypeGatewayMapID] [int] NOT NULL IDENTITY(1, 1),
[TokenTypeFID] [int] NOT NULL,
[ProviderTypeFID] [int] NOT NULL,
[ExternalCode] [varchar] (32) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PlasticTokenTypeGatewayMap] ADD CONSTRAINT [PK_PlasticTokenTypeGatewayMap] PRIMARY KEY CLUSTERED ([TokenTypeGatewayMapID]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_PlasticTokenTypeGatewayMap_ProviderType_ExternalCode] ON [dbo].[PlasticTokenTypeGatewayMap] ([ProviderTypeFID], [ExternalCode]) ON [PRIMARY]
GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_PlasticTokenTypeGatewayMap_TokenType_ProviderType] ON [dbo].[PlasticTokenTypeGatewayMap] ([TokenTypeFID], [ProviderTypeFID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[PlasticTokenTypeGatewayMap] ADD CONSTRAINT [FK_PlasticTokenTypeGatewayMap_ProviderTypeFID] FOREIGN KEY ([ProviderTypeFID]) REFERENCES [dbo].[PlasticProviderType] ([ProviderTypeID])
GO
ALTER TABLE [dbo].[PlasticTokenTypeGatewayMap] ADD CONSTRAINT [FK_PlasticTokenTypeGatewayMap_TokenTypeFID] FOREIGN KEY ([TokenTypeFID]) REFERENCES [dbo].[PlasticTokenType] ([TokenTypeID])
GO
GRANT SELECT ON [dbo].[PlasticTokenTypeGatewayMap] TO [MssExec]
GRANT INSERT ON [dbo].[PlasticTokenTypeGatewayMap] TO [MssExec]
GRANT DELETE ON [dbo].[PlasticTokenTypeGatewayMap] TO [MssExec]
GRANT UPDATE ON [dbo].[PlasticTokenTypeGatewayMap] TO [MssExec]
GO