def create_tables(database):
    '''Create all tables in the given database'''
    logging.getLogger(__name__).debug("Creating missing database tables")
    database.connect()
    database.create_tables([User,
                            Group,
                            UserToGroup,
                            GroupToCapability,
                            Capability], safe=True)
Create all tables in the given database