IF NOT EXISTS(
  SELECT * FROM sys.tables WHERE name = 'WebHookRegistrations')
BEGIN
	CREATE TABLE [dbo].[WebHookRegistrations] (
		[Id] int IDENTITY(1,1) NOT NULL,
		[WebHookEvent] int  NOT NULL,
		[Url] nvarchar(max)  NOT NULL,
		[Enabled] bit  NOT NULL
	);
	
	ALTER TABLE [dbo].[WebHookRegistrations]
	ADD CONSTRAINT [PK_WebHookRegistrations]
		PRIMARY KEY CLUSTERED ([Id] ASC);
END;