
	--01. Add rows to [dbo].[CD_NotificationFormats]
	DECLARE @CD_NotificationFormats TABLE ([LanguageCode] TINYINT NOT NULL, [Method] NVARCHAR(20) NOT NULL, [Section] NVARCHAR(20) NOT NULL, [Format] NVARCHAR(300) NOT NULL, [EventCode] INT NULL, [NotificationTypeVersion] nvarchar(50) NOT NULL default '0');

	-- English
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (1, N'Email', N'Body', N'Dear customer,<br/><br/>{<EmailBodyMessage>} {<EventTime>:MMM dd, yyyy HH:mm}.<br/><br/>Best regards,<br/>The {<Product Name>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (1, N'Email', N'DisplayName', N'{<Product Name>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (1, N'Email', N'Subject', N'{<PanelName>}: {<NotificationMessage>} ({<SiteName>} - {<DeviceLabel||UserId>})', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (1, N'Email', N'AttachmentName', N'{<EventTime>:yyyy-MMM-d}_{<SiteName>}_{<DeviceLabel>}{<FileExtension>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (1, N'SMS', N'None', N'{<PanelName>}: {<NotificationMessage>} detected in {<SiteName>} ({<DeviceLabel>}) at {<EventTime>:HH:mm:ss}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (1, N'Push', N'None', N'{<PanelName>}: {<NotificationMessage>} detected in {<SiteName>} ({<DeviceLabel>}) at {<EventTime>:HH:mm:ss}', NULL)
	
	-- Italian
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (4, N'Email', N'Body', N'Gentile Cliente,<br/>{<EmailBodyMessage>} {<EventTime>:MMM dd, yyyy HH:mm}.<br/><br/>Cordiali saluti,<br/>{<Product Name>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (4, N'Email', N'DisplayName', N'{<Product Name>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (4, N'Email', N'Subject', N'{<PanelName>}: {<NotificationMessage>} ({<SiteName>} - {<DeviceLabel||UserId>})', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (4, N'Email', N'AttachmentName', N'{<EventTime>:yyyy-MMM-d}_{<SiteName>}_{<DeviceLabel>}{<FileExtension>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (4, N'SMS', N'None', N'{<PanelName>}: {<NotificationMessage>} rilevato da {<SiteName>} ({<DeviceLabel>}) a {<EventTime>:HH:mm:ss}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (4, N'Push', N'None', N'{<PanelName>}: {<NotificationMessage>} rilevato da {<SiteName>} ({<DeviceLabel>}) a {<EventTime>:HH:mm:ss}', NULL)
	
	-- Russian
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (8, N'Email', N'Body', N'Уважаемый клиент,<br/>{<EmailBodyMessage>} {<EventTime>:MMM dd, yyyy HH:mm}.<br/><br/>{<Product Name>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (8, N'Email', N'DisplayName', N'{<Product Name>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (8, N'Email', N'Subject', N'{<PanelName>}: {<NotificationMessage>} ({<SiteName>} - {<DeviceLabel||UserId>})', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (8, N'Email', N'AttachmentName', N'{<SiteName>}_{<DeviceLabel>}{<FileExtension>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (8, N'SMS', N'None', N'{<PanelName>}: {<NotificationMessage>} на объекте {<SiteName>} ({<DeviceLabel>}) в {<EventTime>:HH:mm:ss}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (8, N'Push', N'None', N'{<PanelName>}: {<NotificationMessage>} на объекте {<SiteName>} ({<DeviceLabel>}) в {<EventTime>:HH:mm:ss}', NULL)
	
	-- Dutch
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (9, N'Email', N'AttachmentName', N'{<EventTime>:yyyy-MMM-d}_{<SiteName>}_{<DeviceLabel>}{<FileExtension>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (9, N'Email', N'Body', N'Beste klant,<br/>{<EmailBodyMessage>} {<EventTime>:MMM dd, yyyy HH:mm}.<br/><br/>Met vriendelijke groet,<br/>{<Product Name>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (9, N'Email', N'DisplayName', N'{<Product Name>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (9, N'Email', N'Subject', N'{<PanelName>}: {<NotificationMessage>} ({<SiteName>} - {<DeviceLabel||UserId>})', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (9, N'Push', N'None', N'{<PanelName>}: {<NotificationMessage>} gedetecteerd in {<SiteName>} ({<DeviceLabel>}) om {<EventTime>:HH:mm:ss}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (9, N'SMS', N'None', N'{<PanelName>}: {<NotificationMessage>} gedetecteerd in {<SiteName>} ({<DeviceLabel>}) om {<EventTime>:HH:mm:ss}', NULL)

	-- Spanish
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (2, N'Email', N'Body', N'Estimado cliente,<br/>{<EmailBodyMessage>} {<EventTime>:MMM dd, yyyy HH:mm}.<br/><br/>Saludos cordiales, <br/>{<Product Name>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (2, N'Email', N'DisplayName', N'{<Product Name>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (2, N'Email', N'Subject', N'{<PanelName>}: {<NotificationMessage>} ({<SiteName>} - {<DeviceLabel||UserId>})', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (2, N'Email', N'AttachmentName', N'{<EventTime>:yyyy-MMM-d}_{<SiteName>}_{<DeviceLabel>}{<FileExtension>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (2, N'SMS', N'None', N'{<PanelName>}: {<NotificationMessage>} detectado en {<SiteName>} ({<DeviceLabel>}) a las {<EventTime>:HH:mm:ss}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (2, N'Push', N'None', N'{<PanelName>}: {<NotificationMessage>} detectado en {<SiteName>} ({<DeviceLabel>}) a las {<EventTime>:HH:mm:ss}', NULL)

	-- Spanish Chile
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (10, N'Email', N'Body', N'Estimado cliente,<br/>{<EmailBodyMessage>} {<EventTime>:MMM dd, yyyy HH:mm}.<br/><br/>Saludos cordiales, <br/>{<Product Name>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (10, N'Email', N'DisplayName', N'{<Product Name>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (10, N'Email', N'Subject', N'{<PanelName>}: {<NotificationMessage>} ({<SiteName>} - {<DeviceLabel||UserId>})', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (10, N'Email', N'AttachmentName', N'{<EventTime>:yyyy-MMM-d}_{<SiteName>}_{<DeviceLabel>}{<FileExtension>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (10, N'SMS', N'None', N'{<PanelName>}: {<NotificationMessage>} detectado en {<SiteName>} ({<DeviceLabel>}) a las {<EventTime>:HH:mm:ss}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (10, N'Push', N'None', N'{<PanelName>}: {<NotificationMessage>} detectado en {<SiteName>} ({<DeviceLabel>}) a las {<EventTime>:HH:mm:ss}', NULL)

	-- Danish
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (11, N'Email', N'Body', N'Kære kunde,<br/>{<EmailBodyMessage>} {<EventTime>:dd MMM, yyyy HH:mm} (<CET>).<br/><br/>Med venlig hilsen,<br/>{<Product Name>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (11, N'Email', N'DisplayName', N'{<Product Name>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (11, N'Email', N'Subject', N'{<PanelName>}: {<NotificationMessage>} ({<SiteName>} - {<DeviceLabel||UserId>})', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (11, N'Email', N'AttachmentName', N'{<EventTime>:dd-MM-yyyy}_{<SiteName>}_{<DeviceLabel>}{<FileExtension>}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (11, N'SMS', N'None', N'{<PanelName>}: {<NotificationMessage>} registreret i {<SiteName>} ({<DeviceLabel>}) {<EventTime>:HH:mm:ss}', NULL)
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode]) VALUES (11, N'Push', N'None', N'{<PanelName>}: {<NotificationMessage>} detected in {<SiteName>} ({<DeviceLabel>}) at {<EventTime>:HH:mm:ss} (<CET>)', NULL)

	--version 1
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (1, N'Email', N'AttachmentName', N'{<EventTime>:yyyy-MMM-d}_{<SiteName>}_{<DeviceLabel>}{<FileExtension>}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (1, N'Email', N'Body', N'Dear customer,<br/>{<EmailBodyMessage>} {<EventTime>:MMM dd, yyyy HH:mm}.<br/><br/>Best regards,<br/>{<Product Name>}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (1, N'Email', N'DisplayName', N'{<Product Name>}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (1, N'Email', N'Subject', N'{<PanelName>}: {<NotificationMessage>} ({<SiteName>} - {<DeviceLabel||UserId>})', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (1, N'Push', N'None', N'{<PanelName>}: {<NotificationMessage>} detected in {<SiteName>} ({<DeviceLabel>}) at {<EventTime>:HH:mm:ss}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (1, N'SMS', N'None', N'{<PanelName>}: {<NotificationMessage>} detected in {<SiteName>} ({<DeviceLabel>}) at {<EventTime>:HH:mm:ss}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (2, N'Email', N'AttachmentName', N'{<EventTime>:yyyy-MMM-d}_{<SiteName>}_{<DeviceLabel>}{<FileExtension>}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (2, N'Email', N'Body', N'Estimado cliente,<br/>{<EmailBodyMessage>} {<EventTime>:MMM dd, yyyy HH:mm}.<br/><br/>Saludos cordiales, <br/>{<Product Name>}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (2, N'Email', N'DisplayName', N'{<Product Name>}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (2, N'Email', N'Subject', N'{<PanelName>}: {<NotificationMessage>} ({<SiteName>} - {<DeviceLabel||UserId>})', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (2, N'Push', N'None', N'{<PanelName>}: {<NotificationMessage>} detectado en {<SiteName>} ({<DeviceLabel>}) a las {<EventTime>:HH:mm:ss}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (2, N'SMS', N'None', N'{<PanelName>}: {<NotificationMessage>} detectado en {<SiteName>} ({<DeviceLabel>}) a las {<EventTime>:HH:mm:ss}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (4, N'Email', N'AttachmentName', N'{<EventTime>:yyyy-MMM-d}_{<SiteName>}_{<DeviceLabel>}{<FileExtension>}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (4, N'Email', N'Body', N'Gentile Cliente,<br/>{<EmailBodyMessage>} {<EventTime>:MMM dd, yyyy HH:mm}.<br/><br/>Cordiali saluti,<br/>{<Product Name>}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (4, N'Email', N'DisplayName', N'{<Product Name>}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (4, N'Email', N'Subject', N'{<PanelName>}: {<NotificationMessage>} ({<SiteName>} - {<DeviceLabel||UserId>})', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (4, N'Push', N'None', N'{<PanelName>}: {<NotificationMessage>} rilevato da {<SiteName>} ({<DeviceLabel>}) a {<EventTime>:HH:mm:ss}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (4, N'SMS', N'None', N'{<PanelName>}: {<NotificationMessage>} rilevato da {<SiteName>} ({<DeviceLabel>}) a {<EventTime>:HH:mm:ss}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (8, N'Email', N'AttachmentName', N'{<SiteName>}_{<DeviceLabel>}{<FileExtension>}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (8, N'Email', N'Body', N'Уважаемый клиент,<br/>{<EmailBodyMessage>} {<EventTime>:MMM dd, yyyy HH:mm}.<br/><br/>С уважением,<br/>{<Product Name>}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (8, N'Email', N'DisplayName', N'{<Product Name>}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (8, N'Email', N'Subject', N'{<PanelName>}: {<NotificationMessage>} ({<SiteName>} - {<DeviceLabel||UserId>})', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (8, N'Push', N'None', N'{<PanelName>}: {<NotificationMessage>} на объекте {<SiteName>} ({<DeviceLabel>}) в {<EventTime>:HH:mm:ss}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (8, N'SMS', N'None', N'{<PanelName>}: {<NotificationMessage>} на объекте {<SiteName>} ({<DeviceLabel>}) в {<EventTime>:HH:mm:ss}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (9, N'Email', N'AttachmentName', N'{<EventTime>:yyyy-MMM-d}_{<SiteName>}_{<DeviceLabel>}{<FileExtension>}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (9, N'Email', N'Body', N'Beste klant,<br/>{<EmailBodyMessage>} {<EventTime>:MMM dd, yyyy HH:mm}.<br/><br/>Met vriendelijke groet,<br/>{<Product Name>}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (9, N'Email', N'DisplayName', N'{<Product Name>}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (9, N'Email', N'Subject', N'{<PanelName>}: {<NotificationMessage>} ({<SiteName>} - {<DeviceLabel||UserId>})', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (9, N'Push', N'None', N'{<PanelName>}: {<NotificationMessage>} gedetecteerd in {<SiteName>} ({<DeviceLabel>}) om {<EventTime>:HH:mm:ss}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (9, N'SMS', N'None', N'{<PanelName>}: {<NotificationMessage>} gedetecteerd in {<SiteName>} ({<DeviceLabel>}) om {<EventTime>:HH:mm:ss}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (10, N'Email', N'AttachmentName', N'{<EventTime>:yyyy-MMM-d}_{<SiteName>}_{<DeviceLabel>}{<FileExtension>}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (10, N'Email', N'Body', N'Estimado cliente,<br/>{<EmailBodyMessage>} {<EventTime>:MMM dd, yyyy HH:mm}.<br/><br/>Saludos cordiales, <br/>{<Product Name>}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (10, N'Email', N'DisplayName', N'{<Product Name>}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (10, N'Email', N'Subject', N'{<PanelName>}: {<NotificationMessage>} ({<SiteName>} - {<DeviceLabel||UserId>})', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (10, N'Push', N'None', N'{<PanelName>}: {<NotificationMessage>} detectado en {<SiteName>} ({<DeviceLabel>}) a las {<EventTime>:HH:mm:ss}', NULL, N'1')
	INSERT INTO @CD_NotificationFormats ([LanguageCode], [Method], [Section], [Format], [EventCode], [NotificationTypeVersion]) VALUES (10, N'SMS', N'None', N'{<PanelName>}: {<NotificationMessage>} detectado en {<SiteName>} ({<DeviceLabel>}) a las {<EventTime>:HH:mm:ss}', NULL, N'1')

	
	MERGE INTO dbo.[CD_NotificationFormats] AS TARGET  
	USING @CD_NotificationFormats AS SOURCE  
	ON TARGET.[LanguageCode] = SOURCE.[LanguageCode] and  TARGET.[Method] = SOURCE.[Method] and TARGET.[Section] = SOURCE.[Section] and TARGET.[NotificationTypeVersion] = SOURCE.[NotificationTypeVersion]
	WHEN MATCHED THEN    
	UPDATE SET [LanguageCode] = SOURCE.[LanguageCode], [Method] = SOURCE.[Method], [Section] = SOURCE.[Section], [Format] = SOURCE.[Format], [EventCode] = SOURCE.[EventCode] 
	WHEN NOT MATCHED BY TARGET THEN   
	INSERT ([LanguageCode], [Method], [Section], [Format], [EventCode],[notificationtypeversion])   
	VALUES (SOURCE.[LanguageCode], SOURCE.[Method], SOURCE.[Section], SOURCE.[Format], SOURCE.[EventCode],SOURCE.[NotificationTypeVersion])  
	OUTPUT $action, SOURCE.*;


	--02. Add rows to [dbo].[CD_Panel_Internal_Status]
	DECLARE @CD_Panel_Internal_Status TABLE ([Panel_Internal_Status_Code] TINYINT NOT NULL, [Panel_Internal_Status_Description] NVARCHAR(12) NULL);

	INSERT INTO @CD_Panel_Internal_Status ([Panel_Internal_Status_Code], [Panel_Internal_Status_Description]) VALUES (0, N'Failed')
	INSERT INTO @CD_Panel_Internal_Status ([Panel_Internal_Status_Code], [Panel_Internal_Status_Description]) VALUES (1, N'Ready')

	MERGE INTO dbo.[CD_Panel_Internal_Status] AS TARGET  
	USING @CD_Panel_Internal_Status AS SOURCE  
	ON TARGET.[Panel_Internal_Status_Description] = SOURCE.[Panel_Internal_Status_Description] 
	WHEN MATCHED THEN    
	UPDATE SET [Panel_Internal_Status_Description] = SOURCE.[Panel_Internal_Status_Description] 
	WHEN NOT MATCHED BY TARGET THEN   
	INSERT ([Panel_Internal_Status_Code], [Panel_Internal_Status_Description])   
	VALUES (SOURCE.[Panel_Internal_Status_Code], SOURCE.[Panel_Internal_Status_Description])  
	OUTPUT $action, SOURCE.*;

	--03. Add rows to [dbo].[CD_PD_AutomationDeviceType]
	DECLARE @CD_PD_AutomationDeviceType TABLE ([AutomationDeviceTypeCode] SMALLINT NOT NULL, [Description] NVARCHAR(12) NOT NULL);

	INSERT INTO @CD_PD_AutomationDeviceType ([AutomationDeviceTypeCode], [Description]) VALUES (1, N'X10')
	INSERT INTO @CD_PD_AutomationDeviceType ([AutomationDeviceTypeCode], [Description]) VALUES (2, N'RFOutput')
	INSERT INTO @CD_PD_AutomationDeviceType ([AutomationDeviceTypeCode], [Description]) VALUES (3, N'DoorLock')
	INSERT INTO @CD_PD_AutomationDeviceType ([AutomationDeviceTypeCode], [Description]) VALUES (4, N'Disabled')

	MERGE INTO dbo.[CD_PD_AutomationDeviceType] AS TARGET  
	USING @CD_PD_AutomationDeviceType AS SOURCE  
	ON TARGET.[AutomationDeviceTypeCode] = SOURCE.[AutomationDeviceTypeCode] 
	WHEN MATCHED THEN    
	UPDATE SET [Description] = SOURCE.[Description] 
	WHEN NOT MATCHED BY TARGET THEN   
	INSERT ([AutomationDeviceTypeCode], [Description])   
	VALUES (SOURCE.[AutomationDeviceTypeCode], SOURCE.[Description])  
	OUTPUT $action, SOURCE.*;
	
	
	