Skip to content

Commit

Permalink
upgrade db automatically if db is sqlite
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre Tardy <pierre.tardy@intel.com>
  • Loading branch information
Pierre Tardy committed Mar 11, 2014
1 parent 589d4bc commit 2e6c234
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions master/buildbot/db/connector.py
Expand Up @@ -112,6 +112,8 @@ def setup(self, check_version=True, verbose=True):

def check_current(res):
if not res:
if db_url.startswith("sqlite"):
return self.model.upgrade()
for l in upgrade_message.split('\n'):
log.msg(l)
raise exceptions.DatabaseNotReadyError()
Expand Down

0 comments on commit 2e6c234

Please sign in to comment.