diff options
author | Antti Ahti <antti.ahti@gmail.com> | 2015-10-30 17:44:00 +0200 |
---|---|---|
committer | Antti Ahti <antti.ahti@gmail.com> | 2015-10-30 17:44:00 +0200 |
commit | 9403b8b9d8d36d4d85f1c4f527dc154790acc698 (patch) | |
tree | 42bd501092dc08b2704828b35faf12d625ed138c /store | |
parent | 256be4c14dfd99fc923d497cc6d7dfe3f4e8e3c5 (diff) | |
download | chat-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')
-rw-r--r-- | store/sql_store.go | 5 |
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() |