﻿CREATE TABLE [dbo].[Moderator] (
    [Id]                BIGINT           IDENTITY (1, 1) NOT NULL,
    [Uid]               UNIQUEIDENTIFIER NOT NULL,
    [ApplicationUserFk] BIGINT           NOT NULL,
    CONSTRAINT [PK_Moderator] PRIMARY KEY CLUSTERED ([Id] ASC),
    CONSTRAINT [FK_Moderator_AspNetUsers_ApplicationUserFk] FOREIGN KEY ([ApplicationUserFk]) REFERENCES [dbo].[AspNetUsers] ([Id])
);


GO
CREATE UNIQUE NONCLUSTERED INDEX [IX_Moderator_ApplicationUserFk]
    ON [dbo].[Moderator]([ApplicationUserFk] ASC);

