Tables [dbo].[ManagedConsumables]
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)0
Created1:20:03 AM Thursday, March 21, 2019
Last Modified1:20:25 AM Thursday, March 21, 2019
KeyNameData TypeMax Length (Bytes)Allow NullsDefault
Cluster Primary Key PK_ManagedConsumables_DeviceID_ConsumableHashCode: DeviceID\ConsumableHashCodeForeign Keys FK_ManagedConsumables_DeviceID_Device_DeviceID: [dbo].[Device].DeviceIDDeviceIDint4
False
Cluster Primary Key PK_ManagedConsumables_DeviceID_ConsumableHashCode: DeviceID\ConsumableHashCodeConsumableHashCodeint4
False
ConsumableNamevarchar(100)100
False
ConsumableRemainingLevelfloat8
False
HigherValueThresholdfloat8
False
StaleUnitssmallint2
False
StaleIntervalsmallint2
False
EstimatedStaleDatedatetime8
False
ConsumableTypeExtendedsmallint2
False
((0))
IsMarkedOnActionPerformedbit1
False
((0))
DismissDatedatetime8
True
DismissedByContactIDint4
True
IsNormalizedSupplybit1
True
((0))
KeyNameKey ColumnsUnique
Cluster Primary Key PK_ManagedConsumables_DeviceID_ConsumableHashCode: DeviceID\ConsumableHashCodePK_ManagedConsumables_DeviceID_ConsumableHashCodeDeviceID, ConsumableHashCode
True
NameDeleteColumns
FK_ManagedConsumables_DeviceID_Device_DeviceIDCascadeDeviceID->[dbo].[Device].[DeviceID]
CREATE TABLE [dbo].[ManagedConsumables]
(
[DeviceID] [int] NOT NULL,
[ConsumableHashCode] [int] NOT NULL,
[ConsumableName] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ConsumableRemainingLevel] [float] NOT NULL,
[HigherValueThreshold] [float] NOT NULL,
[StaleUnits] [smallint] NOT NULL,
[StaleInterval] [smallint] NOT NULL,
[EstimatedStaleDate] [datetime] NOT NULL,
[ConsumableTypeExtended] [smallint] NOT NULL CONSTRAINT [DF_ManagedConsumables_ConsumableTypeExtended] DEFAULT ((0)),
[IsMarkedOnActionPerformed] [bit] NOT NULL CONSTRAINT [DF_ManagedConsumables_IsMarkedOnActionPerformed] DEFAULT ((0)),
[DismissDate] [datetime] NULL,
[DismissedByContactID] [int] NULL,
[IsNormalizedSupply] [bit] NULL CONSTRAINT [DF_ManagedConsumables_IsNormalizedSupply] DEFAULT ((0))
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ManagedConsumables] ADD CONSTRAINT [PK_ManagedConsumables_DeviceID_ConsumableHashCode] PRIMARY KEY CLUSTERED  ([DeviceID], [ConsumableHashCode]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ManagedConsumables] ADD CONSTRAINT [FK_ManagedConsumables_DeviceID_Device_DeviceID] FOREIGN KEY ([DeviceID]) REFERENCES [dbo].[Device] ([DeviceID]) ON DELETE CASCADE
GO