Skip to content

.add_missing_columns() does not take case insensitivity into account #221

@simonw

Description

@simonw

SQLite columns are case insensitive - but the .add_missing_columns() method doesn't know that. This means that it can crash if it identifies a column that is a case-insensitive duplicate of an existing column.

def add_missing_columns(self, records):
needed_columns = suggest_column_types(records)
current_columns = self.columns_dict
for col_name, col_type in needed_columns.items():
if col_name not in current_columns:
self.add_column(col_name, col_type)
return self

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions