if not Exists(SELECT * FROM sys.sysobjects WHERE name ='EShopTablesChanges' and xtype='U')
Begin

CREATE TABLE [dbo].[EShopTablesChanges](
	[Id] [uniqueidentifier] NOT NULL,
	[Name] [nvarchar](50) NOT NULL,
	[EntityRowId] [uniqueidentifier] NOT NULL,
	[ModifiedOn] [datetime] NOT NULL,
	[Fields] [nvarchar](max) NULL,
	[Action] [tinyint] NOT NULL,
	[Number] [bigint] IDENTITY(1,1) NOT NULL,
 CONSTRAINT [PK_EShopTablesChanges] PRIMARY KEY CLUSTERED 
(
	[Id] ASC
)
) ON [PRIMARY] 


ALTER TABLE [dbo].[EShopTablesChanges] ADD  CONSTRAINT [DF_EShopTablesChanges_Id]  DEFAULT (newid()) FOR [Id]


end
