home / github / issue_comments

Menu
  • GraphQL API

issue_comments: 968359868

This data as json

html_url issue_url id node_id user created_at updated_at author_association body reactions issue performed_via_github_app
https://github.com/simonw/sqlite-utils/issues/335#issuecomment-968359868 https://api.github.com/repos/simonw/sqlite-utils/issues/335 968359868 IC_kwDOCGYnMM45t_-8 9599 2021-11-14T20:41:42Z 2021-11-14T20:41:42Z OWNER The "index idx_generators_eia860_report_date already exists" error suggests that the problem here is actually one of an index name collision. ```python table.create_index([fk.column]) ``` This will derive a name for the index automatically from the name of the table and the name of the passed in columns: https://github.com/simonw/sqlite-utils/blob/92aa5c9c5d26b0889c8c3d97c76a908d5f8af211/sqlite_utils/db.py#L1536-L1539 So perhaps `.create_index()` should grow an extra option that creates the index even if the name already exists, by finding a new name. {"total_count": 0, "+1": 0, "-1": 0, "laugh": 0, "hooray": 0, "confused": 0, "heart": 0, "rocket": 0, "eyes": 0} 1042569687  
Powered by Datasette · Queries took 0.893ms