Updated database schema for full utf8 compatibility

Этот коммит содержится в:
nickago
2015-07-09 08:34:36 -07:00
родитель b6fb6ea3be
Коммит c84baf230c
2 изменённых файлов: 15 добавлений и 2 удалений

Просмотреть файл

@@ -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() {