text: ﻿CREATE TABLE [IdentityServer].[ClientScopes]
  (
  	[Id] [int] IDENTITY(1,1) NOT NULL,
  	[Scope] [nvarchar](200) NOT NULL,
  	[ClientId] [int] NOT NULL,
  	CONSTRAINT [PK_ClientScopes] PRIMARY KEY CLUSTERED 
  	(
  		[Id] 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 [IdentityServer].[ClientScopes] ADD CONSTRAINT [FK_ClientScopes_Clients_ClientId] FOREIGN KEY([ClientId])
  REFERENCES [IdentityServer].[Clients] ([Id])
  ON DELETE CASCADE
  GO
  
  ALTER TABLE [IdentityServer].[ClientScopes] CHECK CONSTRAINT [FK_ClientScopes_Clients_ClientId]
  GO