IF NOT EXISTS (SELECT * FROM [TALYASETUP].dbo.SYSCOLUMNS INNER JOIN [TALYASETUP].dbo.SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSOBJECTS.name = 'LANGDICT')
BEGIN
CREATE TABLE TALYASETUP.[dbo].[LANGDICT](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[APPNAME] [nvarchar](20) NULL,
	[TYPE] [smallint] NOT NULL,
	[TR] [nvarchar](4000) NULL,
	[EN] [nvarchar](4000) NULL,
	[NOTE] [nvarchar](50) NULL,
	[DE] [nvarchar](4000) NULL,
	[NL] [nvarchar](4000) NULL,
	[FR] [nvarchar](4000) NULL,
	[RU] [nvarchar](4000) NULL,
	[IT] [nvarchar](4000) NULL,
	[AR] [nvarchar](4000) NULL,
	[FA] [nvarchar](4000) NULL,
	[AZ] [nvarchar](4000) NULL,
 CONSTRAINT [PK_LANGDICT] 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],
 CONSTRAINT [IX_LANGDICT] UNIQUE NONCLUSTERED 
(
	[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]
END
GO

IF NOT EXISTS (SELECT * FROM [TALYASETUP].[dbo].SYSCOLUMNS INNER JOIN [TALYASETUP].[dbo].SYSOBJECTS ON SYSOBJECTS.id = SYSCOLUMNS.id 
              WHERE SYSCOLUMNS.NAME = 'TYPE' AND SYSOBJECTS.name = 'LANGDICT')
ALTER TABLE  [TALYASETUP].[dbo].[LANGDICT] ADD [TYPE] smallint NOT NULL CONSTRAINT [DF_LANGDICT_TYPE] DEFAULT (0)
go


