CREATE TABLE [dbo].[CoSecurityResourceRights]
(
[ID] [int] NOT NULL,
[ViewRightsFlag] [bigint] NOT NULL,
[ModifyRightsFlag] [bigint] NOT NULL,
[FormID] [int] NOT NULL,
[ParentID] [int] NULL,
[ResourceStringID] [nvarchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[SortOrder] [int] NOT NULL,
[CreateDate] [datetime] NOT NULL CONSTRAINT [DF_CoSecurityResourceRights_CreateDate] DEFAULT (getutcdate()),
[LastUpdate] [datetime] NOT NULL CONSTRAINT [DF_CoSecurityResourceRights_LastUpdate] DEFAULT (getutcdate()),
[timestamp] [timestamp] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CoSecurityResourceRights] ADD CONSTRAINT [PK_CoSecurityResourceRights] PRIMARY KEY CLUSTERED ([ID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CoSecurityResourceRights] ADD CONSTRAINT [FK_CoSecurityResourceRights_FormID_SHInterfaceObjects] FOREIGN KEY ([FormID]) REFERENCES [dbo].[SHInterfaceObjects] ([InterfaceObjectID])
GO
ALTER TABLE [dbo].[CoSecurityResourceRights] ADD CONSTRAINT [FK_CoSecurityResourceRights_ParentID_CoSecurityResourceRights] FOREIGN KEY ([ParentID]) REFERENCES [dbo].[CoSecurityResourceRights] ([ID])
GO