UPDATE TBDD_MODULES SET DB_VERSION = '1.3.0.2' where SHORT_NAME = 'EMLP' 
GO
CREATE TABLE [dbo].[TBEMLP_HISTORY_ATTACHMENT](
	[GUID] [int] IDENTITY(1,1) NOT NULL,
	[WORK_PROCESS] [varchar](50) NULL,
	[EMAIL_MSGID] [varchar](500) NOT NULL,
	[EMAIL_FROM] [varchar](100) NOT NULL,
	[EMAIL_SUBJECT] [varchar](500) NULL,
	[EMAIL_DATETIME] [varchar](50) NULL,
	[EMAIL_BODY] [varchar](5000) NOT NULL,
	[EMAIL_ATTMT] [varchar](500) NOT NULL,
	[COMMENT] [varchar](500) NULL,
	[CREATEDWHEN] [datetime] NULL,
	[CREATEDWHO] [varchar](50) NULL,
 CONSTRAINT [PK_TBEDM_EMAIL_PROFILER_HISTORY] PRIMARY KEY CLUSTERED 
(
	[GUID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[TBEMLP_HISTORY_ATTACHMENT] ADD  DEFAULT (getdate()) FOR [CREATEDWHEN]
GO
ALTER TABLE [dbo].[TBEMLP_HISTORY_ATTACHMENT] ADD  DEFAULT ('EDMI-Admin') FOR [CREATEDWHO]
GO

ALTER TABLE [dbo].[TBEMLP_HISTORY]  ADD [STATUS] [varchar](900) NULL
GO
ALTER TABLE [dbo].[TBEMLP_HISTORY] ADD [CHANGED_WHEN] [datetime] NULL
GO
ALTER TABLE [dbo].[TBEMLP_HISTORY]  ADD [PROFILE_ID] [int] NULL
GO
