{"id": 521287994, "node_id": "MDExOlB1bGxSZXF1ZXN0NTIxMjg3OTk0", "number": 203, "state": "open", "locked": 0, "title": "changes to allow for compound foreign keys", "user": {"value": 1049910, "label": "drkane"}, "body": "Add support for compound foreign keys, as per issue #117 \r\n\r\nNot sure if this is the right approach. In particular I'm unsure about:\r\n\r\n - the new `ForeignKey` class, which replaces the namedtuple in order to ensure that `column` and `other_column` are forced into tuples. The class does the job, but doesn't feel very elegant.\r\n - I haven't rewritten `guess_foreign_table` to take account of multiple columns, so it just checks for the first column in the foreign key definition. This isn't ideal.\r\n - I haven't added any ability to the CLI to add compound foreign keys, it's only in the python API at the moment.\r\n\r\nThe PR also contains a minor related change that columns and tables are always quoted in foreign key definitions.", "created_at": "2020-11-16T00:30:10Z", "updated_at": "2023-01-25T18:47:18Z", "closed_at": null, "merged_at": null, "merge_commit_sha": "0507a9464314f84e9e58b1931c583df51d757d7c", "assignee": null, "milestone": null, "draft": 0, "head": "5e43e31c2b9bcf6b5d1460b0f848fed019ed42a6", "base": "f1277f638f3a54a821db6e03cb980adad2f2fa35", "author_association": "FIRST_TIME_CONTRIBUTOR", "repo": {"value": 140912432, "label": "sqlite-utils"}, "url": "https://github.com/simonw/sqlite-utils/pull/203", "merged_by": null, "auto_merge": null}