Added SQL change for null insertion of hoard last ruler