text: ﻿CREATE TABLE [IdentityServer].[ApiSecrets]
  (
  	[Id] [int] IDENTITY(1,1) NOT NULL,
  	[Description] [nvarchar](1000) NULL,
  	[Value] [nvarchar](4000) NOT NULL,
  	[Expiration] [datetime2](7) NULL,
  	[Type] [nvarchar](250) NOT NULL,
  	[Created] [datetime2](7) NOT NULL,
  	[ApiResourceId] [int] NOT NULL,
  	CONSTRAINT [PK_ApiSecrets] 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].[ApiSecrets] ADD CONSTRAINT [FK_ApiSecrets_ApiResources_ApiResourceId] FOREIGN KEY([ApiResourceId])
  REFERENCES [IdentityServer].[ApiResources] ([Id])
  ON DELETE CASCADE
  GO
  
  ALTER TABLE [IdentityServer].[ApiSecrets] CHECK CONSTRAINT [FK_ApiSecrets_ApiResources_ApiResourceId]
  GO