diff options
author | Florian Orben <florian.orben@gmail.com> | 2015-11-05 23:55:31 +0100 |
---|---|---|
committer | Florian Orben <florian.orben@gmail.com> | 2015-11-05 23:55:31 +0100 |
commit | e00836f8df00670e8c02daad7e02a13283ddb92f (patch) | |
tree | 5cc4eb804d554caf36ab483c8c0f14f4be92bdb4 /store/sql_post_store.go | |
parent | b085bc2d56bdc98101b8cb50848aee248d42af28 (diff) | |
download | chat-e00836f8df00670e8c02daad7e02a13283ddb92f.tar.gz chat-e00836f8df00670e8c02daad7e02a13283ddb92f.tar.bz2 chat-e00836f8df00670e8c02daad7e02a13283ddb92f.zip |
postgres needs another query to get table information...
Diffstat (limited to 'store/sql_post_store.go')
-rw-r--r-- | store/sql_post_store.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/store/sql_post_store.go b/store/sql_post_store.go index 61cd109a1..7978408a2 100644 --- a/store/sql_post_store.go +++ b/store/sql_post_store.go @@ -40,8 +40,8 @@ func NewSqlPostStore(sqlStore *SqlStore) PostStore { } func (s SqlPostStore) UpgradeSchemaIfNeeded() { - col := s.GetColumnInformation("Posts", "Props") - if col.Type != "text" { + colType := s.GetColumnDataType("Posts", "Props") + if colType != "text" { _, err := s.GetMaster().Exec("ALTER TABLE Posts MODIFY COLUMN Props TEXT") if err != nil { l4g.Critical("Failed to alter column Posts.Props to TEXT: " + err.Error()) |