From c84baf230ccb6f95fcf43798a3eb837c625639db Mon Sep 17 00:00:00 2001 From: nickago Date: Thu, 9 Jul 2015 08:34:36 -0700 Subject: Updated database schema for full utf8 compatibility --- store/sql_post_store.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'store/sql_post_store.go') diff --git a/store/sql_post_store.go b/store/sql_post_store.go index 7ada515d7..5b9ebfdf2 100644 --- a/store/sql_post_store.go +++ b/store/sql_post_store.go @@ -35,6 +35,11 @@ func NewSqlPostStore(sqlStore *SqlStore) PostStore { } func (s SqlPostStore) UpgradeSchemaIfNeeded() { + + // These execs are for upgrading currently created databases to full utf8mb4 compliance + // Will be removed as seen fit for upgrading + s.GetMaster().Exec("ALTER TABLE Posts charset=utf8mb4") + s.GetMaster().Exec("ALTER TABLE Posts MODIFY COLUMN Message varchar(4000) CHARACTER SET utf8mb4") } func (s SqlPostStore) CreateIndexesIfNotExists() { -- cgit v1.2.3-1-g7c22