Skip to content

Instantly share code, notes, and snippets.

@imarlovic
imarlovic / drop_hangfire_tables.sql
Created February 8, 2021 23:46
SQL Script for Hangfire - drop all Hangfire tables, reset Hangfire database
GO
PRINT N'Dropping [HangFire].[FK_HangFire_State_Job]...';
GO
ALTER TABLE [HangFire].[State] DROP CONSTRAINT [FK_HangFire_State_Job];
GO
PRINT N'Dropping [HangFire].[FK_HangFire_JobParameter_Job]...';
GO
ALTER TABLE [HangFire].[JobParameter] DROP CONSTRAINT [FK_HangFire_JobParameter_Job];
GO
PRINT N'Dropping [HangFire].[Schema]...';