postgres needs another query to get table information...

Этот коммит содержится в:
Florian Orben
2015-11-05 23:55:31 +01:00
родитель b085bc2d56
Коммит e00836f8df
2 изменённых файлов: 8 добавлений и 17 удалений

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

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