DO $$


BEGIN
INSERT INTO public."MessageSettings"
("Key", 
"Value", "Lang")
SELECT
'Notification.ShareFolder.Html', 
'<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head></head>

<body style="padding:0;Margin:0">
	<table cellpadding="0" cellspacing="0" border="0" width="100%">
		<tbody>
			<tr>
				<td align="center" bgcolor="#F8F8F8" width="100%">
					<table cellpadding="0" cellspacing="0" width="100%" border="0">
						<tbody>
							<tr>
								<td align="center">
									<table align="center" cellpadding="0" cellspacing="0" border="0"
										style="max-width:900px; min-width:320px; width:90%">
										<tbody>
											<tr>
												<td align="left">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table><img src="{{logo}}" border="0" style="display:block; max-width:250px; max-height: 35px; ">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
											<tr>
												<td align="left" bgcolor="#FFFFFF" style="border-radius:24px">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div
																		style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:22px; line-height:30px; color:#333333">
																		<strong>Вам предоставили доступ</strong>
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="10"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div
																		style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:16px; line-height:24px; color:#333333"
																		class="esd-text">Пользователь <strong>{{name}}</strong> предоставил
																		вам {{rigths}} к {{entityname}}:
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div
																		style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:16px; line-height:24px; color:#333333"
																		class="esd-text"><strong><a href="{{url}}">{{entityname}}</a></strong></div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="10"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="200" style="width:200px">
																		<tbody>
																			<tr>
																				<td align="center" valign="middle" height="45"
																					style="background-color:#175cd3;border-radius:7px;height:45px"
																					bgcolor="#175CD3"><a href="{{url}}"
																						style="display:block;width:100%;font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; color:#ffffff; font-size:16px; line-height:45px; text-decoration:none; white-space:nowrap; margin:0!important; padding:0;">Открыть</a>
																				</td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
										</tbody>
									</table>
									<table cellpadding="0" cellspacing="0" border="0" width="100%">
										<tbody>
											<tr>
												<td height="40"></td>
											</tr>
										</tbody>
									</table>
								</td>
							</tr>
						</tbody>
					</table>
				</td>
			</tr>
		</tbody>
	</table>
</body>

</html>',''
	WHERE Not EXISTS (SELECT "Key" FROM public."MessageSettings" WHERE "Key"='Notification.ShareFolder.Html')
	ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

INSERT INTO public."MessageSettings"
("Key", 
"Value", "Lang")
select

'Notification.ShareFolder.Subject', 
'Вам предоставили доступ к папке',''
WHERE Not EXISTS (SELECT "Key" FROM public."MessageSettings" WHERE "Key"='Notification.ShareFolder.Subject')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";


INSERT INTO public."MessageSettings"
("Key", 
"Value", "Lang")
SELECT
'Notification.ShareDocument.Html', 
'<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head></head>

<body style="padding:0;Margin:0">
	<table cellpadding="0" cellspacing="0" border="0" width="100%">
		<tbody>
			<tr>
				<td align="center" bgcolor="#F8F8F8" width="100%">
					<table cellpadding="0" cellspacing="0" width="100%" border="0">
						<tbody>
							<tr>
								<td align="center">
									<table align="center" cellpadding="0" cellspacing="0" border="0"
										style="max-width:900px; min-width:320px; width:90%">
										<tbody>
											<tr>
												<td align="left">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table><img src="{{logo}}" border="0" style="display:block; max-width:250px; max-height: 35px; ">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
											<tr>
												<td align="left" bgcolor="#FFFFFF" style="border-radius:24px">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div
																		style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:22px; line-height:30px; color:#333333">
																		<strong>Вам предоставили доступ</strong>
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="10"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div
																		style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:16px; line-height:24px; color:#333333"
																		class="esd-text">Пользователь <strong>{{name}}</strong> предоставил
																		вам {{rigths}} к {{entityname}}:
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div
																		style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:16px; line-height:24px; color:#333333"
																		class="esd-text"><strong><a href="{{url}}">{{entityname}}</a></strong></div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="10"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="200" style="width:200px">
																		<tbody>
																			<tr>
																				<td align="center" valign="middle" height="45"
																					style="background-color:#175cd3;border-radius:7px;height:45px"
																					bgcolor="#175CD3"><a href="{{url}}"
																						style="display:block;width:100%;font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; color:#ffffff; font-size:16px; line-height:45px; text-decoration:none; white-space:nowrap; margin:0!important; padding:0;">Открыть</a>
																				</td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
										</tbody>
									</table>
									<table cellpadding="0" cellspacing="0" border="0" width="100%">
										<tbody>
											<tr>
												<td height="40"></td>
											</tr>
										</tbody>
									</table>
								</td>
							</tr>
						</tbody>
					</table>
				</td>
			</tr>
		</tbody>
	</table>
</body>

</html>','' 
WHERE Not EXISTS (SELECT "Key" FROM public."MessageSettings" WHERE "Key"='Notification.ShareDocument.Html')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";


INSERT INTO public."MessageSettings"
("Key", 
"Value", "Lang")
SELECT 

'Notification.ShareDocument.Subject', 
'Вам предоставили доступ к документу','' WHERE Not EXISTS (SELECT "Key" FROM public."MessageSettings" WHERE "Key"='Notification.ShareDocument.Subject')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";




INSERT INTO public."MessageSettings"
("Key", 
"Value", "Lang")
SELECT
'Notification.ShareDefault.Html', 
'<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head></head>

<body style="padding:0;Margin:0">
	<table cellpadding="0" cellspacing="0" border="0" width="100%">
		<tbody>
			<tr>
				<td align="center" bgcolor="#F8F8F8" width="100%">
					<table cellpadding="0" cellspacing="0" width="100%" border="0">
						<tbody>
							<tr>
								<td align="center">
									<table align="center" cellpadding="0" cellspacing="0" border="0"
										style="max-width:900px; min-width:320px; width:90%">
										<tbody>
											<tr>
												<td align="left">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table><img src="{{logo}}" border="0" style="display:block; max-width:250px; max-height: 35px; ">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
											<tr>
												<td align="left" bgcolor="#FFFFFF" style="border-radius:24px">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div
																		style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:22px; line-height:30px; color:#333333">
																		<strong>Вам предоставили доступ</strong>
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="10"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div
																		style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:16px; line-height:24px; color:#333333"
																		class="esd-text">Пользователь <strong>{{name}}</strong> предоставил
																		вам {{rigths}} к {{entityname}}:
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div
																		style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:16px; line-height:24px; color:#333333"
																		class="esd-text"><strong><a href="{{url}}">{{entityname}}</a></strong></div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="10"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="200" style="width:200px">
																		<tbody>
																			<tr>
																				<td align="center" valign="middle" height="45"
																					style="background-color:#175cd3;border-radius:7px;height:45px"
																					bgcolor="#175CD3"><a href="{{url}}"
																						style="display:block;width:100%;font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; color:#ffffff; font-size:16px; line-height:45px; text-decoration:none; white-space:nowrap; margin:0!important; padding:0;">Открыть</a>
																				</td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
										</tbody>
									</table>
									<table cellpadding="0" cellspacing="0" border="0" width="100%">
										<tbody>
											<tr>
												<td height="40"></td>
											</tr>
										</tbody>
									</table>
								</td>
							</tr>
						</tbody>
					</table>
				</td>
			</tr>
		</tbody>
	</table>
</body>

</html>','' WHERE Not EXISTS (SELECT "Key" FROM public."MessageSettings" WHERE "Key"='Notification.ShareDefault.Html')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";


INSERT INTO public."MessageSettings"
("Key", 
"Value", "Lang")
SELECT
'Notification.ShareDefault.Subject', 
'Вам предоставили доступ {{type}}',''  WHERE Not EXISTS (SELECT "Key" FROM public."MessageSettings" WHERE "Key"='Notification.ShareDefault.Subject')
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";



INSERT INTO public."MessageSettings"
("Key", 
"Value", "Lang")
SELECT
'Notification.ShareProject.Html', 
'<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head></head>

<body style="padding:0;Margin:0">
	<table cellpadding="0" cellspacing="0" border="0" width="100%">
		<tbody>
			<tr>
				<td align="center" bgcolor="#F8F8F8" width="100%">
					<table cellpadding="0" cellspacing="0" width="100%" border="0">
						<tbody>
							<tr>
								<td align="center">
									<table align="center" cellpadding="0" cellspacing="0" border="0"
										style="max-width:900px; min-width:320px; width:90%">
										<tbody>
											<tr>
												<td align="left">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table><img src="{{logo}}" border="0" style="display:block; max-width:250px; max-height: 35px; ">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
											<tr>
												<td align="left" bgcolor="#FFFFFF" style="border-radius:24px">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div
																		style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:22px; line-height:30px; color:#333333">
																		<strong>Вам предоставили доступ</strong>
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="10"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div
																		style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:16px; line-height:24px; color:#333333"
																		class="esd-text">Пользователь <strong>{{name}}</strong> предоставил
																		вам {{rigths}} к проекту:
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div
																		style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:16px; line-height:24px; color:#333333"
																		class="esd-text"><strong><a href="{{url}}">{{entityname}}</a></strong></div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="10"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="200" style="width:200px">
																		<tbody>
																			<tr>
																				<td align="center" valign="middle" height="45"
																					style="background-color:#175cd3;border-radius:7px;height:45px"
																					bgcolor="#175CD3"><a href="{{url}}"
																						style="display:block;width:100%;font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; color:#ffffff; font-size:16px; line-height:45px; text-decoration:none; white-space:nowrap; margin:0!important; padding:0;">Открыть</a>
																				</td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
										</tbody>
									</table>
									<table cellpadding="0" cellspacing="0" border="0" width="100%">
										<tbody>
											<tr>
												<td height="40"></td>
											</tr>
										</tbody>
									</table>
								</td>
							</tr>
						</tbody>
					</table>
				</td>
			</tr>
		</tbody>
	</table>
</body>

</html>',''
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";


INSERT INTO public."MessageSettings"
("Key", 
"Value", "Lang")
SELECT
'Notification.ShareProject.Subject', 
'Вам предоставили доступ к проекту',''
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";


INSERT INTO public."MessageSettings"
("Key", 
"Value", "Lang")
SELECT
'Notification.ShareProject.Html', 
'<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head></head>

<body style="padding:0;Margin:0">
	<table cellpadding="0" cellspacing="0" border="0" width="100%">
		<tbody>
			<tr>
				<td align="center" bgcolor="#F8F8F8" width="100%">
					<table cellpadding="0" cellspacing="0" width="100%" border="0">
						<tbody>
							<tr>
								<td align="center">
									<table align="center" cellpadding="0" cellspacing="0" border="0"
										style="max-width:900px; min-width:320px; width:90%">
										<tbody>
											<tr>
												<td align="left">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table><img src="{{logo}}" border="0" style="display:block; max-width:250px; max-height: 35px; ">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
											<tr>
												<td align="left" bgcolor="#FFFFFF" style="border-radius:24px">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div
																		style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:22px; line-height:30px; color:#333333">
																		<strong>You have been granted access</strong>
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="10"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div
																		style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:16px; line-height:24px; color:#333333"
																		class="esd-text">The user <strong>{{name}}</strong> has granted 
																		you {{rigths}} to the project:
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div
																		style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:16px; line-height:24px; color:#333333"
																		class="esd-text"><strong><a href="{{url}}">{{entityname}}</a></strong></div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="10"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="200" style="width:200px">
																		<tbody>
																			<tr>
																				<td align="center" valign="middle" height="45"
																					style="background-color:#175cd3;border-radius:7px;height:45px"
																					bgcolor="#175CD3"><a href="{{url}}"
																						style="display:block;width:100%;font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; color:#ffffff; font-size:16px; line-height:45px; text-decoration:none; white-space:nowrap; margin:0!important; padding:0;">Open</a>
																				</td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
										</tbody>
									</table>
									<table cellpadding="0" cellspacing="0" border="0" width="100%">
										<tbody>
											<tr>
												<td height="40"></td>
											</tr>
										</tbody>
									</table>
								</td>
							</tr>
						</tbody>
					</table>
				</td>
			</tr>
		</tbody>
	</table>
</body>

</html>','en'
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";


INSERT INTO public."MessageSettings"
("Key", 
"Value", "Lang")
SELECT
'Notification.ShareProject.Subject', 
'You have been granted access','en'
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";




INSERT INTO public."MessageSettings"
("Key", 
"Value", "Lang")
SELECT
'Notification.AcceptProject.Html', 
'<!DOCTYPE html
	PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>

<head></head>

<body style="padding:0;Margin:0">
	<table cellpadding="0" cellspacing="0" border="0" width="100%">
		<tbody>
			<tr>
				<td align="center" bgcolor="#F8F8F8" width="100%">
					<table cellpadding="0" cellspacing="0" width="100%" border="0">
						<tbody>
							<tr>
								<td align="center">
									<table align="center" cellpadding="0" cellspacing="0" border="0"
										style="max-width:900px; min-width:320px; width:90%">
										<tbody>
											<tr>
												<td align="left">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table><img src="{{logo}}" border="0" style="display:block; max-width:250px; max-height: 35px; ">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
											<tr>
												<td align="left" bgcolor="#FFFFFF" style="border-radius:24px">
													<table align="center" cellpadding="0" cellspacing="0" border="0" width="90%">
														<tbody>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div
																		style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:22px; line-height:30px; color:#333333">
																		<strong>К проекту присоединился новый участник</strong>
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="10"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div
																		style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:16px; line-height:24px; color:#333333"
																		class="esd-text">По приглашению, к проекту <strong><a href="{{url}}">{{entityname}}</a></strong> присоединился пользователь <strong>{{name}}</strong> Теперь у него есть доступ <strong>{{rigths}}</strong> к этому проекту 
																	</div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																	<div
																		style="font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; font-size:16px; line-height:24px; color:#333333"
																		class="esd-text"><strong><a href="{{url}}">{{entityname}}</a></strong></div>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="10"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
															<tr>
																<td align="left">
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="20"></td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="200" style="width:200px">
																		<tbody>
																			<tr>
																				<td align="center" valign="middle" height="45"
																					style="background-color:#175cd3;border-radius:7px;height:45px"
																					bgcolor="#175CD3"><a href="{{url}}"
																						style="display:block;width:100%;font-family:-apple-system,''Segoe UI'',''Helvetica Neue'',Helvetica,Roboto,Arial,sans-serif; color:#ffffff; font-size:16px; line-height:45px; text-decoration:none; white-space:nowrap; margin:0!important; padding:0;">Открыть</a>
																				</td>
																			</tr>
																		</tbody>
																	</table>
																	<table cellpadding="0" cellspacing="0" border="0" width="100%">
																		<tbody>
																			<tr>
																				<td height="30"></td>
																			</tr>
																		</tbody>
																	</table>
																</td>
															</tr>
														</tbody>
													</table>
												</td>
											</tr>
										</tbody>
									</table>
									<table cellpadding="0" cellspacing="0" border="0" width="100%">
										<tbody>
											<tr>
												<td height="40"></td>
											</tr>
										</tbody>
									</table>
								</td>
							</tr>
						</tbody>
					</table>
				</td>
			</tr>
		</tbody>
	</table>
</body>

</html>',''
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";


INSERT INTO public."MessageSettings"
("Key", 
"Value", "Lang")
SELECT
'Notification.AcceptProject.Subject', 
'К проекту присоединился новый участник',''
ON CONFLICT ("Key","Lang") DO UPDATE SET "Value"= EXCLUDED."Value";

END $$
