USE [ep5BAStest]
GO

/****** Object:  Table [dbo].[TaskSchedulerEvent]    Script Date: Sunday 14 Dec 2025 8:31:38 AM ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[TaskSchedulerEvent](
	[recordID] [int] IDENTITY(1,1) NOT NULL,
	[recipeID] [int] NOT NULL,
	[channelNmbr] [int] NOT NULL,
	[doDayOfWeek] [tinyint] NOT NULL,
	[earlyBound] [time](7) NOT NULL,
	[laterBound] [time](7) NOT NULL,
	[whenEntered] [datetime2](2) NOT NULL,
	[whenEdited] [datetime2](2) NOT NULL,
	[enteredBy] [int] NOT NULL,
	[editedBy] [int] NOT NULL,
	[digitalValue] [tinyint] NOT NULL,
	[notes] [nvarchar](max) NULL,
	[status] [tinyint] NOT NULL,
 CONSTRAINT [PrimaryKeyByRecordID] PRIMARY KEY CLUSTERED 
(
	[recordID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

/****** Object:  Index [IndexByRecipeIDandDayOfWeekAndEarlyBound]    Script Date: Sunday 14 Dec 2025 8:33:29 AM ******/
CREATE NONCLUSTERED INDEX [IndexByRecipeIDandDayOfWeekAndEarlyBound] ON [dbo].[TaskSchedulerEvent]
(
	[recipeID] ASC,
	[doDayOfWeek] ASC,
	[earlyBound] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
GO

