CREATE TABLE [dbo].[AggregatedCounter](
[Key] [nvarchar](100) NOT NULL,
[Value] [bigint] NOT NULL,
[ExpireAt] [datetime] NULL,
CONSTRAINT [PK_HangFire_CounterAggregated] PRIMARY KEY CLUSTERED
([Key] 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
CREATE TABLE [dbo].[Counter](
[Key] [nvarchar](100) NOT NULL,
[Value] [int] NOT NULL,
[ExpireAt] [datetime] NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[Hash](
[Key] [nvarchar](100) NOT NULL,
[Field] [nvarchar](100) NOT NULL,
[Value] [nvarchar](max) NULL,
[ExpireAt] [datetime2](7) NULL,
CONSTRAINT [PK_HangFire_Hash] PRIMARY KEY CLUSTERED
([Key] ASC,[Field] ASC)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[Job](
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[StateId] [bigint] NULL,
[StateName] [nvarchar](20) NULL,
[InvocationData] [nvarchar](max) NOT NULL,
[Arguments] [nvarchar](max) NOT NULL,
[CreatedAt] [datetime] NOT NULL,
[ExpireAt] [datetime] NULL,
CONSTRAINT [PK_HangFire_Job] 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] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[JobParameter](
[JobId] [bigint] NOT NULL,
[Name] [nvarchar](40) NOT NULL,
[Value] [nvarchar](max) NULL,
CONSTRAINT [PK_HangFire_JobParameter] PRIMARY KEY CLUSTERED
([JobId] ASC, [Name] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[JobQueue](
[Id] [int] IDENTITY(1,1) NOT NULL,
[JobId] [bigint] NOT NULL,
[Queue] [nvarchar](50) NOT NULL,
[FetchedAt] [datetime] NULL,
CONSTRAINT [PK_HangFire_JobQueue] PRIMARY KEY CLUSTERED
([Queue] ASC,
[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
CREATE TABLE [dbo].[List](
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[Key] [nvarchar](100) NOT NULL,
[Value] [nvarchar](max) NULL,
[ExpireAt] [datetime] NULL,
CONSTRAINT [PK_HangFire_List] PRIMARY KEY CLUSTERED
([Key] ASC, [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] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[Schema](
[Version] [int] NOT NULL,
CONSTRAINT [PK_HangFire_Schema] PRIMARY KEY CLUSTERED
( [Version] 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
CREATE TABLE [dbo].[Server](
[Id] [nvarchar](100) NOT NULL,
[Data] [nvarchar](max) NULL,
[LastHeartbeat] [datetime] NOT NULL,
CONSTRAINT [PK_HangFire_Server] 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] TEXTIMAGE_ON [PRIMARY]
GO
CREATE TABLE [dbo].[Set](
[Key] [nvarchar](100) NOT NULL,
[Score] [float] NOT NULL,
[Value] [nvarchar](256) NOT NULL,
[ExpireAt] [datetime] NULL,
CONSTRAINT [PK_HangFire_Set] PRIMARY KEY CLUSTERED
([Key] ASC, [Value] 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
CREATE TABLE [dbo].[State](
[Id] [bigint] IDENTITY(1,1) NOT NULL,
[JobId] [bigint] NOT NULL,
[Name] [nvarchar](20) NOT NULL,
[Reason] [nvarchar](100) NULL,
[CreatedAt] [datetime] NOT NULL,
[Data] [nvarchar](max) NULL,
CONSTRAINT [PK_HangFire_State] PRIMARY KEY CLUSTERED
([JobId] ASC,[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] TEXTIMAGE_ON [PRIMARY]