USE [Elyse_DB]
GO
/****** Object:  Table [user_restr].[user_privilege_revoke_log]    Script Date: Sat 05-09-2026 7:01:54 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [user_restr].[user_privilege_revoke_log](
	[primary_key] [bigint] IDENTITY(1,1) NOT NULL,
	[privilege] [nvarchar](50) NULL,
	[privilege_name] [nvarchar](50) NULL,
	[sid_id] [bigint] NULL,
	[username] [nvarchar](128) NULL,
	[granted_on] [datetime2](7) NULL,
	[granted_by] [nvarchar](128) NULL,
	[revoked_on] [datetime2](7) NULL,
	[revoked_by] [nvarchar](128) NULL,
 CONSTRAINT [PK_user_privilege_revoke_log] PRIMARY KEY CLUSTERED 
(
	[primary_key] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [user_restr].[user_privilege_revoke_log] ADD  CONSTRAINT [DF_user_privilege_revoke_log_revoked_on]  DEFAULT (sysdatetime()) FOR [revoked_on]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'This table stores records of user privilege revocations.  Also see user_restr.authoriser_privilege_requests.

COPYRIGHT NOTICE
This database schema, stored procedures and functions are protected by copyright.
Copyright.  Silkwood Software Pty. Ltd. 2025' , @level0type=N'SCHEMA',@level0name=N'user_restr', @level1type=N'TABLE',@level1name=N'user_privilege_revoke_log'
GO
