CREATE TABLE [dbo].[Teacher] ( [Id] BIGINT IDENTITY (1, 1) NOT NULL, [Uid] UNIQUEIDENTIFIER NOT NULL, [ApplicationUserFk] BIGINT NOT NULL, CONSTRAINT [PK_Teacher] PRIMARY KEY CLUSTERED ([Id] ASC), CONSTRAINT [FK_Teacher_AspNetUsers_ApplicationUserFk] FOREIGN KEY ([ApplicationUserFk]) REFERENCES [dbo].[AspNetUsers] ([Id]) ); GO CREATE UNIQUE NONCLUSTERED INDEX [IX_Teacher_ApplicationUserFk] ON [dbo].[Teacher]([ApplicationUserFk] ASC);