diff options
author | =Corey Hulen <corey@hulen.com> | 2015-09-22 01:15:41 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-09-22 01:15:41 -0700 |
commit | 08a3acbb44b043b9bb56f9b96e91432352d06d1a (patch) | |
tree | ceb451571691d0530ff2c97a033fcc206c42d3ea /store/sql_store.go | |
parent | f05a2c03d5dbf5b0b7d09148a37d2325012b309f (diff) | |
download | chat-08a3acbb44b043b9bb56f9b96e91432352d06d1a.tar.gz chat-08a3acbb44b043b9bb56f9b96e91432352d06d1a.tar.bz2 chat-08a3acbb44b043b9bb56f9b96e91432352d06d1a.zip |
Adding team settings to admin console
Diffstat (limited to 'store/sql_store.go')
-rw-r--r-- | store/sql_store.go | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/store/sql_store.go b/store/sql_store.go index 7f3b555f1..7f3c59164 100644 --- a/store/sql_store.go +++ b/store/sql_store.go @@ -311,26 +311,21 @@ func (ss SqlStore) CreateColumnIfNotExists(tableName string, columnName string, } } -// func (ss SqlStore) RemoveColumnIfExists(tableName string, columnName string) bool { +func (ss SqlStore) RemoveColumnIfExists(tableName string, columnName string) bool { -// // XXX TODO FIXME this should be removed after 0.6.0 -// if utils.Cfg.SqlSettings.DriverName == "postgres" { -// return false -// } - -// if !ss.DoesColumnExist(tableName, columnName) { -// return false -// } + if !ss.DoesColumnExist(tableName, columnName) { + return false + } -// _, err := ss.GetMaster().Exec("ALTER TABLE " + tableName + " DROP COLUMN " + columnName) -// if err != nil { -// l4g.Critical("Failed to drop column %v", err) -// time.Sleep(time.Second) -// panic("Failed to drop column " + err.Error()) -// } + _, err := ss.GetMaster().Exec("ALTER TABLE " + tableName + " DROP COLUMN " + columnName) + if err != nil { + l4g.Critical("Failed to drop column %v", err) + time.Sleep(time.Second) + panic("Failed to drop column " + err.Error()) + } -// return true -// } + return true +} // func (ss SqlStore) RenameColumnIfExists(tableName string, oldColumnName string, newColumnName string, colType string) bool { |