Added index key to qr_code_id in messages table