USE [Elyse_DB]
GO
/****** Object:  Table [xref].[controller_file_group_names]    Script Date: Sat 05-09-2026 7:01:54 AM ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [xref].[controller_file_group_names](
	[controller_file_group_name_id] [bigint] IDENTITY(1,1) NOT NULL,
	[mnem] [nvarchar](10) NULL,
	[attr_name] [nvarchar](50) NULL,
	[descr] [nvarchar](max) NULL,
	[created] [datetime2](7) NOT NULL,
	[created_by] [nvarchar](128) NOT NULL,
 CONSTRAINT [PK_controller_file_group_names] PRIMARY KEY CLUSTERED 
(
	[controller_file_group_name_id] 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] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING ON
GO
/****** Object:  Index [UN_controller_file_group_names]    Script Date: Sat 05-09-2026 7:01:55 AM ******/
ALTER TABLE [xref].[controller_file_group_names] ADD  CONSTRAINT [UN_controller_file_group_names] UNIQUE NONCLUSTERED 
(
	[attr_name] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, OPTIMIZE_FOR_SEQUENTIAL_KEY = OFF) ON [PRIMARY]
GO
ALTER TABLE [xref].[controller_file_group_names] ADD  CONSTRAINT [DF_controller_file_group_names_created]  DEFAULT (sysdatetime()) FOR [created]
GO
ALTER TABLE [xref].[controller_file_group_names] ADD  CONSTRAINT [DF_controller_file_group_names_created_by]  DEFAULT (original_login()) FOR [created_by]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Name must be unique' , @level0type=N'SCHEMA',@level0name=N'xref', @level1type=N'TABLE',@level1name=N'controller_file_group_names', @level2type=N'CONSTRAINT',@level2name=N'UN_controller_file_group_names'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'This table lists file groups which are used for giving individual controllers exclusive metadata editing rights which cannot be modified by other controllers.  There are two layers of metadata editing rights.  At this layer the rights are granted by an authorisier and granted to controllers.  At the other layer the rights are granted by any controller and are granted to editors.  


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