{"html_url": "https://github.com/simonw/sqlite-utils/pull/32#issuecomment-506784912", "issue_url": "https://api.github.com/repos/simonw/sqlite-utils/issues/32", "id": 506784912, "node_id": "MDEyOklzc3VlQ29tbWVudDUwNjc4NDkxMg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-28T15:55:13Z", "updated_at": "2019-06-28T15:55:13Z", "author_association": "OWNER", "body": "Documentation, to be added as a subsection of https://sqlite-utils.readthedocs.io/en/latest/python-api.html#adding-foreign-key-constraints\r\n\r\n### Adding multiple foreign key constraints at once\r\n\r\nThe final step in adding a new foreign key to a SQLite database is to run VACUUM, to ensure the new foreign key is available in future introspection queries.\r\n\r\nVACUUM against a large (multi-GB) database can take several minutes or longer. If you are adding multiple foreign keys using table.add_foreign_key(...) these can quickly add up.\r\n\r\nInstead, you can use db.add_foreign_keys(...) to add multiple foreign keys within a single transaction. This method takes a list of four-tuples, each one specifying a table, column, other_table and other_column.\r\n\r\nHere's an example adding two foreign keys at once:\r\n\r\n db.add_foreign_keys([\r\n (\"dogs\", \"breed_id\", \"breeds\", \"id\"),\r\n (\"dogs\", \"home_town_id\", \"towns\", \"id\")\r\n ])\r\n\r\n", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 462094937, "label": "db.add_foreign_keys() method"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/465#issuecomment-506797086", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/465", "id": 506797086, "node_id": "MDEyOklzc3VlQ29tbWVudDUwNjc5NzA4Ng==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-28T16:32:33Z", "updated_at": "2019-06-28T16:32:33Z", "author_association": "OWNER", "body": "Next step:\r\n\r\n- [ ] build `/database/-/inspect` which shows tables, columns, column types and foreign keys\r\n\r\nIt won't show table counts. Or maybe it will include them optionally but only for `-I` databases, in a special area of the JSON reserved for immutable-only inspect details.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 443038584, "label": "Decide what to do about /-/inspect"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/465#issuecomment-506797736", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/465", "id": 506797736, "node_id": "MDEyOklzc3VlQ29tbWVudDUwNjc5NzczNg==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-28T16:34:33Z", "updated_at": "2019-06-28T16:34:33Z", "author_association": "OWNER", "body": "I'm closing this because #531 counts as a decision.", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 443038584, "label": "Decide what to do about /-/inspect"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/294#issuecomment-506801311", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/294", "id": 506801311, "node_id": "MDEyOklzc3VlQ29tbWVudDUwNjgwMTMxMQ==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-28T16:45:28Z", "updated_at": "2019-06-28T16:45:28Z", "author_association": "OWNER", "body": "This can happen as part of #531 ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 327365110, "label": "inspect should record column types"}, "performed_via_github_app": null} {"html_url": "https://github.com/simonw/datasette/issues/296#issuecomment-506801644", "issue_url": "https://api.github.com/repos/simonw/datasette/issues/296", "id": 506801644, "node_id": "MDEyOklzc3VlQ29tbWVudDUwNjgwMTY0NA==", "user": {"value": 9599, "label": "simonw"}, "created_at": "2019-06-28T16:46:34Z", "updated_at": "2019-06-28T16:46:34Z", "author_association": "OWNER", "body": "The first of these will be built in #531 ", "reactions": "{\"total_count\": 0, \"+1\": 0, \"-1\": 0, \"laugh\": 0, \"hooray\": 0, \"confused\": 0, \"heart\": 0, \"rocket\": 0, \"eyes\": 0}", "issue": {"value": 327395270, "label": "Per-database and per-table /-/ URL namespace"}, "performed_via_github_app": null}