Tables [dbo].[StorageActivity]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
HeapYes
Row Count (~)15321
Created5:01:54 PM Tuesday, November 4, 2008
Last Modified3:46:20 PM Tuesday, November 18, 2014
Columns
NameData TypeMax Length (Bytes)Allow NullsIdentityDescription
Primary Key PK_StorageActivity: StorageActivityPriKeyStorageActivityPriKeyint4
No
1 - 1Primary key.
Foreign Keys FK_StorageActivity_Storage: [dbo].[Storage].StoragePriKeyIndexes IX_StorageActivity_StoragePriKey: StoragePriKeyStoragePriKeyint4
Yes
Foreign key to a storage order.
Foreign Keys FK_StorageActivity_StorageItems: [dbo].[StorageItems].StorageItemsPriKeyIndexes IX_StorageActivity_StorageItemsPriKey: StorageItemsPriKeyStorageItemsPriKeyint4
Yes
ActivityDescriptionvarchar(150)150
No
Description of the activity.
OldValuevarchar(512)512
Yes
Previous value.
NewValuevarchar(512)512
Yes
New value.
Foreign Keys FK_StorageActivity_Sysuser: [dbo].[Sysuser].SysuserPriKeyIndexes IX_StorageActivity_SysuserPriKey: SysuserPriKeySysuserPriKeyint4
No
Foreign key to the user who made the change.
DateEntereddatetime8
No
Date the change was made.
Foreign Keys FK_StorageActivity_StorageActivityFieldType: [dbo].[StorageActivityFieldType].StorageActivityFieldTypeFIDStorageActivityFieldTypeFIDint4
No
Determines the type of data stored in the OldValue and NewValue fields.
Indexes Indexes
NameColumnsUniqueFill Factor
Primary Key PK_StorageActivity: StorageActivityPriKeyPK_StorageActivityStorageActivityPriKey
Yes
80
IX_StorageActivity_StorageItemsPriKeyStorageItemsPriKey80
IX_StorageActivity_StoragePriKeyStoragePriKey80
IX_StorageActivity_SysuserPriKeySysuserPriKey
Foreign Keys Foreign Keys
NameColumns
FK_StorageActivity_StorageActivityFieldTypeStorageActivityFieldTypeFID->[dbo].[StorageActivityFieldType].[StorageActivityFieldTypeID]
FK_StorageActivity_StorageItemsStorageItemsPriKey->[dbo].[StorageItems].[StorageItemsPriKey]
FK_StorageActivity_StorageStoragePriKey->[dbo].[Storage].[StoragePriKey]
FK_StorageActivity_SysuserSysuserPriKey->[dbo].[Sysuser].[SysUserID]
Permissions
TypeActionOwning Principal
GrantDeleteMssExec
GrantInsertMssExec
GrantSelectMssExec
GrantUpdateMssExec
SQL Script
CREATE TABLE [dbo].[StorageActivity]
(
[StorageActivityPriKey] [int] NOT NULL IDENTITY(1, 1),
[StoragePriKey] [int] NULL,
[StorageItemsPriKey] [int] NULL,
[ActivityDescription] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[OldValue] [varchar] (512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[NewValue] [varchar] (512) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SysuserPriKey] [int] NOT NULL,
[DateEntered] [datetime] NOT NULL,
[StorageActivityFieldTypeFID] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[StorageActivity] ADD CONSTRAINT [PK_StorageActivity] PRIMARY KEY NONCLUSTERED  ([StorageActivityPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_StorageActivity_StorageItemsPriKey] ON [dbo].[StorageActivity] ([StorageItemsPriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_StorageActivity_StoragePriKey] ON [dbo].[StorageActivity] ([StoragePriKey]) WITH (FILLFACTOR=80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_StorageActivity_SysuserPriKey] ON [dbo].[StorageActivity] ([SysuserPriKey]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[StorageActivity] ADD CONSTRAINT [FK_StorageActivity_StorageActivityFieldType] FOREIGN KEY ([StorageActivityFieldTypeFID]) REFERENCES [dbo].[StorageActivityFieldType] ([StorageActivityFieldTypeID])
GO
ALTER TABLE [dbo].[StorageActivity] ADD CONSTRAINT [FK_StorageActivity_StorageItems] FOREIGN KEY ([StorageItemsPriKey]) REFERENCES [dbo].[StorageItems] ([StorageItemsPriKey])
GO
ALTER TABLE [dbo].[StorageActivity] ADD CONSTRAINT [FK_StorageActivity_Storage] FOREIGN KEY ([StoragePriKey]) REFERENCES [dbo].[Storage] ([StoragePriKey])
GO
ALTER TABLE [dbo].[StorageActivity] ADD CONSTRAINT [FK_StorageActivity_Sysuser] FOREIGN KEY ([SysuserPriKey]) REFERENCES [dbo].[Sysuser] ([SysUserID])
GO
GRANT SELECT ON  [dbo].[StorageActivity] TO [MssExec]
GRANT INSERT ON  [dbo].[StorageActivity] TO [MssExec]
GRANT DELETE ON  [dbo].[StorageActivity] TO [MssExec]
GRANT UPDATE ON  [dbo].[StorageActivity] TO [MssExec]
GO
EXEC sp_addextendedproperty N'MS_Description', N'Description of the activity.', 'SCHEMA', N'dbo', 'TABLE', N'StorageActivity', 'COLUMN', N'ActivityDescription'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Date the change was made.', 'SCHEMA', N'dbo', 'TABLE', N'StorageActivity', 'COLUMN', N'DateEntered'
GO
EXEC sp_addextendedproperty N'MS_Description', N'New value.', 'SCHEMA', N'dbo', 'TABLE', N'StorageActivity', 'COLUMN', N'NewValue'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Previous value.', 'SCHEMA', N'dbo', 'TABLE', N'StorageActivity', 'COLUMN', N'OldValue'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Determines the type of data stored in the OldValue and NewValue fields.', 'SCHEMA', N'dbo', 'TABLE', N'StorageActivity', 'COLUMN', N'StorageActivityFieldTypeFID'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Primary key.', 'SCHEMA', N'dbo', 'TABLE', N'StorageActivity', 'COLUMN', N'StorageActivityPriKey'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key to a storage order.', 'SCHEMA', N'dbo', 'TABLE', N'StorageActivity', 'COLUMN', N'StoragePriKey'
GO
EXEC sp_addextendedproperty N'MS_Description', N'Foreign key to the user who made the change.', 'SCHEMA', N'dbo', 'TABLE', N'StorageActivity', 'COLUMN', N'SysuserPriKey'
GO
Uses