{"id": 718734191, "node_id": "MDExOlB1bGxSZXF1ZXN0NzE4NzM0MTkx", "number": 22, "state": "open", "locked": 0, "title": "Make sure that case-insensitive column names are unique", "user": {"value": 32016596, "label": "FabianHertwig"}, "body": "This closes #21.\r\n\r\nWhen there are metadata entries with the same case insensitive string, then there is an error when trying to create a new column for that metadata entry in the database table, because a column with that case insensitive name already exists.\r\n\r\n```xml\r\n \r\n \r\n \r\n \r\n```\r\n\r\nThe code added in this PR checks if a key already exists in a record and if so adds a number at its end. The resulting column names look like the example below then. Interestingly, the column names viewed with Datasette are not case insensitive.\r\n\r\n```text\r\nstartDate, endDate, value, unit, sourceName, sourceVersion, creationDate, metadata_meal, metadata_Meal_2, metadata_Mahlzeit\r\n```\r\n", "created_at": "2021-08-24T13:13:38Z", "updated_at": "2021-08-24T13:26:20Z", "closed_at": null, "merged_at": null, "merge_commit_sha": "c757d372c10284cd6fa58d144549bc89691341c3", "assignee": null, "milestone": null, "draft": 0, "head": "b16fb556f84a0eed262a518ca7ec82a467155d23", "base": "9fe3cb17e03d6c73222b63e643638cf951567c4c", "author_association": "FIRST_TIME_CONTRIBUTOR", "repo": {"value": 197882382, "label": "healthkit-to-sqlite"}, "url": "https://github.com/dogsheep/healthkit-to-sqlite/pull/22", "merged_by": null, "auto_merge": null}