
      -- Tables
      
          /***** Object:  Table [dbo].[T_LISTS_ENTITY] *****/
          CREATE TABLE [dbo].[T_LISTS_ENTITY]
          (
	  [ListsEntityID] uniqueidentifier NOT NULL,
                  [ListName] varchar(25) NOT NULL,
                  [Entities] int NULL,
                  [PreferedFilter] text NULL,
                  [HiddenFilter] text NULL,
                  [Context] varchar(255) NULL,
                  [MultiSelect] bit NULL,
                  [ColorStyle] int NULL
          ) ON [PRIMARY]
          GO
        
      -- Alters
      
              ALTER TABLE [dbo].[T_LISTS_ENTITY] WITH NOCHECK ADD CONSTRAINT [PK_T_LISTS_ENTITY]
              PRIMARY KEY CLUSTERED ([ListsEntityID]) ON [PRIMARY]
              GO
          
              ALTER TABLE [dbo].[T_LISTS_ENTITY] WITH NOCHECK ADD
              CONSTRAINT [DF_T_LISTS_ENTITY_MULTISELECT] DEFAULT 'false' FOR [MultiSelect]
              GO
            
              ALTER TABLE [dbo].[T_LISTS_ENTITY] WITH NOCHECK ADD CONSTRAINT [FK_T_ENTITIES_T_LISTS_ENTITY_ENTITIES] FOREIGN KEY([Entities])
              REFERENCES [dbo].[T_ENTITIES] ([EntityID])
              GO
			  
			  
			  
      -- Tables
      
          /***** Object:  Table [dbo].[T_LISTS_ENTITY_USERS_GROUP] *****/
          CREATE TABLE [dbo].[T_LISTS_ENTITY_USERS_GROUP]
          (
	  [ListsEntityUsersGroupID] uniqueidentifier NOT NULL,
                  [ListsEntity] uniqueidentifier NULL,
                  [UsersGroup] uniqueidentifier NULL
          ) ON [PRIMARY]
          GO
        
      -- Alters
      
              ALTER TABLE [dbo].[T_LISTS_ENTITY_USERS_GROUP] WITH NOCHECK ADD CONSTRAINT [PK_T_LISTS_ENTITY_USERS_GROUP]
              PRIMARY KEY CLUSTERED ([ListsEntityUsersGroupID]) ON [PRIMARY]
              GO
          
              ALTER TABLE [dbo].[T_LISTS_ENTITY_USERS_GROUP] WITH NOCHECK ADD CONSTRAINT [FK_T_LISTS_ENTITY_T_LISTS_ENTITY_USERS_GROUP_LISTSENTITY] FOREIGN KEY([ListsEntity])
              REFERENCES [dbo].[T_LISTS_ENTITY] ([ListsEntityID])
              GO
              ALTER TABLE [dbo].[T_LISTS_ENTITY_USERS_GROUP] WITH NOCHECK ADD CONSTRAINT [FK_T_USERS_GROUP_T_LISTS_ENTITY_USERS_GROUP_USERSGROUP] FOREIGN KEY([UsersGroup])
              REFERENCES [dbo].[T_USERS_GROUP] ([UsersGroupID])
              GO