From 7c56b64c31c82044225edc5e4f5f09f21bf6a339 Mon Sep 17 00:00:00 2001 From: Azareal Date: Tue, 28 May 2019 10:07:26 +1000 Subject: [PATCH] mysql x.x --- cmd/query_gen/main.go | 4 ++-- common/forum_store.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cmd/query_gen/main.go b/cmd/query_gen/main.go index 9f314865..7fd15512 100644 --- a/cmd/query_gen/main.go +++ b/cmd/query_gen/main.go @@ -186,9 +186,9 @@ func seedTables(adapter qgen.Adapter) error { // // TODO: Stop processFields() from stripping the spaces in the descriptions in the next commit - qgen.Install.SimpleInsert("forums", "name, active, desc", "'Reports',0,'All the reports go here'") + qgen.Install.SimpleInsert("forums", "name, active, desc, tmpl", "'Reports',0,'All the reports go here',''") - qgen.Install.SimpleInsert("forums", "name, lastTopicID, lastReplyerID, desc", "'General',1,1,'A place for general discussions which don't fit elsewhere'") + qgen.Install.SimpleInsert("forums", "name, lastTopicID, lastReplyerID, desc, tmpl", "'General',1,1,'A place for general discussions which don't fit elsewhere',''") // diff --git a/common/forum_store.go b/common/forum_store.go index 04740d1a..9fe0663f 100644 --- a/common/forum_store.go +++ b/common/forum_store.go @@ -81,7 +81,7 @@ func NewMemoryForumStore() (*MemoryForumStore, error) { get: acc.Select("forums").Columns("name, desc, tmpl, active, order, preset, parentID, parentType, topicCount, lastTopicID, lastReplyerID").Where("fid = ?").Prepare(), getAll: acc.Select("forums").Columns("fid, name, desc, tmpl, active, order, preset, parentID, parentType, topicCount, lastTopicID, lastReplyerID").Orderby("order ASC, fid ASC").Prepare(), delete: acc.Update("forums").Set("name= '', active = 0").Where("fid = ?").Prepare(), - create: acc.Insert("forums").Columns("name, desc, active, preset").Fields("?,?,?,?").Prepare(), + create: acc.Insert("forums").Columns("name, desc, tmpl, active, preset").Fields("?,?,'',?,?").Prepare(), count: acc.Count("forums").Where("name != ''").Prepare(), updateCache: acc.Update("forums").Set("lastTopicID = ?, lastReplyerID = ?").Where("fid = ?").Prepare(), addTopics: acc.Update("forums").Set("topicCount = topicCount + ?").Where("fid = ?").Prepare(),