Beispiel #1
0
def update_database(conf):
    """Do any database updates required at process boot time, such as
    updating the traits table.
    """
    if conf.placement_database.sync_on_startup:
        migration.upgrade('head')
    ctx = db_api.DbContext()
    trait.ensure_sync(ctx)
    resource_class.ensure_sync(ctx)
Beispiel #2
0
 def db_sync(self, engine):
     migration.upgrade('head')
Beispiel #3
0
 def db_sync(self):
     # Let exceptions raise for now, they will go to stderr.
     migration.upgrade('head')
     return 0