diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/db2.sql b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/db2.sql
index 99b5c560d56b..e99f0765015a 100644
--- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/db2.sql
+++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/db2.sql
@@ -2032,7 +2032,7 @@ CREATE TABLE IDN_NOTIFICATION_ORG_TEMPLATE (
LOCALE VARCHAR(50) NOT NULL,
SUBJECT VARCHAR(4000),
BODY CLOB,
- FOOTER CLOB,
+ FOOTER VARCHAR(4000),
CONTENT_TYPE VARCHAR(50),
TYPE_ID INTEGER NOT NULL,
TENANT_ID INTEGER NOT NULL,
@@ -2057,7 +2057,7 @@ CREATE TABLE IDN_NOTIFICATION_APP_TEMPLATE (
LOCALE VARCHAR(50) NOT NULL,
SUBJECT VARCHAR(4000),
BODY CLOB,
- FOOTER CLOB,
+ FOOTER VARCHAR(4000),
CONTENT_TYPE VARCHAR(50),
TYPE_ID INTEGER NOT NULL,
APP_ID VARCHAR(255) NOT NULL,
diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/h2.sql b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/h2.sql
index 78602660830e..9fb3f89fd705 100644
--- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/h2.sql
+++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/h2.sql
@@ -1328,8 +1328,8 @@ CREATE TABLE IF NOT EXISTS IDN_NOTIFICATION_ORG_TEMPLATE (
TEMPLATE_KEY VARCHAR(50) NOT NULL,
LOCALE VARCHAR(50) NOT NULL,
SUBJECT VARCHAR(4000),
- BODY MEDIUMTEXT,
- FOOTER MEDIUMTEXT,
+ BODY TEXT,
+ FOOTER VARCHAR(4000),
CONTENT_TYPE VARCHAR(50),
TYPE_ID INTEGER NOT NULL,
TENANT_ID INTEGER NOT NULL,
@@ -1344,8 +1344,8 @@ CREATE TABLE IF NOT EXISTS IDN_NOTIFICATION_APP_TEMPLATE (
TEMPLATE_KEY VARCHAR(50) NOT NULL,
LOCALE VARCHAR(50) NOT NULL,
SUBJECT VARCHAR(4000),
- BODY MEDIUMTEXT,
- FOOTER MEDIUMTEXT,
+ BODY TEXT,
+ FOOTER VARCHAR(4000),
CONTENT_TYPE VARCHAR(50),
TYPE_ID INTEGER NOT NULL,
APP_ID VARCHAR(255) NOT NULL,
diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mssql.sql b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mssql.sql
index 983b4213cf58..41a5016958bf 100644
--- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mssql.sql
+++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mssql.sql
@@ -1473,9 +1473,9 @@ CREATE TABLE IDN_NOTIFICATION_ORG_TEMPLATE (
ID INTEGER IDENTITY,
TEMPLATE_KEY VARCHAR(50) NOT NULL,
LOCALE VARCHAR(50) NOT NULL,
- SUBJECT VARCHAR(4000),
- BODY TEXT,
- FOOTER TEXT,
+ SUBJECT NVARCHAR(4000),
+ BODY NVARCHAR(MAX),
+ FOOTER NVARCHAR(4000),
CONTENT_TYPE VARCHAR(50),
TYPE_ID INTEGER NOT NULL,
TENANT_ID INTEGER NOT NULL,
@@ -1490,9 +1490,9 @@ CREATE TABLE IDN_NOTIFICATION_APP_TEMPLATE (
ID INTEGER IDENTITY,
TEMPLATE_KEY VARCHAR(50) NOT NULL,
LOCALE VARCHAR(50) NOT NULL,
- SUBJECT VARCHAR(4000),
- BODY TEXT,
- FOOTER TEXT,
+ SUBJECT NVARCHAR(4000),
+ BODY NVARCHAR(MAX),
+ FOOTER NVARCHAR(4000),
CONTENT_TYPE VARCHAR(50),
TYPE_ID INTEGER NOT NULL,
APP_ID VARCHAR(255) NOT NULL,
diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mysql-cluster.sql b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mysql-cluster.sql
index f79856f5220e..8bb8a1480591 100644
--- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mysql-cluster.sql
+++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mysql-cluster.sql
@@ -1490,9 +1490,9 @@ CREATE TABLE IF NOT EXISTS IDN_NOTIFICATION_ORG_TEMPLATE (
ID INTEGER NOT NULL AUTO_INCREMENT,
TEMPLATE_KEY VARCHAR(50) NOT NULL,
LOCALE VARCHAR(50) NOT NULL,
- SUBJECT VARCHAR(4000),
- BODY MEDIUMTEXT,
- FOOTER MEDIUMTEXT,
+ SUBJECT VARCHAR(4000) CHARACTER SET utf8mb4,
+ BODY MEDIUMTEXT CHARACTER SET utf8mb4,
+ FOOTER VARCHAR(4000) CHARACTER SET utf8mb4,
CONTENT_TYPE VARCHAR(50),
TYPE_ID INTEGER NOT NULL,
TENANT_ID INTEGER NOT NULL,
@@ -1506,9 +1506,9 @@ CREATE TABLE IF NOT EXISTS IDN_NOTIFICATION_APP_TEMPLATE (
ID INTEGER NOT NULL AUTO_INCREMENT,
TEMPLATE_KEY VARCHAR(50) NOT NULL,
LOCALE VARCHAR(50) NOT NULL,
- SUBJECT VARCHAR(4000),
- BODY MEDIUMTEXT,
- FOOTER MEDIUMTEXT,
+ SUBJECT VARCHAR(4000) CHARACTER SET utf8mb4,
+ BODY MEDIUMTEXT CHARACTER SET utf8mb4,
+ FOOTER VARCHAR(4000) CHARACTER SET utf8mb4,
CONTENT_TYPE VARCHAR(50),
TYPE_ID INTEGER NOT NULL,
APP_ID VARCHAR(255) NOT NULL,
diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mysql.sql b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mysql.sql
index 45642386c353..cea765f3de10 100644
--- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mysql.sql
+++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/mysql.sql
@@ -1358,9 +1358,9 @@ CREATE TABLE IF NOT EXISTS IDN_NOTIFICATION_ORG_TEMPLATE (
ID INTEGER NOT NULL AUTO_INCREMENT,
TEMPLATE_KEY VARCHAR(50) NOT NULL,
LOCALE VARCHAR(50) NOT NULL,
- SUBJECT VARCHAR(4000),
- BODY MEDIUMTEXT,
- FOOTER MEDIUMTEXT,
+ SUBJECT VARCHAR(4000) CHARACTER SET utf8mb4,
+ BODY MEDIUMTEXT CHARACTER SET utf8mb4,
+ FOOTER VARCHAR(4000) CHARACTER SET utf8mb4,
CONTENT_TYPE VARCHAR(50),
TYPE_ID INTEGER NOT NULL,
TENANT_ID INTEGER NOT NULL,
@@ -1374,9 +1374,9 @@ CREATE TABLE IF NOT EXISTS IDN_NOTIFICATION_APP_TEMPLATE (
ID INTEGER NOT NULL AUTO_INCREMENT,
TEMPLATE_KEY VARCHAR(50) NOT NULL,
LOCALE VARCHAR(50) NOT NULL,
- SUBJECT VARCHAR(4000),
- BODY MEDIUMTEXT,
- FOOTER MEDIUMTEXT,
+ SUBJECT VARCHAR(4000) CHARACTER SET utf8mb4,
+ BODY MEDIUMTEXT CHARACTER SET utf8mb4,
+ FOOTER VARCHAR(4000) CHARACTER SET utf8mb4,
CONTENT_TYPE VARCHAR(50),
TYPE_ID INTEGER NOT NULL,
APP_ID VARCHAR(255) NOT NULL,
diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/oracle.sql b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/oracle.sql
index 6ffa2eb13894..83691a679497 100644
--- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/oracle.sql
+++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/oracle.sql
@@ -2088,9 +2088,9 @@ CREATE TABLE IDN_NOTIFICATION_ORG_TEMPLATE (
ID INTEGER NOT NULL,
TEMPLATE_KEY VARCHAR(50) NOT NULL,
LOCALE VARCHAR(50) NOT NULL,
- SUBJECT VARCHAR(4000),
- BODY CLOB,
- FOOTER CLOB,
+ SUBJECT NVARCHAR2(4000),
+ BODY NCLOB,
+ FOOTER NVARCHAR2(4000),
CONTENT_TYPE VARCHAR(50),
TYPE_ID INTEGER NOT NULL,
TENANT_ID INTEGER NOT NULL,
@@ -2115,9 +2115,9 @@ CREATE TABLE IDN_NOTIFICATION_APP_TEMPLATE (
ID INTEGER NOT NULL,
TEMPLATE_KEY VARCHAR(50) NOT NULL,
LOCALE VARCHAR(50) NOT NULL,
- SUBJECT VARCHAR(4000),
- BODY CLOB,
- FOOTER CLOB,
+ SUBJECT NVARCHAR2(4000),
+ BODY NCLOB,
+ FOOTER NVARCHAR2(4000),
CONTENT_TYPE VARCHAR(50),
TYPE_ID INTEGER NOT NULL,
APP_ID VARCHAR(255) NOT NULL,
diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/oracle_rac.sql b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/oracle_rac.sql
index 5bc4ad184d76..c96733794626 100644
--- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/oracle_rac.sql
+++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/dbscripts/oracle_rac.sql
@@ -2021,9 +2021,9 @@ CREATE TABLE IDN_NOTIFICATION_ORG_TEMPLATE (
ID INTEGER NOT NULL,
TEMPLATE_KEY VARCHAR(50) NOT NULL,
LOCALE VARCHAR(50) NOT NULL,
- SUBJECT VARCHAR(4000),
- BODY CLOB,
- FOOTER CLOB,
+ SUBJECT NVARCHAR2(4000),
+ BODY NCLOB,
+ FOOTER NVARCHAR2(4000),
CONTENT_TYPE VARCHAR(50),
TYPE_ID INTEGER NOT NULL,
TENANT_ID INTEGER NOT NULL,
@@ -2048,9 +2048,9 @@ CREATE TABLE IDN_NOTIFICATION_APP_TEMPLATE (
ID INTEGER NOT NULL,
TEMPLATE_KEY VARCHAR(50) NOT NULL,
LOCALE VARCHAR(50) NOT NULL,
- SUBJECT VARCHAR(4000),
- BODY CLOB,
- FOOTER CLOB,
+ SUBJECT NVARCHAR2(4000),
+ BODY NCLOB,
+ FOOTER NVARCHAR2(4000),
CONTENT_TYPE VARCHAR(50),
TYPE_ID INTEGER NOT NULL,
APP_ID VARCHAR(255) NOT NULL,
diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/identity.xml b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/identity.xml
index 257bd346b95f..a62ab236f098 100644
--- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/identity.xml
+++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/identity.xml
@@ -81,6 +81,11 @@
+
+
+ false
+
+
15
diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/identity.xml.j2 b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/identity.xml.j2
index 9b3d9becafaf..2bd3f1f0a7ed 100644
--- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/identity.xml.j2
+++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/identity.xml.j2
@@ -98,6 +98,8 @@
{{notification_templates.sms_templates.apply}}
+
+ {{notification_templates.use_unicode_data_types}}
diff --git a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/org.wso2.carbon.identity.core.server.feature.default.json b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/org.wso2.carbon.identity.core.server.feature.default.json
index 5ebee48daabe..9dc22a1a6d7e 100644
--- a/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/org.wso2.carbon.identity.core.server.feature.default.json
+++ b/features/identity-core/org.wso2.carbon.identity.core.server.feature/resources/org.wso2.carbon.identity.core.server.feature.default.json
@@ -55,6 +55,8 @@
"remote_fetch.enable": false,
"remote_fetch.working_directory": "${carbon.home}/tmp/",
+ "notification_templates.use_unicode_data_types": false,
+
"oauth.token_cleanup.enable": true,
"oauth.token_cleanup.retain_access_tokens_for_auditing": false,