USE [EnVisage]
GO


IF (EXISTS (SELECT * FROM sys.tables where name='TagGroup'))
BEGIN
ALTER TABLE [dbo].TagGroup DROP CONSTRAINT [DF_TagGroup_Id]
DROP TABLE [dbo].TagGroup
END
 

CREATE TABLE [dbo].[TagGroup](
	[Id] [uniqueidentifier] NOT NULL,
	[TagGroupName] [nvarchar](100) NOT NULL,
	[TagGroupColor] [nvarchar](128) NULL,
	[EditTimestamp] [timestamp] NOT NULL,
 CONSTRAINT [PK_TagGroup] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

 

ALTER TABLE [dbo].[TagGroup] ADD  CONSTRAINT [DF_TagGroup_Id]  DEFAULT (newid()) FOR [Id]
 


