summaryrefslogtreecommitdiffstats
path: root/store/sql_store.go
diff options
context:
space:
mode:
authorAntti Ahti <antti.ahti@gmail.com>2015-10-30 17:44:00 +0200
committerAntti Ahti <antti.ahti@gmail.com>2015-10-30 17:44:00 +0200
commit9403b8b9d8d36d4d85f1c4f527dc154790acc698 (patch)
tree42bd501092dc08b2704828b35faf12d625ed138c /store/sql_store.go
parent256be4c14dfd99fc923d497cc6d7dfe3f4e8e3c5 (diff)
downloadchat-9403b8b9d8d36d4d85f1c4f527dc154790acc698.tar.gz
chat-9403b8b9d8d36d4d85f1c4f527dc154790acc698.tar.bz2
chat-9403b8b9d8d36d4d85f1c4f527dc154790acc698.zip
Log errors in table creation
This is really helpful if you somehow mess up the schema definitions.
Diffstat (limited to 'store/sql_store.go')
-rw-r--r--store/sql_store.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/store/sql_store.go b/store/sql_store.go
index 8965fef64..e5c540e06 100644
--- a/store/sql_store.go
+++ b/store/sql_store.go
@@ -121,7 +121,10 @@ func NewSqlStore() Store {
sqlStore.webhook = NewSqlWebhookStore(sqlStore)
sqlStore.preference = NewSqlPreferenceStore(sqlStore)
- sqlStore.master.CreateTablesIfNotExists()
+ err := sqlStore.master.CreateTablesIfNotExists()
+ if err != nil {
+ l4g.Critical("Error creating database tables: %v", err)
+ }
sqlStore.team.(*SqlTeamStore).UpgradeSchemaIfNeeded()
sqlStore.channel.(*SqlChannelStore).UpgradeSchemaIfNeeded()