{"html_url": "https://github.com/simonw/sqlite-utils/issues/112#issuecomment-627036749", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/112", "id": 627036749, "node_id": "MDEyOklzc3VlQ29tbWVudDYyNzAzNjc0OQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-12T00:27:24Z", "updated_at": "2020-05-12T00:27:24Z", "author_association": "OWNER", "body": "Here's an example of some code that would be cleaner with this mechanism: https://github.com/dogsheep/swarm-to-sqlite/blob/f4a82633da927cde672c9d9af92930bfca2e3ddf/swarm_to_sqlite/utils.py#L120-L143", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 616271236, "label": "add_foreign_key(...., ignore=True)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/112#issuecomment-627036475", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/112", "id": 627036475, "node_id": "MDEyOklzc3VlQ29tbWVudDYyNzAzNjQ3NQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-12T00:26:25Z", "updated_at": "2020-05-12T00:26:48Z", "author_association": "OWNER", "body": "Question: if you use `ignore=True` should it still raise an error if one of the columns you referenced does not exist?\r\n\r\nThat's tricky. I'm leaning towards \"that's still an error\".\r\n\r\nAre we ignoring an already existing foreign key, or ignoring all errors?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 616271236, "label": "add_foreign_key(...., ignore=True)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/112#issuecomment-627035928", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/112", "id": 627035928, "node_id": "MDEyOklzc3VlQ29tbWVudDYyNzAzNTkyOA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-12T00:24:16Z", "updated_at": "2020-05-12T00:24:51Z", "author_association": "OWNER", "body": "I would add `ignore=True/False` as a parameter here:\r\nhttps://github.com/simonw/sqlite-utils/blob/af3f81b540923f2cf04c76cfa81b0d811c0084bf/sqlite_utils/db.py#L731-L761", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 616271236, "label": "add_foreign_key(...., ignore=True)"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/112#issuecomment-627036010", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/112", "id": 627036010, "node_id": "MDEyOklzc3VlQ29tbWVudDYyNzAzNjAxMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2020-05-12T00:24:37Z", "updated_at": "2020-05-12T00:24:37Z", "author_association": "OWNER", "body": "Here's how it works for `create_view`:\r\nhttps://github.com/simonw/sqlite-utils/blob/af3f81b540923f2cf04c76cfa81b0d811c0084bf/sqlite_utils/db.py#L327-L336", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 616271236, "label": "add_foreign_key(...., ignore=True)"}, "performed_via_github_app": null}