Merge pull request #31523 from akhilnarang/set-mariadb-collation
fix(mariadb): set collation in connection
This commit is contained in:
parent
c83174d0bc
commit
4a04b0a17f
3 changed files with 8 additions and 1 deletions
|
|
@ -120,6 +120,7 @@ class MariaDBConnectionUtil:
|
|||
"user": self.user,
|
||||
"conv": self.CONVERSION_MAP,
|
||||
"charset": "utf8mb4",
|
||||
"collation": "utf8mb4_unicode_ci",
|
||||
"use_unicode": True,
|
||||
}
|
||||
|
||||
|
|
@ -319,7 +320,7 @@ class MariaDBDatabase(MariaDBConnectionUtil, MariaDBExceptionUtil, Database):
|
|||
`doctype` VARCHAR(180) NOT NULL,
|
||||
`data` TEXT,
|
||||
UNIQUE(user, doctype)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8"""
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci"""
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
|
|
|
|||
|
|
@ -243,3 +243,4 @@ frappe.patches.v16_0.add_app_launcher_in_navbar_settings
|
|||
frappe.desk.doctype.workspace.patches.update_app
|
||||
frappe.patches.v16_0.move_role_desk_settings_to_user
|
||||
frappe.printing.doctype.print_format.patches.sets_wkhtmltopdf_as_default_for_pdf_generator_field
|
||||
frappe.patches.v14_0.fix_user_settings_collation
|
||||
|
|
|
|||
5
frappe/patches/v14_0/fix_user_settings_collation.py
Normal file
5
frappe/patches/v14_0/fix_user_settings_collation.py
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
frappe.db.sql("ALTER TABLE __UserSettings CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;")
|
||||
Loading…
Add table
Reference in a new issue