Error: Failed to prepare transaction: invalid or corrupted database