[MM-36995] Start using db native JSON datatypes (#17930)

* Start using db native JSON datatypes

* Fix syntax to work on MySQL 5.7.12
Этот коммит содержится в:
Claudio Costa
2021-07-28 08:50:36 +02:00
коммит произвёл GitHub
родитель 1c63e6a848
Коммит 1ae1c38c9f
15 изменённых файлов: 84 добавлений и 54 удалений

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

@@ -33,7 +33,7 @@ func newSqlThreadStore(sqlStore *SqlStore) store.ThreadStore {
tableThreads := db.AddTableWithName(model.Thread{}, "Threads").SetKeys(false, "PostId")
tableThreads.ColMap("PostId").SetMaxSize(26)
tableThreads.ColMap("ChannelId").SetMaxSize(26)
tableThreads.ColMap("Participants").SetMaxSize(0)
tableThreads.ColMap("Participants").SetDataType(sqlStore.jsonDataType())
tableThreadMemberships := db.AddTableWithName(model.ThreadMembership{}, "ThreadMemberships").SetKeys(false, "PostId", "UserId")
tableThreadMemberships.ColMap("PostId").SetMaxSize(26)
tableThreadMemberships.ColMap("UserId").SetMaxSize(26)