diff options
author | nickago <ngonella@calpoly.edu> | 2015-07-09 08:34:36 -0700 |
---|---|---|
committer | nickago <ngonella@calpoly.edu> | 2015-07-09 08:34:36 -0700 |
commit | c84baf230ccb6f95fcf43798a3eb837c625639db (patch) | |
tree | 43cb72202f7029ae56698ea3d7751bbb128dbc8d /store/sql_post_store.go | |
parent | b6fb6ea3be059d3c54027267760ccca0f95535ee (diff) | |
download | chat-c84baf230ccb6f95fcf43798a3eb837c625639db.tar.gz chat-c84baf230ccb6f95fcf43798a3eb837c625639db.tar.bz2 chat-c84baf230ccb6f95fcf43798a3eb837c625639db.zip |
Updated database schema for full utf8 compatibility
Diffstat (limited to 'store/sql_post_store.go')
-rw-r--r-- | store/sql_post_store.go | 5 |
1 files changed, 5 insertions, 0 deletions
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() { |