CREATE TABLE [MacOSPatch_DeviceConfiguration] (
	[DeviceID] int NOT NULL,
	[CheckForUpdates] bit NOT NULL,
	[DownloadNewUpdates] bit NOT NULL,
	[InstallMacOSUpdates] bit NOT NULL,
	[InstallSecurityUpdates] bit NOT NULL,
	[LastUpdateTime] DateTime DEFAULT GETDATE(),
	CONSTRAINT [PK_MacOSPatch_DeviceConfiguration] PRIMARY KEY CLUSTERED ([DeviceID])
)
GO

ALTER TABLE [MacOSPatch_DeviceConfiguration] ADD CONSTRAINT [FK_MacOSPatch_DeviceConfiguration_Device] FOREIGN KEY([DeviceID])
REFERENCES [Device] ([DeviceID]) ON DELETE CASCADE ON UPDATE CASCADE
GO
