
[dbo].[wsm_userprofile_assoc_detail]
CREATE TABLE [dbo].[wsm_userprofile_assoc_detail]
(
[policy_uuid] [int] NOT NULL,
[userprofile_uuid] [binary] (16) NOT NULL,
[rule_uuid] [binary] (16) NOT NULL,
[sched_uuid] [binary] (16) NOT NULL,
[policytype] [nvarchar] (255) COLLATE SQL_Latin1_General_CP1_CS_AS NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[wsm_userprofile_assoc_detail] ADD CONSTRAINT [xpkwsm_userprofile_assoc_detai] PRIMARY KEY CLUSTERED ([policy_uuid], [userprofile_uuid], [rule_uuid], [sched_uuid], [policytype]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [xif1wsm_userprofile_assoc_deta] ON [dbo].[wsm_userprofile_assoc_detail] ([policy_uuid]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [xif3wsm_userprofile_assoc_deta] ON [dbo].[wsm_userprofile_assoc_detail] ([rule_uuid]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [xif4wsm_userprofile_assoc_deta] ON [dbo].[wsm_userprofile_assoc_detail] ([sched_uuid]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [xif2wsm_userprofile_assoc_deta] ON [dbo].[wsm_userprofile_assoc_detail] ([userprofile_uuid]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[wsm_userprofile_assoc_detail] ADD CONSTRAINT [r_1523] FOREIGN KEY ([policy_uuid]) REFERENCES [dbo].[wsm_policy_detail] ([policy_uuid])
GO
ALTER TABLE [dbo].[wsm_userprofile_assoc_detail] ADD CONSTRAINT [r_1524] FOREIGN KEY ([userprofile_uuid]) REFERENCES [dbo].[wsm_userprofile_detail] ([userprofile_uuid])
GO
ALTER TABLE [dbo].[wsm_userprofile_assoc_detail] ADD CONSTRAINT [r_1525] FOREIGN KEY ([rule_uuid]) REFERENCES [dbo].[wsm_rule] ([rule_uuid])
GO
ALTER TABLE [dbo].[wsm_userprofile_assoc_detail] ADD CONSTRAINT [r_1526] FOREIGN KEY ([sched_uuid]) REFERENCES [dbo].[wsm_profile_schedule] ([sched_uuid])
GO
GRANT SELECT ON [dbo].[wsm_userprofile_assoc_detail] TO [wsm_admin_group]
GRANT INSERT ON [dbo].[wsm_userprofile_assoc_detail] TO [wsm_admin_group]
GRANT DELETE ON [dbo].[wsm_userprofile_assoc_detail] TO [wsm_admin_group]
GRANT UPDATE ON [dbo].[wsm_userprofile_assoc_detail] TO [wsm_admin_group]
GRANT SELECT ON [dbo].[wsm_userprofile_assoc_detail] TO [wsm_ro_group]
GO