more safeguards for logs table migration