{"html_url": "https://github.com/simonw/sqlite-utils/issues/16#issuecomment-496756348", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/16", "id": 496756348, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5Njc1NjM0OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-29T02:12:43Z", "updated_at": "2019-05-29T02:12:43Z", "author_association": "OWNER", "body": "For the CLI I'm thinking:\r\n\r\n sqlite-utils add-column data.db mytable col text --fk othertable id\r\n\r\nSo the foreign key is added using `--fk othertable othercolumn`\r\n\r\nIf the user doesn't provide the column type we can derive it from the foreign key.\r\n\r\nCan we make the `othercolumn` optional? That would be neat - then we could automatically detect it using the sole primary key of the referenced table.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 413867537, "label": "add_column() should support REFERENCES {other_table}({other_column})"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/16#issuecomment-496756758", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/16", "id": 496756758, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5Njc1Njc1OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-29T02:14:50Z", "updated_at": "2019-05-29T02:14:50Z", "author_association": "OWNER", "body": "Hmm... probably not:\r\n\r\n> For options, only a fixed number of arguments is supported.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 413867537, "label": "add_column() should support REFERENCES {other_table}({other_column})"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/16#issuecomment-496757010", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/16", "id": 496757010, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5Njc1NzAxMA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-29T02:16:17Z", "updated_at": "2019-05-29T02:16:17Z", "author_association": "OWNER", "body": "In that case `--fk othertable` detects the primary key.\r\n\r\nIf you want to point at a different column, use `--fk-col X`", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 413867537, "label": "add_column() should support REFERENCES {other_table}({other_column})"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/21#issuecomment-496786354", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/21", "id": 496786354, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5Njc4NjM1NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-29T05:09:01Z", "updated_at": "2019-05-29T05:09:01Z", "author_association": "OWNER", "body": "Shipped this feature in sqlite-utils 1.1: https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v1-1", "reactions": "{\"total_count\": 1, \"+1\": 1, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 448391492, "label": "Option to ignore inserts if primary key exists already"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/sqlite-utils/issues/16#issuecomment-496787958", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/16", "id": 496787958, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5Njc4Nzk1OA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-29T05:17:58Z", "updated_at": "2019-05-29T05:17:58Z", "author_association": "OWNER", "body": "Shipped this feature in sqlite-utils 1.1: https://sqlite-utils.readthedocs.io/en/latest/changelog.html#v1-1", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 413867537, "label": "add_column() should support REFERENCES {other_table}({other_column})"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/120#issuecomment-496966227", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/120", "id": 496966227, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5Njk2NjIyNw==", "user": {"value": 26342344, "label": "duarteocarmo"}, "created_at": "2019-05-29T14:40:52Z", "updated_at": "2019-05-29T14:40:52Z", "author_association": "NONE", "body": "I would really like this. If you give me some pointers @simonw I'm willing to PR!", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 275087397, "label": "Plugin that adds an authentication layer of some sort"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/492#issuecomment-496970219", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/492", "id": 496970219, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5Njk3MDIxOQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-29T14:50:10Z", "updated_at": "2019-05-29T14:50:10Z", "author_association": "OWNER", "body": "Code in question:\r\nhttps://github.com/simonw/datasette/blob/2a4b892d6c0f6609ea48df0dc393397af2b7b1c1/datasette/templates/table.html#L84-L86", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 449854604, "label": "Facets not correctly persisted in hidden form fields"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/485#issuecomment-497116074", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/485", "id": 497116074, "node_id": "MDEyOklzc3VlQ29tbWVudDQ5NzExNjA3NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-05-29T21:29:16Z", "updated_at": "2019-05-29T21:29:16Z", "author_association": "OWNER", "body": "Another good rule of thumb: look for text fields with a unique constraint?", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 447469253, "label": "Improvements to table label detection "}, "performed_via_github_app": null}