Conditionally remove has_external_data column